@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
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8865,7873],{46521:(e,t,r)=>{function i(){return[1,0,0,0,1,0,0,0,1]}function o(e,t,r,i,o,n,s,a,l){return[e,t,r,i,o,n,s,a,l]}function n(e,t){return new Float64Array(e,t,9)}r.d(t,{a:()=>n,c:()=>i,f:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:i,createView:n,fromValues:o},Symbol.toStringTag,{value:"Module"}))},51305:(e,t,r)=>{r.d(t,{c:()=>h,g:()=>u,j:()=>R,k:()=>m,m:()=>c,s:()=>p});var i=r(46521),o=r(94961),n=r(65617),s=r(46851),a=r(17896),l=r(98766);function p(e,t,r){r*=.5;const i=Math.sin(r);return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=Math.cos(r),e}function u(e,t){const r=2*Math.acos(t[3]),i=Math.sin(r/2);return i>(0,s.g)()?(e[0]=t[0]/i,e[1]=t[1]/i,e[2]=t[2]/i):(e[0]=1,e[1]=0,e[2]=0),r}function c(e,t,r){const i=t[0],o=t[1],n=t[2],s=t[3],a=r[0],l=r[1],p=r[2],u=r[3];return e[0]=i*u+s*a+o*p-n*l,e[1]=o*u+s*l+n*a-i*p,e[2]=n*u+s*p+i*l-o*a,e[3]=s*u-i*a-o*l-n*p,e}function d(e,t,r,i){const o=t[0],n=t[1],a=t[2],l=t[3];let p,u,c,d,h,y=r[0],m=r[1],f=r[2],g=r[3];return u=o*y+n*m+a*f+l*g,u<0&&(u=-u,y=-y,m=-m,f=-f,g=-g),1-u>(0,s.g)()?(p=Math.acos(u),c=Math.sin(p),d=Math.sin((1-i)*p)/c,h=Math.sin(i*p)/c):(d=1-i,h=i),e[0]=d*o+h*y,e[1]=d*n+h*m,e[2]=d*a+h*f,e[3]=d*l+h*g,e}function h(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function y(e,t){const r=t[0]+t[4]+t[8];let i;if(r>0)i=Math.sqrt(r+1),e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i;else{let r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);const o=(r+1)%3,n=(r+2)%3;i=Math.sqrt(t[3*r+r]-t[3*o+o]-t[3*n+n]+1),e[r]=.5*i,i=.5/i,e[3]=(t[3*o+n]-t[3*n+o])*i,e[o]=(t[3*o+r]+t[3*r+o])*i,e[n]=(t[3*n+r]+t[3*r+n])*i}return e}function m(e,t,r,i){const o=.5*Math.PI/180;t*=o,r*=o,i*=o;const n=Math.sin(t),s=Math.cos(t),a=Math.sin(r),l=Math.cos(r),p=Math.sin(i),u=Math.cos(i);return e[0]=n*l*u-s*a*p,e[1]=s*a*u+n*l*p,e[2]=s*l*p-n*a*u,e[3]=s*l*u+n*a*p,e}const f=l.c,g=l.s,b=l.a,v=c,S=l.b,w=l.d,_=l.l,x=l.e,C=x,j=l.f,I=j,V=l.n,R=l.g,N=l.h,q=(0,n.c)(),z=(0,n.f)(1,0,0),M=(0,n.f)(0,1,0),Z=(0,o.a)(),T=(0,o.a)(),A=(0,i.c)();Object.freeze(Object.defineProperty({__proto__:null,add:b,calculateW:function(e,t){const r=t[0],i=t[1],o=t[2];return e[0]=r,e[1]=i,e[2]=o,e[3]=Math.sqrt(Math.abs(1-r*r-i*i-o*o)),e},conjugate:h,copy:f,dot:w,equals:N,exactEquals:R,fromEuler:m,fromMat3:y,getAxisAngle:u,identity:function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},invert:function(e,t){const r=t[0],i=t[1],o=t[2],n=t[3],s=r*r+i*i+o*o+n*n,a=s?1/s:0;return e[0]=-r*a,e[1]=-i*a,e[2]=-o*a,e[3]=n*a,e},len:C,length:x,lerp:_,mul:v,multiply:c,normalize:V,random:function(e){const t=s.R,r=t(),i=t(),o=t(),n=Math.sqrt(1-r),a=Math.sqrt(r);return e[0]=n*Math.sin(2*Math.PI*i),e[1]=n*Math.cos(2*Math.PI*i),e[2]=a*Math.sin(2*Math.PI*o),e[3]=a*Math.cos(2*Math.PI*o),e},rotateX:function(e,t,r){r*=.5;const i=t[0],o=t[1],n=t[2],s=t[3],a=Math.sin(r),l=Math.cos(r);return e[0]=i*l+s*a,e[1]=o*l+n*a,e[2]=n*l-o*a,e[3]=s*l-i*a,e},rotateY:function(e,t,r){r*=.5;const i=t[0],o=t[1],n=t[2],s=t[3],a=Math.sin(r),l=Math.cos(r);return e[0]=i*l-n*a,e[1]=o*l+s*a,e[2]=n*l+i*a,e[3]=s*l-o*a,e},rotateZ:function(e,t,r){r*=.5;const i=t[0],o=t[1],n=t[2],s=t[3],a=Math.sin(r),l=Math.cos(r);return e[0]=i*l+o*a,e[1]=o*l-i*a,e[2]=n*l+s*a,e[3]=s*l-n*a,e},rotationTo:function(e,t,r){const i=(0,a.e)(t,r);return i<-.999999?((0,a.f)(q,z,t),(0,a.u)(q)<1e-6&&(0,a.f)(q,M,t),(0,a.n)(q,q),p(e,q,Math.PI),e):i>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):((0,a.f)(q,t,r),e[0]=q[0],e[1]=q[1],e[2]=q[2],e[3]=1+i,V(e,e))},scale:S,set:g,setAxes:function(e,t,r,i){const o=A;return o[0]=r[0],o[3]=r[1],o[6]=r[2],o[1]=i[0],o[4]=i[1],o[7]=i[2],o[2]=-t[0],o[5]=-t[1],o[8]=-t[2],V(e,y(e,o))},setAxisAngle:p,slerp:d,sqlerp:function(e,t,r,i,o,n){return d(Z,t,o,n),d(T,r,i,n),d(e,Z,T,2*n*(1-n)),e},sqrLen:I,squaredLength:j,str:function(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}},Symbol.toStringTag,{value:"Module"}))},94961:(e,t,r)=>{function i(){return[0,0,0,1]}function o(e){return[e[0],e[1],e[2],e[3]]}function n(e,t){return new Float64Array(e,t,4)}r.d(t,{I:()=>s,a:()=>i,b:()=>o,c:()=>n});const s=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:o,create:i,createView:n,fromValues:function(e,t,r,i){return[e,t,r,i]}},Symbol.toStringTag,{value:"Module"}))},28576:(e,t,r)=>{r.d(t,{B:()=>c});var i=r(81153),o=r(17452),n=r(41123),s=r(7628),a=r(31263),l=r(5600),p=r(66094),u=r(25929);function c(e){const t=e?.origins??[void 0];return(r,n)=>{const c=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const n=(0,s.Oe)(t,r);return{type:String,read:(e,t,r)=>{const i=(0,u.r)(e,t,r);return n.type===String?i:"function"==typeof n.type?new n.type({url:i}):void 0},write:{writer(t,s,l,c){if(!c||!c.resources)return"string"==typeof t?void(s[l]=(0,u.t)(t,c)):void(s[l]=t.write({},c));const m=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),f=(0,u.t)(m,{...c,verifyItemRelativeUrls:c&&c.verifyItemRelativeUrls?{writtenUrls:c.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},u.M.NO),g=n.type!==String&&(!(0,i.l)(this)||c&&c.origin&&this.originIdOf(r)>(0,a.M9)(c.origin)),b={object:this,propertyName:r,value:t,targetUrl:f,dest:s,targetPropertyName:l,context:c,params:e};c&&c.portalItem&&f&&!(0,o.YP)(f)?g?function(e){const{context:t,targetUrl:r,params:i,value:n,dest:s,targetPropertyName:a}=e;if(!t.portalItem)return;const l=t.portalItem.resourceFromPath(r),u=y(n,r,t),c=(0,p.B)(u),m=(0,o.Ml)(l.path),f=i?.compress??!1;c===m?(t.resources&&h({...e,resource:l,content:u,compress:f,updates:t.resources.toUpdate}),s[a]=r):d(e)}(b):function({context:e,targetUrl:t,dest:r,targetPropertyName:i}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),r[i]=t)}(b):c&&c.portalItem&&(null==f||null!=(0,u.i)(f)||(0,o.jc)(f)||g)?d(b):s[l]=f}}}}(e,t,r);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=u.a;return{read:e,write:t}}}}(e,r,n);for(const e of t){const t=(0,l.CJ)(r,e,n);for(const e in c)t[e]=c[e]}}}function d(e){const{targetUrl:t,params:i,value:s,context:a,dest:l,targetPropertyName:c}=e;if(!a.portalItem)return;const d=(0,u.p)(t),m=d?.filename??(0,n.D)(),f=i?.prefix??d?.prefix,g=y(s,t,a),b=(0,o.v_)(f,m),v=`${b}.${(0,p.B)(g)}`,S=a.portalItem.resourceFromPath(v);(0,o.jc)(t)&&a.resources&&a.resources.pendingOperations.push(async function(e){const t=(await Promise.resolve().then(r.bind(r,3172))).default,{data:i}=await t(e,{responseType:"blob"});return i}(t).then((e=>{S.path=`${b}.${(0,p.B)(e)}`,l[c]=S.itemRelativeUrl})).catch((()=>{})));const w=i?.compress??!1;a.resources&&h({...e,resource:S,content:g,compress:w,updates:a.resources.toAdd}),l[c]=S.itemRelativeUrl}function h({object:e,propertyName:t,updates:r,resource:i,content:o,compress:n}){r.push({resource:i,content:o,compress:n,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function y(e,t,r){return"string"==typeof e?{url:t}:new Blob([JSON.stringify(e.toJSON(r))],{type:"application/json"})}},65845:(e,t,r)=>{r.d(t,{D:()=>o});var i=r(81153);function o(e){e&&e.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,i.l)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},81153:(e,t,r)=>{function i(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{l:()=>i})},41123:(e,t,r)=>{r.d(t,{D:()=>o});const i="randomUUID"in crypto;function o(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}},79235:(e,t,r)=>{r.d(t,{Z:()=>v});var i,o=r(43697),n=r(67676),s=r(35454),a=r(96674),l=r(67900),p=r(20941),u=r(5600),c=(r(75215),r(80442),r(71715)),d=r(52011),h=r(30556);const y=(0,s.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),m=y.jsonValues.slice();(0,n.e$)(m,"orthometric");const f=(0,s.w)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let g=i=class extends a.wq{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return y.write(e,t,r)}readHeightModel(e,t,r){return y.read(e)||(r&&r.messages&&r.messages.push(function(e,t){return new p.Z("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return f.read(e)||(r&&r.messages&&r.messages.push(b(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.$C)(e)||f.read(e)||(r&&r.messages&&r.messages.push(b(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l.cM)(t);return new i({heightModel:e.heightModel,heightUnit:r,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function b(e,t){return new p.Z("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,o._)([(0,u.Cb)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m,default:"ellipsoidal"}}}})],g.prototype,"heightModel",void 0),(0,o._)([(0,h.c)("web-scene","heightModel")],g.prototype,"writeHeightModel",null),(0,o._)([(0,c.r)(["web-scene","service"],"heightModel")],g.prototype,"readHeightModel",null),(0,o._)([(0,u.Cb)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f.jsonValues,write:f.write}}}})],g.prototype,"heightUnit",void 0),(0,o._)([(0,c.r)("web-scene","heightUnit")],g.prototype,"readHeightUnit",null),(0,o._)([(0,c.r)("service","heightUnit")],g.prototype,"readHeightUnitService",null),(0,o._)([(0,u.Cb)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],g.prototype,"vertCRS",void 0),(0,o._)([(0,c.r)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],g.prototype,"readVertCRS",null),g=i=(0,o._)([(0,d.j)("esri.geometry.HeightModelInfo")],g);const v=g},28865:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Ke});var i=r(43697),o=r(46791),n=r(20102),s=r(92604),a=r(16453),l=r(95330),p=r(5600),u=r(75215),c=(r(67676),r(80442),r(71715)),d=r(52011),h=r(17896),y=r(65617),m=r(6570),f=r(87085),g=r(54295),b=r(17287),v=r(38009),S=r(16859),w=r(72965),_=r(20559),x=r(66677),C=r(21506),j=r(1231),I=r(2368),V=r(68251),R=r(96674),N=r(28576),q=r(51305),z=r(94961),M=r(46851);const Z=(0,y.c)(),T=(0,z.a)(),A=(0,z.a)(),F=(0,z.a)(),P=(0,y.f)(0,0,1),L=(0,y.f)(0,1,0),O=(0,y.f)(1,0,0);function D(e){(0,h.c)(Z,e),(0,h.n)(Z,Z);const t=Math.atan2(Z[1],Z[0]),r=(0,q.s)((0,z.a)(),P,-t);(0,h.q)(Z,Z,r);const i=-1*Math.atan2(Z[2],Z[0]);return[(0,M.a)(t)+270,(0,M.a)(i)+90]}function U(e,t){return(0,q.s)(A,P,(0,M.t)(e-270)),(0,q.s)(F,L,(0,M.t)(t-90)),(0,q.m)(T,A,F),(0,h.c)(Z,O),(0,h.q)(Z,Z,T),(0,h.n)(Z,Z),[Z[0],Z[1],Z[2]]}var E=r(90578);let B=class extends((0,I.J)(R.wq)){constructor(e){super(e),this.enabled=!0,this.label="",this.normal=null,this.point=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=D(this.normal);return V.BV.normalize((0,u.q9)(e),0,!0)}set orientation(e){const t=U(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=D(this.normal);return V.BV.normalize((0,u.q9)(t),0,!0)}set tilt(e){const t=U(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],B.prototype,"enabled",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],B.prototype,"label",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,E.p)((e=>V.BV.normalize((0,u.q9)(e),0,!0)))],B.prototype,"orientation",null),(0,i._)([(0,p.Cb)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,E.p)((e=>V.BV.normalize((0,u.q9)(e),0,!0)))],B.prototype,"tilt",null),(0,i._)([(0,p.Cb)({type:[Number],json:{write:!0}})],B.prototype,"normal",void 0),(0,i._)([(0,p.Cb)({type:[Number],json:{write:!0}})],B.prototype,"point",void 0),B=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelSlice")],B);const k=B;var $=r(25929);let K=class extends((0,I.J)(R.wq)){constructor(){super(...arguments),this.enabled=!0,this.href=null,this.id=null,this.label="",this.normal=null,this.point=null,this.sizeInPixel=null,this.slices=null,this.timeId=0,this.variableId=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=D(this.normal);return V.BV.normalize((0,u.q9)(e),0,!0)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=D(this.normal);return V.BV.normalize((0,u.q9)(t),0,!0)}};(0,i._)([(0,p.Cb)({type:Boolean,json:{default:!0,write:!0}})],K.prototype,"enabled",void 0),(0,i._)([(0,p.Cb)({type:String,json:{origins:{service:{read:$.r}},write:{enabled:!0,isRequired:!0}}}),(0,N.B)({origins:["web-scene"],type:"resource",prefix:"sections",compress:!0})],K.prototype,"href",void 0),(0,i._)([(0,p.Cb)({type:u.z8,json:{write:{enabled:!0,isRequired:!0}}})],K.prototype,"id",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],K.prototype,"label",void 0),(0,i._)([(0,p.Cb)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],K.prototype,"orientation",null),(0,i._)([(0,p.Cb)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],K.prototype,"tilt",null),(0,i._)([(0,p.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],K.prototype,"normal",void 0),(0,i._)([(0,p.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],K.prototype,"point",void 0),(0,i._)([(0,p.Cb)({type:[u.z8],json:{write:{enabled:!0,isRequired:!0}}})],K.prototype,"sizeInPixel",void 0),(0,i._)([(0,p.Cb)({type:[k],json:{write:!0}})],K.prototype,"slices",void 0),(0,i._)([(0,p.Cb)({type:u.z8,json:{default:0,write:!0}})],K.prototype,"timeId",void 0),(0,i._)([(0,p.Cb)({type:u.z8,json:{write:{enabled:!0,isRequired:!0}}})],K.prototype,"variableId",void 0),K=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelSection")],K);const J=K;let H=class extends R.wq{constructor(){super(...arguments),this.diffuseFactor=.5,this.specularFactor=.5}};(0,i._)([(0,p.Cb)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],H.prototype,"diffuseFactor",void 0),(0,i._)([(0,p.Cb)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],H.prototype,"specularFactor",void 0),H=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelSimpleShading")],H);const W=H;let Y=class extends R.wq{constructor(){super(...arguments),this.continuity=null,this.hasNoData=!1,this.noData=0,this.offset=0,this.scale=1,this.type=null}};(0,i._)([(0,p.Cb)({type:["discrete","continuous"],json:{write:!0}})],Y.prototype,"continuity",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],Y.prototype,"hasNoData",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:!0}})],Y.prototype,"noData",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:!0}})],Y.prototype,"offset",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:!0}})],Y.prototype,"scale",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Y.prototype,"type",void 0),Y=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelFormat")],Y);const G=Y;let Q=class extends R.wq{constructor(){super(...arguments),this.id=null,this.description="",this.name=null,this.originalFormat=null,this.renderingFormat=null,this.unit="",this.volumeId=0,this.type=null}};(0,i._)([(0,p.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Q.prototype,"id",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],Q.prototype,"description",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Q.prototype,"name",void 0),(0,i._)([(0,p.Cb)({type:G,json:{write:!0}})],Q.prototype,"originalFormat",void 0),(0,i._)([(0,p.Cb)({type:G,json:{write:{enabled:!0,isRequired:!0}}})],Q.prototype,"renderingFormat",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],Q.prototype,"unit",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:!0}})],Q.prototype,"volumeId",void 0),(0,i._)([(0,p.Cb)({type:["stc-hot-spot-results","stc-cluster-outlier-results","stc-estimated-bin","generic-nearest-interpolated"],json:{write:!0}})],Q.prototype,"type",void 0),Q=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelVariable")],Q);const X=Q;var ee=r(22974),te=r(22303);let re=class extends((0,I.J)(R.wq)){constructor(){super(...arguments),this.color=te.Z.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label="",this.colorLocked=!1}};(0,i._)([(0,p.Cb)({type:te.Z,json:{type:[u.z8],write:{enabled:!0,isRequired:!0}}})],re.prototype,"color",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],re.prototype,"value",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{default:!0,write:!0}})],re.prototype,"enabled",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],re.prototype,"label",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{default:!1,write:!0}})],re.prototype,"colorLocked",void 0),re=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelIsosurface")],re);const ie=re;var oe=r(70921),ne=r(22021);let se=class extends((0,I.J)(R.wq)){constructor(){super(...arguments),this.color=null,this.position=0}};(0,i._)([(0,p.Cb)({type:te.Z,json:{type:[u.z8],write:{enabled:!0,isRequired:!0}}})],se.prototype,"color",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],se.prototype,"position",void 0),se=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelColorStop")],se);const ae=se;let le=class extends((0,I.J)(R.wq)){constructor(){super(...arguments),this.opacity=1,this.position=0}};(0,i._)([(0,p.Cb)({type:Number,json:{name:"alpha",write:{enabled:!0,isRequired:!0}}})],le.prototype,"opacity",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],le.prototype,"position",void 0),le=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelOpacityStop")],le);const pe=le;let ue=class extends((0,I.J)(R.wq)){constructor(){super(...arguments),this.enabled=!1,this.range=null}};(0,i._)([(0,p.Cb)({type:Boolean,json:{default:!1,write:!0}})],ue.prototype,"enabled",void 0),(0,i._)([(0,p.Cb)({type:[Number],json:{write:!0}})],ue.prototype,"range",void 0),ue=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelRangeFilter")],ue);const ce=ue;var de,he;(he=de||(de={}))[he.Color=1]="Color",he[he.Alpha=2]="Alpha",he[he.Both=3]="Both";let ye=class extends((0,I.J)(R.wq)){constructor(e){super(e),this.interpolation=null,this.stretchRange=null,this.rangeFilter=null,this._colorMapSize=256,this.colorStops=new(o.Z.ofType(ae)),this.opacityStops=new(o.Z.ofType(pe))}set colorStops(e){this._set("colorStops",(0,oe.Z)(e,this._get("colorStops"),o.Z.ofType(ae)))}set opacityStops(e){this._set("opacityStops",(0,oe.Z)(e,this._get("opacityStops"),o.Z.ofType(pe)))}getPreviousNext(e,t,r){let i=e;for(;--i>0&&t[i].type!==r&&t[i].type!==de.Both;);let o=e;const n=t.length;for(;++o<n&&t[o].type!==r&&t[o].type!==de.Both;);return[i,o]}get rasterizedTransferFunction(){const e=[];if(this.colorStops.length<2)return e;const t=[],r=[];for(const t of this.colorStops){if(!t.color)return e;r.push({color:{r:t.color.r,g:t.color.g,b:t.color.b,a:Math.round(255*(1-t.color.a))},position:t.position,type:de.Color})}if(0===this.opacityStops.length)for(const e of r)t.push({color:e.color,position:e.position});else{for(const e of this.opacityStops){const t=(0,ne.uZ)(e.position,0,1),i=Math.round(255*(0,ne.uZ)(1-e.opacity,0,1));let o=!1;for(const e of r)if(e.type===de.Color&&Math.abs(e.position-t)<1e-5){e.color.a=i,e.type=de.Both,o=!0;break}o||r.push({color:{r:0,g:0,b:0,a:i},position:e.position,type:de.Alpha})}r.sort(((e,t)=>e.position<t.position?-1:1));const e=r.length;for(let t=0;t<e;++t){const i=r[t];if(i.type!==de.Both)if(i.type===de.Color){const[o,n]=this.getPreviousNext(t,r,de.Alpha);if(-1!==o&&n!==e){const e=(i.position-r[o].position)/(r[n].position-r[o].position);i.color.a=Math.round((0,ne.t7)(r[o].color.a,r[n].color.a,e))}else i.color.a=-1!==o?r[o].color.a:r[n].color.a}else{const[o,n]=this.getPreviousNext(t,r,de.Color);if(-1!==o&&n!==e){const e=(i.position-r[o].position)/(r[n].position-r[o].position),t=r[o].color,s=r[n].color;["r","g","b"].forEach((r=>{i.color[r]=Math.round((0,ne.t7)(t[r],s[r],e))}))}else["r","g","b"].forEach(-1!==o?e=>{i.color[e]=r[o][e]}:e=>{i.color[e]=r[n][e]})}}for(const e of r)t.push({color:e.color,position:e.position})}t[0].position=0,t[t.length-1].position=1;let i=0,o=1;for(let r=0;r<this._colorMapSize;++r){const n=r/this._colorMapSize;for(;n>t[o].position;)i=o++;const s=(n-t[i].position)/(t[o].position-t[i].position),a=t[i].color,l=t[o].color,p=new te.Z;["r","g","b"].forEach((e=>{p[e]=Math.round((0,ne.t7)(a[e],l[e],s))})),p.a=(0,ne.uZ)(1-(0,ne.t7)(a.a,l.a,s)/255,0,1),e.push(p)}return e}getColorForContinuousDataValue(e,t){const r=this.rasterizedTransferFunction;if(this.colorStops.length<2||!Array.isArray(this.stretchRange)||this.stretchRange.length<2||r.length<256)return null;let i=this.stretchRange[0],o=this.stretchRange[1];if(i>o){const e=i;i=o,o=e}e=(0,ne.uZ)(e,i,o);const n=r[Math.round((e-i)/(o-i)*(this._colorMapSize-1))].clone();return t||(n.a=1),n}};(0,i._)([(0,p.Cb)({type:["linear","nearest"],json:{write:!0}})],ye.prototype,"interpolation",void 0),(0,i._)([(0,p.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],ye.prototype,"stretchRange",void 0),(0,i._)([(0,p.Cb)({type:o.Z.ofType(ae),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.colorStops&&this.colorStops.length>0}}}}})],ye.prototype,"colorStops",null),(0,i._)([(0,p.Cb)({type:o.Z.ofType(pe),json:{read:{source:"alphaStops"},write:{enabled:!0,target:"alphaStops",overridePolicy(){return{enabled:!!this.opacityStops&&this.opacityStops.length>0}}}}})],ye.prototype,"opacityStops",null),(0,i._)([(0,p.Cb)({type:ce,json:{write:!0}})],ye.prototype,"rangeFilter",void 0),(0,i._)([(0,p.Cb)({type:[te.Z],clonable:!1,json:{read:!1}})],ye.prototype,"rasterizedTransferFunction",null),ye=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelTransferFunctionStyle")],ye);const me=ye;let fe=class extends((0,I.J)(R.wq)){constructor(){super(...arguments),this.color=te.Z.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label=""}};(0,i._)([(0,p.Cb)({type:te.Z,json:{type:[u.z8],write:{enabled:!0,isRequired:!0}}})],fe.prototype,"color",void 0),(0,i._)([(0,p.Cb)({type:u.z8,json:{write:{enabled:!0,isRequired:!0}}})],fe.prototype,"value",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{default:!0,write:!0}})],fe.prototype,"enabled",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],fe.prototype,"label",void 0),fe=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelUniqueValue")],fe);const ge=fe;var be;let ve=be=class extends R.wq{constructor(e){super(e),this.variableId=0,this.label="",this.transferFunction=null,this.uniqueValues=null,this.isosurfaces=null,this.uniqueValues=new(o.Z.ofType(ge)),this.isosurfaces=new(o.Z.ofType(ie))}clone(){return new be({variableId:this.variableId,label:this.label,transferFunction:(0,ee.d9)(this.transferFunction),uniqueValues:(0,ee.d9)(this.uniqueValues),isosurfaces:(0,ee.d9)(this.isosurfaces)})}};(0,i._)([(0,p.Cb)({type:u.z8,json:{write:{enabled:!0,isRequired:!0}}})],ve.prototype,"variableId",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],ve.prototype,"label",void 0),(0,i._)([(0,p.Cb)({type:me,json:{write:{enabled:!0,overridePolicy(){return{enabled:!this.uniqueValues||this.uniqueValues.length<1}}}}})],ve.prototype,"transferFunction",void 0),(0,i._)([(0,p.Cb)({type:o.Z.ofType(ge),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.uniqueValues&&this.uniqueValues.length>0}}}}})],ve.prototype,"uniqueValues",void 0),(0,i._)([(0,p.Cb)({type:o.Z.ofType(ie),json:{write:{enabled:!0,overridePolicy(){const e=!this.uniqueValues||this.uniqueValues.length<1,t=!!this.isosurfaces&&this.isosurfaces.length>0;return{enabled:e&&t}}}}})],ve.prototype,"isosurfaces",void 0),ve=be=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelVariableStyle")],ve);const Se=ve;var we=r(94139),_e=r(82971),xe=r(8744);let Ce=class extends R.wq{constructor(){super(...arguments),this.values=null}};(0,i._)([(0,p.Cb)({type:[Number],json:{write:!0}})],Ce.prototype,"values",void 0),Ce=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelIrregularSpacing")],Ce);const je=Ce;let Ie=class extends R.wq{constructor(){super(...arguments),this.scale=1,this.offset=0}};(0,i._)([(0,p.Cb)({type:Number,json:{write:!0}})],Ie.prototype,"scale",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:!0}})],Ie.prototype,"offset",void 0),Ie=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelRegularSpacing")],Ie);const Ve=Ie;let Re=class extends R.wq{constructor(){super(...arguments),this.irregularSpacing=null,this.isPositiveUp=!0,this.isWrappedDateLine=!1,this.label=null,this.name=null,this.quantity=null,this.regularSpacing=null,this.size=0,this.unit=null}get isRegular(){return(null==this.irregularSpacing||void 0===this.irregularSpacing)&&null!==this.regularSpacing}getRange(){return this.isRegular?[this.regularSpacing.offset,this.regularSpacing.offset+this.regularSpacing.scale*(this.size-1)]:Array.isArray(this.irregularSpacing?.values)&&this.irregularSpacing.values.length>1?[this.irregularSpacing.values[0],this.irregularSpacing.values[this.irregularSpacing.values.length-1]]:[0,0]}};(0,i._)([(0,p.Cb)({type:je,json:{write:!0}})],Re.prototype,"irregularSpacing",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],Re.prototype,"isPositiveUp",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],Re.prototype,"isWrappedDateLine",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],Re.prototype,"label",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],Re.prototype,"name",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],Re.prototype,"quantity",void 0),(0,i._)([(0,p.Cb)({type:Ve,json:{write:!0}})],Re.prototype,"regularSpacing",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:!0}})],Re.prototype,"size",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],Re.prototype,"unit",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{read:!1}})],Re.prototype,"isRegular",null),Re=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelDimension")],Re);const Ne=Re,qe="esri.layers.voxel.VoxelVolume",ze=s.Z.getLogger(qe);let Me=class extends R.wq{constructor(e){super(e),this.id=0,this.dimensions=null,this.spatialReference=_e.Z.WGS84}get zDimension(){if(!this.dimensions)return-1;if(!Array.isArray(this.dimensions))return-1;if(4!==this.dimensions.length)return-1;for(let e=2;e<4;++e)if(this.dimensions[e].size>0)return e;return-1}get isValid(){return!(!this.dimensions||!Array.isArray(this.dimensions)||4!==this.dimensions.length||this.dimensions[0].size<1||this.dimensions[1].size<1||-1===this.zDimension||this.dimensions[this.zDimension].size<1)}get originInLayerSpace3D(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size];return[e[0],t[0],i[0]]}get voxelSizeInLayerSpaceSigned(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size],o=[this.sizeInVoxels[0],this.sizeInVoxels[1],this.sizeInVoxels[2]];for(let e=0;e<3;++e)o[e]<2?o[e]=1:o[e]-=1;return r.isRegular&&!r.isPositiveUp&&(o[2]*=-1),[(e[1]-e[0])/o[0],(t[1]-t[0])/o[1],(i[1]-i[0])/o[2]]}get volumeType(){if(this.isValid){const e=this.dimensions[2].size>0,t=this.dimensions[3].size>0;if(!e&&t)return"xyt";if(e&&t)return"xyzt"}return"xyz"}get sizeInVoxels(){if(!this.isValid)return[0,0,0];const e=this.zDimension;return[this.dimensions[0].size,this.dimensions[1].size,this.dimensions[e].size]}computeVoxelSpaceLocation(e){if(!this.isValid)return[0,0,0];if("xyt"===this.volumeType)return ze.error("computeVoxelSpacePosition cannot be used with XYT volumes."),[0,0,0];if(!(0,xe.fS)(this.spatialReference,e.spatialReference))return ze.error("pos argument should have the same spatial reference as the VoxelLayer."),[0,0,0];const t=(0,y.f)(e.x,e.y,e.z??0);(0,h.b)(t,t,this.originInLayerSpace3D),(0,h.D)(t,t,this.voxelSizeInLayerSpaceSigned);const r=this.dimensions[this.zDimension];if(!r.isRegular&&Array.isArray(r.irregularSpacing?.values)&&r.irregularSpacing.values.length>1){const i=e.z??0,o=r.irregularSpacing.values,n=r.isPositiveUp?1:-1,s=o.reduce(((e,t)=>Math.abs(n*t-i)<Math.abs(n*e-i)?t:e));for(let e=0;e<o.length;++e)if(o[e]===s){t[2]=e;break}}return[t[0],t[1],t[2]]}computeLayerSpaceLocation(e){if(!this.isValid)return new we.Z({x:0,y:0,spatialReference:this.spatialReference});const t=(0,y.d)(e);if((0,h.C)(t,t,this.voxelSizeInLayerSpaceSigned),(0,h.a)(t,t,this.originInLayerSpace3D),"xyt"===this.volumeType)return new we.Z({x:t[0],y:t[1],spatialReference:this.spatialReference});const r=this.dimensions[this.zDimension];return r.isRegular||Array.isArray(r.irregularSpacing?.values)&&(e[2]<0?t[2]=r.irregularSpacing.values[0]:e[2]<r.irregularSpacing.values.length?t[2]=r.irregularSpacing.values[e[2]]:t[2]=r.irregularSpacing.values[r.irregularSpacing.values.length-1],r.isPositiveUp||(t[2]*=-1)),new we.Z({x:t[0],y:t[1],z:t[2],spatialReference:this.spatialReference})}};(0,i._)([(0,p.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Me.prototype,"id",void 0),(0,i._)([(0,p.Cb)({type:[Ne],json:{write:{enabled:!0,isRequired:!0}}})],Me.prototype,"dimensions",void 0),(0,i._)([(0,p.Cb)({type:_e.Z,json:{read:{enabled:!1}}})],Me.prototype,"spatialReference",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{read:!1}})],Me.prototype,"zDimension",null),(0,i._)([(0,p.Cb)({type:[Boolean],json:{read:!1}})],Me.prototype,"isValid",null),(0,i._)([(0,p.Cb)({type:[Number],json:{read:!1}})],Me.prototype,"originInLayerSpace3D",null),(0,i._)([(0,p.Cb)({type:[Number],json:{read:!1}})],Me.prototype,"voxelSizeInLayerSpaceSigned",null),(0,i._)([(0,p.Cb)({type:["xyz","xyzt","xyt"],json:{read:{enabled:!1}}})],Me.prototype,"volumeType",null),(0,i._)([(0,p.Cb)({type:[Number],json:{read:!1}})],Me.prototype,"sizeInVoxels",null),Me=(0,i._)([(0,d.j)(qe)],Me);const Ze=Me;var Te;let Ae=Te=class extends R.wq{constructor(){super(...arguments),this.apronWidth=1,this.brickSize=[32,32,32],this.maxLodLevel=0,this.nodeSize=[4,4,4]}isValid(){const e=new Te;return e.apronWidth===this.apronWidth&&e.maxLodLevel===this.maxLodLevel&&!!this.brickSize&&!!this.nodeSize&&!(!Array.isArray(this.brickSize)||!Array.isArray(this.nodeSize))&&3===this.brickSize.length&&3===this.nodeSize.length&&32===this.brickSize[0]&&32===this.brickSize[1]&&32===this.brickSize[2]&&4===this.nodeSize[0]&&4===this.nodeSize[1]&&4===this.nodeSize[2]}};(0,i._)([(0,p.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Ae.prototype,"apronWidth",void 0),(0,i._)([(0,p.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],Ae.prototype,"brickSize",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Ae.prototype,"maxLodLevel",void 0),(0,i._)([(0,p.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],Ae.prototype,"nodeSize",void 0),Ae=Te=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelVolumeIndex")],Ae);const Fe=Ae;let Pe=class extends((0,I.J)(R.wq)){constructor(e){super(e),this.enabled=!0,this.label="",this.normal=null,this.point=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=D(this.normal);return V.BV.normalize((0,u.q9)(e),0,!0)}set orientation(e){const t=U(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=D(this.normal);return V.BV.normalize((0,u.q9)(t),0,!0)}set tilt(e){const t=U(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i._)([(0,p.Cb)({type:Boolean,json:{default:!0,write:!0}})],Pe.prototype,"enabled",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],Pe.prototype,"label",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,E.p)((e=>V.BV.normalize((0,u.q9)(e),0,!0)))],Pe.prototype,"orientation",null),(0,i._)([(0,p.Cb)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,E.p)((e=>V.BV.normalize((0,u.q9)(e),0,!0)))],Pe.prototype,"tilt",null),(0,i._)([(0,p.Cb)({type:[Number],json:{write:!0}})],Pe.prototype,"normal",void 0),(0,i._)([(0,p.Cb)({type:[Number],json:{write:!0}})],Pe.prototype,"point",void 0),Pe=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelDynamicSection")],Pe);const Le=Pe;var Oe;let De=Oe=class extends R.wq{constructor(e){super(e),this.volumeId=0,this.verticalExaggeration=1,this.exaggerationMode="scale-height",this.verticalOffset=0,this.slices=new(o.Z.ofType(k)),this.dynamicSections=new(o.Z.ofType(Le))}set slices(e){this._set("slices",(0,oe.Z)(e,this._get("slices"),o.Z.ofType(k)))}set dynamicSections(e){this._set("dynamicSections",(0,oe.Z)(e,this._get("dynamicSections"),o.Z.ofType(Le)))}clone(){return new Oe({volumeId:this.volumeId,verticalExaggeration:this.verticalExaggeration,exaggerationMode:this.exaggerationMode,verticalOffset:this.verticalOffset,slices:(0,ee.d9)(this.slices),dynamicSections:(0,ee.d9)(this.dynamicSections)})}};(0,i._)([(0,p.Cb)({type:u.z8,json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"volumeId",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{default:1,write:!0}})],De.prototype,"verticalExaggeration",void 0),(0,i._)([(0,p.Cb)({type:["scale-position","scale-height"],json:{default:"scale-height",write:!0}})],De.prototype,"exaggerationMode",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{default:0,write:!0}})],De.prototype,"verticalOffset",void 0),(0,i._)([(0,p.Cb)({type:o.Z.ofType(k),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.slices&&this.slices.length>0}}}}})],De.prototype,"slices",null),(0,i._)([(0,p.Cb)({type:o.Z.ofType(Le),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.dynamicSections&&this.dynamicSections.length>0}}}}})],De.prototype,"dynamicSections",null),De=Oe=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelVolumeStyle")],De);const Ue=De;var Ee=r(32163);const Be="esri.layers.VoxelLayer",ke=s.Z.getLogger(Be);let $e=class extends((0,_.Vt)((0,b.Y)((0,v.q)((0,S.I)((0,w.M)((0,a.R)((0,g.V)(f.Z)))))))){constructor(e){super(e),this.serviceRoot="",this.operationalLayerType="Voxel",this.legendEnabled=!0,this.title=null,this.sections=null,this.currentVariableId=0,this.volumeStyles=null,this.renderMode="volume",this.variableStyles=null,this.enableSlices=!0,this.enableSections=!0,this.enableDynamicSections=!0,this.enableIsosurfaces=!0,this.shading=new W,this.opacity=1,this.variables=new o.Z,this.volumes=new o.Z,this.index=null,this.minScale=0,this.maxScale=0,this.type="voxel",this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.fullExtent=null,this.popupEnabled=!0,this.popupTemplate=null,this.test=null,this.volumeStyles=new(o.Z.ofType(Ue)),this.variableStyles=new(o.Z.ofType(Se)),this.sections=new(o.Z.ofType(J)),e?.constantUpscaling&&(this.test={constantUpscaling:!0})}set url(e){this._set("url",(0,x.Nm)(e,ke))}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(l.r9).then((()=>this._fetchService(t))).then((()=>this.serviceRoot=this.url));return this.addResolvingPromise(r),Promise.resolve(this)}read(e,t){super.read(e,t);for(const e of this.volumes)e.spatialReference=this.spatialReference}readVersion(e,t){return super.parseVersionString(e)}validateLayer(e){if(e.layerType&&e.layerType!==this.operationalLayerType)throw new n.Z("voxel-layer:layer-type-not-supported","VoxelLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor)||this.version.major<3)throw new n.Z("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"});if(this.version.major>3)throw new n.Z("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"})}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const i=m.Z.fromJSON(e,r);if(0===i.zmin&&0===i.zmax&&Array.isArray(t.volumes)){const e=Ze.fromJSON(t.volumes[0]);if(e.isValid&&"xyt"!==e.volumeType){const t=e.dimensions[2];if(t.isRegular){let e=t.regularSpacing.offset,r=t.regularSpacing.offset+t.regularSpacing.scale*(t.size-1);if(e>r){const t=e;e=r,r=t}i.zmin=e,i.zmax=r}}}return i}return null}get voxelFields(){const e=[new j.Z({name:"Voxel.ServiceValue",alias:"Value",domain:null,editable:!1,length:128,type:"string"}),new j.Z({name:"Voxel.ServiceVariableLabel",alias:"Variable",domain:null,editable:!1,length:128,type:"string"}),new j.Z({name:"Voxel.Position",alias:"Voxel Position",domain:null,editable:!1,length:128,type:"string"})],t=this.getVolume(null);if(null!=t){if("xyzt"===t.volumeType||"xyt"===t.volumeType){const t=new j.Z({name:"Voxel.ServiceLocalTime",alias:"Local Time",domain:null,editable:!1,length:128,type:"string"});e.push(t);const r=new j.Z({name:"Voxel.ServiceNativeTime",alias:"Native Time",domain:null,editable:!1,length:128,type:"string"});e.push(r)}if("xyt"!==t.volumeType){const t=new j.Z({name:"Voxel.ServiceDepth",alias:"Depth",domain:null,editable:!1,length:128,type:"string"});e.push(t)}}return e}get defaultPopupTemplate(){return this.createPopupTemplate()}createPopupTemplate(e){const t=this.voxelFields,r=this.title;return(0,Ee.eZ)({fields:t,title:r},e)}getConfiguration(){const e={layerType:this.operationalLayerType,version:this.version.versionString,name:this.title,spatialReference:this.spatialReference,fullExtent:this.fullExtent,volumes:this.volumes.toJSON(),variables:this.variables.toJSON(),index:this.index?.toJSON(),sections:this.getSections(),style:{volumeStyles:this.getVolumeStyles(),currentVariableId:this.currentVariableId,renderMode:this.renderMode,variableStyles:this.getVariableStyles(),enableSections:this.enableSections,enableDynamicSections:this.enableDynamicSections,enableIsosurfaces:this.enableIsosurfaces,enableSlices:this.enableSlices,shading:this.shading}};return e.index&&this.index?.isValid()?JSON.stringify(e):""}getVariableStyle(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variableStyles||-1===t)return null;const r=this.variableStyles.findIndex((e=>e.variableId===t));return r<0?null:this.variableStyles.getItemAt(r)}getVariable(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variables||-1===t)return null;const r=this.variables.findIndex((e=>e.id===t));return r<0?null:this.variables.getItemAt(r)}getVolume(e){const t=this.getVariable(e);return null!=t?this.volumes.find((({id:e})=>e===t.volumeId)):null}getVolumeStyle(e){const t=this.getVariable(e);return null!=t?this.volumeStyles.find((({volumeId:e})=>e===t.volumeId)):null}getColorForContinuousDataValue(e,t,r){const i=this.getVariable(e);if(null==i||"continuous"!==i.renderingFormat?.continuity)return null;if(!this.variableStyles)return null;const o=this.variableStyles.findIndex((t=>t.variableId===e));if(o<0)return null;const n=this.variableStyles.getItemAt(o);return n.transferFunction?n.transferFunction.getColorForContinuousDataValue(t,r):null}getSections(){const e=[];for(const t of this.sections)e.push(new J({enabled:t.enabled,href:t.href,id:t.id,label:t.label,normal:t.normal,point:t.point,sizeInPixel:t.sizeInPixel,slices:t.slices,timeId:t.timeId,variableId:t.variableId}));return e}getVariableStyles(){const e=[];for(const t of this.variableStyles){const r=this._getVariable(t);if(null!=r){const i=t.clone();i.isosurfaces.length>4&&(i.isosurfaces=i.isosurfaces.slice(0,3),ke.error("A maximum of 4 isosurfaces are supported for Voxel Layers."));for(const e of i.isosurfaces)if(!e.colorLocked){const t=this.getColorForContinuousDataValue(i.variableId,e.value,!1);null===t||t.equals(e.color)||(e.color=t)}if("continuous"===r.renderingFormat.continuity)(null===i.transferFunction||i.transferFunction.colorStops.length<2)&&ke.error(`VoxelVariableStyle for variable ${r.id} is invalid. At least 2 color stops are required in the transferFunction for continuous Voxel Layer variables.`),null!==i.transferFunction&&(Array.isArray(i.transferFunction.stretchRange)&&2===i.transferFunction.stretchRange.length||(ke.error(`VoxelVariableStyle for variable ${r.id} is invalid. The stretchRange of the transferFunction for continuous Voxel Layer variables must be of the form [minimumDataValue, maximumDataValue].`),i.transferFunction.stretchRange=[0,1],i.transferFunction.colorStops.removeAll()));else if("discrete"===r.renderingFormat.continuity)if(0===t.uniqueValues.length)ke.error(`VoxelVariableStyle for variable ${r.id} is invalid. Unique values are required for discrete Voxel Layer variables.`);else for(const e of t.uniqueValues)null!==e.label&&void 0!==e.label||null===e.value||void 0===e.value||(e.label=e.value.toString());e.push(i)}else ke.error(`VoxelVariable ID=${t.variableId} doesn't exist, VoxelVariableStyle for this VoxelVariable will be ignored.`)}return e}getVolumeStyles(){const e=[];for(const t of this.volumeStyles){const r=this._getVolumeFromVolumeId(t.volumeId);if(null!=r){const i=t.clone();for(const e of i.slices)this._isPlaneValid(e,[0,1,r.zDimension],r.dimensions)||(e.enabled=!1,e.label="invalid");for(const e of i.dynamicSections)this._isPlaneValid(e,[0,1,r.zDimension],r.dimensions)||(e.enabled=!1,e.label="invalid");e.push(i)}else ke.error(`VoxelVolume ID=${t.volumeId} doesn't exist, VoxelVolumeStyle for this VoxelVolume will be ignored.`)}return e}_getVariable(e){const t=e.variableId;for(const e of this.variables)if(e.id===t)return e;return null}_getVolumeFromVolumeId(e){for(const t of this.volumes)if(t.id===e)return t;return null}_isPlaneValid(e,t,r){if(!e.point)return!1;if(!Array.isArray(e.point)||3!==e.point.length)return!1;if(!e.normal)return!1;if(!Array.isArray(e.normal)||3!==e.normal.length)return!1;for(let i=0;i<3;++i){const o=e.point[i];if(o<0||o>=r[t[i]].size)return!1}const i=(0,y.f)(e.normal[0],e.normal[1],e.normal[2]);return(0,h.n)(i,i),!(Math.abs(i[0])+Math.abs(i[1])+Math.abs(i[2])<1e-6||(e.normal[0]=i[0],e.normal[1]=i[1],e.normal[2]=i[2],0))}};(0,i._)([(0,p.Cb)({type:["Voxel"]})],$e.prototype,"operationalLayerType",void 0),(0,i._)([(0,p.Cb)(C.rn)],$e.prototype,"legendEnabled",void 0),(0,i._)([(0,p.Cb)({json:{write:!0}})],$e.prototype,"title",void 0),(0,i._)([(0,p.Cb)(C.HQ)],$e.prototype,"url",null),(0,i._)([(0,p.Cb)({type:o.Z.ofType(J),json:{origins:{"web-scene":{name:"layerDefinition.sections",write:!0}}}})],$e.prototype,"sections",void 0),(0,i._)([(0,p.Cb)({type:u.z8,json:{origins:{"web-scene":{name:"layerDefinition.style.currentVariableId",write:{enabled:!0,isRequired:!0,ignoreOrigin:!0}},service:{name:"style.currentVariableId"}}}})],$e.prototype,"currentVariableId",void 0),(0,i._)([(0,p.Cb)({type:o.Z.ofType(Ue),json:{origins:{"web-scene":{name:"layerDefinition.style.volumeStyles",write:!0},service:{name:"style.volumeStyles"}}}})],$e.prototype,"volumeStyles",void 0),(0,i._)([(0,p.Cb)({type:["volume","surfaces"],json:{origins:{"web-scene":{name:"layerDefinition.style.renderMode",write:!0},service:{name:"style.renderMode"}}}})],$e.prototype,"renderMode",void 0),(0,i._)([(0,p.Cb)({type:o.Z.ofType(Se),json:{origins:{"web-scene":{name:"layerDefinition.style.variableStyles",write:!0},service:{name:"style.variableStyles"}}}})],$e.prototype,"variableStyles",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSlices",write:!0},service:{name:"style.enableSlices"}}}})],$e.prototype,"enableSlices",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSections",write:!0},service:{name:"style.enableSections"}}}})],$e.prototype,"enableSections",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableDynamicSections",write:!0},service:{name:"style.enableDynamicSections"}}}})],$e.prototype,"enableDynamicSections",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableIsosurfaces",write:!0},service:{name:"style.enableIsosurfaces"}}}})],$e.prototype,"enableIsosurfaces",void 0),(0,i._)([(0,p.Cb)({type:W,json:{origins:{"web-scene":{name:"layerDefinition.style.shading",write:!0},service:{name:"style.shading"}}}})],$e.prototype,"shading",void 0),(0,i._)([(0,p.Cb)({type:["show","hide"]})],$e.prototype,"listMode",void 0),(0,i._)([(0,p.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0,json:{read:!1,write:!1,origins:{"web-scene":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],$e.prototype,"opacity",void 0),(0,i._)([(0,p.Cb)({type:o.Z.ofType(X)})],$e.prototype,"variables",void 0),(0,i._)([(0,p.Cb)({type:o.Z.ofType(Ze)})],$e.prototype,"volumes",void 0),(0,i._)([(0,p.Cb)({type:Fe})],$e.prototype,"index",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{name:"layerDefinition.minScale",read:!1,write:!1,origins:{service:{read:!1,write:!1}}}})],$e.prototype,"minScale",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{name:"layerDefinition.maxScale",read:!1,write:!1,origins:{service:{read:!1,write:!1}}}})],$e.prototype,"maxScale",void 0),(0,i._)([(0,p.Cb)({json:{read:!1},readOnly:!0})],$e.prototype,"type",void 0),(0,i._)([(0,p.Cb)({readOnly:!0,json:{name:"serviceVersion"}})],$e.prototype,"version",void 0),(0,i._)([(0,c.r)("service","version")],$e.prototype,"readVersion",null),(0,i._)([(0,p.Cb)({type:m.Z})],$e.prototype,"fullExtent",void 0),(0,i._)([(0,c.r)("service","fullExtent",["fullExtent"])],$e.prototype,"readFullExtent",null),(0,i._)([(0,p.Cb)({readOnly:!0,clonable:!1,json:{read:!1}})],$e.prototype,"voxelFields",null),(0,i._)([(0,p.Cb)(C.C_)],$e.prototype,"popupEnabled",void 0),(0,i._)([(0,p.Cb)({readOnly:!0})],$e.prototype,"defaultPopupTemplate",null),$e=(0,i._)([(0,d.j)(Be)],$e);const Ke=$e},54295:(e,t,r)=>{r.d(t,{V:()=>s});var i=r(43697),o=r(5600),n=(r(75215),r(67676),r(80442),r(52011));const s=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,o.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,n.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>l});var i=r(43697),o=r(92604),n=r(5600),s=(r(75215),r(67676),r(80442),r(52011)),a=r(66677);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Nm)(e,o.Z.getLogger(this.declaredClass)))}};return(0,i._)([(0,n.Cb)()],t.prototype,"title",null),(0,i._)([(0,n.Cb)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,s.j)("esri.layers.mixins.ArcGISService")],t),t}},72965:(e,t,r)=>{r.d(t,{M:()=>s});var i=r(43697),o=r(5600),n=(r(75215),r(67676),r(80442),r(52011));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i._)([(0,o.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,i._)([(0,o.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,i._)([(0,o.Cb)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,i._)([(0,n.j)("esri.layers.mixins.ScaleRangeLayer")],t),t}},20559:(e,t,r)=>{r.d(t,{xp:()=>L,Vt:()=>M});var i=r(43697),o=r(3172),n=r(20102),s=r(92604),a=r(95330),l=r(17452),p=r(5600),u=(r(75215),r(67676),r(80442),r(71715)),c=r(52011),d=r(30556),h=r(65845),y=r(6570),m=r(79235),f=r(82971),g=r(66677),b=r(21506),v=r(61064);let S=null;function w(){return S}var _=r(65587),x=r(15235),C=r(66643),j=r(41123),I=r(97873);async function V(e,t,r){if(!t||!t.resources)return;const i=t.portalItem===e.portalItem?new Set(e.paths):new Set;e.paths.length=0,e.portalItem=t.portalItem;const o=new Set(t.resources.toKeep.map((e=>e.resource.path))),s=new Set,l=[];o.forEach((t=>{i.delete(t),e.paths.push(t)}));for(const n of t.resources.toUpdate)if(i.delete(n.resource.path),o.has(n.resource.path)||s.has(n.resource.path)){const{resource:t,content:i,finish:o,error:s}=n,a=(0,I.getSiblingOfSameTypeI)(t,(0,j.D)());e.paths.push(a.path),l.push(R({resource:a,content:i,compress:n.compress,finish:o,error:s},r))}else e.paths.push(n.resource.path),l.push(N(n,r)),s.add(n.resource.path);for(const i of t.resources.toAdd)l.push(R(i,r)),e.paths.push(i.resource.path);if(i.forEach((e=>{if(t.portalItem){const r=t.portalItem.resourceFromPath(e);l.push(r.portalItem.removeResource(r).catch((()=>{})))}})),0===l.length)return;const p=await(0,a.as)(l);(0,a.k_)(r);const u=p.filter((e=>"error"in e)).map((e=>e.error));if(u.length>0)throw new n.Z("save:resources","Failed to save one or more resources",{errors:u})}async function R(e,t){const r={...null!=t?t:{},compress:e.compress},i=await(0,C.q6)(e.resource.portalItem.addResource(e.resource,e.content,r));if(!0!==i.ok)throw e.error?.(i.error),i.error;e.finish?.(e.resource)}async function N(e,t){const r=await(0,C.q6)(e.resource.update(e.content,t));if(!0!==r.ok)throw e.error?.(r.error),r.error;e.finish?.(e.resource)}const q="esri.layers.mixins.SceneService",z=s.Z.getLogger(q),M=e=>{let t=class extends e{constructor(){super(...arguments),this.spatialReference=null,this.fullExtent=null,this.heightModelInfo=null,this.minScale=0,this.maxScale=0,this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.copyright=null,this.sublayerTitleMode="item-title",this.title=null,this.layerId=null,this.indexInfo=null,this._debouncedSaveOperations=(0,a.Ds)((async(e,t,r)=>{switch(e){case L.SAVE:return this._save(t);case L.SAVE_AS:return this._saveAs(r,t)}}))}readSpatialReference(e,t){return this._readSpatialReference(t)}_readSpatialReference(e){if(null!=e.spatialReference)return f.Z.fromJSON(e.spatialReference);{const t=e.store,r=t.indexCRS||t.geographicCRS,i=r&&parseInt(r.substring(r.lastIndexOf("/")+1,r.length),10);return null!=i?new f.Z(i):null}}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const i=null==e.spatialReference?{...e,spatialReference:this._readSpatialReference(t)}:e;return y.Z.fromJSON(i,r)}const i=t.store,o=this._readSpatialReference(t);return null==o||null==i||null==i.extent||!Array.isArray(i.extent)||i.extent.some((e=>e<Z))?null:new y.Z({xmin:i.extent[0],ymin:i.extent[1],xmax:i.extent[2],ymax:i.extent[3],spatialReference:o})}parseVersionString(e){const t={major:Number.NaN,minor:Number.NaN,versionString:e},r=e.split(".");return r.length>=2&&(t.major=parseInt(r[0],10),t.minor=parseInt(r[1],10)),t}readVersion(e,t){const r=t.store,i=null!=r.version?r.version.toString():"";return this.parseVersionString(i)}readTitlePortalItem(e){return"item-title"!==this.sublayerTitleMode?void 0:e}readTitleService(e,t){const r=this.portalItem&&this.portalItem.title;if("item-title"===this.sublayerTitleMode)return(0,g.a7)(this.url,t.name);let i=t.name;if(!i&&this.url){const e=(0,g.Qc)(this.url);null!=e&&(i=e.title)}return"item-title-and-service-name"===this.sublayerTitleMode&&r&&(i=r+" - "+i),(0,g.ld)(i)}set url(e){const t=(0,g.XG)({layer:this,url:e,nonStandardUrlAllowed:!1,logger:z});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,r,i){(0,g.wH)(this,e,"layers",t,i)}get parsedUrl(){const e=this._get("url"),t=(0,l.mN)(e);return null!=this.layerId&&(t.path=`${t.path}/layers/${this.layerId}`),t}async _fetchIndexAndUpdateExtent(e,t){this.indexInfo=(0,v.T)(this.parsedUrl.path,this.rootNode,e,this.apiKey,z,t),null==this.fullExtent||this.fullExtent.hasZ||this._updateExtent(await this.indexInfo)}_updateExtent(e){if("page"===e?.type){const t=e.rootIndex%e.pageSize,r=e.rootPage?.nodes?.[t];if(null==r||null==r.obb||null==r.obb.center||null==r.obb.halfSize)throw new n.Z("sceneservice:invalid-node-page","Invalid node page.");if(r.obb.center[0]<Z||null==this.fullExtent||this.fullExtent.hasZ)return;const i=r.obb.halfSize,o=r.obb.center[2],s=Math.sqrt(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]);this.fullExtent.zmin=o-s,this.fullExtent.zmax=o+s}else if("node"===e?.type){const t=e.rootNode?.mbs;if(!Array.isArray(t)||4!==t.length||t[0]<Z)return;const r=t[2],i=t[3],{fullExtent:o}=this;o&&(o.zmin=r-i,o.zmax=r+i)}}async _fetchService(e){if(null==this.url)throw new n.Z("sceneservice:url-not-set","Scene service can not be loaded without valid portal item or url");if(null==this.layerId&&/SceneServer\/*$/i.test(this.url)){const t=await this._fetchFirstLayerId(e);null!=t&&(this.layerId=t)}return this._fetchServiceLayer(e)}async _fetchFirstLayerId(e){const t=await(0,o.default)(this.url,{query:{f:"json",token:this.apiKey},responseType:"json",signal:e});if(t.data&&Array.isArray(t.data.layers)&&t.data.layers.length>0)return t.data.layers[0].id}async _fetchServiceLayer(e){const t=await(0,o.default)(this.parsedUrl?.path??"",{query:{f:"json",token:this.apiKey},responseType:"json",signal:e});t.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));let r=!1;if(t.data.layerType&&"Voxel"===t.data.layerType&&(r=!0),r)return this._fetchVoxelServiceLayer();const i=t.data;this.read(i,this._getServiceContext()),this.validateLayer(i)}async _fetchVoxelServiceLayer(e){const t=(await(0,o.default)(this.parsedUrl?.path+"/layer",{query:{f:"json",token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,this._getServiceContext()),this.validateLayer(t)}_getServiceContext(){return{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}}async _ensureLoadBeforeSave(){await this.load(),"beforeSave"in this&&"function"==typeof this.beforeSave&&await this.beforeSave()}validateLayer(e){}_updateTypeKeywords(e,t,r){e.typeKeywords||(e.typeKeywords=[]);const i=t.getTypeKeywords();for(const t of i)e.typeKeywords.push(t);e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)),r===T.newItem&&(e.typeKeywords=e.typeKeywords.filter((e=>"Hosted Service"!==e))))}async _saveAs(e,t){const r={...P,...t};let i=x.default.from(e);i||(z.error("_saveAs(): requires a portal item parameter"),await Promise.reject(new n.Z("sceneservice:portal-item-required","_saveAs() requires a portal item to save to"))),i.id&&(i=i.clone(),i.id=null);const o=i.portal||_.Z.getDefault();await this._ensureLoadBeforeSave(),i.type=F,i.portal=o;const s={origin:"portal-item",url:null,messages:[],portal:o,portalItem:i,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}},a={layers:[this.write({},s)]};return await Promise.all(s.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(a,s,r),i.url=this.url,i.title||(i.title=this.title),this._updateTypeKeywords(i,r,T.newItem),await o.signIn(),await(o.user?.addItem({item:i,folder:r&&r.folder,data:a})),await V(this.resourceReferences,s,null),this.portalItem=i,(0,h.D)(s),s.portalItem=i,i}async _save(e){const t={...P,...e};if(!this.portalItem)throw z.error("_save(): requires the .portalItem property to be set"),new n.Z("sceneservice:portal-item-not-set","Portal item to save to has not been set on this SceneService");if(this.portalItem.type!==F)throw z.error("_save(): Non-matching portal item type. Got "+this.portalItem.type+", expected "+F),new n.Z("sceneservice:portal-item-wrong-type",`Portal item needs to have type "${F}"`);await this._ensureLoadBeforeSave();const r={origin:"portal-item",url:this.portalItem.itemUrl&&(0,l.mN)(this.portalItem.itemUrl),messages:[],portal:this.portalItem.portal||_.Z.getDefault(),portalItem:this.portalItem,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}},i={layers:[this.write({},r)]};return await Promise.all(r.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(i,r,t),this.portalItem.url=this.url,this.portalItem.title||(this.portalItem.title=this.title),this._updateTypeKeywords(this.portalItem,t,T.existingItem),await this.portalItem.update({data:i}),await V(this.resourceReferences,r,null),(0,h.D)(r),this.portalItem}async _validateAgainstJSONSchema(e,t,r){let i=t.messages?.filter((e=>"error"===e.type)).map((e=>new n.Z(e.name,e.message,e.details)))??[];r?.validationOptions?.ignoreUnsupported&&(i=i.filter((e=>"layer:unsupported"!==e.name&&"symbol:unsupported"!==e.name&&"symbol-layer:unsupported"!==e.name&&"property:unsupported"!==e.name&&"url:unsupported"!==e.name&&"scenemodification:unsupported"!==e.name)));const o=r?.validationOptions,s=o?.enabled,a=w();if(s&&a){const t=(await a()).validate(e,r.portalItemLayerType);if(t.length>0){const e=`Layer item did not validate:\n${t.join("\n")}`;if(z.error(`_validateAgainstJSONSchema(): ${e}`),"throw"===o.failPolicy){const e=t.map((e=>new n.Z("sceneservice:schema-validation",e))).concat(i);throw new n.Z("sceneservice-validate:error","Failed to save layer item due to schema validation, see `details.errors`.",{combined:e})}}}if(i.length>0)throw new n.Z("sceneservice:save","Failed to save SceneService due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:i})}};return(0,i._)([(0,p.Cb)(b.id)],t.prototype,"id",void 0),(0,i._)([(0,p.Cb)({type:f.Z})],t.prototype,"spatialReference",void 0),(0,i._)([(0,u.r)("spatialReference",["spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readSpatialReference",null),(0,i._)([(0,p.Cb)({type:y.Z})],t.prototype,"fullExtent",void 0),(0,i._)([(0,u.r)("fullExtent",["fullExtent","store.extent","spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readFullExtent",null),(0,i._)([(0,p.Cb)({readOnly:!0,type:m.Z})],t.prototype,"heightModelInfo",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:{source:"minScale"},write:!1}}}})],t.prototype,"minScale",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:{source:"maxScale"},write:!1}}}})],t.prototype,"maxScale",void 0),(0,i._)([(0,p.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,i._)([(0,u.r)("version",["store.version"])],t.prototype,"readVersion",null),(0,i._)([(0,p.Cb)({type:String,json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,p.Cb)({type:String,json:{read:!1}})],t.prototype,"sublayerTitleMode",void 0),(0,i._)([(0,p.Cb)({type:String})],t.prototype,"title",void 0),(0,i._)([(0,u.r)("portal-item","title")],t.prototype,"readTitlePortalItem",null),(0,i._)([(0,u.r)("service","title",["name"])],t.prototype,"readTitleService",null),(0,i._)([(0,p.Cb)({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{write:{target:"id",isRequired:!0,ignoreOrigin:!0},read:!1}}}})],t.prototype,"layerId",void 0),(0,i._)([(0,p.Cb)(b.HQ)],t.prototype,"url",null),(0,i._)([(0,d.c)("url")],t.prototype,"writeUrl",null),(0,i._)([(0,p.Cb)()],t.prototype,"parsedUrl",null),(0,i._)([(0,p.Cb)({readOnly:!0})],t.prototype,"store",void 0),(0,i._)([(0,p.Cb)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],t.prototype,"rootNode",void 0),t=(0,i._)([(0,c.j)(q)],t),t},Z=-1e38;var T,A;(A=T||(T={}))[A.existingItem=0]="existingItem",A[A.newItem=1]="newItem";const F="Scene Service",P={getTypeKeywords:()=>[],portalItemLayerType:"unknown",validationOptions:{enabled:!0,ignoreUnsupported:!1,failPolicy:"throw"}};var L;!function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(L||(L={}))},61064:(e,t,r)=>{r.d(t,{T:()=>n});var i=r(3172),o=r(20102);async function n(e,t,r,n,s,a){let l=null;if(null!=r){const t=`${e}/nodepages/`,o=t+Math.floor(r.rootIndex/r.nodesPerPage);try{return{type:"page",rootPage:(await(0,i.default)(o,{query:{f:"json",token:n},responseType:"json",signal:a})).data,rootIndex:r.rootIndex,pageSize:r.nodesPerPage,lodMetric:r.lodSelectionMetricType,urlPrefix:t}}catch(e){null!=s&&s.warn("#fetchIndexInfo()","Failed to load root node page. Falling back to node documents.",o,e),l=e}}if(!t)return null;const p=`${e}/nodes/`,u=p+(t&&t.split("/").pop());try{return{type:"node",rootNode:(await(0,i.default)(u,{query:{f:"json",token:n},responseType:"json",signal:a})).data,urlPrefix:p}}catch(e){throw new o.Z("sceneservice:root-node-missing","Root node missing.",{pageError:l,nodeError:e,url:u})}}},66094:(e,t,r)=>{r.d(t,{B:()=>o});var i=r(17452);function o(e){return n[function(e){return e instanceof Blob?e.type:function(e){const t=(0,i.Ml)(e);return l[t]||s}(e.url)}(e)]||a}const n={},s="text/plain",a=n[s],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in l)n[l[e]]=e},97873:(e,t,r)=>{r.r(t),r.d(t,{addOrUpdateResource:()=>l,contentToBlob:()=>h,fetchResources:()=>a,getSiblingOfSameType:()=>y,getSiblingOfSameTypeI:()=>m,removeAllResources:()=>u,removeResource:()=>p,splitPrefixFileNameAndExtension:()=>d});var i=r(3172),o=r(20102),n=r(70586),s=r(17452);async function a(e,t={},r){await e.load(r);const i=(0,s.v_)(e.itemUrl,"resources"),{start:o=1,num:a=10,sortOrder:l="asc",sortField:p="created"}=t,u={query:{start:o,num:a,sortOrder:l,sortField:p,token:e.apiKey},signal:(0,n.U2)(r,"signal")},c=await e.portal.request(i,u);return{total:c.total,nextStart:c.nextStart,resources:c.resources.map((({created:t,size:r,resource:i})=>({created:new Date(t),size:r,resource:e.resourceFromPath(i)})))}}async function l(e,t,r,i){if(!e.hasPath())throw new o.Z(`portal-item-resource-${t}:invalid-path`,"Resource does not have a valid path");const a=e.portalItem;await a.load(i);const l=(0,s.v_)(a.userItemUrl,"add"===t?"addResources":"updateResources"),[p,u]=c(e.path),d=await h(r),y=new FormData;return p&&"."!==p&&y.append("resourcesPrefix",p),null!=i&&i.compress&&y.append("compress","true"),y.append("fileName",u),y.append("file",d,u),y.append("f","json"),null!=i&&i.access&&y.append("access",i.access),await a.portal.request(l,{method:"post",body:y,signal:(0,n.U2)(i,"signal")}),e}async function p(e,t,r){if(!t.hasPath())throw new o.Z("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await e.load(r);const i=(0,s.v_)(e.userItemUrl,"removeResources");await e.portal.request(i,{method:"post",query:{resource:t.path},signal:(0,n.U2)(r,"signal")}),t.portalItem=null}async function u(e,t){await e.load(t);const r=(0,s.v_)(e.userItemUrl,"removeResources");return e.portal.request(r,{method:"post",query:{deleteAll:!0},signal:(0,n.U2)(t,"signal")})}function c(e){const t=e.lastIndexOf("/");return-1===t?[".",e]:[e.slice(0,t),e.slice(t+1)]}function d(e){const[t,r]=function(e){const t=(0,s.Ml)(e);return null==t?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[i,o]=c(t);return[i,o,r]}async function h(e){return e instanceof Blob?e:(await(0,i.default)(e.url,{responseType:"blob"})).data}function y(e,t){if(!e.hasPath())return null;const[r,,i]=d(e.path);return e.portalItem.resourceFromPath((0,s.v_)(r,t+i))}function m(e,t){if(!e.hasPath())return null;const[r,,i]=d(e.path);return e.portalItem.resourceFromPath((0,s.v_)(r,t+i))}},32163:(e,t,r)=>{r.d(t,{eZ:()=>c});var i=r(51773),o=r(35671),n=r(84649),s=(r(63801),r(48074),r(38745),r(9190)),a=(r(10214),r(71423),r(44951),r(422)),l=r(63061);const p=["oid","global-id"],u=["oid","global-id","guid"];function c({displayField:e,editFieldsInfo:t,fields:r,objectIdField:l,title:p},u){if(!r)return null;const c=function({editFieldsInfo:e,fields:t,objectIdField:r},i){return function(e,t){const r=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===r&&(e=e.slice()),e.sort(y),e}(t??[],i?.ignoreFieldTypes||v).map((t=>new a.Z({fieldName:t.name,isEditable:f(t,e),label:t.alias,format:g(t),visible:h(t,{editFieldsInfo:e,objectIdField:r,visibleFieldNames:i?.visibleFieldNames})})))}({editFieldsInfo:t,fields:r,objectIdField:l},u);if(!c.length)return null;const d=function(e){const t=(0,o.O5)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:p,fields:r,displayField:e}),m=[new s.Z,new n.Z];return new i.Z({title:d,content:m,fieldInfos:c})}const d=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/shape/i,/perimeter/i,/objectid/i,/_i$/i],h=(e,{editFieldsInfo:t,objectIdField:r,visibleFieldNames:i})=>i?i.has(e.name):!(m(e.name,t)||r&&e.name===r||p.includes(e.type)||d.some((t=>t.test(e.name))));function y(e,t){return"oid"===e.type?-1:"oid"===t.type?1:b(e)?-1:b(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function m(e,t){if(!e||!t)return!1;const{creationDateField:r,creatorField:i,editDateField:o,editorField:n}=t;return[r&&r.toLowerCase(),i&&i.toLowerCase(),o&&o.toLowerCase(),n&&n.toLowerCase()].includes(e.toLowerCase())}function f(e,t){return e.editable&&!u.includes(e.type)&&!m(e.name,t)}function g(e){switch(e.type){case"small-integer":case"integer":case"single":return new l.Z({digitSeparator:!0,places:0});case"double":return new l.Z({digitSeparator:!0,places:2});case"date":return new l.Z({dateFormat:"long-month-day-year"});default:return"string"===e.type&&(0,o.Ec)(e.name)?new l.Z({digitSeparator:!0,places:0}):null}}function b(e){return"name"===(e.name&&e.name.toLowerCase())||"name"===(e.alias&&e.alias.toLowerCase())}const v=["geometry","blob","raster","guid","xml"]}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8865,7873],{46521:(e,t,r)=>{function i(){return[1,0,0,0,1,0,0,0,1]}function o(e,t,r,i,o,n,s,a,l){return[e,t,r,i,o,n,s,a,l]}function n(e,t){return new Float64Array(e,t,9)}r.d(t,{a:()=>n,c:()=>i,f:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:i,createView:n,fromValues:o},Symbol.toStringTag,{value:"Module"}))},51305:(e,t,r)=>{r.d(t,{c:()=>h,g:()=>u,j:()=>R,k:()=>m,m:()=>c,s:()=>p});var i=r(46521),o=r(94961),n=r(65617),s=r(46851),a=r(17896),l=r(98766);function p(e,t,r){r*=.5;const i=Math.sin(r);return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=Math.cos(r),e}function u(e,t){const r=2*Math.acos(t[3]),i=Math.sin(r/2);return i>(0,s.g)()?(e[0]=t[0]/i,e[1]=t[1]/i,e[2]=t[2]/i):(e[0]=1,e[1]=0,e[2]=0),r}function c(e,t,r){const i=t[0],o=t[1],n=t[2],s=t[3],a=r[0],l=r[1],p=r[2],u=r[3];return e[0]=i*u+s*a+o*p-n*l,e[1]=o*u+s*l+n*a-i*p,e[2]=n*u+s*p+i*l-o*a,e[3]=s*u-i*a-o*l-n*p,e}function d(e,t,r,i){const o=t[0],n=t[1],a=t[2],l=t[3];let p,u,c,d,h,y=r[0],m=r[1],f=r[2],g=r[3];return u=o*y+n*m+a*f+l*g,u<0&&(u=-u,y=-y,m=-m,f=-f,g=-g),1-u>(0,s.g)()?(p=Math.acos(u),c=Math.sin(p),d=Math.sin((1-i)*p)/c,h=Math.sin(i*p)/c):(d=1-i,h=i),e[0]=d*o+h*y,e[1]=d*n+h*m,e[2]=d*a+h*f,e[3]=d*l+h*g,e}function h(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function y(e,t){const r=t[0]+t[4]+t[8];let i;if(r>0)i=Math.sqrt(r+1),e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i;else{let r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);const o=(r+1)%3,n=(r+2)%3;i=Math.sqrt(t[3*r+r]-t[3*o+o]-t[3*n+n]+1),e[r]=.5*i,i=.5/i,e[3]=(t[3*o+n]-t[3*n+o])*i,e[o]=(t[3*o+r]+t[3*r+o])*i,e[n]=(t[3*n+r]+t[3*r+n])*i}return e}function m(e,t,r,i){const o=.5*Math.PI/180;t*=o,r*=o,i*=o;const n=Math.sin(t),s=Math.cos(t),a=Math.sin(r),l=Math.cos(r),p=Math.sin(i),u=Math.cos(i);return e[0]=n*l*u-s*a*p,e[1]=s*a*u+n*l*p,e[2]=s*l*p-n*a*u,e[3]=s*l*u+n*a*p,e}const f=l.c,g=l.s,b=l.a,v=c,S=l.b,w=l.d,_=l.l,x=l.e,C=x,j=l.f,I=j,V=l.n,R=l.g,N=l.h,q=(0,n.c)(),z=(0,n.f)(1,0,0),M=(0,n.f)(0,1,0),Z=(0,o.a)(),T=(0,o.a)(),A=(0,i.c)();Object.freeze(Object.defineProperty({__proto__:null,add:b,calculateW:function(e,t){const r=t[0],i=t[1],o=t[2];return e[0]=r,e[1]=i,e[2]=o,e[3]=Math.sqrt(Math.abs(1-r*r-i*i-o*o)),e},conjugate:h,copy:f,dot:w,equals:N,exactEquals:R,fromEuler:m,fromMat3:y,getAxisAngle:u,identity:function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},invert:function(e,t){const r=t[0],i=t[1],o=t[2],n=t[3],s=r*r+i*i+o*o+n*n,a=s?1/s:0;return e[0]=-r*a,e[1]=-i*a,e[2]=-o*a,e[3]=n*a,e},len:C,length:x,lerp:_,mul:v,multiply:c,normalize:V,random:function(e){const t=s.R,r=t(),i=t(),o=t(),n=Math.sqrt(1-r),a=Math.sqrt(r);return e[0]=n*Math.sin(2*Math.PI*i),e[1]=n*Math.cos(2*Math.PI*i),e[2]=a*Math.sin(2*Math.PI*o),e[3]=a*Math.cos(2*Math.PI*o),e},rotateX:function(e,t,r){r*=.5;const i=t[0],o=t[1],n=t[2],s=t[3],a=Math.sin(r),l=Math.cos(r);return e[0]=i*l+s*a,e[1]=o*l+n*a,e[2]=n*l-o*a,e[3]=s*l-i*a,e},rotateY:function(e,t,r){r*=.5;const i=t[0],o=t[1],n=t[2],s=t[3],a=Math.sin(r),l=Math.cos(r);return e[0]=i*l-n*a,e[1]=o*l+s*a,e[2]=n*l+i*a,e[3]=s*l-o*a,e},rotateZ:function(e,t,r){r*=.5;const i=t[0],o=t[1],n=t[2],s=t[3],a=Math.sin(r),l=Math.cos(r);return e[0]=i*l+o*a,e[1]=o*l-i*a,e[2]=n*l+s*a,e[3]=s*l-n*a,e},rotationTo:function(e,t,r){const i=(0,a.e)(t,r);return i<-.999999?((0,a.f)(q,z,t),(0,a.u)(q)<1e-6&&(0,a.f)(q,M,t),(0,a.n)(q,q),p(e,q,Math.PI),e):i>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):((0,a.f)(q,t,r),e[0]=q[0],e[1]=q[1],e[2]=q[2],e[3]=1+i,V(e,e))},scale:S,set:g,setAxes:function(e,t,r,i){const o=A;return o[0]=r[0],o[3]=r[1],o[6]=r[2],o[1]=i[0],o[4]=i[1],o[7]=i[2],o[2]=-t[0],o[5]=-t[1],o[8]=-t[2],V(e,y(e,o))},setAxisAngle:p,slerp:d,sqlerp:function(e,t,r,i,o,n){return d(Z,t,o,n),d(T,r,i,n),d(e,Z,T,2*n*(1-n)),e},sqrLen:I,squaredLength:j,str:function(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}},Symbol.toStringTag,{value:"Module"}))},94961:(e,t,r)=>{function i(){return[0,0,0,1]}function o(e){return[e[0],e[1],e[2],e[3]]}function n(e,t){return new Float64Array(e,t,4)}r.d(t,{I:()=>s,a:()=>i,b:()=>o,c:()=>n});const s=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:o,create:i,createView:n,fromValues:function(e,t,r,i){return[e,t,r,i]}},Symbol.toStringTag,{value:"Module"}))},28576:(e,t,r)=>{r.d(t,{B:()=>c});var i=r(81153),o=r(17452),n=r(41123),s=r(7628),a=r(31263),l=r(5600),p=r(66094),u=r(25929);function c(e){const t=e?.origins??[void 0];return(r,n)=>{const c=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const n=(0,s.Oe)(t,r);return{type:String,read:(e,t,r)=>{const i=(0,u.r)(e,t,r);return n.type===String?i:"function"==typeof n.type?new n.type({url:i}):void 0},write:{writer(t,s,l,c){if(!c||!c.resources)return"string"==typeof t?void(s[l]=(0,u.t)(t,c)):void(s[l]=t.write({},c));const m=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),f=(0,u.t)(m,{...c,verifyItemRelativeUrls:c&&c.verifyItemRelativeUrls?{writtenUrls:c.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},u.M.NO),g=n.type!==String&&(!(0,i.l)(this)||c&&c.origin&&this.originIdOf(r)>(0,a.M9)(c.origin)),b={object:this,propertyName:r,value:t,targetUrl:f,dest:s,targetPropertyName:l,context:c,params:e};c&&c.portalItem&&f&&!(0,o.YP)(f)?g?function(e){const{context:t,targetUrl:r,params:i,value:n,dest:s,targetPropertyName:a}=e;if(!t.portalItem)return;const l=t.portalItem.resourceFromPath(r),u=y(n,r,t),c=(0,p.B)(u),m=(0,o.Ml)(l.path),f=i?.compress??!1;c===m?(t.resources&&h({...e,resource:l,content:u,compress:f,updates:t.resources.toUpdate}),s[a]=r):d(e)}(b):function({context:e,targetUrl:t,dest:r,targetPropertyName:i}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),r[i]=t)}(b):c&&c.portalItem&&(null==f||null!=(0,u.i)(f)||(0,o.jc)(f)||g)?d(b):s[l]=f}}}}(e,t,r);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=u.a;return{read:e,write:t}}}}(e,r,n);for(const e of t){const t=(0,l.CJ)(r,e,n);for(const e in c)t[e]=c[e]}}}function d(e){const{targetUrl:t,params:i,value:s,context:a,dest:l,targetPropertyName:c}=e;if(!a.portalItem)return;const d=(0,u.p)(t),m=d?.filename??(0,n.D)(),f=i?.prefix??d?.prefix,g=y(s,t,a),b=(0,o.v_)(f,m),v=`${b}.${(0,p.B)(g)}`,S=a.portalItem.resourceFromPath(v);(0,o.jc)(t)&&a.resources&&a.resources.pendingOperations.push(async function(e){const t=(await Promise.resolve().then(r.bind(r,3172))).default,{data:i}=await t(e,{responseType:"blob"});return i}(t).then((e=>{S.path=`${b}.${(0,p.B)(e)}`,l[c]=S.itemRelativeUrl})).catch((()=>{})));const w=i?.compress??!1;a.resources&&h({...e,resource:S,content:g,compress:w,updates:a.resources.toAdd}),l[c]=S.itemRelativeUrl}function h({object:e,propertyName:t,updates:r,resource:i,content:o,compress:n}){r.push({resource:i,content:o,compress:n,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function y(e,t,r){return"string"==typeof e?{url:t}:new Blob([JSON.stringify(e.toJSON(r))],{type:"application/json"})}},65845:(e,t,r)=>{r.d(t,{D:()=>o});var i=r(81153);function o(e){e&&e.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,i.l)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},81153:(e,t,r)=>{function i(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{l:()=>i})},41123:(e,t,r)=>{r.d(t,{D:()=>o});const i="randomUUID"in crypto;function o(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}},79235:(e,t,r)=>{r.d(t,{Z:()=>v});var i,o=r(43697),n=r(67676),s=r(35454),a=r(96674),l=r(67900),p=r(20941),u=r(5600),c=(r(75215),r(80442),r(71715)),d=r(52011),h=r(30556);const y=(0,s.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),m=y.jsonValues.slice();(0,n.e$)(m,"orthometric");const f=(0,s.w)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let g=i=class extends a.wq{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return y.write(e,t,r)}readHeightModel(e,t,r){return y.read(e)||(r&&r.messages&&r.messages.push(function(e,t){return new p.Z("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return f.read(e)||(r&&r.messages&&r.messages.push(b(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.$C)(e)||f.read(e)||(r&&r.messages&&r.messages.push(b(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l.cM)(t);return new i({heightModel:e.heightModel,heightUnit:r,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function b(e,t){return new p.Z("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,o._)([(0,u.Cb)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m,default:"ellipsoidal"}}}})],g.prototype,"heightModel",void 0),(0,o._)([(0,h.c)("web-scene","heightModel")],g.prototype,"writeHeightModel",null),(0,o._)([(0,c.r)(["web-scene","service"],"heightModel")],g.prototype,"readHeightModel",null),(0,o._)([(0,u.Cb)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f.jsonValues,write:f.write}}}})],g.prototype,"heightUnit",void 0),(0,o._)([(0,c.r)("web-scene","heightUnit")],g.prototype,"readHeightUnit",null),(0,o._)([(0,c.r)("service","heightUnit")],g.prototype,"readHeightUnitService",null),(0,o._)([(0,u.Cb)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],g.prototype,"vertCRS",void 0),(0,o._)([(0,c.r)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],g.prototype,"readVertCRS",null),g=i=(0,o._)([(0,d.j)("esri.geometry.HeightModelInfo")],g);const v=g},28865:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Ke});var i=r(43697),o=r(46791),n=r(20102),s=r(92604),a=r(16453),l=r(95330),p=r(5600),u=r(75215),c=(r(67676),r(80442),r(71715)),d=r(52011),h=r(17896),y=r(65617),m=r(6570),f=r(87085),g=r(54295),b=r(17287),v=r(38009),S=r(16859),w=r(72965),_=r(20559),x=r(66677),C=r(21506),j=r(1231),I=r(2368),V=r(68251),R=r(96674),N=r(28576),q=r(51305),z=r(94961),M=r(46851);const Z=(0,y.c)(),T=(0,z.a)(),A=(0,z.a)(),F=(0,z.a)(),P=(0,y.f)(0,0,1),L=(0,y.f)(0,1,0),O=(0,y.f)(1,0,0);function D(e){(0,h.c)(Z,e),(0,h.n)(Z,Z);const t=Math.atan2(Z[1],Z[0]),r=(0,q.s)((0,z.a)(),P,-t);(0,h.q)(Z,Z,r);const i=-1*Math.atan2(Z[2],Z[0]);return[(0,M.a)(t)+270,(0,M.a)(i)+90]}function U(e,t){return(0,q.s)(A,P,(0,M.t)(e-270)),(0,q.s)(F,L,(0,M.t)(t-90)),(0,q.m)(T,A,F),(0,h.c)(Z,O),(0,h.q)(Z,Z,T),(0,h.n)(Z,Z),[Z[0],Z[1],Z[2]]}var E=r(90578);let B=class extends((0,I.J)(R.wq)){constructor(e){super(e),this.enabled=!0,this.label="",this.normal=null,this.point=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=D(this.normal);return V.BV.normalize((0,u.q9)(e),0,!0)}set orientation(e){const t=U(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=D(this.normal);return V.BV.normalize((0,u.q9)(t),0,!0)}set tilt(e){const t=U(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],B.prototype,"enabled",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],B.prototype,"label",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,E.p)((e=>V.BV.normalize((0,u.q9)(e),0,!0)))],B.prototype,"orientation",null),(0,i._)([(0,p.Cb)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,E.p)((e=>V.BV.normalize((0,u.q9)(e),0,!0)))],B.prototype,"tilt",null),(0,i._)([(0,p.Cb)({type:[Number],json:{write:!0}})],B.prototype,"normal",void 0),(0,i._)([(0,p.Cb)({type:[Number],json:{write:!0}})],B.prototype,"point",void 0),B=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelSlice")],B);const k=B;var $=r(25929);let K=class extends((0,I.J)(R.wq)){constructor(){super(...arguments),this.enabled=!0,this.href=null,this.id=null,this.label="",this.normal=null,this.point=null,this.sizeInPixel=null,this.slices=null,this.timeId=0,this.variableId=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=D(this.normal);return V.BV.normalize((0,u.q9)(e),0,!0)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=D(this.normal);return V.BV.normalize((0,u.q9)(t),0,!0)}};(0,i._)([(0,p.Cb)({type:Boolean,json:{default:!0,write:!0}})],K.prototype,"enabled",void 0),(0,i._)([(0,p.Cb)({type:String,json:{origins:{service:{read:$.r}},write:{enabled:!0,isRequired:!0}}}),(0,N.B)({origins:["web-scene"],type:"resource",prefix:"sections",compress:!0})],K.prototype,"href",void 0),(0,i._)([(0,p.Cb)({type:u.z8,json:{write:{enabled:!0,isRequired:!0}}})],K.prototype,"id",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],K.prototype,"label",void 0),(0,i._)([(0,p.Cb)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],K.prototype,"orientation",null),(0,i._)([(0,p.Cb)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],K.prototype,"tilt",null),(0,i._)([(0,p.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],K.prototype,"normal",void 0),(0,i._)([(0,p.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],K.prototype,"point",void 0),(0,i._)([(0,p.Cb)({type:[u.z8],json:{write:{enabled:!0,isRequired:!0}}})],K.prototype,"sizeInPixel",void 0),(0,i._)([(0,p.Cb)({type:[k],json:{write:!0}})],K.prototype,"slices",void 0),(0,i._)([(0,p.Cb)({type:u.z8,json:{default:0,write:!0}})],K.prototype,"timeId",void 0),(0,i._)([(0,p.Cb)({type:u.z8,json:{write:{enabled:!0,isRequired:!0}}})],K.prototype,"variableId",void 0),K=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelSection")],K);const J=K;let H=class extends R.wq{constructor(){super(...arguments),this.diffuseFactor=.5,this.specularFactor=.5}};(0,i._)([(0,p.Cb)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],H.prototype,"diffuseFactor",void 0),(0,i._)([(0,p.Cb)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],H.prototype,"specularFactor",void 0),H=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelSimpleShading")],H);const W=H;let Y=class extends R.wq{constructor(){super(...arguments),this.continuity=null,this.hasNoData=!1,this.noData=0,this.offset=0,this.scale=1,this.type=null}};(0,i._)([(0,p.Cb)({type:["discrete","continuous"],json:{write:!0}})],Y.prototype,"continuity",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],Y.prototype,"hasNoData",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:!0}})],Y.prototype,"noData",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:!0}})],Y.prototype,"offset",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:!0}})],Y.prototype,"scale",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Y.prototype,"type",void 0),Y=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelFormat")],Y);const G=Y;let Q=class extends R.wq{constructor(){super(...arguments),this.id=null,this.description="",this.name=null,this.originalFormat=null,this.renderingFormat=null,this.unit="",this.volumeId=0,this.type=null}};(0,i._)([(0,p.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Q.prototype,"id",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],Q.prototype,"description",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Q.prototype,"name",void 0),(0,i._)([(0,p.Cb)({type:G,json:{write:!0}})],Q.prototype,"originalFormat",void 0),(0,i._)([(0,p.Cb)({type:G,json:{write:{enabled:!0,isRequired:!0}}})],Q.prototype,"renderingFormat",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],Q.prototype,"unit",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:!0}})],Q.prototype,"volumeId",void 0),(0,i._)([(0,p.Cb)({type:["stc-hot-spot-results","stc-cluster-outlier-results","stc-estimated-bin","generic-nearest-interpolated"],json:{write:!0}})],Q.prototype,"type",void 0),Q=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelVariable")],Q);const X=Q;var ee=r(22974),te=r(22303);let re=class extends((0,I.J)(R.wq)){constructor(){super(...arguments),this.color=te.Z.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label="",this.colorLocked=!1}};(0,i._)([(0,p.Cb)({type:te.Z,json:{type:[u.z8],write:{enabled:!0,isRequired:!0}}})],re.prototype,"color",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],re.prototype,"value",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{default:!0,write:!0}})],re.prototype,"enabled",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],re.prototype,"label",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{default:!1,write:!0}})],re.prototype,"colorLocked",void 0),re=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelIsosurface")],re);const ie=re;var oe=r(70921),ne=r(22021);let se=class extends((0,I.J)(R.wq)){constructor(){super(...arguments),this.color=null,this.position=0}};(0,i._)([(0,p.Cb)({type:te.Z,json:{type:[u.z8],write:{enabled:!0,isRequired:!0}}})],se.prototype,"color",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],se.prototype,"position",void 0),se=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelColorStop")],se);const ae=se;let le=class extends((0,I.J)(R.wq)){constructor(){super(...arguments),this.opacity=1,this.position=0}};(0,i._)([(0,p.Cb)({type:Number,json:{name:"alpha",write:{enabled:!0,isRequired:!0}}})],le.prototype,"opacity",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],le.prototype,"position",void 0),le=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelOpacityStop")],le);const pe=le;let ue=class extends((0,I.J)(R.wq)){constructor(){super(...arguments),this.enabled=!1,this.range=null}};(0,i._)([(0,p.Cb)({type:Boolean,json:{default:!1,write:!0}})],ue.prototype,"enabled",void 0),(0,i._)([(0,p.Cb)({type:[Number],json:{write:!0}})],ue.prototype,"range",void 0),ue=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelRangeFilter")],ue);const ce=ue;var de,he;(he=de||(de={}))[he.Color=1]="Color",he[he.Alpha=2]="Alpha",he[he.Both=3]="Both";let ye=class extends((0,I.J)(R.wq)){constructor(e){super(e),this.interpolation=null,this.stretchRange=null,this.rangeFilter=null,this._colorMapSize=256,this.colorStops=new(o.Z.ofType(ae)),this.opacityStops=new(o.Z.ofType(pe))}set colorStops(e){this._set("colorStops",(0,oe.Z)(e,this._get("colorStops"),o.Z.ofType(ae)))}set opacityStops(e){this._set("opacityStops",(0,oe.Z)(e,this._get("opacityStops"),o.Z.ofType(pe)))}getPreviousNext(e,t,r){let i=e;for(;--i>0&&t[i].type!==r&&t[i].type!==de.Both;);let o=e;const n=t.length;for(;++o<n&&t[o].type!==r&&t[o].type!==de.Both;);return[i,o]}get rasterizedTransferFunction(){const e=[];if(this.colorStops.length<2)return e;const t=[],r=[];for(const t of this.colorStops){if(!t.color)return e;r.push({color:{r:t.color.r,g:t.color.g,b:t.color.b,a:Math.round(255*(1-t.color.a))},position:t.position,type:de.Color})}if(0===this.opacityStops.length)for(const e of r)t.push({color:e.color,position:e.position});else{for(const e of this.opacityStops){const t=(0,ne.uZ)(e.position,0,1),i=Math.round(255*(0,ne.uZ)(1-e.opacity,0,1));let o=!1;for(const e of r)if(e.type===de.Color&&Math.abs(e.position-t)<1e-5){e.color.a=i,e.type=de.Both,o=!0;break}o||r.push({color:{r:0,g:0,b:0,a:i},position:e.position,type:de.Alpha})}r.sort(((e,t)=>e.position<t.position?-1:1));const e=r.length;for(let t=0;t<e;++t){const i=r[t];if(i.type!==de.Both)if(i.type===de.Color){const[o,n]=this.getPreviousNext(t,r,de.Alpha);if(-1!==o&&n!==e){const e=(i.position-r[o].position)/(r[n].position-r[o].position);i.color.a=Math.round((0,ne.t7)(r[o].color.a,r[n].color.a,e))}else i.color.a=-1!==o?r[o].color.a:r[n].color.a}else{const[o,n]=this.getPreviousNext(t,r,de.Color);if(-1!==o&&n!==e){const e=(i.position-r[o].position)/(r[n].position-r[o].position),t=r[o].color,s=r[n].color;["r","g","b"].forEach((r=>{i.color[r]=Math.round((0,ne.t7)(t[r],s[r],e))}))}else["r","g","b"].forEach(-1!==o?e=>{i.color[e]=r[o][e]}:e=>{i.color[e]=r[n][e]})}}for(const e of r)t.push({color:e.color,position:e.position})}t[0].position=0,t[t.length-1].position=1;let i=0,o=1;for(let r=0;r<this._colorMapSize;++r){const n=r/this._colorMapSize;for(;n>t[o].position;)i=o++;const s=(n-t[i].position)/(t[o].position-t[i].position),a=t[i].color,l=t[o].color,p=new te.Z;["r","g","b"].forEach((e=>{p[e]=Math.round((0,ne.t7)(a[e],l[e],s))})),p.a=(0,ne.uZ)(1-(0,ne.t7)(a.a,l.a,s)/255,0,1),e.push(p)}return e}getColorForContinuousDataValue(e,t){const r=this.rasterizedTransferFunction;if(this.colorStops.length<2||!Array.isArray(this.stretchRange)||this.stretchRange.length<2||r.length<256)return null;let i=this.stretchRange[0],o=this.stretchRange[1];if(i>o){const e=i;i=o,o=e}e=(0,ne.uZ)(e,i,o);const n=r[Math.round((e-i)/(o-i)*(this._colorMapSize-1))].clone();return t||(n.a=1),n}};(0,i._)([(0,p.Cb)({type:["linear","nearest"],json:{write:!0}})],ye.prototype,"interpolation",void 0),(0,i._)([(0,p.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],ye.prototype,"stretchRange",void 0),(0,i._)([(0,p.Cb)({type:o.Z.ofType(ae),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.colorStops&&this.colorStops.length>0}}}}})],ye.prototype,"colorStops",null),(0,i._)([(0,p.Cb)({type:o.Z.ofType(pe),json:{read:{source:"alphaStops"},write:{enabled:!0,target:"alphaStops",overridePolicy(){return{enabled:!!this.opacityStops&&this.opacityStops.length>0}}}}})],ye.prototype,"opacityStops",null),(0,i._)([(0,p.Cb)({type:ce,json:{write:!0}})],ye.prototype,"rangeFilter",void 0),(0,i._)([(0,p.Cb)({type:[te.Z],clonable:!1,json:{read:!1}})],ye.prototype,"rasterizedTransferFunction",null),ye=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelTransferFunctionStyle")],ye);const me=ye;let fe=class extends((0,I.J)(R.wq)){constructor(){super(...arguments),this.color=te.Z.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label=""}};(0,i._)([(0,p.Cb)({type:te.Z,json:{type:[u.z8],write:{enabled:!0,isRequired:!0}}})],fe.prototype,"color",void 0),(0,i._)([(0,p.Cb)({type:u.z8,json:{write:{enabled:!0,isRequired:!0}}})],fe.prototype,"value",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{default:!0,write:!0}})],fe.prototype,"enabled",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],fe.prototype,"label",void 0),fe=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelUniqueValue")],fe);const ge=fe;var be;let ve=be=class extends R.wq{constructor(e){super(e),this.variableId=0,this.label="",this.transferFunction=null,this.uniqueValues=null,this.isosurfaces=null,this.uniqueValues=new(o.Z.ofType(ge)),this.isosurfaces=new(o.Z.ofType(ie))}clone(){return new be({variableId:this.variableId,label:this.label,transferFunction:(0,ee.d9)(this.transferFunction),uniqueValues:(0,ee.d9)(this.uniqueValues),isosurfaces:(0,ee.d9)(this.isosurfaces)})}};(0,i._)([(0,p.Cb)({type:u.z8,json:{write:{enabled:!0,isRequired:!0}}})],ve.prototype,"variableId",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],ve.prototype,"label",void 0),(0,i._)([(0,p.Cb)({type:me,json:{write:{enabled:!0,overridePolicy(){return{enabled:!this.uniqueValues||this.uniqueValues.length<1}}}}})],ve.prototype,"transferFunction",void 0),(0,i._)([(0,p.Cb)({type:o.Z.ofType(ge),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.uniqueValues&&this.uniqueValues.length>0}}}}})],ve.prototype,"uniqueValues",void 0),(0,i._)([(0,p.Cb)({type:o.Z.ofType(ie),json:{write:{enabled:!0,overridePolicy(){const e=!this.uniqueValues||this.uniqueValues.length<1,t=!!this.isosurfaces&&this.isosurfaces.length>0;return{enabled:e&&t}}}}})],ve.prototype,"isosurfaces",void 0),ve=be=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelVariableStyle")],ve);const Se=ve;var we=r(94139),_e=r(82971),xe=r(8744);let Ce=class extends R.wq{constructor(){super(...arguments),this.values=null}};(0,i._)([(0,p.Cb)({type:[Number],json:{write:!0}})],Ce.prototype,"values",void 0),Ce=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelIrregularSpacing")],Ce);const je=Ce;let Ie=class extends R.wq{constructor(){super(...arguments),this.scale=1,this.offset=0}};(0,i._)([(0,p.Cb)({type:Number,json:{write:!0}})],Ie.prototype,"scale",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:!0}})],Ie.prototype,"offset",void 0),Ie=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelRegularSpacing")],Ie);const Ve=Ie;let Re=class extends R.wq{constructor(){super(...arguments),this.irregularSpacing=null,this.isPositiveUp=!0,this.isWrappedDateLine=!1,this.label=null,this.name=null,this.quantity=null,this.regularSpacing=null,this.size=0,this.unit=null}get isRegular(){return(null==this.irregularSpacing||void 0===this.irregularSpacing)&&null!==this.regularSpacing}getRange(){return this.isRegular?[this.regularSpacing.offset,this.regularSpacing.offset+this.regularSpacing.scale*(this.size-1)]:Array.isArray(this.irregularSpacing?.values)&&this.irregularSpacing.values.length>1?[this.irregularSpacing.values[0],this.irregularSpacing.values[this.irregularSpacing.values.length-1]]:[0,0]}};(0,i._)([(0,p.Cb)({type:je,json:{write:!0}})],Re.prototype,"irregularSpacing",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],Re.prototype,"isPositiveUp",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],Re.prototype,"isWrappedDateLine",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],Re.prototype,"label",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],Re.prototype,"name",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],Re.prototype,"quantity",void 0),(0,i._)([(0,p.Cb)({type:Ve,json:{write:!0}})],Re.prototype,"regularSpacing",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:!0}})],Re.prototype,"size",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],Re.prototype,"unit",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{read:!1}})],Re.prototype,"isRegular",null),Re=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelDimension")],Re);const Ne=Re,qe="esri.layers.voxel.VoxelVolume",ze=s.Z.getLogger(qe);let Me=class extends R.wq{constructor(e){super(e),this.id=0,this.dimensions=null,this.spatialReference=_e.Z.WGS84}get zDimension(){if(!this.dimensions)return-1;if(!Array.isArray(this.dimensions))return-1;if(4!==this.dimensions.length)return-1;for(let e=2;e<4;++e)if(this.dimensions[e].size>0)return e;return-1}get isValid(){return!(!this.dimensions||!Array.isArray(this.dimensions)||4!==this.dimensions.length||this.dimensions[0].size<1||this.dimensions[1].size<1||-1===this.zDimension||this.dimensions[this.zDimension].size<1)}get originInLayerSpace3D(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size];return[e[0],t[0],i[0]]}get voxelSizeInLayerSpaceSigned(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size],o=[this.sizeInVoxels[0],this.sizeInVoxels[1],this.sizeInVoxels[2]];for(let e=0;e<3;++e)o[e]<2?o[e]=1:o[e]-=1;return r.isRegular&&!r.isPositiveUp&&(o[2]*=-1),[(e[1]-e[0])/o[0],(t[1]-t[0])/o[1],(i[1]-i[0])/o[2]]}get volumeType(){if(this.isValid){const e=this.dimensions[2].size>0,t=this.dimensions[3].size>0;if(!e&&t)return"xyt";if(e&&t)return"xyzt"}return"xyz"}get sizeInVoxels(){if(!this.isValid)return[0,0,0];const e=this.zDimension;return[this.dimensions[0].size,this.dimensions[1].size,this.dimensions[e].size]}computeVoxelSpaceLocation(e){if(!this.isValid)return[0,0,0];if("xyt"===this.volumeType)return ze.error("computeVoxelSpacePosition cannot be used with XYT volumes."),[0,0,0];if(!(0,xe.fS)(this.spatialReference,e.spatialReference))return ze.error("pos argument should have the same spatial reference as the VoxelLayer."),[0,0,0];const t=(0,y.f)(e.x,e.y,e.z??0);(0,h.b)(t,t,this.originInLayerSpace3D),(0,h.D)(t,t,this.voxelSizeInLayerSpaceSigned);const r=this.dimensions[this.zDimension];if(!r.isRegular&&Array.isArray(r.irregularSpacing?.values)&&r.irregularSpacing.values.length>1){const i=e.z??0,o=r.irregularSpacing.values,n=r.isPositiveUp?1:-1,s=o.reduce(((e,t)=>Math.abs(n*t-i)<Math.abs(n*e-i)?t:e));for(let e=0;e<o.length;++e)if(o[e]===s){t[2]=e;break}}return[t[0],t[1],t[2]]}computeLayerSpaceLocation(e){if(!this.isValid)return new we.Z({x:0,y:0,spatialReference:this.spatialReference});const t=(0,y.d)(e);if((0,h.C)(t,t,this.voxelSizeInLayerSpaceSigned),(0,h.a)(t,t,this.originInLayerSpace3D),"xyt"===this.volumeType)return new we.Z({x:t[0],y:t[1],spatialReference:this.spatialReference});const r=this.dimensions[this.zDimension];return r.isRegular||Array.isArray(r.irregularSpacing?.values)&&(e[2]<0?t[2]=r.irregularSpacing.values[0]:e[2]<r.irregularSpacing.values.length?t[2]=r.irregularSpacing.values[e[2]]:t[2]=r.irregularSpacing.values[r.irregularSpacing.values.length-1],r.isPositiveUp||(t[2]*=-1)),new we.Z({x:t[0],y:t[1],z:t[2],spatialReference:this.spatialReference})}};(0,i._)([(0,p.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Me.prototype,"id",void 0),(0,i._)([(0,p.Cb)({type:[Ne],json:{write:{enabled:!0,isRequired:!0}}})],Me.prototype,"dimensions",void 0),(0,i._)([(0,p.Cb)({type:_e.Z,json:{read:{enabled:!1}}})],Me.prototype,"spatialReference",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{read:!1}})],Me.prototype,"zDimension",null),(0,i._)([(0,p.Cb)({type:[Boolean],json:{read:!1}})],Me.prototype,"isValid",null),(0,i._)([(0,p.Cb)({type:[Number],json:{read:!1}})],Me.prototype,"originInLayerSpace3D",null),(0,i._)([(0,p.Cb)({type:[Number],json:{read:!1}})],Me.prototype,"voxelSizeInLayerSpaceSigned",null),(0,i._)([(0,p.Cb)({type:["xyz","xyzt","xyt"],json:{read:{enabled:!1}}})],Me.prototype,"volumeType",null),(0,i._)([(0,p.Cb)({type:[Number],json:{read:!1}})],Me.prototype,"sizeInVoxels",null),Me=(0,i._)([(0,d.j)(qe)],Me);const Ze=Me;var Te;let Ae=Te=class extends R.wq{constructor(){super(...arguments),this.apronWidth=1,this.brickSize=[32,32,32],this.maxLodLevel=0,this.nodeSize=[4,4,4]}isValid(){const e=new Te;return e.apronWidth===this.apronWidth&&e.maxLodLevel===this.maxLodLevel&&!!this.brickSize&&!!this.nodeSize&&!(!Array.isArray(this.brickSize)||!Array.isArray(this.nodeSize))&&3===this.brickSize.length&&3===this.nodeSize.length&&32===this.brickSize[0]&&32===this.brickSize[1]&&32===this.brickSize[2]&&4===this.nodeSize[0]&&4===this.nodeSize[1]&&4===this.nodeSize[2]}};(0,i._)([(0,p.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Ae.prototype,"apronWidth",void 0),(0,i._)([(0,p.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],Ae.prototype,"brickSize",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Ae.prototype,"maxLodLevel",void 0),(0,i._)([(0,p.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],Ae.prototype,"nodeSize",void 0),Ae=Te=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelVolumeIndex")],Ae);const Fe=Ae;let Pe=class extends((0,I.J)(R.wq)){constructor(e){super(e),this.enabled=!0,this.label="",this.normal=null,this.point=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=D(this.normal);return V.BV.normalize((0,u.q9)(e),0,!0)}set orientation(e){const t=U(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=D(this.normal);return V.BV.normalize((0,u.q9)(t),0,!0)}set tilt(e){const t=U(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i._)([(0,p.Cb)({type:Boolean,json:{default:!0,write:!0}})],Pe.prototype,"enabled",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],Pe.prototype,"label",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,E.p)((e=>V.BV.normalize((0,u.q9)(e),0,!0)))],Pe.prototype,"orientation",null),(0,i._)([(0,p.Cb)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,E.p)((e=>V.BV.normalize((0,u.q9)(e),0,!0)))],Pe.prototype,"tilt",null),(0,i._)([(0,p.Cb)({type:[Number],json:{write:!0}})],Pe.prototype,"normal",void 0),(0,i._)([(0,p.Cb)({type:[Number],json:{write:!0}})],Pe.prototype,"point",void 0),Pe=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelDynamicSection")],Pe);const Le=Pe;var Oe;let De=Oe=class extends R.wq{constructor(e){super(e),this.volumeId=0,this.verticalExaggeration=1,this.exaggerationMode="scale-height",this.verticalOffset=0,this.slices=new(o.Z.ofType(k)),this.dynamicSections=new(o.Z.ofType(Le))}set slices(e){this._set("slices",(0,oe.Z)(e,this._get("slices"),o.Z.ofType(k)))}set dynamicSections(e){this._set("dynamicSections",(0,oe.Z)(e,this._get("dynamicSections"),o.Z.ofType(Le)))}clone(){return new Oe({volumeId:this.volumeId,verticalExaggeration:this.verticalExaggeration,exaggerationMode:this.exaggerationMode,verticalOffset:this.verticalOffset,slices:(0,ee.d9)(this.slices),dynamicSections:(0,ee.d9)(this.dynamicSections)})}};(0,i._)([(0,p.Cb)({type:u.z8,json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"volumeId",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{default:1,write:!0}})],De.prototype,"verticalExaggeration",void 0),(0,i._)([(0,p.Cb)({type:["scale-position","scale-height"],json:{default:"scale-height",write:!0}})],De.prototype,"exaggerationMode",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{default:0,write:!0}})],De.prototype,"verticalOffset",void 0),(0,i._)([(0,p.Cb)({type:o.Z.ofType(k),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.slices&&this.slices.length>0}}}}})],De.prototype,"slices",null),(0,i._)([(0,p.Cb)({type:o.Z.ofType(Le),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.dynamicSections&&this.dynamicSections.length>0}}}}})],De.prototype,"dynamicSections",null),De=Oe=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelVolumeStyle")],De);const Ue=De;var Ee=r(32163);const Be="esri.layers.VoxelLayer",ke=s.Z.getLogger(Be);let $e=class extends((0,_.Vt)((0,b.Y)((0,v.q)((0,S.I)((0,w.M)((0,a.R)((0,g.V)(f.Z)))))))){constructor(e){super(e),this.serviceRoot="",this.operationalLayerType="Voxel",this.legendEnabled=!0,this.title=null,this.sections=null,this.currentVariableId=0,this.volumeStyles=null,this.renderMode="volume",this.variableStyles=null,this.enableSlices=!0,this.enableSections=!0,this.enableDynamicSections=!0,this.enableIsosurfaces=!0,this.shading=new W,this.opacity=1,this.variables=new o.Z,this.volumes=new o.Z,this.index=null,this.minScale=0,this.maxScale=0,this.type="voxel",this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.fullExtent=null,this.popupEnabled=!0,this.popupTemplate=null,this.test=null,this.volumeStyles=new(o.Z.ofType(Ue)),this.variableStyles=new(o.Z.ofType(Se)),this.sections=new(o.Z.ofType(J)),e?.constantUpscaling&&(this.test={constantUpscaling:!0})}set url(e){this._set("url",(0,x.Nm)(e,ke))}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(l.r9).then((()=>this._fetchService(t))).then((()=>this.serviceRoot=this.url));return this.addResolvingPromise(r),Promise.resolve(this)}read(e,t){super.read(e,t);for(const e of this.volumes)e.spatialReference=this.spatialReference}readVersion(e,t){return super.parseVersionString(e)}validateLayer(e){if(e.layerType&&e.layerType!==this.operationalLayerType)throw new n.Z("voxel-layer:layer-type-not-supported","VoxelLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor)||this.version.major<3)throw new n.Z("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"});if(this.version.major>3)throw new n.Z("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"})}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const i=m.Z.fromJSON(e,r);if(0===i.zmin&&0===i.zmax&&Array.isArray(t.volumes)){const e=Ze.fromJSON(t.volumes[0]);if(e.isValid&&"xyt"!==e.volumeType){const t=e.dimensions[2];if(t.isRegular){let e=t.regularSpacing.offset,r=t.regularSpacing.offset+t.regularSpacing.scale*(t.size-1);if(e>r){const t=e;e=r,r=t}i.zmin=e,i.zmax=r}}}return i}return null}get voxelFields(){const e=[new j.Z({name:"Voxel.ServiceValue",alias:"Value",domain:null,editable:!1,length:128,type:"string"}),new j.Z({name:"Voxel.ServiceVariableLabel",alias:"Variable",domain:null,editable:!1,length:128,type:"string"}),new j.Z({name:"Voxel.Position",alias:"Voxel Position",domain:null,editable:!1,length:128,type:"string"})],t=this.getVolume(null);if(null!=t){if("xyzt"===t.volumeType||"xyt"===t.volumeType){const t=new j.Z({name:"Voxel.ServiceLocalTime",alias:"Local Time",domain:null,editable:!1,length:128,type:"string"});e.push(t);const r=new j.Z({name:"Voxel.ServiceNativeTime",alias:"Native Time",domain:null,editable:!1,length:128,type:"string"});e.push(r)}if("xyt"!==t.volumeType){const t=new j.Z({name:"Voxel.ServiceDepth",alias:"Depth",domain:null,editable:!1,length:128,type:"string"});e.push(t)}}return e}get defaultPopupTemplate(){return this.createPopupTemplate()}createPopupTemplate(e){const t=this.voxelFields,r=this.title;return(0,Ee.eZ)({fields:t,title:r},e)}getConfiguration(){const e={layerType:this.operationalLayerType,version:this.version.versionString,name:this.title,spatialReference:this.spatialReference,fullExtent:this.fullExtent,volumes:this.volumes.toJSON(),variables:this.variables.toJSON(),index:this.index?.toJSON(),sections:this.getSections(),style:{volumeStyles:this.getVolumeStyles(),currentVariableId:this.currentVariableId,renderMode:this.renderMode,variableStyles:this.getVariableStyles(),enableSections:this.enableSections,enableDynamicSections:this.enableDynamicSections,enableIsosurfaces:this.enableIsosurfaces,enableSlices:this.enableSlices,shading:this.shading}};return e.index&&this.index?.isValid()?JSON.stringify(e):""}getVariableStyle(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variableStyles||-1===t)return null;const r=this.variableStyles.findIndex((e=>e.variableId===t));return r<0?null:this.variableStyles.getItemAt(r)}getVariable(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variables||-1===t)return null;const r=this.variables.findIndex((e=>e.id===t));return r<0?null:this.variables.getItemAt(r)}getVolume(e){const t=this.getVariable(e);return null!=t?this.volumes.find((({id:e})=>e===t.volumeId)):null}getVolumeStyle(e){const t=this.getVariable(e);return null!=t?this.volumeStyles.find((({volumeId:e})=>e===t.volumeId)):null}getColorForContinuousDataValue(e,t,r){const i=this.getVariable(e);if(null==i||"continuous"!==i.renderingFormat?.continuity)return null;if(!this.variableStyles)return null;const o=this.variableStyles.findIndex((t=>t.variableId===e));if(o<0)return null;const n=this.variableStyles.getItemAt(o);return n.transferFunction?n.transferFunction.getColorForContinuousDataValue(t,r):null}getSections(){const e=[];for(const t of this.sections)e.push(new J({enabled:t.enabled,href:t.href,id:t.id,label:t.label,normal:t.normal,point:t.point,sizeInPixel:t.sizeInPixel,slices:t.slices,timeId:t.timeId,variableId:t.variableId}));return e}getVariableStyles(){const e=[];for(const t of this.variableStyles){const r=this._getVariable(t);if(null!=r){const i=t.clone();i.isosurfaces.length>4&&(i.isosurfaces=i.isosurfaces.slice(0,3),ke.error("A maximum of 4 isosurfaces are supported for Voxel Layers."));for(const e of i.isosurfaces)if(!e.colorLocked){const t=this.getColorForContinuousDataValue(i.variableId,e.value,!1);null===t||t.equals(e.color)||(e.color=t)}if("continuous"===r.renderingFormat.continuity)(null===i.transferFunction||i.transferFunction.colorStops.length<2)&&ke.error(`VoxelVariableStyle for variable ${r.id} is invalid. At least 2 color stops are required in the transferFunction for continuous Voxel Layer variables.`),null!==i.transferFunction&&(Array.isArray(i.transferFunction.stretchRange)&&2===i.transferFunction.stretchRange.length||(ke.error(`VoxelVariableStyle for variable ${r.id} is invalid. The stretchRange of the transferFunction for continuous Voxel Layer variables must be of the form [minimumDataValue, maximumDataValue].`),i.transferFunction.stretchRange=[0,1],i.transferFunction.colorStops.removeAll()));else if("discrete"===r.renderingFormat.continuity)if(0===t.uniqueValues.length)ke.error(`VoxelVariableStyle for variable ${r.id} is invalid. Unique values are required for discrete Voxel Layer variables.`);else for(const e of t.uniqueValues)null!==e.label&&void 0!==e.label||null===e.value||void 0===e.value||(e.label=e.value.toString());e.push(i)}else ke.error(`VoxelVariable ID=${t.variableId} doesn't exist, VoxelVariableStyle for this VoxelVariable will be ignored.`)}return e}getVolumeStyles(){const e=[];for(const t of this.volumeStyles){const r=this._getVolumeFromVolumeId(t.volumeId);if(null!=r){const i=t.clone();for(const e of i.slices)this._isPlaneValid(e,[0,1,r.zDimension],r.dimensions)||(e.enabled=!1,e.label="invalid");for(const e of i.dynamicSections)this._isPlaneValid(e,[0,1,r.zDimension],r.dimensions)||(e.enabled=!1,e.label="invalid");e.push(i)}else ke.error(`VoxelVolume ID=${t.volumeId} doesn't exist, VoxelVolumeStyle for this VoxelVolume will be ignored.`)}return e}_getVariable(e){const t=e.variableId;for(const e of this.variables)if(e.id===t)return e;return null}_getVolumeFromVolumeId(e){for(const t of this.volumes)if(t.id===e)return t;return null}_isPlaneValid(e,t,r){if(!e.point)return!1;if(!Array.isArray(e.point)||3!==e.point.length)return!1;if(!e.normal)return!1;if(!Array.isArray(e.normal)||3!==e.normal.length)return!1;for(let i=0;i<3;++i){const o=e.point[i];if(o<0||o>=r[t[i]].size)return!1}const i=(0,y.f)(e.normal[0],e.normal[1],e.normal[2]);return(0,h.n)(i,i),!(Math.abs(i[0])+Math.abs(i[1])+Math.abs(i[2])<1e-6||(e.normal[0]=i[0],e.normal[1]=i[1],e.normal[2]=i[2],0))}};(0,i._)([(0,p.Cb)({type:["Voxel"]})],$e.prototype,"operationalLayerType",void 0),(0,i._)([(0,p.Cb)(C.rn)],$e.prototype,"legendEnabled",void 0),(0,i._)([(0,p.Cb)({json:{write:!0}})],$e.prototype,"title",void 0),(0,i._)([(0,p.Cb)(C.HQ)],$e.prototype,"url",null),(0,i._)([(0,p.Cb)({type:o.Z.ofType(J),json:{origins:{"web-scene":{name:"layerDefinition.sections",write:!0}}}})],$e.prototype,"sections",void 0),(0,i._)([(0,p.Cb)({type:u.z8,json:{origins:{"web-scene":{name:"layerDefinition.style.currentVariableId",write:{enabled:!0,isRequired:!0,ignoreOrigin:!0}},service:{name:"style.currentVariableId"}}}})],$e.prototype,"currentVariableId",void 0),(0,i._)([(0,p.Cb)({type:o.Z.ofType(Ue),json:{origins:{"web-scene":{name:"layerDefinition.style.volumeStyles",write:!0},service:{name:"style.volumeStyles"}}}})],$e.prototype,"volumeStyles",void 0),(0,i._)([(0,p.Cb)({type:["volume","surfaces"],json:{origins:{"web-scene":{name:"layerDefinition.style.renderMode",write:!0},service:{name:"style.renderMode"}}}})],$e.prototype,"renderMode",void 0),(0,i._)([(0,p.Cb)({type:o.Z.ofType(Se),json:{origins:{"web-scene":{name:"layerDefinition.style.variableStyles",write:!0},service:{name:"style.variableStyles"}}}})],$e.prototype,"variableStyles",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSlices",write:!0},service:{name:"style.enableSlices"}}}})],$e.prototype,"enableSlices",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSections",write:!0},service:{name:"style.enableSections"}}}})],$e.prototype,"enableSections",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableDynamicSections",write:!0},service:{name:"style.enableDynamicSections"}}}})],$e.prototype,"enableDynamicSections",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableIsosurfaces",write:!0},service:{name:"style.enableIsosurfaces"}}}})],$e.prototype,"enableIsosurfaces",void 0),(0,i._)([(0,p.Cb)({type:W,json:{origins:{"web-scene":{name:"layerDefinition.style.shading",write:!0},service:{name:"style.shading"}}}})],$e.prototype,"shading",void 0),(0,i._)([(0,p.Cb)({type:["show","hide"]})],$e.prototype,"listMode",void 0),(0,i._)([(0,p.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0,json:{read:!1,write:!1,origins:{"web-scene":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],$e.prototype,"opacity",void 0),(0,i._)([(0,p.Cb)({type:o.Z.ofType(X)})],$e.prototype,"variables",void 0),(0,i._)([(0,p.Cb)({type:o.Z.ofType(Ze)})],$e.prototype,"volumes",void 0),(0,i._)([(0,p.Cb)({type:Fe})],$e.prototype,"index",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{name:"layerDefinition.minScale",read:!1,write:!1,origins:{service:{read:!1,write:!1}}}})],$e.prototype,"minScale",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{name:"layerDefinition.maxScale",read:!1,write:!1,origins:{service:{read:!1,write:!1}}}})],$e.prototype,"maxScale",void 0),(0,i._)([(0,p.Cb)({json:{read:!1},readOnly:!0})],$e.prototype,"type",void 0),(0,i._)([(0,p.Cb)({readOnly:!0,json:{name:"serviceVersion"}})],$e.prototype,"version",void 0),(0,i._)([(0,c.r)("service","version")],$e.prototype,"readVersion",null),(0,i._)([(0,p.Cb)({type:m.Z})],$e.prototype,"fullExtent",void 0),(0,i._)([(0,c.r)("service","fullExtent",["fullExtent"])],$e.prototype,"readFullExtent",null),(0,i._)([(0,p.Cb)({readOnly:!0,clonable:!1,json:{read:!1}})],$e.prototype,"voxelFields",null),(0,i._)([(0,p.Cb)(C.C_)],$e.prototype,"popupEnabled",void 0),(0,i._)([(0,p.Cb)({readOnly:!0})],$e.prototype,"defaultPopupTemplate",null),$e=(0,i._)([(0,d.j)(Be)],$e);const Ke=$e},54295:(e,t,r)=>{r.d(t,{V:()=>s});var i=r(43697),o=r(5600),n=(r(75215),r(67676),r(80442),r(52011));const s=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,o.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,n.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>l});var i=r(43697),o=r(92604),n=r(5600),s=(r(75215),r(67676),r(80442),r(52011)),a=r(66677);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Nm)(e,o.Z.getLogger(this.declaredClass)))}};return(0,i._)([(0,n.Cb)()],t.prototype,"title",null),(0,i._)([(0,n.Cb)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,s.j)("esri.layers.mixins.ArcGISService")],t),t}},72965:(e,t,r)=>{r.d(t,{M:()=>s});var i=r(43697),o=r(5600),n=(r(75215),r(67676),r(80442),r(52011));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i._)([(0,o.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,i._)([(0,o.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,i._)([(0,o.Cb)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,i._)([(0,n.j)("esri.layers.mixins.ScaleRangeLayer")],t),t}},20559:(e,t,r)=>{r.d(t,{xp:()=>L,Vt:()=>M});var i=r(43697),o=r(3172),n=r(20102),s=r(92604),a=r(95330),l=r(17452),p=r(5600),u=(r(75215),r(67676),r(80442),r(71715)),c=r(52011),d=r(30556),h=r(65845),y=r(6570),m=r(79235),f=r(82971),g=r(66677),b=r(21506),v=r(61064);let S=null;function w(){return S}var _=r(65587),x=r(15235),C=r(66643),j=r(41123),I=r(97873);async function V(e,t,r){if(!t||!t.resources)return;const i=t.portalItem===e.portalItem?new Set(e.paths):new Set;e.paths.length=0,e.portalItem=t.portalItem;const o=new Set(t.resources.toKeep.map((e=>e.resource.path))),s=new Set,l=[];o.forEach((t=>{i.delete(t),e.paths.push(t)}));for(const n of t.resources.toUpdate)if(i.delete(n.resource.path),o.has(n.resource.path)||s.has(n.resource.path)){const{resource:t,content:i,finish:o,error:s}=n,a=(0,I.getSiblingOfSameTypeI)(t,(0,j.D)());e.paths.push(a.path),l.push(R({resource:a,content:i,compress:n.compress,finish:o,error:s},r))}else e.paths.push(n.resource.path),l.push(N(n,r)),s.add(n.resource.path);for(const i of t.resources.toAdd)l.push(R(i,r)),e.paths.push(i.resource.path);if(i.forEach((e=>{if(t.portalItem){const r=t.portalItem.resourceFromPath(e);l.push(r.portalItem.removeResource(r).catch((()=>{})))}})),0===l.length)return;const p=await(0,a.as)(l);(0,a.k_)(r);const u=p.filter((e=>"error"in e)).map((e=>e.error));if(u.length>0)throw new n.Z("save:resources","Failed to save one or more resources",{errors:u})}async function R(e,t){const r={...null!=t?t:{},compress:e.compress},i=await(0,C.q6)(e.resource.portalItem.addResource(e.resource,e.content,r));if(!0!==i.ok)throw e.error?.(i.error),i.error;e.finish?.(e.resource)}async function N(e,t){const r=await(0,C.q6)(e.resource.update(e.content,t));if(!0!==r.ok)throw e.error?.(r.error),r.error;e.finish?.(e.resource)}const q="esri.layers.mixins.SceneService",z=s.Z.getLogger(q),M=e=>{let t=class extends e{constructor(){super(...arguments),this.spatialReference=null,this.fullExtent=null,this.heightModelInfo=null,this.minScale=0,this.maxScale=0,this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.copyright=null,this.sublayerTitleMode="item-title",this.title=null,this.layerId=null,this.indexInfo=null,this._debouncedSaveOperations=(0,a.Ds)((async(e,t,r)=>{switch(e){case L.SAVE:return this._save(t);case L.SAVE_AS:return this._saveAs(r,t)}}))}readSpatialReference(e,t){return this._readSpatialReference(t)}_readSpatialReference(e){if(null!=e.spatialReference)return f.Z.fromJSON(e.spatialReference);{const t=e.store,r=t.indexCRS||t.geographicCRS,i=r&&parseInt(r.substring(r.lastIndexOf("/")+1,r.length),10);return null!=i?new f.Z(i):null}}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const i=null==e.spatialReference?{...e,spatialReference:this._readSpatialReference(t)}:e;return y.Z.fromJSON(i,r)}const i=t.store,o=this._readSpatialReference(t);return null==o||null==i||null==i.extent||!Array.isArray(i.extent)||i.extent.some((e=>e<Z))?null:new y.Z({xmin:i.extent[0],ymin:i.extent[1],xmax:i.extent[2],ymax:i.extent[3],spatialReference:o})}parseVersionString(e){const t={major:Number.NaN,minor:Number.NaN,versionString:e},r=e.split(".");return r.length>=2&&(t.major=parseInt(r[0],10),t.minor=parseInt(r[1],10)),t}readVersion(e,t){const r=t.store,i=null!=r.version?r.version.toString():"";return this.parseVersionString(i)}readTitlePortalItem(e){return"item-title"!==this.sublayerTitleMode?void 0:e}readTitleService(e,t){const r=this.portalItem&&this.portalItem.title;if("item-title"===this.sublayerTitleMode)return(0,g.a7)(this.url,t.name);let i=t.name;if(!i&&this.url){const e=(0,g.Qc)(this.url);null!=e&&(i=e.title)}return"item-title-and-service-name"===this.sublayerTitleMode&&r&&(i=r+" - "+i),(0,g.ld)(i)}set url(e){const t=(0,g.XG)({layer:this,url:e,nonStandardUrlAllowed:!1,logger:z});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,r,i){(0,g.wH)(this,e,"layers",t,i)}get parsedUrl(){const e=this._get("url"),t=(0,l.mN)(e);return null!=this.layerId&&(t.path=`${t.path}/layers/${this.layerId}`),t}async _fetchIndexAndUpdateExtent(e,t){this.indexInfo=(0,v.T)(this.parsedUrl.path,this.rootNode,e,this.apiKey,z,t),null==this.fullExtent||this.fullExtent.hasZ||this._updateExtent(await this.indexInfo)}_updateExtent(e){if("page"===e?.type){const t=e.rootIndex%e.pageSize,r=e.rootPage?.nodes?.[t];if(null==r||null==r.obb||null==r.obb.center||null==r.obb.halfSize)throw new n.Z("sceneservice:invalid-node-page","Invalid node page.");if(r.obb.center[0]<Z||null==this.fullExtent||this.fullExtent.hasZ)return;const i=r.obb.halfSize,o=r.obb.center[2],s=Math.sqrt(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]);this.fullExtent.zmin=o-s,this.fullExtent.zmax=o+s}else if("node"===e?.type){const t=e.rootNode?.mbs;if(!Array.isArray(t)||4!==t.length||t[0]<Z)return;const r=t[2],i=t[3],{fullExtent:o}=this;o&&(o.zmin=r-i,o.zmax=r+i)}}async _fetchService(e){if(null==this.url)throw new n.Z("sceneservice:url-not-set","Scene service can not be loaded without valid portal item or url");if(null==this.layerId&&/SceneServer\/*$/i.test(this.url)){const t=await this._fetchFirstLayerId(e);null!=t&&(this.layerId=t)}return this._fetchServiceLayer(e)}async _fetchFirstLayerId(e){const t=await(0,o.default)(this.url,{query:{f:"json",token:this.apiKey},responseType:"json",signal:e});if(t.data&&Array.isArray(t.data.layers)&&t.data.layers.length>0)return t.data.layers[0].id}async _fetchServiceLayer(e){const t=await(0,o.default)(this.parsedUrl?.path??"",{query:{f:"json",token:this.apiKey},responseType:"json",signal:e});t.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));let r=!1;if(t.data.layerType&&"Voxel"===t.data.layerType&&(r=!0),r)return this._fetchVoxelServiceLayer();const i=t.data;this.read(i,this._getServiceContext()),this.validateLayer(i)}async _fetchVoxelServiceLayer(e){const t=(await(0,o.default)(this.parsedUrl?.path+"/layer",{query:{f:"json",token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,this._getServiceContext()),this.validateLayer(t)}_getServiceContext(){return{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}}async _ensureLoadBeforeSave(){await this.load(),"beforeSave"in this&&"function"==typeof this.beforeSave&&await this.beforeSave()}validateLayer(e){}_updateTypeKeywords(e,t,r){e.typeKeywords||(e.typeKeywords=[]);const i=t.getTypeKeywords();for(const t of i)e.typeKeywords.push(t);e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)),r===T.newItem&&(e.typeKeywords=e.typeKeywords.filter((e=>"Hosted Service"!==e))))}async _saveAs(e,t){const r={...P,...t};let i=x.default.from(e);i||(z.error("_saveAs(): requires a portal item parameter"),await Promise.reject(new n.Z("sceneservice:portal-item-required","_saveAs() requires a portal item to save to"))),i.id&&(i=i.clone(),i.id=null);const o=i.portal||_.Z.getDefault();await this._ensureLoadBeforeSave(),i.type=F,i.portal=o;const s={origin:"portal-item",url:null,messages:[],portal:o,portalItem:i,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}},a={layers:[this.write({},s)]};return await Promise.all(s.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(a,s,r),i.url=this.url,i.title||(i.title=this.title),this._updateTypeKeywords(i,r,T.newItem),await o.signIn(),await(o.user?.addItem({item:i,folder:r&&r.folder,data:a})),await V(this.resourceReferences,s,null),this.portalItem=i,(0,h.D)(s),s.portalItem=i,i}async _save(e){const t={...P,...e};if(!this.portalItem)throw z.error("_save(): requires the .portalItem property to be set"),new n.Z("sceneservice:portal-item-not-set","Portal item to save to has not been set on this SceneService");if(this.portalItem.type!==F)throw z.error("_save(): Non-matching portal item type. Got "+this.portalItem.type+", expected "+F),new n.Z("sceneservice:portal-item-wrong-type",`Portal item needs to have type "${F}"`);await this._ensureLoadBeforeSave();const r={origin:"portal-item",url:this.portalItem.itemUrl&&(0,l.mN)(this.portalItem.itemUrl),messages:[],portal:this.portalItem.portal||_.Z.getDefault(),portalItem:this.portalItem,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}},i={layers:[this.write({},r)]};return await Promise.all(r.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(i,r,t),this.portalItem.url=this.url,this.portalItem.title||(this.portalItem.title=this.title),this._updateTypeKeywords(this.portalItem,t,T.existingItem),await this.portalItem.update({data:i}),await V(this.resourceReferences,r,null),(0,h.D)(r),this.portalItem}async _validateAgainstJSONSchema(e,t,r){let i=t.messages?.filter((e=>"error"===e.type)).map((e=>new n.Z(e.name,e.message,e.details)))??[];r?.validationOptions?.ignoreUnsupported&&(i=i.filter((e=>"layer:unsupported"!==e.name&&"symbol:unsupported"!==e.name&&"symbol-layer:unsupported"!==e.name&&"property:unsupported"!==e.name&&"url:unsupported"!==e.name&&"scenemodification:unsupported"!==e.name)));const o=r?.validationOptions,s=o?.enabled,a=w();if(s&&a){const t=(await a()).validate(e,r.portalItemLayerType);if(t.length>0){const e=`Layer item did not validate:\n${t.join("\n")}`;if(z.error(`_validateAgainstJSONSchema(): ${e}`),"throw"===o.failPolicy){const e=t.map((e=>new n.Z("sceneservice:schema-validation",e))).concat(i);throw new n.Z("sceneservice-validate:error","Failed to save layer item due to schema validation, see `details.errors`.",{combined:e})}}}if(i.length>0)throw new n.Z("sceneservice:save","Failed to save SceneService due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:i})}};return(0,i._)([(0,p.Cb)(b.id)],t.prototype,"id",void 0),(0,i._)([(0,p.Cb)({type:f.Z})],t.prototype,"spatialReference",void 0),(0,i._)([(0,u.r)("spatialReference",["spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readSpatialReference",null),(0,i._)([(0,p.Cb)({type:y.Z})],t.prototype,"fullExtent",void 0),(0,i._)([(0,u.r)("fullExtent",["fullExtent","store.extent","spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readFullExtent",null),(0,i._)([(0,p.Cb)({readOnly:!0,type:m.Z})],t.prototype,"heightModelInfo",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:{source:"minScale"},write:!1}}}})],t.prototype,"minScale",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:{source:"maxScale"},write:!1}}}})],t.prototype,"maxScale",void 0),(0,i._)([(0,p.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,i._)([(0,u.r)("version",["store.version"])],t.prototype,"readVersion",null),(0,i._)([(0,p.Cb)({type:String,json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,p.Cb)({type:String,json:{read:!1}})],t.prototype,"sublayerTitleMode",void 0),(0,i._)([(0,p.Cb)({type:String})],t.prototype,"title",void 0),(0,i._)([(0,u.r)("portal-item","title")],t.prototype,"readTitlePortalItem",null),(0,i._)([(0,u.r)("service","title",["name"])],t.prototype,"readTitleService",null),(0,i._)([(0,p.Cb)({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{write:{target:"id",isRequired:!0,ignoreOrigin:!0},read:!1}}}})],t.prototype,"layerId",void 0),(0,i._)([(0,p.Cb)(b.HQ)],t.prototype,"url",null),(0,i._)([(0,d.c)("url")],t.prototype,"writeUrl",null),(0,i._)([(0,p.Cb)()],t.prototype,"parsedUrl",null),(0,i._)([(0,p.Cb)({readOnly:!0})],t.prototype,"store",void 0),(0,i._)([(0,p.Cb)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],t.prototype,"rootNode",void 0),t=(0,i._)([(0,c.j)(q)],t),t},Z=-1e38;var T,A;(A=T||(T={}))[A.existingItem=0]="existingItem",A[A.newItem=1]="newItem";const F="Scene Service",P={getTypeKeywords:()=>[],portalItemLayerType:"unknown",validationOptions:{enabled:!0,ignoreUnsupported:!1,failPolicy:"throw"}};var L;!function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(L||(L={}))},61064:(e,t,r)=>{r.d(t,{T:()=>n});var i=r(3172),o=r(20102);async function n(e,t,r,n,s,a){let l=null;if(null!=r){const t=`${e}/nodepages/`,o=t+Math.floor(r.rootIndex/r.nodesPerPage);try{return{type:"page",rootPage:(await(0,i.default)(o,{query:{f:"json",token:n},responseType:"json",signal:a})).data,rootIndex:r.rootIndex,pageSize:r.nodesPerPage,lodMetric:r.lodSelectionMetricType,urlPrefix:t}}catch(e){null!=s&&s.warn("#fetchIndexInfo()","Failed to load root node page. Falling back to node documents.",o,e),l=e}}if(!t)return null;const p=`${e}/nodes/`,u=p+(t&&t.split("/").pop());try{return{type:"node",rootNode:(await(0,i.default)(u,{query:{f:"json",token:n},responseType:"json",signal:a})).data,urlPrefix:p}}catch(e){throw new o.Z("sceneservice:root-node-missing","Root node missing.",{pageError:l,nodeError:e,url:u})}}},66094:(e,t,r)=>{r.d(t,{B:()=>o});var i=r(17452);function o(e){return n[function(e){return e instanceof Blob?e.type:function(e){const t=(0,i.Ml)(e);return l[t]||s}(e.url)}(e)]||a}const n={},s="text/plain",a=n[s],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in l)n[l[e]]=e},97873:(e,t,r)=>{r.r(t),r.d(t,{addOrUpdateResource:()=>a,contentToBlob:()=>d,fetchResources:()=>s,getSiblingOfSameType:()=>h,getSiblingOfSameTypeI:()=>y,removeAllResources:()=>p,removeResource:()=>l,splitPrefixFileNameAndExtension:()=>c});var i=r(3172),o=r(20102),n=r(17452);async function s(e,t={},r){await e.load(r);const i=(0,n.v_)(e.itemUrl,"resources"),{start:o=1,num:s=10,sortOrder:a="asc",sortField:l="created"}=t,p={query:{start:o,num:s,sortOrder:a,sortField:l,token:e.apiKey},signal:r?.signal},u=await e.portal.request(i,p);return{total:u.total,nextStart:u.nextStart,resources:u.resources.map((({created:t,size:r,resource:i})=>({created:new Date(t),size:r,resource:e.resourceFromPath(i)})))}}async function a(e,t,r,i){if(!e.hasPath())throw new o.Z(`portal-item-resource-${t}:invalid-path`,"Resource does not have a valid path");const s=e.portalItem;await s.load(i);const a=(0,n.v_)(s.userItemUrl,"add"===t?"addResources":"updateResources"),[l,p]=u(e.path),c=await d(r),h=new FormData;return l&&"."!==l&&h.append("resourcesPrefix",l),null!=i&&i.compress&&h.append("compress","true"),h.append("fileName",p),h.append("file",c,p),h.append("f","json"),null!=i&&i.access&&h.append("access",i.access),await s.portal.request(a,{method:"post",body:h,signal:i?.signal}),e}async function l(e,t,r){if(!t.hasPath())throw new o.Z("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await e.load(r);const i=(0,n.v_)(e.userItemUrl,"removeResources");await e.portal.request(i,{method:"post",query:{resource:t.path},signal:r?.signal}),t.portalItem=null}async function p(e,t){await e.load(t);const r=(0,n.v_)(e.userItemUrl,"removeResources");return e.portal.request(r,{method:"post",query:{deleteAll:!0},signal:t?.signal})}function u(e){const t=e.lastIndexOf("/");return-1===t?[".",e]:[e.slice(0,t),e.slice(t+1)]}function c(e){const[t,r]=function(e){const t=(0,n.Ml)(e);return null==t?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[i,o]=u(t);return[i,o,r]}async function d(e){return e instanceof Blob?e:(await(0,i.default)(e.url,{responseType:"blob"})).data}function h(e,t){if(!e.hasPath())return null;const[r,,i]=c(e.path);return e.portalItem.resourceFromPath((0,n.v_)(r,t+i))}function y(e,t){if(!e.hasPath())return null;const[r,,i]=c(e.path);return e.portalItem.resourceFromPath((0,n.v_)(r,t+i))}},32163:(e,t,r)=>{r.d(t,{eZ:()=>c});var i=r(51773),o=r(35671),n=r(84649),s=(r(63801),r(48074),r(38745),r(9190)),a=(r(10214),r(71423),r(44951),r(422)),l=r(63061);const p=["oid","global-id"],u=["oid","global-id","guid"];function c({displayField:e,editFieldsInfo:t,fields:r,objectIdField:l,title:p},u){if(!r)return null;const c=function({editFieldsInfo:e,fields:t,objectIdField:r},i){return function(e,t){const r=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===r&&(e=e.slice()),e.sort(y),e}(t??[],i?.ignoreFieldTypes||v).map((t=>new a.Z({fieldName:t.name,isEditable:f(t,e),label:t.alias,format:g(t),visible:h(t,{editFieldsInfo:e,objectIdField:r,visibleFieldNames:i?.visibleFieldNames})})))}({editFieldsInfo:t,fields:r,objectIdField:l},u);if(!c.length)return null;const d=function(e){const t=(0,o.O5)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:p,fields:r,displayField:e}),m=[new s.Z,new n.Z];return new i.Z({title:d,content:m,fieldInfos:c})}const d=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/shape/i,/perimeter/i,/objectid/i,/_i$/i],h=(e,{editFieldsInfo:t,objectIdField:r,visibleFieldNames:i})=>i?i.has(e.name):!(m(e.name,t)||r&&e.name===r||p.includes(e.type)||d.some((t=>t.test(e.name))));function y(e,t){return"oid"===e.type?-1:"oid"===t.type?1:b(e)?-1:b(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function m(e,t){if(!e||!t)return!1;const{creationDateField:r,creatorField:i,editDateField:o,editorField:n}=t;return[r&&r.toLowerCase(),i&&i.toLowerCase(),o&&o.toLowerCase(),n&&n.toLowerCase()].includes(e.toLowerCase())}function f(e,t){return e.editable&&!u.includes(e.type)&&!m(e.name,t)}function g(e){switch(e.type){case"small-integer":case"integer":case"single":return new l.Z({digitSeparator:!0,places:0});case"double":return new l.Z({digitSeparator:!0,places:2});case"date":return new l.Z({dateFormat:"long-month-day-year"});default:return"string"===e.type&&(0,o.Ec)(e.name)?new l.Z({digitSeparator:!0,places:0}):null}}function b(e){return"name"===(e.name&&e.name.toLowerCase())||"name"===(e.alias&&e.alias.toLowerCase())}const v=["geometry","blob","raster","guid","xml"]}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8153],{92835:(e,t,s)=>{s.d(t,{Z:()=>f});var i,r=s(43697),n=s(96674),l=s(70586),o=s(35463),a=s(5600),h=(s(75215),s(67676),s(80442),s(71715)),c=s(52011),u=s(30556);let p=i=class extends n.wq{static get allTime(){return d}static get empty(){return g}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=null!=this.start?this.start.getTime():this.start,s=null!=this.end?this.end.getTime():this.end,i=null!=e.start?e.start.getTime():e.start,r=null!=e.end?e.end.getTime():e.end;return t===i&&s===r}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();const t=(0,l.yw)(this.start,(t=>(0,o.JE)(t,e))),s=(0,l.yw)(this.end,(t=>{const s=(0,o.JE)(t,e);return t.getTime()===s.getTime()?s:(0,o.Nm)(s,1,e)}));return new i({start:t,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,s=this.end?.getTime()??1/0,r=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let l,o;if(r>=t&&r<=s?l=r:t>=r&&t<=n&&(l=t),s>=r&&s<=n?o=s:n>=t&&n<=s&&(o=n),null!=l&&null!=o&&!isNaN(l)&&!isNaN(o)){const e=new i;return e.start=l===-1/0?null:new Date(l),e.end=o===1/0?null:new Date(o),e}return i.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const s=new i,{start:r,end:n}=this;return null!=r&&(s.start=(0,o.Nm)(r,e,t)),null!=n&&(s.end=(0,o.Nm)(n,e,t)),s}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return d.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,s=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:s})}};(0,r._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,r._)([(0,h.r)("end")],p.prototype,"readEnd",null),(0,r._)([(0,u.c)("end")],p.prototype,"writeEnd",null),(0,r._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,r._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,r._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,r._)([(0,h.r)("start")],p.prototype,"readStart",null),(0,r._)([(0,u.c)("start")],p.prototype,"writeStart",null),p=i=(0,r._)([(0,c.j)("esri.TimeExtent")],p);const d=new p,g=new p({start:void 0,end:void 0}),f=p},5732:(e,t,s)=>{s.d(t,{c:()=>i});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}},46791:(e,t,s)=>{s.d(t,{Z:()=>A});var i,r=s(43697),n=s(3894),l=s(32448),o=s(22974),a=s(70586),h=s(71143);!function(e){e[e.ADD=1]="ADD",e[e.REMOVE=2]="REMOVE",e[e.MOVE=4]="MOVE"}(i||(i={}));var c,u=s(1654),p=s(75215),d=s(58971),g=s(5600),f=s(52421),m=s(52011),b=s(10661);const _=new h.Z(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}},void 0,(e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1})),y=()=>{};function v(e){return e?e instanceof x?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function w(e){if(e&&e.length)return e[0]}function C(e,t,s,i){const r=Math.min(e.length-s,t.length-i);let n=0;for(;n<r&&e[s+n]===t[i+n];)n++;return n}function M(e,t,s,i){t&&t.forEach(((t,r,n)=>{e.push(t),M(e,s.call(i,t,r,n),s,i)}))}const E=new Set,D=new Set,T=new Set,O=new Map;let Z=0,x=c=class extends l.Z.EventedAccessor{static isCollection(e){return null!=e&&e instanceof c}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._timer=null,this._observable=new b.s,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:Z++})}normalizeCtorArgs(e){return e?Array.isArray(e)||e instanceof c?{items:e}:e:{}}destroy(){this._removeAllRaw()}*[Symbol.iterator](){yield*this.items}get items(){return(0,d.it)(this._observable),this._items}set items(e){this._emitBeforeChanges(i.ADD)||(this._splice(0,this.length,v(e)),this._emitAfterChanges(i.ADD))}hasEventListener(e){return"change"===e?this._chgListeners.length>0:this._emitter.hasEventListener(e)}on(e,t){if("change"===e){const e=this._chgListeners,s={removed:!1,callback:t};return e.push(s),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),{remove(){this.remove=y,s.removed=!0,e.splice(e.indexOf(s),1)}}}return this._emitter.on(e,t)}once(e,t){const s=this.on(e,t);return{remove(){s.remove()}}}add(e,t){if((0,d.it)(this._observable),this._emitBeforeChanges(i.ADD))return this;const s=this.getNextIndex(t??null);return this._splice(s,0,[e]),this._emitAfterChanges(i.ADD),this}addMany(e,t=this._items.length){if((0,d.it)(this._observable),!e||!e.length)return this;if(this._emitBeforeChanges(i.ADD))return this;const s=this.getNextIndex(t);return this._splice(s,0,v(e)),this._emitAfterChanges(i.ADD),this}at(e){if((0,d.it)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,d.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return[];const e=this._removeAllRaw();return this._emitAfterChanges(i.REMOVE),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,d.it)(this._observable),this._createNewInstance({items:this._items.map(o.d9)})}concat(...e){(0,d.it)(this._observable);const t=e.map(v);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,d.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const s=(0,a.j0)(this._splice(0,this.length)),r=s.length;for(let i=0;i<r;i++)e.call(t,s[i],i,s);this._emitAfterChanges(i.REMOVE)}every(e,t){return(0,d.it)(this._observable),this._items.every(e,t)}filter(e,t){let s;return(0,d.it)(this._observable),s=2===arguments.length?this._items.filter(e,t):this._items.filter(e),this._createNewInstance({items:s})}find(e,t){return(0,d.it)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,d.it)(this._observable),this._items.findIndex(e,t)}flatten(e,t){(0,d.it)(this._observable);const s=[];return M(s,this,e,t),new c(s)}forEach(e,t){return(0,d.it)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,d.it)(this._observable),this._items[e]}getNextIndex(e){(0,d.it)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,d.it)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,d.it)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,d.it)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,d.it)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,d.it)(this._observable);const s=this._items.map(e,t);return new c({items:s})}reorder(e,t=this.length-1){(0,d.it)(this._observable);const s=this.indexOf(e);if(-1!==s){if(t<0?t=0:t>=this.length&&(t=this.length-1),s!==t){if(this._emitBeforeChanges(i.MOVE))return e;this._splice(s,1),this._splice(t,0,[e]),this._emitAfterChanges(i.MOVE)}return e}}pop(){if((0,d.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const e=w(this._splice(this.length-1,1));return this._emitAfterChanges(i.REMOVE),e}push(...e){return(0,d.it)(this._observable),this._emitBeforeChanges(i.ADD)||(this._splice(this.length,0,e),this._emitAfterChanges(i.ADD)),this.length}reduce(e,t){(0,d.it)(this._observable);const s=this._items;return 2===arguments.length?s.reduce(e,t):s.reduce(e)}reduceRight(e,t){(0,d.it)(this._observable);const s=this._items;return 2===arguments.length?s.reduceRight(e,t):s.reduceRight(e)}remove(e){return(0,d.it)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,d.it)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(i.REMOVE))return;const t=w(this._splice(e,1));return this._emitAfterChanges(i.REMOVE),t}removeMany(e){if((0,d.it)(this._observable),!e||!e.length||this._emitBeforeChanges(i.REMOVE))return[];const t=e instanceof c?e.toArray():e,s=this._items,r=[],n=t.length;for(let e=0;e<n;e++){const i=t[e],n=s.indexOf(i);if(n>-1){const i=1+C(t,s,e+1,n+1),l=this._splice(n,i);l&&l.length>0&&r.push.apply(r,l),e+=i-1}}return this._emitAfterChanges(i.REMOVE),r}reverse(){if((0,d.it)(this._observable),this._emitBeforeChanges(i.MOVE))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(i.MOVE),this}shift(){if((0,d.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const e=w(this._splice(0,1));return this._emitAfterChanges(i.REMOVE),e}slice(e=0,t=this.length){return(0,d.it)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,d.it)(this._observable),this._items.some(e,t)}sort(e){if((0,d.it)(this._observable),!this.length||this._emitBeforeChanges(i.MOVE))return this;const t=(0,a.j0)(this._splice(0,this.length));return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(i.MOVE),this}splice(e,t,...s){(0,d.it)(this._observable);const r=(t?i.REMOVE:0)|(s.length?i.ADD:0);if(this._emitBeforeChanges(r))return[];const n=this._splice(e,t,s)||[];return this._emitAfterChanges(r),n}toArray(){return(0,d.it)(this._observable),this._items.slice()}toJSON(){return(0,d.it)(this._observable),this.toArray()}toLocaleString(){return(0,d.it)(this._observable),this._items.toLocaleString()}toString(){return(0,d.it)(this._observable),this._items.toString()}unshift(...e){return(0,d.it)(this._observable),!e.length||this._emitBeforeChanges(i.ADD)||(this._splice(0,0,e),this._emitAfterChanges(i.ADD)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,s){const i=this._items,r=this.itemType;let n,l;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=(0,u.Os)((()=>this._dispatchChange()))),t){if(l=i.splice(e,t),this.hasEventListener("before-remove")){const t=_.acquire();t.target=this,t.cancellable=!0;for(let s=0,r=l.length;s<r;s++)n=l[s],t.reset(n),this.emit("before-remove",t),t.defaultPrevented&&(l.splice(s,1),i.splice(e,0,n),e+=1,s-=1,r-=1);_.release(t)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const e=_.acquire();e.target=this,e.cancellable=!1;const t=l.length;for(let s=0;s<t;s++)e.reset(l[s]),this.emit("after-remove",e);_.release(e)}}if(s&&s.length){if(r){const e=[];for(const t of s){const s=r.ensureType(t);null==s&&null!=t||e.push(s)}s=e}const t=this.hasEventListener("before-add"),n=this.hasEventListener("after-add"),l=e===this.length;if(t||n){const r=_.acquire();r.target=this,r.cancellable=!0;const o=_.acquire();o.target=this,o.cancellable=!1;for(const a of s)t?(r.reset(a),this.emit("before-add",r),r.defaultPrevented||(l?i.push(a):i.splice(e++,0,a),this._set("length",i.length),n&&(o.reset(a),this.emit("after-add",o)))):(l?i.push(a):i.splice(e++,0,a),this._set("length",i.length),o.reset(a),this.emit("after-add",o));_.release(o),_.release(r)}else{if(l)for(const e of s)i.push(e);else i.splice(e,0,...s);this._set("length",i.length)}}return(s&&s.length||l&&l.length)&&this._notifyChangeEvent(s,l),l}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const s=_.acquire();s.target=this,s.cancellable=!0,s.type=e,this.emit("before-changes",s),t=s.defaultPrevented,_.release(s)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=_.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),_.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;E.clear(),D.clear(),T.clear();for(const{added:t,removed:s}of e){if(t)if(0===T.size&&0===D.size)for(const e of t)E.add(e);else for(const e of t)D.has(e)?(T.add(e),D.delete(e)):T.has(e)||E.add(e);if(s)if(0===T.size&&0===E.size)for(const e of s)D.add(e);else for(const e of s)E.has(e)?E.delete(e):(T.delete(e),D.add(e))}const s=n.Z.acquire();E.forEach((e=>{s.push(e)}));const i=n.Z.acquire();D.forEach((e=>{i.push(e)}));const r=this._items,l=t.items,o=n.Z.acquire();if(T.forEach((e=>{l.indexOf(e)!==r.indexOf(e)&&o.push(e)})),t.listeners&&(s.length||i.length||o.length)){const e={target:this,added:s,removed:i,moved:o},r=t.listeners.length;for(let s=0;s<r;s++){const i=t.listeners[s];i.removed||i.callback.call(this,e)}}n.Z.release(s),n.Z.release(i),n.Z.release(o)}E.clear(),D.clear(),T.clear()}};x.ofType=e=>{if(!e)return c;if(O.has(e))return O.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const s in e.typeMap){const i=e.typeMap[s].prototype.declaredClass;t?t+=` | ${i}`:t=i}let s=class extends c{};return(0,r._)([(0,f.c)({Type:e,ensureType:"function"==typeof e?(0,p.se)(e):(0,p.N7)(e)})],s.prototype,"itemType",void 0),s=(0,r._)([(0,m.j)(`esri.core.Collection<${t}>`)],s),O.set(e,s),s},(0,r._)([(0,g.Cb)()],x.prototype,"length",void 0),(0,r._)([(0,g.Cb)()],x.prototype,"items",null),x=c=(0,r._)([(0,m.j)("esri.core.Collection")],x);const A=x},52421:(e,t,s)=>{function i(e){return(t,s)=>{t[s]=e}}s.d(t,{c:()=>i})},35463:(e,t,s)=>{s.d(t,{JE:()=>l,Nm:()=>n,rJ:()=>o}),s(80442);const i={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},r={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function n(e,t,s){const i=new Date(e.getTime());if(t&&s){const e=r[s],{getter:n,setter:l,multiplier:o}=e;if("months"===s){const e=function(e,t){const s=new Date(e,t+1,1);return s.setDate(0),s.getDate()}(i.getFullYear(),i.getMonth()+t);i.getDate()>e&&i.setDate(e)}i[l](i[n]()+t*o)}return i}function l(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function o(e,t,s){return 0===e?0:e*i[t]/i[s]}},2723:(e,t,s)=>{s.r(t),s.d(t,{default:()=>Z});var i,r=s(43697),n=(s(66577),s(3172)),l=s(20102),o=s(35454),a=s(16453),h=s(5600),c=(s(75215),s(67676),s(80442),s(52011)),u=s(82971),p=s(6570),d=s(24470),g=s(87085),f=s(71612),m=s(34760),b=s(72965),_=s(90082),y=s(11145);const v=new(s(43077).f)("0/0/0",0,0,0,void 0);let w=i=class extends((0,f.h)((0,b.M)((0,m.Q)(g.Z)))){constructor(){super(...arguments),this.tileInfo=y.Z.create({spatialReference:u.Z.WebMercator,size:256}),this.type="base-tile",this.fullExtent=new p.Z(-20037508.342787,-20037508.34278,20037508.34278,20037508.342787,u.Z.WebMercator),this.spatialReference=u.Z.WebMercator}getTileBounds(e,t,s,i){const r=i||(0,d.Ue)();return v.level=e,v.row=t,v.col=s,v.extent=r,this.tileInfo.updateTileInfo(v),v.extent=void 0,r}fetchTile(e,t,s,i={}){const{signal:r}=i,l=this.getTileUrl(e,t,s),o={responseType:"image",signal:r,query:{...this.refreshParameters}};return(0,n.default)(l??"",o).then((e=>e.data))}async fetchImageBitmapTile(e,t,s,r={}){const{signal:o}=r;if(this.fetchTile!==i.prototype.fetchTile){const i=await this.fetchTile(e,t,s,r);try{return createImageBitmap(i)}catch(i){throw new l.Z("request:server",`Unable to load tile ${e}/${t}/${s}`,{error:i,level:e,row:t,col:s})}}const a=this.getTileUrl(e,t,s)??"",h={responseType:"blob",signal:o,query:{...this.refreshParameters}},{data:c}=await(0,n.default)(a,h);return(0,_.g)(c,a)}getTileUrl(){throw new l.Z("basetilelayer:gettileurl-not-implemented","getTileUrl() is not implemented")}};(0,r._)([(0,h.Cb)({type:y.Z})],w.prototype,"tileInfo",void 0),(0,r._)([(0,h.Cb)({type:["show","hide"]})],w.prototype,"listMode",void 0),(0,r._)([(0,h.Cb)({readOnly:!0,value:"base-tile"})],w.prototype,"type",void 0),(0,r._)([(0,h.Cb)({nonNullable:!0})],w.prototype,"fullExtent",void 0),(0,r._)([(0,h.Cb)()],w.prototype,"spatialReference",void 0),w=i=(0,r._)([(0,c.j)("esri.layers.BaseTileLayer")],w);const C=w;var M=s(38009),E=s(39450),D=s(94139);const T=new o.X({BingMapsAerial:"aerial",BingMapsRoad:"road",BingMapsHybrid:"hybrid"});let O=class extends((0,f.h)((0,M.q)((0,a.R)(C)))){constructor(e){super(e),this.type="bing-maps",this.tileInfo=new y.Z({size:[256,256],dpi:96,origin:new D.Z({x:-20037508.342787,y:20037508.342787,spatialReference:u.Z.WebMercator}),spatialReference:u.Z.WebMercator,lods:[new E.Z({level:1,resolution:78271.5169639999,scale:295828763.795777}),new E.Z({level:2,resolution:39135.7584820001,scale:147914381.897889}),new E.Z({level:3,resolution:19567.8792409999,scale:73957190.948944}),new E.Z({level:4,resolution:9783.93962049996,scale:36978595.474472}),new E.Z({level:5,resolution:4891.96981024998,scale:18489297.737236}),new E.Z({level:6,resolution:2445.98490512499,scale:9244648.868618}),new E.Z({level:7,resolution:1222.99245256249,scale:4622324.434309}),new E.Z({level:8,resolution:611.49622628138,scale:2311162.217155}),new E.Z({level:9,resolution:305.748113140558,scale:1155581.108577}),new E.Z({level:10,resolution:152.874056570411,scale:577790.554289}),new E.Z({level:11,resolution:76.4370282850732,scale:288895.277144}),new E.Z({level:12,resolution:38.2185141425366,scale:144447.638572}),new E.Z({level:13,resolution:19.1092570712683,scale:72223.819286}),new E.Z({level:14,resolution:9.55462853563415,scale:36111.909643}),new E.Z({level:15,resolution:4.77731426794937,scale:18055.954822}),new E.Z({level:16,resolution:2.38865713397468,scale:9027.977411}),new E.Z({level:17,resolution:1.19432856685505,scale:4513.988705}),new E.Z({level:18,resolution:.597164283559817,scale:2256.994353}),new E.Z({level:19,resolution:.298582141647617,scale:1128.497176}),new E.Z({level:20,resolution:.1492910708238085,scale:564.248588})]}),this.key=null,this.style="road",this.culture="en-US",this.region=null,this.portalUrl=null,this.hasAttributionData=!0}get bingMetadata(){return this._get("bingMetadata")}set bingMetadata(e){this._set("bingMetadata",e)}get copyright(){return null!=this.bingMetadata?this.bingMetadata.copyright:null}get operationalLayerType(){return T.toJSON(this.style)}get bingLogo(){return null!=this.bingMetadata?this.bingMetadata.brandLogoUri:null}load(e){return this.key?this.addResolvingPromise(this._getMetadata()):this.portalUrl?this.addResolvingPromise(this._getPortalBingKey().then((()=>this._getMetadata()))):this.addResolvingPromise(Promise.reject(new l.Z("bingmapslayer:load","Bing layer must have bing key."))),Promise.resolve(this)}getTileUrl(e,t,s){if(!this.loaded||null==this.bingMetadata)return null;const i=this.bingMetadata.resourceSets[0].resources[0],r=i.imageUrlSubdomains[t%i.imageUrlSubdomains.length],n=this._getQuadKey(e,t,s);return i.imageUrl.replace("{subdomain}",r).replace("{quadkey}",n)}async fetchAttributionData(){return this.load().then((()=>null==this.bingMetadata?null:{contributors:this.bingMetadata.resourceSets[0].resources[0].imageryProviders.map((e=>({attribution:e.attribution,coverageAreas:e.coverageAreas.map((e=>({zoomMin:e.zoomMin,zoomMax:e.zoomMax,score:1,bbox:[e.bbox[0],e.bbox[1],e.bbox[2],e.bbox[3]]})))})))}))}_getMetadata(){const e={road:"roadOnDemand",aerial:"aerial",hybrid:"aerialWithLabelsOnDemand"}[this.style];return(0,n.default)(`https://dev.virtualearth.net/REST/v1/Imagery/Metadata/${e}`,{responseType:"json",query:{include:"ImageryProviders",uriScheme:"https",key:this.key,suppressStatus:!0,output:"json",culture:this.culture,userRegion:this.region}}).then((e=>{const t=e.data;if(200!==t.statusCode)throw new l.Z("bingmapslayer:getmetadata",t.statusDescription);if(this.bingMetadata=t,0===this.bingMetadata.resourceSets.length)throw new l.Z("bingmapslayer:getmetadata","no bing resourcesets");if(0===this.bingMetadata.resourceSets[0].resources.length)throw new l.Z("bingmapslayer:getmetadata","no bing resources")})).catch((e=>{throw new l.Z("bingmapslayer:getmetadata",e.message)}))}_getPortalBingKey(){return(0,n.default)(this.portalUrl??"",{responseType:"json",authMode:"no-prompt",query:{f:"json"}}).then((e=>{if(!e.data.bingKey)throw new l.Z("bingmapslayer:getportalbingkey","The referenced Portal does not contain a valid bing key");this.key=e.data.bingKey})).catch((e=>{throw new l.Z("bingmapslayer:getportalbingkey",e.message)}))}_getQuadKey(e,t,s){let i="";for(let r=e;r>0;r--){let e=0;const n=1<<r-1;0!=(s&n)&&(e+=1),0!=(t&n)&&(e+=2),i+=e.toString()}return i}};(0,r._)([(0,h.Cb)({json:{read:!1,write:!1},value:null})],O.prototype,"bingMetadata",null),(0,r._)([(0,h.Cb)({json:{read:!1,write:!1},value:"bing-maps",readOnly:!0})],O.prototype,"type",void 0),(0,r._)([(0,h.Cb)({type:y.Z})],O.prototype,"tileInfo",void 0),(0,r._)([(0,h.Cb)({type:String,readOnly:!0,json:{read:!1,write:!1}})],O.prototype,"copyright",null),(0,r._)([(0,h.Cb)({type:String,json:{write:!1,read:!1}})],O.prototype,"key",void 0),(0,r._)([(0,h.Cb)({type:T.apiValues,nonNullable:!0,json:{read:{source:"layerType",reader:T.read}}})],O.prototype,"style",void 0),(0,r._)([(0,h.Cb)({type:["BingMapsAerial","BingMapsHybrid","BingMapsRoad"]})],O.prototype,"operationalLayerType",null),(0,r._)([(0,h.Cb)({type:String,json:{write:!1,read:!1}})],O.prototype,"culture",void 0),(0,r._)([(0,h.Cb)({type:String,json:{write:!1,read:!1}})],O.prototype,"region",void 0),(0,r._)([(0,h.Cb)({type:String,json:{write:!0,read:!0}})],O.prototype,"portalUrl",void 0),(0,r._)([(0,h.Cb)({type:Boolean,json:{write:!1,read:!1}})],O.prototype,"hasAttributionData",void 0),(0,r._)([(0,h.Cb)({type:String,readOnly:!0})],O.prototype,"bingLogo",null),O=(0,r._)([(0,c.j)("esri.layers.BingMapsLayer")],O);const Z=O},34760:(e,t,s)=>{s.d(t,{Q:()=>b});var i=s(43697),r=s(92604),n=s(95330),l=s(5600),o=(s(75215),s(67676),s(80442),s(52011)),a=s(46791),h=(s(20102),s(26258),s(87538));const c=new a.Z,u=new WeakMap;function p(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e}function d(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:d(t,e%t):0}let g=0,f=0;function m(){const e=Date.now();for(const t of c)t.refreshInterval&&e-(u.get(t)??0)+5>=6e4*t.refreshInterval&&(u.set(t,e),t.refresh(e))}(0,h.EH)((()=>{const e=Date.now();let t=0;for(const s of c)t=d(Math.round(6e4*s.refreshInterval),t),s.refreshInterval?u.get(s)||u.set(s,e):u.delete(s);if(t!==f){if(f=t,clearInterval(g),0===f)return void(g=0);g=setInterval(m,f)}}));const b=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,n.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{!function(e){p(e)&&c.push(e)}(this)}),(()=>{}))}destroy(){p(this)&&c.includes(this)&&c.remove(this)}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,n.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{r.Z.getLogger(this.declaredClass).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}};return(0,i._)([(0,l.Cb)({type:Number,cast:e=>e>=.1?e:e<=0?0:.1,json:{write:!0}})],t.prototype,"refreshInterval",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,i._)([(0,l.Cb)()],t.prototype,"refreshParameters",null),t=(0,i._)([(0,o.j)("esri.layers.mixins.RefreshableLayer")],t),t}},39450:(e,t,s)=>{s.d(t,{Z:()=>c});var i,r=s(43697),n=s(96674),l=s(5600),o=s(75215),a=(s(67676),s(80442),s(52011));let h=i=class extends n.wq{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new i({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,r._)([(0,l.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],h.prototype,"cols",void 0),(0,r._)([(0,l.Cb)({type:o.z8,json:{write:!0}})],h.prototype,"level",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],h.prototype,"levelValue",void 0),(0,r._)([(0,l.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],h.prototype,"origin",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],h.prototype,"resolution",void 0),(0,r._)([(0,l.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],h.prototype,"rows",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],h.prototype,"scale",void 0),h=i=(0,r._)([(0,a.j)("esri.layers.support.LOD")],h);const c=h},11145:(e,t,s)=>{s.d(t,{Z:()=>E});var i,r=s(43697),n=s(35454),l=s(96674),o=s(67900),a=s(5600),h=s(75215),c=(s(67676),s(80442),s(71715)),u=s(52011),p=s(30556),d=s(94139),g=s(82971),f=s(24470),m=s(8744),b=s(40488),_=s(39450),y=s(43077);const v=new n.X({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let w=i=class extends l.wq{static create(e={}){const{resolutionFactor:t=1,scales:s,size:r=256,spatialReference:n=g.Z.WebMercator,numLODs:l=24}=e;if(!(0,m.JY)(n)){const e=[];if(s)for(let t=0;t<s.length;t++){const i=s[t];e.push(new _.Z({level:t,scale:i,resolution:i}))}else{let t=5e-4;for(let s=l-1;s>=0;s--)e.unshift(new _.Z({level:s,scale:t,resolution:t})),t*=2}return new i({dpi:96,lods:e,origin:new d.Z(0,0,n),size:[r,r],spatialReference:n})}const a=(0,m.C5)(n),h=e.origin?new d.Z({x:e.origin.x,y:e.origin.y,spatialReference:n}):new d.Z(a?{x:a.origin[0],y:a.origin[1],spatialReference:n}:{x:0,y:0,spatialReference:n}),c=1/(39.37*(0,o.c9)(n)*96),u=[];if(s)for(let e=0;e<s.length;e++){const t=s[e],i=t*c;u.push(new _.Z({level:e,scale:t,resolution:i}))}else{let e=(0,m.sT)(n)?512/r*591657527.5917094:256/r*591657527.591555;const s=Math.ceil(l/t);u.push(new _.Z({level:0,scale:e,resolution:e*c}));for(let i=1;i<s;i++){const s=e/2**t,r=s*c;u.push(new _.Z({level:i,scale:s,resolution:r})),e=s}}return new i({dpi:96,lods:u,origin:h,size:[r,r],spatialReference:n})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.minScale=0,this.maxScale=0,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const s=(0,m.C5)(e);return e.isWrappable&&!!s&&Math.abs(s.origin[0]-t.x)<=s.dx}return!1}readOrigin(e,t){return d.Z.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,s=0;const i=[],r=this._levelToLOD={};e&&(t=-1/0,s=1/0,e.forEach((e=>{i.push(e.scale),t=e.scale>t?e.scale:t,s=e.scale<s?e.scale:s,r[e.level]=e}))),this._set("scales",i),this._set("minScale",t),this._set("maxScale",s),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const s=Math.floor(e),i=s+1;return t[s]/(t[s]/t[i])**(e-s)}scaleToZoom(e){const t=this.scales,s=t.length-1;let i=0;for(;i<s;i++){const s=t[i],r=t[i+1];if(s<=e)return i;if(r===e)return i+1;if(s>e&&r<e)return i+Math.log(s/e)/Math.log(s/r)}return i}snapScale(e,t=.95){const s=this.scaleToZoom(e);return s%Math.floor(s)>=t?this.zoomToScale(Math.ceil(s)):this.zoomToScale(Math.floor(s))}tileAt(e,t,s,i){const r=this.lodAt(e);if(!r)return null;let n,l;if("number"==typeof t)n=t,l=s;else if((0,m.fS)(t.spatialReference,this.spatialReference))n=t.x,l=t.y,i=s;else{const e=(0,b.iV)(t,this.spatialReference);if(null==e)return null;n=e.x,l=e.y,i=s}const o=r.resolution*this.size[0],a=r.resolution*this.size[1];return i||(i=new y.f(null,0,0,0,(0,f.Ue)())),i.level=e,i.row=Math.floor((this.origin.y-l)/a+.001),i.col=Math.floor((n-this.origin.x)/o+.001),this.updateTileInfo(i),i}updateTileInfo(e,t=i.ExtrapolateOptions.NONE){let s=this.lodAt(e.level);if(!s&&t===i.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(s=t)}if(!s)return;const r=e.level-s.level,n=s.resolution*this.size[0]/2**r,l=s.resolution*this.size[1]/2**r;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,f.Ue)()),e.extent[0]=this.origin.x+e.col*n,e.extent[1]=this.origin.y-(e.row+1)*l,e.extent[2]=e.extent[0]+n,e.extent[3]=e.extent[1]+l}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const s=this.lodAt(t.level);if(null==s)return null;const{resolution:i}=s,r=i*this.size[0],n=i*this.size[1];return e[0]=this.origin.x+t.col*r,e[1]=this.origin.y-(t.row+1)*n,e[2]=e[0]+r,e[3]=e[1]+n,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return i.fromJSON(this.write({}))}getOrCreateCompatible(e,t){if(256===this.size[0]&&256===this.size[1])return 256===e?this:null;const s=[],r=this.lods.length;for(let e=0;e<r;e++){const i=this.lods[e],r=i.resolution*t;s.push(new _.Z({level:i.level,scale:i.scale,resolution:r}))}return new i({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:s})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let s=0;s<e.length;s++){const i=e[s];this._upsampleLevels[i.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/i.resolution:0},t=i}}};var C,M;(0,r._)([(0,a.Cb)({type:Number,json:{write:!0}})],w.prototype,"compressionQuality",void 0),(0,r._)([(0,a.Cb)({type:Number,json:{write:!0}})],w.prototype,"dpi",void 0),(0,r._)([(0,a.Cb)({type:String,json:{read:v.read,write:v.write,origins:{"web-scene":{read:!1,write:!1}}}})],w.prototype,"format",void 0),(0,r._)([(0,a.Cb)({readOnly:!0})],w.prototype,"isWrappable",null),(0,r._)([(0,a.Cb)({type:d.Z,json:{write:!0}})],w.prototype,"origin",void 0),(0,r._)([(0,c.r)("origin")],w.prototype,"readOrigin",null),(0,r._)([(0,a.Cb)({type:[_.Z],value:null,json:{write:!0}})],w.prototype,"lods",null),(0,r._)([(0,a.Cb)({readOnly:!0})],w.prototype,"minScale",void 0),(0,r._)([(0,a.Cb)({readOnly:!0})],w.prototype,"maxScale",void 0),(0,r._)([(0,a.Cb)({readOnly:!0})],w.prototype,"scales",void 0),(0,r._)([(0,a.Cb)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],w.prototype,"size",void 0),(0,r._)([(0,c.r)("size",["rows","cols"])],w.prototype,"readSize",null),(0,r._)([(0,p.c)("size",{cols:{type:h.z8},rows:{type:h.z8}})],w.prototype,"writeSize",null),(0,r._)([(0,a.Cb)({type:g.Z,json:{write:!0}})],w.prototype,"spatialReference",void 0),w=i=(0,r._)([(0,u.j)("esri.layers.support.TileInfo")],w),(M=(C=w||(w={})).ExtrapolateOptions||(C.ExtrapolateOptions={}))[M.NONE=0]="NONE",M[M.POWER_OF_TWO=1]="POWER_OF_TWO";const E=w},43077:(e,t,s)=>{s.d(t,{f:()=>i});class i{constructor(e,t,s,i,r=undefined){this.id=e,this.level=t,this.row=s,this.col=i,this.extent=r}}},90082:(e,t,s)=>{s.d(t,{g:()=>r});var i=s(20102);async function r(e,t){try{return await createImageBitmap(e)}catch(e){throw new i.Z("request:server",`Unable to load ${t}`,{url:t,error:e})}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8153],{92835:(e,t,s)=>{s.d(t,{Z:()=>f});var i,r=s(43697),n=s(96674),l=s(70586),o=s(35463),a=s(5600),h=(s(75215),s(67676),s(80442),s(71715)),c=s(52011),u=s(30556);let d=i=class extends n.wq{static get allTime(){return p}static get empty(){return g}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=null!=this.start?this.start.getTime():this.start,s=null!=this.end?this.end.getTime():this.end,i=null!=e.start?e.start.getTime():e.start,r=null!=e.end?e.end.getTime():e.end;return t===i&&s===r}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();const t=(0,l.yw)(this.start,(t=>(0,o.JE)(t,e))),s=(0,l.yw)(this.end,(t=>{const s=(0,o.JE)(t,e);return t.getTime()===s.getTime()?s:(0,o.Nm)(s,1,e)}));return new i({start:t,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,s=this.end?.getTime()??1/0,r=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let l,o;if(r>=t&&r<=s?l=r:t>=r&&t<=n&&(l=t),s>=r&&s<=n?o=s:n>=t&&n<=s&&(o=n),null!=l&&null!=o&&!isNaN(l)&&!isNaN(o)){const e=new i;return e.start=l===-1/0?null:new Date(l),e.end=o===1/0?null:new Date(o),e}return i.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const s=new i,{start:r,end:n}=this;return null!=r&&(s.start=(0,o.Nm)(r,e,t)),null!=n&&(s.end=(0,o.Nm)(n,e,t)),s}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,s=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:s})}};(0,r._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,r._)([(0,h.r)("end")],d.prototype,"readEnd",null),(0,r._)([(0,u.c)("end")],d.prototype,"writeEnd",null),(0,r._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,r._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,r._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,r._)([(0,h.r)("start")],d.prototype,"readStart",null),(0,r._)([(0,u.c)("start")],d.prototype,"writeStart",null),d=i=(0,r._)([(0,c.j)("esri.TimeExtent")],d);const p=new d,g=new d({start:void 0,end:void 0}),f=d},5732:(e,t,s)=>{s.d(t,{c:()=>i});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}},46791:(e,t,s)=>{s.d(t,{Z:()=>A});var i,r=s(43697),n=s(3894),l=s(32448),o=s(22974),a=s(70586),h=s(71143);!function(e){e[e.ADD=1]="ADD",e[e.REMOVE=2]="REMOVE",e[e.MOVE=4]="MOVE"}(i||(i={}));var c,u=s(1654),d=s(75215),p=s(58971),g=s(5600),f=s(52421),m=s(52011),b=s(10661);const _=new h.Z(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}},void 0,(e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1})),y=()=>{};function v(e){return e?e instanceof x?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function w(e){if(e&&e.length)return e[0]}function C(e,t,s,i){const r=Math.min(e.length-s,t.length-i);let n=0;for(;n<r&&e[s+n]===t[i+n];)n++;return n}function M(e,t,s,i){t&&t.forEach(((t,r,n)=>{e.push(t),M(e,s.call(i,t,r,n),s,i)}))}const E=new Set,D=new Set,T=new Set,O=new Map;let Z=0,x=c=class extends l.Z.EventedAccessor{static isCollection(e){return null!=e&&e instanceof c}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._timer=null,this._observable=new b.s,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:Z++})}normalizeCtorArgs(e){return e?Array.isArray(e)||e instanceof c?{items:e}:e:{}}destroy(){this._removeAllRaw()}*[Symbol.iterator](){yield*this.items}get items(){return(0,p.it)(this._observable),this._items}set items(e){this._emitBeforeChanges(i.ADD)||(this._splice(0,this.length,v(e)),this._emitAfterChanges(i.ADD))}hasEventListener(e){return"change"===e?this._chgListeners.length>0:this._emitter.hasEventListener(e)}on(e,t){if("change"===e){const e=this._chgListeners,s={removed:!1,callback:t};return e.push(s),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),{remove(){this.remove=y,s.removed=!0,e.splice(e.indexOf(s),1)}}}return this._emitter.on(e,t)}once(e,t){const s=this.on(e,t);return{remove(){s.remove()}}}add(e,t){if((0,p.it)(this._observable),this._emitBeforeChanges(i.ADD))return this;const s=this.getNextIndex(t??null);return this._splice(s,0,[e]),this._emitAfterChanges(i.ADD),this}addMany(e,t=this._items.length){if((0,p.it)(this._observable),!e||!e.length)return this;if(this._emitBeforeChanges(i.ADD))return this;const s=this.getNextIndex(t);return this._splice(s,0,v(e)),this._emitAfterChanges(i.ADD),this}at(e){if((0,p.it)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,p.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return[];const e=this._removeAllRaw();return this._emitAfterChanges(i.REMOVE),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,p.it)(this._observable),this._createNewInstance({items:this._items.map(o.d9)})}concat(...e){(0,p.it)(this._observable);const t=e.map(v);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,p.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const s=(0,a.j0)(this._splice(0,this.length)),r=s.length;for(let i=0;i<r;i++)e.call(t,s[i],i,s);this._emitAfterChanges(i.REMOVE)}every(e,t){return(0,p.it)(this._observable),this._items.every(e,t)}filter(e,t){let s;return(0,p.it)(this._observable),s=2===arguments.length?this._items.filter(e,t):this._items.filter(e),this._createNewInstance({items:s})}find(e,t){return(0,p.it)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,p.it)(this._observable),this._items.findIndex(e,t)}flatten(e,t){(0,p.it)(this._observable);const s=[];return M(s,this,e,t),new c(s)}forEach(e,t){return(0,p.it)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,p.it)(this._observable),this._items[e]}getNextIndex(e){(0,p.it)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,p.it)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,p.it)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,p.it)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,p.it)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,p.it)(this._observable);const s=this._items.map(e,t);return new c({items:s})}reorder(e,t=this.length-1){(0,p.it)(this._observable);const s=this.indexOf(e);if(-1!==s){if(t<0?t=0:t>=this.length&&(t=this.length-1),s!==t){if(this._emitBeforeChanges(i.MOVE))return e;this._splice(s,1),this._splice(t,0,[e]),this._emitAfterChanges(i.MOVE)}return e}}pop(){if((0,p.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const e=w(this._splice(this.length-1,1));return this._emitAfterChanges(i.REMOVE),e}push(...e){return(0,p.it)(this._observable),this._emitBeforeChanges(i.ADD)||(this._splice(this.length,0,e),this._emitAfterChanges(i.ADD)),this.length}reduce(e,t){(0,p.it)(this._observable);const s=this._items;return 2===arguments.length?s.reduce(e,t):s.reduce(e)}reduceRight(e,t){(0,p.it)(this._observable);const s=this._items;return 2===arguments.length?s.reduceRight(e,t):s.reduceRight(e)}remove(e){return(0,p.it)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,p.it)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(i.REMOVE))return;const t=w(this._splice(e,1));return this._emitAfterChanges(i.REMOVE),t}removeMany(e){if((0,p.it)(this._observable),!e||!e.length||this._emitBeforeChanges(i.REMOVE))return[];const t=e instanceof c?e.toArray():e,s=this._items,r=[],n=t.length;for(let e=0;e<n;e++){const i=t[e],n=s.indexOf(i);if(n>-1){const i=1+C(t,s,e+1,n+1),l=this._splice(n,i);l&&l.length>0&&r.push.apply(r,l),e+=i-1}}return this._emitAfterChanges(i.REMOVE),r}reverse(){if((0,p.it)(this._observable),this._emitBeforeChanges(i.MOVE))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(i.MOVE),this}shift(){if((0,p.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const e=w(this._splice(0,1));return this._emitAfterChanges(i.REMOVE),e}slice(e=0,t=this.length){return(0,p.it)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,p.it)(this._observable),this._items.some(e,t)}sort(e){if((0,p.it)(this._observable),!this.length||this._emitBeforeChanges(i.MOVE))return this;const t=(0,a.j0)(this._splice(0,this.length));return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(i.MOVE),this}splice(e,t,...s){(0,p.it)(this._observable);const r=(t?i.REMOVE:0)|(s.length?i.ADD:0);if(this._emitBeforeChanges(r))return[];const n=this._splice(e,t,s)||[];return this._emitAfterChanges(r),n}toArray(){return(0,p.it)(this._observable),this._items.slice()}toJSON(){return(0,p.it)(this._observable),this.toArray()}toLocaleString(){return(0,p.it)(this._observable),this._items.toLocaleString()}toString(){return(0,p.it)(this._observable),this._items.toString()}unshift(...e){return(0,p.it)(this._observable),!e.length||this._emitBeforeChanges(i.ADD)||(this._splice(0,0,e),this._emitAfterChanges(i.ADD)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,s){const i=this._items,r=this.itemType;let n,l;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=(0,u.Os)((()=>this._dispatchChange()))),t){if(l=i.splice(e,t),this.hasEventListener("before-remove")){const t=_.acquire();t.target=this,t.cancellable=!0;for(let s=0,r=l.length;s<r;s++)n=l[s],t.reset(n),this.emit("before-remove",t),t.defaultPrevented&&(l.splice(s,1),i.splice(e,0,n),e+=1,s-=1,r-=1);_.release(t)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const e=_.acquire();e.target=this,e.cancellable=!1;const t=l.length;for(let s=0;s<t;s++)e.reset(l[s]),this.emit("after-remove",e);_.release(e)}}if(s&&s.length){if(r){const e=[];for(const t of s){const s=r.ensureType(t);null==s&&null!=t||e.push(s)}s=e}const t=this.hasEventListener("before-add"),n=this.hasEventListener("after-add"),l=e===this.length;if(t||n){const r=_.acquire();r.target=this,r.cancellable=!0;const o=_.acquire();o.target=this,o.cancellable=!1;for(const a of s)t?(r.reset(a),this.emit("before-add",r),r.defaultPrevented||(l?i.push(a):i.splice(e++,0,a),this._set("length",i.length),n&&(o.reset(a),this.emit("after-add",o)))):(l?i.push(a):i.splice(e++,0,a),this._set("length",i.length),o.reset(a),this.emit("after-add",o));_.release(o),_.release(r)}else{if(l)for(const e of s)i.push(e);else i.splice(e,0,...s);this._set("length",i.length)}}return(s&&s.length||l&&l.length)&&this._notifyChangeEvent(s,l),l}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const s=_.acquire();s.target=this,s.cancellable=!0,s.type=e,this.emit("before-changes",s),t=s.defaultPrevented,_.release(s)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=_.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),_.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;E.clear(),D.clear(),T.clear();for(const{added:t,removed:s}of e){if(t)if(0===T.size&&0===D.size)for(const e of t)E.add(e);else for(const e of t)D.has(e)?(T.add(e),D.delete(e)):T.has(e)||E.add(e);if(s)if(0===T.size&&0===E.size)for(const e of s)D.add(e);else for(const e of s)E.has(e)?E.delete(e):(T.delete(e),D.add(e))}const s=n.Z.acquire();E.forEach((e=>{s.push(e)}));const i=n.Z.acquire();D.forEach((e=>{i.push(e)}));const r=this._items,l=t.items,o=n.Z.acquire();if(T.forEach((e=>{l.indexOf(e)!==r.indexOf(e)&&o.push(e)})),t.listeners&&(s.length||i.length||o.length)){const e={target:this,added:s,removed:i,moved:o},r=t.listeners.length;for(let s=0;s<r;s++){const i=t.listeners[s];i.removed||i.callback.call(this,e)}}n.Z.release(s),n.Z.release(i),n.Z.release(o)}E.clear(),D.clear(),T.clear()}};x.ofType=e=>{if(!e)return c;if(O.has(e))return O.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const s in e.typeMap){const i=e.typeMap[s].prototype.declaredClass;t?t+=` | ${i}`:t=i}let s=class extends c{};return(0,r._)([(0,f.c)({Type:e,ensureType:"function"==typeof e?(0,d.se)(e):(0,d.N7)(e)})],s.prototype,"itemType",void 0),s=(0,r._)([(0,m.j)(`esri.core.Collection<${t}>`)],s),O.set(e,s),s},(0,r._)([(0,g.Cb)()],x.prototype,"length",void 0),(0,r._)([(0,g.Cb)()],x.prototype,"items",null),x=c=(0,r._)([(0,m.j)("esri.core.Collection")],x);const A=x},52421:(e,t,s)=>{function i(e){return(t,s)=>{t[s]=e}}s.d(t,{c:()=>i})},35463:(e,t,s)=>{s.d(t,{JE:()=>l,Nm:()=>n,rJ:()=>o}),s(80442);const i={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},r={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function n(e,t,s){const i=new Date(e.getTime());if(t&&s){const e=r[s],{getter:n,setter:l,multiplier:o}=e;if("months"===s){const e=function(e,t){const s=new Date(e,t+1,1);return s.setDate(0),s.getDate()}(i.getFullYear(),i.getMonth()+t);i.getDate()>e&&i.setDate(e)}i[l](i[n]()+t*o)}return i}function l(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function o(e,t,s){return 0===e?0:e*i[t]/i[s]}},2723:(e,t,s)=>{s.r(t),s.d(t,{default:()=>Z});var i,r=s(43697),n=(s(66577),s(3172)),l=s(20102),o=s(35454),a=s(16453),h=s(5600),c=(s(75215),s(67676),s(80442),s(52011)),u=s(82971),d=s(6570),p=s(24470),g=s(87085),f=s(71612),m=s(34760),b=s(72965),_=s(90082),y=s(11145);const v=new(s(43077).f)("0/0/0",0,0,0,void 0);let w=i=class extends((0,f.h)((0,b.M)((0,m.Q)(g.Z)))){constructor(){super(...arguments),this.tileInfo=y.Z.create({spatialReference:u.Z.WebMercator,size:256}),this.type="base-tile",this.fullExtent=new d.Z(-20037508.342787,-20037508.34278,20037508.34278,20037508.342787,u.Z.WebMercator),this.spatialReference=u.Z.WebMercator}getTileBounds(e,t,s,i){const r=i||(0,p.Ue)();return v.level=e,v.row=t,v.col=s,v.extent=r,this.tileInfo.updateTileInfo(v),v.extent=void 0,r}fetchTile(e,t,s,i={}){const{signal:r}=i,l=this.getTileUrl(e,t,s),o={responseType:"image",signal:r,query:{...this.refreshParameters}};return(0,n.default)(l??"",o).then((e=>e.data))}async fetchImageBitmapTile(e,t,s,r={}){const{signal:o}=r;if(this.fetchTile!==i.prototype.fetchTile){const i=await this.fetchTile(e,t,s,r);try{return createImageBitmap(i)}catch(i){throw new l.Z("request:server",`Unable to load tile ${e}/${t}/${s}`,{error:i,level:e,row:t,col:s})}}const a=this.getTileUrl(e,t,s)??"",h={responseType:"blob",signal:o,query:{...this.refreshParameters}},{data:c}=await(0,n.default)(a,h);return(0,_.g)(c,a)}getTileUrl(){throw new l.Z("basetilelayer:gettileurl-not-implemented","getTileUrl() is not implemented")}};(0,r._)([(0,h.Cb)({type:y.Z})],w.prototype,"tileInfo",void 0),(0,r._)([(0,h.Cb)({type:["show","hide"]})],w.prototype,"listMode",void 0),(0,r._)([(0,h.Cb)({readOnly:!0,value:"base-tile"})],w.prototype,"type",void 0),(0,r._)([(0,h.Cb)({nonNullable:!0})],w.prototype,"fullExtent",void 0),(0,r._)([(0,h.Cb)()],w.prototype,"spatialReference",void 0),w=i=(0,r._)([(0,c.j)("esri.layers.BaseTileLayer")],w);const C=w;var M=s(38009),E=s(39450),D=s(94139);const T=new o.X({BingMapsAerial:"aerial",BingMapsRoad:"road",BingMapsHybrid:"hybrid"});let O=class extends((0,f.h)((0,M.q)((0,a.R)(C)))){constructor(e){super(e),this.type="bing-maps",this.tileInfo=new y.Z({size:[256,256],dpi:96,origin:new D.Z({x:-20037508.342787,y:20037508.342787,spatialReference:u.Z.WebMercator}),spatialReference:u.Z.WebMercator,lods:[new E.Z({level:1,resolution:78271.5169639999,scale:295828763.795777}),new E.Z({level:2,resolution:39135.7584820001,scale:147914381.897889}),new E.Z({level:3,resolution:19567.8792409999,scale:73957190.948944}),new E.Z({level:4,resolution:9783.93962049996,scale:36978595.474472}),new E.Z({level:5,resolution:4891.96981024998,scale:18489297.737236}),new E.Z({level:6,resolution:2445.98490512499,scale:9244648.868618}),new E.Z({level:7,resolution:1222.99245256249,scale:4622324.434309}),new E.Z({level:8,resolution:611.49622628138,scale:2311162.217155}),new E.Z({level:9,resolution:305.748113140558,scale:1155581.108577}),new E.Z({level:10,resolution:152.874056570411,scale:577790.554289}),new E.Z({level:11,resolution:76.4370282850732,scale:288895.277144}),new E.Z({level:12,resolution:38.2185141425366,scale:144447.638572}),new E.Z({level:13,resolution:19.1092570712683,scale:72223.819286}),new E.Z({level:14,resolution:9.55462853563415,scale:36111.909643}),new E.Z({level:15,resolution:4.77731426794937,scale:18055.954822}),new E.Z({level:16,resolution:2.38865713397468,scale:9027.977411}),new E.Z({level:17,resolution:1.19432856685505,scale:4513.988705}),new E.Z({level:18,resolution:.597164283559817,scale:2256.994353}),new E.Z({level:19,resolution:.298582141647617,scale:1128.497176}),new E.Z({level:20,resolution:.1492910708238085,scale:564.248588})]}),this.key=null,this.style="road",this.culture="en-US",this.region=null,this.portalUrl=null,this.hasAttributionData=!0}get bingMetadata(){return this._get("bingMetadata")}set bingMetadata(e){this._set("bingMetadata",e)}get copyright(){return null!=this.bingMetadata?this.bingMetadata.copyright:null}get operationalLayerType(){return T.toJSON(this.style)}get bingLogo(){return null!=this.bingMetadata?this.bingMetadata.brandLogoUri:null}load(e){return this.key?this.addResolvingPromise(this._getMetadata()):this.portalUrl?this.addResolvingPromise(this._getPortalBingKey().then((()=>this._getMetadata()))):this.addResolvingPromise(Promise.reject(new l.Z("bingmapslayer:load","Bing layer must have bing key."))),Promise.resolve(this)}getTileUrl(e,t,s){if(!this.loaded||null==this.bingMetadata)return null;const i=this.bingMetadata.resourceSets[0].resources[0],r=i.imageUrlSubdomains[t%i.imageUrlSubdomains.length],n=this._getQuadKey(e,t,s);return i.imageUrl.replace("{subdomain}",r).replace("{quadkey}",n)}async fetchAttributionData(){return this.load().then((()=>null==this.bingMetadata?null:{contributors:this.bingMetadata.resourceSets[0].resources[0].imageryProviders.map((e=>({attribution:e.attribution,coverageAreas:e.coverageAreas.map((e=>({zoomMin:e.zoomMin,zoomMax:e.zoomMax,score:1,bbox:[e.bbox[0],e.bbox[1],e.bbox[2],e.bbox[3]]})))})))}))}_getMetadata(){const e={road:"roadOnDemand",aerial:"aerial",hybrid:"aerialWithLabelsOnDemand"}[this.style];return(0,n.default)(`https://dev.virtualearth.net/REST/v1/Imagery/Metadata/${e}`,{responseType:"json",query:{include:"ImageryProviders",uriScheme:"https",key:this.key,suppressStatus:!0,output:"json",culture:this.culture,userRegion:this.region}}).then((e=>{const t=e.data;if(200!==t.statusCode)throw new l.Z("bingmapslayer:getmetadata",t.statusDescription);if(this.bingMetadata=t,0===this.bingMetadata.resourceSets.length)throw new l.Z("bingmapslayer:getmetadata","no bing resourcesets");if(0===this.bingMetadata.resourceSets[0].resources.length)throw new l.Z("bingmapslayer:getmetadata","no bing resources")})).catch((e=>{throw new l.Z("bingmapslayer:getmetadata",e.message)}))}_getPortalBingKey(){return(0,n.default)(this.portalUrl??"",{responseType:"json",authMode:"no-prompt",query:{f:"json"}}).then((e=>{if(!e.data.bingKey)throw new l.Z("bingmapslayer:getportalbingkey","The referenced Portal does not contain a valid bing key");this.key=e.data.bingKey})).catch((e=>{throw new l.Z("bingmapslayer:getportalbingkey",e.message)}))}_getQuadKey(e,t,s){let i="";for(let r=e;r>0;r--){let e=0;const n=1<<r-1;0!=(s&n)&&(e+=1),0!=(t&n)&&(e+=2),i+=e.toString()}return i}};(0,r._)([(0,h.Cb)({json:{read:!1,write:!1},value:null})],O.prototype,"bingMetadata",null),(0,r._)([(0,h.Cb)({json:{read:!1,write:!1},value:"bing-maps",readOnly:!0})],O.prototype,"type",void 0),(0,r._)([(0,h.Cb)({type:y.Z})],O.prototype,"tileInfo",void 0),(0,r._)([(0,h.Cb)({type:String,readOnly:!0,json:{read:!1,write:!1}})],O.prototype,"copyright",null),(0,r._)([(0,h.Cb)({type:String,json:{write:!1,read:!1}})],O.prototype,"key",void 0),(0,r._)([(0,h.Cb)({type:T.apiValues,nonNullable:!0,json:{read:{source:"layerType",reader:T.read}}})],O.prototype,"style",void 0),(0,r._)([(0,h.Cb)({type:["BingMapsAerial","BingMapsHybrid","BingMapsRoad"]})],O.prototype,"operationalLayerType",null),(0,r._)([(0,h.Cb)({type:String,json:{write:!1,read:!1}})],O.prototype,"culture",void 0),(0,r._)([(0,h.Cb)({type:String,json:{write:!1,read:!1}})],O.prototype,"region",void 0),(0,r._)([(0,h.Cb)({type:String,json:{write:!0,read:!0}})],O.prototype,"portalUrl",void 0),(0,r._)([(0,h.Cb)({type:Boolean,json:{write:!1,read:!1}})],O.prototype,"hasAttributionData",void 0),(0,r._)([(0,h.Cb)({type:String,readOnly:!0})],O.prototype,"bingLogo",null),O=(0,r._)([(0,c.j)("esri.layers.BingMapsLayer")],O);const Z=O},34760:(e,t,s)=>{s.d(t,{Q:()=>b});var i=s(43697),r=s(92604),n=s(95330),l=s(5600),o=(s(75215),s(67676),s(80442),s(52011)),a=s(46791),h=(s(20102),s(26258),s(87538));const c=new a.Z,u=new WeakMap;function d(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e}function p(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:p(t,e%t):0}let g=0,f=0;function m(){const e=Date.now();for(const t of c)t.refreshInterval&&e-(u.get(t)??0)+5>=6e4*t.refreshInterval&&(u.set(t,e),t.refresh(e))}(0,h.EH)((()=>{const e=Date.now();let t=0;for(const s of c)t=p(Math.round(6e4*s.refreshInterval),t),s.refreshInterval?u.get(s)||u.set(s,e):u.delete(s);if(t!==f){if(f=t,clearInterval(g),0===f)return void(g=0);g=setInterval(m,f)}}));const b=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,n.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||function(e){d(e)&&c.push(e)}(this)}),(()=>{}))}destroy(){d(this)&&c.includes(this)&&c.remove(this)}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,n.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{r.Z.getLogger(this.declaredClass).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}};return(0,i._)([(0,l.Cb)({type:Number,cast:e=>e>=.1?e:e<=0?0:.1,json:{write:!0}})],t.prototype,"refreshInterval",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,i._)([(0,l.Cb)()],t.prototype,"refreshParameters",null),t=(0,i._)([(0,o.j)("esri.layers.mixins.RefreshableLayer")],t),t}},39450:(e,t,s)=>{s.d(t,{Z:()=>c});var i,r=s(43697),n=s(96674),l=s(5600),o=s(75215),a=(s(67676),s(80442),s(52011));let h=i=class extends n.wq{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new i({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,r._)([(0,l.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],h.prototype,"cols",void 0),(0,r._)([(0,l.Cb)({type:o.z8,json:{write:!0}})],h.prototype,"level",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],h.prototype,"levelValue",void 0),(0,r._)([(0,l.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],h.prototype,"origin",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],h.prototype,"resolution",void 0),(0,r._)([(0,l.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],h.prototype,"rows",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],h.prototype,"scale",void 0),h=i=(0,r._)([(0,a.j)("esri.layers.support.LOD")],h);const c=h},11145:(e,t,s)=>{s.d(t,{Z:()=>E});var i,r=s(43697),n=s(35454),l=s(96674),o=s(67900),a=s(5600),h=s(75215),c=(s(67676),s(80442),s(71715)),u=s(52011),d=s(30556),p=s(94139),g=s(82971),f=s(24470),m=s(8744),b=s(40488),_=s(39450),y=s(43077);const v=new n.X({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let w=i=class extends l.wq{static create(e={}){const{resolutionFactor:t=1,scales:s,size:r=256,spatialReference:n=g.Z.WebMercator,numLODs:l=24}=e;if(!(0,m.JY)(n)){const e=[];if(s)for(let t=0;t<s.length;t++){const i=s[t];e.push(new _.Z({level:t,scale:i,resolution:i}))}else{let t=5e-4;for(let s=l-1;s>=0;s--)e.unshift(new _.Z({level:s,scale:t,resolution:t})),t*=2}return new i({dpi:96,lods:e,origin:new p.Z(0,0,n),size:[r,r],spatialReference:n})}const a=(0,m.C5)(n),h=e.origin?new p.Z({x:e.origin.x,y:e.origin.y,spatialReference:n}):new p.Z(a?{x:a.origin[0],y:a.origin[1],spatialReference:n}:{x:0,y:0,spatialReference:n}),c=1/(39.37*(0,o.c9)(n)*96),u=[];if(s)for(let e=0;e<s.length;e++){const t=s[e],i=t*c;u.push(new _.Z({level:e,scale:t,resolution:i}))}else{let e=(0,m.sT)(n)?512/r*591657527.5917094:256/r*591657527.591555;const s=Math.ceil(l/t);u.push(new _.Z({level:0,scale:e,resolution:e*c}));for(let i=1;i<s;i++){const s=e/2**t,r=s*c;u.push(new _.Z({level:i,scale:s,resolution:r})),e=s}}return new i({dpi:96,lods:u,origin:h,size:[r,r],spatialReference:n})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.minScale=0,this.maxScale=0,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const s=(0,m.C5)(e);return e.isWrappable&&!!s&&Math.abs(s.origin[0]-t.x)<=s.dx}return!1}readOrigin(e,t){return p.Z.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,s=0;const i=[],r=this._levelToLOD={};e&&(t=-1/0,s=1/0,e.forEach((e=>{i.push(e.scale),t=e.scale>t?e.scale:t,s=e.scale<s?e.scale:s,r[e.level]=e}))),this._set("scales",i),this._set("minScale",t),this._set("maxScale",s),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const s=Math.floor(e),i=s+1;return t[s]/(t[s]/t[i])**(e-s)}scaleToZoom(e){const t=this.scales,s=t.length-1;let i=0;for(;i<s;i++){const s=t[i],r=t[i+1];if(s<=e)return i;if(r===e)return i+1;if(s>e&&r<e)return i+Math.log(s/e)/Math.log(s/r)}return i}snapScale(e,t=.95){const s=this.scaleToZoom(e);return s%Math.floor(s)>=t?this.zoomToScale(Math.ceil(s)):this.zoomToScale(Math.floor(s))}tileAt(e,t,s,i){const r=this.lodAt(e);if(!r)return null;let n,l;if("number"==typeof t)n=t,l=s;else if((0,m.fS)(t.spatialReference,this.spatialReference))n=t.x,l=t.y,i=s;else{const e=(0,b.iV)(t,this.spatialReference);if(null==e)return null;n=e.x,l=e.y,i=s}const o=r.resolution*this.size[0],a=r.resolution*this.size[1];return i||(i=new y.f(null,0,0,0,(0,f.Ue)())),i.level=e,i.row=Math.floor((this.origin.y-l)/a+.001),i.col=Math.floor((n-this.origin.x)/o+.001),this.updateTileInfo(i),i}updateTileInfo(e,t=i.ExtrapolateOptions.NONE){let s=this.lodAt(e.level);if(!s&&t===i.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(s=t)}if(!s)return;const r=e.level-s.level,n=s.resolution*this.size[0]/2**r,l=s.resolution*this.size[1]/2**r;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,f.Ue)()),e.extent[0]=this.origin.x+e.col*n,e.extent[1]=this.origin.y-(e.row+1)*l,e.extent[2]=e.extent[0]+n,e.extent[3]=e.extent[1]+l}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const s=this.lodAt(t.level);if(null==s)return null;const{resolution:i}=s,r=i*this.size[0],n=i*this.size[1];return e[0]=this.origin.x+t.col*r,e[1]=this.origin.y-(t.row+1)*n,e[2]=e[0]+r,e[3]=e[1]+n,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return i.fromJSON(this.write({}))}getOrCreateCompatible(e,t){if(256===this.size[0]&&256===this.size[1])return 256===e?this:null;const s=[],r=this.lods.length;for(let e=0;e<r;e++){const i=this.lods[e],r=i.resolution*t;s.push(new _.Z({level:i.level,scale:i.scale,resolution:r}))}return new i({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:s})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let s=0;s<e.length;s++){const i=e[s];this._upsampleLevels[i.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/i.resolution:0},t=i}}};var C,M;(0,r._)([(0,a.Cb)({type:Number,json:{write:!0}})],w.prototype,"compressionQuality",void 0),(0,r._)([(0,a.Cb)({type:Number,json:{write:!0}})],w.prototype,"dpi",void 0),(0,r._)([(0,a.Cb)({type:String,json:{read:v.read,write:v.write,origins:{"web-scene":{read:!1,write:!1}}}})],w.prototype,"format",void 0),(0,r._)([(0,a.Cb)({readOnly:!0})],w.prototype,"isWrappable",null),(0,r._)([(0,a.Cb)({type:p.Z,json:{write:!0}})],w.prototype,"origin",void 0),(0,r._)([(0,c.r)("origin")],w.prototype,"readOrigin",null),(0,r._)([(0,a.Cb)({type:[_.Z],value:null,json:{write:!0}})],w.prototype,"lods",null),(0,r._)([(0,a.Cb)({readOnly:!0})],w.prototype,"minScale",void 0),(0,r._)([(0,a.Cb)({readOnly:!0})],w.prototype,"maxScale",void 0),(0,r._)([(0,a.Cb)({readOnly:!0})],w.prototype,"scales",void 0),(0,r._)([(0,a.Cb)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],w.prototype,"size",void 0),(0,r._)([(0,c.r)("size",["rows","cols"])],w.prototype,"readSize",null),(0,r._)([(0,d.c)("size",{cols:{type:h.z8},rows:{type:h.z8}})],w.prototype,"writeSize",null),(0,r._)([(0,a.Cb)({type:g.Z,json:{write:!0}})],w.prototype,"spatialReference",void 0),w=i=(0,r._)([(0,u.j)("esri.layers.support.TileInfo")],w),(M=(C=w||(w={})).ExtrapolateOptions||(C.ExtrapolateOptions={}))[M.NONE=0]="NONE",M[M.POWER_OF_TWO=1]="POWER_OF_TWO";const E=w},43077:(e,t,s)=>{s.d(t,{f:()=>i});class i{constructor(e,t,s,i,r=undefined){this.id=e,this.level=t,this.row=s,this.col=i,this.extent=r}}},90082:(e,t,s)=>{s.d(t,{g:()=>r});var i=s(20102);async function r(e,t){try{return await createImageBitmap(e)}catch(e){throw new i.Z("request:server",`Unable to load ${t}`,{url:t,error:e})}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9291],{79291:(e,t,l)=>{l.r(t),l.d(t,{build:()=>s.b}),l(13598),l(1391),l(62707),l(55039),l(51546),l(77171),l(47624),l(
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9291],{79291:(e,t,l)=>{l.r(t),l.d(t,{build:()=>s.b}),l(13598),l(1391),l(62707),l(55039),l(51546),l(77171),l(47624),l(60624),l(37099),l(76056),l(135),l(11317),l(15719),l(92555),l(89136),l(15817),l(72160),l(89753),l(5802),l(42001),l(19419),l(26322),l(85504),l(22539),l(57806),l(92302),l(85787),l(90692),l(93669),l(172),l(71250),l(21437),l(74709),l(8319),l(33680),l(98069),l(93144),l(35065);var s=l(32078)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7873],{97873:(e,t,r)=>{r.r(t),r.d(t,{addOrUpdateResource:()=>l,contentToBlob:()=>d,fetchResources:()=>n,getSiblingOfSameType:()=>m,getSiblingOfSameTypeI:()=>h,removeAllResources:()=>c,removeResource:()=>u,splitPrefixFileNameAndExtension:()=>p});var a=r(3172),s=r(20102),o=r(17452);async function n(e,t={},r){await e.load(r);const a=(0,o.v_)(e.itemUrl,"resources"),{start:s=1,num:n=10,sortOrder:l="asc",sortField:u="created"}=t,c={query:{start:s,num:n,sortOrder:l,sortField:u,token:e.apiKey},signal:r?.signal},i=await e.portal.request(a,c);return{total:i.total,nextStart:i.nextStart,resources:i.resources.map((({created:t,size:r,resource:a})=>({created:new Date(t),size:r,resource:e.resourceFromPath(a)})))}}async function l(e,t,r,a){if(!e.hasPath())throw new s.Z(`portal-item-resource-${t}:invalid-path`,"Resource does not have a valid path");const n=e.portalItem;await n.load(a);const l=(0,o.v_)(n.userItemUrl,"add"===t?"addResources":"updateResources"),[u,c]=i(e.path),p=await d(r),m=new FormData;return u&&"."!==u&&m.append("resourcesPrefix",u),null!=a&&a.compress&&m.append("compress","true"),m.append("fileName",c),m.append("file",p,c),m.append("f","json"),null!=a&&a.access&&m.append("access",a.access),await n.portal.request(l,{method:"post",body:m,signal:a?.signal}),e}async function u(e,t,r){if(!t.hasPath())throw new s.Z("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await e.load(r);const a=(0,o.v_)(e.userItemUrl,"removeResources");await e.portal.request(a,{method:"post",query:{resource:t.path},signal:r?.signal}),t.portalItem=null}async function c(e,t){await e.load(t);const r=(0,o.v_)(e.userItemUrl,"removeResources");return e.portal.request(r,{method:"post",query:{deleteAll:!0},signal:t?.signal})}function i(e){const t=e.lastIndexOf("/");return-1===t?[".",e]:[e.slice(0,t),e.slice(t+1)]}function p(e){const[t,r]=function(e){const t=(0,o.Ml)(e);return null==t?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[a,s]=i(t);return[a,s,r]}async function d(e){return e instanceof Blob?e:(await(0,a.default)(e.url,{responseType:"blob"})).data}function m(e,t){if(!e.hasPath())return null;const[r,,a]=p(e.path);return e.portalItem.resourceFromPath((0,o.v_)(r,t+a))}function h(e,t){if(!e.hasPath())return null;const[r,,a]=p(e.path);return e.portalItem.resourceFromPath((0,o.v_)(r,t+a))}}}]);
|