@arcgis/core 4.27.0-next.20230321 → 4.27.0-next.20230323
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/analysis/LineOfSightAnalysisObserver.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/02b6227c156ee0d8eb66.js +1 -0
- package/assets/esri/core/workers/chunks/{7e0c65aa61c2ff0c3504.js → 1c98b92933a48cf96c1e.js} +1 -1
- package/assets/esri/core/workers/chunks/{a27951dbe83c63f9d01a.js → 26bc91a9d9d7345a3eba.js} +1 -1
- package/assets/esri/core/workers/chunks/321f272d4c7ed6b0cb46.js +1 -0
- package/assets/esri/core/workers/chunks/{a09cc8e2ff43fe4afa04.js → 375628de4cfc71cb41c1.js} +1 -1
- package/assets/esri/core/workers/chunks/47bd558e2ce89f47f908.js +1 -0
- package/assets/esri/core/workers/chunks/4cb62855bb1ae608bfde.js +1 -0
- package/assets/esri/core/workers/chunks/4f0c2b6b200bf8222fd7.js +1 -0
- package/assets/esri/core/workers/chunks/5252f3cc244204edc299.js +1 -0
- package/assets/esri/core/workers/chunks/6f952a6464cf9e62dbac.js +1098 -0
- package/assets/esri/core/workers/chunks/76d6c1fc25f02bcf258e.js +1 -0
- package/assets/esri/core/workers/chunks/{d6ec7682de8fad9718e9.js → 77dccfaf1f9e778973b3.js} +1 -1
- package/assets/esri/core/workers/chunks/{c5d872adce711ec61ede.js → 8980c5dc389c27368b73.js} +1 -1
- package/assets/esri/core/workers/chunks/{6acaf28cba5d49a98fb6.js → 91b292f310f06a0cbf72.js} +1 -1
- package/assets/esri/core/workers/chunks/9bac27976e7a71268b7b.js +1 -0
- package/assets/esri/core/workers/chunks/{ff9efa829497557ec26a.js → aa4640a0207e0be224e2.js} +1 -1
- package/assets/esri/core/workers/chunks/{81a6f4b43e047c3395c0.js → aebc5091bd4159197ce0.js} +1 -1
- package/assets/esri/core/workers/chunks/{c8cd3fde6d8d43ddb954.js → b6cdf4daf07d9e55f61e.js} +1 -1
- package/assets/esri/core/workers/chunks/{6b14673a4afd6ef81487.js → c76cabd2d2510a653dff.js} +1 -1
- package/assets/esri/core/workers/chunks/{4be7647605300e07e843.js → c90fff7e28ba5b443b11.js} +1 -1
- package/assets/esri/core/workers/chunks/{e637e47000f4dc48054d.js → cc7f4fd20443a2acf0f1.js} +1 -1
- package/assets/esri/core/workers/chunks/d19e9fab4f4fb765c6a3.js +1 -0
- package/assets/esri/core/workers/chunks/d9ef4891c8b0bdd90f5b.js +1 -0
- package/assets/esri/core/workers/chunks/{d92d6a43270fb0d366b4.js → de4f5c48efbcee82c3c1.js} +1 -1
- package/assets/esri/core/workers/chunks/f6e7948075b3742b4ef9.js +1 -0
- package/assets/esri/core/workers/chunks/{32f9b488915a4a8864e5.js → f8b9e0c1671e55b61904.js} +1 -1
- package/assets/esri/views/3d/analysis/Slice/images/heading-rotate.ts.svg +7 -28
- package/assets/esri/views/3d/analysis/Slice/images/tilt-rotate.ts.svg +11 -0
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ar.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_bg.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_bs.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ca.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_cs.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_da.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_de.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_el.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_en.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_es.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_et.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_fi.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_fr.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_he.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_hr.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_hu.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_id.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_it.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ja.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ko.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_lt.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_lv.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_nb.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_nl.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pl.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pt-BR.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pt-PT.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ro.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ru.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sk.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sl.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sr.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sv.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_th.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_tr.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_uk.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_vi.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-CN.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-HK.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-TW.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_nb.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_ar.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_bg.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_bs.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_ca.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_cs.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_da.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_de.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_el.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_en.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_es.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_et.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_fi.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_fr.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_he.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_hr.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_hu.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_id.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_it.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_ja.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_ko.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_lt.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_lv.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_nb.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_nl.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_pl.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_pt-BR.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_pt-PT.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_ro.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_ru.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_sk.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_sl.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_sr.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_sv.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_th.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_tr.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_uk.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_vi.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_zh-CN.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_zh-HK.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_zh-TW.json +1 -1
- package/chunks/ComponentShader.glsl.js +1 -1
- package/chunks/DefaultMaterial.glsl.js +4 -4
- package/chunks/vec42.js +1 -1
- package/core/Loadable.js +1 -1
- package/core/accessorSupport/Property.js +1 -1
- package/core/accessorSupport/tracking/SimpleTrackingTarget.js +1 -1
- package/core/analysisThemeUtils.js +1 -1
- package/core/maybe.js +1 -1
- package/geometry/support/buffer/math/vec4.js +1 -1
- package/interfaces.d.ts +1 -1
- package/layers/IntegratedMeshLayer.js +1 -1
- package/layers/LineOfSightLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/graphics/sources/connections/GeoEventConnection.js +1 -1
- package/layers/mixins/ImageryTileMixin.js +1 -1
- package/layers/mixins/RefreshableLayer.js +1 -1
- package/layers/support/SceneFilter.js +1 -1
- package/layers/support/SceneModifications.js +1 -1
- package/layers/support/rasterFunctions/clipUtils.js +1 -1
- package/layers/support/rasterFunctions/stretchUtils.js +1 -1
- package/package.json +1 -1
- package/portal/PortalItemResource.js +1 -1
- package/portal/support/resourceUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/support/utils.js +1 -1
- package/views/2d/engine/vectorTiles/TileHandler.js +1 -1
- package/views/2d/viewpointUtils.js +1 -1
- package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
- package/views/3d/analysis/Dimension/settings.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/Slice/SliceVisualization.js +1 -1
- package/views/3d/analysis/Slice/images/Factory.js +1 -1
- package/views/3d/analysis/Slice/images/generateTextures.js +1 -1
- package/views/3d/analysis/Slice/images/heading-rotate-svg.js +1 -1
- package/views/3d/analysis/Slice/images/tilt-rotate-svg.js +5 -0
- package/views/3d/analysis/Slice/settings.js +5 -0
- package/views/3d/analysis/Slice/sliceToolConfig.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/environment/Stars.js +1 -1
- package/views/3d/interactive/Manipulator3D.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ExtentTransformTool.js +1 -1
- package/views/3d/interactive/manipulatorUtils.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudWorker.js +1 -1
- package/views/3d/layers/VectorTileLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/i3s/I3SOverrides.js +1 -1
- package/views/3d/layers/i3s/PointCloudRendererUtil.js +1 -1
- package/views/3d/layers/i3s/PointCloudWorkerUtil.js +1 -1
- package/views/3d/layers/i3s/PointGraphic.js +1 -1
- package/views/3d/state/ViewState.js +1 -1
- package/views/3d/state/controllers/SurfaceCollisionCorrectionController.js +1 -1
- package/views/3d/terrain/GeometryState.js +1 -1
- package/views/3d/terrain/PatchGeometry.js +1 -1
- package/views/3d/terrain/PatchGeometryFactory.js +1 -1
- package/views/3d/terrain/TileAgent.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js +6 -5
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +11 -11
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeShadingNormal.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/AnimationTimeStep.js +1 -1
- package/views/3d/webgl-engine/lib/AttributeArray.js +1 -1
- package/views/3d/webgl-engine/lib/DefaultVertexAttributeLocations.js +1 -1
- package/views/3d/webgl-engine/lib/Normals.js +5 -0
- package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/RealisticTreeTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
- package/views/LayerViewManager.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/draw/support/Reshape.js +1 -1
- package/views/layers/SceneLayerView.js +1 -1
- package/views/support/colorUtils.js +1 -1
- package/views/webgl/ShaderTranspiler.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/Daylight/DaylightViewModel.js +1 -1
- package/widgets/Expand.js +1 -1
- package/widgets/FeatureForm/FieldInput.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/Search.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/0487ab23a20ec356ab4c.js +0 -1
- package/assets/esri/core/workers/chunks/29ee4f14602caf6967e4.js +0 -1
- package/assets/esri/core/workers/chunks/2c0775541cfec9d43acb.js +0 -1
- package/assets/esri/core/workers/chunks/4879164b48da9ad4547a.js +0 -1
- package/assets/esri/core/workers/chunks/69060e5cffc19e76062a.js +0 -1
- package/assets/esri/core/workers/chunks/87edeb09a948122fa030.js +0 -1
- package/assets/esri/core/workers/chunks/92951b85676df776961f.js +0 -1100
- package/assets/esri/core/workers/chunks/a71a5c8a9aa302bf6f01.js +0 -1
- package/assets/esri/core/workers/chunks/ad5c61daaed286c74982.js +0 -1
- package/assets/esri/core/workers/chunks/bc002e4dff8859571a7a.js +0 -1
- package/assets/esri/core/workers/chunks/ef2d3e84cd58df5f80af.js +0 -1
- package/assets/esri/core/workers/chunks/fec5e55e0fbf1710e22d.js +0 -1
- package/assets/esri/views/3d/analysis/Slice/images/tilt-rotate.svg +0 -80
- package/assets/esri/views/3d/analysis/Slice/images/tilt-rotate.ts.png +0 -0
- package/views/3d/analysis/Slice/images/tilt-rotate-png.js +0 -5
- package/views/3d/webgl-engine/core/shaderLibrary/util/DecodeNormal.glsl.js +0 -8
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{earth as e,mars as o,moon as r}from"../geometry/support/Ellipsoid.js";import{OverlayIndex as a,RenderTargetType as i}from"../views/3d/terrain/interfaces.js";import{IntegratedMeshMode as l}from"../views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js";import{ComponentData as t,ComponentDataType as d}from"../views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js";import{VertexDiscardByOpacity as n}from"../views/3d/webgl-engine/collections/Component/Material/shader/VertexDiscardByOpacity.glsl.js";import{ForwardLinearDepth as s}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{ShaderOutput as c}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SlicePass as m}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{
|
|
5
|
+
import{earth as e,mars as o,moon as r}from"../geometry/support/Ellipsoid.js";import{OverlayIndex as a,RenderTargetType as i}from"../views/3d/terrain/interfaces.js";import{IntegratedMeshMode as l}from"../views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js";import{ComponentData as t,ComponentDataType as d}from"../views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js";import{VertexDiscardByOpacity as n}from"../views/3d/webgl-engine/collections/Component/Material/shader/VertexDiscardByOpacity.glsl.js";import{ForwardLinearDepth as s}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{ShaderOutput as c}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SlicePass as m}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{NormalType as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateAttribute as v}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as u}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VertexNormal as h}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js";import{VertexPosition as p}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js";import{OutputDepth as C}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as w}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{ReadLinearDepth as b}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadLinearDepth.glsl.js";import{ComputeMaterialColor as f}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeMaterialColor.glsl.js";import{ComputeNormalTexture as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import{ComputeShadingNormal as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeShadingNormal.glsl.js";import{EvaluateSceneLighting as L,addLightingGlobalFactor as M}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as j}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{multipassTerrainTest as T}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{PBRMode as O,PhysicallyBasedRenderingParameters as S}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadBaseColorTexture as N}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js";import{ReadShadowMapPass as W}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{OverlayIM as A,getColorTexture as P}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{symbolAlphaCutoff as B}from"../views/3d/webgl-engine/core/shaderLibrary/util/AlphaCutoff.js";import{DiscardOrAdjustAlphaDraw as R}from"../views/3d/webgl-engine/core/shaderLibrary/util/AlphaDiscard.glsl.js";import{EllipsoidMode as D}from"../views/3d/webgl-engine/core/shaderLibrary/util/EllipsoidMode.js";import{glsl as $}from"../views/3d/webgl-engine/core/shaderModules/interfaces.js";import{ShaderBuilder as z}from"../views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js";import{Texture2DPassUniform as E}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{TransparencyPassType as _}from"../views/3d/webgl-engine/lib/TransparencyPassType.js";function V(a){const i=new z;i.include(p,a),i.include(h,a),i.include(u,a),i.include(v,a),i.include(s,a),i.include(t,a),i.include(R,a),i.include(m,a),i.include(N,a),i.include(n,a);const{vertex:V,fragment:F}=i;a.pbrMode!==O.Normal&&a.pbrMode!==O.Schematic||(i.include(S,a),a.hasNormalTexture&&i.include(y,a));const G=a.output===c.Shadow||a.output===c.ShadowHighlight||a.output===c.ShadowExcludeHighlight;G&&a.componentData===d.Varying?V.code.add($`#define discardShadows(castShadows) { if(!castShadows) { gl_Position = vec4(1e38, 1e38, 1e38, 1.0); return; } }`):V.code.add($`#define discardShadows(castShadows) {}`);const H=a.integratedMeshMode===l.ColorOverlay||a.integratedMeshMode===l.ColorOverlayWithWater,k=H&&a.output===c.Color&&a.pbrMode===O.WaterOnIntegratedMesh;return H&&(i.include(L,a),i.include(A,a),a.spherical?V.code.add($`
|
|
6
6
|
const float invEllipsoidRadius = ${$.float(1/(a.ellipsoidMode===D.Earth?e.radius:a.ellipsoidMode===D.Mars?o.radius:r.radius))};
|
|
7
7
|
vec2 projectOverlay(vec3 pos) {
|
|
8
8
|
return pos.xy / (1.0 + invEllipsoidRadius * pos.z);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{I as e}from"./mat4f64.js";import{ForwardLinearDepth as r}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{Offset as o}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{ShaderOutput as a}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as i}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as l}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{InstancedDoublePrecision as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{NormalAttribute as t,
|
|
5
|
+
import{I as e}from"./mat4f64.js";import{ForwardLinearDepth as r}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{Offset as o}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{ShaderOutput as a}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as i}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as l}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{InstancedDoublePrecision as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{NormalAttribute as t,NormalType as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{PositionAttribute as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/PositionAttribute.glsl.js";import{SymbolColor as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js";import{TextureCoordinateAttribute as m}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VertexNormal as u}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js";import{VerticalOffset as p}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{DefaultMaterialAuxiliaryPasses as v}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import{ComputeNormalTexture as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import{EvaluateAmbientOcclusion as f}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as b,addAmbientBoostFactor as w,addLightingGlobalFactor as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{multipassTerrainTest as C}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{Normals as T}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js";import{PhysicallyBasedRendering as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js";import{PhysicallyBasedRenderingParameters as j,PBRMode as M}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapPass as P,ReadShadowMapDraw as $}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{colorTextureUV as O,normalTextureUV as A,emissiveTextureUV as N,occlusionTextureUV as S,metallicRoughnessTextureUV as E}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TextureTransformUV.glsl.js";import{VisualVariables as V}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{symbolAlphaCutoff as D}from"../views/3d/webgl-engine/core/shaderLibrary/util/AlphaCutoff.js";import{DiscardOrAdjustAlphaPass as _}from"../views/3d/webgl-engine/core/shaderLibrary/util/AlphaDiscard.glsl.js";import{MixExternalColor as U}from"../views/3d/webgl-engine/core/shaderLibrary/util/MixExternalColor.glsl.js";import{addProjViewLocalOrigin as B,addCameraPosition as F}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as I}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{Float4PassUniform as R}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as z}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as W}from"../views/3d/webgl-engine/core/shaderModules/interfaces.js";import{Matrix4PassUniform as G}from"../views/3d/webgl-engine/core/shaderModules/Matrix4PassUniform.js";import{ShaderBuilder as k}from"../views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js";import{Texture2DPassUniform as q}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{TransparencyPassType as H}from"../views/3d/webgl-engine/lib/TransparencyPassType.js";import{VertexAttribute as J}from"../views/3d/webgl-engine/lib/VertexAttribute.js";function K(K){const Q=new k,{vertex:X,fragment:Y,varyings:Z}=Q;if(B(X,K),Q.include(d),Z.add("vpos","vec3"),Q.include(V,K),Q.include(s,K),Q.include(p,K),K.hasColorTextureTransform&&Q.include(O),K.output===a.Color||K.output===a.Alpha){K.hasNormalTextureTransform&&Q.include(A),K.hasEmissionTextureTransform&&Q.include(N),K.hasOcclusionTextureTransform&&Q.include(S),K.hasMetallicRoughnessTextureTransform&&Q.include(E),F(X,K),Q.include(t,K),Q.include(l,K);const a=K.normalType===n.Attribute||K.normalType===n.CompressedAttribute;a&&K.offsetBackfaces&&Q.include(o),Q.include(h,K),Q.include(u,K),K.instancedColor&&Q.attributes.add(J.INSTANCECOLOR,"vec4"),Z.add("vPositionLocal","vec3"),Q.include(m,K),Q.include(r,K),Q.include(c,K),Q.include(g,K),X.uniforms.add(new R("externalColor",(e=>e.externalColor))),Z.add("vcolorExt","vec4"),K.hasMultipassTerrain&&Z.add("depth","float"),K.hasModelTransformation&&X.uniforms.add(new G("model",(r=>null!=r.modelTransformation?r.modelTransformation:e))),X.code.add(W`
|
|
6
6
|
void main(void) {
|
|
7
7
|
forwardNormalizedVertexColor();
|
|
8
8
|
vcolorExt = externalColor;
|
|
@@ -17,11 +17,11 @@ import{I as e}from"./mat4f64.js";import{ForwardLinearDepth as r}from"../views/3d
|
|
|
17
17
|
vpos = calculateVPos();
|
|
18
18
|
vPositionLocal = vpos - view[3].xyz;
|
|
19
19
|
vpos = subtractOrigin(vpos);
|
|
20
|
-
${
|
|
20
|
+
${a?W`vNormalWorld = dpNormal(vvLocalNormal(normalModel()));`:""}
|
|
21
21
|
vpos = addVerticalOffset(vpos, localOrigin);
|
|
22
22
|
${K.hasVertexTangents?"vTangent = dpTransformVertexTangent(tangent);":""}
|
|
23
23
|
gl_Position = transformPosition(proj, view, ${K.hasModelTransformation?"model,":""} vpos);
|
|
24
|
-
${
|
|
24
|
+
${a&&K.offsetBackfaces?"gl_Position = offsetBackfacingClipPosition(gl_Position, vpos, vNormalWorld, cameraPosition);":""}
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
${K.hasMultipassTerrain?"depth = (view * vec4(vpos, 1.0)).z;":""}
|
|
@@ -33,7 +33,7 @@ import{I as e}from"./mat4f64.js";import{ForwardLinearDepth as r}from"../views/3d
|
|
|
33
33
|
${K.hasOcclusionTextureTransform?W`forwardOcclusionUV();`:""}
|
|
34
34
|
${K.hasMetallicRoughnessTextureTransform?W`forwardMetallicRoughnessUV();`:""}
|
|
35
35
|
}
|
|
36
|
-
`)
|
|
36
|
+
`)}return K.output===a.Alpha&&(Q.include(i,K),Q.include(_,K),Q.include(C,K),Y.uniforms.add([new z("opacity",(e=>e.opacity)),new z("layerOpacity",(e=>e.layerOpacity))]),K.hasColorTexture&&Y.uniforms.add(new q("tex",(e=>e.texture))),Y.include(U),Y.code.add(W`
|
|
37
37
|
void main() {
|
|
38
38
|
discardBySlice(vpos);
|
|
39
39
|
${K.hasMultipassTerrain?"terrainDepthTest(gl_FragCoord, depth);":""}
|
package/chunks/vec42.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{mathLogger as e}from"../geometry/support/buffer/math/common.js";function t(t,f
|
|
5
|
+
import{mathLogger as e}from"../geometry/support/buffer/math/common.js";function t(t,r,f){if(t.count!==r.count)return void e.error("source and destination buffers need to have the same number of elements");const n=t.count,o=f[0],u=f[1],s=f[2],d=f[3],a=f[4],i=f[5],c=f[6],p=f[7],l=f[8],m=f[9],y=f[10],B=f[11],h=f[12],S=f[13],b=f[14],g=f[15],M=t.typedBuffer,v=t.typedBufferStride,_=r.typedBuffer,j=r.typedBufferStride;for(let e=0;e<n;e++){const t=e*v,r=e*j,f=_[r],n=_[r+1],w=_[r+2],z=_[r+3];M[t]=o*f+a*n+l*w+h*z,M[t+1]=u*f+i*n+m*w+S*z,M[t+2]=s*f+c*n+y*w+b*z,M[t+3]=d*f+p*n+B*w+g*z}}function r(e,t,r){f(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function f(t,r,f,n=4,o=n){if(t.length/n!=r.length/o)return void e.error("source and destination buffers need to have the same number of elements");const u=t.length/n,s=f[0],d=f[1],a=f[2],i=f[3],c=f[4],p=f[5],l=f[6],m=f[7],y=f[8];let B=0,h=0;for(let e=0;e<u;e++){const e=r[B],f=r[B+1],u=r[B+2],S=r[B+3];t[h]=s*e+i*f+l*u,t[h+1]=d*e+c*f+m*u,t[h+2]=a*e+p*f+y*u,t[h+3]=S,B+=o,h+=n}}function n(e,t){const r=Math.min(e.count,t.count),f=e.typedBuffer,n=e.typedBufferStride,o=t.typedBuffer,u=t.typedBufferStride;for(let s=0;s<r;s++){const e=s*n,t=s*u,r=o[t],d=o[t+1],a=o[t+2],i=r*r+d*d+a*a;if(i>0){const t=1/Math.sqrt(i);f[e]=t*r,f[e+1]=t*d,f[e+2]=t*a}}}function o(e,t,r){u(e.typedBuffer,t,r,e.typedBufferStride)}function u(e,t,r,f=4){const n=Math.min(e.length/f,t.count),o=t.typedBuffer,u=t.typedBufferStride;let s=0,d=0;for(let a=0;a<n;a++)e[d]=r*o[s],e[d+1]=r*o[s+1],e[d+2]=r*o[s+2],e[d+3]=r*o[s+3],s+=u,d+=f}const s=Object.freeze(Object.defineProperty({__proto__:null,normalize:n,scale:u,scaleView:o,transformMat3:f,transformMat3View:r,transformMat4:t},Symbol.toStringTag,{value:"Module"}));export{r as a,o as b,t as c,n,u as s,f as t,s as v};
|
package/core/Loadable.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as o}from"../chunks/tslib.es6.js";import t from"./Error.js";import{
|
|
5
|
+
import{_ as o}from"../chunks/tslib.es6.js";import t from"./Error.js";import{abortMaybe as s}from"./maybe.js";import{EsriPromise as r}from"./Promise.js";import{onAbortOrThrow as l,onAbort as e}from"./promiseUtils.js";import a from"./Warning.js";import{property as n}from"./accessorSupport/decorators/property.js";import{subclass as i}from"./accessorSupport/decorators/subclass.js";const d="not-loaded",h="loading",c="failed",u="loaded",p=r=>{let p=class extends r{constructor(...o){super(...o),this._loadController=null,this.loadError=null,this.loadStatus="not-loaded",this._set("loadWarnings",[]),this.addResolvingPromise(new Promise((o=>{const s=this.load.bind(this);this.load=r=>{const a=new Promise(((o,s)=>{const e=l(r,s);this.destroyed&&s(new t("load:instance-destroyed",`Instance of '${this.declaredClass||this.constructor.name}' is already destroyed`,{instance:this})),this._promiseProps.when(o,s).finally((()=>{e&&e.remove()}))}));if(this.loadStatus===d){this._set("loadStatus",h);const o=this._loadController=new AbortController;s({signal:o.signal}),e(o.signal,(()=>{this._promiseProps.abort()}))}return o(),a}}))),this.when((()=>{this._set("loadStatus",u),this._loadController=null}),(o=>{this._set("loadStatus",c),this._set("loadError",o),this._loadController=null}))}destroy(){this._loadController=s(this._loadController),this._set("loadError",null),this._set("loadWarnings",[])}get loaded(){return this.loadStatus===u}get loadWarnings(){return this._get("loadWarnings")}load(){return null}cancelLoad(){return this.isFulfilled()||(this._set("loadError",new t("load:cancelled","Cancelled")),this._loadController?.abort()),this}};return o([n({readOnly:!0})],p.prototype,"loaded",null),o([n({readOnly:!0})],p.prototype,"loadError",void 0),o([n({clonable:!1})],p.prototype,"loadStatus",void 0),o([n({type:[a],readOnly:!0})],p.prototype,"loadWarnings",null),p=o([i("esri.core.Loadable")],p),p};let m=class extends(p(r)){};m=o([i("esri.core.Loadable")],m),function(o){function t(o){return!(!o||!o.load)}o.LoadableMixin=p,o.isLoadable=t}(m||(m={}));const _=m;export{_ as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{ObservableBase as t}from"./ObservableBase.js";import{OriginId as e}from"./PropertyOrigin.js";import{trackAccess as s,runTracked as i,trackExplicitDependencies as r,runUntracked as o}from"./tracking.js";import{Flags as n}from"./tracking/Flags.js";class a{constructor(t,e,s){this.properties=t,this.propertyName=e,this.metadata=s,this.observerObject=new l,this._accessed=null,this._handles=null,this.observerObject.flags=n.Dirty|(s.nonNullable?n.NonNullable:0)|(s.hasOwnProperty("value")?n.HasDefaultValue:0)|(void 0===s.get?n.DepTrackingInitialized:0)|(void 0===s.dependsOn?n.AutoTracked:0),c.register(this,this.observerObject,this.
|
|
5
|
+
import{ObservableBase as t}from"./ObservableBase.js";import{OriginId as e}from"./PropertyOrigin.js";import{trackAccess as s,runTracked as i,trackExplicitDependencies as r,runUntracked as o}from"./tracking.js";import{Flags as n}from"./tracking/Flags.js";class a{constructor(t,e,s){this.properties=t,this.propertyName=e,this.metadata=s,this.observerObject=new l,this._accessed=null,this._handles=null,this._finalizationToken={},this.observerObject.flags=n.Dirty|(s.nonNullable?n.NonNullable:0)|(s.hasOwnProperty("value")?n.HasDefaultValue:0)|(void 0===s.get?n.DepTrackingInitialized:0)|(void 0===s.dependsOn?n.AutoTracked:0),c.register(this,new WeakRef(this.observerObject),this._finalizationToken)}destroy(){c.unregister(this._finalizationToken),this.observerObject.destroy(),this._accessed=null,this._clearObservationHandles()}getComputed(){const t=this.observerObject;s(t);const a=this.properties.store,l=this.propertyName,c=t.flags,h=a.get(l);if(c&n.Computing)return h;if(~c&n.Dirty&&a.has(l))return h;t.flags|=n.Computing;const d=this.properties.host;let g;c&n.AutoTracked?g=i(this,this.metadata.get,d):(r(d,this),g=this.metadata.get.call(d)),a.set(l,g,e.COMPUTED);const f=a.get(l);return f===h?t.flags&=~n.Dirty:o(this.commit,this),t.flags&=~n.Computing,f}onObservableAccessed(t){t!==this.observerObject&&(null===this._accessed&&(this._accessed=[]),this._accessed.includes(t)||this._accessed.push(t))}onTrackingEnd(){this._clearObservationHandles();const t=this.observerObject;t.flags|=n.DepTrackingInitialized;const e=this._accessed;if(null===e)return;let s=this._handles;null===s&&(s=this._handles=[]);for(let i=0;i<e.length;++i)s.push(e[i].observe(t));e.length=0}notifyChange(){const t=this.observerObject;t.onInvalidated(),t.onCommitted()}invalidate(){this.observerObject.onInvalidated()}commit(){const t=this.observerObject;t.flags&=~n.Dirty,t.onCommitted()}_clearObservationHandles(){const t=this._handles;if(null!==t){for(let e=0;e<t.length;++e)t[e].remove();t.length=0}}}class l extends t{constructor(){super(...arguments),this.flags=0}onInvalidated(){~this.flags&n.Overriden&&(this.flags|=n.Dirty);const t=this._observers;if(t&&t.length>0)for(const e of t)e.onInvalidated()}onCommitted(){const t=this._observers;if(t&&t.length>0){const e=t.slice();for(const t of e)t.onCommitted()}}destroy(){this.flags&n.Dirty&&this.onCommitted(),super.destroy()}}const c=new FinalizationRegistry((t=>{t.deref()?.destroy()}));export{a as Property};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
class t{constructor(t){this._accessed=[],this._handles=[],this._observerObject=new
|
|
5
|
+
class t{constructor(t){this._accessed=[],this._handles=[],this._finalizationToken={},this._observerObject=new e(t),s.register(this,new WeakRef(this._observerObject),this._finalizationToken)}destroy(){s.unregister(this._observerObject),this._accessed.length=0,this._observerObject?.destroy(),this.clear()}onObservableAccessed(t){const e=this._accessed;e.includes(t)||e.push(t)}onTrackingEnd(){const t=this._handles,e=this._accessed,s=this._observerObject;for(let i=0;i<e.length;++i)t.push(e[i].observe(s));e.length=0}clear(){const t=this._handles;for(let e=0;e<t.length;++e)t[e].remove();t.length=0}}class e{constructor(t){this._notify=t,this._invalidCount=0,this.destroyed=!1}onInvalidated(){this._invalidCount++}onCommitted(){if(this.destroyed)return;const t=this._invalidCount;if(1===t)return this._invalidCount=0,void this._notify();this._invalidCount=t>0?t-1:0}destroy(){this.destroyed=!0,this._notify=i}}const s=new FinalizationRegistry((t=>{t.deref()?.destroy()}));function i(){}export{t as SimpleTrackingTarget};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import n from"../Color.js";import o from"../config.js";import{getColorLuminance as r}from"../views/support/colorUtils.js";function t(o
|
|
5
|
+
import n from"../Color.js";import o from"../config.js";import{getColorLuminance as r}from"../views/support/colorUtils.js";function t(o){return r(o,{ignoreAlpha:!0})>225?new n([0,0,0,o.a]):new n([255,255,255,o.a])}function e(o,r){const t=new n(o);return t.a*=r,t}function u(n=1){return e(o.analysisTheme.accentColor,n)}function i(){const n=u();return n.a=1,n}function c(){const n=u();return n.a=.5,n}function s(n=1){return t(u(n))}function f(){const n=s();return n.a=1,n}function a(n=1){return e(o.analysisTheme.textColor,n)}function l(n=1){return t(a(n))}export{u as getAccentColor,s as getContrastColor,i as getOpaqueAccentColor,f as getOpaqueContrastColor,a as getTextColor,l as getTextHaloColor,c as getTransparentAccentColor};
|
package/core/maybe.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
function n(n){return null!=n}function u(n,u){return null!=n?u(n):null}function r(n,u){return
|
|
5
|
+
function n(n){return null!=n}function u(n,u){return null!=n?u(n):null}function r(n,u){return l(n,u),n}function l(n,u){if(null==n)throw new Error(u??"value is None")}function t(n){return n?.destroy(),null}function o(n){return n?.dispose(),null}function e(n){return n?.remove(),null}function f(n){return n?.abort(),null}function c(n){return n?.release(),null}function i(n,u,r){return null!=n&&null!=u?null!=r?r(n,u):n.equals(u):n===u}function s(n){return null}function a(n,u){const r=new Array;for(const l of n)r.push(null!=l?u(l):null);return r}function p(n,r){for(const l of n)u(l,r)}function w(n){return n}export{f as abortMaybe,u as applySome,l as assertIsSome,w as assumeNonNull,t as destroyMaybe,o as disposeMaybe,i as equalsMaybe,p as forEachSome,n as isSome,a as mapMany,s as nullifyNonNullableForDispose,c as releaseMaybe,e as removeMaybe,r as unwrapOrThrow};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"./common.js";export{n as normalize,s as scale,b as scaleView,
|
|
5
|
+
import"./common.js";export{n as normalize,s as scale,b as scaleView,t as transformMat3,a as transformMat3View,c as transformMat4}from"../../../../chunks/vec42.js";
|
package/interfaces.d.ts
CHANGED
|
@@ -43130,7 +43130,7 @@ declare namespace __esri {
|
|
|
43130
43130
|
*
|
|
43131
43131
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-SearchIndex.html#supportedCategory)
|
|
43132
43132
|
*/
|
|
43133
|
-
readonly supportedCategory: "
|
|
43133
|
+
readonly supportedCategory: "esriTypeEntity" | "esriTypeRelationship" | "esriTypeBoth";
|
|
43134
43134
|
/**
|
|
43135
43135
|
* Defines a search index for a [KnowledgeGraph](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-KnowledgeGraph.html).
|
|
43136
43136
|
*
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/Error.js";import r from"../core/Handles.js";import{
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/Error.js";import r from"../core/Handles.js";import{MultiOriginJSONMixin as o}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as i}from"../core/promiseUtils.js";import{on as s,sync as a}from"../core/reactiveUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{reader as p}from"../core/accessorSupport/decorators/reader.js";import{subclass as d}from"../core/accessorSupport/decorators/subclass.js";import{persistable as c}from"../core/accessorSupport/decorators/persistable.js";import m from"./Layer.js";import{APIKeyMixin as y}from"./mixins/APIKeyMixin.js";import{ArcGISService as l}from"./mixins/ArcGISService.js";import{OperationalLayer as h}from"./mixins/OperationalLayer.js";import{PortalLayer as f}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as u}from"./mixins/ScaleRangeLayer.js";import{SceneService as v,SaveOperationType as S}from"./mixins/SceneService.js";import{elevationInfo as g}from"./support/commonProperties.js";import{I3SNodePageDefinition as j,I3SMaterialDefinition as w,I3STextureSetDefinition as _,I3SGeometryDefinition as T}from"./support/I3SLayerDefinitions.js";import x from"./support/SceneModifications.js";import{f as L}from"../chunks/persistableUrlUtils.js";let I=class extends(v(l(h(f(u(o(y(m)))))))){constructor(...e){super(...e),this._handles=new r,this.geometryType="mesh",this.operationalLayerType="IntegratedMeshLayer",this.type="integrated-mesh",this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.profile="mesh-pyramids",this.modifications=null,this._modificationsSource=null,this.elevationInfo=null,this.path=null}destroy(){this._handles.destroy()}initialize(){this._handles.add(s((()=>this.modifications),"after-changes",(()=>this.modifications=this.modifications),a))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}readModifications(e,t,r){this._modificationsSource={url:L(e,r),context:r}}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}async _doLoad(e){const t=e?.signal;try{await this.loadFromPortal({supportedTypes:["Scene Service"]},e)}catch(r){i(r)}if(await this._fetchService(t),null!=this._modificationsSource){const t=await x.fromUrl(this._modificationsSource.url,this.spatialReference,e);this.setAtOrigin("modifications",t,this._modificationsSource.context.origin),this._modificationsSource=null}await this._fetchIndexAndUpdateExtent(this.nodePages,t)}beforeSave(){if(null!=this._modificationsSource)return this.load().then((()=>{}),(()=>{}))}async saveAs(e,t){return this._debouncedSaveOperations(S.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"};return this._debouncedSaveOperations(S.SAVE,e)}validateLayer(e){if(e.layerType&&"IntegratedMesh"!==e.layerType)throw new t("integrated-mesh-layer:layer-type-not-supported","IntegratedMeshLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new t("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"});if(this.version.major>1)throw new t("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"})}_getTypeKeywords(){return["IntegratedMeshLayer"]}};e([n({type:String,readOnly:!0})],I.prototype,"geometryType",void 0),e([n({type:["show","hide"]})],I.prototype,"listMode",void 0),e([n({type:["IntegratedMeshLayer"]})],I.prototype,"operationalLayerType",void 0),e([n({json:{read:!1},readOnly:!0})],I.prototype,"type",void 0),e([n({type:j,readOnly:!0})],I.prototype,"nodePages",void 0),e([n({type:[w],readOnly:!0})],I.prototype,"materialDefinitions",void 0),e([n({type:[_],readOnly:!0})],I.prototype,"textureSetDefinitions",void 0),e([n({type:[T],readOnly:!0})],I.prototype,"geometryDefinitions",void 0),e([n({readOnly:!0})],I.prototype,"serviceUpdateTimeStamp",void 0),e([n({type:x}),c({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],I.prototype,"modifications",void 0),e([p(["web-scene","portal-item"],"modifications")],I.prototype,"readModifications",null),e([n(g)],I.prototype,"elevationInfo",void 0),e([n({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],I.prototype,"path",void 0),I=e([d("esri.layers.IntegratedMeshLayer")],I);const O=I;export{O as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import s from"../analysis/LineOfSightAnalysis.js";import t from"../analysis/LineOfSightAnalysisObserver.js";import r from"../analysis/LineOfSightAnalysisTarget.js";import i from"../core/Collection.js";import{referenceSetter as o}from"../core/collectionUtils.js";import{applySome as a}from"../core/maybe.js";import{MultiOriginJSONMixin as n}from"../core/MultiOriginJSONSupport.js";import{watch as l,syncAndInitial as p}from"../core/reactiveUtils.js";import{property as y}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import m from"./Layer.js";import{OperationalLayer as u}from"./mixins/OperationalLayer.js";const h=i.ofType(r);let d=class extends(u(n(m))){constructor(e){super(e),this.type="line-of-sight",this.operationalLayerType="LineOfSightLayer",this.analysis=new s,this.opacity=1}initialize(){this.addHandles(l((()=>this.analysis),((e,s)=>{null!=s&&s.parent===this&&(s.parent=null),null!=e&&(e.parent=this)}),p))}async load(){return null!=this.analysis&&this.addResolvingPromise(this.analysis.waitComputeExtent()),this}get observer(){return a(this.analysis,(e=>e.observer))}set observer(e){a(this.analysis,(s=>s.observer=e))}get targets(){return null!=this.analysis?this.analysis.targets:new i}set targets(e){o(e,this.analysis?.targets)}get fullExtent(){return null!=this.analysis?this.analysis.extent:null}get spatialReference(){return null!=this.analysis?this.analysis.spatialReference:null}releaseAnalysis(e){this.analysis===e&&(this.analysis=new s)}};e([y({json:{read:!1},readOnly:!0})],d.prototype,"type",void 0),e([y({type:["LineOfSightLayer"]})],d.prototype,"operationalLayerType",void 0),e([y({type:t,json:{read:!0,write:{isRequired:!0,ignoreOrigin:!0}}})],d.prototype,"observer",null),e([y({type:h,json:{read:!0,write:{ignoreOrigin:!0}}})],d.prototype,"targets",null),e([y({nonNullable:!0,json:{read:!1,write:!1}})],d.prototype,"analysis",void 0),e([y({readOnly:!0})],d.prototype,"fullExtent",null),e([y({readOnly:!0})],d.prototype,"spatialReference",null),e([y({readOnly:!0,json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],d.prototype,"opacity",void 0),e([y({type:["show","hide"]})],d.prototype,"listMode",void 0),d=e([c("esri.layers.LineOfSightLayer")],d);const f=d;export{f as default};
|
package/layers/SceneLayer.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import t from"../Graphic.js";import r from"../PopupTemplate.js";import"../renderers/ClassBreaksRenderer.js";import"../renderers/DictionaryRenderer.js";import"../renderers/DotDensityRenderer.js";import"../renderers/HeatmapRenderer.js";import"../renderers/PieChartRenderer.js";import"../renderers/Renderer.js";import"../renderers/SimpleRenderer.js";import"../renderers/UniqueValueRenderer.js";import"../renderers/support/jsonUtils.js";import{webSceneRendererTypes as s}from"../renderers/support/types.js";import o from"../request.js";import i from"../core/Collection.js";import a from"../core/Error.js";import n from"../core/Logger.js";import{MultiOriginJSONMixin as p}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as l,isAbortError as d}from"../core/promiseUtils.js";import{whenOnce as u}from"../core/reactiveUtils.js";import{join as y}from"../core/urlUtils.js";import{property as c}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{getProperties as f}from"../core/accessorSupport/utils.js";import{reader as h}from"../core/accessorSupport/decorators/reader.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import{OriginId as g}from"../core/accessorSupport/PropertyOrigin.js";import v from"./Layer.js";import{APIKeyMixin as b}from"./mixins/APIKeyMixin.js";import{ArcGISService as I}from"./mixins/ArcGISService.js";import{EditBusLayer as w}from"./mixins/EditBusLayer.js";import{OperationalLayer as j}from"./mixins/OperationalLayer.js";import{PortalLayer as L}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as S}from"./mixins/ScaleRangeLayer.js";import{SceneService as F,SaveOperationType as O}from"./mixins/SceneService.js";import{zeroCapabilities as T}from"./support/capabilities.js";import{elevationInfo as E,labelsVisible as A,legendEnabled as P,popupEnabled as _,screenSizePerspectiveEnabled as x}from"./support/commonProperties.js";import{FeatureReduction as D}from"./support/FeatureReduction.js";import U from"./support/FeatureReductionSelection.js";import{FetchAssociatedFeatureLayer as R}from"./support/FetchAssociatedFeatureLayer.js";import{defineFieldProperties as C}from"./support/fieldProperties.js";import q from"./support/FieldsIndex.js";import{fixRendererFields as Q,unpackFieldNames as N}from"./support/fieldUtils.js";import{I3SNodePageDefinition as k,I3SMaterialDefinition as G,I3STextureSetDefinition as V,I3SGeometryDefinition as K}from"./support/I3SLayerDefinitions.js";import M from"./support/LabelClass.js";import{reader as $}from"./support/labelingInfo.js";import W from"./support/LayerFloorInfo.js";import{RangeInfo as z}from"./support/RangeInfo.js";import B from"./support/SceneFilter.js";import{loadStyleRenderer as H}from"../renderers/support/styleUtils.js";import Z from"../rest/support/Query.js";import{sceneLayerEditingEnabled as J}from"../support/featureFlags.js";import{createPopupTemplate as X}from"../support/popupUtils.js";import{queryAttributesFromCachedAttributesId as Y}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as ee,getFetchPopupTemplate as te}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as re}from"../webdoc/support/opacityUtils.js";const se=["3DObject","Point"],oe=C();let ie=class extends(w(F(I(j(L(S(p(b(v))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new i,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.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getFeatureType(t?.feature)?.domains?.[e];return r&&"inherited"!==r.type?r:this.getField(e)?.domain??null}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 q(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:k.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get geometryType(){return ne[this.profile]||"mesh"}set renderer(e){Q(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(){const e=this.associatedLayer?.capabilities??T,{query:t,editing:{supportsGlobalId:r,supportsRollbackOnFailure:s,supportsUploadWithItemId:o,supportsGeometryUpdate:i,supportsReturnServiceEditsInSourceSpatialReference:a},data:{supportsZ:n,supportsM:p,isVersioned:l,supportsAttachment:d},operations:{supportsEditing:u,supportsAdd:y,supportsUpdate:c,supportsDelete:f,supportsQuery:h,supportsQueryAttachments:m}}=e,g=e.operations.supportsChangeTracking,v=!!this.associatedLayer?.infoFor3D&&J();return{query:t,editing:{supportsGlobalId:r,supportsReturnServiceEditsInSourceSpatialReference:a,supportsRollbackOnFailure:s,supportsGeometryUpdate:v&&i,supportsUploadWithItemId:o},data:{supportsAttachment:d,supportsZ:n,supportsM:p,isVersioned:l},operations:{supportsQuery:h,supportsQueryAttachments:m,supportsEditing:u&&g,supportsAdd:v&&y&&g,supportsDelete:v&&f&&g,supportsUpdate:c&&g}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.userHasEditingPrivileges}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}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&&ae[r]?ae[r]:(n.getLogger(this.declaredClass).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(l).then((()=>this._fetchService(t))).then((()=>Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),null!=this.filter?this.filter.loadGeometries(this.spatialReference):null]))).then((()=>this._validateElevationInfo())).then((()=>this._applyAssociatedLayerOverrides())).then((()=>this._populateFieldUsageInfo())).then((()=>H(this,{origin:"service"},t))).then((()=>Q(this.renderer,this.fieldsIndex))).then((()=>this.finishLoadEditablePortalLayer(e)));return this.addResolvingPromise(r),Promise.resolve(this)}async beforeSave(){null!=this.filter&&await this.load()}createQuery(){const e=new Z;return"mesh"!==this.geometryType&&(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;return e}))}async queryCachedAttributes(e,t){const r=N(this.fieldsIndex,await ee(this,te(this)));return Y(this.parsedUrl.path,this.attributeStorageInfo??[],e,t,r)}async queryCachedFeature(e,r){const s=await this.queryCachedAttributes(e,[r]);if(!s||0===s.length)throw new a("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const o=new t;return o.attributes=s[0],o.layer=this,o.sourceLayer=this,o}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.declaredClass).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return X(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 a("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 a("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){if(await this.load(t),!this.statisticsInfo)throw new a("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const r=this.fieldsIndex.get(e);if(!r)throw new a("scenelayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const s of this.statisticsInfo)if(s.name===r.name){const e=y(this.parsedUrl.path,s.href);return o(e,{query:{f:"json",token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then((e=>e.data))}throw new a("scenelayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(O.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(O.SAVE,e)}async applyEdits(e,t){const r=await import("./graphics/editingSupport.js");if(await this.load(),!this.associatedLayer)throw new a(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),r.applyEdits(this,this.associatedLayer.source,e,t)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new a(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}on(e,t){return super.on(e,t)}validateLayer(e){if(e.layerType&&!se.includes(e.layerType))throw new a("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 a("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 a("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,s=!1;if(null==e)r=!0,s=!0;else{const o=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,s=o;break;case"vertex-reference-frame":r=!0,s=!o;break;default:r=!1}}if(!r)throw new a("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!s)throw new a("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 a("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||!this.attributeStorageInfo.some((t=>t.name===e.name))),r=!!this.associatedLayer?.fields?.some((t=>t&&e.name===t.name)),s={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=s}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPopupOverrides()}_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)}_applyAssociatedLayerPopupOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled"],t=f(this);for(let r=0;r<e.length;r++){const s=e[r],o=this.originIdOf(s),i=this.associatedLayer.originIdOf(s);o<i&&(i===g.SERVICE||i===g.PORTAL_ITEM)&&t.setAtOrigin(s,this.associatedLayer[s],i)}}async _setAssociatedFeatureLayer(e){if(!["mesh-pyramids","points"].includes(this.profile))return;const t=new R(this.parsedUrl,this.portalItem,this.apiKey,e);try{this.associatedLayer=await t.fetch()}catch(r){d(r)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){await u((()=>this.popupEnabled&&null!=this.popupTemplate));const e=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?n.getLogger(this.declaredClass).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${e}`):n.getLogger(this.declaredClass).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${e}`)}_validateElevationInfo(){const e=this.elevationInfo;e&&("mesh-pyramids"===this.profile&&"relative-to-scene"===e.mode&&n.getLogger(this.declaredClass).warn(".elevationInfo=","Mesh scene layers don't support relative-to-scene elevation mode"),e.featureExpressionInfo&&"0"!==e.featureExpressionInfo.expression&&n.getLogger(this.declaredClass).warn(".elevationInfo=","Scene layers do not support featureExpressionInfo"))}};e([c({types:{key:"type",base:D,typeMap:{selection:U}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:!0},"portal-item":{name:"layerDefinition.featureReduction",write:!0}}}})],ie.prototype,"featureReduction",void 0),e([c({type:[z],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}}})],ie.prototype,"rangeInfos",void 0),e([c({json:{read:!1}})],ie.prototype,"associatedLayer",void 0),e([c({type:["show","hide"]})],ie.prototype,"listMode",void 0),e([c({type:["ArcGISSceneServiceLayer"]})],ie.prototype,"operationalLayerType",void 0),e([c({json:{read:!1},readOnly:!0})],ie.prototype,"type",void 0),e([c({...oe.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ie.prototype,"fields",void 0),e([c()],ie.prototype,"types",null),e([c()],ie.prototype,"typeIdField",null),e([c()],ie.prototype,"templates",null),e([c()],ie.prototype,"formTemplate",null),e([c({readOnly:!0})],ie.prototype,"fieldsIndex",null),e([c({type:W,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],ie.prototype,"floorInfo",void 0),e([c(oe.outFields)],ie.prototype,"outFields",void 0),e([c({type:k,readOnly:!0,json:{read:!1}})],ie.prototype,"nodePages",void 0),e([h("service","nodePages",["nodePages","pointNodePages"])],ie.prototype,"readNodePages",null),e([c({type:[G],readOnly:!0})],ie.prototype,"materialDefinitions",void 0),e([c({type:[V],readOnly:!0})],ie.prototype,"textureSetDefinitions",void 0),e([c({type:[K],readOnly:!0})],ie.prototype,"geometryDefinitions",void 0),e([c({readOnly:!0})],ie.prototype,"serviceUpdateTimeStamp",void 0),e([c({readOnly:!0})],ie.prototype,"attributeStorageInfo",void 0),e([c({readOnly:!0})],ie.prototype,"statisticsInfo",void 0),e([c({type:i.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],ie.prototype,"excludeObjectIds",void 0),e([c({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],ie.prototype,"definitionExpression",void 0),e([c({type:B,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],ie.prototype,"filter",void 0),e([c({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],ie.prototype,"path",void 0),e([c(E)],ie.prototype,"elevationInfo",null),e([c({type:String})],ie.prototype,"geometryType",null),e([c(A)],ie.prototype,"labelsVisible",void 0),e([c({type:[M],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:$},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:$},write:!0}})],ie.prototype,"labelingInfo",void 0),e([c(P)],ie.prototype,"legendEnabled",void 0),e([c({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?re(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],ie.prototype,"opacity",void 0),e([c({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ie.prototype,"priority",void 0),e([c({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ie.prototype,"semantic",void 0),e([c({types:s,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],ie.prototype,"renderer",null),e([c({json:{read:!1}})],ie.prototype,"cachedDrawingInfo",void 0),e([h("service","cachedDrawingInfo")],ie.prototype,"readCachedDrawingInfo",null),e([c({readOnly:!0,json:{read:!1}})],ie.prototype,"capabilities",null),e([c({type:Boolean,json:{read:!1}})],ie.prototype,"editingEnabled",null),e([c({readOnly:!0,json:{write:!1,read:!1}})],ie.prototype,"infoFor3D",null),e([c(_)],ie.prototype,"popupEnabled",void 0),e([c({type:r,json:{name:"popupInfo",write:!0}})],ie.prototype,"popupTemplate",void 0),e([c({readOnly:!0,json:{read:!1}})],ie.prototype,"defaultPopupTemplate",null),e([c({type:String,json:{read:!1}})],ie.prototype,"objectIdField",void 0),e([h("service","objectIdField",["objectIdField","fields"])],ie.prototype,"readObjectIdField",null),e([c({type:String,json:{read:!1}})],ie.prototype,"globalIdField",void 0),e([h("service","globalIdField",["globalIdField","fields"])],ie.prototype,"readGlobalIdField",null),e([c({readOnly:!0,type:String,json:{read:!1}})],ie.prototype,"displayField",null),e([c({type:String,json:{read:!1}})],ie.prototype,"profile",void 0),e([h("service","profile",["store.profile"])],ie.prototype,"readProfile",null),e([c({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],ie.prototype,"normalReferenceFrame",void 0),e([c(x)],ie.prototype,"screenSizePerspectiveEnabled",void 0),ie=e([m("esri.layers.SceneLayer")],ie);const ae={"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"},ne={"mesh-pyramids":"mesh",points:"point",lines:"polyline",polygons:"polygon"},pe=ie;export{pe as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import t from"../Graphic.js";import r from"../PopupTemplate.js";import"../renderers/ClassBreaksRenderer.js";import"../renderers/DictionaryRenderer.js";import"../renderers/DotDensityRenderer.js";import"../renderers/HeatmapRenderer.js";import"../renderers/PieChartRenderer.js";import"../renderers/Renderer.js";import"../renderers/SimpleRenderer.js";import"../renderers/UniqueValueRenderer.js";import"../renderers/support/jsonUtils.js";import{webSceneRendererTypes as s}from"../renderers/support/types.js";import o from"../request.js";import i from"../core/Collection.js";import a from"../core/Error.js";import n from"../core/Logger.js";import{MultiOriginJSONMixin as p}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as l,isAbortError as d}from"../core/promiseUtils.js";import{whenOnce as u}from"../core/reactiveUtils.js";import{join as y}from"../core/urlUtils.js";import{property as c}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{getProperties as f}from"../core/accessorSupport/utils.js";import{reader as h}from"../core/accessorSupport/decorators/reader.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import{OriginId as g}from"../core/accessorSupport/PropertyOrigin.js";import v from"./Layer.js";import{APIKeyMixin as b}from"./mixins/APIKeyMixin.js";import{ArcGISService as I}from"./mixins/ArcGISService.js";import{EditBusLayer as w}from"./mixins/EditBusLayer.js";import{OperationalLayer as j}from"./mixins/OperationalLayer.js";import{PortalLayer as L}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as S}from"./mixins/ScaleRangeLayer.js";import{SceneService as F,SaveOperationType as O}from"./mixins/SceneService.js";import{zeroCapabilities as T}from"./support/capabilities.js";import{elevationInfo as E,labelsVisible as _,legendEnabled as A,popupEnabled as P,screenSizePerspectiveEnabled as x}from"./support/commonProperties.js";import{FeatureReduction as D}from"./support/FeatureReduction.js";import U from"./support/FeatureReductionSelection.js";import{FetchAssociatedFeatureLayer as R}from"./support/FetchAssociatedFeatureLayer.js";import{defineFieldProperties as C}from"./support/fieldProperties.js";import q from"./support/FieldsIndex.js";import{fixRendererFields as Q,unpackFieldNames as N}from"./support/fieldUtils.js";import{I3SNodePageDefinition as k,I3SMaterialDefinition as G,I3STextureSetDefinition as V,I3SGeometryDefinition as K}from"./support/I3SLayerDefinitions.js";import M from"./support/LabelClass.js";import{reader as $}from"./support/labelingInfo.js";import W from"./support/LayerFloorInfo.js";import{RangeInfo as z}from"./support/RangeInfo.js";import B from"./support/SceneFilter.js";import{loadStyleRenderer as H}from"../renderers/support/styleUtils.js";import Z from"../rest/support/Query.js";import{sceneLayerEditingEnabled as J}from"../support/featureFlags.js";import{createPopupTemplate as X}from"../support/popupUtils.js";import{queryAttributesFromCachedAttributesId as Y}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as ee,getFetchPopupTemplate as te}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as re}from"../webdoc/support/opacityUtils.js";const se=["3DObject","Point"],oe=C();let ie=class extends(w(F(I(j(L(S(p(b(v))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new i,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.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getFeatureType(t?.feature)?.domains?.[e];return r&&"inherited"!==r.type?r:this.getField(e)?.domain??null}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 q(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:k.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get geometryType(){return ne[this.profile]||"mesh"}set renderer(e){Q(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(){const e=this.associatedLayer?.capabilities??T,{query:t,editing:{supportsGlobalId:r,supportsRollbackOnFailure:s,supportsUploadWithItemId:o,supportsGeometryUpdate:i,supportsReturnServiceEditsInSourceSpatialReference:a},data:{supportsZ:n,supportsM:p,isVersioned:l,supportsAttachment:d},operations:{supportsEditing:u,supportsAdd:y,supportsUpdate:c,supportsDelete:f,supportsQuery:h,supportsQueryAttachments:m}}=e,g=e.operations.supportsChangeTracking,v=!!this.associatedLayer?.infoFor3D&&J();return{query:t,editing:{supportsGlobalId:r,supportsReturnServiceEditsInSourceSpatialReference:a,supportsRollbackOnFailure:s,supportsGeometryUpdate:v&&i,supportsUploadWithItemId:o},data:{supportsAttachment:d,supportsZ:n,supportsM:p,isVersioned:l},operations:{supportsQuery:h,supportsQueryAttachments:m,supportsEditing:u&&g,supportsAdd:v&&y&&g,supportsDelete:v&&f&&g,supportsUpdate:c&&g}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.userHasEditingPrivileges}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}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&&ae[r]?ae[r]:(n.getLogger(this.declaredClass).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(l).then((()=>this._fetchService(t))).then((()=>Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),null!=this.filter?this.filter.loadGeometries(this.spatialReference):null]))).then((()=>this._validateElevationInfo())).then((()=>this._applyAssociatedLayerOverrides())).then((()=>this._populateFieldUsageInfo())).then((()=>H(this,{origin:"service"},t))).then((()=>Q(this.renderer,this.fieldsIndex))).then((()=>this.finishLoadEditablePortalLayer(e)));return this.addResolvingPromise(r),Promise.resolve(this)}async beforeSave(){null!=this.filter&&await this.load()}createQuery(){const e=new Z;return"mesh"!==this.geometryType&&(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;return e}))}async queryCachedAttributes(e,t){const r=N(this.fieldsIndex,await ee(this,te(this)));return Y(this.parsedUrl.path,this.attributeStorageInfo??[],e,t,r)}async queryCachedFeature(e,r){const s=await this.queryCachedAttributes(e,[r]);if(!s||0===s.length)throw new a("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const o=new t;return o.attributes=s[0],o.layer=this,o.sourceLayer=this,o}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.declaredClass).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return X(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 a("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 a("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){if(await this.load(t),!this.statisticsInfo)throw new a("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const r=this.fieldsIndex.get(e);if(!r)throw new a("scenelayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const s of this.statisticsInfo)if(s.name===r.name){const e=y(this.parsedUrl.path,s.href);return o(e,{query:{f:"json",token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then((e=>e.data))}throw new a("scenelayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(O.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(O.SAVE,e)}async applyEdits(e,t){const r=await import("./graphics/editingSupport.js");if(await this.load(),!this.associatedLayer)throw new a(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),r.applyEdits(this,this.associatedLayer.source,e,t)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new a(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}on(e,t){return super.on(e,t)}validateLayer(e){if(e.layerType&&!se.includes(e.layerType))throw new a("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 a("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 a("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,s=!1;if(null==e)r=!0,s=!0;else{const o=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,s=o;break;case"vertex-reference-frame":r=!0,s=!o;break;default:r=!1}}if(!r)throw new a("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!s)throw new a("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 a("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||!this.attributeStorageInfo.some((t=>t.name===e.name))),r=!!this.associatedLayer?.fields?.some((t=>t&&e.name===t.name)),s={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=s}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPopupOverrides()}_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)}_applyAssociatedLayerPopupOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled"],t=f(this);for(let r=0;r<e.length;r++){const s=e[r],o=this.originIdOf(s),i=this.associatedLayer.originIdOf(s);o<i&&(i===g.SERVICE||i===g.PORTAL_ITEM)&&t.setAtOrigin(s,this.associatedLayer[s],i)}}async _setAssociatedFeatureLayer(e){if(!["mesh-pyramids","points"].includes(this.profile))return;const t=new R(this.parsedUrl,this.portalItem,this.apiKey,e);try{this.associatedLayer=await t.fetch()}catch(r){d(r)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){await u((()=>this.popupEnabled&&null!=this.popupTemplate));const e=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?n.getLogger(this.declaredClass).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${e}`):n.getLogger(this.declaredClass).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${e}`)}_validateElevationInfo(){const e=this.elevationInfo;e&&("mesh-pyramids"===this.profile&&"relative-to-scene"===e.mode&&n.getLogger(this.declaredClass).warn(".elevationInfo=","Mesh scene layers don't support relative-to-scene elevation mode"),e.featureExpressionInfo&&"0"!==e.featureExpressionInfo.expression&&n.getLogger(this.declaredClass).warn(".elevationInfo=","Scene layers do not support featureExpressionInfo"))}};e([c({types:{key:"type",base:D,typeMap:{selection:U}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:!0},"portal-item":{name:"layerDefinition.featureReduction",write:!0}}}})],ie.prototype,"featureReduction",void 0),e([c({type:[z],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}}})],ie.prototype,"rangeInfos",void 0),e([c({json:{read:!1}})],ie.prototype,"associatedLayer",void 0),e([c({type:["show","hide"]})],ie.prototype,"listMode",void 0),e([c({type:["ArcGISSceneServiceLayer"]})],ie.prototype,"operationalLayerType",void 0),e([c({json:{read:!1},readOnly:!0})],ie.prototype,"type",void 0),e([c({...oe.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ie.prototype,"fields",void 0),e([c()],ie.prototype,"types",null),e([c()],ie.prototype,"typeIdField",null),e([c()],ie.prototype,"templates",null),e([c()],ie.prototype,"formTemplate",null),e([c({readOnly:!0})],ie.prototype,"fieldsIndex",null),e([c({type:W,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],ie.prototype,"floorInfo",void 0),e([c(oe.outFields)],ie.prototype,"outFields",void 0),e([c({type:k,readOnly:!0,json:{read:!1}})],ie.prototype,"nodePages",void 0),e([h("service","nodePages",["nodePages","pointNodePages"])],ie.prototype,"readNodePages",null),e([c({type:[G],readOnly:!0})],ie.prototype,"materialDefinitions",void 0),e([c({type:[V],readOnly:!0})],ie.prototype,"textureSetDefinitions",void 0),e([c({type:[K],readOnly:!0})],ie.prototype,"geometryDefinitions",void 0),e([c({readOnly:!0})],ie.prototype,"serviceUpdateTimeStamp",void 0),e([c({readOnly:!0})],ie.prototype,"attributeStorageInfo",void 0),e([c({readOnly:!0})],ie.prototype,"statisticsInfo",void 0),e([c({type:i.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],ie.prototype,"excludeObjectIds",void 0),e([c({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],ie.prototype,"definitionExpression",void 0),e([c({type:B,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],ie.prototype,"filter",void 0),e([c({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],ie.prototype,"path",void 0),e([c(E)],ie.prototype,"elevationInfo",null),e([c({type:String})],ie.prototype,"geometryType",null),e([c(_)],ie.prototype,"labelsVisible",void 0),e([c({type:[M],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:$},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:$},write:!0}})],ie.prototype,"labelingInfo",void 0),e([c(A)],ie.prototype,"legendEnabled",void 0),e([c({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?re(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],ie.prototype,"opacity",void 0),e([c({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ie.prototype,"priority",void 0),e([c({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ie.prototype,"semantic",void 0),e([c({types:s,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],ie.prototype,"renderer",null),e([c({json:{read:!1}})],ie.prototype,"cachedDrawingInfo",void 0),e([h("service","cachedDrawingInfo")],ie.prototype,"readCachedDrawingInfo",null),e([c({readOnly:!0,json:{read:!1}})],ie.prototype,"capabilities",null),e([c({type:Boolean,json:{read:!1}})],ie.prototype,"editingEnabled",null),e([c({readOnly:!0,json:{write:!1,read:!1}})],ie.prototype,"infoFor3D",null),e([c(P)],ie.prototype,"popupEnabled",void 0),e([c({type:r,json:{name:"popupInfo",write:!0}})],ie.prototype,"popupTemplate",void 0),e([c({readOnly:!0,json:{read:!1}})],ie.prototype,"defaultPopupTemplate",null),e([c({type:String,json:{read:!1}})],ie.prototype,"objectIdField",void 0),e([h("service","objectIdField",["objectIdField","fields"])],ie.prototype,"readObjectIdField",null),e([c({type:String,json:{read:!1}})],ie.prototype,"globalIdField",void 0),e([h("service","globalIdField",["globalIdField","fields"])],ie.prototype,"readGlobalIdField",null),e([c({readOnly:!0,type:String,json:{read:!1}})],ie.prototype,"displayField",null),e([c({type:String,json:{read:!1}})],ie.prototype,"profile",void 0),e([h("service","profile",["store.profile"])],ie.prototype,"readProfile",null),e([c({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],ie.prototype,"normalReferenceFrame",void 0),e([c(x)],ie.prototype,"screenSizePerspectiveEnabled",void 0),ie=e([m("esri.layers.SceneLayer")],ie);const ae={"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"},ne={"mesh-pyramids":"mesh",points:"point",lines:"polyline",polygons:"polygon"},pe=ie;export{pe as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../chunks/tslib.es6.js";import"../../../../geometry.js";import t from"../../../../request.js";import r from"../../../../core/Error.js";import s from"../../../../core/Logger.js";import{
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import"../../../../geometry.js";import t from"../../../../request.js";import r from"../../../../core/Error.js";import s from"../../../../core/Logger.js";import{createResolver as o}from"../../../../core/promiseUtils.js";import{addQueryParameters as i}from"../../../../core/urlUtils.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as n}from"../../../../core/accessorSupport/decorators/subclass.js";import{WebSocketConnection as a}from"./WebSocketConnection.js";import{executeQuery as c}from"../../../../rest/query/operations/query.js";import u from"../../../../rest/support/Query.js";import{fromJSON as l}from"../../../../geometry/support/jsonUtils.js";import d from"../../../../geometry/SpatialReference.js";const f=1e4,h={maxQueryDepth:5,maxRecordCountFactor:3};let g=class extends a{constructor(e){super({...h,...e}),this._buddyServicesQuery=null,this._relatedFeatures=null}async _open(){const e=await this._fetchServiceDefinition(this._config.source);e.timeInfo.trackIdField||s.getLogger(this.declaredClass).warn("GeoEvent service was configured without a TrackIdField. This may result in certain functionality being disabled. The purgeOptions.maxObservations property will have no effect.");const t=this._fetchWebSocketUrl(e.streamUrls,this._config.spatialReference);this._buddyServicesQuery||(this._buddyServicesQuery=this._queryBuddyServices()),await this._buddyServicesQuery,await this._tryCreateWebSocket(t);const{filter:r,outFields:o}=this._config;this.destroyed||this._setFilter(r,o)}_onMessage(e){if("attributes"in e){let o;try{o=this._enrich(e),null!=this._featureZScaler&&this._featureZScaler(o.geometry)}catch(t){return void s.getLogger(this.declaredClass).error(new r("geoevent-connection","Failed to parse message",t))}this.onFeature(o)}else this.onMessage(e)}async _fetchServiceDefinition(e){const r={f:"json",...this._config.customParameters},s=t(e.path,{query:r,responseType:"json"}),o=(await s).data;return this._serviceDefinition=o,o}_fetchWebSocketUrl(e,t){const r=e[0],{urls:s,token:o}=r,n=this._inferWebSocketBaseUrl(s);return i(`${n}/subscribe`,{outSR:""+t.wkid,token:o})}_inferWebSocketBaseUrl(e){if(1===e.length)return e[0];for(const t of e)if(t.includes("wss"))return t;return s.getLogger(this.declaredClass).error(new r("geoevent-connection","Unable to infer WebSocket url",e)),null}async _setFilter(e,t){const i=this._websocket;if(null==i||null==e&&null==t)return;const n=JSON.stringify({filter:this._serializeFilter(e,t)});let a=!1;const c=o(),u=()=>{a||(this.destroyed||this._websocket!==i||s.getLogger(this.declaredClass).error(new r("geoevent-connection","Server timed out when setting filter")),c.reject())},l=e=>{const t=JSON.parse(e.data);t.filter&&(t.error&&(s.getLogger(this.declaredClass).error(new r("geoevent-connection","Failed to set service filter",t.error)),this._set("errorString",`Could not set service filter - ${t.error}`),c.reject(t.error)),this._setWebSocketJSONParseHandler(i),a=!0,c.resolve())};return i.onmessage=l,i.send(n),setTimeout(u,f),c.promise}_serializeFilter(e,t){const o={};if(null==e&&null==t)return o;if(null!=e&&e.geometry)try{const t=l(e.geometry);if("extent"!==t.type)throw new r(`Expected extent but found type ${t.type}`);o.geometry=JSON.stringify(t.shiftCentralMeridian())}catch(i){s.getLogger(this.declaredClass).error(new r("geoevent-connection","Encountered an error when setting connection geometryDefinition",i))}return null!=e&&e.where&&"1 = 1"!==e.where&&"1=1"!==e.where&&(o.where=e.where),null!=t&&(o.outFields=t.join(",")),o}_enrich(e){if(!this._relatedFeatures)return e;const t=this._serviceDefinition.relatedFeatures.joinField,o=e.attributes[t],i=this._relatedFeatures.get(o);if(!i)return s.getLogger(this.declaredClass).warn("geoevent-connection","Feature join failed. Is the join field configured correctly?",e),e;const{attributes:n,geometry:a}=i;for(const r in n)e.attributes[r]=n[r];return a&&(e.geometry=a),e.geometry||e.centroid||s.getLogger(this.declaredClass).error(new r("geoevent-connection","Found malformed feature - no geometry found",e)),e}async _queryBuddyServices(){try{const{relatedFeatures:e,keepLatestArchive:t}=this._serviceDefinition,r=this._queryRelatedFeatures(e),s=this._queryArchive(t);await r;const o=await s;if(!o)return;for(const i of o.features)this.onFeature(this._enrich(i))}catch(e){s.getLogger(this.declaredClass).error(new r("geoevent-connection","Encountered an error when querying buddy services",{error:e}))}}async _queryRelatedFeatures(e){if(!e)return;const t=await this._queryBuddy(e.featuresUrl);this._addRelatedFeatures(t)}async _queryArchive(e){if(e)return this._queryBuddy(e.featuresUrl)}async _queryBuddy(e){const t=new((await import("../../../FeatureLayer.js")).default)({url:e}),{capabilities:r}=await t.load(),s=r.query.supportsMaxRecordCountFactor,o=r.query.supportsPagination,i=r.query.supportsCentroid,n=this._config.maxRecordCountFactor,a=t.capabilities.query.maxRecordCount,l=s?a*n:a,f=new u;if(f.outFields=this._config.outFields??["*"],f.where=this._config.filter?.where??"1=1",f.returnGeometry=!0,f.returnExceededLimitFeatures=!0,f.outSpatialReference=d.fromJSON(this._config.spatialReference),i&&(f.returnCentroid=!0),s&&(f.maxRecordCountFactor=n),o)return f.num=l,t.destroy(),this._queryPages(e,f);const h=await c(e,f,this._config.sourceSpatialReference);return t.destroy(),h.data}async _queryPages(e,t,r=[],s=0){t.start=null!=t.num?s*t.num:null;const{data:o}=await c(e,t,this._config.sourceSpatialReference);return o.exceededTransferLimit&&s<(this._config.maxQueryDepth??0)?(o.features.forEach((e=>r.push(e))),this._queryPages(e,t,r,s+1)):(r.forEach((e=>o.features.push(e))),o)}_addRelatedFeatures(e){const t=new Map,r=e.features,s=this._serviceDefinition.relatedFeatures.joinField;for(const o of r){const e=o.attributes[s];t.set(e,o)}this._relatedFeatures=t}};g=e([n("esri.layers.graphics.sources.connections.GeoEventConnection")],g);const y=g;export{y as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../chunks/tslib.es6.js";import"../../geometry.js";import{rasterRendererTypes as e}from"../../rasterRenderers.js";import r from"../../request.js";import i from"../../core/Error.js";import s from"../../core/Logger.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import{ensureClass as o}from"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{getInfo as l}from"../../geometry/support/spatialReferenceUtils.js";import{sanitizeUrl as u}from"../support/arcgisLayerUrl.js";import{url as m}from"../support/commonProperties.js";import c from"../support/DimensionalDefinition.js";import d from"../support/MultidimensionalSubset.js";import h from"../support/RasterFunction.js";import p from"../support/RasterJobHandler.js";import f from"../support/TileInfo.js";import y from"../support/rasterDatasets/FunctionRaster.js";import{getDefaultMultidimensionalDefinition as b,hasExcludedVariableOrDimension as g,getDefaultVariablInfo as F,isMultiSliceOrRangeDefinition as I,getSubsetVariablesFromMdInfo as J}from"../support/rasterDatasets/multidimensionalUtils.js";import{snapToRaster as _,clip as R}from"../support/rasterFunctions/clipUtils.js";import{create as S}from"../support/rasterFunctions/rasterFunctionHelper.js";import{load as x,projectExtent as v,projectPolygon as j}from"../support/rasterFunctions/rasterProjectionHelper.js";import{computeStatisticsHistograms as H}from"../support/rasterFunctions/stretchUtils.js";import{convertVectorFieldData as D}from"../support/rasterFunctions/vectorFieldUtils.js";import{normalizeRendererJSON as w,getVariableRasterInfo as T,getDefaultInterpolation as N,getDefaultBandCombination as O,createDefaultRenderer as z}from"../../renderers/support/rasterRendererHelper.js";import C from"../../renderers/support/RasterSymbolizer.js";import P from"../../rest/support/ImageHistogramParameters.js";import{createFlowMesh as E}from"../../views/2d/engine/flow/dataUtils.js";import M from"../../geometry/SpatialReference.js";import U from"../../geometry/Point.js";const k=s.getLogger("esri.layers.mixins.ImageryTileMixin"),q=s=>{let q=class extends s{constructor(...t){super(...t),this._isConstructedFromFunctionRaster=!1,this._rasterJobHandler={instance:null,refCount:0,connectionPromise:null},this.bandIds=null,this.copyright=null,this.interpolation="nearest",this.multidimensionalSubset=null,this.raster=null,this.rasterFunction=null,this.rasterInfo=null,this.sourceJSON=null,this.spatialReference=null,this.symbolizer=null,this._isConstructedFromFunctionRaster="Function"===t[0]?.raster?.datasetFormat}get fullExtent(){return this.rasterInfo?.extent}set multidimensionalDefinition(t){this._set("multidimensionalDefinition",t),this.updateRenderer()}get tileInfo(){return this.rasterInfo?.storageInfo.tileInfo}set url(t){this._set("url",u(t,k))}set renderer(t){this._set("renderer",t),this.updateRenderer()}async convertVectorFieldData(t,e){if(null==t||!this.rasterInfo)return null;const r=this._rasterJobHandler.instance,i=this.rasterInfo.dataType;return r?r.convertVectorFieldData({pixelBlock:t,dataType:i},e):D(t,i)}async computeStatisticsHistograms(t,e){t=o(P,t).clone();const{rasterInfo:r}=this,{geometry:s}=t;if(null==s)throw new i("imagery-tile-mixin:compute-statistics-histograms","gemetry must be specified");let n=s;const{spatialReference:a}=r;s.spatialReference.equals(a)||(await x(),n="extent"===s.type?v(s,a):j(s,a));const l=t.pixelSize??new U({...r.pixelSize,spatialReference:a}),{extent:u,width:m,height:c}=_(r,n,l),d=await this.fetchPixels(u,m,c,{...e,interpolation:"nearest"});if(null==d.pixelBlock)throw new i("imagery-tile-mixin:compute-statistics-histograms","failed to fetch pixels");const h=R(d.pixelBlock,u,n),p=this._rasterJobHandler.instance;return p?p.computeStatisticsHistograms({pixelBlock:h},e):H(h)}async createFlowMesh(t,e){const r=this._rasterJobHandler.instance;return r?r.createFlowMesh(t,e):E(t.meshType,t.simulationSettings,t.flowData,null!=e.signal?e.signal:(new AbortController).signal)}normalizeRasterFetchOptions(t){const{multidimensionalInfo:e}=this.rasterInfo??{};if(null==e)return t;let r=t.multidimensionalDefinition||this.multidimensionalDefinition;null!=r&&r.length||(r=b(this.raster.rasterInfo,{multidimensionalSubset:this.multidimensionalSubset}));const i=t.timeExtent||this.timeExtent;if(null!=r&&null!=i&&(null!=i.start||null!=i.end)){r=r.map((t=>t.clone()));const s=e.variables.find((({name:t})=>t===r[0].variableName))?.dimensions?.find((({name:t})=>"StdTime"===t)),n=r.find((({dimensionName:t})=>"StdTime"===t));if(!s||!n)return{...t,multidimensionalDefinition:null};const{start:o,end:a}=i,l=null==o?null:o.getTime(),u=null==a?null:a.getTime(),m=l??u,c=u??l;if(null!=s.values){const t=s.values.filter((t=>{if(Array.isArray(t)){if(m===c)return t[0]<=m&&t[1]>=m;const e=t[0]<=m&&t[1]>m||t[0]<c&&t[1]>=c,r=t[0]>=m&&t[1]<=c||t[0]<m&&t[1]>c;return e||r}return m===c?t===m:t>=m&&t<=c}));if(t.length){const e=t.sort(((t,e)=>{if(m===c)return(t[0]??t)-(e[0]??e);return Math.abs((t[1]??t)-c)-Math.abs((e[1]??e)-c)}))[0];n.values=[e]}else r=null}else if(s.hasRegularIntervals&&s.extent){const[t,e]=s.extent;m>e||c<t?r=null:n.values=m===c?[m]:[Math.max(t,m),Math.min(e,c)]}}return null!=r&&g(r,this.multidimensionalSubset)?{...t,multidimensionalDefinition:null}:{...t,multidimensionalDefinition:r}}async updateRasterFunction(){if("imagery-tile"!==this.type||!this.rasterFunction&&!this._cachedRasterFunctionJson||JSON.stringify(this.rasterFunction)===JSON.stringify(this._cachedRasterFunctionJson))return;if(this._isConstructedFromFunctionRaster&&"Function"===this.raster.datasetFormat){const t=this.raster.rasterFunction.toJSON();return!this.rasterFunction&&t&&this._set("rasterFunction",h.fromJSON(t)),void(this._cachedRasterFunctionJson=this.rasterFunction?.toJSON())}let t,e=this.raster,r=!1;"Function"===e.datasetFormat?(t=e.primaryRasters.rasters,e=t[0],r=!0):t=[e];const{rasterFunction:i}=this;if(i){const r={raster:e};t.length>1&&t.forEach((t=>r[t.url]=t));const s=S(i.rasterFunctionDefinition??i.toJSON(),r),n=new y({rasterFunction:s});n.rasterJobHandler=this._rasterJobHandler.instance,await n.open(),this._cachedRasterFunctionJson=this.rasterFunction?.toJSON(),this.raster=n}else this.raster=e,this._cachedRasterFunctionJson=null;if(this._cachedRendererJson=null,!r&&!i)return;const{bandIds:s}=this,{bandCount:n}=this.raster.rasterInfo,o=s?.length?s.some((t=>t>=n)):n>=3;s&&(o||"raster-stretch"!==this.renderer.type)&&this._set("bandIds",null),this._configDefaultRenderer("auto")}async updateRenderer(){const{loaded:t,symbolizer:e}=this;if(!t||!e)return;const{rasterInfo:r}=this.raster,i=F(r,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),s=i?.name,n=w({...this.renderer.toJSON(),variableName:s});if(JSON.stringify(this._cachedRendererJson)===JSON.stringify(n))return;const o=this._rasterJobHandler.instance;o&&(e.rasterInfo=T(r,s),e.rendererJSON=n,e.bind(),await o.updateSymbolizer(e),this._cachedRendererJson=n)}async applyRenderer(t,e){const r=t&&t.pixelBlock;if(!(null!=r&&r.pixels&&r.pixels.length>0))return null;let i;await this.updateRenderer();const s=this._rasterJobHandler.instance,n=this.bandIds??[];return i=s?await s.symbolize({...t,simpleStretchParams:e,bandIds:n}):this.symbolizer.symbolize({...t,simpleStretchParams:e,bandIds:n}),i}getTileUrl(t,e,r){return"RasterTileServer"===this.raster.datasetFormat?`${this.url}/tile/${t}/${e}/${r}`:""}getCompatibleTileInfo(t,e,r=!1){if(!this.loaded||null==e)return null;if(r&&t.equals(this.spatialReference))return this.tileInfo;const i=l(t);return f.create({size:256,spatialReference:t,origin:i?{x:i.origin[0],y:i.origin[1]}:{x:e.xmin,y:e.ymax}})}getCompatibleFullExtent(t){return this.loaded?(this._compatibleFullExtent&&this._compatibleFullExtent.spatialReference.equals(t)||(this._compatibleFullExtent=this.raster.computeExtent(t)),this._compatibleFullExtent):null}async fetchTile(t,e,i,s={}){if(B(this),s.requestAsImageElement){const n=this.getTileUrl(t,e,i);return r(n,{responseType:"image",query:{...this.refreshParameters,...this.raster.ioConfig.customFetchParameters},signal:s.signal}).then((t=>t.data))}const{rasterInfo:n}=this;if(null!=n.multidimensionalInfo&&null==(s=this.normalizeRasterFetchOptions(s)).multidimensionalDefinition){const r=s.tileInfo||n.storageInfo.tileInfo;return{extent:this.raster.getTileExtentFromTileInfo(t,e,i,r),pixelBlock:null}}return await this._initJobHandler(),await this.updateRasterFunction(),"raster-shaded-relief"===this.renderer.type&&(s={...s,buffer:{cols:1,rows:1}}),this.raster.fetchTile(t,e,i,s)}async fetchPixels(t,e,r,i={}){return null!=this.rasterInfo.multidimensionalInfo&&null==(i=this.normalizeRasterFetchOptions(i)).multidimensionalDefinition?{extent:t,pixelBlock:null}:(await this._initJobHandler(),await this.updateRasterFunction(),e=Math.round(e),r=Math.round(r),this.raster.fetchPixels(t,e,r,i))}async identify(t,e={}){const{raster:r,rasterInfo:s}=this;if(null!=s.multidimensionalInfo){if(!(s.hasMultidimensionalTranspose&&!!(I(e.multidimensionalDefinition)||e.transposedVariableName||e.timeExtent))&&null==(e=this.normalizeRasterFetchOptions(e)).multidimensionalDefinition)return{location:t,value:null}}const n=this.multidimensionalSubset?.areaOfInterest;if(n&&!n.contains(t))throw new i("imagery-tile-mixin:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");return r.identify(t,e)}increaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount++}decreaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount--,this._rasterJobHandler.refCount<=0&&this._shutdownJobHandler()}hasStandardTime(){const t=this.rasterInfo?.multidimensionalInfo;if(null==t||"standard-time"!==this.rasterInfo?.dataType)return!1;const e=this.multidimensionalDefinition,r=e?.[0]?.variableName;return t.variables.some((t=>t.name===r&&(!e?.[0].dimensionName||t.dimensions.some((t=>"StdTime"===t.name)))))}getStandardTimeValue(t){return new Date(24*(t-25569)*3600*1e3).toString()}getMultidimensionalSubsetVariables(t){const e=t??this.rasterInfo?.multidimensionalInfo;return J(this.multidimensionalSubset,e)}_configDefaultSettings(){this._configDefaultInterpolation(),this.multidimensionalDefinition||(this.multidimensionalDefinition=b(this.raster.rasterInfo,{multidimensionalSubset:this.multidimensionalSubset})),this._configDefaultRenderer()}_initJobHandler(){if(null!=this._rasterJobHandler.connectionPromise)return this._rasterJobHandler.connectionPromise;const t=new p;return this._rasterJobHandler.connectionPromise=t.initialize().then((()=>{B(this),this._rasterJobHandler.instance=t,this.raster.rasterJobHandler=t,this.renderer&&this.updateRenderer(),"Function"===this.raster.datasetFormat&&this.raster.syncJobHandler()})).catch((()=>{})),this._rasterJobHandler.connectionPromise}_shutdownJobHandler(){this._rasterJobHandler.instance&&this._rasterJobHandler.instance.destroy(),this._rasterJobHandler.instance=null,this._rasterJobHandler.connectionPromise=null,this._rasterJobHandler.refCount=0,this._cachedRendererJson=null,this.raster&&(this.raster.rasterJobHandler=null)}_configDefaultInterpolation(){if(null==this.interpolation){B(this);const{raster:t}=this,e=N(t.rasterInfo,t.tileType,this.sourceJSON?.defaultResamplingMethod);this._set("interpolation",e)}}_configDefaultRenderer(t="no"){B(this);const{rasterInfo:e}=this.raster;!this.bandIds&&e.bandCount>1&&(this.bandIds=O(e));const r=F(e,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),i=r?.name;if(!this.renderer||"override"===t){const t=z(e,{bandIds:this.bandIds,variableName:i}),r=e.statistics,s=r&&r.length>0?r[0]:null,n=s?.max??0,o=s?.min??0;"WCSServer"===this.raster.datasetFormat&&"raster-stretch"===t.type&&(n>1e24||o<-1e24)&&(t.dynamicRangeAdjustment=!0,t.statistics=null,"none"===t.stretchType&&(t.stretchType="min-max")),this.renderer=t}const s=w({...this.renderer.toJSON(),variableName:i}),n=T(e,i);this.symbolizer?(this.symbolizer.rendererJSON=s,this.symbolizer.rasterInfo=n):this.symbolizer=new C({rendererJSON:s,rasterInfo:n});const o=this.symbolizer.bind();if(o.success){if("auto"===t){const{colormap:t}=this.raster.rasterInfo,e=this.renderer;if(null!=t)if("raster-colormap"!==e.type)this._configDefaultRenderer("override");else{const t=z(this.raster.rasterInfo);JSON.stringify(t)!==JSON.stringify(e)&&this._configDefaultRenderer("override")}else if("raster-stretch"===e.type){const t=this.bandIds?.length,r=e.statistics?.length;!e.dynamicRangeAdjustment&&r&&t&&r!==t&&this._configDefaultRenderer("override")}}}else k.warn("imagery-tile-mixin",o.error||"The given renderer is not supported by the layer."),"auto"===t&&this._configDefaultRenderer("override")}};function B(t){if(!t.raster||!t.rasterInfo)throw new i("imagery-tile","no raster")}return t([n()],q.prototype,"_cachedRendererJson",void 0),t([n()],q.prototype,"_cachedRasterFunctionJson",void 0),t([n()],q.prototype,"_compatibleFullExtent",void 0),t([n()],q.prototype,"_isConstructedFromFunctionRaster",void 0),t([n()],q.prototype,"_rasterJobHandler",void 0),t([n()],q.prototype,"bandIds",void 0),t([n({json:{origins:{service:{read:{source:"copyrightText"}}}}})],q.prototype,"copyright",void 0),t([n({json:{read:!1}})],q.prototype,"fullExtent",null),t([n()],q.prototype,"interpolation",void 0),t([n()],q.prototype,"ioConfig",void 0),t([n({type:[c],json:{write:!0}})],q.prototype,"multidimensionalDefinition",null),t([n({type:d,json:{write:!0}})],q.prototype,"multidimensionalSubset",void 0),t([n()],q.prototype,"raster",void 0),t([n({type:h})],q.prototype,"rasterFunction",void 0),t([n()],q.prototype,"rasterInfo",void 0),t([n()],q.prototype,"sourceJSON",void 0),t([n({readOnly:!0,type:M,json:{read:!1}})],q.prototype,"spatialReference",void 0),t([n({json:{read:!1}})],q.prototype,"tileInfo",null),t([n(m)],q.prototype,"url",null),t([n({types:e})],q.prototype,"renderer",null),t([n()],q.prototype,"symbolizer",void 0),q=t([a("esri.layers.ImageryTileMixin")],q),q};export{q as ImageryTileMixin};
|
|
5
|
+
import{_ as t}from"../../chunks/tslib.es6.js";import"../../geometry.js";import{rasterRendererTypes as e}from"../../rasterRenderers.js";import r from"../../request.js";import i from"../../core/Error.js";import s from"../../core/Logger.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import{ensureClass as o}from"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{getInfo as l}from"../../geometry/support/spatialReferenceUtils.js";import{sanitizeUrl as u}from"../support/arcgisLayerUrl.js";import{url as m}from"../support/commonProperties.js";import c from"../support/DimensionalDefinition.js";import d from"../support/MultidimensionalSubset.js";import h from"../support/RasterFunction.js";import p from"../support/RasterJobHandler.js";import f from"../support/TileInfo.js";import y from"../support/rasterDatasets/FunctionRaster.js";import{getDefaultMultidimensionalDefinition as b,hasExcludedVariableOrDimension as g,getDefaultVariablInfo as F,isMultiSliceOrRangeDefinition as I,getSubsetVariablesFromMdInfo as J}from"../support/rasterDatasets/multidimensionalUtils.js";import{snapToRaster as _,clip as R}from"../support/rasterFunctions/clipUtils.js";import{create as S}from"../support/rasterFunctions/rasterFunctionHelper.js";import{load as x,projectExtent as v,projectPolygon as j}from"../support/rasterFunctions/rasterProjectionHelper.js";import{computeStatisticsHistograms as H}from"../support/rasterFunctions/stretchUtils.js";import{convertVectorFieldData as D}from"../support/rasterFunctions/vectorFieldUtils.js";import{normalizeRendererJSON as w,getVariableRasterInfo as T,getDefaultInterpolation as N,getDefaultBandCombination as O,createDefaultRenderer as z}from"../../renderers/support/rasterRendererHelper.js";import C from"../../renderers/support/RasterSymbolizer.js";import P from"../../rest/support/ImageHistogramParameters.js";import{createFlowMesh as E}from"../../views/2d/engine/flow/dataUtils.js";import M from"../../geometry/SpatialReference.js";import U from"../../geometry/Point.js";const k=s.getLogger("esri.layers.mixins.ImageryTileMixin"),q=s=>{let q=class extends s{constructor(...t){super(...t),this._isConstructedFromFunctionRaster=!1,this._rasterJobHandler={instance:null,refCount:0,connectionPromise:null},this.bandIds=null,this.copyright=null,this.interpolation="nearest",this.multidimensionalSubset=null,this.raster=null,this.rasterFunction=null,this.rasterInfo=null,this.sourceJSON=null,this.spatialReference=null,this.symbolizer=null,this._isConstructedFromFunctionRaster="Function"===t[0]?.raster?.datasetFormat}get fullExtent(){return this.rasterInfo?.extent}set multidimensionalDefinition(t){this._set("multidimensionalDefinition",t),this.updateRenderer()}get tileInfo(){return this.rasterInfo?.storageInfo.tileInfo}set url(t){this._set("url",u(t,k))}set renderer(t){this._set("renderer",t),this.updateRenderer()}async convertVectorFieldData(t,e){if(null==t||!this.rasterInfo)return null;const r=this._rasterJobHandler.instance,i=this.rasterInfo.dataType;return r?r.convertVectorFieldData({pixelBlock:t,dataType:i},e):D(t,i)}async computeStatisticsHistograms(t,e){t=o(P,t).clone();const{rasterInfo:r}=this,{geometry:s}=t;if(null==s)throw new i("imagery-tile-mixin:compute-statistics-histograms","geometry must be specified");let n=s;const{spatialReference:a}=r;s.spatialReference.equals(a)||(await x(),n="extent"===s.type?v(s,a):j(s,a));const l=t.pixelSize??new U({...r.pixelSize,spatialReference:a}),{extent:u,width:m,height:c}=_(r,n,l),d=await this.fetchPixels(u,m,c,{...e,interpolation:"nearest"});if(null==d.pixelBlock)throw new i("imagery-tile-mixin:compute-statistics-histograms","failed to fetch pixels");const h=R(d.pixelBlock,u,n),p=this._rasterJobHandler.instance;return p?p.computeStatisticsHistograms({pixelBlock:h},e):H(h)}async createFlowMesh(t,e){const r=this._rasterJobHandler.instance;return r?r.createFlowMesh(t,e):E(t.meshType,t.simulationSettings,t.flowData,null!=e.signal?e.signal:(new AbortController).signal)}normalizeRasterFetchOptions(t){const{multidimensionalInfo:e}=this.rasterInfo??{};if(null==e)return t;let r=t.multidimensionalDefinition||this.multidimensionalDefinition;null!=r&&r.length||(r=b(this.raster.rasterInfo,{multidimensionalSubset:this.multidimensionalSubset}));const i=t.timeExtent||this.timeExtent;if(null!=r&&null!=i&&(null!=i.start||null!=i.end)){r=r.map((t=>t.clone()));const s=e.variables.find((({name:t})=>t===r[0].variableName))?.dimensions?.find((({name:t})=>"StdTime"===t)),n=r.find((({dimensionName:t})=>"StdTime"===t));if(!s||!n)return{...t,multidimensionalDefinition:null};const{start:o,end:a}=i,l=null==o?null:o.getTime(),u=null==a?null:a.getTime(),m=l??u,c=u??l;if(null!=s.values){const t=s.values.filter((t=>{if(Array.isArray(t)){if(m===c)return t[0]<=m&&t[1]>=m;const e=t[0]<=m&&t[1]>m||t[0]<c&&t[1]>=c,r=t[0]>=m&&t[1]<=c||t[0]<m&&t[1]>c;return e||r}return m===c?t===m:t>=m&&t<=c}));if(t.length){const e=t.sort(((t,e)=>{if(m===c)return(t[0]??t)-(e[0]??e);return Math.abs((t[1]??t)-c)-Math.abs((e[1]??e)-c)}))[0];n.values=[e]}else r=null}else if(s.hasRegularIntervals&&s.extent){const[t,e]=s.extent;m>e||c<t?r=null:n.values=m===c?[m]:[Math.max(t,m),Math.min(e,c)]}}return null!=r&&g(r,this.multidimensionalSubset)?{...t,multidimensionalDefinition:null}:{...t,multidimensionalDefinition:r}}async updateRasterFunction(){if("imagery-tile"!==this.type||!this.rasterFunction&&!this._cachedRasterFunctionJson||JSON.stringify(this.rasterFunction)===JSON.stringify(this._cachedRasterFunctionJson))return;if(this._isConstructedFromFunctionRaster&&"Function"===this.raster.datasetFormat){const t=this.raster.rasterFunction.toJSON();return!this.rasterFunction&&t&&this._set("rasterFunction",h.fromJSON(t)),void(this._cachedRasterFunctionJson=this.rasterFunction?.toJSON())}let t,e=this.raster,r=!1;"Function"===e.datasetFormat?(t=e.primaryRasters.rasters,e=t[0],r=!0):t=[e];const{rasterFunction:i}=this;if(i){const r={raster:e};t.length>1&&t.forEach((t=>r[t.url]=t));const s=S(i.rasterFunctionDefinition??i.toJSON(),r),n=new y({rasterFunction:s});n.rasterJobHandler=this._rasterJobHandler.instance,await n.open(),this._cachedRasterFunctionJson=this.rasterFunction?.toJSON(),this.raster=n}else this.raster=e,this._cachedRasterFunctionJson=null;if(this._cachedRendererJson=null,!r&&!i)return;const{bandIds:s}=this,{bandCount:n}=this.raster.rasterInfo,o=s?.length?s.some((t=>t>=n)):n>=3;s&&(o||"raster-stretch"!==this.renderer.type)&&this._set("bandIds",null),this._configDefaultRenderer("auto")}async updateRenderer(){const{loaded:t,symbolizer:e}=this;if(!t||!e)return;const{rasterInfo:r}=this.raster,i=F(r,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),s=i?.name,n=w({...this.renderer.toJSON(),variableName:s});if(JSON.stringify(this._cachedRendererJson)===JSON.stringify(n))return;const o=this._rasterJobHandler.instance;o&&(e.rasterInfo=T(r,s),e.rendererJSON=n,e.bind(),await o.updateSymbolizer(e),this._cachedRendererJson=n)}async applyRenderer(t,e){const r=t&&t.pixelBlock;if(!(null!=r&&r.pixels&&r.pixels.length>0))return null;let i;await this.updateRenderer();const s=this._rasterJobHandler.instance,n=this.bandIds??[];return i=s?await s.symbolize({...t,simpleStretchParams:e,bandIds:n}):this.symbolizer.symbolize({...t,simpleStretchParams:e,bandIds:n}),i}getTileUrl(t,e,r){return"RasterTileServer"===this.raster.datasetFormat?`${this.url}/tile/${t}/${e}/${r}`:""}getCompatibleTileInfo(t,e,r=!1){if(!this.loaded||null==e)return null;if(r&&t.equals(this.spatialReference))return this.tileInfo;const i=l(t);return f.create({size:256,spatialReference:t,origin:i?{x:i.origin[0],y:i.origin[1]}:{x:e.xmin,y:e.ymax}})}getCompatibleFullExtent(t){return this.loaded?(this._compatibleFullExtent&&this._compatibleFullExtent.spatialReference.equals(t)||(this._compatibleFullExtent=this.raster.computeExtent(t)),this._compatibleFullExtent):null}async fetchTile(t,e,i,s={}){if(B(this),s.requestAsImageElement){const n=this.getTileUrl(t,e,i);return r(n,{responseType:"image",query:{...this.refreshParameters,...this.raster.ioConfig.customFetchParameters},signal:s.signal}).then((t=>t.data))}const{rasterInfo:n}=this;if(null!=n.multidimensionalInfo&&null==(s=this.normalizeRasterFetchOptions(s)).multidimensionalDefinition){const r=s.tileInfo||n.storageInfo.tileInfo;return{extent:this.raster.getTileExtentFromTileInfo(t,e,i,r),pixelBlock:null}}return await this._initJobHandler(),await this.updateRasterFunction(),"raster-shaded-relief"===this.renderer.type&&(s={...s,buffer:{cols:1,rows:1}}),this.raster.fetchTile(t,e,i,s)}async fetchPixels(t,e,r,i={}){return null!=this.rasterInfo.multidimensionalInfo&&null==(i=this.normalizeRasterFetchOptions(i)).multidimensionalDefinition?{extent:t,pixelBlock:null}:(await this._initJobHandler(),await this.updateRasterFunction(),e=Math.round(e),r=Math.round(r),this.raster.fetchPixels(t,e,r,i))}async identify(t,e={}){const{raster:r,rasterInfo:s}=this;if(null!=s.multidimensionalInfo){if(!(s.hasMultidimensionalTranspose&&!!(I(e.multidimensionalDefinition)||e.transposedVariableName||e.timeExtent))&&null==(e=this.normalizeRasterFetchOptions(e)).multidimensionalDefinition)return{location:t,value:null}}const n=this.multidimensionalSubset?.areaOfInterest;if(n&&!n.contains(t))throw new i("imagery-tile-mixin:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");return r.identify(t,e)}increaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount++}decreaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount--,this._rasterJobHandler.refCount<=0&&this._shutdownJobHandler()}hasStandardTime(){const t=this.rasterInfo?.multidimensionalInfo;if(null==t||"standard-time"!==this.rasterInfo?.dataType)return!1;const e=this.multidimensionalDefinition,r=e?.[0]?.variableName;return t.variables.some((t=>t.name===r&&(!e?.[0].dimensionName||t.dimensions.some((t=>"StdTime"===t.name)))))}getStandardTimeValue(t){return new Date(24*(t-25569)*3600*1e3).toString()}getMultidimensionalSubsetVariables(t){const e=t??this.rasterInfo?.multidimensionalInfo;return J(this.multidimensionalSubset,e)}_configDefaultSettings(){this._configDefaultInterpolation(),this.multidimensionalDefinition||(this.multidimensionalDefinition=b(this.raster.rasterInfo,{multidimensionalSubset:this.multidimensionalSubset})),this._configDefaultRenderer()}_initJobHandler(){if(null!=this._rasterJobHandler.connectionPromise)return this._rasterJobHandler.connectionPromise;const t=new p;return this._rasterJobHandler.connectionPromise=t.initialize().then((()=>{B(this),this._rasterJobHandler.instance=t,this.raster.rasterJobHandler=t,this.renderer&&this.updateRenderer(),"Function"===this.raster.datasetFormat&&this.raster.syncJobHandler()})).catch((()=>{})),this._rasterJobHandler.connectionPromise}_shutdownJobHandler(){this._rasterJobHandler.instance&&this._rasterJobHandler.instance.destroy(),this._rasterJobHandler.instance=null,this._rasterJobHandler.connectionPromise=null,this._rasterJobHandler.refCount=0,this._cachedRendererJson=null,this.raster&&(this.raster.rasterJobHandler=null)}_configDefaultInterpolation(){if(null==this.interpolation){B(this);const{raster:t}=this,e=N(t.rasterInfo,t.tileType,this.sourceJSON?.defaultResamplingMethod);this._set("interpolation",e)}}_configDefaultRenderer(t="no"){B(this);const{rasterInfo:e}=this.raster;!this.bandIds&&e.bandCount>1&&(this.bandIds=O(e));const r=F(e,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),i=r?.name;if(!this.renderer||"override"===t){const t=z(e,{bandIds:this.bandIds,variableName:i}),r=e.statistics,s=r&&r.length>0?r[0]:null,n=s?.max??0,o=s?.min??0;"WCSServer"===this.raster.datasetFormat&&"raster-stretch"===t.type&&(n>1e24||o<-1e24)&&(t.dynamicRangeAdjustment=!0,t.statistics=null,"none"===t.stretchType&&(t.stretchType="min-max")),this.renderer=t}const s=w({...this.renderer.toJSON(),variableName:i}),n=T(e,i);this.symbolizer?(this.symbolizer.rendererJSON=s,this.symbolizer.rasterInfo=n):this.symbolizer=new C({rendererJSON:s,rasterInfo:n});const o=this.symbolizer.bind();if(o.success){if("auto"===t){const{colormap:t}=this.raster.rasterInfo,e=this.renderer;if(null!=t)if("raster-colormap"!==e.type)this._configDefaultRenderer("override");else{const t=z(this.raster.rasterInfo);JSON.stringify(t)!==JSON.stringify(e)&&this._configDefaultRenderer("override")}else if("raster-stretch"===e.type){const t=this.bandIds?.length,r=e.statistics?.length;!e.dynamicRangeAdjustment&&r&&t&&r!==t&&this._configDefaultRenderer("override")}}}else k.warn("imagery-tile-mixin",o.error||"The given renderer is not supported by the layer."),"auto"===t&&this._configDefaultRenderer("override")}};function B(t){if(!t.raster||!t.rasterInfo)throw new i("imagery-tile","no raster")}return t([n()],q.prototype,"_cachedRendererJson",void 0),t([n()],q.prototype,"_cachedRasterFunctionJson",void 0),t([n()],q.prototype,"_compatibleFullExtent",void 0),t([n()],q.prototype,"_isConstructedFromFunctionRaster",void 0),t([n()],q.prototype,"_rasterJobHandler",void 0),t([n()],q.prototype,"bandIds",void 0),t([n({json:{origins:{service:{read:{source:"copyrightText"}}}}})],q.prototype,"copyright",void 0),t([n({json:{read:!1}})],q.prototype,"fullExtent",null),t([n()],q.prototype,"interpolation",void 0),t([n()],q.prototype,"ioConfig",void 0),t([n({type:[c],json:{write:!0}})],q.prototype,"multidimensionalDefinition",null),t([n({type:d,json:{write:!0}})],q.prototype,"multidimensionalSubset",void 0),t([n()],q.prototype,"raster",void 0),t([n({type:h})],q.prototype,"rasterFunction",void 0),t([n()],q.prototype,"rasterInfo",void 0),t([n()],q.prototype,"sourceJSON",void 0),t([n({readOnly:!0,type:M,json:{read:!1}})],q.prototype,"spatialReference",void 0),t([n({json:{read:!1}})],q.prototype,"tileInfo",null),t([n(m)],q.prototype,"url",null),t([n({types:e})],q.prototype,"renderer",null),t([n()],q.prototype,"symbolizer",void 0),q=t([a("esri.layers.ImageryTileMixin")],q),q};export{q as ImageryTileMixin};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import r from"../../core/Logger.js";import{debounce as s,ignoreAbortErrors as t}from"../../core/promiseUtils.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{registerLayer as i,unregisterLayer as h}from"./refresh.js";function n(e){return null!=e&&"object"==typeof e&&"refreshTimestamp"in e&&"refresh"in e}const p=n=>{let p=class extends n{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=s((()=>this.hasDataChanged())),this.when().then((()=>{i(this)}),(()=>{}))}destroy(){h(this)}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){t(this._debounceHasDataChanged()).then((r=>{r&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:r})}),(e=>{r.getLogger(this.declaredClass).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}};return e([o({type:Number,cast:e=>e>=.1?e:e<=0?0:.1,json:{write:!0}})],p.prototype,"refreshInterval",void 0),e([o({readOnly:!0})],p.prototype,"refreshTimestamp",void 0),e([o()],p.prototype,"refreshParameters",null),p=e([a("esri.layers.mixins.RefreshableLayer")],p),p};export{p as RefreshableLayer,n as isRefreshableLayer};
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import r from"../../core/Logger.js";import{debounce as s,ignoreAbortErrors as t}from"../../core/promiseUtils.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{registerLayer as i,unregisterLayer as h}from"./refresh.js";function n(e){return null!=e&&"object"==typeof e&&"refreshTimestamp"in e&&"refresh"in e}const p=n=>{let p=class extends n{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=s((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||i(this)}),(()=>{}))}destroy(){h(this)}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){t(this._debounceHasDataChanged()).then((r=>{r&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:r})}),(e=>{r.getLogger(this.declaredClass).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}};return e([o({type:Number,cast:e=>e>=.1?e:e<=0?0:.1,json:{write:!0}})],p.prototype,"refreshInterval",void 0),e([o({readOnly:!0})],p.prototype,"refreshTimestamp",void 0),e([o()],p.prototype,"refreshParameters",null),p=e([a("esri.layers.mixins.RefreshableLayer")],p),p};export{p as RefreshableLayer,n as isRefreshableLayer};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import o from"../../request.js";import r from"../../core/Handles.js";import{JSONSupport as s}from"../../core/JSONSupport.js";import{clone as t}from"../../core/lang.js";import{
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import o from"../../request.js";import r from"../../core/Handles.js";import{JSONSupport as s}from"../../core/JSONSupport.js";import{clone as t}from"../../core/lang.js";import{on as i,sync as a}from"../../core/reactiveUtils.js";import{property as p}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import{reader as l}from"../../core/accessorSupport/decorators/reader.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";import{persistable as c}from"../../core/accessorSupport/decorators/persistable.js";import m from"./PolygonCollection.js";import{f as u}from"../../chunks/persistableUrlUtils.js";var h;let d=h=class extends s{constructor(e){super(e),this.spatialRelationship="disjoint",this.geometries=new m,this._geometriesSource=null,this._handles=new r}initialize(){this._handles.add(i((()=>this.geometries),"after-changes",(()=>this.geometries=this.geometries),a))}destroy(){this._handles.destroy()}readGeometries(e,o,r){this._geometriesSource={url:u(e,r),context:r}}async loadGeometries(e,r){if(null==this._geometriesSource)return;const{url:s,context:t}=this._geometriesSource,i=await o(s,{responseType:"json",signal:r?.signal}),a=e.toJSON(),p=i.data.map((e=>({...e,spatialReference:a})));this.geometries=m.fromJSON(p,t),this._geometriesSource=null}clone(){return new h({geometries:t(this.geometries),spatialRelationship:this.spatialRelationship})}};e([p({type:["disjoint","contains"],nonNullable:!0,json:{write:!0}})],d.prototype,"spatialRelationship",void 0),e([p({type:m,nonNullable:!0,json:{write:!0}}),c({origins:["web-scene","portal-item"],type:"resource",prefix:"geometries"})],d.prototype,"geometries",void 0),e([l(["web-scene","portal-item"],"geometries")],d.prototype,"readGeometries",null),d=h=e([n("esri.layers.support.SceneFilter")],d);const g=d;export{g as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as r}from"../../chunks/tslib.es6.js";import o from"../../request.js";import t from"../../core/Collection.js";import{JSONSupportMixin as e}from"../../core/JSONSupport.js";import{
|
|
5
|
+
import{_ as r}from"../../chunks/tslib.es6.js";import o from"../../request.js";import t from"../../core/Collection.js";import{JSONSupportMixin as e}from"../../core/JSONSupport.js";import{urlToObject as s}from"../../core/urlUtils.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as c}from"../../core/accessorSupport/decorators/subclass.js";import p from"./SceneModification.js";var a;let n=a=class extends(e(t.ofType(p))){constructor(r){super(r),this.url=null}clone(){return new a({url:this.url,items:this.items.map((r=>r.clone()))})}toJSON(r){return this.toArray().map((o=>o.toJSON(r))).filter((r=>!!r.geometry))}static fromJSON(r,o){const t=new a;for(const e of r)t.add(p.fromJSON(e,o));return t}static async fromUrl(r,t,e){const i={url:s(r),origin:"service"},c=await o(r,{responseType:"json",signal:e?.signal}),n=t.toJSON(),m=[];for(const o of c.data)m.push(p.fromJSON({...o,geometry:{...o.geometry,spatialReference:n}},i));return new a({url:r,items:m})}};r([i({type:String})],n.prototype,"url",void 0),n=a=r([c("esri.layers.support.SceneModifications")],n);const m=n;export{m as default};
|