@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1400],{43697:(t,e,r)=>{function n(t,e,r,n){var s,i=arguments.length,o=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o}r.d(e,{_:()=>n})},15923:(t,e,r)=>{r.d(e,{Z:()=>z});var n=r(61247),s=r(70586),i=r(88022),o=r(67723),a=r(7628),c=(r(80442),r(22974)),l=r(92604),u=r(71143),h=r(97831),f=r(42100),d=r(31263),p=r(58971),y=r(44550);class g{constructor(t,e,r){this.properties=t,this.propertyName=e,this.metadata=r,this.observerObject=new _,this._accessed=null,this._handles=null,this._finalizationToken={},this.observerObject.flags=y.v.Dirty|(r.nonNullable?y.v.NonNullable:0)|(r.hasOwnProperty("value")?y.v.HasDefaultValue:0)|(void 0===r.get?y.v.DepTrackingInitialized:0)|(void 0===r.dependsOn?y.v.AutoTracked:0),v.register(this,new WeakRef(this.observerObject),this._finalizationToken)}destroy(){v.unregister(this._finalizationToken),this.observerObject.destroy(),this._accessed=null,this._clearObservationHandles()}getComputed(){const t=this.observerObject;(0,p.it)(t);const e=this.properties.store,r=this.propertyName,n=t.flags,s=e.get(r);if(n&y.v.Computing)return s;if(~n&y.v.Dirty&&e.has(r))return s;t.flags|=y.v.Computing;const i=this.properties.host;let o;n&y.v.AutoTracked?o=(0,p.LJ)(this,this.metadata.get,i):((0,p.GF)(i,this),o=this.metadata.get.call(i)),e.set(r,o,d.s3.COMPUTED);const a=e.get(r);return a===s?t.flags&=~y.v.Dirty:(0,p.gb)(this.commit,this),t.flags&=~y.v.Computing,a}onObservableAccessed(t){t!==this.observerObject&&(null===this._accessed&&(this._accessed=[]),this._accessed.includes(t)||this._accessed.push(t))}onTrackingEnd(){this._clearObservationHandles();const t=this.observerObject;t.flags|=y.v.DepTrackingInitialized;const e=this._accessed;if(null===e)return;let r=this._handles;null===r&&(r=this._handles=[]);for(let n=0;n<e.length;++n)r.push(e[n].observe(t));e.length=0}notifyChange(){const t=this.observerObject;t.onInvalidated(),t.onCommitted()}invalidate(){this.observerObject.onInvalidated()}commit(){const t=this.observerObject;t.flags&=~y.v.Dirty,t.onCommitted()}_clearObservationHandles(){const t=this._handles;if(null!==t){for(let e=0;e<t.length;++e)t[e].remove();t.length=0}}}class _ extends f.s{constructor(){super(...arguments),this.flags=0}onInvalidated(){~this.flags&y.v.Overriden&&(this.flags|=y.v.Dirty);const t=this._observers;if(t&&t.length>0)for(const e of t)e.onInvalidated()}onCommitted(){const t=this._observers;if(t&&t.length>0){const e=t.slice();for(const t of e)t.onCommitted()}}destroy(){this.flags&y.v.Dirty&&this.onCommitted(),super.destroy()}}const v=new FinalizationRegistry((t=>{t.deref()?.destroy()}));class m{constructor(){this._values=new Map,this.multipleOriginsSupported=!1}clone(t){const e=new m;return this._values.forEach(((r,n)=>{t&&t.has(n)||e.set(n,(0,c.d9)(r))})),e}get(t){return this._values.get(t)}originOf(){return d.s3.USER}keys(){return[...this._values.keys()]}set(t,e){this._values.set(t,e)}delete(t){this._values.delete(t)}has(t){return this._values.has(t)}forEach(t){this._values.forEach(t)}}var b=r(1153);function w(t,e,r){return void 0!==t}function O(t,e,r,n){return!(void 0===t||null==r&&t.observerObject.flags&y.v.NonNullable&&(n.lifecycle,h.F.INITIALIZING,1))}function A(t){return t&&"function"==typeof t.destroy}l.Z.getLogger("esri.core.accessorSupport.Properties");class j{constructor(t){this.host=t,this.properties=new Map,this.ctorArgs=null,this.destroyed=!1,this.lifecycle=h.F.INITIALIZING,this.store=new m,this._origin=d.s3.USER;const e=(0,s.j0)(this.host.constructor.__accessorMetadata__);for(const t in e){const r=new g(this,t,e[t]);this.properties.set(t,r)}this.metadatas=e}initialize(){this.lifecycle=h.F.CONSTRUCTING}constructed(){this.lifecycle=h.F.CONSTRUCTED}destroy(){this.destroyed=!0;for(const[t,e]of this.properties){if(e.metadata.autoDestroy){const r=this.internalGet(t);r&&A(r)&&(r.destroy(),~e.observerObject.flags&y.v.NonNullable&&this._internalSet(e,null))}e.destroy()}}get initialized(){return this.lifecycle!==h.F.INITIALIZING}get(t){const e=this.properties.get(t);if(e.metadata.get)return e.getComputed();(0,p.it)(e.observerObject);const r=this.store;return r.has(t)?r.get(t):e.metadata.value}originOf(t){const e=this.store.originOf(t);if(void 0===e){const e=this.properties.get(t);if(void 0!==e&&e.observerObject.flags&y.v.HasDefaultValue)return"defaults"}return(0,d.x3)(e)}has(t){return!!this.properties.has(t)&&this.store.has(t)}keys(){return[...this.properties.keys()]}internalGet(t){const e=this.properties.get(t);if(w(e))return this.store.has(t)?this.store.get(t):e.metadata.value}internalSet(t,e){const r=this.properties.get(t);w(r)&&this._internalSet(r,e)}getDependsInfo(t,e,r){const n=this.properties.get(e);if(!w(n))return"";const s=new Set,i=(0,p.LJ)({onObservableAccessed:t=>s.add(t),onTrackingEnd:()=>{}},(()=>n.metadata.get?.call(t)));let o=`${r}${t.declaredClass.split(".").pop()}.${e}: ${i}\n`;if(0===s.size)return o;r+=" ";for(const t of s){if(!(t instanceof g))continue;const e=t.properties.host,n=t.propertyName,s=(0,b.vw)(e);o+=s?s.getDependsInfo(e,n,r):`${r}${n}: undefined\n`}return o}setAtOrigin(t,e,r){const n=this.properties.get(t);if(w(n))return this._setAtOrigin(n,e,r)}isOverridden(t){const e=this.properties.get(t);return void 0!==e&&!!(e.observerObject.flags&y.v.Overriden)}clearOverride(t){const e=this.properties.get(t),r=e?.observerObject;r&&r.flags&y.v.Overriden&&(r.flags&=~y.v.Overriden,e.notifyChange())}override(t,e){const r=this.properties.get(t);if(!O(r,0,e,this))return;const n=r.metadata.cast;if(n){const t=this._cast(n,e),{valid:r,value:s}=t;if(S.release(t),!r)return;e=s}r.observerObject.flags|=y.v.Overriden,this._internalSet(r,e)}set(t,e){const r=this.properties.get(t);if(!O(r,0,e,this))return;const n=r.metadata.cast;if(n){const t=this._cast(n,e),{valid:r,value:s}=t;if(S.release(t),!r)return;e=s}const s=r.metadata.set;s?s.call(this.host,e):this._internalSet(r,e)}setDefaultOrigin(t){this._origin=(0,d.M9)(t)}getDefaultOrigin(){return(0,d.x3)(this._origin)}notifyChange(t){const e=this.properties.get(t);void 0!==e&&e.notifyChange()}invalidate(t){const e=this.properties.get(t);void 0!==e&&e.invalidate()}commit(t){const e=this.properties.get(t);void 0!==e&&e.commit()}_internalSet(t,e){const r=this.lifecycle!==h.F.INITIALIZING?this._origin:d.s3.DEFAULTS;this._setAtOrigin(t,e,r)}_setAtOrigin(t,e,r){const n=this.store,s=t.propertyName;n.has(s,r)&&(0,c.fS)(e,n.get(s))&&~t.observerObject.flags&y.v.Overriden&&r===n.originOf(s)||(t.invalidate(),n.set(s,e,r),t.commit(),(0,p.mS)(this.host,t))}_cast(t,e){const r=S.acquire();return r.valid=!0,r.value=e,t&&(r.value=t.call(this.host,e,r)),r}}const S=new u.Z(class{constructor(){this.value=null,this.valid=!0}acquire(){this.valid=!0}release(){this.value=null}});var T,k,E=r(37697),N=r(26258),C=r(5600),I=r(52011);function M(t){if(null==t)return{value:t};if(Array.isArray(t))return{type:[t[0]],value:null};switch(typeof t){case"object":return t.constructor?.__accessorMetadata__||t instanceof Date?{type:t.constructor,value:t}:t;case"boolean":return{type:Boolean,value:t};case"string":return{type:String,value:t};case"number":return{type:Number,value:t};case"function":return{type:t,value:null};default:return}}const D=Symbol("Accessor-Handles"),U=Symbol("Accessor-Initialized");class z{static createSubclass(t={}){if(Array.isArray(t))throw new Error("Multi-inheritance unsupported since 4.16");const{properties:e,declaredClass:r,constructor:n}=t;delete t.declaredClass,delete t.properties,delete t.constructor;const s=this;class i extends s{constructor(...t){super(...t),this.inherited=null,n&&n.apply(this,t)}}(0,a.fp)(i.prototype);for(const e in t){const r=t[e];i.prototype[e]="function"==typeof r?function(...t){const n=this.inherited;let i;this.inherited=function(...t){if(s.prototype[e])return s.prototype[e].apply(this,t)};try{i=r.apply(this,t)}catch(t){throw this.inherited=n,t}return this.inherited=n,i}:t[e]}for(const t in e){const r=M(e[t]);(0,C.Cb)(r)(i.prototype,t)}return(0,I.j)(r)(i)}constructor(...t){if(this[T]=null,this[k]=!1,this.constructor===z)throw new Error("[accessor] cannot instantiate Accessor. This can be fixed by creating a subclass of Accessor");Object.defineProperty(this,"__accessor__",{enumerable:!1,value:new j(this)}),t.length>0&&this.normalizeCtorArgs&&(this.__accessor__.ctorArgs=this.normalizeCtorArgs.apply(this,t))}postscript(t){const e=this.__accessor__,r=e.ctorArgs||t;e.initialize(),r&&(this.set(r),e.ctorArgs=null),e.constructed(),this.initialize(),this[U]=!0}initialize(){}[i.F](){this[D]=(0,s.SC)(this[D])}destroy(){this.destroyed||((0,N.BT)(this),this.__accessor__.destroy())}get constructed(){return this.__accessor__&&this.__accessor__.initialized||!1}get initialized(){return this[U]}get destroyed(){return this.__accessor__&&this.__accessor__.destroyed||!1}commitProperty(t){this.get(t)}get(t){return(0,o.U2)(this,t)}hasOwnProperty(t){return this.__accessor__?this.__accessor__.has(t):Object.prototype.hasOwnProperty.call(this,t)}keys(){return this.__accessor__?this.__accessor__.keys():[]}set(t,e){return(0,E.t)(this,t,e),this}watch(t,e,r){return(0,N.YP)(this,t,e,r)}own(t){this.addHandles(t)}addHandles(t,e){if(this.destroyed){const e=Array.isArray(t)?t:[t];for(const t of e)t.remove();return}let r=this[D];null==r&&(r=this[D]=new n.Z),r.add(t,e)}removeHandles(t){const e=this[D];null!=e&&e.remove(t)}removeAllHandles(){const t=this[D];null!=t&&t.removeAll()}hasHandles(t){const e=this[D];return null!=e&&e.has(t)}_override(t,e){void 0===e?this.__accessor__.clearOverride(t):this.__accessor__.override(t,e)}_clearOverride(t){return this.__accessor__.clearOverride(t)}_overrideIfSome(t,e){null==e?this.__accessor__.clearOverride(t):this.__accessor__.override(t,e)}_isOverridden(t){return this.__accessor__.isOverridden(t)}notifyChange(t){this.__accessor__.notifyChange(t)}_get(t){return this.__accessor__.internalGet(t)}_set(t,e){return this.__accessor__.internalSet(t,e),this}}T=D,k=U},3894:(t,e,r)=>{r.d(e,{Z:()=>i});var n=r(71143);function s(t){t.length=0}class i{constructor(t=50,e=50){this._pool=new n.Z(Array,void 0,s,e,t)}acquire(){return this._pool.acquire()}release(t){this._pool.release(t)}prune(){this._pool.prune(0)}static acquire(){return o.acquire()}static release(t){return o.release(t)}static prune(){o.prune()}}const o=new i(100)},61247:(t,e,r)=>{r.d(e,{Z:()=>i});var n=r(66374),s=r(70586);class i{constructor(){this._groups=new Map}destroy(){this.removeAll()}get size(){let t=0;return this._groups.forEach((e=>{t+=e.length})),t}add(t,e){if((0,n.TW)(t)){const r=this._getOrCreateGroup(e);for(const e of t)this._isHandle(e)&&r.push(e)}else this._isHandle(t)&&this._getOrCreateGroup(e).push(t);return this}forEach(t,e){if("function"==typeof t)this._groups.forEach((e=>e.forEach(t)));else{const r=this._getGroup(t);r&&e&&r.forEach(e)}}has(t){return this._groups.has(this._ensureGroupKey(t))}remove(t){if("string"!=typeof t&&(0,n.TW)(t)){for(const e of t)this.remove(e);return this}return this.has(t)?(this._removeAllFromGroup(this._getGroup(t)),this._groups.delete(this._ensureGroupKey(t)),this):this}removeAll(){return this._groups.forEach((t=>this._removeAllFromGroup(t))),this._groups.clear(),this}_isHandle(t){return t&&!!t.remove}_getOrCreateGroup(t){if(this.has(t))return this._getGroup(t);const e=[];return this._groups.set(this._ensureGroupKey(t),e),e}_getGroup(t){return(0,s.j0)(this._groups.get(this._ensureGroupKey(t)))}_ensureGroupKey(t){return t||"_default_"}_removeAllFromGroup(t){t.forEach((t=>t.remove()))}}},96674:(t,e,r)=>{r.d(e,{wq:()=>_,eC:()=>y});var n=r(43697),s=r(15923),i=r(70586),o=r(22974),a=r(31263);class c{constructor(){this._values=new Map,this.multipleOriginsSupported=!1}clone(t){const e=new c;return this._values.forEach(((r,n)=>{t&&t.has(n)||e.set(n,(0,o.d9)(r.value),r.origin)})),e}get(t,e){e=this._normalizeOrigin(e);const r=this._values.get(t);return null==e||r?.origin===e?r?.value:void 0}originOf(t){return this._values.get(t)?.origin??a.s3.USER}keys(t){t=this._normalizeOrigin(t);const e=[...this._values.keys()];return null==t?e:e.filter((e=>this._values.get(e)?.origin===t))}set(t,e,r){if((r=this._normalizeOrigin(r))===a.s3.DEFAULTS){const e=this._values.get(t);if(e&&null!=e.origin&&e.origin>r)return}this._values.set(t,new l(e,r))}delete(t,e){null!=(e=this._normalizeOrigin(e))&&this._values.get(t)?.origin!==e||this._values.delete(t)}has(t,e){return null!=(e=this._normalizeOrigin(e))?this._values.get(t)?.origin===e:this._values.has(t)}forEach(t){this._values.forEach((({value:e},r)=>t(e,r)))}_normalizeOrigin(t){if(null!=t)return t===a.s3.DEFAULTS?t:a.s3.USER}}class l{constructor(t,e){this.value=t,this.origin=e}}var u=r(41103),h=r(50549),f=r(1153),d=r(76169),p=r(52011);const y=t=>{let e=class extends t{constructor(...t){super(...t);const e=(0,i.j0)((0,f.vw)(this)),r=e.store,n=new c;e.store=n,(0,u.M)(e,r,n)}read(t,e){(0,h.i)(this,t,e)}write(t,e){return(0,d.c)(this,t??{},e)}toJSON(t){return this.write({},t)}static fromJSON(t,e){return g.call(this,t,e)}};return e=(0,n._)([(0,p.j)("esri.core.JSONSupport")],e),e.prototype.toJSON.isDefaultToJSON=!0,e};function g(t,e){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");const r=new this;return r.read(t,e),r}let _=class extends(y(s.Z)){};_=(0,n._)([(0,p.j)("esri.core.JSONSupport")],_)},30175:(t,e,r)=>{function n(t,e,r){const n=t.get(e);if(void 0!==n)return n;const s=r();return t.set(e,s),s}r.d(e,{s1:()=>n})},71143:(t,e,r)=>{r.d(e,{Z:()=>n});class n{constructor(t,e,r,n=1,s=0){if(this._ctor=t,this._acquireFunction=e,this._releaseFunction=r,this.allocationSize=n,this._pool=new Array(s),this._initialSize=s,this._ctor)for(let t=0;t<s;t++)this._pool[t]=new this._ctor;this.allocationSize=Math.max(n,1)}destroy(){this.prune(0)}acquire(...t){let e;if(n.test.disabled)e=new this._ctor;else{if(0===this._pool.length){const t=this.allocationSize;for(let e=0;e<t;e++)this._pool[e]=new this._ctor}e=this._pool.pop()}return this._acquireFunction?this._acquireFunction(e,...t):function(t){return t&&t.acquire&&"function"==typeof t.acquire}(e)&&e.acquire(...t),e}release(t){var e;t&&!n.test.disabled&&(this._releaseFunction?this._releaseFunction(t):(e=t)&&e.release&&"function"==typeof e.release&&t.release(),this._pool.push(t))}prune(t=this._initialSize){if(!(t>=this._pool.length)){for(let e=t;e<this._pool.length;++e){const t=this._pool[e];this._dispose(t)}this._pool.length=t}}_dispose(t){t.dispose&&"function"==typeof t.dispose&&t.dispose()}}n.test={disabled:!1}},54790:(t,e,r)=>{r.d(e,{Z:()=>n});class n{constructor(t,e=30){this.name=t,this._counter=0,this._samples=new Array(e)}record(t){null!=t&&(this._samples[++this._counter%this._samples.length]=t)}get median(){return this._samples.slice().sort(((t,e)=>t-e))[Math.floor(this._samples.length/2)]}get average(){return this._samples.reduce(((t,e)=>t+e),0)/this._samples.length}get last(){return this._samples[this._counter%this._samples.length]}}},44553:(t,e,r)=>{r.d(e,{Z:()=>c});var n,s=r(67676);!function(t){const e=(t,e,r,n)=>{let s=e,i=e;const o=r>>>1,a=t[s-1];for(;i<=o;){i=s<<1,i<r&&n(t[i-1],t[i])<0&&++i;const e=t[i-1];if(n(e,a)<=0)break;t[s-1]=e,s=i}t[s-1]=a},r=(t,e)=>t<e?-1:t>e?1:0;t.sort=function(t,n,s,i){void 0===n&&(n=0),void 0===s&&(s=t.length),void 0===i&&(i=r);for(let r=s>>>1;r>n;r--)e(t,r,s,i);const o=n+1;for(let r=s-1;r>n;r--){const s=t[n];t[n]=t[r],t[r]=s,e(t,o,r,i)}},t.iterableSort=function*(t,n,s,i){void 0===n&&(n=0),void 0===s&&(s=t.length),void 0===i&&(i=r);for(let r=s>>>1;r>n;r--)e(t,r,s,i),yield;const o=n+1;for(let r=s-1;r>n;r--){const s=t[n];t[n]=t[r],t[r]=s,e(t,o,r,i),yield}}}(n||(n={}));const i=n,o=1.5,a=1.1;class c{constructor(t){this.data=[],this._length=0,this._allocator=void 0,this._deallocator=()=>null,this._shrink=()=>{},this._hint=new s.SO,t&&(t.initialSize&&(this.data=new Array(t.initialSize)),t.allocator&&(this._allocator=t.allocator),void 0!==t.deallocator&&(this._deallocator=t.deallocator),t.shrink&&(this._shrink=()=>l(this)))}toArray(){return this.data.slice(0,this.length)}filter(t){const e=new Array;for(let r=0;r<this._length;r++){const n=this.data[r];t(n)&&e.push(n)}return e}getItemAt(t){if(!(t<0||t>=this._length))return this.data[t]}includes(t,e){const r=this.data.indexOf(t,e);return-1!==r&&r<this.length}get length(){return this._length}set length(t){if(t>this._length){if(this._allocator){for(;this._length<t;)this.data[this._length++]=this._allocator(this.data[this._length]);return}this._length=t}else{if(this._deallocator)for(let e=t;e<this._length;++e)this.data[e]=this._deallocator(this.data[e]);this._length=t,this._shrink()}}clear(){this.length=0}prune(){this.clear(),this.data=[]}push(t){this.data[this._length++]=t}pushArray(t,e=t.length){for(let r=0;r<e;r++)this.data[this._length++]=t[r]}fill(t,e){for(let r=0;r<e;r++)this.data[this._length++]=t}pushNew(){this._allocator&&(this.data[this.length]=this._allocator(this.data[this.length]));const t=this.data[this._length];return++this._length,t}unshift(t){this.data.unshift(t),this._length++,l(this)}pop(){if(0===this.length)return;const t=this.data[this.length-1];return this.length=this.length-1,this._shrink(),t}remove(t){const e=(0,s.cq)(this.data,t,this.length,this._hint);if(-1!==e)return this.data.splice(e,1),this.length=this.length-1,t}removeUnordered(t){return this.removeUnorderedIndex((0,s.cq)(this.data,t,this.length,this._hint))}removeUnorderedIndex(t){if(!(t>=this.length||t<0))return this.swapElements(t,this.length-1),this.pop()}removeUnorderedMany(t,e=t.length,r){this.length=(0,s.FY)(this.data,t,this.length,e,this._hint,r),this._shrink()}front(){if(0!==this.length)return this.data[0]}back(){if(0!==this.length)return this.data[this.length-1]}swapElements(t,e){if(t>=this.length||e>=this.length||t===e)return;const r=this.data[t];this.data[t]=this.data[e],this.data[e]=r}sort(t){i.sort(this.data,0,this.length,t)}iterableSort(t){return i.iterableSort(this.data,0,this.length,t)}some(t,e){for(let r=0;r<this.length;++r)if(t.call(e,this.data[r],r,this.data))return!0;return!1}find(t,e){for(let r=0;r<this.length;++r){const n=this.data[r];if(t.call(e,n,r))return n}}filterInPlace(t,e){let r=0;for(let n=0;n<this._length;++n){const s=this.data[n];t.call(e,s,n,this.data)&&(this.data[n]=this.data[r],this.data[r]=s,r++)}if(this._deallocator)for(let t=r;t<this._length;t++)this.data[t]=this._deallocator(this.data[t]);return this._length=r,this._shrink(),this}forAll(t,e){const r=this.length,n=this.data;for(let s=0;s<r;++s)t.call(e,n[s],s,n)}forEach(t,e){for(let r=0;r<this.length;++r)t.call(e,this.data[r],r,this.data)}map(t,e){const r=new Array(this.length);for(let n=0;n<this.length;++n)r[n]=t.call(e,this.data[n],n,this.data);return r}reduce(t,e){let r=e;for(let e=0;e<this.length;++e)r=t(r,this.data[e],e,this.data);return r}has(t){const e=this.length,r=this.data;for(let n=0;n<e;++n)if(r[n]===t)return!0;return!1}}function l(t){t.data.length>o*t.length&&(t.data.length=Math.floor(t.length*a))}},20941:(t,e,r)=>{r.d(e,{Z:()=>s});var n=r(58896);class s extends n.Z{constructor(t,e,r){super(t,e,r)}}s.prototype.type="warning"},42100:(t,e,r)=>{r.d(e,{s:()=>i});var n=r(67676);class s{constructor(t,e){this._observers=t,this._observer=e}remove(){(0,n.Od)(this._observers,this._observer)}}class i{constructor(){this._observers=null,this.destroyed=!1}observe(t){if(this.destroyed||t.destroyed)return o;null==this._observers&&(this._observers=[]);const e=this._observers;let r=!1,n=!1;const i=e.length;for(let s=0;s<i;++s){const i=e[s];if(i.destroyed)n=!0;else if(i===t){r=!0;break}}return r||(e.push(t),n&&this._removeDestroyedObservers()),new s(e,t)}_removeDestroyedObservers(){const t=this._observers;if(!t||0===t.length)return;const e=t.length;let r=0;for(let n=0;n<e;++n){for(;n+r<e&&t[n+r].destroyed;)++r;if(r>0){if(!(n+r<e))break;t[n]=t[n+r]}}t.length=e-r}destroy(){if(this.destroyed)return;this.destroyed=!0;const t=this._observers;if(null!=t){for(const e of t)e.onCommitted();this._observers=null}}}const o={remove:()=>{}}},31263:(t,e,r)=>{r.d(e,{M9:()=>a,Wm:()=>l,kk:()=>o,s3:()=>n,x3:()=>c});var n,s,i=r(70586);(s=n||(n={}))[s.DEFAULTS=0]="DEFAULTS",s[s.COMPUTED=1]="COMPUTED",s[s.SERVICE=2]="SERVICE",s[s.PORTAL_ITEM=3]="PORTAL_ITEM",s[s.WEB_SCENE=4]="WEB_SCENE",s[s.WEB_MAP=5]="WEB_MAP",s[s.USER=6]="USER";const o=n.USER+1;function a(t){switch(t){case"defaults":return n.DEFAULTS;case"service":return n.SERVICE;case"portal-item":return n.PORTAL_ITEM;case"web-scene":return n.WEB_SCENE;case"web-map":return n.WEB_MAP;case"user":return n.USER;default:return null}}function c(t){switch(t){case n.DEFAULTS:return"defaults";case n.SERVICE:return"service";case n.PORTAL_ITEM:return"portal-item";case n.WEB_SCENE:return"web-scene";case n.WEB_MAP:return"web-map";case n.USER:return"user"}return(0,i.j0)(void 0)}function l(t){return c(t)}},88022:(t,e,r)=>{r.d(e,{F:()=>n});const n=Symbol("Accessor-beforeDestroy")},90578:(t,e,r)=>{r.d(e,{p:()=>c});var n=r(75215),s=r(7628);const i=Object.prototype.toString;function o(t){const e="__accessorMetadata__"in t?(0,n.se)(t):t;return function(...t){if(t.push(e),"number"==typeof t[2])throw new Error("Using @cast has parameter decorator is not supported since 4.16");return a.apply(this,t)}}function a(t,e,r,n){(0,s.Oe)(t,e).cast=n}function c(...t){if(3!==t.length||"string"!=typeof t[1])return 1===t.length&&"[object Function]"===i.call(t[0])?o(t[0]):1===t.length&&"string"==typeof t[0]?function(t){return(e,r)=>{(0,s.Oe)(e,t).cast=e[r]}}(t[0]):void 0}},5600:(t,e,r)=>{r.d(e,{CJ:()=>l,Cb:()=>c,Eg:()=>u});var n=r(92604),s=r(75215),i=r(67723),o=r(7628),a=r(37697);function c(t={}){return(e,r)=>{if(e===Function.prototype)throw new Error(`Inappropriate use of @property() on a static field: ${e.name}.${r}. Accessor does not support static properties.`);const c=Object.getOwnPropertyDescriptor(e,r),l=(0,o.Oe)(e,r);c&&(c.get||c.set?(l.get=c.get||l.get,l.set=c.set||l.set):"value"in c&&("value"in t&&n.Z.getLogger("esri.core.accessorSupport.decorators.property").warn(`@property() will redefine the value of "${r}" on "${e.constructor.name}" already defined in the metadata`,t),l.value=t.value=c.value)),null!=t.readOnly&&(l.readOnly=t.readOnly);const h=t.aliasOf;if(h){const t="string"==typeof h?h:h.source,e="string"==typeof h?null:!0===h.overridable;let n;l.dependsOn=[t],l.get=function(){let e=(0,i.U2)(this,t);if("function"==typeof e){n||(n=t.split(".").slice(0,-1).join("."));const r=(0,i.U2)(this,n);r&&(e=e.bind(r))}return e},l.readOnly||(l.set=e?function(t){this._override(r,t)}:function(e){(0,a.t)(this,t,e)})}const f=t.type,d=t.types;l.cast||(f?l.cast=function(t){let e=0,r=t;if((0,s.AY)(t))return(0,s.sY)(t);for(;Array.isArray(r)&&1===r.length&&"string"!=typeof r[0]&&"number"!=typeof r[0];)r=r[0],e++;const n=r;if((0,s.gB)(n))return 0===e?(0,s.i$)(n):(0,s.Iu)((0,s.i$)(n),e);if(1===e)return(0,s.rY)(n);if(e>1)return(0,s.di)(n,e);const i=t;return i.from?i.from:(0,s.se)(i)}(f):d&&(Array.isArray(d)?l.cast=(0,s.Ls)((0,s.N7)(d[0])):l.cast=(0,s.N7)(d))),(0,o.tz)(l,t),t.range&&(l.cast=u(l.cast,t.range))}}function l(t,e,r){const n=(0,o.Oe)(t,r);n.json||(n.json={});let s=n.json;return void 0!==e&&(s.origins||(s.origins={}),s.origins[e]||(s.origins[e]={}),s=s.origins[e]),s}function u(t,e){return r=>{let n=+t(r);return null!=e.step&&(n=Math.round(n/e.step)*e.step),null!=e.min&&(n=Math.max(e.min,n)),null!=e.max&&(n=Math.min(e.max,n)),n}}},52011:(t,e,r)=>{r.d(e,{j:()=>u}),r(80442);var n=r(88022),s=r(97831),i=r(7628),o=r(58971),a=r(53906);const c=new Set,l=new Set;function u(t){return e=>{e.prototype.declaredClass=t,f(e);const r=[],s=[];let o=e.prototype;for(;o;)o.hasOwnProperty("initialize")&&!c.has(o.initialize)&&(c.add(o.initialize),r.push(o.initialize)),o.hasOwnProperty("destroy")&&!l.has(o.destroy)&&(l.add(o.destroy),s.push(o.destroy)),o=Object.getPrototypeOf(o);c.clear(),l.clear();class a extends e{constructor(...t){if(super(...t),this.constructor===a&&"function"==typeof this.postscript){if(r.length&&Object.defineProperty(this,"initialize",{enumerable:!1,configurable:!0,value(){for(let t=r.length-1;t>=0;t--)r[t].call(this)}}),s.length){let t=!1;const e=this[n.F];Object.defineProperty(this,"destroy",{enumerable:!1,configurable:!0,value(){if(!t){t=!0,e.call(this);for(let t=0;t<s.length;t++)s[t].call(this)}}})}this.postscript(...t)}}}return a.__accessorMetadata__=(0,i.fp)(e.prototype),a.prototype.declaredClass=t,a}}function h(t,e){return null==e.get?function(){const e=this.__accessor__.properties.get(t);if(void 0===e)return;(0,o.it)(e.observerObject);const r=this.__accessor__.store;return r.has(t)?r.get(t):e.metadata.value}:function(){const e=this.__accessor__.properties.get(t);if(void 0!==e)return e.getComputed()}}function f(t){const e=t.prototype,r=(0,i.fp)(e),n={};for(const t of Object.getOwnPropertyNames(r)){const e=r[t];(0,a.OM)(e),n[t]={enumerable:!0,configurable:!0,get:h(t,e),set(r){const n=this.__accessor__;if(void 0!==n){if(!Object.isFrozen(this)){if(n.initialized&&e.readOnly)throw new TypeError(`[accessor] cannot assign to read-only property '${t}' of ${this.declaredClass}`);if(n.lifecycle===s.F.CONSTRUCTED&&e.constructOnly)throw new TypeError(`[accessor] cannot assign to construct-only property '${t}' of ${this.declaredClass}`);n.set(t,r)}}else Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:r})}}}Object.defineProperties(t.prototype,n)}},41103:(t,e,r)=>{r.d(e,{M:()=>s});var n=r(31263);function s(t,e,r){e.keys().forEach((t=>{r.set(t,e.get(t),n.s3.DEFAULTS)}));const s=t.metadatas;Object.keys(s).forEach((e=>{t.internalGet(e)&&r.set(e,t.internalGet(e),n.s3.DEFAULTS)}))}},75215:(t,e,r)=>{r.d(e,{AY:()=>C,Iu:()=>A,Ls:()=>b,N7:()=>k,TJ:()=>g,V5:()=>N,Zs:()=>c,di:()=>j,gB:()=>S,i$:()=>T,q9:()=>l,rY:()=>w,sY:()=>I,se:()=>m,vU:()=>u,z8:()=>E}),r(80442);var n=r(92604),s=r(30175);const i=n.Z.getLogger("esri.core.accessorSupport.ensureTypes");function o(t){return null==t?t:new Date(t)}function a(t){return null==t?t:!!t}function c(t){return null==t?t:t.toString()}function l(t){return null==t?t:(t=parseFloat(t),isNaN(t)?0:t)}function u(t){return null==t?t:Math.round(parseFloat(t))}function h(t){return t&&t.constructor&&void 0!==t.constructor.__accessorMetadata__}function f(t,e){return null!=e&&t&&!(e instanceof t)}function d(t){return t&&"isCollection"in t}function p(t){return t&&t.Type?"function"==typeof t.Type?t.Type:t.Type.base:null}function y(t,e){return!!h(e)&&(i.error("Accessor#set","Assigning an instance of '"+(e.declaredClass||"unknown")+"' which is not a subclass of '"+_(t)+"'"),!0)}function g(t,e){return null==e?e:d(t)?function(t,e){if(!e||!e.constructor||!d(e.constructor))return y(t,e)?e:new t(e);const r=p(t.prototype.itemType),n=p(e.constructor.prototype.itemType);return r?n?r===n?e:r.prototype.isPrototypeOf(n.prototype)?new t(e):(y(t,e),e):new t(e):e}(t,e):f(t,e)?y(t,e)?e:new t(e):e}function _(t){return t&&t.prototype&&t.prototype.declaredClass||"unknown"}const v=new WeakMap;function m(t,e){const r=function(t){switch(t){case Number:return l;case E:return u;case Boolean:return a;case String:return c;case Date:return o;default:return(0,s.s1)(v,t,(()=>g.bind(null,t)))}}(t);return 1===arguments.length?r:r(e)}function b(t,e,r){return 1===arguments.length?b.bind(null,t):e?Array.isArray(e)?e.map((e=>t(e,r))):[t(e,r)]:e}function w(t,e){return 1===arguments.length?b(m.bind(null,t)):b(m.bind(null,t),e)}function O(t,e,r){return 0!==e&&Array.isArray(r)?r.map((r=>O(t,e-1,r))):t(r)}function A(t,e,r){if(2===arguments.length)return A.bind(null,t,e);if(!r)return r;let n=e,s=r=O(t,e,r);for(;n>0&&Array.isArray(s);)n--,s=s[0];if(void 0!==s)for(let t=0;t<n;t++)r=[r];return r}function j(t,e,r){return 2===arguments.length?A(m.bind(null,t),e):A(m.bind(null,t),e,r)}function S(t){return!!Array.isArray(t)&&!t.some((e=>{const r=typeof e;return!("string"===r||"number"===r||"function"===r&&t.length>1)}))}function T(t,e){if(2===arguments.length)return T(t).call(null,e);const r=new Set,n=t.filter((t=>"function"!=typeof t)),s=t.filter((t=>"function"==typeof t));for(const e of t)"string"!=typeof e&&"number"!=typeof e||r.add(e);let o=null,a=null;return(t,e)=>{if(null==t)return t;const c=typeof t,l="string"===c||"number"===c;return l&&(r.has(t)||s.some((t=>"string"===c&&t===String||"number"===c&&t===Number)))||"object"===c&&s.some((e=>!f(t,e)))?t:(l&&n.length?(o||(o=n.map((t=>"string"==typeof t?`'${t}'`:`${t}`)).join(", ")),i.error("Accessor#set",`'${t}' is not a valid value for this property, only the following values are valid: ${o}`)):"object"==typeof t&&s.length?(a||(a=s.map((t=>_(t))).join(", ")),i.error("Accessor#set",`'${t}' is not a valid value for this property, value must be one of ${a}`)):i.error("Accessor#set",`'${t}' is not a valid value for this property`),e&&(e.valid=!1),null)}}function k(t,e){if(2===arguments.length)return k(t).call(null,e);const r={},n=[],s=[];for(const e in t.typeMap){const i=t.typeMap[e];r[e]=m(i),n.push(_(i)),s.push(e)}const o=()=>`'${n.join("', '")}'`,a=()=>`'${s.join("', '")}'`,c="string"==typeof t.key?e=>e[t.key]:t.key;return e=>{if(t.base&&!f(t.base,e))return e;if(null==e)return e;const n=c(e)||t.defaultKeyValue,s=r[n];if(!s)return i.error("Accessor#set",`Invalid property value, value needs to be one of ${o()}, or a plain object that can autocast (having .type = ${a()})`),null;if(!f(t.typeMap[n],e))return e;if("string"==typeof t.key&&!h(e)){const r={};for(const n in e)n!==t.key&&(r[n]=e[n]);return s(r)}return s(e)}}class E{}const N={native:t=>({type:"native",value:t}),array:t=>({type:"array",value:t}),oneOf:t=>({type:"one-of",values:t})};function C(t){if(!t||!("type"in t))return!1;switch(t.type){case"native":case"array":case"one-of":return!0}return!1}function I(t){switch(t.type){case"native":return m(t.value);case"array":return b(I(t.value));case"one-of":return function(t){let e=null;return(r,n)=>D(r,t)?r:(null==e&&(e=M(t)),i.error("Accessor#set",`Invalid property value, value needs to be of type ${e}`),n&&(n.valid=!1),null)}(t);default:return null}}function M(t){switch(t.type){case"native":switch(t.value){case Number:return"number";case String:return"string";case Boolean:return"boolean";case E:return"integer";case Date:return"date";default:return _(t.value)}case"array":return`array of ${M(t.value)}`;case"one-of":{const e=t.values.map((t=>M(t)));return`one of ${e.slice(0,e.length-1)} or ${e[e.length-1]}`}}return"unknown"}function D(t,e){if(null==t)return!0;switch(e.type){case"native":switch(e.value){case Number:case E:return"number"==typeof t;case Boolean:return"boolean"==typeof t;case String:return"string"==typeof t}return t instanceof e.value;case"array":return!!Array.isArray(t)&&!t.some((t=>!D(t,e.value)));case"one-of":return e.values.some((e=>D(t,e)))}}},53906:(t,e,r)=>{r.d(e,{hk:()=>f,HS:()=>u,Ah:()=>h,OM:()=>g});var n=r(75215),s=r(63213);function i(t){if(t.json||(t.json={}),a(t.json),c(t.json),o(t.json),t.json.origins)for(const e in t.json.origins)a(t.json.origins[e]),c(t.json.origins[e]),o(t.json.origins[e]);return!0}function o(t){t.name&&(t.read&&"object"==typeof t.read?void 0===t.read.source&&(t.read.source=t.name):t.read={source:t.name},t.write&&"object"==typeof t.write?void 0===t.write.target&&(t.write.target=t.name):t.write={target:t.name})}function a(t){"boolean"==typeof t.read?t.read={enabled:t.read}:"function"==typeof t.read?t.read={enabled:!0,reader:t.read}:t.read&&"object"==typeof t.read&&void 0===t.read.enabled&&(t.read.enabled=!0)}function c(t){"boolean"==typeof t.write?t.write={enabled:t.write}:"function"==typeof t.write?t.write={enabled:!0,writer:t.write}:t.write&&"object"==typeof t.write&&void 0===t.write.enabled&&(t.write.enabled=!0)}var l=r(827);function u(t,e){return f(t,"read",e)}function h(t,e){return f(t,"write",e)}function f(t,e,r){let n=t&&t.json;if(t&&t.json&&t.json.origins&&r){const s=r.origin&&t.json.origins[r.origin];s&&("any"===e||e in s)&&(n=s)}return n}function d(t){return t.type?p(t):y(t)}function p(t){if(!t.type)return;let e=0,r=t.type;for(;Array.isArray(r)&&!(0,n.gB)(r);)r=r[0],e++;return{type:r,ndimArray:e}}function y(t){if(!t.types)return;let e=0,r=t.types;for(;Array.isArray(r);)r=r[0],e++;return{types:r,ndimArray:e}}function g(t){i(t)&&(function(t){if(t.json&&t.json.origins){const e=t.json.origins,r={"web-document":["web-scene","web-map"]};for(const t in r)if(e[t]){const n=e[t];r[t].forEach((t=>{e[t]=n})),delete e[t]}}}(t),function(t){const e=function(t){return t.json.types?y(t.json):t.type?p(t):y(t)}(t);if(t.json.origins)for(const r in t.json.origins){const n=t.json.origins[r],i=n.types?d(n):e;(0,s.U)(i,n,!1),n.types&&!n.write&&t.json.write&&t.json.write.enabled&&(n.write={...t.json.write}),(0,l.U)(i,n)}(0,s.U)(e,t.json,!0),(0,l.U)(e,t.json)}(t))}},63213:(t,e,r)=>{r.d(e,{U:()=>l,d:()=>u});var n=r(92604),s=r(78286),i=r(20941),o=r(7628),a=r(14062);const c=n.Z.getLogger("esri.core.accessorSupport.extensions.serializableProperty.reader");function l(t,e,r){t&&(!r&&!e.read||e.read?.reader||!1===e.read?.enabled||function(t){return"types"in t?g(t.types):y(t.type)}(t)&&(0,s.RB)("read.reader",u(t),e))}function u(t){const e=t.ndimArray??0;if(e>1)return function(t){const e=h(t),r=f.bind(null,e),n=t.ndimArray??0;return(t,e,s)=>{if(null==t)return t;t=r(t,s,n);let i=n,o=t;for(;i>0&&Array.isArray(o);)i--,o=o[0];if(void 0!==o)for(let e=0;e<i;e++)t=[t];return t}}(t);if(1===e)return d(t);if("type"in t&&p(t.type)){const e=t.type.prototype?.itemType?.Type,r=d("function"==typeof e?{type:e}:{types:e});return(e,n,s)=>{const i=r(e,n,s);return i?new t.type(i):i}}return h(t)}function h(t){return"type"in t?function(t){return t.prototype.read?(e,r,n)=>{if(null==e)return e;const s=typeof e;if("object"!==s)return void c.error(`Expected JSON value of type 'object' to deserialize type '${t.prototype.declaredClass}', but got '${s}'`);const i=new t;return i.read(e,n),i}:t.fromJSON}(t.type):function(t){let e=null;const r=t.errorContext??"type";return(n,s,a)=>{if(null==n)return n;const l=typeof n;if("object"!==l)return void c.error(`Expected JSON value of type 'object' to deserialize, but got '${l}'`);e||(e=function(t){const e={};for(const r in t.typeMap){const n=t.typeMap[r],s=(0,o.fp)(n.prototype);if("function"==typeof t.key)continue;const i=s[t.key];if(!i)continue;i.json?.type&&Array.isArray(i.json.type)&&1===i.json.type.length&&"string"==typeof i.json.type[0]&&(e[i.json.type[0]]=n);const a=i.json?.write;if(!a||!a.writer){e[r]=n;continue}const c=a.target,l="string"==typeof c?c:t.key,u={};a.writer(r,u,l),u[l]&&(e[u[l]]=n)}return e}(t));const u=t.key;if("string"!=typeof u)return;const h=n[u],f=h?e[h]:t.defaultKeyValue?t.typeMap[t.defaultKeyValue]:void 0;if(!f){const t=`Type '${h||"unknown"}' is not supported`;return a&&a.messages&&n&&a.messages.push(new i.Z(`${r}:unsupported`,t,{definition:n,context:a})),void c.error(t)}const d=new f;return d.read(n,a),d}}(t.types)}function f(t,e,r,n){return 0!==n&&Array.isArray(e)?e.map((e=>f(t,e,r,n-1))):t(e,void 0,r)}function d(t){const e=h(t);return(t,r,n)=>{if(null==t)return t;if(Array.isArray(t)){const r=[];for(const s of t){const t=e(s,void 0,n);void 0!==t&&r.push(t)}return r}const s=e(t,void 0,n);return void 0!==s?[s]:void 0}}function p(t){if(!(0,a.u)(t))return!1;const e=t.prototype.itemType;return!(!e||!e.Type)&&("function"==typeof e.Type?y(e.Type):g(e.Type))}function y(t){return!Array.isArray(t)&&!!t&&t.prototype&&("read"in t.prototype||"fromJSON"in t||p(t))}function g(t){for(const e in t.typeMap)if(!y(t.typeMap[e]))return!1;return!0}},14062:(t,e,r)=>{function n(t){return!!t&&t.prototype&&t.prototype.declaredClass&&0===t.prototype.declaredClass.indexOf("esri.core.Collection")}r.d(e,{u:()=>n})},827:(t,e,r)=>{r.d(e,{U:()=>a,k:()=>h});var n=r(20102),s=r(92604),i=r(78286),o=r(14062);function a(t,e){if(!e.write||e.write.writer||!1===e.write.enabled&&!e.write.overridePolicy)return;const r=t?.ndimArray??0;t&&(1===r||"type"in t&&(0,o.u)(t.type))?e.write.writer=f:r>1?e.write.writer=function(t){return(e,r,n,s)=>{let o;if(null===e)o=null;else{o=d(e,s,t);let r=t,n=o;for(;r>0&&Array.isArray(n);)r--,n=n[0];if(void 0!==n)for(let t=0;t<r;t++)o=[o]}(0,i.RB)(n,o,r)}}(r):e.types?Array.isArray(e.types)?e.write.writer=function(t){return(e,r,n,s)=>e&&Array.isArray(e)?l(e.filter((e=>c(e,t,s))),r,n,s):l(e,r,n,s)}(e.types[0]):e.write.writer=function(t){return(e,r,n,s)=>e?c(e,t,s)?l(e,r,n,s):void 0:l(e,r,n,s)}(e.types):e.write.writer=l}function c(t,e,r){for(const r in e.typeMap)if(t instanceof e.typeMap[r])return!0;if(r?.messages){const i=e.errorContext??"type",o=`Values of type '${("function"!=typeof e.key?t[e.key]:t.declaredClass)??"Unknown"}' cannot be written`;r&&r.messages&&t&&r.messages.push(new n.Z(`${i}:unsupported`,o,{definition:t,context:r})),s.Z.getLogger("esri.core.accessorSupport.extensions.serializableProperty.writer").error(o)}return!1}function l(t,e,r,n){(0,i.RB)(r,u(t,n),e)}function u(t,e){return t&&"function"==typeof t.write?t.write({},e):t&&"function"==typeof t.toJSON?t.toJSON():"number"==typeof t?h(t):t}function h(t){return t===-1/0?-Number.MAX_VALUE:t===1/0?Number.MAX_VALUE:isNaN(t)?null:t}function f(t,e,r,n){let s;null===t?s=null:t&&"function"==typeof t.map?(s=t.map((t=>u(t,n))),"function"==typeof s.toArray&&(s=s.toArray())):s=[u(t,n)],(0,i.RB)(r,s,e)}function d(t,e,r){return 0!==r&&Array.isArray(t)?t.map((t=>d(t,e,r-1))):u(t,e)}},67723:(t,e,r)=>{r.d(e,{$z:()=>o,Gg:()=>c,U2:()=>a});var n=r(1153);function s(t,e){const r="?"===t[t.length-1]?t.slice(0,-1):t;if(null!=e.getItemAt||Array.isArray(e)){const t=parseInt(r,10);if(!isNaN(t))return Array.isArray(e)?e[t]:e.getItemAt(t)}const s=(0,n.vw)(e);return(0,n.b6)(s,r)?s.get(r):e[r]}function i(t,e,r){if(null==t)return t;const n=s(e[r],t);return!n&&r<e.length-1?void 0:r===e.length-1?n:i(n,e,r+1)}function o(t,e,r=0){return"string"!=typeof e||e.includes(".")?i(t,(0,n.NI)(e),r):s(e,t)}function a(t,e){return o(t,e)}function c(t,e){return void 0!==o(e,t)}},97831:(t,e,r)=>{var n;r.d(e,{F:()=>n}),function(t){t[t.INITIALIZING=0]="INITIALIZING",t[t.CONSTRUCTING=1]="CONSTRUCTING",t[t.CONSTRUCTED=2]="CONSTRUCTED"}(n||(n={}))},7628:(t,e,r)=>{r.d(e,{Oe:()=>a,fp:()=>o,tz:()=>c});var n=r(22974),s=r(70586),i=r(1153);function o(t){let e=t.constructor.__accessorMetadata__;const r=Object.prototype.hasOwnProperty.call(t.constructor,"__accessorMetadata__");if(e){if(!r){e=Object.create(e);for(const t in e)e[t]=(0,n.d9)(e[t]);Object.defineProperty(t.constructor,"__accessorMetadata__",{value:e,enumerable:!1,configurable:!0,writable:!0})}}else e={},Object.defineProperty(t.constructor,"__accessorMetadata__",{value:e,enumerable:!1,configurable:!0,writable:!0});return(0,s.j0)(t.constructor.__accessorMetadata__)}function a(t,e){const r=o(t);let n=r[e];return n||(n=r[e]={}),n}function c(t,e){return(0,i.TS)(t,e,u)}const l=/^(?:[^.]+\.)?(?:value|type|(?:json\.type|json\.origins\.[^.]\.type))$/;function u(t){return l.test(t)?"replace":"merge"}},50549:(t,e,r)=>{r.d(e,{$:()=>h,i:()=>u});var n=r(67723),s=r(1153),i=r(53906);function o(t,e,r){if(!t||!t.read||!1===t.read.enabled||!t.read.source)return!1;const s=t.read.source;if("string"==typeof s){if(s===e)return!0;if(s.includes(".")&&0===s.indexOf(e)&&(0,n.Gg)(s,r))return!0}else for(const t of s){if(t===e)return!0;if(t.includes(".")&&0===t.indexOf(e)&&(0,n.Gg)(t,r))return!0}return!1}function a(t,e,r,n,s){let a=(0,i.HS)(e[r],s);(function(t){return t&&(!t.read||!1!==t.read.enabled&&!t.read.source)})(a)&&(t[r]=!0);for(const c of Object.getOwnPropertyNames(e))a=(0,i.HS)(e[c],s),o(a,r,n)&&(t[c]=!0)}function c(t,e,r,n){const s=r.metadatas,o=(0,i.hk)(s[e],"any",n),a=o&&o.default;if(void 0===a)return;const c="function"==typeof a?a.call(t,e,n):a;void 0!==c&&r.set(e,c)}const l={origin:"service"};function u(t,e,r=l){if(!e||"object"!=typeof e)return;const o=(0,s.vw)(t),u=o.metadatas,h={};for(const t of Object.getOwnPropertyNames(e))a(h,u,t,e,r);o.setDefaultOrigin(r.origin);for(const s of Object.getOwnPropertyNames(h)){const a=(0,i.HS)(u[s],r).read,c=a&&a.source;let l;l=c&&"string"==typeof c?(0,n.$z)(e,c):e[s],a&&a.reader&&(l=a.reader.call(t,l,e,r)),void 0!==l&&o.set(s,l)}if(!r||!r.ignoreDefaults){o.setDefaultOrigin("defaults");for(const e of Object.getOwnPropertyNames(u))h[e]||c(t,e,o,r)}o.setDefaultOrigin("user")}function h(t,e,r,n=l){const s={...n,messages:[]};r(s),s.messages?.forEach((e=>{"warning"!==e.type||t.loaded?n&&n.messages&&n.messages.push(e):t.loadWarnings.push(e)}))}},37697:(t,e,r)=>{r.d(e,{t:()=>o});var n=r(20102),s=r(80442),i=(r(92604),r(67723));function o(t,e,r){if(t&&e)if("object"==typeof e)for(const r of Object.getOwnPropertyNames(e))o(t,r,e[r]);else{if(e.includes(".")){const n=e.split("."),s=n.splice(n.length-1,1)[0];return void o((0,i.U2)(t,n),s,r)}const a=t.__accessor__;null!=a&&function(t,e){if((0,s.Z)("esri-unknown-property-errors")&&!function(t,e){return null!=e.metadatas[t]}(t,e))throw new n.Z("set:unknown-property",function(t,e){return"setting unknown property '"+t+"' on instance of "+e.host.declaredClass}(t,e))}(e,a),t[e]=r}}},58971:(t,e,r)=>{r.d(e,{GF:()=>m,LJ:()=>f,gb:()=>d,it:()=>l,mS:()=>_}),r(80442);var n=r(92604),s=r(1153),i=r(44550);const o={onObservableAccessed:()=>{},onTrackingEnd:()=>{}},a=[];let c=o;function l(t){c.onObservableAccessed(t)}let u=!1,h=!1;function f(t,e,r){if(u)return p(t,e,r);y(t);const n=e.call(r);return g(),n}function d(t,e){return f(o,t,e)}function p(t,e,r){const s=u;u=!0,y(t);let i=null;try{i=e.call(r)}catch(t){h&&n.Z.getLogger("esri.core.accessorSupport.tracking").error(t)}return g(),u=s,i}function y(t){c=t,a.push(t)}function g(){const t=a.length;if(t>1){const e=a.pop();c=a[t-2],e.onTrackingEnd()}else if(1===t){const t=a.pop();c=o,t.onTrackingEnd()}else c=o}function _(t,e){const r=e.observerObject;if(r.flags&i.v.DepTrackingInitialized)return;const n=h;h=!1,r.flags&i.v.AutoTracked?p(e,e.metadata.get,t):m(t,e),h=n}const v=[];function m(t,e){const r=e.observerObject;r.flags&i.v.ExplicitlyTracking||(r.flags|=i.v.ExplicitlyTracking,p(e,(()=>{const r=e.metadata.dependsOn||v;for(const e of r)if("string"!=typeof e||e.includes(".")){const r=(0,s.NI)(e);for(let e=0,n=t;e<r.length&&null!=n&&"object"==typeof n;++e)n=b(n,r[e],e!==r.length-1)}else b(t,e,!1)})),r.flags&=~i.v.ExplicitlyTracking)}function b(t,e,r){const n="?"===e[e.length-1]?e.slice(0,-1):e;if(null!=t.getItemAt||Array.isArray(t)){const e=parseInt(n,10);if(!isNaN(e))return Array.isArray(t)?t[e]:t.getItemAt(e)}const i=(0,s.vw)(t),o=i?.properties.get(n);return o&&(l(o.observerObject),_(t,o)),r?t[n]:void 0}},44550:(t,e,r)=>{var n;r.d(e,{v:()=>n}),function(t){t[t.Dirty=1]="Dirty",t[t.Overriden=2]="Overriden",t[t.Computing=4]="Computing",t[t.NonNullable=8]="NonNullable",t[t.HasDefaultValue=16]="HasDefaultValue",t[t.DepTrackingInitialized=32]="DepTrackingInitialized",t[t.AutoTracked=64]="AutoTracked",t[t.ExplicitlyTracking=128]="ExplicitlyTracking"}(n||(n={}))},38805:(t,e,r)=>{r.d(e,{M:()=>n});class n{constructor(t){this._accessed=[],this._handles=[],this._finalizationToken={},this._observerObject=new s(t),i.register(this,new WeakRef(this._observerObject),this._finalizationToken)}destroy(){i.unregister(this._observerObject),this._accessed.length=0,this._observerObject?.destroy(),this.clear()}onObservableAccessed(t){const e=this._accessed;e.includes(t)||e.push(t)}onTrackingEnd(){const t=this._handles,e=this._accessed,r=this._observerObject;for(let n=0;n<e.length;++n)t.push(e[n].observe(r));e.length=0}clear(){const t=this._handles;for(let e=0;e<t.length;++e)t[e].remove();t.length=0}}class s{constructor(t){this._notify=t,this._invalidCount=0,this.destroyed=!1}onInvalidated(){this._invalidCount++}onCommitted(){if(this.destroyed)return;const t=this._invalidCount;if(1===t)return this._invalidCount=0,void this._notify();this._invalidCount=t>0?t-1:0}destroy(){this.destroyed=!0,this._notify=o}}const i=new FinalizationRegistry((t=>{t.deref()?.destroy()}));function o(){}},87538:(t,e,r)=>{r.d(e,{EH:()=>l,U5:()=>a,Xz:()=>c});var n=r(58971),s=r(38805);let i=!1;const o=[];function a(t,e){let r=new s.M((function s(){if(!r||a)return;if(i)return void u(s);const c=o;r.clear(),i=!0,a=!0,o=(0,n.LJ)(r,t),a=!1,i=!1,e(o,c),h()})),o=null,a=!1;return a=!0,o=(0,n.LJ)(r,t),a=!1,{remove:function(){r&&(r.destroy(),r=null,o=null)}}}function c(t,e){let r=new s.M((function(){e(i,o)})),i=null;function o(){return r?(r.clear(),i=(0,n.LJ)(r,t),i):null}return o(),{remove:function(){r&&(r.destroy(),r=null),i=null}}}function l(t){let e=new s.M((function s(){e&&!r&&(i?u(s):(e.clear(),i=!0,r=!0,(0,n.LJ)(e,t),r=!1,i=!1,h()))})),r=!1;return r=!0,(0,n.LJ)(e,t),r=!1,{remove:function(){e&&(e.destroy(),e=null)}}}function u(t){o.includes(t)||o.unshift(t)}function h(){for(;o.length;)o.pop()()}},1153:(t,e,r)=>{r.d(e,{IH:()=>d,NI:()=>u,Qc:()=>f,TS:()=>c,b6:()=>a,vw:()=>o});var n=r(50758),s=r(22974),i=r(70586);function o(t){return t?t.__accessor__?t.__accessor__:t.propertyInvalidated?t:null:null}function a(t,e){return null!=t&&t.metadatas&&null!=t.metadatas[e]}function c(t,e,r){return l(t,e,r?{policy:r,path:""}:null)}function l(t,e,r){return e?Object.keys(e).reduce(((t,n)=>{let o=null,a="merge";if(r&&(o=r.path?`${r.path}.${n}`:n,a=r.policy(o)),"replace"===a)return t[n]=e[n],t;if("replace-arrays"===a&&Array.isArray(t[n]))return t[n]=e[n],t;if(void 0===t[n])return t[n]=(0,s.d9)(e[n]),t;let c=t[n],u=e[n];if(c===u)return t;if(Array.isArray(u)||Array.isArray(t))c=c?Array.isArray(c)?t[n]=c.concat():t[n]=[c]:t[n]=[],u&&(Array.isArray(u)||(u=[u]),u.forEach((t=>{c.includes(t)||c.push(t)})));else if(u&&"object"==typeof u)if(r){const e=r.path;r.path=(0,i.j0)(o),t[n]=l(c,u,r),r.path=e}else t[n]=l(c,u,null);else t.hasOwnProperty(n)&&!e.hasOwnProperty(n)||(t[n]=u);return t}),t||{}):t}function u(t){return Array.isArray(t)?t:t.split(".")}function h(t){return t.includes(",")?t.split(",").map((t=>t.trim())):[t.trim()]}function f(t,e,r,s){const i=function(t){if(Array.isArray(t)){const e=[];for(const r of t)e.push(...h(r));return e}return h(t)}(e);if(1!==i.length){const e=i.map((e=>s(t,e,r)));return(0,n.AL)(e)}return s(t,i[0],r)}function d(t){let e=!1;return()=>{e||(e=!0,t())}}},26258:(t,e,r)=>{r.d(e,{BT:()=>w,YP:()=>S,aQ:()=>T});var n=r(3894),s=r(22974),i=r(70586),o=r(71143);class a extends o.Z{constructor(){super(...arguments),this._set=new Set}destroy(){super.destroy(),this._set=(0,i.wN)(this._set)}acquire(...t){const e=super.acquire(...t);return this._set.delete(e),e}release(t){t&&!this._set.has(t)&&(super.release(t),this._set.add(t))}_dispose(t){this._set.delete(t),super._dispose(t)}}var c,l,u=r(1654),h=r(99001),f=r(67723),d=r(87538),p=r(1153);(l=c||(c={}))[l.Untracked=0]="Untracked",l[l.Tracked=1]="Tracked";class y{constructor(){this.uid=(0,h.D)(),this.removed=!1,this.type=null,this.oldValue=null,this.callback=null,this.getValue=null,this.target=null,this.path=null,this.equals=null}static acquireUntracked(t,e,r,n,i){return this.pool.acquire(c.Untracked,t,e,r,n,i,s.fS)}static acquireTracked(t,e,r,n){return this.pool.acquire(c.Tracked,t,e,r,null,null,n)}notify(t,e){this.type===c.Untracked?this.callback.call(this.target,t,e,this.path,this.target):this.callback.call(null,t,e)}acquire(t,e,r,n,s,i,o){this.uid=(0,h.D)(),this.removed=!1,this.type=t,this.oldValue=e,this.callback=r,this.getValue=n,this.target=s,this.path=i,this.equals=o}release(){this.target=this.path=this.oldValue=this.callback=this.getValue=null,this.uid=(0,h.D)(),this.removed=!0}}y.pool=new a(y);const g=new n.Z,_=new Set;let v;function m(t){_.delete(t),_.add(t),v||(v=(0,u.Os)(O))}function b(t){if(t.removed)return;const e=t.oldValue,r=t.getValue();t.equals(e,r)||(t.oldValue=r,t.notify(r,e))}function w(t){for(const e of _.values())e.target===t&&(e.removed=!0)}function O(){let t=10;for(;v&&t--;){v=null;const t=A(),e=g.acquire();for(const r of t){const t=r.uid;b(r),t===r.uid&&r.removed&&e.push(r)}for(const t of _)t.removed&&(e.push(t),_.delete(t));for(const t of e)y.pool.release(t);g.release(e),g.release(t),j.forEach((t=>t()))}}function A(){const t=g.acquire();t.length=_.size;let e=0;for(const r of _)t[e]=r,++e;return _.clear(),t}const j=new Set;function S(t,e,r,n=!1){return!t.__accessor__||t.__accessor__.destroyed?{remove(){}}:n?function(t,e,r){const n=(0,p.Qc)(t,e,r,((t,e,r)=>{let i=!1;return(0,d.U5)((()=>(0,f.$z)(t,e)),((o,a)=>{t.__accessor__.destroyed?n.remove():i||(i=!0,(0,s.fS)(a,o)||r.call(t,o,a,e,t),i=!1)}))}));return n}(t,e,r):function(t,e,r){let n=(0,p.Qc)(t,e,r,((t,e,r)=>{let s,i,o=(0,d.Xz)((()=>(0,f.$z)(t,e)),((o,a)=>{t.__accessor__.destroyed||s&&s.uid!==i?n.remove():(s||(s=y.acquireUntracked(o,r,a,t,e),i=s.uid),m(s))}));return{remove:(0,p.IH)((()=>{o.remove(),s&&(s.uid!==i||s.removed||(s.removed=!0,m(s)),s=null),n=o=null}))}}));return n}(t,e,r)}function T(t,e,r=!1,n=s.y7){return r?function(t,e,r){let n=!1;return(0,d.U5)(t,((t,s)=>{n||(n=!0,r(s,t)||e(t,s),n=!1)}))}(t,e,n):function(t,e,r){let n,s,i=(0,d.Xz)(t,((t,o)=>{n&&n.uid!==s?i.remove():(n||(n=y.acquireTracked(t,e,o,r),s=n.uid),m(n))}));return{remove:(0,p.IH)((()=>{i.remove(),n&&(n.uid!==s||n.removed||(n.removed=!0,m(n)),n=null),i=null}))}}(t,e,n)}},76169:(t,e,r)=>{r.d(e,{c:()=>f,d:()=>h});var n=r(67676),s=r(20102),i=r(92604),o=r(31263),a=r(1153),c=r(53906);function l(t,e,r,n,s){const i={};return e.write?.writer?.call(t,n,i,r,s),i}function u(t,e,r,a,c,l){if(!a||!a.write)return!1;const u=t.get(r);if(!c&&a.write.overridePolicy){const e=a.write.overridePolicy.call(t,u,r,l);void 0!==e&&(c=e)}if(c||(c=a.write),!c||!1===c.enabled)return!1;if((null===u&&!c.allowNull&&!c.writerEnsuresNonNull||void 0===u)&&c.isRequired){const e=new s.Z("web-document-write:property-required",`Missing value for required property '${r}' on '${t.declaredClass}'`,{propertyName:r,target:t});return e&&l&&l.messages?l.messages.push(e):e&&!l&&i.Z.getLogger("esri.core.accessorSupport.write").error(e.name,e.message),!1}return!(void 0===u||null===u&&!c.allowNull&&!c.writerEnsuresNonNull||(!e.store.multipleOriginsSupported||e.store.originOf(r)===o.s3.DEFAULTS)&&function(t,e,r,s,i){const o=s.default;if(void 0===o)return!1;if(null!=s.defaultEquals)return s.defaultEquals(i);if("function"==typeof o){if(Array.isArray(i)){const s=o.call(t,e,r);return(0,n.fS)(s,i)}return!1}return o===i}(t,r,l,a,u)||!c.ignoreOrigin&&l&&l.origin&&e.store.multipleOriginsSupported&&e.store.originOf(r)<(0,o.M9)(l.origin))}function h(t,e,r,n){const s=(0,a.vw)(t),i=s.metadatas,o=(0,c.Ah)(i[e],n);return!!o&&u(t,s,e,o,r,n)}function f(t,e,r){if(t&&"function"==typeof t.toJSON&&(!t.toJSON.isDefaultToJSON||!t.write))return(0,a.TS)(e,t.toJSON(r));const n=(0,a.vw)(t),s=n.metadatas;for(const i in s){const h=(0,c.Ah)(s[i],r);if(!u(t,n,i,h,void 0,r))continue;const f=t.get(i),d=l(t,h,h.write&&"string"==typeof h.write.target?h.write.target:i,f,r);Object.keys(d).length>0&&(e=(0,a.TS)(e,d),r?.resources?.pendingOperations?.length&&r.resources.pendingOperations.push(Promise.all(r.resources.pendingOperations).then((()=>(0,a.TS)(e,d,(()=>"replace-arrays"))))),r&&r.writtenProperties&&r.writtenProperties.push({target:t,propName:i,oldOrigin:(0,o.Wm)(n.store.originOf(i)),newOrigin:r.origin}))}return e}},50758:(t,e,r)=>{function n(t){return s((()=>t.forEach((t=>null!=t&&t.remove()))))}function s(t){return{remove:()=>{t&&(t(),t=void 0)}}}r.d(e,{AL:()=>n,kB:()=>s})},66374:(t,e,r)=>{function n(t){const e=[];return function*(){yield*e;for(const r of t)e.push(r),yield r}}function s(t,e){for(const r of t)if(null!=r&&e(r))return r}function i(t){return null!=t&&"function"==typeof t[Symbol.iterator]}r.d(e,{Fs:()=>n,TW:()=>i,sE:()=>s})},35454:(t,e,r)=>{r.d(e,{X:()=>s,w:()=>i});var n=r(78286);class s{constructor(t,e={ignoreUnknown:!1,useNumericKeys:!1}){this._jsonToAPI=t,this._options=e,this.apiValues=[],this.jsonValues=[],this._apiToJSON=this._invertMap(t),this.apiValues=this._getKeysSorted(this._apiToJSON),this.jsonValues=this._getKeysSorted(this._jsonToAPI),this.read=t=>this.fromJSON(t),this.write=(t,e,r)=>{const s=this.toJSON(t);void 0!==s&&(0,n.RB)(r,s,e)},this.write.isJSONMapWriter=!0}toJSON(t){if(null==t)return null;if(this._apiToJSON.hasOwnProperty(t)){const e=this._apiToJSON[t];return this._options.useNumericKeys?+e:e}return this._options.ignoreUnknown?void 0:t}fromJSON(t){return null!=t&&this._jsonToAPI.hasOwnProperty(t)?this._jsonToAPI[t]:this._options.ignoreUnknown?void 0:t}_invertMap(t){const e={};for(const r in t)e[t[r]]=r;return e}_getKeysSorted(t){const e=[];for(const r in t)e.push(r);return e.sort(),e}}function i(){return function(t,e){return new s(t,{ignoreUnknown:!0,...e})}}},41213:(t,e,r)=>{r.d(e,{Y:()=>s});const n=[];function s(t){n.push(t),1===n.length&&queueMicrotask((()=>{const t=n.slice();n.length=0;for(const e of t)e()}))}},1654:(t,e,r)=>{r.d(e,{MU:()=>b,Os:()=>g});var n=r(70586),s=r(41213),i=r(54790),o=r(44553),a=r(95330),c=r(76882);class l{constructor(t){this.callback=t,this.isActive=!0}remove(){this.isActive=!1}}let u=0;const h={time:(0,c.HA)(0),deltaTime:(0,c.HA)(0),elapsedFrameTime:(0,c.HA)(0),frameDuration:(0,c.HA)(0)},f=["prepare","preRender","render","postRender","update","finish"],d=[],p=new o.Z,y={frameTasks:p,willDispatch:!1,clearFrameTasks:function(t=!1){p.forAll((t=>{t.removed=!0})),t&&v()},dispatch:m,executeFrameTasks:function(t){const e=(0,c.HA)(t-u);u=t;const r=1e3/60,n=Math.max(0,e-r);h.time=t,h.frameDuration=(0,c.HA)(r-n);for(let r=0;r<f.length;r++){const n=performance.now(),s=f[r];p.forAll((n=>{n.paused||n.removed||(0===r&&n.ticks++,n.phases[s]&&(h.elapsedFrameTime=(0,c.HA)(performance.now()-t),h.deltaTime=0===n.ticks?(0,c.HA)(0):e,n.phases[s]?.call(n,h)))})),w[r].record(performance.now()-n)}v(),O.record(performance.now()-t)}};function g(t){const e=new l(t);return d.push(e),y.willDispatch||(y.willDispatch=!0,(0,s.Y)(m)),e}const _=new o.Z;function v(){p.forAll((t=>{t.removed&&_.push(t)})),p.removeUnorderedMany(_.data,_.length),_.clear()}function m(){for(;d.length;){const t=(0,n.j0)(d.shift());t.isActive&&t.callback()}y.willDispatch=!1}function b(t=1,e){const r=(0,a.hh)(),n=()=>{(0,a.Hc)(e)?r.reject((0,a.zE)()):0===t?r():(--t,(0,s.Y)((()=>n())))};return n(),r.promise}const w=f.map((t=>new i.Z(t))),O=new i.Z("total")},76882:(t,e,r)=>{function n(t){return t}r.d(e,{HA:()=>n})},99001:(t,e,r)=>{r.d(e,{D:()=>s});let n=0;function s(){return++n}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6935,7873],{65845:(e,t,r)=>{r.d(t,{D:()=>s});var o=r(81153);function s(e){e&&e.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,o.l)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},81153:(e,t,r)=>{function o(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{l:()=>o})},41123:(e,t,r)=>{r.d(t,{D:()=>s});const o="randomUUID"in crypto;function s(){if(o)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)}},54295:(e,t,r)=>{r.d(t,{V:()=>a});var o=r(43697),s=r(5600),i=(r(75215),r(67676),r(80442),r(52011));const a=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,o._)([(0,s.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,o._)([(0,i.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>l});var o=r(43697),s=r(92604),i=r(5600),a=(r(75215),r(67676),r(80442),r(52011)),n=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,n.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,n.Nm)(e,s.Z.getLogger(this.declaredClass)))}};return(0,o._)([(0,i.Cb)()],t.prototype,"title",null),(0,o._)([(0,i.Cb)({type:String})],t.prototype,"url",null),t=(0,o._)([(0,a.j)("esri.layers.mixins.ArcGISService")],t),t}},20559:(e,t,r)=>{r.d(t,{xp:()=>Z,Vt:()=>P});var o=r(43697),s=r(3172),i=r(20102),a=r(92604),n=r(95330),l=r(17452),p=r(5600),u=(r(75215),r(67676),r(80442),r(71715)),c=r(52011),d=r(30556),y=r(65845),h=r(6570),m=r(79235),f=r(82971),v=r(66677),g=r(21506),_=r(61064);let b=null;function S(){return b}var w=r(65587),I=r(15235),x=r(66643),C=r(41123),R=r(97873);async function T(e,t,r){if(!t||!t.resources)return;const o=t.portalItem===e.portalItem?new Set(e.paths):new Set;e.paths.length=0,e.portalItem=t.portalItem;const s=new Set(t.resources.toKeep.map((e=>e.resource.path))),a=new Set,l=[];s.forEach((t=>{o.delete(t),e.paths.push(t)}));for(const i of t.resources.toUpdate)if(o.delete(i.resource.path),s.has(i.resource.path)||a.has(i.resource.path)){const{resource:t,content:o,finish:s,error:a}=i,n=(0,R.getSiblingOfSameTypeI)(t,(0,C.D)());e.paths.push(n.path),l.push(N({resource:n,content:o,compress:i.compress,finish:s,error:a},r))}else e.paths.push(i.resource.path),l.push(U(i,r)),a.add(i.resource.path);for(const o of t.resources.toAdd)l.push(N(o,r)),e.paths.push(o.resource.path);if(o.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,n.as)(l);(0,n.k_)(r);const u=p.filter((e=>"error"in e)).map((e=>e.error));if(u.length>0)throw new i.Z("save:resources","Failed to save one or more resources",{errors:u})}async function N(e,t){const r={...null!=t?t:{},compress:e.compress},o=await(0,x.q6)(e.resource.portalItem.addResource(e.resource,e.content,r));if(!0!==o.ok)throw e.error?.(o.error),o.error;e.finish?.(e.resource)}async function U(e,t){const r=await(0,x.q6)(e.resource.update(e.content,t));if(!0!==r.ok)throw e.error?.(r.error),r.error;e.finish?.(e.resource)}const j="esri.layers.mixins.SceneService",A=a.Z.getLogger(j),P=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,n.Ds)((async(e,t,r)=>{switch(e){case Z.SAVE:return this._save(t);case Z.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,o=r&&parseInt(r.substring(r.lastIndexOf("/")+1,r.length),10);return null!=o?new f.Z(o):null}}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const o=null==e.spatialReference?{...e,spatialReference:this._readSpatialReference(t)}:e;return h.Z.fromJSON(o,r)}const o=t.store,s=this._readSpatialReference(t);return null==s||null==o||null==o.extent||!Array.isArray(o.extent)||o.extent.some((e=>e<O))?null:new h.Z({xmin:o.extent[0],ymin:o.extent[1],xmax:o.extent[2],ymax:o.extent[3],spatialReference:s})}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,o=null!=r.version?r.version.toString():"";return this.parseVersionString(o)}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,v.a7)(this.url,t.name);let o=t.name;if(!o&&this.url){const e=(0,v.Qc)(this.url);null!=e&&(o=e.title)}return"item-title-and-service-name"===this.sublayerTitleMode&&r&&(o=r+" - "+o),(0,v.ld)(o)}set url(e){const t=(0,v.XG)({layer:this,url:e,nonStandardUrlAllowed:!1,logger:A});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,r,o){(0,v.wH)(this,e,"layers",t,o)}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,_.T)(this.parsedUrl.path,this.rootNode,e,this.apiKey,A,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 i.Z("sceneservice:invalid-node-page","Invalid node page.");if(r.obb.center[0]<O||null==this.fullExtent||this.fullExtent.hasZ)return;const o=r.obb.halfSize,s=r.obb.center[2],a=Math.sqrt(o[0]*o[0]+o[1]*o[1]+o[2]*o[2]);this.fullExtent.zmin=s-a,this.fullExtent.zmax=s+a}else if("node"===e?.type){const t=e.rootNode?.mbs;if(!Array.isArray(t)||4!==t.length||t[0]<O)return;const r=t[2],o=t[3],{fullExtent:s}=this;s&&(s.zmin=r-o,s.zmax=r+o)}}async _fetchService(e){if(null==this.url)throw new i.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,s.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,s.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 o=t.data;this.read(o,this._getServiceContext()),this.validateLayer(o)}async _fetchVoxelServiceLayer(e){const t=(await(0,s.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 o=t.getTypeKeywords();for(const t of o)e.typeKeywords.push(t);e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)),r===q.newItem&&(e.typeKeywords=e.typeKeywords.filter((e=>"Hosted Service"!==e))))}async _saveAs(e,t){const r={...E,...t};let o=I.default.from(e);o||(A.error("_saveAs(): requires a portal item parameter"),await Promise.reject(new i.Z("sceneservice:portal-item-required","_saveAs() requires a portal item to save to"))),o.id&&(o=o.clone(),o.id=null);const s=o.portal||w.Z.getDefault();await this._ensureLoadBeforeSave(),o.type=F,o.portal=s;const a={origin:"portal-item",url:null,messages:[],portal:s,portalItem:o,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}},n={layers:[this.write({},a)]};return await Promise.all(a.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(n,a,r),o.url=this.url,o.title||(o.title=this.title),this._updateTypeKeywords(o,r,q.newItem),await s.signIn(),await(s.user?.addItem({item:o,folder:r&&r.folder,data:n})),await T(this.resourceReferences,a,null),this.portalItem=o,(0,y.D)(a),a.portalItem=o,o}async _save(e){const t={...E,...e};if(!this.portalItem)throw A.error("_save(): requires the .portalItem property to be set"),new i.Z("sceneservice:portal-item-not-set","Portal item to save to has not been set on this SceneService");if(this.portalItem.type!==F)throw A.error("_save(): Non-matching portal item type. Got "+this.portalItem.type+", expected "+F),new i.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||w.Z.getDefault(),portalItem:this.portalItem,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}},o={layers:[this.write({},r)]};return await Promise.all(r.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(o,r,t),this.portalItem.url=this.url,this.portalItem.title||(this.portalItem.title=this.title),this._updateTypeKeywords(this.portalItem,t,q.existingItem),await this.portalItem.update({data:o}),await T(this.resourceReferences,r,null),(0,y.D)(r),this.portalItem}async _validateAgainstJSONSchema(e,t,r){let o=t.messages?.filter((e=>"error"===e.type)).map((e=>new i.Z(e.name,e.message,e.details)))??[];r?.validationOptions?.ignoreUnsupported&&(o=o.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 s=r?.validationOptions,a=s?.enabled,n=S();if(a&&n){const t=(await n()).validate(e,r.portalItemLayerType);if(t.length>0){const e=`Layer item did not validate:\n${t.join("\n")}`;if(A.error(`_validateAgainstJSONSchema(): ${e}`),"throw"===s.failPolicy){const e=t.map((e=>new i.Z("sceneservice:schema-validation",e))).concat(o);throw new i.Z("sceneservice-validate:error","Failed to save layer item due to schema validation, see `details.errors`.",{combined:e})}}}if(o.length>0)throw new i.Z("sceneservice:save","Failed to save SceneService due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:o})}};return(0,o._)([(0,p.Cb)(g.id)],t.prototype,"id",void 0),(0,o._)([(0,p.Cb)({type:f.Z})],t.prototype,"spatialReference",void 0),(0,o._)([(0,u.r)("spatialReference",["spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readSpatialReference",null),(0,o._)([(0,p.Cb)({type:h.Z})],t.prototype,"fullExtent",void 0),(0,o._)([(0,u.r)("fullExtent",["fullExtent","store.extent","spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readFullExtent",null),(0,o._)([(0,p.Cb)({readOnly:!0,type:m.Z})],t.prototype,"heightModelInfo",void 0),(0,o._)([(0,p.Cb)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:{source:"minScale"},write:!1}}}})],t.prototype,"minScale",void 0),(0,o._)([(0,p.Cb)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:{source:"maxScale"},write:!1}}}})],t.prototype,"maxScale",void 0),(0,o._)([(0,p.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,o._)([(0,u.r)("version",["store.version"])],t.prototype,"readVersion",null),(0,o._)([(0,p.Cb)({type:String,json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,o._)([(0,p.Cb)({type:String,json:{read:!1}})],t.prototype,"sublayerTitleMode",void 0),(0,o._)([(0,p.Cb)({type:String})],t.prototype,"title",void 0),(0,o._)([(0,u.r)("portal-item","title")],t.prototype,"readTitlePortalItem",null),(0,o._)([(0,u.r)("service","title",["name"])],t.prototype,"readTitleService",null),(0,o._)([(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,o._)([(0,p.Cb)(g.HQ)],t.prototype,"url",null),(0,o._)([(0,d.c)("url")],t.prototype,"writeUrl",null),(0,o._)([(0,p.Cb)()],t.prototype,"parsedUrl",null),(0,o._)([(0,p.Cb)({readOnly:!0})],t.prototype,"store",void 0),(0,o._)([(0,p.Cb)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],t.prototype,"rootNode",void 0),t=(0,o._)([(0,c.j)(j)],t),t},O=-1e38;var q,K;(K=q||(q={}))[K.existingItem=0]="existingItem",K[K.newItem=1]="newItem";const F="Scene Service",E={getTypeKeywords:()=>[],portalItemLayerType:"unknown",validationOptions:{enabled:!0,ignoreUnsupported:!1,failPolicy:"throw"}};var Z;!function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(Z||(Z={}))},61064:(e,t,r)=>{r.d(t,{T:()=>i});var o=r(3172),s=r(20102);async function i(e,t,r,i,a,n){let l=null;if(null!=r){const t=`${e}/nodepages/`,s=t+Math.floor(r.rootIndex/r.nodesPerPage);try{return{type:"page",rootPage:(await(0,o.default)(s,{query:{f:"json",token:i},responseType:"json",signal:n})).data,rootIndex:r.rootIndex,pageSize:r.nodesPerPage,lodMetric:r.lodSelectionMetricType,urlPrefix:t}}catch(e){null!=a&&a.warn("#fetchIndexInfo()","Failed to load root node page. Falling back to node documents.",s,e),l=e}}if(!t)return null;const p=`${e}/nodes/`,u=p+(t&&t.split("/").pop());try{return{type:"node",rootNode:(await(0,o.default)(u,{query:{f:"json",token:i},responseType:"json",signal:n})).data,urlPrefix:p}}catch(e){throw new s.Z("sceneservice:root-node-missing","Root node missing.",{pageError:l,nodeError:e,url:u})}}},51161:(e,t,r)=>{r.d(t,{H3:()=>v,QI:()=>c,U4:()=>l,Yh:()=>y});var o=r(43697),s=r(96674),i=r(5600),a=(r(75215),r(67676),r(80442),r(36030)),n=r(52011);let l=class extends s.wq{constructor(){super(...arguments),this.nodesPerPage=null,this.rootIndex=0,this.lodSelectionMetricType=null}};(0,o._)([(0,i.Cb)({type:Number})],l.prototype,"nodesPerPage",void 0),(0,o._)([(0,i.Cb)({type:Number})],l.prototype,"rootIndex",void 0),(0,o._)([(0,i.Cb)({type:String})],l.prototype,"lodSelectionMetricType",void 0),l=(0,o._)([(0,n.j)("esri.layer.support.I3SNodePageDefinition")],l);let p=class extends s.wq{constructor(){super(...arguments),this.factor=1}};(0,o._)([(0,i.Cb)({type:Number,json:{read:{source:"textureSetDefinitionId"}}})],p.prototype,"id",void 0),(0,o._)([(0,i.Cb)({type:Number})],p.prototype,"factor",void 0),p=(0,o._)([(0,n.j)("esri.layer.support.I3SMaterialTexture")],p);let u=class extends s.wq{constructor(){super(...arguments),this.baseColorFactor=[1,1,1,1],this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.metallicFactor=1,this.roughnessFactor=1}};(0,o._)([(0,i.Cb)({type:[Number]})],u.prototype,"baseColorFactor",void 0),(0,o._)([(0,i.Cb)({type:p})],u.prototype,"baseColorTexture",void 0),(0,o._)([(0,i.Cb)({type:p})],u.prototype,"metallicRoughnessTexture",void 0),(0,o._)([(0,i.Cb)({type:Number})],u.prototype,"metallicFactor",void 0),(0,o._)([(0,i.Cb)({type:Number})],u.prototype,"roughnessFactor",void 0),u=(0,o._)([(0,n.j)("esri.layer.support.I3SMaterialPBRMetallicRoughness")],u);let c=class extends s.wq{constructor(){super(...arguments),this.alphaMode="opaque",this.alphaCutoff=.25,this.doubleSided=!1,this.cullFace="none",this.normalTexture=null,this.occlusionTexture=null,this.emissiveTexture=null,this.emissiveFactor=null,this.pbrMetallicRoughness=null}};(0,o._)([(0,a.J)({opaque:"opaque",mask:"mask",blend:"blend"})],c.prototype,"alphaMode",void 0),(0,o._)([(0,i.Cb)({type:Number})],c.prototype,"alphaCutoff",void 0),(0,o._)([(0,i.Cb)({type:Boolean})],c.prototype,"doubleSided",void 0),(0,o._)([(0,a.J)({none:"none",back:"back",front:"front"})],c.prototype,"cullFace",void 0),(0,o._)([(0,i.Cb)({type:p})],c.prototype,"normalTexture",void 0),(0,o._)([(0,i.Cb)({type:p})],c.prototype,"occlusionTexture",void 0),(0,o._)([(0,i.Cb)({type:p})],c.prototype,"emissiveTexture",void 0),(0,o._)([(0,i.Cb)({type:[Number]})],c.prototype,"emissiveFactor",void 0),(0,o._)([(0,i.Cb)({type:u})],c.prototype,"pbrMetallicRoughness",void 0),c=(0,o._)([(0,n.j)("esri.layer.support.I3SMaterialDefinition")],c);let d=class extends s.wq{};(0,o._)([(0,i.Cb)({type:String,json:{read:{source:["name","index"],reader:(e,t)=>null!=e?e:`${t.index}`}}})],d.prototype,"name",void 0),(0,o._)([(0,a.J)({jpg:"jpg",png:"png",dds:"dds","ktx-etc2":"ktx-etc2",ktx2:"ktx2",basis:"basis"})],d.prototype,"format",void 0),d=(0,o._)([(0,n.j)("esri.layer.support.I3STextureFormat")],d);let y=class extends s.wq{constructor(){super(...arguments),this.atlas=!1}};(0,o._)([(0,i.Cb)({type:[d]})],y.prototype,"formats",void 0),(0,o._)([(0,i.Cb)({type:Boolean})],y.prototype,"atlas",void 0),y=(0,o._)([(0,n.j)("esri.layer.support.I3STextureSetDefinition")],y);let h=class extends s.wq{};(0,o._)([(0,a.J)({Float32:"Float32",UInt64:"UInt64",UInt32:"UInt32",UInt16:"UInt16",UInt8:"UInt8"})],h.prototype,"type",void 0),(0,o._)([(0,i.Cb)({type:Number})],h.prototype,"component",void 0),h=(0,o._)([(0,n.j)("esri.layer.support.I3SGeometryAttribute")],h);let m=class extends s.wq{};(0,o._)([(0,a.J)({draco:"draco"})],m.prototype,"encoding",void 0),(0,o._)([(0,i.Cb)({type:[String]})],m.prototype,"attributes",void 0),m=(0,o._)([(0,n.j)("esri.layer.support.I3SGeometryCompressedAttributes")],m);let f=class extends s.wq{constructor(){super(...arguments),this.offset=0}};(0,o._)([(0,i.Cb)({type:Number})],f.prototype,"offset",void 0),(0,o._)([(0,i.Cb)({type:h})],f.prototype,"position",void 0),(0,o._)([(0,i.Cb)({type:h})],f.prototype,"normal",void 0),(0,o._)([(0,i.Cb)({type:h})],f.prototype,"uv0",void 0),(0,o._)([(0,i.Cb)({type:h})],f.prototype,"color",void 0),(0,o._)([(0,i.Cb)({type:h})],f.prototype,"uvRegion",void 0),(0,o._)([(0,i.Cb)({type:h})],f.prototype,"featureId",void 0),(0,o._)([(0,i.Cb)({type:h})],f.prototype,"faceRange",void 0),(0,o._)([(0,i.Cb)({type:m})],f.prototype,"compressedAttributes",void 0),f=(0,o._)([(0,n.j)("esri.layer.support.I3SGeometryBuffer")],f);let v=class extends s.wq{};(0,o._)([(0,a.J)({triangle:"triangle"})],v.prototype,"topology",void 0),(0,o._)([(0,i.Cb)()],v.prototype,"geometryBuffers",void 0),v=(0,o._)([(0,n.j)("esri.layer.support.I3SGeometryDefinition")],v)},97873:(e,t,r)=>{r.r(t),r.d(t,{addOrUpdateResource:()=>l,contentToBlob:()=>y,fetchResources:()=>n,getSiblingOfSameType:()=>h,getSiblingOfSameTypeI:()=>m,removeAllResources:()=>u,removeResource:()=>p,splitPrefixFileNameAndExtension:()=>d});var o=r(3172),s=r(20102),i=r(70586),a=r(17452);async function n(e,t={},r){await e.load(r);const o=(0,a.v_)(e.itemUrl,"resources"),{start:s=1,num:n=10,sortOrder:l="asc",sortField:p="created"}=t,u={query:{start:s,num:n,sortOrder:l,sortField:p,token:e.apiKey},signal:(0,i.U2)(r,"signal")},c=await e.portal.request(o,u);return{total:c.total,nextStart:c.nextStart,resources:c.resources.map((({created:t,size:r,resource:o})=>({created:new Date(t),size:r,resource:e.resourceFromPath(o)})))}}async function l(e,t,r,o){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(o);const l=(0,a.v_)(n.userItemUrl,"add"===t?"addResources":"updateResources"),[p,u]=c(e.path),d=await y(r),h=new FormData;return p&&"."!==p&&h.append("resourcesPrefix",p),null!=o&&o.compress&&h.append("compress","true"),h.append("fileName",u),h.append("file",d,u),h.append("f","json"),null!=o&&o.access&&h.append("access",o.access),await n.portal.request(l,{method:"post",body:h,signal:(0,i.U2)(o,"signal")}),e}async function p(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 o=(0,a.v_)(e.userItemUrl,"removeResources");await e.portal.request(o,{method:"post",query:{resource:t.path},signal:(0,i.U2)(r,"signal")}),t.portalItem=null}async function u(e,t){await e.load(t);const r=(0,a.v_)(e.userItemUrl,"removeResources");return e.portal.request(r,{method:"post",query:{deleteAll:!0},signal:(0,i.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,a.Ml)(e);return null==t?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[o,s]=c(t);return[o,s,r]}async function y(e){return e instanceof Blob?e:(await(0,o.default)(e.url,{responseType:"blob"})).data}function h(e,t){if(!e.hasPath())return null;const[r,,o]=d(e.path);return e.portalItem.resourceFromPath((0,a.v_)(r,t+o))}function m(e,t){if(!e.hasPath())return null;const[r,,o]=d(e.path);return e.portalItem.resourceFromPath((0,a.v_)(r,t+o))}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6935,7873],{65845:(e,t,r)=>{r.d(t,{D:()=>s});var o=r(81153);function s(e){e&&e.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,o.l)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},81153:(e,t,r)=>{function o(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{l:()=>o})},41123:(e,t,r)=>{r.d(t,{D:()=>s});const o="randomUUID"in crypto;function s(){if(o)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)}},54295:(e,t,r)=>{r.d(t,{V:()=>a});var o=r(43697),s=r(5600),i=(r(75215),r(67676),r(80442),r(52011));const a=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,o._)([(0,s.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,o._)([(0,i.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>l});var o=r(43697),s=r(92604),i=r(5600),a=(r(75215),r(67676),r(80442),r(52011)),n=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,n.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,n.Nm)(e,s.Z.getLogger(this.declaredClass)))}};return(0,o._)([(0,i.Cb)()],t.prototype,"title",null),(0,o._)([(0,i.Cb)({type:String})],t.prototype,"url",null),t=(0,o._)([(0,a.j)("esri.layers.mixins.ArcGISService")],t),t}},20559:(e,t,r)=>{r.d(t,{xp:()=>Z,Vt:()=>U});var o=r(43697),s=r(3172),i=r(20102),a=r(92604),n=r(95330),l=r(17452),p=r(5600),u=(r(75215),r(67676),r(80442),r(71715)),c=r(52011),d=r(30556),y=r(65845),h=r(6570),m=r(79235),f=r(82971),v=r(66677),g=r(21506),_=r(61064);let b=null;function S(){return b}var w=r(65587),I=r(15235),x=r(66643),C=r(41123),R=r(97873);async function T(e,t,r){if(!t||!t.resources)return;const o=t.portalItem===e.portalItem?new Set(e.paths):new Set;e.paths.length=0,e.portalItem=t.portalItem;const s=new Set(t.resources.toKeep.map((e=>e.resource.path))),a=new Set,l=[];s.forEach((t=>{o.delete(t),e.paths.push(t)}));for(const i of t.resources.toUpdate)if(o.delete(i.resource.path),s.has(i.resource.path)||a.has(i.resource.path)){const{resource:t,content:o,finish:s,error:a}=i,n=(0,R.getSiblingOfSameTypeI)(t,(0,C.D)());e.paths.push(n.path),l.push(N({resource:n,content:o,compress:i.compress,finish:s,error:a},r))}else e.paths.push(i.resource.path),l.push(j(i,r)),a.add(i.resource.path);for(const o of t.resources.toAdd)l.push(N(o,r)),e.paths.push(o.resource.path);if(o.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,n.as)(l);(0,n.k_)(r);const u=p.filter((e=>"error"in e)).map((e=>e.error));if(u.length>0)throw new i.Z("save:resources","Failed to save one or more resources",{errors:u})}async function N(e,t){const r={...null!=t?t:{},compress:e.compress},o=await(0,x.q6)(e.resource.portalItem.addResource(e.resource,e.content,r));if(!0!==o.ok)throw e.error?.(o.error),o.error;e.finish?.(e.resource)}async function j(e,t){const r=await(0,x.q6)(e.resource.update(e.content,t));if(!0!==r.ok)throw e.error?.(r.error),r.error;e.finish?.(e.resource)}const A="esri.layers.mixins.SceneService",P=a.Z.getLogger(A),U=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,n.Ds)((async(e,t,r)=>{switch(e){case Z.SAVE:return this._save(t);case Z.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,o=r&&parseInt(r.substring(r.lastIndexOf("/")+1,r.length),10);return null!=o?new f.Z(o):null}}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const o=null==e.spatialReference?{...e,spatialReference:this._readSpatialReference(t)}:e;return h.Z.fromJSON(o,r)}const o=t.store,s=this._readSpatialReference(t);return null==s||null==o||null==o.extent||!Array.isArray(o.extent)||o.extent.some((e=>e<O))?null:new h.Z({xmin:o.extent[0],ymin:o.extent[1],xmax:o.extent[2],ymax:o.extent[3],spatialReference:s})}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,o=null!=r.version?r.version.toString():"";return this.parseVersionString(o)}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,v.a7)(this.url,t.name);let o=t.name;if(!o&&this.url){const e=(0,v.Qc)(this.url);null!=e&&(o=e.title)}return"item-title-and-service-name"===this.sublayerTitleMode&&r&&(o=r+" - "+o),(0,v.ld)(o)}set url(e){const t=(0,v.XG)({layer:this,url:e,nonStandardUrlAllowed:!1,logger:P});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,r,o){(0,v.wH)(this,e,"layers",t,o)}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,_.T)(this.parsedUrl.path,this.rootNode,e,this.apiKey,P,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 i.Z("sceneservice:invalid-node-page","Invalid node page.");if(r.obb.center[0]<O||null==this.fullExtent||this.fullExtent.hasZ)return;const o=r.obb.halfSize,s=r.obb.center[2],a=Math.sqrt(o[0]*o[0]+o[1]*o[1]+o[2]*o[2]);this.fullExtent.zmin=s-a,this.fullExtent.zmax=s+a}else if("node"===e?.type){const t=e.rootNode?.mbs;if(!Array.isArray(t)||4!==t.length||t[0]<O)return;const r=t[2],o=t[3],{fullExtent:s}=this;s&&(s.zmin=r-o,s.zmax=r+o)}}async _fetchService(e){if(null==this.url)throw new i.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,s.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,s.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 o=t.data;this.read(o,this._getServiceContext()),this.validateLayer(o)}async _fetchVoxelServiceLayer(e){const t=(await(0,s.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 o=t.getTypeKeywords();for(const t of o)e.typeKeywords.push(t);e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)),r===q.newItem&&(e.typeKeywords=e.typeKeywords.filter((e=>"Hosted Service"!==e))))}async _saveAs(e,t){const r={...E,...t};let o=I.default.from(e);o||(P.error("_saveAs(): requires a portal item parameter"),await Promise.reject(new i.Z("sceneservice:portal-item-required","_saveAs() requires a portal item to save to"))),o.id&&(o=o.clone(),o.id=null);const s=o.portal||w.Z.getDefault();await this._ensureLoadBeforeSave(),o.type=F,o.portal=s;const a={origin:"portal-item",url:null,messages:[],portal:s,portalItem:o,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}},n={layers:[this.write({},a)]};return await Promise.all(a.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(n,a,r),o.url=this.url,o.title||(o.title=this.title),this._updateTypeKeywords(o,r,q.newItem),await s.signIn(),await(s.user?.addItem({item:o,folder:r&&r.folder,data:n})),await T(this.resourceReferences,a,null),this.portalItem=o,(0,y.D)(a),a.portalItem=o,o}async _save(e){const t={...E,...e};if(!this.portalItem)throw P.error("_save(): requires the .portalItem property to be set"),new i.Z("sceneservice:portal-item-not-set","Portal item to save to has not been set on this SceneService");if(this.portalItem.type!==F)throw P.error("_save(): Non-matching portal item type. Got "+this.portalItem.type+", expected "+F),new i.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||w.Z.getDefault(),portalItem:this.portalItem,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}},o={layers:[this.write({},r)]};return await Promise.all(r.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(o,r,t),this.portalItem.url=this.url,this.portalItem.title||(this.portalItem.title=this.title),this._updateTypeKeywords(this.portalItem,t,q.existingItem),await this.portalItem.update({data:o}),await T(this.resourceReferences,r,null),(0,y.D)(r),this.portalItem}async _validateAgainstJSONSchema(e,t,r){let o=t.messages?.filter((e=>"error"===e.type)).map((e=>new i.Z(e.name,e.message,e.details)))??[];r?.validationOptions?.ignoreUnsupported&&(o=o.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 s=r?.validationOptions,a=s?.enabled,n=S();if(a&&n){const t=(await n()).validate(e,r.portalItemLayerType);if(t.length>0){const e=`Layer item did not validate:\n${t.join("\n")}`;if(P.error(`_validateAgainstJSONSchema(): ${e}`),"throw"===s.failPolicy){const e=t.map((e=>new i.Z("sceneservice:schema-validation",e))).concat(o);throw new i.Z("sceneservice-validate:error","Failed to save layer item due to schema validation, see `details.errors`.",{combined:e})}}}if(o.length>0)throw new i.Z("sceneservice:save","Failed to save SceneService due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:o})}};return(0,o._)([(0,p.Cb)(g.id)],t.prototype,"id",void 0),(0,o._)([(0,p.Cb)({type:f.Z})],t.prototype,"spatialReference",void 0),(0,o._)([(0,u.r)("spatialReference",["spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readSpatialReference",null),(0,o._)([(0,p.Cb)({type:h.Z})],t.prototype,"fullExtent",void 0),(0,o._)([(0,u.r)("fullExtent",["fullExtent","store.extent","spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readFullExtent",null),(0,o._)([(0,p.Cb)({readOnly:!0,type:m.Z})],t.prototype,"heightModelInfo",void 0),(0,o._)([(0,p.Cb)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:{source:"minScale"},write:!1}}}})],t.prototype,"minScale",void 0),(0,o._)([(0,p.Cb)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:{source:"maxScale"},write:!1}}}})],t.prototype,"maxScale",void 0),(0,o._)([(0,p.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,o._)([(0,u.r)("version",["store.version"])],t.prototype,"readVersion",null),(0,o._)([(0,p.Cb)({type:String,json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,o._)([(0,p.Cb)({type:String,json:{read:!1}})],t.prototype,"sublayerTitleMode",void 0),(0,o._)([(0,p.Cb)({type:String})],t.prototype,"title",void 0),(0,o._)([(0,u.r)("portal-item","title")],t.prototype,"readTitlePortalItem",null),(0,o._)([(0,u.r)("service","title",["name"])],t.prototype,"readTitleService",null),(0,o._)([(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,o._)([(0,p.Cb)(g.HQ)],t.prototype,"url",null),(0,o._)([(0,d.c)("url")],t.prototype,"writeUrl",null),(0,o._)([(0,p.Cb)()],t.prototype,"parsedUrl",null),(0,o._)([(0,p.Cb)({readOnly:!0})],t.prototype,"store",void 0),(0,o._)([(0,p.Cb)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],t.prototype,"rootNode",void 0),t=(0,o._)([(0,c.j)(A)],t),t},O=-1e38;var q,K;(K=q||(q={}))[K.existingItem=0]="existingItem",K[K.newItem=1]="newItem";const F="Scene Service",E={getTypeKeywords:()=>[],portalItemLayerType:"unknown",validationOptions:{enabled:!0,ignoreUnsupported:!1,failPolicy:"throw"}};var Z;!function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(Z||(Z={}))},61064:(e,t,r)=>{r.d(t,{T:()=>i});var o=r(3172),s=r(20102);async function i(e,t,r,i,a,n){let l=null;if(null!=r){const t=`${e}/nodepages/`,s=t+Math.floor(r.rootIndex/r.nodesPerPage);try{return{type:"page",rootPage:(await(0,o.default)(s,{query:{f:"json",token:i},responseType:"json",signal:n})).data,rootIndex:r.rootIndex,pageSize:r.nodesPerPage,lodMetric:r.lodSelectionMetricType,urlPrefix:t}}catch(e){null!=a&&a.warn("#fetchIndexInfo()","Failed to load root node page. Falling back to node documents.",s,e),l=e}}if(!t)return null;const p=`${e}/nodes/`,u=p+(t&&t.split("/").pop());try{return{type:"node",rootNode:(await(0,o.default)(u,{query:{f:"json",token:i},responseType:"json",signal:n})).data,urlPrefix:p}}catch(e){throw new s.Z("sceneservice:root-node-missing","Root node missing.",{pageError:l,nodeError:e,url:u})}}},51161:(e,t,r)=>{r.d(t,{H3:()=>v,QI:()=>c,U4:()=>l,Yh:()=>y});var o=r(43697),s=r(96674),i=r(5600),a=(r(75215),r(67676),r(80442),r(36030)),n=r(52011);let l=class extends s.wq{constructor(){super(...arguments),this.nodesPerPage=null,this.rootIndex=0,this.lodSelectionMetricType=null}};(0,o._)([(0,i.Cb)({type:Number})],l.prototype,"nodesPerPage",void 0),(0,o._)([(0,i.Cb)({type:Number})],l.prototype,"rootIndex",void 0),(0,o._)([(0,i.Cb)({type:String})],l.prototype,"lodSelectionMetricType",void 0),l=(0,o._)([(0,n.j)("esri.layer.support.I3SNodePageDefinition")],l);let p=class extends s.wq{constructor(){super(...arguments),this.factor=1}};(0,o._)([(0,i.Cb)({type:Number,json:{read:{source:"textureSetDefinitionId"}}})],p.prototype,"id",void 0),(0,o._)([(0,i.Cb)({type:Number})],p.prototype,"factor",void 0),p=(0,o._)([(0,n.j)("esri.layer.support.I3SMaterialTexture")],p);let u=class extends s.wq{constructor(){super(...arguments),this.baseColorFactor=[1,1,1,1],this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.metallicFactor=1,this.roughnessFactor=1}};(0,o._)([(0,i.Cb)({type:[Number]})],u.prototype,"baseColorFactor",void 0),(0,o._)([(0,i.Cb)({type:p})],u.prototype,"baseColorTexture",void 0),(0,o._)([(0,i.Cb)({type:p})],u.prototype,"metallicRoughnessTexture",void 0),(0,o._)([(0,i.Cb)({type:Number})],u.prototype,"metallicFactor",void 0),(0,o._)([(0,i.Cb)({type:Number})],u.prototype,"roughnessFactor",void 0),u=(0,o._)([(0,n.j)("esri.layer.support.I3SMaterialPBRMetallicRoughness")],u);let c=class extends s.wq{constructor(){super(...arguments),this.alphaMode="opaque",this.alphaCutoff=.25,this.doubleSided=!1,this.cullFace="none",this.normalTexture=null,this.occlusionTexture=null,this.emissiveTexture=null,this.emissiveFactor=null,this.pbrMetallicRoughness=null}};(0,o._)([(0,a.J)({opaque:"opaque",mask:"mask",blend:"blend"})],c.prototype,"alphaMode",void 0),(0,o._)([(0,i.Cb)({type:Number})],c.prototype,"alphaCutoff",void 0),(0,o._)([(0,i.Cb)({type:Boolean})],c.prototype,"doubleSided",void 0),(0,o._)([(0,a.J)({none:"none",back:"back",front:"front"})],c.prototype,"cullFace",void 0),(0,o._)([(0,i.Cb)({type:p})],c.prototype,"normalTexture",void 0),(0,o._)([(0,i.Cb)({type:p})],c.prototype,"occlusionTexture",void 0),(0,o._)([(0,i.Cb)({type:p})],c.prototype,"emissiveTexture",void 0),(0,o._)([(0,i.Cb)({type:[Number]})],c.prototype,"emissiveFactor",void 0),(0,o._)([(0,i.Cb)({type:u})],c.prototype,"pbrMetallicRoughness",void 0),c=(0,o._)([(0,n.j)("esri.layer.support.I3SMaterialDefinition")],c);let d=class extends s.wq{};(0,o._)([(0,i.Cb)({type:String,json:{read:{source:["name","index"],reader:(e,t)=>null!=e?e:`${t.index}`}}})],d.prototype,"name",void 0),(0,o._)([(0,a.J)({jpg:"jpg",png:"png",dds:"dds","ktx-etc2":"ktx-etc2",ktx2:"ktx2",basis:"basis"})],d.prototype,"format",void 0),d=(0,o._)([(0,n.j)("esri.layer.support.I3STextureFormat")],d);let y=class extends s.wq{constructor(){super(...arguments),this.atlas=!1}};(0,o._)([(0,i.Cb)({type:[d]})],y.prototype,"formats",void 0),(0,o._)([(0,i.Cb)({type:Boolean})],y.prototype,"atlas",void 0),y=(0,o._)([(0,n.j)("esri.layer.support.I3STextureSetDefinition")],y);let h=class extends s.wq{};(0,o._)([(0,a.J)({Float32:"Float32",UInt64:"UInt64",UInt32:"UInt32",UInt16:"UInt16",UInt8:"UInt8"})],h.prototype,"type",void 0),(0,o._)([(0,i.Cb)({type:Number})],h.prototype,"component",void 0),h=(0,o._)([(0,n.j)("esri.layer.support.I3SGeometryAttribute")],h);let m=class extends s.wq{};(0,o._)([(0,a.J)({draco:"draco"})],m.prototype,"encoding",void 0),(0,o._)([(0,i.Cb)({type:[String]})],m.prototype,"attributes",void 0),m=(0,o._)([(0,n.j)("esri.layer.support.I3SGeometryCompressedAttributes")],m);let f=class extends s.wq{constructor(){super(...arguments),this.offset=0}};(0,o._)([(0,i.Cb)({type:Number})],f.prototype,"offset",void 0),(0,o._)([(0,i.Cb)({type:h})],f.prototype,"position",void 0),(0,o._)([(0,i.Cb)({type:h})],f.prototype,"normal",void 0),(0,o._)([(0,i.Cb)({type:h})],f.prototype,"uv0",void 0),(0,o._)([(0,i.Cb)({type:h})],f.prototype,"color",void 0),(0,o._)([(0,i.Cb)({type:h})],f.prototype,"uvRegion",void 0),(0,o._)([(0,i.Cb)({type:h})],f.prototype,"featureId",void 0),(0,o._)([(0,i.Cb)({type:h})],f.prototype,"faceRange",void 0),(0,o._)([(0,i.Cb)({type:m})],f.prototype,"compressedAttributes",void 0),f=(0,o._)([(0,n.j)("esri.layer.support.I3SGeometryBuffer")],f);let v=class extends s.wq{};(0,o._)([(0,a.J)({triangle:"triangle"})],v.prototype,"topology",void 0),(0,o._)([(0,i.Cb)()],v.prototype,"geometryBuffers",void 0),v=(0,o._)([(0,n.j)("esri.layer.support.I3SGeometryDefinition")],v)},97873:(e,t,r)=>{r.r(t),r.d(t,{addOrUpdateResource:()=>n,contentToBlob:()=>d,fetchResources:()=>a,getSiblingOfSameType:()=>y,getSiblingOfSameTypeI:()=>h,removeAllResources:()=>p,removeResource:()=>l,splitPrefixFileNameAndExtension:()=>c});var o=r(3172),s=r(20102),i=r(17452);async function a(e,t={},r){await e.load(r);const o=(0,i.v_)(e.itemUrl,"resources"),{start:s=1,num:a=10,sortOrder:n="asc",sortField:l="created"}=t,p={query:{start:s,num:a,sortOrder:n,sortField:l,token:e.apiKey},signal:r?.signal},u=await e.portal.request(o,p);return{total:u.total,nextStart:u.nextStart,resources:u.resources.map((({created:t,size:r,resource:o})=>({created:new Date(t),size:r,resource:e.resourceFromPath(o)})))}}async function n(e,t,r,o){if(!e.hasPath())throw new s.Z(`portal-item-resource-${t}:invalid-path`,"Resource does not have a valid path");const a=e.portalItem;await a.load(o);const n=(0,i.v_)(a.userItemUrl,"add"===t?"addResources":"updateResources"),[l,p]=u(e.path),c=await d(r),y=new FormData;return l&&"."!==l&&y.append("resourcesPrefix",l),null!=o&&o.compress&&y.append("compress","true"),y.append("fileName",p),y.append("file",c,p),y.append("f","json"),null!=o&&o.access&&y.append("access",o.access),await a.portal.request(n,{method:"post",body:y,signal:o?.signal}),e}async function l(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 o=(0,i.v_)(e.userItemUrl,"removeResources");await e.portal.request(o,{method:"post",query:{resource:t.path},signal:r?.signal}),t.portalItem=null}async function p(e,t){await e.load(t);const r=(0,i.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,i.Ml)(e);return null==t?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[o,s]=u(t);return[o,s,r]}async function d(e){return e instanceof Blob?e:(await(0,o.default)(e.url,{responseType:"blob"})).data}function y(e,t){if(!e.hasPath())return null;const[r,,o]=c(e.path);return e.portalItem.resourceFromPath((0,i.v_)(r,t+o))}function h(e,t){if(!e.hasPath())return null;const[r,,o]=c(e.path);return e.portalItem.resourceFromPath((0,i.v_)(r,t+o))}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8598],{93860:(e,t,r)=>{function n(e,t){const r=e.count;t||(t=new e.TypedArrayConstructor(r));for(let n=0;n<r;n++)t[n]=e.get(n);return t}r.d(t,{m:()=>n}),Object.freeze(Object.defineProperty({__proto__:null,makeDense:n},Symbol.toStringTag,{value:"Module"}))},10816:(e,t,r)=>{r.d(t,{a:()=>o,f:()=>a,n:()=>s});var n=r(1533);function o(e,t){s(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function s(e,t,r=2,o=r){const s=t.length/2;let a=0,i=0;if((0,n.kJ)(t)||(0,n.Q7)(t)){for(let n=0;n<s;++n)e[a]=t[i],e[a+1]=t[i+1],a+=r,i+=o;return}const u=(0,n.Op)(t);if((0,n.B3)(t))for(let n=0;n<s;++n)e[a]=Math.max(t[i]/u,-1),e[a+1]=Math.max(t[i+1]/u,-1),a+=r,i+=o;else for(let n=0;n<s;++n)e[a]=t[i]/u,e[a+1]=t[i+1]/u,a+=r,i+=o}function a(e,t,r,n){const o=e.typedBuffer,s=e.typedBufferStride,a=n?.count??e.count;let i=(n?.dstIndex??0)*s;for(let e=0;e<a;++e)o[i]=t,o[i+1]=r,i+=s}Object.freeze(Object.defineProperty({__proto__:null,fill:a,normalizeIntegerBuffer:s,normalizeIntegerBufferView:o},Symbol.toStringTag,{value:"Module"}))},56067:(e,t,r)=>{function n(e,t){o(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r=3,n=r){const o=t.length/n;let s=0,a=0;for(let i=0;i<o;++i)e[s]=t[a],e[s+1]=t[a+1],e[s+2]=t[a+2],s+=r,a+=n}function s(e,t,r,n,o){const s=e.typedBuffer,a=e.typedBufferStride,i=o?.count??e.count;let u=(o?.dstIndex??0)*a;for(let e=0;e<i;++e)s[u]=t,s[u+1]=r,s[u+2]=n,u+=a}r.d(t,{a:()=>n,c:()=>o,f:()=>s}),Object.freeze(Object.defineProperty({__proto__:null,copy:o,copyView:n,fill:s},Symbol.toStringTag,{value:"Module"}))},11077:(e,t,r)=>{r.d(t,{a:()=>o,b:()=>i,n:()=>a,s:()=>u,t:()=>s});var n=r(72220);function o(e,t,r){s(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function s(e,t,r,o=4,s=o){if(e.length/o!=t.length/s)return void n.c.error("source and destination buffers need to have the same number of elements");const a=e.length/o,i=r[0],u=r[1],l=r[2],c=r[3],f=r[4],d=r[5],p=r[6],h=r[7],m=r[8];let w=0,T=0;for(let r=0;r<a;r++){const r=t[w],n=t[w+1],a=t[w+2],g=t[w+3];e[T]=i*r+c*n+p*a,e[T+1]=u*r+f*n+h*a,e[T+2]=l*r+d*n+m*a,e[T+3]=g,w+=s,T+=o}}function a(e,t){const r=Math.min(e.count,t.count),n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride;for(let e=0;e<r;e++){const t=e*o,r=e*a,i=s[r],u=s[r+1],l=s[r+2],c=i*i+u*u+l*l;if(c>0){const e=1/Math.sqrt(c);n[t]=e*i,n[t+1]=e*u,n[t+2]=e*l}}}function i(e,t,r){u(e.typedBuffer,t,r,e.typedBufferStride)}function u(e,t,r,n=4){const o=Math.min(e.length/n,t.count),s=t.typedBuffer,a=t.typedBufferStride;let i=0,u=0;for(let t=0;t<o;t++)e[u]=r*s[i],e[u+1]=r*s[i+1],e[u+2]=r*s[i+2],e[u+3]=r*s[i+3],i+=a,u+=n}Object.freeze(Object.defineProperty({__proto__:null,normalize:a,scale:u,scaleView:i,transformMat3:s,transformMat3View:o,transformMat4:function(e,t,r){if(e.count!==t.count)return void n.c.error("source and destination buffers need to have the same number of elements");const o=e.count,s=r[0],a=r[1],i=r[2],u=r[3],l=r[4],c=r[5],f=r[6],d=r[7],p=r[8],h=r[9],m=r[10],w=r[11],T=r[12],g=r[13],y=r[14],_=r[15],x=e.typedBuffer,b=e.typedBufferStride,O=t.typedBuffer,S=t.typedBufferStride;for(let e=0;e<o;e++){const t=e*b,r=e*S,n=O[r],o=O[r+1],N=O[r+2],A=O[r+3];x[t]=s*n+l*o+p*N+T*A,x[t+1]=a*n+c*o+h*N+g*A,x[t+2]=i*n+f*o+m*N+y*A,x[t+3]=u*n+d*o+w*N+_*A}}},Symbol.toStringTag,{value:"Module"}))},75488:(e,t,r)=>{function n(e,t){o(e.typedBuffer,t,e.typedBufferStride)}function o(e,t,r=4){const n=t.typedBuffer,o=t.typedBufferStride,s=t.count;let a=0,i=0;for(let t=0;t<s;++t)e[a]=n[i],e[a+1]=n[i+1],e[a+2]=n[i+2],e[a+3]=n[i+3],a+=r,i+=o}function s(e,t,r,n,o,s){const a=e.typedBuffer,i=e.typedBufferStride,u=s?.count??e.count;let l=(s?.dstIndex??0)*i;for(let e=0;e<u;++e)a[l]=t,a[l+1]=r,a[l+2]=n,a[l+3]=o,l+=i}r.d(t,{a:()=>n,c:()=>o,f:()=>s}),Object.freeze(Object.defineProperty({__proto__:null,copy:o,copyView:n,fill:s},Symbol.toStringTag,{value:"Module"}))},23670:(e,t,r)=>{r.d(t,{G:()=>o});var n=r(20102);let o=class{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}since(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new n.Z(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new o(this.major,this.minor,this._context)}static parse(e,t=""){const[r,s]=e.split("."),a=/^\s*\d+\s*$/;if(!r||!r.match||!r.match(a))throw new n.Z((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!s||!s.match||!s.match(a))throw new n.Z((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const i=parseInt(r,10),u=parseInt(s,10);return new o(i,u,t)}}},40270:(e,t,r)=>{r.d(t,{C:()=>u});var n=r(3172),o=r(66643),s=r(20102),a=r(95330),i=r(17452);class u{constructor(e){this._streamDataRequester=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,i.HK)(e)?((0,a.k_)(t),(0,i.AH)(e)):this._load("binary",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){if(null==this._streamDataRequester)return(await(0,n.default)(t,{responseType:l[e]})).data;const i=await(0,o.q6)(this._streamDataRequester.request(t,e,r));if(!0===i.ok)return i.value;throw(0,a.r9)(i.error),new s.Z("",`Request for resource failed: ${i.error}`)}}const l={image:"image",binary:"array-buffer",json:"json"}},91911:(e,t,r)=>{r.d(t,{p:()=>a});var n=r(1533),o=r(24882),s=r(35371);function a(e,t){switch(t){case s.MX.TRIANGLES:return"number"==typeof(r=e)?(0,o.KF)(r):(0,n.lq)(r)?new Uint16Array(r):r;case s.MX.TRIANGLE_STRIP:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return[];const r=t-2,n=(0,o.$z)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(n[e++]=t,n[e++]=t+1,n[e++]=t+2):(n[e++]=t+1,n[e++]=t,n[e++]=t+2)}else{let t=0;for(let o=0;o<r;o+=1)o%2==0?(n[t++]=e[o],n[t++]=e[o+1],n[t++]=e[o+2]):(n[t++]=e[o+1],n[t++]=e[o],n[t++]=e[o+2])}return n}(e);case s.MX.TRIANGLE_FAN:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,n=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)n[e++]=0,n[e++]=t+1,n[e++]=t+2;return n}const o=e[0];let s=e[1],a=0;for(let t=0;t<r;++t){const r=e[t+2];n[a++]=o,n[a++]=s,n[a++]=r,s=r}return n}(e)}var r}},15317:(e,t,r)=>{r.d(t,{$A:()=>s,Ml:()=>i,NM:()=>o,i$:()=>a});var n=r(47026);class o{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding=n.Ti.KTX2_ENCODING}}function s(e){return"encoded-mesh-texture"===e?.type}async function a(e){return new Promise(((t,r)=>{const n=new Blob([e]),o=new FileReader;o.onload=()=>{const e=o.result;t(JSON.parse(e))},o.onerror=e=>{r(e)},o.readAsText(n)}))}async function i(e,t){return t===n.Ti.KTX2_ENCODING?new o(e):new Promise(((r,n)=>{const o=new Blob([e],{type:t}),s=URL.createObjectURL(o),a=new Image,i=()=>{URL.revokeObjectURL(s),"decode"in a?a.decode().then((()=>r(a)),(()=>r(a))).then(l):(r(a),l())},u=e=>{URL.revokeObjectURL(s),n(e),l()},l=()=>{a.removeEventListener("load",i),a.removeEventListener("error",u)};a.addEventListener("load",i),a.addEventListener("error",u),a.src=s}))}},91695:(e,t,r)=>{r.d(t,{Q:()=>U});var n,o,s=r(92604),a=r(13598),i=r(35371),u=r(20102),l=r(30175),c=r(95330),f=r(17452),d=r(23670),p=r(52138),h=r(51305),m=r(94961),w=r(56481),T=r(93860);r(80442);class g{constructor(e){this._data=e,this._offset4=0,this._dataUint32=new Uint32Array(this._data,0,Math.floor(this._data.byteLength/4))}readUint32(){const e=this._offset4;return this._offset4+=1,this._dataUint32[e]}readUint8Array(e){const t=4*this._offset4;return this._offset4+=e/4,new Uint8Array(this._data,t,e)}remainingBytes(){return this._data.byteLength-4*this._offset4}}!function(e){e.SCALAR="SCALAR",e.VEC2="VEC2",e.VEC3="VEC3",e.VEC4="VEC4",e.MAT2="MAT2",e.MAT3="MAT3",e.MAT4="MAT4"}(n||(n={})),function(e){e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER"}(o||(o={}));var y=r(74085);const _={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1},x={pbrMetallicRoughness:_,emissiveFactor:[0,0,0],alphaMode:"OPAQUE",alphaCutoff:.5,doubleSided:!1},b={ESRI_externalColorMixMode:"tint"},O=(e={})=>{const t={..._,...e.pbrMetallicRoughness},r=function(e){switch(e.ESRI_externalColorMixMode){case"multiply":case"tint":case"ignore":case"replace":break;default:(0,y.Bg)(e.ESRI_externalColorMixMode),e.ESRI_externalColorMixMode="tint"}return e}({...b,...e.extras});return{...x,...e,pbrMetallicRoughness:t,extras:r}},S={magFilter:i.cw.LINEAR,minFilter:i.cw.LINEAR_MIPMAP_LINEAR,wrapS:i.e8.REPEAT,wrapT:i.e8.REPEAT},N=e=>({...S,...e});var A=r(15317);const E=1179937895;class v{constructor(e,t,r,n){if(this._context=e,this.uri=t,this.json=r,this._glbBuffer=n,this._bufferLoaders=new Map,this._textureLoaders=new Map,this._textureCache=new Map,this._materialCache=new Map,this._nodeParentMap=new Map,this._nodeTransformCache=new Map,this._supportedExtensions=["KHR_texture_basisu"],this._baseUri=function(e){let t,r;return e.replace(/^(.*\/)?([^/]*)$/,((e,n,o)=>(t=n||"",r=o||"",""))),{dirPart:t,filePart:r}}(this.uri).dirPart,this._checkVersionSupported(),this._checkRequiredExtensionsSupported(),null==r.scenes)throw new u.Z("gltf-loader-unsupported-feature","Scenes must be defined.");if(null==r.meshes)throw new u.Z("gltf-loader-unsupported-feature","Meshes must be defined");if(null==r.nodes)throw new u.Z("gltf-loader-unsupported-feature","Nodes must be defined.");this._computeNodeParents()}static async load(e,t,r){if((0,f.HK)(t)){const r=(0,f.sJ)(t);if(r&&"model/gltf-binary"!==r.mediaType)try{const n=JSON.parse(r.isBase64?atob(r.data):r.data);return new v(e,t,n)}catch{}const n=(0,f.AH)(t);if(v._isGLBData(n))return this._fromGLBData(e,t,n)}if(t.endsWith(".gltf")){const n=await e.loadJSON(t,r);return new v(e,t,n)}const n=await e.loadBinary(t,r);if(v._isGLBData(n))return this._fromGLBData(e,t,n);const o=await e.loadJSON(t,r);return new v(e,t,o)}static _isGLBData(e){if(null==e)return!1;const t=new g(e);return t.remainingBytes()>=4&&t.readUint32()===E}static async _fromGLBData(e,t,r){const n=await v._parseGLBData(r);return new v(e,t,n.json,n.binaryData)}static async _parseGLBData(e){const t=new g(e);if(t.remainingBytes()<12)throw new u.Z("gltf-loader-error","GLB binary data is insufficiently large.");const r=t.readUint32(),n=t.readUint32(),o=t.readUint32();if(r!==E)throw new u.Z("gltf-loader-error","Magic first 4 bytes do not fit to expected GLB value.");if(e.byteLength<o)throw new u.Z("gltf-loader-error","GLB binary data is smaller than header specifies.");if(2!==n)throw new u.Z("gltf-loader-unsupported-feature","An unsupported GLB container version was detected. Only version 2 is supported.");let a,i,l=0;for(;t.remainingBytes()>=8;){const e=t.readUint32(),r=t.readUint32();if(0===l){if(1313821514!==r)throw new u.Z("gltf-loader-error","First GLB chunk must be JSON.");if(e<0)throw new u.Z("gltf-loader-error","No JSON data found.");a=await(0,A.i$)(t.readUint8Array(e))}else if(1===l){if(5130562!==r)throw new u.Z("gltf-loader-unsupported-feature","Second GLB chunk expected to be BIN.");i=t.readUint8Array(e)}else s.Z.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] More than 2 GLB chunks detected. Skipping.");l+=1}if(!a)throw new u.Z("gltf-loader-error","No GLB JSON chunk detected.");return{json:a,binaryData:i}}async getBuffer(e,t){const r=this.json.buffers[e];if(null==r.uri){if(null==this._glbBuffer)throw new u.Z("gltf-loader-error","GLB buffer not present");return this._glbBuffer}const n=await this._getBufferLoader(e,t);if(n.byteLength!==r.byteLength)throw new u.Z("gltf-loader-error","Buffer byte lengths should match.");return n}async _getBufferLoader(e,t){const r=this._bufferLoaders.get(e);if(r)return r;const n=this.json.buffers[e].uri,o=this._context.loadBinary(this._resolveUri(n),t).then((e=>new Uint8Array(e)));return this._bufferLoaders.set(e,o),o}async getAccessor(e,t){if(!this.json.accessors)throw new u.Z("gltf-loader-unsupported-feature","Accessors missing.");const r=this.json.accessors[e];if(null==r?.bufferView)throw new u.Z("gltf-loader-unsupported-feature","Some accessor does not specify a bufferView.");if(r.type in[n.MAT2,n.MAT3,n.MAT4])throw new u.Z("gltf-loader-unsupported-feature",`AttributeType ${r.type} is not supported`);const o=this.json.bufferViews[r.bufferView],s=await this.getBuffer(o.buffer,t),a=L[r.type],i=B[r.componentType],l=a*i,c=o.byteStride||l;return{raw:s.buffer,byteStride:c,byteOffset:s.byteOffset+(o.byteOffset||0)+(r.byteOffset||0),entryCount:r.count,isDenselyPacked:c===l,componentCount:a,componentByteSize:i,componentType:r.componentType,min:r.min,max:r.max,normalized:!!r.normalized}}async getIndexData(e,t){if(null==e.indices)return;const r=await this.getAccessor(e.indices,t);if(r.isDenselyPacked)switch(r.componentType){case i.g.UNSIGNED_BYTE:return new Uint8Array(r.raw,r.byteOffset,r.entryCount);case i.g.UNSIGNED_SHORT:return new Uint16Array(r.raw,r.byteOffset,r.entryCount);case i.g.UNSIGNED_INT:return new Uint32Array(r.raw,r.byteOffset,r.entryCount)}else switch(r.componentType){case i.g.UNSIGNED_BYTE:return(0,T.m)(this._wrapAccessor(w.D_,r));case i.g.UNSIGNED_SHORT:return(0,T.m)(this._wrapAccessor(w.av,r));case i.g.UNSIGNED_INT:return(0,T.m)(this._wrapAccessor(w.Nu,r))}}async getPositionData(e,t){if(null==e.attributes.POSITION)throw new u.Z("gltf-loader-unsupported-feature","No POSITION vertex data found.");const r=await this.getAccessor(e.attributes.POSITION,t);if(r.componentType!==i.g.FLOAT)throw new u.Z("gltf-loader-unsupported-feature","Expected type FLOAT for POSITION vertex attribute, but found "+i.g[r.componentType]);if(3!==r.componentCount)throw new u.Z("gltf-loader-unsupported-feature","POSITION vertex attribute must have 3 components, but found "+r.componentCount.toFixed());return this._wrapAccessor(w.ct,r)}async getNormalData(e,t){if(null==e.attributes.NORMAL)throw new u.Z("gltf-loader-error","No NORMAL vertex data found.");const r=await this.getAccessor(e.attributes.NORMAL,t);if(r.componentType!==i.g.FLOAT)throw new u.Z("gltf-loader-unsupported-feature","Expected type FLOAT for NORMAL vertex attribute, but found "+i.g[r.componentType]);if(3!==r.componentCount)throw new u.Z("gltf-loader-unsupported-feature","NORMAL vertex attribute must have 3 components, but found "+r.componentCount.toFixed());return this._wrapAccessor(w.ct,r)}async getTangentData(e,t){if(null==e.attributes.TANGENT)throw new u.Z("gltf-loader-error","No TANGENT vertex data found.");const r=await this.getAccessor(e.attributes.TANGENT,t);if(r.componentType!==i.g.FLOAT)throw new u.Z("gltf-loader-unsupported-feature","Expected type FLOAT for TANGENT vertex attribute, but found "+i.g[r.componentType]);if(4!==r.componentCount)throw new u.Z("gltf-loader-unsupported-feature","TANGENT vertex attribute must have 4 components, but found "+r.componentCount.toFixed());return new w.ek(r.raw,r.byteOffset,r.byteStride,r.byteOffset+r.byteStride*r.entryCount)}async getTextureCoordinates(e,t){if(null==e.attributes.TEXCOORD_0)throw new u.Z("gltf-loader-error","No TEXCOORD_0 vertex data found.");const r=await this.getAccessor(e.attributes.TEXCOORD_0,t);if(2!==r.componentCount)throw new u.Z("gltf-loader-unsupported-feature","TEXCOORD_0 vertex attribute must have 2 components, but found "+r.componentCount.toFixed());if(r.componentType===i.g.FLOAT)return this._wrapAccessor(w.Eu,r);if(!r.normalized)throw new u.Z("gltf-loader-unsupported-feature","Integer component types are only supported for a normalized accessor for TEXCOORD_0.");return function(e){switch(e.componentType){case i.g.BYTE:return new w.Vs(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case i.g.UNSIGNED_BYTE:return new w.xA(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case i.g.SHORT:return new w.or(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case i.g.UNSIGNED_SHORT:return new w.TS(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case i.g.UNSIGNED_INT:return new w.qt(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case i.g.FLOAT:return new w.Eu(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount)}}(r)}async getVertexColors(e,t){if(null==e.attributes.COLOR_0)throw new u.Z("gltf-loader-error","No COLOR_0 vertex data found.");const r=await this.getAccessor(e.attributes.COLOR_0,t);if(4!==r.componentCount&&3!==r.componentCount)throw new u.Z("gltf-loader-unsupported-feature","COLOR_0 attribute must have 3 or 4 components, but found "+r.componentCount.toFixed());if(4===r.componentCount){if(r.componentType===i.g.FLOAT)return this._wrapAccessor(w.ek,r);if(r.componentType===i.g.UNSIGNED_BYTE)return this._wrapAccessor(w.mc,r);if(r.componentType===i.g.UNSIGNED_SHORT)return this._wrapAccessor(w.v6,r)}else if(3===r.componentCount){if(r.componentType===i.g.FLOAT)return this._wrapAccessor(w.ct,r);if(r.componentType===i.g.UNSIGNED_BYTE)return this._wrapAccessor(w.ne,r);if(r.componentType===i.g.UNSIGNED_SHORT)return this._wrapAccessor(w.mw,r)}throw new u.Z("gltf-loader-unsupported-feature","Unsupported component type for COLOR_0 attribute: "+i.g[r.componentType])}hasPositions(e){return void 0!==e.attributes.POSITION}hasNormals(e){return void 0!==e.attributes.NORMAL}hasVertexColors(e){return void 0!==e.attributes.COLOR_0}hasTextureCoordinates(e){return void 0!==e.attributes.TEXCOORD_0}hasTangents(e){return void 0!==e.attributes.TANGENT}async getMaterial(e,t,r){let n=e.material?this._materialCache.get(e.material):void 0;if(!n){const o=null!=e.material?O(this.json.materials[e.material]):O(),s=o.pbrMetallicRoughness,a=this.hasVertexColors(e),i=this.getTexture(s.baseColorTexture,t),u=this.getTexture(o.normalTexture,t),l=r?this.getTexture(o.occlusionTexture,t):void 0,c=r?this.getTexture(o.emissiveTexture,t):void 0,f=r?this.getTexture(s.metallicRoughnessTexture,t):void 0,d=null!=e.material?e.material:-1;n={alphaMode:o.alphaMode,alphaCutoff:o.alphaCutoff,color:s.baseColorFactor,doubleSided:!!o.doubleSided,colorTexture:await i,normalTexture:await u,name:o.name,id:d,occlusionTexture:await l,emissiveTexture:await c,emissiveFactor:o.emissiveFactor,metallicFactor:s.metallicFactor,roughnessFactor:s.roughnessFactor,metallicRoughnessTexture:await f,hasVertexColors:a,ESRI_externalColorMixMode:o.extras.ESRI_externalColorMixMode,colorTextureTransform:s?.baseColorTexture?.extensions?.KHR_texture_transform,normalTextureTransform:o.normalTexture?.extensions?.KHR_texture_transform,occlusionTextureTransform:o.occlusionTexture?.extensions?.KHR_texture_transform,emissiveTextureTransform:o.emissiveTexture?.extensions?.KHR_texture_transform,metallicRoughnessTextureTransform:s?.metallicRoughnessTexture?.extensions?.KHR_texture_transform}}return n}async getTexture(e,t){if(!e)return;if(0!==(e.texCoord||0))throw new u.Z("gltf-loader-unsupported-feature","Only TEXCOORD with index 0 is supported.");const r=e.index,n=this.json.textures[r],o=N(null!=n.sampler?this.json.samplers[n.sampler]:{}),s=this._getTextureSourceId(n),a=this.json.images[s],i=await this._loadTextureImageData(r,n,t);return(0,l.s1)(this._textureCache,r,(()=>{const e=e=>33071===e||33648===e||10497===e,t=e=>{throw new u.Z("gltf-loader-error",`Unexpected TextureSampler WrapMode: ${e}`)};return{data:i,wrapS:e(o.wrapS)?o.wrapS:t(o.wrapS),wrapT:e(o.wrapT)?o.wrapT:t(o.wrapT),minFilter:o.minFilter,name:a.name,id:r}}))}getNodeTransform(e){if(void 0===e)return R;let t=this._nodeTransformCache.get(e);if(!t){const r=this.getNodeTransform(this._getNodeParent(e)),n=this.json.nodes[e];n.matrix?t=(0,p.m)((0,a.c)(),r,n.matrix):n.translation||n.rotation||n.scale?(t=(0,a.b)(r),n.translation&&(0,p.w)(t,t,n.translation),n.rotation&&(M[3]=(0,h.g)(M,n.rotation),(0,p.e)(t,t,M[3],M)),n.scale&&(0,p.k)(t,t,n.scale)):t=(0,a.b)(r),this._nodeTransformCache.set(e,t)}return t}_wrapAccessor(e,t){return new e(t.raw,t.byteOffset,t.byteStride,t.byteOffset+t.byteStride*(t.entryCount-1)+t.componentByteSize*t.componentCount)}_resolveUri(e){return(0,f.hF)(e,this._baseUri)}_getNodeParent(e){return this._nodeParentMap.get(e)}_checkVersionSupported(){const e=d.G.parse(this.json.asset.version,"glTF");C.validate(e)}_checkRequiredExtensionsSupported(){const e=this.json;if(e.extensionsRequired&&!e.extensionsRequired.every((e=>this._supportedExtensions.includes(e))))throw new u.Z("gltf-loader-unsupported-feature","gltf loader was not able to load unsupported feature. Required extensions: "+e.extensionsRequired.join(", "))}_computeNodeParents(){this.json.nodes.forEach(((e,t)=>{e.children&&e.children.forEach((e=>{this._nodeParentMap.set(e,t)}))}))}async _loadTextureImageData(e,t,r){const n=this._textureLoaders.get(e);if(n)return n;const o=this._createTextureLoader(t,r);return this._textureLoaders.set(e,o),o}_getTextureSourceId(e){if(void 0!==e.extensions&&null!==e.extensions.KHR_texture_basisu)return e.extensions.KHR_texture_basisu.source;if(null!==e.source)return e.source;throw new u.Z("gltf-loader-unsupported-feature","Source is expected to be defined for a texture. It can also be omitted in favour of an KHR_texture_basisu extension tag.")}async _createTextureLoader(e,t){const r=this._getTextureSourceId(e),n=this.json.images[r];if(n.uri){if(n.uri.endsWith(".ktx2")){const e=await this._context.loadBinary(this._resolveUri(n.uri),t);return new A.NM(new Uint8Array(e))}return this._context.loadImage(this._resolveUri(n.uri),t)}if(null==n.bufferView)throw new u.Z("gltf-loader-unsupported-feature","Image bufferView must be defined.");if(null==n.mimeType)throw new u.Z("gltf-loader-unsupported-feature","Image mimeType must be defined.");const o=this.json.bufferViews[n.bufferView],s=await this.getBuffer(o.buffer,t);if(null!=o.byteStride)throw new u.Z("gltf-loader-unsupported-feature","byteStride not supported for image buffer");const a=s.byteOffset+(o.byteOffset||0);return(0,A.Ml)(new Uint8Array(s.buffer,a,o.byteLength),n.mimeType)}async getLoadedBuffersSize(){if(this._glbBuffer)return this._glbBuffer.byteLength;const e=await(0,c.WW)(Array.from(this._bufferLoaders.values())),t=await(0,c.WW)(Array.from(this._textureLoaders.values()));return e.reduce(((e,t)=>e+(t?.byteLength??0)),0)+t.reduce(((e,t)=>e+(t?(0,A.$A)(t)?t.data.byteLength:t.width*t.height*4:0)),0)}}const R=(0,p.A)((0,a.c)(),Math.PI/2),C=new d.G(2,0,"glTF"),M=(0,m.a)(),L={SCALAR:1,VEC2:2,VEC3:3,VEC4:4},B={[i.g.BYTE]:1,[i.g.UNSIGNED_BYTE]:1,[i.g.SHORT]:2,[i.g.UNSIGNED_SHORT]:2,[i.g.FLOAT]:4,[i.g.UNSIGNED_INT]:4};let I=0;async function U(e,t,r={},n=!0){const o=await v.load(e,t,r),u="gltf_"+I++,l={lods:[],materials:new Map,textures:new Map,meta:D(o)},c=!(!o.json.asset.extras||"symbolResource"!==o.json.asset.extras.ESRI_type),f=new Map;await F(o,(async(e,t,c,d)=>{const p=f.get(c)??0;f.set(c,p+1);const h=void 0!==e.mode?e.mode:i.MX.TRIANGLES,m=h===i.MX.TRIANGLES||h===i.MX.TRIANGLE_STRIP||h===i.MX.TRIANGLE_FAN?h:null;if(null==m)return void s.Z.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] Unsupported primitive mode ("+i.MX[h]+"). Skipping primitive.");if(!o.hasPositions(e))return void s.Z.getLogger("esri.views.3d.glTF").warn("Skipping primitive without POSITION vertex attribute.");const w=o.getPositionData(e,r),T=o.getMaterial(e,r,n),g=o.hasNormals(e)?o.getNormalData(e,r):null,y=o.hasTangents(e)?o.getTangentData(e,r):null,_=o.hasTextureCoordinates(e)?o.getTextureCoordinates(e,r):null,x=o.hasVertexColors(e)?o.getVertexColors(e,r):null,b=o.getIndexData(e,r),O={transform:(0,a.b)(t),attributes:{position:await w,normal:g?await g:null,texCoord0:_?await _:null,color:x?await x:null,tangent:y?await y:null},indices:await b,primitiveType:m,material:P(l,await T,u)};let S=null;null!=l.meta&&null!=l.meta.ESRI_lod&&"screenSpaceRadius"===l.meta.ESRI_lod.metric&&(S=l.meta.ESRI_lod.thresholds[c]),l.lods[c]=l.lods[c]||{parts:[],name:d,lodThreshold:S},l.lods[c].parts[p]=O}));for(const e of l.lods)e.parts=e.parts.filter((e=>!!e));const d=await o.getLoadedBuffersSize();return{model:l,meta:{isEsriSymbolResource:c,uri:o.uri},customMeta:{},size:d}}function D(e){const t=e.json;let r=null;return t.nodes.forEach((e=>{const t=e.extras;null!=t&&(t.ESRI_proxyEllipsoid||t.ESRI_lod)&&(r=t)})),r}async function F(e,t){const r=e.json,n=r.scenes[r.scene||0].nodes,o=n.length>1,a=[];for(const e of n){const t=r.nodes[e];a.push(i(e,0)),G(t)&&!o&&t.extensions.MSFT_lod.ids.forEach(((e,t)=>i(e,t+1)))}async function i(n,o){const u=r.nodes[n],l=e.getNodeTransform(n);if(null!=u.weights&&s.Z.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] Morph targets are not supported."),null!=u.mesh){const e=r.meshes[u.mesh];for(const r of e.primitives)a.push(t(r,l,o,e.name))}for(const e of u.children||[])a.push(i(e,o))}await Promise.all(a)}function G(e){return e.extensions&&e.extensions.MSFT_lod&&Array.isArray(e.extensions.MSFT_lod.ids)}function P(e,t,r){const n=t=>{const n=`${r}_tex_${t&&t.id}${t&&t.name?"_"+t.name:""}`;if(t&&!e.textures.has(n)){const r=function(e,t={}){return{data:e,parameters:{wrap:{s:i.e8.REPEAT,t:i.e8.REPEAT,...t.wrap},noUnpackFlip:!0,mipmap:!1,...t}}}(t.data,{wrap:{s:t.wrapS,t:t.wrapT},mipmap:j.includes(t.minFilter),noUnpackFlip:!0});e.textures.set(n,r)}return n},o=`${r}_mat_${t.id}_${t.name}`;if(!e.materials.has(o)){const r=function(e={}){return{color:[1,1,1],opacity:1,alphaMode:"OPAQUE",alphaCutoff:.5,doubleSided:!1,castShadows:!0,receiveShadows:!0,receiveAmbientOcclustion:!0,textureColor:null,textureNormal:null,textureOcclusion:null,textureEmissive:null,textureMetallicRoughness:null,colorTextureTransform:null,normalTextureTransform:null,occlusionTextureTransform:null,emissiveTextureTransform:null,metallicRoughnessTextureTransform:null,emissiveFactor:[0,0,0],metallicFactor:1,roughnessFactor:1,colorMixMode:"multiply",...e}}({color:[t.color[0],t.color[1],t.color[2]],opacity:t.color[3],alphaMode:t.alphaMode,alphaCutoff:t.alphaCutoff,doubleSided:t.doubleSided,colorMixMode:t.ESRI_externalColorMixMode,textureColor:t.colorTexture?n(t.colorTexture):void 0,textureNormal:t.normalTexture?n(t.normalTexture):void 0,textureOcclusion:t.occlusionTexture?n(t.occlusionTexture):void 0,textureEmissive:t.emissiveTexture?n(t.emissiveTexture):void 0,textureMetallicRoughness:t.metallicRoughnessTexture?n(t.metallicRoughnessTexture):void 0,emissiveFactor:[t.emissiveFactor[0],t.emissiveFactor[1],t.emissiveFactor[2]],colorTextureTransform:t.colorTextureTransform,normalTextureTransform:t.normalTextureTransform,occlusionTextureTransform:t.occlusionTextureTransform,emissiveTextureTransform:t.emissiveTextureTransform,metallicRoughnessTextureTransform:t.metallicRoughnessTextureTransform,metallicFactor:t.metallicFactor,roughnessFactor:t.roughnessFactor});e.materials.set(o,r)}return o}const j=[i.cw.LINEAR_MIPMAP_LINEAR,i.cw.LINEAR_MIPMAP_NEAREST]},47026:(e,t,r)=>{var n,o,s,a,i,u,l,c,f,d,p;r.d(t,{CE:()=>l,Gv:()=>o,JJ:()=>f,Rw:()=>a,Ti:()=>p,V_:()=>u,Vr:()=>n,hU:()=>i}),function(e){e[e.None=0]="None",e[e.Front=1]="Front",e[e.Back=2]="Back",e[e.COUNT=3]="COUNT"}(n||(n={})),function(e){e[e.Less=0]="Less",e[e.Lequal=1]="Lequal",e[e.COUNT=2]="COUNT"}(o||(o={})),function(e){e[e.BACKGROUND=0]="BACKGROUND",e[e.UPDATE=1]="UPDATE"}(s||(s={})),function(e){e[e.NOT_LOADED=0]="NOT_LOADED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED"}(a||(a={})),function(e){e[e.IntegratedMeshMaskExcluded=1]="IntegratedMeshMaskExcluded",e[e.OutlineVisualElementMask=2]="OutlineVisualElementMask"}(i||(i={})),function(e){e[e.Highlight=0]="Highlight",e[e.MaskOccludee=1]="MaskOccludee",e[e.COUNT=2]="COUNT"}(u||(u={})),function(e){e[e.STRETCH=1]="STRETCH",e[e.PAD=2]="PAD"}(l||(l={})),function(e){e[e.CHANGED=0]="CHANGED",e[e.UNCHANGED=1]="UNCHANGED"}(c||(c={})),function(e){e[e.Blend=0]="Blend",e[e.Opaque=1]="Opaque",e[e.Mask=2]="Mask",e[e.MaskBlend=3]="MaskBlend",e[e.COUNT=4]="COUNT"}(f||(f={})),function(e){e[e.OFF=0]="OFF",e[e.ON=1]="ON"}(d||(d={})),function(e){e.DDS_ENCODING="image/vnd-ms.dds",e.KTX2_ENCODING="image/ktx2",e.BASIS_ENCODING="image/x.basis"}(p||(p={}))},57758:(e,t,r)=>{r.d(t,{K:()=>n});const n=2.1}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7476],{28576:(e,t,r)=>{r.d(t,{B:()=>u});var s=r(81153),i=r(17452),o=r(41123),n=r(7628),a=r(31263),l=r(5600),p=r(66094),d=r(25929);function u(e){const t=e?.origins??[void 0];return(r,o)=>{const u=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const o=(0,n.Oe)(t,r);return{type:String,read:(e,t,r)=>{const s=(0,d.r)(e,t,r);return o.type===String?s:"function"==typeof o.type?new o.type({url:s}):void 0},write:{writer(t,n,l,u){if(!u||!u.resources)return"string"==typeof t?void(n[l]=(0,d.t)(t,u)):void(n[l]=t.write({},u));const f=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),g=(0,d.t)(f,{...u,verifyItemRelativeUrls:u&&u.verifyItemRelativeUrls?{writtenUrls:u.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},d.M.NO),m=o.type!==String&&(!(0,s.l)(this)||u&&u.origin&&this.originIdOf(r)>(0,a.M9)(u.origin)),b={object:this,propertyName:r,value:t,targetUrl:g,dest:n,targetPropertyName:l,context:u,params:e};u&&u.portalItem&&g&&!(0,i.YP)(g)?m?function(e){const{context:t,targetUrl:r,params:s,value:o,dest:n,targetPropertyName:a}=e;if(!t.portalItem)return;const l=t.portalItem.resourceFromPath(r),d=h(o,r,t),u=(0,p.B)(d),f=(0,i.Ml)(l.path),g=s?.compress??!1;u===f?(t.resources&&y({...e,resource:l,content:d,compress:g,updates:t.resources.toUpdate}),n[a]=r):c(e)}(b):function({context:e,targetUrl:t,dest:r,targetPropertyName:s}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),r[s]=t)}(b):u&&u.portalItem&&(null==g||null!=(0,d.i)(g)||(0,i.jc)(g)||m)?c(b):n[l]=g}}}}(e,t,r);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=d.a;return{read:e,write:t}}}}(e,r,o);for(const e of t){const t=(0,l.CJ)(r,e,o);for(const e in u)t[e]=u[e]}}}function c(e){const{targetUrl:t,params:s,value:n,context:a,dest:l,targetPropertyName:u}=e;if(!a.portalItem)return;const c=(0,d.p)(t),f=c?.filename??(0,o.D)(),g=s?.prefix??c?.prefix,m=h(n,t,a),b=(0,i.v_)(g,f),v=`${b}.${(0,p.B)(m)}`,w=a.portalItem.resourceFromPath(v);(0,i.jc)(t)&&a.resources&&a.resources.pendingOperations.push(async function(e){const t=(await Promise.resolve().then(r.bind(r,3172))).default,{data:s}=await t(e,{responseType:"blob"});return s}(t).then((e=>{w.path=`${b}.${(0,p.B)(e)}`,l[u]=w.itemRelativeUrl})).catch((()=>{})));const I=s?.compress??!1;a.resources&&y({...e,resource:w,content:m,compress:I,updates:a.resources.toAdd}),l[u]=w.itemRelativeUrl}function y({object:e,propertyName:t,updates:r,resource:s,content:i,compress:o}){r.push({resource:s,content:i,compress:o,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function h(e,t,r){return"string"==typeof e?{url:t}:new Blob([JSON.stringify(e.toJSON(r))],{type:"application/json"})}},57476:(e,t,r)=>{r.r(t),r.d(t,{default:()=>ye});var s=r(43697),i=r(38171),o=r(51773),n=(r(16050),r(12501),r(28756),r(92271),r(72529),r(5499),r(84382),r(81571),r(91423),r(32400)),a=r(3172),l=r(46791),p=r(20102),d=r(92604),u=r(16453),c=r(95330),y=r(17445),h=r(17452),f=r(5600),g=(r(75215),r(67676),r(80442),r(1153)),m=r(71715),b=r(52011),v=r(31263),w=r(87085),I=r(54295),_=r(17287),C=r(66361),S=r(38009),L=r(16859),F=r(72965),j=r(20559),x=r(15506),O=r(21506),P=r(61960),R=r(85857),E=r(14147),T=r(53518),A=r(99514),N=r(35671),Z=r(51161),D=r(54306),U=r(30707),q=r(56765),Q=r(96674);let k=class extends Q.wq{constructor(){super(...arguments),this.name=null,this.field=null,this.currentRangeExtent=null,this.fullRangeExtent=null,this.type="rangeInfo"}};(0,s._)([(0,f.Cb)({type:String,json:{read:!0,write:!0}})],k.prototype,"name",void 0),(0,s._)([(0,f.Cb)({type:String,json:{read:!0,write:!0}})],k.prototype,"field",void 0),(0,s._)([(0,f.Cb)({type:[Number],json:{read:!0,write:!0}})],k.prototype,"currentRangeExtent",void 0),(0,s._)([(0,f.Cb)({type:[Number],json:{read:!0,write:!0}})],k.prototype,"fullRangeExtent",void 0),(0,s._)([(0,f.Cb)({type:["rangeInfo"],readOnly:!0,json:{read:!1,write:!0}})],k.prototype,"type",void 0),k=(0,s._)([(0,b.j)("esri.layers.support.RangeInfo")],k);var G,V=r(61247),J=r(22974),M=r(28576),B=r(20941),$=r(38913),z=r(44547);let K=G=class extends((0,Q.eC)(l.Z.ofType($.Z))){constructor(e){super(e)}clone(){return new G(this.items.map((e=>e.clone())))}write(e,t){return this.toJSON(t)}toJSON(e){const t=e?.layer?.spatialReference;return t?this.toArray().map((r=>{if(!t.equals(r.spatialReference)){if(!(0,z.Up)(r.spatialReference,t))return e&&e.messages&&e.messages.push(new B.Z("scenefilter:unsupported","Scene filters with incompatible spatial references are not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),null;const s=new $.Z;(0,z.Wt)(r,s,t),r=s}const s=r.toJSON(e);return delete s.spatialReference,s})).filter((e=>null!=e)):(e?.messages&&e.messages.push(new B.Z("scenefilter:unsupported","Writing Scene filters without context layer is not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),this.toArray().map((t=>t.toJSON(e))))}static fromJSON(e,t){const r=new G;return e.forEach((e=>r.add($.Z.fromJSON(e,t)))),r}};K=G=(0,s._)([(0,b.j)("esri.layers.support.PolygonCollection")],K);const W=K;var Y,H=r(25929);let X=Y=class extends Q.wq{constructor(e){super(e),this.spatialRelationship="disjoint",this.geometries=new W,this._geometriesSource=null,this._handles=new V.Z}initialize(){this._handles.add((0,y.on)((()=>this.geometries),"after-changes",(()=>this.geometries=this.geometries),y.Z_))}destroy(){this._handles.destroy()}readGeometries(e,t,r){this._geometriesSource={url:(0,H.f)(e,r),context:r}}async loadGeometries(e,t){if(null==this._geometriesSource)return;const{url:r,context:s}=this._geometriesSource,i=await(0,a.default)(r,{responseType:"json",signal:t?.signal}),o=e.toJSON(),n=i.data.map((e=>({...e,spatialReference:o})));this.geometries=W.fromJSON(n,s),this._geometriesSource=null}clone(){return new Y({geometries:(0,J.d9)(this.geometries),spatialRelationship:this.spatialRelationship})}};(0,s._)([(0,f.Cb)({type:["disjoint","contains"],nonNullable:!0,json:{write:!0}})],X.prototype,"spatialRelationship",void 0),(0,s._)([(0,f.Cb)({type:W,nonNullable:!0,json:{write:!0}}),(0,M.B)({origins:["web-scene","portal-item"],type:"resource",prefix:"geometries"})],X.prototype,"geometries",void 0),(0,s._)([(0,m.r)(["web-scene","portal-item"],"geometries")],X.prototype,"readGeometries",null),X=Y=(0,s._)([(0,b.j)("esri.layers.support.SceneFilter")],X);const ee=X;var te=r(40555),re=r(14165),se=r(72245),ie=r(32163),oe=r(77397),ne=r(19833),ae=r(65242);const le=["3DObject","Point"],pe=(0,T.v)();let de=class extends((0,C.o1)((0,j.Vt)((0,_.Y)((0,S.q)((0,L.I)((0,F.M)((0,u.R)((0,I.V)(w.Z))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new l.Z,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getFeatureType(t?.feature)?.domains?.[e];return r&&"inherited"!==r.type?r:this.getField(e)?.domain??null}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new A.Z(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:Z.U4.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get geometryType(){return ce[this.profile]||"mesh"}set renderer(e){(0,N.YN)(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){const e=this.associatedLayer?.capabilities??x.C,{query:t,editing:{supportsGlobalId:r,supportsRollbackOnFailure:s,supportsUploadWithItemId:i,supportsGeometryUpdate:o,supportsReturnServiceEditsInSourceSpatialReference:n},data:{supportsZ:a,supportsM:l,isVersioned:p,supportsAttachment:d},operations:{supportsEditing:u,supportsAdd:c,supportsUpdate:y,supportsDelete:h,supportsQuery:f,supportsQueryAttachments:g}}=e,m=e.operations.supportsChangeTracking,b=!!this.associatedLayer?.infoFor3D&&(0,se.Rx)();return{query:t,editing:{supportsGlobalId:r,supportsReturnServiceEditsInSourceSpatialReference:n,supportsRollbackOnFailure:s,supportsGeometryUpdate:b&&o,supportsUploadWithItemId:i},data:{supportsAttachment:d,supportsZ:a,supportsM:l,isVersioned:p},operations:{supportsQuery:f,supportsQueryAttachments:g,supportsEditing:u&&m,supportsAdd:b&&c&&m,supportsDelete:b&&h&&m,supportsUpdate:y&&m}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.userHasEditingPrivileges}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e))),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e))),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&ue[r]?ue[r]:(d.Z.getLogger(this.declaredClass).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(c.r9).then((()=>this._fetchService(t))).then((()=>Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),null!=this.filter?this.filter.loadGeometries(this.spatialReference):null]))).then((()=>this._validateElevationInfo())).then((()=>this._applyAssociatedLayerOverrides())).then((()=>this._populateFieldUsageInfo())).then((()=>(0,te.y)(this,{origin:"service"},t))).then((()=>(0,N.YN)(this.renderer,this.fieldsIndex))).then((()=>this.finishLoadEditablePortalLayer(e)));return this.addResolvingPromise(r),Promise.resolve(this)}async beforeSave(){null!=this.filter&&await this.load()}createQuery(){const e=new re.Z;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this;return e}))}async queryCachedAttributes(e,t){const r=(0,N.Lk)(this.fieldsIndex,await(0,ne.e)(this,(0,ne.V)(this)));return(0,oe.xe)(this.parsedUrl.path,this.attributeStorageInfo??[],e,t,r)}async queryCachedFeature(e,t){const r=await this.queryCachedAttributes(e,[t]);if(!r||0===r.length)throw new p.Z("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const s=new i.Z;return s.attributes=r[0],s.layer=this,s.sourceLayer=this,s}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryObjectIds(e||this.createQuery(),t)))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryAttachments(e,t)))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(d.Z.getLogger(this.declaredClass).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return(0,ie.eZ)(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new p.Z("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new p.Z("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some((t=>t.name===e))}async queryCachedStatistics(e,t){if(await this.load(t),!this.statisticsInfo)throw new p.Z("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const r=this.fieldsIndex.get(e);if(!r)throw new p.Z("scenelayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const e of this.statisticsInfo)if(e.name===r.name){const r=(0,h.v_)(this.parsedUrl.path,e.href);return(0,a.default)(r,{query:{f:"json",token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then((e=>e.data))}throw new p.Z("scenelayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(j.xp.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(j.xp.SAVE,e)}async applyEdits(e,t){const s=await r.e(1444).then(r.bind(r,14720));if(await this.load(),!this.associatedLayer)throw new p.Z(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),s.applyEdits(this,this.associatedLayer.source,e,t)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new p.Z(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}on(e,t){return super.on(e,t)}validateLayer(e){if(e.layerType&&!le.includes(e.layerType))throw new p.Z("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new p.Z("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new p.Z("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});!function(e,t){let r=!1,s=!1;if(null==e)r=!0,s=!0;else{const i=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,s=i;break;case"vertex-reference-frame":r=!0,s=!i;break;default:r=!1}}if(!r)throw new p.Z("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!s)throw new p.Z("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new p.Z("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!(!this.attributeStorageInfo||!this.attributeStorageInfo.some((t=>t.name===e.name))),r=!!this.associatedLayer?.fields?.some((t=>t&&e.name===t.name)),s={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=s}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPopupOverrides()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPopupOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled"],t=(0,g.vw)(this);for(let r=0;r<e.length;r++){const s=e[r],i=this.originIdOf(s),o=this.associatedLayer.originIdOf(s);i<o&&(o===v.s3.SERVICE||o===v.s3.PORTAL_ITEM)&&t.setAtOrigin(s,this.associatedLayer[s],o)}}async _setAssociatedFeatureLayer(e){if(!["mesh-pyramids","points"].includes(this.profile))return;const t=new E.W(this.parsedUrl,this.portalItem,this.apiKey,e);try{this.associatedLayer=await t.fetch()}catch(e){(0,c.D_)(e)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){await(0,y.N1)((()=>this.popupEnabled&&null!=this.popupTemplate));const e=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?d.Z.getLogger(this.declaredClass).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${e}`):d.Z.getLogger(this.declaredClass).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${e}`)}_validateElevationInfo(){const e=this.elevationInfo;e&&("mesh-pyramids"===this.profile&&"relative-to-scene"===e.mode&&d.Z.getLogger(this.declaredClass).warn(".elevationInfo=","Mesh scene layers don't support relative-to-scene elevation mode"),e.featureExpressionInfo&&"0"!==e.featureExpressionInfo.expression&&d.Z.getLogger(this.declaredClass).warn(".elevationInfo=","Scene layers do not support featureExpressionInfo"))}};(0,s._)([(0,f.Cb)({types:{key:"type",base:P.B,typeMap:{selection:R.Z}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:!0},"portal-item":{name:"layerDefinition.featureReduction",write:!0}}}})],de.prototype,"featureReduction",void 0),(0,s._)([(0,f.Cb)({type:[k],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}}})],de.prototype,"rangeInfos",void 0),(0,s._)([(0,f.Cb)({json:{read:!1}})],de.prototype,"associatedLayer",void 0),(0,s._)([(0,f.Cb)({type:["show","hide"]})],de.prototype,"listMode",void 0),(0,s._)([(0,f.Cb)({type:["ArcGISSceneServiceLayer"]})],de.prototype,"operationalLayerType",void 0),(0,s._)([(0,f.Cb)({json:{read:!1},readOnly:!0})],de.prototype,"type",void 0),(0,s._)([(0,f.Cb)({...pe.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],de.prototype,"fields",void 0),(0,s._)([(0,f.Cb)()],de.prototype,"types",null),(0,s._)([(0,f.Cb)()],de.prototype,"typeIdField",null),(0,s._)([(0,f.Cb)()],de.prototype,"templates",null),(0,s._)([(0,f.Cb)()],de.prototype,"formTemplate",null),(0,s._)([(0,f.Cb)({readOnly:!0})],de.prototype,"fieldsIndex",null),(0,s._)([(0,f.Cb)({type:q.Z,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],de.prototype,"floorInfo",void 0),(0,s._)([(0,f.Cb)(pe.outFields)],de.prototype,"outFields",void 0),(0,s._)([(0,f.Cb)({type:Z.U4,readOnly:!0,json:{read:!1}})],de.prototype,"nodePages",void 0),(0,s._)([(0,m.r)("service","nodePages",["nodePages","pointNodePages"])],de.prototype,"readNodePages",null),(0,s._)([(0,f.Cb)({type:[Z.QI],readOnly:!0})],de.prototype,"materialDefinitions",void 0),(0,s._)([(0,f.Cb)({type:[Z.Yh],readOnly:!0})],de.prototype,"textureSetDefinitions",void 0),(0,s._)([(0,f.Cb)({type:[Z.H3],readOnly:!0})],de.prototype,"geometryDefinitions",void 0),(0,s._)([(0,f.Cb)({readOnly:!0})],de.prototype,"serviceUpdateTimeStamp",void 0),(0,s._)([(0,f.Cb)({readOnly:!0})],de.prototype,"attributeStorageInfo",void 0),(0,s._)([(0,f.Cb)({readOnly:!0})],de.prototype,"statisticsInfo",void 0),(0,s._)([(0,f.Cb)({type:l.Z.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],de.prototype,"excludeObjectIds",void 0),(0,s._)([(0,f.Cb)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],de.prototype,"definitionExpression",void 0),(0,s._)([(0,f.Cb)({type:ee,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],de.prototype,"filter",void 0),(0,s._)([(0,f.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],de.prototype,"path",void 0),(0,s._)([(0,f.Cb)(O.PV)],de.prototype,"elevationInfo",null),(0,s._)([(0,f.Cb)({type:String})],de.prototype,"geometryType",null),(0,s._)([(0,f.Cb)(O.iR)],de.prototype,"labelsVisible",void 0),(0,s._)([(0,f.Cb)({type:[D.Z],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:U.r},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:U.r},write:!0}})],de.prototype,"labelingInfo",void 0),(0,s._)([(0,f.Cb)(O.rn)],de.prototype,"legendEnabled",void 0),(0,s._)([(0,f.Cb)({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?(0,ae.b)(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],de.prototype,"opacity",void 0),(0,s._)([(0,f.Cb)({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],de.prototype,"priority",void 0),(0,s._)([(0,f.Cb)({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],de.prototype,"semantic",void 0),(0,s._)([(0,f.Cb)({types:n.o,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],de.prototype,"renderer",null),(0,s._)([(0,f.Cb)({json:{read:!1}})],de.prototype,"cachedDrawingInfo",void 0),(0,s._)([(0,m.r)("service","cachedDrawingInfo")],de.prototype,"readCachedDrawingInfo",null),(0,s._)([(0,f.Cb)({readOnly:!0,json:{read:!1}})],de.prototype,"capabilities",null),(0,s._)([(0,f.Cb)({type:Boolean,json:{read:!1}})],de.prototype,"editingEnabled",null),(0,s._)([(0,f.Cb)({readOnly:!0,json:{write:!1,read:!1}})],de.prototype,"infoFor3D",null),(0,s._)([(0,f.Cb)(O.C_)],de.prototype,"popupEnabled",void 0),(0,s._)([(0,f.Cb)({type:o.Z,json:{name:"popupInfo",write:!0}})],de.prototype,"popupTemplate",void 0),(0,s._)([(0,f.Cb)({readOnly:!0,json:{read:!1}})],de.prototype,"defaultPopupTemplate",null),(0,s._)([(0,f.Cb)({type:String,json:{read:!1}})],de.prototype,"objectIdField",void 0),(0,s._)([(0,m.r)("service","objectIdField",["objectIdField","fields"])],de.prototype,"readObjectIdField",null),(0,s._)([(0,f.Cb)({type:String,json:{read:!1}})],de.prototype,"globalIdField",void 0),(0,s._)([(0,m.r)("service","globalIdField",["globalIdField","fields"])],de.prototype,"readGlobalIdField",null),(0,s._)([(0,f.Cb)({readOnly:!0,type:String,json:{read:!1}})],de.prototype,"displayField",null),(0,s._)([(0,f.Cb)({type:String,json:{read:!1}})],de.prototype,"profile",void 0),(0,s._)([(0,m.r)("service","profile",["store.profile"])],de.prototype,"readProfile",null),(0,s._)([(0,f.Cb)({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],de.prototype,"normalReferenceFrame",void 0),(0,s._)([(0,f.Cb)(O.YI)],de.prototype,"screenSizePerspectiveEnabled",void 0),de=(0,s._)([(0,b.j)("esri.layers.SceneLayer")],de);const ue={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},ce={"mesh-pyramids":"mesh",points:"point",lines:"polyline",polygons:"polygon"},ye=de},66094:(e,t,r)=>{r.d(t,{B:()=>i});var s=r(17452);function i(e){return o[function(e){return e instanceof Blob?e.type:function(e){const t=(0,s.Ml)(e);return l[t]||n}(e.url)}(e)]||a}const o={},n="text/plain",a=o[n],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)o[l[e]]=e}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5235],{15235:(e,t,i)=>{i.r(t),i.d(t,{default:()=>R});var r=i(43697),o=i(99880),a=i(20102),s=i(96674),n=i(22974),l=i(83379),p=i(70586),c=i(17452),d=i(5600),u=i(75215),h=i(71715),m=i(52011),g=i(6570),y=i(65587),b=i(15923),v=i(92604),w=i(90578);i(67676),i(80442);let f=class extends b.Z{constructor(e){super(e),this.portalItem=null}normalizeCtorArgs(e){return e&&e.portalItem&&e.path?{...e,path:this._normalizePath(e.path,e.portalItem)}:e}set path(e){null!=e&&(0,c.YP)(e)?v.Z.getLogger(this.declaredClass).error("portalitemresource:invalid-path","A portal item resource path must be relative"):this._set("path",e)}_castPath(e){return this._normalizePath(e,this.portalItem)}get url(){return this.portalItem&&this.path?`${this.portalItem.itemUrl}/resources/${this.path}`:null}get itemRelativeUrl(){return this.portalItem&&this.path?`./resources/${this.path}`:null}fetch(e="json",t){const i=this.url;if(null==i)throw new a.Z("portal-item-resource:fetch","Portal item resource does not refer to a valid item or path");return this.portalItem.portal.request(i,{responseType:e,query:{token:this.portalItem.apiKey},signal:t?.signal})}async update(e,t){return(await i.e(7873).then(i.bind(i,97873))).addOrUpdateResource(this,"update",e,t)}hasPath(){return null!=this.path}_normalizePath(e,t){return null==e?e:(e=e.replace(/^\/+/,""),null!=t&&(0,c.YP)(e)&&(e=(0,c.PF)(e,t.itemUrl)),e?.replace(/^\/+/,"").replace(/^(\.\/)?resources\//,""))}};(0,r._)([(0,d.Cb)()],f.prototype,"portalItem",void 0),(0,r._)([(0,d.Cb)({type:String,value:null})],f.prototype,"path",null),(0,r._)([(0,w.p)("path")],f.prototype,"_castPath",null),(0,r._)([(0,d.Cb)({type:String,readOnly:!0})],f.prototype,"url",null),(0,r._)([(0,d.Cb)({type:String,readOnly:!0})],f.prototype,"itemRelativeUrl",null),f=(0,r._)([(0,m.j)("esri.portal.PortalItemResource")],f);const k=f;let C=class extends b.Z{constructor(e){super(e),this.created=null,this.rating=null}};(0,r._)([(0,d.Cb)()],C.prototype,"created",void 0),(0,r._)([(0,d.Cb)()],C.prototype,"rating",void 0),C=(0,r._)([(0,m.j)("esri.portal.PortalRating")],C);const S=C;var _;const I=new Set(["Map Service","Feature Service","Feature Collection","Scene Service","Image Service","Stream Service","Vector Tile Service","GeoJson","CSV","KML","WFS","WMTS","WMS","Feed"]),x=new Set(["KML","GeoJson","CSV"]);let P=_=class extends((0,s.eC)(l.Z)){static from(e){return(0,u.TJ)(_,e)}constructor(e){super(e),this.access=null,this.accessInformation=null,this.apiKey=null,this.applicationProxies=null,this.avgRating=null,this.categories=null,this.created=null,this.culture=null,this.description=null,this.extent=null,this.groupCategories=null,this.id=null,this.isOrgItem=!1,this.itemControl=null,this.licenseInfo=null,this.modified=null,this.name=null,this.numComments=null,this.numRatings=null,this.numViews=null,this.owner=null,this.ownerFolder=null,this.portal=null,this.screenshots=null,this.size=null,this.snippet=null,this.sourceJSON=null,this.sourceUrl=null,this.spatialReference=null,this.tags=null,this.title=null,this.type=null,this.typeKeywords=null,this.url=null}destroy(){this.portal=null}get displayName(){const e=this.type,t=this.typeKeywords||[];let i=e;return"Feature Service"===e||"Feature Collection"===e?i=t.includes("Table")?"Table":t.includes("Route Layer")?"Route Layer":t.includes("Markup")?"Markup":"Feature Layer":"Image Service"===e?i=t.includes("Elevation 3D Layer")?"Elevation Layer":t.includes("Tiled Imagery")?"Tiled Imagery Layer":"Imagery Layer":"Scene Service"===e?i="Scene Layer":"Video Service"===e?i="Video Layer":"Scene Package"===e?i="Scene Layer Package":"Stream Service"===e?i="Feature Layer":"Geoprocessing Service"===e&&this.portal&&this.portal.isPortal?i=t.includes("Web Tool")?"Tool":"Geoprocessing Service":"Geocoding Service"===e?i="Locator":"Geoenrichment Service"===e?i="GeoEnrichment Service":"Microsoft Powerpoint"===e?i="Microsoft PowerPoint":"GeoJson"===e?i="GeoJSON":"Globe Service"===e?i="Globe Layer":"Vector Tile Service"===e?i="Tile Layer":"netCDF"===e?i="NetCDF":"Map Service"===e?i=t.includes("Spatiotemporal")||!t.includes("Hosted Service")&&!t.includes("Tiled")||t.includes("Relational")?"Map Image Layer":"Tile Layer":e&&e.toLowerCase().includes("add in")?i=e.replace(/(add in)/gi,"Add-In"):"datastore catalog service"===e?i="Big Data File Share":"Compact Tile Package"===e?i="Tile Package (tpkx)":"OGCFeatureServer"===e?i="OGC Feature Layer":"web mapping application"===e&&t.includes("configurableApp")?i="Instant App":"Insights Page"===e&&(i="Insights Report"),i}readExtent(e){return e&&e.length?new g.Z(e[0][0],e[0][1],e[1][0],e[1][1]):null}get iconUrl(){const e=this.type&&this.type.toLowerCase()||"",t=this.typeKeywords||[];let i,r=!1,a=!1,s=!1,n=!1,l=!1,p=!1;return e.indexOf("service")>0||"feature collection"===e||"kml"===e||"wms"===e||"wmts"===e||"wfs"===e?(r=t.includes("Hosted Service"),"feature service"===e||"feature collection"===e||"kml"===e||"wfs"===e?(a=t.includes("Table"),s=t.includes("Route Layer"),n=t.includes("Markup"),l=t.includes("Spatiotemporal"),p=t.includes("UtilityNetwork"),i=l&&a?"spatiotemporaltable":a?"table":s?"routelayer":n?"markup":l?"spatiotemporal":r?"featureshosted":p?"utilitynetwork":"features"):i="map service"===e||"wms"===e||"wmts"===e?r||t.includes("Tiled")||"wmts"===e?"maptiles":"mapimages":"scene service"===e?t.includes("Line")?"sceneweblayerline":t.includes("3DObject")?"sceneweblayermultipatch":t.includes("Point")?"sceneweblayerpoint":t.includes("IntegratedMesh")?"sceneweblayermesh":t.includes("PointCloud")?"sceneweblayerpointcloud":t.includes("Polygon")?"sceneweblayerpolygon":t.includes("Building")?"sceneweblayerbuilding":t.includes("Voxel")?"sceneweblayervoxel":"sceneweblayer":"image service"===e?t.includes("Elevation 3D Layer")?"elevationlayer":t.includes("Tiled Imagery")?"tiledimagerylayer":"imagery":"stream service"===e?"streamlayer":"video service"===e?"mediaservice":"vector tile service"===e?"vectortile":"datastore catalog service"===e?"datastorecollection":"geocoding service"===e?"geocodeservice":"geoprocessing service"===e?t.includes("Web Tool")&&this.portal&&this.portal.isPortal?"tool":"layers":"geodata service"===e?"geodataservice":"layers"):i="web map"===e||"cityengine web scene"===e?"maps":"web scene"===e?t.includes("ViewingMode-Local")?"webscenelocal":"websceneglobal":"web mapping application"===e&&t.includes("configurableApp")?"instantapps":"web mapping application"===e||"mobile application"===e||"application"===e||"operation view"===e||"desktop application"===e?"apps":"map document"===e||"map package"===e||"published map"===e||"scene document"===e||"globe document"===e||"basemap package"===e||"mobile basemap package"===e||"mobile map package"===e||"project package"===e||"project template"===e||"pro map"===e||"layout"===e||"layer"===e&&t.includes("ArcGIS Pro")||"explorer map"===e&&t.indexOf("Explorer Document")?"mapsgray":"service definition"===e||"csv"===e||"shapefile"===e||"cad drawing"===e||"geojson"===e||"360 vr experience"===e||"netcdf"===e||"administrative report"===e?"datafiles":"explorer add in"===e||"desktop add in"===e||"windows viewer add in"===e||"windows viewer configuration"===e?"appsgray":"arcgis pro add in"===e||"arcgis pro configuration"===e?"addindesktop":"rule package"===e||"file geodatabase"===e||"sqlite geodatabase"===e||"csv collection"===e||"kml collection"===e||"windows mobile package"===e||"map template"===e||"desktop application template"===e||"gml"===e||"arcpad package"===e||"code sample"===e||"form"===e||"document link"===e||"earth configuration"===e||"operations dashboard add in"===e||"rules package"===e||"image"===e||"workflow manager package"===e||"explorer map"===e&&t.includes("Explorer Mapping Application")||t.includes("Document")?"datafilesgray":"network analysis service"===e||"geoprocessing service"===e||"geodata service"===e||"geometry service"===e||"geoprocessing package"===e||"locator package"===e||"geoprocessing sample"===e||"workflow manager service"===e?"toolsgray":"layer"===e||"layer package"===e||"explorer layer"===e?"layersgray":"scene package"===e?"scenepackage":"mobile scene package"===e?"mobilescenepackage":"tile package"===e||"compact tile package"===e?"tilepackage":"task file"===e?"taskfile":"report template"===e?"report-template":"statistical data collection"===e?"statisticaldatacollection":"insights workbook"===e?"workbook":"insights model"===e?"insightsmodel":"insights page"===e?"insightspage":"insights theme"===e?"insightstheme":"hub initiative"===e?"hubinitiative":"hubpage"===e?"hubpage":"hub event"===e?"hubevent":"hub site application"===e?"hubsite":"hub project"===e?"hubproject":"relational database connection"===e?"relationaldatabaseconnection":"big data file share"===e?"datastorecollection":"image collection"===e?"imagecollection":"style"===e?"style":"desktop style"===e?"desktopstyle":"dashboard"===e?"dashboard":"raster function template"===e?"rasterprocessingtemplate":"vector tile package"===e?"vectortilepackage":"ortho mapping project"===e?"orthomappingproject":"ortho mapping template"===e?"orthomappingtemplate":"solution"===e?"solutions":"geopackage"===e?"geopackage":"deep learning package"===e?"deeplearningpackage":"real time analytic"===e?"realtimeanalytics":"big data analytic"===e?"bigdataanalytics":"feed"===e?"feed":"excalibur imagery project"===e?"excaliburimageryproject":"notebook"===e?"notebook":"storymap"===e?"storymap":"survey123 add in"===e?"survey123addin":"mission"===e?"mission":"mission report"===e?"missionreport":"quickcapture project"===e?"quickcaptureproject":"pro report"===e?"proreport":"pro report template"===e?"proreporttemplate":"urban model"===e?"urbanmodel":"web experience"===e?"experiencebuilder":"web experience template"===e?"webexperiencetemplate":"experience builder widget"===e?"experiencebuilderwidget":"experience builder widget package"===e?"experiencebuilderwidgetpackage":"workflow"===e?"workflow":"insights script"===e?"insightsscript":"kernel gateway connection"===e?"kernelgatewayconnection":"hub initiative template"===e?"hubinitiativetemplate":"storymap theme"===e?"storymaptheme":"knowledge graph"===e?"knowledgegraph":"native application"===e?"nativeapp":"native application installer"===e?"nativeappinstaller":"link chart"===e?"linkchart":"investigation"===e?"investigation":"ogcfeatureserver"===e?"features":"pro project"===e?"proproject":"insights workbook package"===e?"insightsworkbookpackage":"apache parquet"===e?"apacheparquet":"notebook code snippets"===e||"notebook code snippet library"===e?"notebookcodesnippets":"suitability model"===e?"suitabilitymodel":"esri classifier definition"===e?"classifierdefinition":"esri classification schema"===e?"classificationschema":"insights data engineering workbook"===e?"dataengineeringworkbook":"insights data engineering model"===e?"dataengineeringmodel":"deep learning studio project"===e?"deeplearningproject":"discussion"===e?"discussion":"allsource project"===e?"allsourceproject":"api key"===e?"apikey":"maps",i?(0,o.V)("esri/images/portal/"+i+"16.png"):null}get isLayer(){return null!=this.type&&I.has(this.type)}get itemPageUrl(){const e=this.portal?.itemPageUrl;return e&&this.id?`${e}?id=${this.id}`:null}get itemUrl(){const e=this.portal?.restUrl;return e&&this.id?`${e}/content/items/${this.id}`:null}get thumbnailUrl(){const e=this.itemUrl,t=this.thumbnail;return e&&t?this.portal?.normalizeUrl(`${e}/info/${t}?f=json`)??null:null}get userItemUrl(){const e=this.get("portal.restUrl");if(!e)return null;const t=this.owner||this.get("portal.user.username");return t?`${e}/content/users/${this.ownerFolder?`${t}/${this.ownerFolder}`:t}/items/${this.id}`:null}load(e){const t=this.portal??(this.portal=y.Z.getDefault()),i=t.load(e).then((()=>this.sourceJSON?this.sourceJSON:this.id&&this.itemUrl?t.request(this.itemUrl,{signal:null!=e?e.signal:null,query:{token:this.apiKey}}):{})).then((e=>{this.sourceJSON=e,this.read(e)}));return this.addResolvingPromise(i),Promise.resolve(this)}async addRating(e){const t={method:"post",query:{}};return e instanceof S&&(e=e.rating),null==e||isNaN(e)||"number"!=typeof e||(t.query.rating=e),this.portal?(await this.portal.request(this.itemUrl+"/addRating",t),new S({rating:e,created:new Date})):null}clone(){const e={access:this.access,accessInformation:this.accessInformation,applicationProxies:(0,n.d9)(this.applicationProxies),avgRating:this.avgRating,categories:(0,n.d9)(this.categories),created:(0,n.d9)(this.created),culture:this.culture,description:this.description,extent:(0,n.d9)(this.extent),groupCategories:(0,n.d9)(this.groupCategories),id:this.id,itemControl:this.itemControl,licenseInfo:this.licenseInfo,modified:(0,n.d9)(this.modified),name:this.name,numComments:this.numComments,numRatings:this.numRatings,numViews:this.numViews,owner:this.owner,ownerFolder:this.ownerFolder,portal:this.portal,screenshots:(0,n.d9)(this.screenshots),size:this.size,snippet:this.snippet,sourceUrl:this.sourceUrl,spatialReference:this.spatialReference,tags:(0,n.d9)(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:(0,n.d9)(this.typeKeywords),url:this.url};this.loaded&&(e.loadStatus="loaded");const t=new _({sourceJSON:this.sourceJSON}).set(e);return t._set("isOrgItem",this.isOrgItem),t}createPostQuery(){const e=this.toJSON();for(const t of["tags","typeKeywords","categories"])e[t]&&(e[t]=e[t].join(", "));const{extent:t}=e;return t&&(e.extent=JSON.stringify(t)),e}async deleteRating(){await(0,p.s3)(this.portal).request(this.itemUrl+"/deleteRating",{method:"post"})}fetchData(e="json",t){return(0,p.s3)(this.portal).request(this.itemUrl+"/data",{responseType:e,...t,query:{token:this.apiKey}})}async fetchRating(e){const t=await(0,p.s3)(this.portal).request(this.itemUrl+"/rating",{query:{token:this.apiKey},...e});return null!=t.rating?(t.created=new Date(t.created),new S(t)):null}fetchRelatedItems(e,t){return(0,p.s3)(this.portal).requestToTypedArray(this.itemUrl+"/relatedItems",{query:{...e,token:this.apiKey},...t},_)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}reload(){return(0,p.s3)(this.portal).request(this.itemUrl??"",{cacheBust:!0,query:{token:this.apiKey}}).then((e=>(this.sourceJSON=e,this.read(e),this)))}update(e){return this.id?this.load().then((()=>(0,p.s3)(this.portal).signIn())).then((()=>{const t=e&&e.data,i={method:"post"};i.query=this.createPostQuery();for(const e in i.query)null===i.query[e]&&(i.query[e]="");return i.query.clearEmptyFields=!0,null!=t&&("string"==typeof t?i.query.text=t:"object"==typeof t&&(i.query.text=JSON.stringify(t))),this.portal.request(`${this.userItemUrl}/update`,i).then((()=>this.reload()))})):Promise.reject(new a.Z("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async copy(e){if(!this.id)throw new a.Z("portal:item-does-not-exist","The item does not exist yet");await this.load();const{portal:t,itemUrl:i}=this;await(0,p.s3)(t).signIn();const{copyResources:r,folder:o,tags:s,title:n}=e||{},l={method:"post",query:{copyPrivateResources:"all"===r,folder:"string"==typeof o?o:o?.id,includeResources:!!r,tags:s?.join(","),title:n}},{itemId:c}=await t.request(`${i}/copy`,l);return new _({id:c,portal:t})}updateThumbnail(e){return this.id?this.load().then((()=>this.portal.signIn())).then((()=>{const t=e.thumbnail,i=e.filename,r={method:"post"};if("string"==typeof t)(0,c.HK)(t)?r.query={data:t}:r.query={url:(0,c.hF)(t)},null!=i&&(r.query.filename=i);else{const e=new FormData;null!=i?e.append("file",t,i):e.append("file",t),r.body=e}return this.portal.request(`${this.userItemUrl}/updateThumbnail`,r).then((()=>this.reload()))})):Promise.reject(new a.Z("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async fetchResources(e={},t){return(await i.e(7873).then(i.bind(i,97873))).fetchResources(this,e,t)}async addResource(e,t,r){const o=await i.e(7873).then(i.bind(i,97873));return e.portalItem=this,o.addOrUpdateResource(e,"add",t,r)}async removeResource(e,t){const r=await i.e(7873).then(i.bind(i,97873));if(e.portalItem&&e.portalItem.itemUrl!==this.itemUrl)throw new a.Z("removeresource:portal-item-mismatch","The portal item associated with the provided resource does not match the item");return r.removeResource(this,e,t)}async removeAllResources(e){return(await i.e(7873).then(i.bind(i,97873))).removeAllResources(this,e)}resourceFromPath(e){return new k({portalItem:this,path:e})}toJSON(){const e=this.extent,t={accessInformation:this.accessInformation,categories:(0,n.d9)(this.categories),created:this.created&&this.created.getTime(),description:this.description,extent:e&&[[e.xmin,e.ymin],[e.xmax,e.ymax]],id:this.id,isOrgItem:this.isOrgItem,licenseInfo:this.licenseInfo,modified:this.modified&&this.modified.getTime(),name:this.name,owner:this.owner,ownerFolder:this.ownerFolder,snippet:this.snippet,sourceUrl:this.sourceUrl,spatialReference:this.spatialReference,tags:(0,n.d9)(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:(0,n.d9)(this.typeKeywords),url:this.url};return(0,n.yd)(t)}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new _({sourceJSON:e})}_getPostQuery(){const e=this.toJSON();for(const t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}};(0,r._)([(0,d.Cb)({type:["private","shared","org","public"]})],P.prototype,"access",void 0),(0,r._)([(0,d.Cb)()],P.prototype,"accessInformation",void 0),(0,r._)([(0,d.Cb)({type:String})],P.prototype,"apiKey",void 0),(0,r._)([(0,d.Cb)({json:{read:{source:"appProxies"}}})],P.prototype,"applicationProxies",void 0),(0,r._)([(0,d.Cb)()],P.prototype,"avgRating",void 0),(0,r._)([(0,d.Cb)()],P.prototype,"categories",void 0),(0,r._)([(0,d.Cb)({type:Date})],P.prototype,"created",void 0),(0,r._)([(0,d.Cb)()],P.prototype,"culture",void 0),(0,r._)([(0,d.Cb)()],P.prototype,"description",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],P.prototype,"displayName",null),(0,r._)([(0,d.Cb)({type:g.Z})],P.prototype,"extent",void 0),(0,r._)([(0,h.r)("extent")],P.prototype,"readExtent",null),(0,r._)([(0,d.Cb)()],P.prototype,"groupCategories",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],P.prototype,"iconUrl",null),(0,r._)([(0,d.Cb)()],P.prototype,"id",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],P.prototype,"isLayer",null),(0,r._)([(0,d.Cb)({type:Boolean,readOnly:!0})],P.prototype,"isOrgItem",void 0),(0,r._)([(0,d.Cb)()],P.prototype,"itemControl",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],P.prototype,"itemPageUrl",null),(0,r._)([(0,d.Cb)({readOnly:!0})],P.prototype,"itemUrl",null),(0,r._)([(0,d.Cb)()],P.prototype,"licenseInfo",void 0),(0,r._)([(0,d.Cb)({type:Date})],P.prototype,"modified",void 0),(0,r._)([(0,d.Cb)()],P.prototype,"name",void 0),(0,r._)([(0,d.Cb)()],P.prototype,"numComments",void 0),(0,r._)([(0,d.Cb)()],P.prototype,"numRatings",void 0),(0,r._)([(0,d.Cb)()],P.prototype,"numViews",void 0),(0,r._)([(0,d.Cb)()],P.prototype,"owner",void 0),(0,r._)([(0,d.Cb)()],P.prototype,"ownerFolder",void 0),(0,r._)([(0,d.Cb)({type:y.Z})],P.prototype,"portal",void 0),(0,r._)([(0,d.Cb)()],P.prototype,"screenshots",void 0),(0,r._)([(0,d.Cb)()],P.prototype,"size",void 0),(0,r._)([(0,d.Cb)()],P.prototype,"snippet",void 0),(0,r._)([(0,d.Cb)()],P.prototype,"sourceJSON",void 0),(0,r._)([(0,d.Cb)({type:String})],P.prototype,"sourceUrl",void 0),(0,r._)([(0,d.Cb)({type:String})],P.prototype,"spatialReference",void 0),(0,r._)([(0,d.Cb)()],P.prototype,"tags",void 0),(0,r._)([(0,d.Cb)()],P.prototype,"thumbnail",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],P.prototype,"thumbnailUrl",null),(0,r._)([(0,d.Cb)()],P.prototype,"title",void 0),(0,r._)([(0,d.Cb)()],P.prototype,"type",void 0),(0,r._)([(0,d.Cb)()],P.prototype,"typeKeywords",void 0),(0,r._)([(0,d.Cb)({type:String,json:{read(e,t){if(x.has(t.type)){const t=this.portal?.restUrl;e||(e=t&&this.id?`${t}/content/items/${this.id}/data`:null)}return e}}})],P.prototype,"url",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],P.prototype,"userItemUrl",null),P=_=(0,r._)([(0,m.j)("esri.portal.PortalItem")],P);const R=P}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5660],{95047:(e,t,r)=>{r.r(t),r.d(t,{createConnection:()=>F});var s=r(43697),o=(r(66577),r(3172)),n=r(20102),i=r(92604),a=r(95330),c=r(17452),l=(r(75215),r(67676),r(80442),r(52011)),u=r(5600),d=r(69285),h=r(32448);let g=class extends h.Z.EventedAccessor{destroy(){this.emit("destroy")}get connectionError(){return this.errorString?new n.Z("stream-connection",this.errorString):null}onFeature(e){this.emit("data-received",e)}onMessage(e){this.emit("message-received",e)}};(0,s._)([(0,u.Cb)({readOnly:!0})],g.prototype,"connectionError",null),g=(0,s._)([(0,l.j)("esri.layers.support.StreamConnection")],g);const f=g;var y,_;(_=y||(y={}))[_.CONNECTING=0]="CONNECTING",_[_.OPEN=1]="OPEN",_[_.CLOSING=2]="CLOSING",_[_.CLOSED=3]="CLOSED";let p=class extends f{constructor(e){super(),this._outstandingMessages=[],this.errorString=null;const{geometryType:t,spatialReference:r,sourceSpatialReference:s}=e;this._config=e,this._featureZScaler=(0,d.k)(t,s,r),this._open()}async _open(){await this._tryCreateWebSocket(),this.destroyed||await this._handshake()}destroy(){super.destroy(),null!=this._websocket&&(this._websocket.onopen=null,this._websocket.onclose=null,this._websocket.onerror=null,this._websocket.onmessage=null,this._websocket.close()),this._websocket=null}get connectionStatus(){if(null==this._websocket)return"disconnected";switch(this._websocket.readyState){case y.CONNECTING:case y.OPEN:return"connected";case y.CLOSING:case y.CLOSED:return"disconnected"}}sendMessageToSocket(e){null!=this._websocket?this._websocket.send(JSON.stringify(e)):this._outstandingMessages.push(e)}sendMessageToClient(e){this._onMessage(e)}updateCustomParameters(e){this._config.customParameters=e,null!=this._websocket&&this._websocket.close()}async _tryCreateWebSocket(e=this._config.source.path,t=1e3,r=0){try{if(this.destroyed)return;const t=(0,c.fl)(e,this._config.customParameters??{});this._websocket=await this._createWebSocket(t),this.notifyChange("connectionStatus")}catch(s){const o=t/1e3;return this._config.maxReconnectionAttempts&&r>=this._config.maxReconnectionAttempts?(i.Z.getLogger(this.declaredClass).error(new n.Z("websocket-connection","Exceeded maxReconnectionAttempts attempts. No further attempts will be made")),void this.destroy()):(i.Z.getLogger(this.declaredClass).error(new n.Z("websocket-connection",`Failed to connect. Attempting to reconnect in ${o}s`,s)),await(0,a.e4)(t),this._tryCreateWebSocket(e,Math.min(1.5*t,1e3*this._config.maxReconnectionInterval),r+1))}}_setWebSocketJSONParseHandler(e){e.onmessage=e=>{try{const t=JSON.parse(e.data);this._onMessage(t)}catch(e){return void i.Z.getLogger(this.declaredClass).error(new n.Z("websocket-connection","Failed to parse message, invalid JSON",{error:e}))}}}_createWebSocket(e){return new Promise(((t,r)=>{const s=new WebSocket(e);s.onopen=()=>{if(s.onopen=null,this.destroyed)return s.onclose=null,void s.close();s.onclose=e=>this._onClose(e),s.onerror=e=>this._onError(e),this._setWebSocketJSONParseHandler(s),t(s)},s.onclose=e=>{s.onopen=s.onclose=null,r(e)}}))}async _handshake(e=1e4){const t=this._websocket;if(null==t)return;const r=(0,a.hh)(),s=t.onmessage,{filter:o,outFields:c,spatialReference:l}=this._config;return r.timeout(e),t.onmessage=e=>{let a=null;try{a=JSON.parse(e.data)}catch(e){}a&&"object"==typeof a||(i.Z.getLogger(this.declaredClass).error(new n.Z("websocket-connection","Protocol violation. Handshake failed - malformed message",e.data)),r.reject(),this.destroy()),a.spatialReference?.wkid!==l?.wkid&&(i.Z.getLogger(this.declaredClass).error(new n.Z("websocket-connection",`Protocol violation. Handshake failed - expected wkid of ${l.wkid}`,e.data)),r.reject(),this.destroy()),"json"!==a.format&&(i.Z.getLogger(this.declaredClass).error(new n.Z("websocket-connection","Protocol violation. Handshake failed - format is not set",e.data)),r.reject(),this.destroy()),o&&a.filter!==o&&i.Z.getLogger(this.declaredClass).error(new n.Z("websocket-connection","Tried to set filter, but server doesn't support it")),c&&a.outFields!==c&&i.Z.getLogger(this.declaredClass).error(new n.Z("websocket-connection","Tried to set outFields, but server doesn't support it")),t.onmessage=s;for(const e of this._outstandingMessages)t.send(JSON.stringify(e));this._outstandingMessages=[],r.resolve()},t.send(JSON.stringify({filter:o,outFields:c,format:"json",spatialReference:{wkid:l.wkid}})),r.promise}_onMessage(e){if(this.onMessage(e),"type"in e)switch(e.type){case"features":case"featureResult":for(const t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}}_onError(e){const t="Encountered an error over WebSocket connection";this._set("errorString",t),i.Z.getLogger(this.declaredClass).error("websocket-connection",t)}_onClose(e){this._websocket=null,this.notifyChange("connectionStatus"),1e3!==e.code&&i.Z.getLogger(this.declaredClass).error("websocket-connection",`WebSocket closed unexpectedly with error code ${e.code}`),this.destroyed||this._open()}};(0,s._)([(0,u.Cb)()],p.prototype,"connectionStatus",null),(0,s._)([(0,u.Cb)()],p.prototype,"errorString",void 0),p=(0,s._)([(0,l.j)("esri.layers.graphics.sources.connections.WebSocketConnection")],p);var w=r(34599),m=r(14165),S=r(33955),b=r(82971);const k={maxQueryDepth:5,maxRecordCountFactor:3};let C=class extends p{constructor(e){super({...k,...e}),this._buddyServicesQuery=null,this._relatedFeatures=null}async _open(){const e=await this._fetchServiceDefinition(this._config.source);e.timeInfo.trackIdField||i.Z.getLogger(this.declaredClass).warn("GeoEvent service was configured without a TrackIdField. This may result in certain functionality being disabled. The purgeOptions.maxObservations property will have no effect.");const t=this._fetchWebSocketUrl(e.streamUrls,this._config.spatialReference);this._buddyServicesQuery||(this._buddyServicesQuery=this._queryBuddyServices()),await this._buddyServicesQuery,await this._tryCreateWebSocket(t);const{filter:r,outFields:s}=this._config;this.destroyed||this._setFilter(r,s)}_onMessage(e){if("attributes"in e){let t;try{t=this._enrich(e),null!=this._featureZScaler&&this._featureZScaler(t.geometry)}catch(e){return void i.Z.getLogger(this.declaredClass).error(new n.Z("geoevent-connection","Failed to parse message",e))}this.onFeature(t)}else this.onMessage(e)}async _fetchServiceDefinition(e){const t={f:"json",...this._config.customParameters},r=(0,o.default)(e.path,{query:t,responseType:"json"}),s=(await r).data;return this._serviceDefinition=s,s}_fetchWebSocketUrl(e,t){const r=e[0],{urls:s,token:o}=r,n=this._inferWebSocketBaseUrl(s);return(0,c.fl)(`${n}/subscribe`,{outSR:""+t.wkid,token:o})}_inferWebSocketBaseUrl(e){if(1===e.length)return e[0];for(const t of e)if(t.includes("wss"))return t;return i.Z.getLogger(this.declaredClass).error(new n.Z("geoevent-connection","Unable to infer WebSocket url",e)),null}async _setFilter(e,t){const r=this._websocket;if(null==r||null==e&&null==t)return;const s=JSON.stringify({filter:this._serializeFilter(e,t)});let o=!1;const c=(0,a.hh)();return r.onmessage=e=>{const t=JSON.parse(e.data);t.filter&&(t.error&&(i.Z.getLogger(this.declaredClass).error(new n.Z("geoevent-connection","Failed to set service filter",t.error)),this._set("errorString",`Could not set service filter - ${t.error}`),c.reject(t.error)),this._setWebSocketJSONParseHandler(r),o=!0,c.resolve())},r.send(s),setTimeout((()=>{o||(this.destroyed||this._websocket!==r||i.Z.getLogger(this.declaredClass).error(new n.Z("geoevent-connection","Server timed out when setting filter")),c.reject())}),1e4),c.promise}_serializeFilter(e,t){const r={};if(null==e&&null==t)return r;if(null!=e&&e.geometry)try{const t=(0,S.im)(e.geometry);if("extent"!==t.type)throw new n.Z(`Expected extent but found type ${t.type}`);r.geometry=JSON.stringify(t.shiftCentralMeridian())}catch(e){i.Z.getLogger(this.declaredClass).error(new n.Z("geoevent-connection","Encountered an error when setting connection geometryDefinition",e))}return null!=e&&e.where&&"1 = 1"!==e.where&&"1=1"!==e.where&&(r.where=e.where),null!=t&&(r.outFields=t.join(",")),r}_enrich(e){if(!this._relatedFeatures)return e;const t=this._serviceDefinition.relatedFeatures.joinField,r=e.attributes[t],s=this._relatedFeatures.get(r);if(!s)return i.Z.getLogger(this.declaredClass).warn("geoevent-connection","Feature join failed. Is the join field configured correctly?",e),e;const{attributes:o,geometry:a}=s;for(const t in o)e.attributes[t]=o[t];return a&&(e.geometry=a),e.geometry||e.centroid||i.Z.getLogger(this.declaredClass).error(new n.Z("geoevent-connection","Found malformed feature - no geometry found",e)),e}async _queryBuddyServices(){try{const{relatedFeatures:e,keepLatestArchive:t}=this._serviceDefinition,r=this._queryRelatedFeatures(e),s=this._queryArchive(t);await r;const o=await s;if(!o)return;for(const e of o.features)this.onFeature(this._enrich(e))}catch(e){i.Z.getLogger(this.declaredClass).error(new n.Z("geoevent-connection","Encountered an error when querying buddy services",{error:e}))}}async _queryRelatedFeatures(e){if(!e)return;const t=await this._queryBuddy(e.featuresUrl);this._addRelatedFeatures(t)}async _queryArchive(e){if(e)return this._queryBuddy(e.featuresUrl)}async _queryBuddy(e){const t=new((await Promise.all([r.e(163),r.e(4609),r.e(4729),r.e(9790),r.e(8244),r.e(1423),r.e(911),r.e(5546),r.e(9942),r.e(9238),r.e(5235),r.e(5587),r.e(2156)]).then(r.bind(r,19238))).default)({url:e}),{capabilities:s}=await t.load(),o=s.query.supportsMaxRecordCountFactor,n=s.query.supportsPagination,i=s.query.supportsCentroid,a=this._config.maxRecordCountFactor,c=t.capabilities.query.maxRecordCount,l=o?c*a:c,u=new m.Z;if(u.outFields=this._config.outFields??["*"],u.where=this._config.filter?.where??"1=1",u.returnGeometry=!0,u.returnExceededLimitFeatures=!0,u.outSpatialReference=b.Z.fromJSON(this._config.spatialReference),i&&(u.returnCentroid=!0),o&&(u.maxRecordCountFactor=a),n)return u.num=l,t.destroy(),this._queryPages(e,u);const d=await(0,w.JT)(e,u,this._config.sourceSpatialReference);return t.destroy(),d.data}async _queryPages(e,t,r=[],s=0){t.start=null!=t.num?s*t.num:null;const{data:o}=await(0,w.JT)(e,t,this._config.sourceSpatialReference);return o.exceededTransferLimit&&s<(this._config.maxQueryDepth??0)?(o.features.forEach((e=>r.push(e))),this._queryPages(e,t,r,s+1)):(r.forEach((e=>o.features.push(e))),o)}_addRelatedFeatures(e){const t=new Map,r=e.features,s=this._serviceDefinition.relatedFeatures.joinField;for(const e of r){const r=e.attributes[s];t.set(r,e)}this._relatedFeatures=t}};C=(0,s._)([(0,l.j)("esri.layers.graphics.sources.connections.GeoEventConnection")],C);const v=C;let Z=class extends f{constructor(e){super(),this.connectionStatus="connected",this.errorString=null;const{geometryType:t,spatialReference:r,sourceSpatialReference:s}=e;this._featureZScaler=(0,d.k)(t,s,r)}updateCustomParameters(e){}sendMessageToSocket(e){}sendMessageToClient(e){if("type"in e)switch(e.type){case"features":case"featureResult":for(const t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}this.onMessage(e)}};function F(e,t,r,s,o,n,i,a){const c={source:e,sourceSpatialReference:t,spatialReference:r,geometryType:s,filter:o,maxReconnectionAttempts:n,maxReconnectionInterval:i,customParameters:a};return e?e.path.startsWith("wss://")||e.path.startsWith("ws://")?new p(c):new v(c):new Z(c)}(0,s._)([(0,u.Cb)()],Z.prototype,"connectionStatus",void 0),(0,s._)([(0,u.Cb)()],Z.prototype,"errorString",void 0),Z=(0,s._)([(0,l.j)("esri.layers.support.ClientSideConnection")],Z)},28694:(e,t,r)=>{r.d(t,{p:()=>o});var s=r(69285);function o(e,t,r){if(!r||!r.features||!r.hasZ)return;const o=(0,s.k)(r.geometryType,t,e.outSpatialReference);if(null!=o)for(const e of r.features)o(e.geometry)}}}]);
|