@arcgis/core 4.27.0-next.20230521 → 4.27.0-next.20230523
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/Graphic.js +1 -1
- package/WebMap.js +1 -1
- package/arcade/featureset/actions/SpatialFilter.js +1 -1
- package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
- package/arcade/featureset/sources/FeatureLayerMemory.js +1 -1
- package/arcade/featureset/sources/FeatureLayerRelated.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/030b43764f945cb1f8b0.js +1 -0
- package/assets/esri/core/workers/chunks/0d02856e55d20b99fc8b.js +1 -0
- package/assets/esri/core/workers/chunks/{69242c66492717c7388c.js → 0fcb8d408696075338e2.js} +1 -1
- package/assets/esri/core/workers/chunks/{b91c155de9a89e4e6971.js → 187c3b971ed0fc4363ef.js} +1 -1
- package/assets/esri/core/workers/chunks/{85c6ce93aa41e6b65997.js → 18db07d739a713cc0465.js} +1 -1
- package/assets/esri/core/workers/chunks/1b6177e23327be645c8c.js +1 -0
- package/assets/esri/core/workers/chunks/28286014a575042619ee.js +1 -0
- package/assets/esri/core/workers/chunks/{692dfeb2e255fdc0ade2.js → 39288fa69561d21f04f8.js} +1 -1
- package/assets/esri/core/workers/chunks/{2b9d3e60977934a6d471.js → 3bc6b5f0643364749ef8.js} +1 -1
- package/assets/esri/core/workers/chunks/45e5ad704d18dd0857ce.js +1 -0
- package/assets/esri/core/workers/chunks/4d24efa01d1accc5a5f0.js +1 -0
- package/assets/esri/core/workers/chunks/{6312783626bacf52df7a.js → 55486c644e8b01326a0d.js} +1 -1
- package/assets/esri/core/workers/chunks/5576858f56314afcb4d5.js +1 -0
- package/assets/esri/core/workers/chunks/{62d9d15f0d00a75da42c.js → 571dac507622948ac03e.js} +1 -1
- package/assets/esri/core/workers/chunks/59063d6abf70f6598425.js +1 -0
- package/assets/esri/core/workers/chunks/5a4c04bf4f57e74457c5.js +1 -0
- package/assets/esri/core/workers/chunks/5bf04c32e0ac89dcbf9f.js +1 -0
- package/assets/esri/core/workers/chunks/6a3d611e8842afbb50ab.js +2 -0
- package/assets/esri/core/workers/chunks/{55ca6ba8b40921025181.js.LICENSE.txt → 6a3d611e8842afbb50ab.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/70d6e5edf05ef7079fa8.js +1 -0
- package/assets/esri/core/workers/chunks/71bdf8f10aee0077f681.js +1 -0
- package/assets/esri/core/workers/chunks/72b2c3c8e76da699690c.js +1 -0
- package/assets/esri/core/workers/chunks/78ce0b1af62435d8ebf4.js +1 -0
- package/assets/esri/core/workers/chunks/791f529e90135398b3d5.js +1 -0
- package/assets/esri/core/workers/chunks/8d3abfe6fdc5ac8d6cb7.js +1 -0
- package/assets/esri/core/workers/chunks/{1edc5c06874cb12c5478.js → 924e4a18d8403d1caea3.js} +1 -1
- package/assets/esri/core/workers/chunks/96d339abcd917f1f0ae1.js +1 -0
- package/assets/esri/core/workers/chunks/97cdbec7532cfcdf9ad2.js +1 -0
- package/assets/esri/core/workers/chunks/{f3f6035a17f7dcd19675.js → 9ab400a89dd701778d2c.js} +1 -1
- package/assets/esri/core/workers/chunks/{1488b3d48232844b8bb4.js → 9fe349f43d5ff5a4ac2d.js} +1 -1
- package/assets/esri/core/workers/chunks/{22396dd3717d17a5d235.js → a1c31bb8c12831539328.js} +1 -1
- package/assets/esri/core/workers/chunks/b0571b9e602218cdc7aa.js +1 -0
- package/assets/esri/core/workers/chunks/b1d88f8e528bf7092f35.js +1 -0
- package/assets/esri/core/workers/chunks/b4e2dc6b3d06b426e596.js +1 -0
- package/assets/esri/core/workers/chunks/{48abcb2d88f22e6e9fde.js → c2cb9fa18c77f0c5104e.js} +1 -1
- package/assets/esri/core/workers/chunks/cad7a2092ea7f51dbd8b.js +1 -0
- package/assets/esri/core/workers/chunks/d08800a30b1227591986.js +1 -0
- package/assets/esri/core/workers/chunks/d725dbbdeb05322e6d88.js +1 -0
- package/assets/esri/core/workers/chunks/df3e497d12ed77bae168.js +1 -0
- package/assets/esri/core/workers/chunks/fb080339bfaf32731ca6.js +1 -0
- package/assets/esri/core/workers/chunks/{56fc7924b4fb30239c19.js → fdf58386a67e54c09bfb.js} +1 -1
- package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
- package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
- package/assets/esri/themes/base/_core.scss +2 -0
- package/assets/esri/themes/base/widgets/_BasemapGallery.scss +86 -96
- package/assets/esri/themes/base/widgets/_FloorFilter.scss +6 -0
- package/assets/esri/themes/base/widgets/_UtilityNetworkValidateTopology.scss +40 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_en.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor.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_en.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/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ar.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_bg.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_bs.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ca.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_cs.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_da.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_de.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_el.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_en.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_es.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_et.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_fi.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_fr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_he.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_hr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_hu.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_id.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_it.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ja.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ko.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_lt.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_lv.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_nb.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_nl.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_pl.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_pt-BR.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_pt-PT.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ro.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ru.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_sk.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_sl.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_sr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_sv.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_th.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_tr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_uk.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_vi.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_zh-CN.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_zh-HK.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_zh-TW.json +1 -1
- package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
- package/chunks/arcgis-knowledge-client-core.js +1 -1
- package/chunks/mat4.js +1 -1
- package/core/accessorSupport/write.js +1 -1
- package/core/fontUtils.js +1 -1
- package/core/libs/gl-matrix-2/math/mat4.js +1 -1
- package/geometry/Mesh.js +1 -1
- package/geometry/support/MeshGeoreferencedRelativeVertexSpace.d.ts +4 -0
- package/geometry/support/MeshGeoreferencedRelativeVertexSpace.js +5 -0
- package/geometry/support/MeshGeoreferencedVertexSpace.d.ts +4 -0
- package/geometry/support/MeshGeoreferencedVertexSpace.js +5 -0
- package/geometry/support/MeshLocalVertexSpace.d.ts +4 -0
- package/geometry/support/MeshLocalVertexSpace.js +5 -0
- package/geometry/support/MeshTransform.d.ts +4 -0
- package/geometry/support/MeshTransform.js +1 -1
- package/geometry/support/meshUtils/ElevationSamplerWorker.js +1 -1
- package/geometry/support/meshUtils/centerAt.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/geometry.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
- package/geometry/support/meshUtils/geographicUtils.js +1 -1
- package/geometry/support/meshUtils/georeference.js +1 -1
- package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
- package/geometry/support/meshUtils/merge.js +1 -1
- package/geometry/support/meshUtils/offset.js +1 -1
- package/geometry/support/meshUtils/primitives.js +1 -1
- package/geometry/support/meshUtils/rotate.js +1 -1
- package/geometry/support/meshUtils/scale.js +1 -1
- package/interfaces.d.ts +227 -25
- package/layers/LinkChartLayer.js +1 -1
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/graphics/data/attributeSupport.js +1 -1
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
- package/layers/knowledgeGraph/SessionMemoryStorage.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/support/rasterFunctions/BandArithmeticFunction.js +1 -1
- package/layers/support/rasterFunctions/BaseRasterFunction.js +1 -1
- package/layers/support/rasterFunctions/CompositeBandFunction.js +1 -1
- package/layers/support/rasterFunctions/ExtractBandFunction.js +1 -1
- package/layers/support/rasterFunctions/ExtractBandFunctionArguments.js +1 -1
- package/layers/support/rasterFunctions/NDVIFunction.js +1 -1
- package/networks/support/TopologyValidationJobInfo.js +1 -1
- package/package.json +2 -2
- package/popup/FieldInfo.js +1 -1
- package/portal/Portal.js +1 -1
- package/rest/support/FeatureSet.js +1 -1
- package/rest/support/meshFeatureSet.js +1 -1
- package/smartMapping/symbology/color.js +1 -1
- package/smartMapping/symbology/support/colors.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/support/utils.js +1 -1
- package/views/2d/layers/StreamLayerView2D.js +1 -1
- package/views/2d/layers/features/controllers/FeatureController2D.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
- package/views/3d/environment/EnvironmentRenderer.js +1 -1
- package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
- package/views/3d/interactive/editingTools/meshFastUpdateUtils.js +1 -1
- package/views/3d/interactive/editingTools/moveGraphic/GraphicMoveTool.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/GraphicTransformTool.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateMeshAdapter.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/undoRecords.js +1 -1
- package/views/3d/layers/StreamLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshObject3DGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/symbolComplexity.js +1 -1
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SOverrides.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/support/DisplayQualityProfile.js +1 -1
- package/views/3d/support/QualitySettings.js +1 -1
- package/views/3d/webgl-engine/lib/Camera.js +1 -1
- package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
- package/views/3d/webgl-engine/lib/RenderPluginManager.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/draw/DrawOperation.js +1 -1
- package/views/draw/support/helpMessageUtils.js +1 -1
- package/views/interactive/dragEventPipeline.js +1 -1
- package/views/layers/StreamLayerView.js +1 -1
- package/widgets/BasemapGallery/css.js +1 -1
- package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
- package/widgets/BasemapGallery.js +1 -1
- package/widgets/CoordinateConversion.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/Edits.js +1 -1
- package/widgets/Editor/Upload.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/Feature/support/featureUtils.js +1 -1
- package/widgets/FeatureForm/featureFormUtils.js +1 -1
- package/widgets/FeatureTable/FieldColumn.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/Locate.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
- package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +5 -0
- package/widgets/UtilityNetworkValidateTopology.js +5 -0
- package/widgets/support/widgetUtils.js +1 -1
- package/assets/esri/core/workers/chunks/163bf2e13abbdd298374.js +0 -1
- package/assets/esri/core/workers/chunks/23f73f81aea461c0c6e6.js +0 -1
- package/assets/esri/core/workers/chunks/2640204c4655aa535ccb.js +0 -1
- package/assets/esri/core/workers/chunks/2bf42d060f877566b989.js +0 -1
- package/assets/esri/core/workers/chunks/34ec9623a1bece86a82b.js +0 -1
- package/assets/esri/core/workers/chunks/3bf52139340827794c3b.js +0 -1
- package/assets/esri/core/workers/chunks/3cebdd77a8401495097f.js +0 -1
- package/assets/esri/core/workers/chunks/48cb634255e39711a720.js +0 -1
- package/assets/esri/core/workers/chunks/4d5f71d84c85f45c97ea.js +0 -1
- package/assets/esri/core/workers/chunks/52d02021e858820bc4fa.js +0 -1
- package/assets/esri/core/workers/chunks/55ca6ba8b40921025181.js +0 -2
- package/assets/esri/core/workers/chunks/64b8f65e2ef6cbf08380.js +0 -1
- package/assets/esri/core/workers/chunks/662e479c370c11bcb8a7.js +0 -1
- package/assets/esri/core/workers/chunks/78aede1e114deefacb54.js +0 -1
- package/assets/esri/core/workers/chunks/7ef100158ca28631fcaf.js +0 -1
- package/assets/esri/core/workers/chunks/93ad67930aa7d4a4b0ac.js +0 -1
- package/assets/esri/core/workers/chunks/964795dfb57f0d0635d0.js +0 -1
- package/assets/esri/core/workers/chunks/99ce0a202dcd3d7dc290.js +0 -1
- package/assets/esri/core/workers/chunks/abe6c99a1a719543dbe8.js +0 -1
- package/assets/esri/core/workers/chunks/c3bf44146fddfe8990f7.js +0 -1
- package/assets/esri/core/workers/chunks/cbe817e966b57599bafd.js +0 -1
- package/assets/esri/core/workers/chunks/e15b5d7e46a834eacc57.js +0 -1
- package/assets/esri/core/workers/chunks/e1e0b3580e2c3098c9f4.js +0 -1
- package/assets/esri/core/workers/chunks/e305d20e4424451cab5b.js +0 -1
- package/assets/esri/core/workers/chunks/e6836c84470fb6bd25bf.js +0 -1
- package/assets/esri/core/workers/chunks/f924732902703233655e.js +0 -1
- package/assets/esri/core/workers/chunks/ff1c005eede0cf964332.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3847],{66577:(e,n,t)=>{t.d(n,{qM:()=>c});var i=t(75215),l=t(6570),r=t(9361),a=t(65091),o=t(94139),s=t(38913),u=t(58901);t(82971),t(86973),t(33955);const c={base:r.Z,key:"type",typeMap:{extent:l.Z,multipoint:a.Z,point:o.Z,polyline:u.Z,polygon:s.Z}};(0,i.N7)(c)},33955:(e,n,t)=>{t.d(n,{Ji:()=>y,YX:()=>u,aW:()=>c,im:()=>p,l9:()=>d,oU:()=>m,q9:()=>g,wp:()=>f});var i=t(6570),l=t(9361),r=t(65091),a=t(94139),o=t(38913),s=t(58901);function u(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function c(e){return void 0!==e.points}function f(e){return void 0!==e.x&&void 0!==e.y}function d(e){return void 0!==e.paths}function m(e){return void 0!==e.rings}function p(e){return null==e?null:e instanceof l.Z?e:f(e)?a.Z.fromJSON(e):d(e)?s.Z.fromJSON(e):m(e)?o.Z.fromJSON(e):c(e)?r.Z.fromJSON(e):u(e)?i.Z.fromJSON(e):null}function y(e){return e?f(e)?"esriGeometryPoint":d(e)?"esriGeometryPolyline":m(e)?"esriGeometryPolygon":u(e)?"esriGeometryEnvelope":c(e)?"esriGeometryMultipoint":null:null}const h={esriGeometryPoint:a.Z,esriGeometryPolyline:s.Z,esriGeometryPolygon:o.Z,esriGeometryEnvelope:i.Z,esriGeometryMultipoint:r.Z};function g(e){return e&&h[e]||null}},82397:(e,n,t)=>{t.d(n,{G6:()=>y,Ie:()=>p,J9:()=>d,RF:()=>f,U1:()=>m,vY:()=>a}),t(33955);const i=(e,n,t)=>[n,t],l=(e,n,t)=>[n,t,e[2]],r=(e,n,t)=>[n,t,e[2],e[3]];function a(e){return e?{originPosition:"upper-left"===e.originPosition?"upperLeft":"lower-left"===e.originPosition?"lowerLeft":e.originPosition,scale:e.tolerance?[e.tolerance,e.tolerance]:[1,1],translate:null!=e.extent?[e.extent.xmin,e.extent.ymax]:[0,0]}:null}function o({scale:e,translate:n},t){return t*e[0]+n[0]}function s({scale:e,translate:n},t){return n[1]-t*e[1]}function u(e,n,t){const i=new Array(t.length);if(!t.length)return i;const[l,r]=e.scale;let a=o(e,t[0][0]),u=s(e,t[0][1]);i[0]=n(t[0],a,u);for(let e=1;e<t.length;e++){const o=t[e];a+=o[0]*l,u-=o[1]*r,i[e]=n(o,a,u)}return i}function c(e,n,t){const i=new Array(t.length);for(let l=0;l<t.length;l++)i[l]=u(e,n,t[l]);return i}function f(e,n,t,i,l){return n.x=function({scale:e,translate:n},t){return Math.round((t-n[0])/e[0])}(e,t.x),n.y=function({scale:e,translate:n},t){return Math.round((n[1]-t)/e[1])}(e,t.y),n!==t&&(i&&(n.z=t.z),l&&(n.m=t.m)),n}function d(e,n,t,a,o){return null!=t&&(n.points=function(e,n,t,a){return u(e,t?a?r:l:a?l:i,n)}(e,t.points,a,o)),n}function m(e,n,t,i,l){return null==t||(n.x=o(e,t.x),n.y=s(e,t.y),n!==t&&(i&&(n.z=t.z),l&&(n.m=t.m))),n}function p(e,n,t,a,o){return null!=t&&(n.rings=function(e,n,t,a){return c(e,t?a?r:l:a?l:i,n)}(e,t.rings,a,o)),n}function y(e,n,t,a,o){return null!=t&&(n.paths=function(e,n,t,a){return c(e,t?a?r:l:a?l:i,n)}(e,t.paths,a,o)),n}},86973:(e,n,t)=>{t.d(n,{M:()=>l,P:()=>r});var i=t(35454);const l=(0,i.w)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),r=(0,i.w)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"})},35671:(e,n,t)=>{t.d(n,{io:()=>x,AB:()=>V,gd:()=>F,Q0:()=>v,YN:()=>y,UF:()=>g,O5:()=>I,CH:()=>w,os:()=>E,Hp:()=>$,Fv:()=>z,H7:()=>R,Ec:()=>ie,qN:()=>B,q6:()=>d,Pz:()=>Y,Lk:()=>T,Qc:()=>X,vP:()=>te}),t(20102);var i,l,r=t(78286);(l=i||(i={})).VALUE_OUT_OF_RANGE="domain-validation-error::value-out-of-range",l.INVALID_CODED_VALUE="domain-validation-error::invalid-coded-value";var a=t(59266);const o=/^([0-9])/,s=/[^a-z0-9_\u0080-\uffff]/gi,u=/_{2,}/g,c=/^_/,f=/_$/;function d(e){return null==e?null:e.trim().replaceAll(s,"_").replaceAll(u,"_").replace(c,"").replace(f,"").replace(o,"F$1")||null}const m=["field","field2","field3","normalizationField","rotationInfo.field","proportionalSymbolInfo.field","proportionalSymbolInfo.normalizationField","colorInfo.field","colorInfo.normalizationField"],p=["field","normalizationField"];function y(e,n){if(null!=e&&null!=n)for(const t of Array.isArray(e)?e:[e])if(h(m,t,n),"visualVariables"in t&&t.visualVariables)for(const e of t.visualVariables)h(p,e,n)}function h(e,n,t){if(e)for(const i of e){const e=(0,r.hS)(i,n),l=e&&"function"!=typeof e&&t.get(e);l&&(0,r.RB)(i,l.name,n)}}function g(e,n){if(null!=e&&n?.fields?.length)if("startField"in e){const t=n.get(e.startField),i=n.get(e.endField);e.startField=t?.name??null,e.endField=i?.name??null}else{const t=n.get(e.startTimeField),i=n.get(e.endTimeField);e.startTimeField=t?.name??null,e.endTimeField=i?.name??null}}const b=new Set;function v(e,n){return e&&n?(b.clear(),F(b,e,n),Array.from(b).sort()):[]}function F(e,n,t){if(t)if(n?.fields?.length)if(t.includes("*"))for(const{name:t}of n.fields)e.add(t);else for(const i of t)V(e,n,i);else{if(t.includes("*"))return e.clear(),void e.add("*");for(const n of t)null!=n&&e.add(n)}}function V(e,n,t){if("string"==typeof t)if(n){const i=n.get(t);i&&e.add(i.name)}else e.add(t)}function T(e,n){return null==n||null==e?[]:n.includes("*")?(e.fields??[]).map((e=>e.name)):n}async function x(e,n,t){if(!t)return;const{arcadeUtils:i}=await(0,a.LC)(),l=i.extractFieldNames(t,n?.fields?.map((e=>e.name)));for(const t of l)V(e,n,t)}function I({displayField:e,fields:n}){return e||(n&&n.length?_(n,"name-or-title")||_(n,"unique-identifier")||_(n,"type-or-category")||function(e){for(const n of e){if(!n||!n.name)continue;const e=n.name.toLowerCase();if(e.includes("name")||e.includes("title"))return n.name}return null}(n):null)}function _(e,n){for(const t of e)if(t&&t.valueType&&t.valueType===n)return t.name;return null}function w(e){return e?v(e.fieldsIndex,M(e)):[]}const N=["oid","global-id","guid"],S=["oid","global-id"],D=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/shape/i,/perimeter/i,/objectid/i,/_i$/i];function M(e){if(!e)return[];const n="editFieldsInfo"in e&&e.editFieldsInfo;if(!n)return[];const{creationDateField:t,creatorField:i,editDateField:l,editorField:r}=n;return[t,i,l,r].filter(Boolean)}function C(e){return M(e).map((e=>e.toLowerCase()))}function $(e,n){return e.editable&&!N.includes(e.type)&&!C(n).includes(e.name?.toLowerCase()??"")}function z(e,n){const t=e.name?.toLowerCase()??"";return!(null!=n?.objectIdField&&t===n.objectIdField.toLowerCase()||null!=n?.globalIdField&&t===n.globalIdField.toLowerCase()||function(e){const n=new Set;C(e).forEach((e=>n.add(e))),function(e){if(!e)return[];const n=e.geometryFieldsInfo;return n?v(e.fieldsIndex,[n.shapeAreaField,n.shapeLengthField]):[]}(e).forEach((e=>n.add(e.toLowerCase())));const t=e&&"infoFor3D"in e?e.infoFor3D:void 0;return t&&(Object.values(t.assetMapFieldRoles).forEach((e=>n.add(e.toLowerCase()))),Object.values(t.transformFieldRoles).forEach((e=>n.add(e.toLowerCase())))),Array.from(n)}(n).includes(t)||S.includes(e.type)||D.some((e=>e.test(t))))}function E(e){const n=e.defaultValue;return void 0!==n&&q(e,n)?n:e.nullable?null:void 0}function A(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function k(e){return null===e||A(e)}const G="isInteger"in Number?Number.isInteger:e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e;function L(e){return null===e||G(e)}function O(e){return null!=e&&"string"==typeof e}function P(e){return null===e||O(e)}function U(){return!0}function q(e,n){let t;switch(e.type){case"date":case"integer":case"long":case"small-integer":case"esriFieldTypeDate":case"esriFieldTypeInteger":case"esriFieldTypeLong":case"esriFieldTypeSmallInteger":t=e.nullable?L:G;break;case"double":case"single":case"esriFieldTypeSingle":case"esriFieldTypeDouble":t=e.nullable?k:A;break;case"string":case"esriFieldTypeString":t=e.nullable?P:O;break;default:t=U}return 1===arguments.length?t:t(n)}const Z=new Set(["integer","small-integer","single","double","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble"]);function R(e){return null!=e&&Z.has(e.type)}function B(e){return null!=e&&("string"===e.type||"esriFieldTypeString"===e.type)}var j,J;function Y(e){return null==e||"number"==typeof e&&isNaN(e)?null:e}function X(e,n){return null==e||e.nullable&&null===n?null:R(e)&&!function(e,n){const t="string"==typeof e?Q(e):e;if(!t)return!1;const i=t.min,l=t.max;return t.isInteger?G(n)&&n>=i&&n<=l:n>=i&&n<=l}(e.type,Number(n))?j.OUT_OF_RANGE:q(e,n)?e.domain?function(e,n){switch(e.type){case"range":{const t="range"in e?e.range[0]:e.minValue,l="range"in e?e.range[1]:e.maxValue;if(null!=t&&+n<t||null!=l&&+n>l)return i.VALUE_OUT_OF_RANGE;break}case"coded-value":case"codedValue":if(null==e.codedValues||e.codedValues.every((e=>null==e||e.code!==n)))return i.INVALID_CODED_VALUE}return null}(e.domain,n):null:J.INVALID_TYPE}function Q(e){switch(e){case"esriFieldTypeSmallInteger":case"small-integer":return H;case"esriFieldTypeInteger":case"integer":return W;case"esriFieldTypeBigInteger":case"big-integer":return K;case"esriFieldTypeSingle":case"single":return ee;case"esriFieldTypeDouble":case"double":return ne}}new Set(["date","date-only","time-only","timestamp-offset","esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]),function(e){e.OUT_OF_RANGE="numeric-range-validation-error::out-of-range"}(j||(j={})),function(e){e.INVALID_TYPE="type-validation-error::invalid-type"}(J||(J={}));const H={min:-32768,max:32767,isInteger:!0},W={min:-2147483648,max:2147483647,isInteger:!0},K={min:-Number.MAX_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,isInteger:!0},ee={min:-34e37,max:12e37,isInteger:!1},ne={min:-Number.MAX_VALUE,max:Number.MAX_VALUE,isInteger:!1};function te(e,n,t){switch(e){case i.INVALID_CODED_VALUE:return`Value ${t} is not in the coded domain - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case i.VALUE_OUT_OF_RANGE:return`Value ${t} is out of the range of valid values - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case J.INVALID_TYPE:return`Value ${t} is not a valid value for the field type - field: ${n.name}, type: ${n.type}, nullable: ${n.nullable}`;case j.OUT_OF_RANGE:{const{min:e,max:i}=Q(n.type);return`Value ${t} is out of range for the number type - field: ${n.name}, type: ${n.type}, value range is ${e} to ${i}`}}}function ie(e){return!!e&&["raster.itempixelvalue","raster.servicepixelvalue"].some((n=>e.toLowerCase().startsWith(n)))}},10278:(e,n,t)=>{t.d(n,{Z:()=>d});var i=t(43697),l=t(35454),r=t(96674),a=t(5600),o=(t(75215),t(67676),t(80442),t(36030)),s=t(52011);const u=new l.X({esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation",esriClassifyDefinedInterval:"defined-interval"}),c=new l.X({esriNormalizeByLog:"log",esriNormalizeByPercentOfTotal:"percent-of-total",esriNormalizeByField:"field"});let f=class extends r.wq{constructor(e){super(e),this.type="class-breaks-definition",this.breakCount=null,this.classificationField=null,this.classificationMethod=null,this.normalizationField=null,this.normalizationType=null}set standardDeviationInterval(e){"standard-deviation"===this.classificationMethod&&this._set("standardDeviationInterval",e)}set definedInterval(e){"defined-interval"===this.classificationMethod&&this._set("definedInterval",e)}};(0,i._)([(0,o.J)({classBreaksDef:"class-breaks-definition"})],f.prototype,"type",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"breakCount",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"classificationField",void 0),(0,i._)([(0,a.Cb)({type:String,json:{read:u.read,write:u.write}})],f.prototype,"classificationMethod",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"normalizationField",void 0),(0,i._)([(0,a.Cb)({json:{read:c.read,write:c.write}})],f.prototype,"normalizationType",void 0),(0,i._)([(0,a.Cb)({value:null,json:{write:!0}})],f.prototype,"standardDeviationInterval",null),(0,i._)([(0,a.Cb)({value:null,json:{write:!0}})],f.prototype,"definedInterval",null),f=(0,i._)([(0,s.j)("esri.rest.support.ClassBreaksDefinition")],f);const d=f},622:(e,n,t)=>{t.d(n,{k:()=>r});const i=t(92604).Z.getLogger("esri.rest.support.generateRendererUtils");function l(e,n){return Number(e.toFixed(n))}function r(e){const{normalizationTotal:n}=e;return{classBreaks:a(e),normalizationTotal:n}}function a(e){const n=e.definition,{classificationMethod:t,normalizationType:i,definedInterval:r}=n,a=n.breakCount??1,u=[];let c=e.values;if(0===c.length)return[];c=c.sort(((e,n)=>e-n));const f=c[0],d=c[c.length-1];if("equal-interval"===t)if(c.length>=a){const e=(d-f)/a;let n=f;for(let t=1;t<a;t++){const r=l(f+t*e,6);u.push({minValue:n,maxValue:r,label:o(n,r,i)}),n=r}u.push({minValue:n,maxValue:d,label:o(n,d,i)})}else c.forEach((e=>{u.push({minValue:e,maxValue:e,label:o(e,e,i)})}));else if("natural-breaks"===t){const n=function(e){const n=[],t=[];let i=Number.MIN_VALUE,l=1,r=-1;for(let a=0;a<e.length;a++){const o=e[a];o===i?(l++,t[r]=l):null!==o&&(n.push(o),i=o,l=1,t.push(l),r++)}return{uniqueValues:n,valueFrequency:t}}(c),t=e.valueFrequency||n.valueFrequency,r=s(n.uniqueValues,t,a);let m=f;for(let e=1;e<a;e++)if(n.uniqueValues.length>e){const t=l(n.uniqueValues[r[e]],6);u.push({minValue:m,maxValue:t,label:o(m,t,i)}),m=t}u.push({minValue:m,maxValue:d,label:o(m,d,i)})}else if("quantile"===t)if(c.length>=a&&f!==d){let e=f,n=Math.ceil(c.length/a),t=0;for(let l=1;l<a;l++){let r=n+t-1;r>c.length&&(r=c.length-1),r<0&&(r=0),u.push({minValue:e,maxValue:c[r],label:o(e,c[r],i)}),e=c[r],t+=n,n=Math.ceil((c.length-t)/(a-l))}u.push({minValue:e,maxValue:d,label:o(e,d,i)})}else{let e=-1;for(let n=0;n<c.length;n++){const t=c[n];t!==e&&(e=t,u.push({minValue:e,maxValue:t,label:o(e,t,i)}),e=t)}}else if("standard-deviation"===t){const e=function(e){let n=0;for(let t=0;t<e.length;t++)n+=e[t];return n/=e.length,n}(c),n=function(e,n){let t=0;for(let i=0;i<e.length;i++){const l=e[i];t+=(l-n)*(l-n)}return t/=e.length,Math.sqrt(t)}(c,e);if(0===n)u.push({minValue:c[0],maxValue:c[0],label:o(c[0],c[0],i)});else{const t=function(e,n,t,i,l){let r=Math.max(i-e,n-i)/l/t;return r=r>=1?1:r>=.5?.5:.25,r}(f,d,a,e,n)*n;let r=0,s=f;for(let n=a;n>=1;n--){const a=l(e-(n-.5)*t,6);u.push({minValue:s,maxValue:a,label:o(s,a,i)}),s=a,r++}let c=l(e+.5*t,6);u.push({minValue:s,maxValue:c,label:o(s,c,i)}),s=c,r++;for(let n=1;n<=a;n++)c=r===2*a?d:l(e+(n+.5)*t,6),u.push({minValue:s,maxValue:c,label:o(s,c,i)}),s=c,r++}}else if("defined-interval"===t){if(!r)return u;const e=c[0],n=c[c.length-1],t=Math.ceil((n-e)/r);let a=e;for(let n=1;n<t;n++){const t=l(e+n*r,6);u.push({minValue:a,maxValue:t,label:o(a,t,i)}),a=t}u.push({minValue:a,maxValue:n,label:o(a,n,i)})}return u}function o(e,n,t){let i=null;return i=e===n?t&&"percent-of-total"===t?e+"%":e.toString():t&&"percent-of-total"===t?e+"% - "+n+"%":e+" - "+n,i}function s(e,n,t){const i=e.length,l=[];t>i&&(t=i);for(let e=0;e<t;e++)l.push(Math.round(e*i/t-1));l.push(i-1);let r=u(l,e,n,t);return function(e,n,t,i,l,r){let a=0,o=0,s=0,u=0,f=!0;for(let d=0;d<2&&f;d++){0===d&&(f=!1);for(let d=0;d<r-1;d++)for(;t[d+1]+1!==t[d+2];){t[d+1]=t[d+1]+1;const r=c(d,t,i,l);s=r.sbMean,a=r.sbSdcm;const m=c(d+1,t,i,l);if(u=m.sbMean,o=m.sbSdcm,!(a+o<n[d]+n[d+1])){t[d+1]=t[d+1]-1;break}n[d]=a,n[d+1]=o,e[d]=s,e[d+1]=u,f=!0}for(let d=r-1;d>0;d--)for(;t[d]!==t[d-1]+1;){t[d]=t[d]-1;const r=c(d-1,t,i,l);s=r.sbMean,a=r.sbSdcm;const m=c(d,t,i,l);if(u=m.sbMean,o=m.sbSdcm,!(a+o<n[d-1]+n[d])){t[d]=t[d]+1;break}n[d-1]=a,n[d]=o,e[d-1]=s,e[d]=u,f=!0}}return f}(r.mean,r.sdcm,l,e,n,t)&&(r=u(l,e,n,t)),l}function u(e,n,t,i){let l=[],r=[],a=[],o=0;const s=[],u=[];for(let l=0;l<i;l++){const i=c(l,e,n,t);s.push(i.sbMean),u.push(i.sbSdcm),o+=u[l]}let f,d=o,m=!0;for(;m||o<d;){m=!1,l=[];for(let n=0;n<i;n++)l.push(e[n]);for(let t=0;t<i;t++)for(let l=e[t]+1;l<=e[t+1];l++)if(f=n[l],t>0&&l!==e[t+1]&&Math.abs(f-s[t])>Math.abs(f-s[t-1]))e[t]=l;else if(t<i-1&&e[t]!==l-1&&Math.abs(f-s[t])>Math.abs(f-s[t+1])){e[t+1]=l-1;break}d=o,o=0,r=[],a=[];for(let l=0;l<i;l++){r.push(s[l]),a.push(u[l]);const i=c(l,e,n,t);s[l]=i.sbMean,u[l]=i.sbSdcm,o+=u[l]}}if(o>d){for(let n=0;n<i;n++)e[n]=l[n],s[n]=r[n],u[n]=a[n];o=d}return{mean:s,sdcm:u}}function c(e,n,t,l){let r=0,a=0;for(let i=n[e]+1;i<=n[e+1];i++){const e=l[i];r+=t[i]*e,a+=e}a<=0&&i.warn("Exception in Natural Breaks calculation");const o=r/a;let s=0;for(let i=n[e]+1;i<=n[e+1];i++)s+=l[i]*(t[i]-o)**2;return{sbMean:o,sbSdcm:s}}},24452:(e,n,t)=>{t.d(n,{DL:()=>D,F_:()=>T,G2:()=>N,H0:()=>y,Lq:()=>b,Qm:()=>_,S5:()=>p,XL:()=>g,eT:()=>x,fk:()=>w,i5:()=>h,oF:()=>M,wk:()=>m});var i=t(10278),l=t(622);const r="<Null>",a="equal-interval",o=1,s=5,u=10,c=/\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*/gi,f=new Set(["esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble"]),d=["min","max","avg","stddev","count","sum","variance","nullcount","median"];function m(e){return null==e||"string"==typeof e&&!e?r:e}function p(e){const n=null!=e.normalizationField||null!=e.normalizationType,t=null!=e.minValue||null!=e.maxValue,i=!!e.sqlExpression&&e.supportsSQLExpression;return!n&&!t&&!i}function y(e){const n=e.returnDistinct?[...new Set(e.values)]:e.values,t=n.filter((e=>null!=e)).length,i={count:t};return e.supportsNullCount&&(i.nullcount=n.length-t),e.percentileParams&&(i.median=g(n,e.percentileParams)),i}function h(e){const{values:n,useSampleStdDev:t,supportsNullCount:i}=e;let l=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,a=null,o=null,s=null,u=null,c=0;const f=null==e.minValue?-1/0:e.minValue,d=null==e.maxValue?1/0:e.maxValue;for(const e of n)Number.isFinite(e)?e>=f&&e<=d&&(a=null===a?e:a+e,l=Math.min(l,e),r=Math.max(r,e),c++):"string"==typeof e&&c++;if(c&&null!=a){o=a/c;let e=0;for(const t of n)Number.isFinite(t)&&t>=f&&t<=d&&(e+=(t-o)**2);u=t?c>1?e/(c-1):0:c>0?e/c:0,s=Math.sqrt(u)}else l=null,r=null;const m={avg:o,count:c,max:r,min:l,stddev:s,sum:a,variance:u};return i&&(m.nullcount=n.length-c),e.percentileParams&&(m.median=g(n,e.percentileParams)),m}function g(e,n){const{fieldType:t,value:i,orderBy:l,isDiscrete:r}=n,a=b(t,"desc"===l);if(0===(e=[...e].filter((e=>null!=e)).sort(((e,n)=>a(e,n)))).length)return null;if(i<=0)return e[0];if(i>=1)return e[e.length-1];const o=(e.length-1)*i,s=Math.floor(o),u=s+1,c=o%1,f=e[s],d=e[u];return u>=e.length||r||"string"==typeof f||"string"==typeof d?f:f*(1-c)+d*c}function b(e,n){const t=n?1:-1,i=function(e){return e?(e,n)=>{const t=v(e,n,!0);return null!=t?t:n-e}:(e,n)=>{const t=v(e,n,!1);return null!=t?t:e-n}}(n),l=F(n);if(!e||!["esriFieldTypeDate","esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...f].includes(e))return(e,n)=>"number"==typeof e&&"number"==typeof n?i(e,n):"string"==typeof e&&"string"==typeof n?l(e,n):t;if("esriFieldTypeDate"===e)return(e,n)=>{const l=new Date(e).getTime(),r=new Date(n).getTime();return isNaN(l)||isNaN(r)?t:i(l,r)};if(f.has(e))return(e,n)=>i(e,n);if("esriFieldTypeString"===e)return(e,n)=>l(e,n);if("esriFieldTypeGUID"===e||"esriFieldTypeGlobalID"===e){const e=F(n);return(n,t)=>e(V(n),V(t))}return n?(e,n)=>1:(e,n)=>-1}function v(e,n,t){if(t){if(null==e)return null==n?0:1;if(null==n)return-1}else{if(null==e)return null==n?0:-1;if(null==n)return 1}return null}function F(e){return e?(e,n)=>{const t=v(e,n,!0);return null!=t?t:(e=e.toUpperCase())>(n=n.toUpperCase())?-1:e<n?1:0}:(e,n)=>{const t=v(e,n,!1);return null!=t?t:(e=e.toUpperCase())<(n=n.toUpperCase())?-1:e>n?1:0}}function V(e){return e.substr(24,12)+e.substr(19,4)+e.substr(16,2)+e.substr(14,2)+e.substr(11,2)+e.substr(9,2)+e.substr(6,2)+e.substr(4,2)+e.substr(2,2)+e.substr(0,2)}function T(e,n){let t;for(t in e)d.includes(t)&&(Number.isFinite(e[t])||(e[t]=null));return n?(["avg","stddev","variance"].forEach((n=>{null!=e[n]&&(e[n]=Math.ceil(e[n]??0))})),e):e}function x(e){const n={};for(let t of e)(null==t||"string"==typeof t&&""===t.trim())&&(t=null),null==n[t]?n[t]={count:1,data:t}:n[t].count++;return{count:n}}function I(e){return"coded-value"!==e?.type?[]:e.codedValues.map((e=>e.code))}function _(e,n,t,i){const l=e.count,r=[];if(t&&n){const e=[],t=I(n[0]);for(const l of t)if(n[1]){const t=I(n[1]);for(const r of t)if(n[2]){const t=I(n[2]);for(const n of t)e.push(`${m(l)}${i}${m(r)}${i}${m(n)}`)}else e.push(`${m(l)}${i}${m(r)}`)}else e.push(l);for(const n of e)l.hasOwnProperty(n)||(l[n]={data:n,count:0})}for(const e in l){const n=l[e];r.push({value:n.data,count:n.count,label:n.label})}return{uniqueValueInfos:r}}function w(e,n,t,i){let l=null;switch(n){case"log":0!==e&&(l=Math.log(e)*Math.LOG10E);break;case"percent-of-total":Number.isFinite(i)&&0!==i&&(l=e/i*100);break;case"field":Number.isFinite(t)&&0!==t&&(l=e/t);break;case"natural-log":e>0&&(l=Math.log(e));break;case"square-root":e>0&&(l=e**.5)}return l}function N(e,n){const t=S({field:n.field,normalizationType:n.normalizationType,normalizationField:n.normalizationField,classificationMethod:n.classificationMethod,standardDeviationInterval:n.standardDeviationInterval,breakCount:n.numClasses||s});return e=function(e,n,t){const i=n??-1/0,l=t??1/0;return e.filter((e=>Number.isFinite(e)&&e>=i&&e<=l))}(e,n.minValue,n.maxValue),(0,l.k)({definition:t,values:e,normalizationTotal:n.normalizationTotal})}function S(e){const{breakCount:n,field:t,normalizationField:l,normalizationType:r}=e,s=e.classificationMethod||a,u="standard-deviation"===s?e.standardDeviationInterval||o:void 0;return new i.Z({breakCount:n,classificationField:t,classificationMethod:s,normalizationField:"field"===r?l:void 0,normalizationType:r,standardDeviationInterval:u})}function D(e,n){let t=e.classBreaks;const i=t.length,l=t[0]?.minValue,r=t[i-1]?.maxValue,a="standard-deviation"===n,o=c;return t=t.map((e=>{const n=e.label,t={minValue:e.minValue,maxValue:e.maxValue,label:n};if(a&&n){const e=n.match(o),i=e?.map((e=>+e.trim()))??[];2===i.length?(t.minStdDev=i[0],t.maxStdDev=i[1],i[0]<0&&i[1]>0&&(t.hasAvg=!0)):1===i.length&&(n.includes("<")?(t.minStdDev=null,t.maxStdDev=i[0]):n.includes(">")&&(t.minStdDev=i[0],t.maxStdDev=null))}return t})),{minValue:l,maxValue:r,classBreakInfos:t,normalizationTotal:e.normalizationTotal}}function M(e,n){const t=C(e,n);if(null==t.min&&null==t.max)return{bins:[],minValue:t.min,maxValue:t.max,normalizationTotal:n.normalizationTotal};const i=t.intervals,l=t.min??0,r=t.max??0,a=i.map(((e,n)=>({minValue:i[n][0],maxValue:i[n][1],count:0})));for(const n of e)if(null!=n&&n>=l&&n<=r){const e=$(i,n);e>-1&&a[e].count++}return{bins:a,minValue:l,maxValue:r,normalizationTotal:n.normalizationTotal}}function C(e,n){const{field:t,classificationMethod:i,standardDeviationInterval:l,normalizationType:r,normalizationField:a,normalizationTotal:o,minValue:s,maxValue:c}=n,f=n.numBins||u;let d=null,m=null,y=null;if(i&&"equal-interval"!==i||r){const{classBreaks:n}=N(e,{field:t,normalizationType:r,normalizationField:a,normalizationTotal:o,classificationMethod:i,standardDeviationInterval:l,minValue:s,maxValue:c,numClasses:f});d=n[0].minValue,m=n[n.length-1].maxValue,y=n.map((e=>[e.minValue,e.maxValue]))}else{if(null!=s&&null!=c)d=s,m=c;else{const n=h({values:e,minValue:s,maxValue:c,useSampleStdDev:!r,supportsNullCount:p({normalizationType:r,normalizationField:a,minValue:s,maxValue:c})});d=n.min??null,m=n.max??null}y=function(e,n,t){const i=(n-e)/t,l=[];let r,a=e;for(let e=1;e<=t;e++)r=a+i,r=Number(r.toFixed(16)),l.push([a,e===t?n:r]),a=r;return l}(d??0,m??0,f)}return{min:d,max:m,intervals:y}}function $(e,n){let t=-1;for(let i=e.length-1;i>=0;i--)if(n>=e[i][0]){t=i;break}return t}},59266:(e,n,t)=>{t.d(n,{LC:()=>s,WW:()=>u,Yi:()=>c,mz:()=>d,pp:()=>f}),t(66577);var i=t(20102),l=t(92604),r=t(82971);const a=l.Z.getLogger("esri.support.arcadeOnDemand");let o;function s(){return o||(o=(async()=>{const e=await Promise.all([t.e(7126),t.e(2437),t.e(9469),t.e(1423),t.e(7047),t.e(5049),t.e(8732),t.e(3729),t.e(3874),t.e(8275),t.e(3698),t.e(942)]).then(t.bind(t,20837));return{arcade:e.arcade,arcadeUtils:e,Dictionary:e.Dictionary,Feature:e.arcadeFeature}})()),o}const u=(e,n,t)=>d.create(e,n,t,null,["$feature"],[]),c=(e,n,t)=>d.create(e,n,t,null,["$feature","$view"],[]),f=(e,n,t,i)=>d.create(e,n,t,i,["$feature","$view"],[]);class d{constructor(e,n,t,i,l,r,a){this.services=null,this.script=e,this.evaluate=i;const o=Array.isArray(r)?r:r.fields;this.fields=o,this._syntaxTree=t,this._arcade=n,this._arcadeFeature=l,this._spatialReference=a,this._referencesGeometry=n.scriptTouchesGeometry(this._syntaxTree),this._referencesScale=this._arcade.referencesMember(this._syntaxTree,"scale")}static async create(e,n,t,l,o,u){const{arcade:c,Feature:f,Dictionary:m}=await s(),p=r.Z.fromJSON(n);let y;try{y=c.parseScript(e,u)}catch(n){return a.error(new i.Z("arcade-bad-expression","Failed to parse arcade script",{script:e,error:n})),null}const h=o.reduce(((e,n)=>({...e,[n]:null})),{});let g=null;null!=l&&(g=new m(l),g.immutable=!0,h.$config=null);const b=c.scriptUsesGeometryEngine(y),v=b&&c.enableGeometrySupport(),F=c.scriptUsesFeatureSet(y)&&c.enableFeatureSetSupport(),V=c.scriptIsAsync(y),T=V&&c.enableAsyncSupport(),x={vars:h,spatialReference:p,useAsync:!!T};await Promise.all([v,F,T]);const I=new Set;await c.loadDependentModules(I,y,null,V,b);const _=new m;_.immutable=!1,_.setField("scale",0);const w=c.compileScript(y,x);return new d(e,c,y,((e,n)=>("$view"in e&&e.$view&&(_.setField("scale","object"==typeof e.$view&&"scale"in e.$view?e.$view.scale:void 0),e.$view=_),g&&(e.$config=g),w({vars:e,spatialReference:p,services:n}))),new f,t,p)}repurposeFeature(e){return e.geometry&&!e.geometry.spatialReference&&(e.geometry.spatialReference=this._spatialReference),this._arcadeFeature.repurposeFromGraphicLikeObject(e.geometry,e.attributes,{fields:this.fields}),this._arcadeFeature}referencesGeometry(){return this._referencesGeometry}referencesScale(){return this._referencesScale}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8758],{48758:(e,n,t)=>{t.r(n),t.d(n,{registerFunctions:()=>v});var a=t(48853),r=t(28228),i=t(33586),s=t(27535),l=t(15274),o=t(28924),u=t(67651),f=t(12384),c=t(61363),d=t(26520),m=t(70409),y=t(84328),p=t(85065),h=t(63991),g=t(75148),w=t(17805),F=t(3823),I=t(90658),D=t(36515),E=t(24240),x=t(95330),N=t(41534),S=t(19238),b=t(1231),C=t(48522);async function A(e,n,t){const a=e.getVariables();if(a.length>0){const r=[];for(let e=0;e<a.length;e++){const i={name:a[e]};r.push(await n.evaluateIdentifier(t,i))}const i={};for(let e=0;e<a.length;e++)i[a[e]]=r[e];return e.parameters=i,e}return e}function T(e,n,t=null){for(const t in e)if(t.toLowerCase()===n.toLowerCase())return e[t];return t}function P(e){if(null===e)return null;const n={type:T(e,"type",""),name:T(e,"name","")};if("range"===n.type)n.range=T(e,"range",[]);else{n.codedValues=[];for(const t of T(e,"codedValues",[]))n.codedValues.push({name:T(t,"name",""),code:T(t,"code",null)})}return n}function $(e){if(null===e)return null;const n={},t=T(e,"wkt",null);null!==t&&(n.wkt=t);const a=T(e,"wkid",null);return null!==a&&(n.wkid=a),n}function H(e){if(null===e)return null;const n={hasZ:T(e,"hasz",!1),hasM:T(e,"hasm",!1)},t=T(e,"spatialreference",null);t&&(n.spatialReference=$(t));const a=T(e,"x",null);if(null!==a)return n.x=a,n.y=T(e,"y",null),n;const r=T(e,"rings",null);if(null!==r)return n.rings=r,n;const i=T(e,"paths",null);if(null!==i)return n.paths=i,n;const s=T(e,"points",null);if(null!==s)return n.points=s,n;for(const t of["xmin","xmax","ymin","ymax","zmin","zmax","mmin","mmax"]){const a=T(e,t,null);null!==a&&(n[t]=a)}return n}function v(e){"async"===e.mode&&(e.functions.timezone=function(n,t){return e.standardFunctionAsync(n,t,(async(e,r,l)=>{if((0,c.C)(l,1,2,n,t),(0,c.r)(l[0])){if(await l[0].load(),1===l.length||null===l[1])return l[0].dateTimeReferenceFieldIndex.layerDateFieldsTimeZone;if(!(l[1]instanceof i.Z)||!1===l[1].hasField("type"))throw new s.aV(n,s.rH.InvalidParameter,t);const e=l[1].field("type");if(!1===(0,c.c)(e))throw new s.aV(n,s.rH.InvalidParameter,t);switch((0,c.j)(e).toLowerCase()){case"preferredtimezone":return l[0].dateTimeReferenceFieldIndex.layerPreferredTimeZone;case"editfieldsinfo":return l[0].dateTimeReferenceFieldIndex.layerEditFieldsTimeZone;case"timeinfo":return l[0].dateTimeReferenceFieldIndex.layerTimeInfoTimeZone;case"field":if(l[1].hasField("fieldname")&&(0,c.c)(l[1].field("fieldname")))return l[0].dateTimeReferenceFieldIndex.fieldTimeZone((0,c.j)(l[1].field("fieldname")))}throw new s.aV(n,s.rH.InvalidParameter,t)}const o=(0,c.l)(l[0],(0,c.G)(n));if(null===o)return null;const u=o.timeZone;return"system"===u?a.iG.systemTimeZoneCanonicalName:u}))},e.functions.sqltimestamp=function(n,t){return e.standardFunctionAsync(n,t,(async(e,a,r)=>{(0,c.C)(r,1,3,n,t);const i=r[0];if((0,c.k)(i)){if(1===r.length)return i.toSQLString();if(2===r.length)return i.changeTimeZone((0,c.j)(r[1])).toSQLString();throw new s.aV(n,s.rH.InvalidParameter,t)}if((0,c.r)(i)){if(3!==r.length)throw new s.aV(n,s.rH.InvalidParameter,t);await i.load();const e=(0,c.j)(r[1]);if(!1===(0,c.k)(r[2]))throw new s.aV(n,s.rH.InvalidParameter,t);const a=i.fieldTimeZone(e);return null===a?r[2].toSQLString():r[2].changeTimeZone(a).toSQLString()}throw new s.aV(n,s.rH.InvalidParameter,t)}))},e.signatures.push({name:"sqltimestamp",min:2,max:4}),e.functions.featuresetbyid=function(n,t){return e.standardFunctionAsync(n,t,((e,a,r)=>{if((0,c.C)(r,2,4,n,t),r[0]instanceof o.Z){const e=(0,c.j)(r[1]);let a=(0,c.D)(r[2],null);const i=(0,c.h)((0,c.D)(r[3],!0));if(null===a&&(a=["*"]),!1===(0,c.m)(a))throw new s.aV(n,s.rH.InvalidParameter,t);return r[0].featureSetById(e,i,a)}throw new s.aV(n,s.rH.InvalidParameter,t)}))},e.signatures.push({name:"featuresetbyid",min:2,max:4}),e.functions.getfeatureset=function(n,t){return e.standardFunctionAsync(n,t,((e,a,r)=>{if((0,c.C)(r,1,2,n,t),(0,c.p)(r[0])){let e=(0,c.D)(r[1],"datasource");return null===e&&(e="datasource"),e=(0,c.j)(e).toLowerCase(),(0,u.convertToFeatureSet)(r[0].fullSchema(),e,n.lrucache,n.interceptor,n.spatialReference)}throw new s.aV(n,s.rH.InvalidParameter,t)}))},e.signatures.push({name:"getfeatureset",min:1,max:2}),e.functions.featuresetbyportalitem=function(n,t){return e.standardFunctionAsync(n,t,((e,a,i)=>{if((0,c.C)(i,2,5,n,t),null===i[0])throw new s.aV(n,s.rH.PortalRequired,t);if(i[0]instanceof r.Z){const e=(0,c.j)(i[1]),a=(0,c.j)(i[2]);let r=(0,c.D)(i[3],null);const l=(0,c.h)((0,c.D)(i[4],!0));if(null===r&&(r=["*"]),!1===(0,c.m)(r))throw new s.aV(n,s.rH.InvalidParameter,t);let o=null;return o=n.services&&n.services.portal?n.services.portal:C.Z.getDefault(),o=(0,d._)(i[0],o),(0,u.constructFeatureSetFromPortalItem)(e,a,n.spatialReference,r,l,o,n.lrucache,n.interceptor)}if(!1===(0,c.c)(i[0]))throw new s.aV(n,s.rH.PortalRequired,t);const l=(0,c.j)(i[0]),o=(0,c.j)(i[1]);let f=(0,c.D)(i[2],null);const m=(0,c.h)((0,c.D)(i[3],!0));if(null===f&&(f=["*"]),!1===(0,c.m)(f))throw new s.aV(n,s.rH.InvalidParameter,t);return(0,u.constructFeatureSetFromPortalItem)(l,o,n.spatialReference,f,m,n.services?.portal??C.Z.getDefault(),n.lrucache,n.interceptor)}))},e.signatures.push({name:"featuresetbyportalitem",min:2,max:5}),e.functions.featuresetbyname=function(n,t){return e.standardFunctionAsync(n,t,((e,a,r)=>{if((0,c.C)(r,2,4,n,t),r[0]instanceof o.Z){const e=(0,c.j)(r[1]);let a=(0,c.D)(r[2],null);const i=(0,c.h)((0,c.D)(r[3],!0));if(null===a&&(a=["*"]),!1===(0,c.m)(a))throw new s.aV(n,s.rH.InvalidParameter,t);return r[0].featureSetByName(e,i,a)}throw new s.aV(n,s.rH.InvalidParameter,t)}))},e.signatures.push({name:"featuresetbyname",min:2,max:4}),e.functions.featureset=function(n,t){return e.standardFunction(n,t,((e,a,r)=>{(0,c.C)(r,1,1,n,t);let l=r[0];const o={layerDefinition:{geometryType:"",objectIdField:"",hasM:!1,hasZ:!1,globalIdField:"",typeIdField:"",fields:[]},featureSet:{geometryType:"",features:[]}};if((0,c.c)(l))l=JSON.parse(l),void 0!==l.layerDefinition?(o.layerDefinition=l.layerDefinition,o.featureSet=l.featureSet,l.layerDefinition.spatialReference&&(o.layerDefinition.spatialReference=l.layerDefinition.spatialReference)):(o.featureSet.features=l.features,o.featureSet.geometryType=l.geometryType,o.layerDefinition.geometryType=o.featureSet.geometryType,o.layerDefinition.objectIdField=l.objectIdFieldName??"",o.layerDefinition.typeIdField=l.typeIdFieldName,o.layerDefinition.globalIdField=l.globalIdFieldName,o.layerDefinition.fields=l.fields,l.spatialReference&&(o.layerDefinition.spatialReference=l.spatialReference));else{if(!(r[0]instanceof i.Z))throw new s.aV(n,s.rH.InvalidParameter,t);{l=JSON.parse(r[0].castToText(!0));const e=T(l,"layerdefinition");if(null!==e){o.layerDefinition.geometryType=T(e,"geometrytype",""),o.featureSet.geometryType=o.layerDefinition.geometryType,o.layerDefinition.globalIdField=T(e,"globalidfield",""),o.layerDefinition.objectIdField=T(e,"objectidfield",""),o.layerDefinition.typeIdField=T(e,"typeidfield",""),o.layerDefinition.hasZ=!0===T(e,"hasz",!1),o.layerDefinition.hasM=!0===T(e,"hasm",!1);const n=T(e,"spatialreference",null);n&&(o.layerDefinition.spatialReference=$(n));for(const n of T(e,"fields",[])){const e={name:T(n,"name",""),alias:T(n,"alias",""),type:T(n,"type",""),nullable:T(n,"nullable",!0),editable:T(n,"editable",!0),length:T(n,"length",null),domain:P(T(n,"domain"))};o.layerDefinition.fields.push(e)}const t=T(l,"featureset",null);if(t){const e={};for(const n of o.layerDefinition.fields)e[n.name.toLowerCase()]=n.name;for(const n of T(t,"features",[])){const t={},a=T(n,"attributes",{});for(const n in a)t[e[n.toLowerCase()]]=a[n];o.featureSet.features.push({attributes:t,geometry:H(T(n,"geometry",null))})}}}else{o.layerDefinition.hasZ=!0===T(l,"hasz",!1),o.layerDefinition.hasM=!0===T(l,"hasm",!1),o.layerDefinition.geometryType=T(l,"geometrytype",""),o.featureSet.geometryType=o.layerDefinition.geometryType,o.layerDefinition.objectIdField=T(l,"objectidfieldname",""),o.layerDefinition.typeIdField=T(l,"typeidfieldname","");const e=T(l,"spatialreference",null);e&&(o.layerDefinition.spatialReference=$(e));let n=T(l,"fields",null);if((0,c.m)(n))for(const e of n){const n={name:T(e,"name",""),alias:T(e,"alias",""),type:T(e,"type",""),nullable:T(e,"nullable",!0),editable:T(e,"editable",!0),length:T(e,"length",null),domain:P(T(e,"domain"))};o.layerDefinition.fields.push(n)}else n=null,o.layerDefinition.fields=n;const t={};for(const e of o.layerDefinition.fields)t[e.name.toLowerCase()]=e.name;let a=T(l,"features",null);if((0,c.m)(a))for(const e of a){const n={},a=T(e,"attributes",{});for(const e in a)n[t[e.toLowerCase()]]=a[e];o.featureSet.features.push({attributes:n,geometry:H(T(e,"geometry",null))})}else a=null,o.featureSet.features=a}}}if(!1===function(e){return!!e.layerDefinition&&!!e.featureSet&&!1!==function(e,n){for(const n of["",null,"esriGeometryNull","esriGeometryPoint","esriGeometryPolyline","esriGeometryPolygon","esriGeometryMultipoint","esriGeometryEnvelope"])if(n===e)return!0;return!1}(e.layerDefinition.geometryType)&&!1!==(0,c.m)(e.layerDefinition.fields)&&!1!==(0,c.m)(e.featureSet.features)}(o))throw new s.aV(n,s.rH.InvalidParameter,t);return""===(o?.layerDefinition?.geometryType||"")&&(o.layerDefinition.geometryType="esriGeometryNull"),w.Z.create(o,n.spatialReference)}))},e.signatures.push({name:"featureset",min:1,max:1}),e.functions.filter=function(n,t){return e.standardFunctionAsync(n,t,(async(a,r,i)=>{if((0,c.C)(i,2,2,n,t),(0,c.m)(i[0])||(0,c.o)(i[0])){const e=[];let a=i[0];a instanceof f.Z&&(a=a.toArray());let r=null;if(!(0,c.i)(i[1]))throw new s.aV(n,s.rH.InvalidParameter,t);r=i[1].createFunction(n);for(const n of a){const t=r(n);(0,x.y8)(t)?!0===await t&&e.push(n):!0===t&&e.push(n)}return e}if((0,c.r)(i[0])){const t=await i[0].load(),a=N.WhereClause.create(i[1],t.getFieldsIndex()),r=a.getVariables();if(r.length>0){const t=[];for(let a=0;a<r.length;a++){const i={name:r[a]};t.push(await e.evaluateIdentifier(n,i))}const s={};for(let e=0;e<r.length;e++)s[r[e]]=t[e];return a.parameters=s,new y.Z({parentfeatureset:i[0],whereclause:a})}return new y.Z({parentfeatureset:i[0],whereclause:a})}throw new s.aV(n,s.rH.InvalidParameter,t)}))},e.signatures.push({name:"filter",min:2,max:2}),e.functions.orderby=function(n,t){return e.standardFunctionAsync(n,t,(async(e,a,r)=>{if((0,c.C)(r,2,2,n,t),(0,c.r)(r[0])){const e=new F.Z(r[1]);return new p.Z({parentfeatureset:r[0],orderbyclause:e})}throw new s.aV(n,s.rH.InvalidParameter,t)}))},e.signatures.push({name:"orderby",min:2,max:2}),e.functions.top=function(n,t){return e.standardFunctionAsync(n,t,(async(e,a,r)=>{if((0,c.C)(r,2,2,n,t),(0,c.r)(r[0]))return new h.Z({parentfeatureset:r[0],topnum:r[1]});if((0,c.m)(r[0]))return(0,c.g)(r[1])>=r[0].length?r[0].slice(0):r[0].slice(0,(0,c.g)(r[1]));if((0,c.o)(r[0]))return(0,c.g)(r[1])>=r[0].length()?r[0].slice(0):r[0].slice(0,(0,c.g)(r[1]));throw new s.aV(n,s.rH.InvalidParameter,t)}))},e.signatures.push({name:"top",min:2,max:2}),e.functions.first=function(n,t){return e.standardFunctionAsync(n,t,(async(e,a,r)=>{if((0,c.C)(r,1,1,n,t),(0,c.r)(r[0])){const t=await r[0].first(e.abortSignal);if(null!==t){const e=l.Z.createFromGraphicLikeObject(t.geometry,t.attributes,r[0],n.timeReference);return e._underlyingGraphic=t,e}return t}return(0,c.m)(r[0])?0===r[0].length?null:r[0][0]:(0,c.o)(r[0])?0===r[0].length()?null:r[0].get(0):null}))},e.signatures.push({name:"first",min:1,max:1}),e.functions.attachments=function(n,t){return e.standardFunctionAsync(n,t,(async(e,a,r)=>{(0,c.C)(r,1,2,n,t);const l={minsize:-1,maxsize:-1,types:null,returnMetadata:!1};if(r.length>1)if(r[1]instanceof i.Z){if(r[1].hasField("minsize")&&(l.minsize=(0,c.g)(r[1].field("minsize"))),r[1].hasField("metadata")&&(l.returnMetadata=(0,c.h)(r[1].field("metadata"))),r[1].hasField("maxsize")&&(l.maxsize=(0,c.g)(r[1].field("maxsize"))),r[1].hasField("types")){const e=(0,c._)(r[1].field("types"),!1);e.length>0&&(l.types=e)}}else if(null!==r[1])throw new s.aV(n,s.rH.InvalidParameter,t);if((0,c.p)(r[0])){let e=r[0]._layer;return e instanceof S.default&&(e=(0,u.constructFeatureSet)(e,n.spatialReference,["*"],!0,n.lrucache,n.interceptor)),null===e||!1===(0,c.r)(e)?[]:(await e.load(),e.queryAttachments(r[0].field(e.objectIdField),l.minsize,l.maxsize,l.types,l.returnMetadata))}if(null===r[0])return[];throw new s.aV(n,s.rH.InvalidParameter,t)}))},e.signatures.push({name:"attachments",min:1,max:2}),e.functions.featuresetbyrelationshipname=function(n,t){return e.standardFunctionAsync(n,t,(async(e,a,r)=>{(0,c.C)(r,2,4,n,t);const i=r[0],l=(0,c.j)(r[1]);let o=(0,c.D)(r[2],null);const f=(0,c.h)((0,c.D)(r[3],!0));if(null===o&&(o=["*"]),!1===(0,c.m)(o))throw new s.aV(n,s.rH.InvalidParameter,t);if(null===r[0])return null;if(!(0,c.p)(r[0]))throw new s.aV(n,s.rH.InvalidParameter,t);let d=i._layer;if(d instanceof S.default&&(d=(0,u.constructFeatureSet)(d,n.spatialReference,["*"],!0,n.lrucache,n.interceptor)),null===d)return null;if(!1===(0,c.r)(d))return null;d=await d.load();const m=d.relationshipMetaData().filter((e=>e.name===l));if(0===m.length)return null;if(void 0!==m[0].relationshipTableId&&null!==m[0].relationshipTableId&&m[0].relationshipTableId>-1)return(0,u.constructFeatureSetFromRelationship)(d,m[0],i.field(d.objectIdField),d.spatialReference,o,f,n.lrucache,n.interceptor);let y=d.serviceUrl();if(!y)return null;y="/"===y.charAt(y.length-1)?y+m[0].relatedTableId.toString():y+"/"+m[0].relatedTableId.toString();const p=await(0,u.constructFeatureSetFromUrl)(y,d.spatialReference,o,f,n.lrucache,n.interceptor);await p.load();let h=p.relationshipMetaData();if(h=h.filter((e=>e.id===m[0].id)),!1===i.hasField(m[0].keyField)||null===i.field(m[0].keyField)){const e=await d.getFeatureByObjectId(i.field(d.objectIdField),[m[0].keyField]);if(e){const n=N.WhereClause.create(h[0].keyField+"= @id",p.getFieldsIndex());return n.parameters={id:e.attributes[m[0].keyField]},p.filter(n)}return new g.Z({parentfeatureset:p})}const w=N.WhereClause.create(h[0].keyField+"= @id",p.getFieldsIndex());return w.parameters={id:i.field(m[0].keyField)},p.filter(w)}))},e.signatures.push({name:"featuresetbyrelationshipname",min:2,max:4}),e.functions.featuresetbyassociation=function(n,t){return e.standardFunctionAsync(n,t,(async(e,a,r)=>{(0,c.C)(r,2,3,n,t);const i=r[0],l=(0,c.j)((0,c.D)(r[1],"")).toLowerCase(),o=(0,c.c)(r[2])?(0,c.j)(r[2]):null;if(null===r[0])return null;if(!(0,c.p)(r[0]))throw new s.aV(n,s.rH.InvalidParameter,t);let f=i._layer;if(f instanceof S.default&&(f=(0,u.constructFeatureSet)(f,n.spatialReference,["*"],!0,n.lrucache,n.interceptor)),null===f)return null;if(!1===(0,c.r)(f))return null;await f.load();const d=f.serviceUrl(),y=await(0,u.constructAssociationMetaDataFeatureSetFromUrl)(d,n.spatialReference);let p=null,h=null,g=!1;if(null!==o&&""!==o&&void 0!==o){for(const e of y.terminals)e.terminalName===o&&(h=e.terminalId);null===h&&(g=!0)}const w=y.associations.getFieldsIndex(),F=w.get("TOGLOBALID").name,D=w.get("FROMGLOBALID").name,E=w.get("TOTERMINALID").name,x=w.get("FROMTERMINALID").name,C=w.get("FROMNETWORKSOURCEID").name,A=w.get("TONETWORKSOURCEID").name,T=w.get("ASSOCIATIONTYPE").name,P=w.get("ISCONTENTVISIBLE").name,$=w.get("OBJECTID").name;for(const e of f.fields)if("global-id"===e.type){p=i.field(e.name);break}let H=null,v=new m.yN(new b.Z({name:"percentalong",alias:"percentalong",type:"double"}),N.WhereClause.create("0",y.associations.getFieldsIndex())),L=new m.yN(new b.Z({name:"side",alias:"side",type:"string"}),N.WhereClause.create("''",y.associations.getFieldsIndex()));const V="globalid",R="globalId",Z={};for(const e in y.lkp)Z[e]=y.lkp[e].sourceId;const j=new m.TO(new b.Z({name:"classname",alias:"classname",type:"string"}),null,Z);let W="";switch(l){case"midspan":{W=`((${F}='${p}') OR ( ${D}='${p}')) AND (${T} IN (5))`,j.codefield=N.WhereClause.create(`CASE WHEN (${F}='${p}') THEN ${C} ELSE ${A} END`,y.associations.getFieldsIndex());const e=(0,I.JW)(m.Xx.findField(y.associations.fields,D));e.name=V,e.alias=V,H=new m.yN(e,N.WhereClause.create(`CASE WHEN (${D}='${p}') THEN ${F} ELSE ${D} END`,y.associations.getFieldsIndex())),v=y.unVersion>=4?new m.$X(m.Xx.findField(y.associations.fields,w.get("PERCENTALONG").name)):new m.yN(new b.Z({name:"percentalong",alias:"percentalong",type:"double"}),N.WhereClause.create("0",y.associations.getFieldsIndex()));break}case"junctionedge":{W=`((${F}='${p}') OR ( ${D}='${p}')) AND (${T} IN (4,6))`,j.codefield=N.WhereClause.create(`CASE WHEN (${F}='${p}') THEN ${C} ELSE ${A} END`,y.associations.getFieldsIndex());const e=(0,I.JW)(m.Xx.findField(y.associations.fields,D));e.name=V,e.alias=V,H=new m.yN(e,N.WhereClause.create(`CASE WHEN (${D}='${p}') THEN ${F} ELSE ${D} END`,y.associations.getFieldsIndex())),L=new m.yN(new b.Z({name:"side",alias:"side",type:"string"}),N.WhereClause.create(`CASE WHEN (${T}=4) THEN 'from' ELSE 'to' END`,y.associations.getFieldsIndex()));break}case"connected":{let e=`${F}='@T'`,n=`${D}='@T'`;null!==h&&(e+=` AND ${E}=@A`,n+=` AND ${x}=@A`),W="(("+e+") OR ("+n+"))",W=(0,c.P)(W,"@T",p??""),e=(0,c.P)(e,"@T",p??""),null!==h&&(e=(0,c.P)(e,"@A",h.toString()),W=(0,c.P)(W,"@A",h.toString())),j.codefield=N.WhereClause.create("CASE WHEN "+e+` THEN ${C} ELSE ${A} END`,y.associations.getFieldsIndex());const t=(0,I.JW)(m.Xx.findField(y.associations.fields,D));t.name=V,t.alias=V,H=new m.yN(t,N.WhereClause.create("CASE WHEN "+e+` THEN ${D} ELSE ${F} END`,y.associations.getFieldsIndex()));break}case"container":W=`${F}='${p}' AND ${T} = 2`,null!==h&&(W+=` AND ${E} = `+h.toString()),j.codefield=C,W="( "+W+" )",H=new m.QP(m.Xx.findField(y.associations.fields,D),V,V);break;case"content":W=`(${D}='${p}' AND ${T} = 2)`,null!==h&&(W+=` AND ${x} = `+h.toString()),j.codefield=A,W="( "+W+" )",H=new m.QP(m.Xx.findField(y.associations.fields,F),V,V);break;case"structure":W=`(${F}='${p}' AND ${T} = 3)`,null!==h&&(W+=` AND ${E} = `+h.toString()),j.codefield=C,W="( "+W+" )",H=new m.QP(m.Xx.findField(y.associations.fields,D),V,R);break;case"attached":W=`(${D}='${p}' AND ${T} = 3)`,null!==h&&(W+=` AND ${x} = `+h.toString()),j.codefield=A,W="( "+W+" )",H=new m.QP(m.Xx.findField(y.associations.fields,F),V,R);break;default:throw new s.aV(n,s.rH.InvalidParameter,t)}return g&&(W="1 <> 1"),new m.Xx({parentfeatureset:y.associations,adaptedFields:[new m.$X(m.Xx.findField(y.associations.fields,$)),new m.$X(m.Xx.findField(y.associations.fields,P)),H,L,j,v],extraFilter:W?N.WhereClause.create(W,y.associations.getFieldsIndex()):null})}))},e.signatures.push({name:"featuresetbyassociation",min:2,max:6}),e.functions.groupby=function(n,t){return e.standardFunctionAsync(n,t,(async(a,r,l)=>{if((0,c.C)(l,3,3,n,t),!(0,c.r)(l[0]))throw new s.aV(n,s.rH.InvalidParameter,t);const o=await l[0].load(),u=[],f=[];let d=!1,m=[];if((0,c.c)(l[1]))m.push(l[1]);else if(l[1]instanceof i.Z)m.push(l[1]);else if((0,c.m)(l[1]))m=l[1];else{if(!(0,c.o)(l[1]))throw new s.aV(n,s.rH.InvalidParameter,t);m=l[1].toArray()}for(const e of m)if((0,c.c)(e)){const n=N.WhereClause.create((0,c.j)(e),o.getFieldsIndex()),t=!0===(0,D.y5)(n)?(0,c.j)(e):"%%%%FIELDNAME";u.push({name:t,expression:n}),"%%%%FIELDNAME"===t&&(d=!0)}else{if(!(e instanceof i.Z))throw new s.aV(n,s.rH.InvalidParameter,t);{const a=e.hasField("name")?e.field("name"):"%%%%FIELDNAME",r=e.hasField("expression")?e.field("expression"):"";if("%%%%FIELDNAME"===a&&(d=!0),!a)throw new s.aV(n,s.rH.InvalidParameter,t);u.push({name:a,expression:N.WhereClause.create(r||a,o.getFieldsIndex())})}}if(m=[],(0,c.c)(l[2]))m.push(l[2]);else if((0,c.m)(l[2]))m=l[2];else if((0,c.o)(l[2]))m=l[2].toArray();else{if(!(l[2]instanceof i.Z))throw new s.aV(n,s.rH.InvalidParameter,t);m.push(l[2])}for(const e of m){if(!(e instanceof i.Z))throw new s.aV(n,s.rH.InvalidParameter,t);{const a=e.hasField("name")?e.field("name"):"",r=e.hasField("statistic")?e.field("statistic"):"",i=e.hasField("expression")?e.field("expression"):"";if(!a||!r||!i)throw new s.aV(n,s.rH.InvalidParameter,t);f.push({name:a,statistic:r.toLowerCase(),expression:N.WhereClause.create(i,o.getFieldsIndex())})}}if(d){const e={};for(const n of o.fields)e[n.name.toLowerCase()]=1;for(const n of u)"%%%%FIELDNAME"!==n.name&&(e[n.name.toLowerCase()]=1);for(const n of f)"%%%%FIELDNAME"!==n.name&&(e[n.name.toLowerCase()]=1);let n=0;for(const t of u)if("%%%%FIELDNAME"===t.name){for(;1===e["field_"+n.toString()];)n++;e["field_"+n.toString()]=1,t.name="FIELD_"+n.toString()}}for(const t of u)await A(t.expression,e,n);for(const t of f)await A(t.expression,e,n);return l[0].groupby(u,f)}))},e.signatures.push({name:"groupby",min:3,max:3}),e.functions.distinct=function(n,t){return e.standardFunctionAsync(n,t,(async(a,r,l)=>{if((0,c.r)(l[0])){(0,c.C)(l,2,2,n,t);const a=await l[0].load(),r=[];let o=[];if((0,c.c)(l[1]))o.push(l[1]);else if(l[1]instanceof i.Z)o.push(l[1]);else if((0,c.m)(l[1]))o=l[1];else{if(!(0,c.o)(l[1]))throw new s.aV(n,s.rH.InvalidParameter,t);o=l[1].toArray()}let u=!1;for(const e of o)if((0,c.c)(e)){const n=N.WhereClause.create((0,c.j)(e),a.getFieldsIndex()),t=!0===(0,D.y5)(n)?(0,c.j)(e):"%%%%FIELDNAME";r.push({name:t,expression:n}),"%%%%FIELDNAME"===t&&(u=!0)}else{if(!(e instanceof i.Z))throw new s.aV(n,s.rH.InvalidParameter,t);{const i=e.hasField("name")?e.field("name"):"%%%%FIELDNAME",l=e.hasField("expression")?e.field("expression"):"";if("%%%%FIELDNAME"===i&&(u=!0),!i)throw new s.aV(n,s.rH.InvalidParameter,t);r.push({name:i,expression:N.WhereClause.create(l||i,a.getFieldsIndex())})}}if(u){const e={};for(const n of a.fields)e[n.name.toLowerCase()]=1;for(const n of r)"%%%%FIELDNAME"!==n.name&&(e[n.name.toLowerCase()]=1);let n=0;for(const t of r)if("%%%%FIELDNAME"===t.name){for(;1===e["field_"+n.toString()];)n++;e["field_"+n.toString()]=1,t.name="FIELD_"+n.toString()}}for(const t of r)await A(t.expression,e,n);return l[0].groupby(r,[])}return function(e,n,t,a){if(1===a.length){if((0,c.m)(a[0]))return(0,E.t)(e,a[0],-1);if((0,c.o)(a[0]))return(0,E.t)(e,a[0].toArray(),-1)}return(0,E.t)(e,a,-1)}("distinct",0,0,l)}))})}},26520:(e,n,t)=>{t.d(n,{_:()=>s,q:()=>l});var a=t(40330),r=t(3172),i=t(48522);function s(e,n){return null===e?n:new i.Z({url:e.field("url")})}async function l(e,n,t){const i=a.id?.findCredential(e.restUrl);if(!i)return null;if("loaded"===e.loadStatus&&""===n&&e.user&&e.user.sourceJSON&&!1===t)return e.user.sourceJSON;if(""===n){const n=await(0,r.default)(e.restUrl+"/community/self",{responseType:"json",query:{f:"json",...!1===t?{}:{returnUserLicenseTypeExtensions:!0}}});if(n.data){const e=n.data;if(e&&e.username)return e}return null}const s=await(0,r.default)(e.restUrl+"/community/users/"+n,{responseType:"json",query:{f:"json"}});if(s.data){const e=s.data;return e.error?null:e}return null}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2437],{51773:(t,e,o)=>{o.d(e,{Z:()=>tt});var i=o(43697),r=o(2368),n=o(46791),s=o(96674),a=o(22974),l=o(92604),p=o(95330),d=o(5600),u=o(90578),c=o(71715),h=o(52011),y=o(30556),m=o(75215),f=o(35671),v=o(84649),w=o(63801),g=o(48074),b=o(38745),_=o(9190),x=o(10214),I=o(71423),C=o(44951);const j={base:null,key:"type",typeMap:{attachment:v.Z,media:x.Z,text:C.Z,expression:b.Z,field:_.Z,relationship:I.Z}};var F,Z=o(11223),N=o(422);o(67676),o(80442);let S=F=class extends s.wq{constructor(t){super(t),this.returnTopmostRaster=null,this.showNoDataRecords=null}clone(){return new F({showNoDataRecords:this.showNoDataRecords,returnTopmostRaster:this.returnTopmostRaster})}};(0,i._)([(0,d.Cb)({type:Boolean,json:{write:!0}})],S.prototype,"returnTopmostRaster",void 0),(0,i._)([(0,d.Cb)({type:Boolean,json:{write:!0}})],S.prototype,"showNoDataRecords",void 0),S=F=(0,i._)([(0,h.j)("esri.popup.LayerOptions")],S);const T=S;var E,O=o(44729);let R=E=class extends s.wq{constructor(t){super(t),this.showRelatedRecords=null,this.orderByFields=null}clone(){return new E({showRelatedRecords:this.showRelatedRecords,orderByFields:this.orderByFields?(0,a.d9)(this.orderByFields):null})}};(0,i._)([(0,d.Cb)({type:Boolean,json:{write:!0}})],R.prototype,"showRelatedRecords",void 0),(0,i._)([(0,d.Cb)({type:[O.Z],json:{write:!0}})],R.prototype,"orderByFields",void 0),R=E=(0,i._)([(0,h.j)("esri.popup.RelatedRecordsInfo")],R);const D=R;var A,M=o(79742),L=o(92036),B=o(10699);let J=A=class extends((0,B.IG)(L.Z)){constructor(t){super(t),this.active=!1,this.className=null,this.disabled=!1,this.icon=null,this.id=null,this.indicator=!1,this.title=null,this.type=null,this.visible=!0}clone(){return new A({active:this.active,className:this.className,disabled:this.disabled,icon:this.icon,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible})}};(0,i._)([(0,d.Cb)()],J.prototype,"active",void 0),(0,i._)([(0,d.Cb)()],J.prototype,"className",void 0),(0,i._)([(0,d.Cb)()],J.prototype,"disabled",void 0),(0,i._)([(0,d.Cb)()],J.prototype,"icon",void 0),(0,i._)([(0,d.Cb)()],J.prototype,"id",void 0),(0,i._)([(0,d.Cb)()],J.prototype,"indicator",void 0),(0,i._)([(0,d.Cb)()],J.prototype,"title",void 0),(0,i._)([(0,d.Cb)()],J.prototype,"type",void 0),(0,i._)([(0,d.Cb)()],J.prototype,"visible",void 0),J=A=(0,i._)([(0,h.j)("esri.support.actions.ActionBase")],J);const k=J;var q;let z=q=class extends k{constructor(t){super(t),this.image=null,this.type="button"}clone(){return new q({active:this.active,className:this.className,disabled:this.disabled,icon:this.icon,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible,image:this.image})}};(0,i._)([(0,d.Cb)()],z.prototype,"image",void 0),z=q=(0,i._)([(0,h.j)("esri.support.Action.ActionButton")],z);const P=z;var V;let Y=V=class extends k{constructor(t){super(t),this.image=null,this.type="toggle",this.value=!1}clone(){return new V({active:this.active,className:this.className,disabled:this.disabled,icon:this.icon,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible,image:this.image,value:this.value})}};(0,i._)([(0,d.Cb)()],Y.prototype,"image",void 0),(0,i._)([(0,d.Cb)()],Y.prototype,"value",void 0),Y=V=(0,i._)([(0,h.j)("esri.support.Action.ActionToggle")],Y);const U=Y,$=l.Z.getLogger("esri.PopupTemplate"),W="relationships/",G="expression/",K=n.Z.ofType({key:"type",defaultKeyValue:"button",base:k,typeMap:{button:P,toggle:U}}),X={base:w.Z,key:"type",typeMap:{media:x.Z,custom:g.Z,text:C.Z,attachments:v.Z,fields:_.Z,expression:b.Z,relationship:I.Z}},H=["attachments","fields","media","text","expression","relationship"];let Q=class extends((0,r.J)(s.wq)){constructor(){super(...arguments),this.actions=null,this.content="",this.expressionInfos=null,this.fieldInfos=null,this.layerOptions=null,this.lastEditInfoEnabled=!0,this.outFields=null,this.overwriteActions=!1,this.returnGeometry=!1,this.title=""}castContent(t){return Array.isArray(t)?t.map((t=>(0,m.N7)(X,t))):"string"==typeof t||"function"==typeof t||t instanceof HTMLElement||(0,p.y8)(t)?t:($.error("content error","unsupported content value",{value:t}),null)}readContent(t,e){const{popupElements:o}=e;return Array.isArray(o)&&o.length>0?this._readPopupInfoElements(e.description,e.mediaInfos,o):this._readPopupInfo(e)}writeContent(t,e,o,i){"string"!=typeof t?Array.isArray(t)&&(e.popupElements=t.filter((t=>H.includes(t.type))).map((t=>t&&t.toJSON(i))),e.popupElements.forEach((t=>{"attachments"===t.type?this._writeAttachmentContent(e):"media"===t.type?this._writeMediaContent(t,e):"text"===t.type?this._writeTextContent(t,e):"relationship"===t.type&&this._writeRelationshipContent(t,e)}))):e.description=t}writeFieldInfos(t,e,o,i){const{content:r}=this,n=Array.isArray(r)?r:null;if(t){const o=n?n.filter((t=>"fields"===t.type)):[],r=o.length&&o.every((t=>t.fieldInfos?.length));e.fieldInfos=t.filter(Boolean).map((t=>{const e=t.toJSON(i);return r&&(e.visible=!1),e}))}if(n)for(const t of n)"fields"===t.type&&this._writeFieldsContent(t,e)}writeLayerOptions(t,e,o,i){e[o]=!t||null===t.showNoDataRecords&&null===t.returnTopmostRaster?null:t.toJSON(i)}writeTitle(t,e){e.title=t||""}async collectRequiredFields(t,e){const o=this.expressionInfos||[];await this._collectExpressionInfoFields(t,e,[...o,...this._getContentExpressionInfos(this.content,o)]),(0,f.gd)(t,e,[...this.outFields||[],...this._getActionsFields(this.actions),...this._getTitleFields(this.title),...this._getContentFields(this.content)])}async getRequiredFields(t){const e=new Set;return await this.collectRequiredFields(e,t),[...e].sort()}_writeFieldsContent(t,e){if(!Array.isArray(t.fieldInfos)||!t.fieldInfos.length)return;const o=(0,a.d9)(t.fieldInfos);Array.isArray(e.fieldInfos)?o.forEach((t=>{const o=e.fieldInfos.find((e=>e.fieldName.toLowerCase()===t.fieldName.toLowerCase()));o?o.visible=!0:e.fieldInfos.push(t)})):e.fieldInfos=o}_writeAttachmentContent(t){t.showAttachments||(t.showAttachments=!0)}_writeRelationshipContent(t,e){const o=t.orderByFields?.map((e=>this._toFieldOrderJSON(e,t.relationshipId)))||[],i=[...e.relatedRecordsInfo?.orderByFields||[],...o];e.relatedRecordsInfo={showRelatedRecords:!0,...i?.length&&{orderByFields:i}}}_writeTextContent(t,e){!e.description&&t.text&&(e.description=t.text)}_writeMediaContent(t,e){if(!Array.isArray(t.mediaInfos)||!t.mediaInfos.length)return;const o=(0,a.d9)(t.mediaInfos);Array.isArray(e.mediaInfos)?e.mediaInfos=[...e.mediaInfos,...o]:e.mediaInfos=o}_readPopupInfoElements(t,e,o){const i={description:!1,mediaInfos:!1};return o.map((o=>"media"===o.type?(o.mediaInfos||!e||i.mediaInfos||(o.mediaInfos=e,i.mediaInfos=!0),x.Z.fromJSON(o)):"text"===o.type?(o.text||!t||i.description||(o.text=t,i.description=!0),C.Z.fromJSON(o)):"attachments"===o.type?v.Z.fromJSON(o):"fields"===o.type?_.Z.fromJSON(o):"expression"===o.type?b.Z.fromJSON(o):"relationship"===o.type?I.Z.fromJSON(o):void 0)).filter(Boolean)}_toRelationshipContent(t){const{field:e,order:o}=t;if(!e?.startsWith(W))return null;const i=e.replace(W,"").split("/");if(2!==i.length)return null;const r=parseInt(i[0],10),n=i[1];return"number"==typeof r&&n?I.Z.fromJSON({relationshipId:r,orderByFields:[{field:n,order:o}]}):null}_toFieldOrderJSON(t,e){const{order:o,field:i}=t;return{field:`${W}${e}/${i}`,order:o}}_readPopupInfo({description:t,mediaInfos:e,showAttachments:o,relatedRecordsInfo:i={showRelatedRecords:!1}}){const r=[];t?r.push(new C.Z({text:t})):r.push(new _.Z),Array.isArray(e)&&e.length&&r.push(x.Z.fromJSON({mediaInfos:e})),o&&r.push(v.Z.fromJSON({displayType:"auto"}));const{showRelatedRecords:n,orderByFields:s}=i;return n&&s?.length&&s.forEach((t=>{const e=this._toRelationshipContent(t);e&&r.push(e)})),r.length?r:t}_getContentElementFields(t){const e=t?.type;if("attachments"===e)return[...this._extractFieldNames(t.title),...this._extractFieldNames(t.description)];if("custom"===e)return t.outFields||[];if("fields"===e)return[...this._extractFieldNames(t.title),...this._extractFieldNames(t.description),...this._getFieldInfoFields(t.fieldInfos??this.fieldInfos)];if("media"===e){const e=t.mediaInfos||[];return[...this._extractFieldNames(t.title),...this._extractFieldNames(t.description),...e.reduce(((t,e)=>[...t,...this._getMediaInfoFields(e)]),[])]}return"text"===e?this._extractFieldNames(t.text):[]}_getMediaInfoFields(t){const{caption:e,title:o,value:i}=t,r=i||{},{fields:n,normalizeField:s,tooltipField:a,sourceURL:l,linkURL:p}=r,d=[...this._extractFieldNames(o),...this._extractFieldNames(e),...this._extractFieldNames(l),...this._extractFieldNames(p),...n??[]];return s&&d.push(s),a&&d.push(a),d}_getContentExpressionInfos(t,e){return Array.isArray(t)?t.reduce(((t,e)=>[...t,..."expression"===e.type&&e.expressionInfo?[e.expressionInfo]:[]]),e):[]}_getContentFields(t){return"string"==typeof t?this._extractFieldNames(t):Array.isArray(t)?t.reduce(((t,e)=>[...t,...this._getContentElementFields(e)]),[]):[]}async _collectExpressionInfoFields(t,e,o){o&&await Promise.all(o.map((o=>(0,f.io)(t,e,o.expression))))}_getFieldInfoFields(t){return t?t.filter((t=>void 0===t.visible||!!t.visible)).map((t=>t.fieldName)).filter((t=>!t.startsWith(W)&&!t.startsWith(G))):[]}_getActionsFields(t){return t?t.toArray().reduce(((t,e)=>[...t,...this._getActionFields(e)]),[]):[]}_getActionFields(t){const{className:e,title:o,type:i}=t,r="button"===i||"toggle"===i?t.image:"";return[...this._extractFieldNames(o),...this._extractFieldNames(e),...this._extractFieldNames(r)]}_getTitleFields(t){return"string"==typeof t?this._extractFieldNames(t):[]}_extractFieldNames(t){if(!t||"string"!=typeof t)return[];const e=t.match(/{[^}]*}/g);if(!e)return[];const o=/\{(\w+):.+\}/,i=e.filter((t=>!(0===t.indexOf(`{${W}`)||0===t.indexOf(`{${G}`)))).map((t=>t.replace(o,"{$1}")));return i?i.map((t=>t.slice(1,-1))):[]}};(0,i._)([(0,d.Cb)({type:K})],Q.prototype,"actions",void 0),(0,i._)([(0,d.Cb)()],Q.prototype,"content",void 0),(0,i._)([(0,u.p)("content")],Q.prototype,"castContent",null),(0,i._)([(0,c.r)("content",["description","fieldInfos","popupElements","mediaInfos","showAttachments","relatedRecordsInfo"])],Q.prototype,"readContent",null),(0,i._)([(0,y.c)("content",{popupElements:{type:n.Z.ofType(j)},showAttachments:{type:Boolean},mediaInfos:{type:n.Z.ofType(M.V)},description:{type:String},relatedRecordsInfo:{type:D}})],Q.prototype,"writeContent",null),(0,i._)([(0,d.Cb)({type:[Z.Z],json:{write:!0}})],Q.prototype,"expressionInfos",void 0),(0,i._)([(0,d.Cb)({type:[N.Z]})],Q.prototype,"fieldInfos",void 0),(0,i._)([(0,y.c)("fieldInfos")],Q.prototype,"writeFieldInfos",null),(0,i._)([(0,d.Cb)({type:T})],Q.prototype,"layerOptions",void 0),(0,i._)([(0,y.c)("layerOptions")],Q.prototype,"writeLayerOptions",null),(0,i._)([(0,d.Cb)({type:Boolean,json:{read:{source:"showLastEditInfo"},write:{target:"showLastEditInfo"},default:!0}})],Q.prototype,"lastEditInfoEnabled",void 0),(0,i._)([(0,d.Cb)()],Q.prototype,"outFields",void 0),(0,i._)([(0,d.Cb)()],Q.prototype,"overwriteActions",void 0),(0,i._)([(0,d.Cb)()],Q.prototype,"returnGeometry",void 0),(0,i._)([(0,d.Cb)({json:{type:String}})],Q.prototype,"title",void 0),(0,i._)([(0,y.c)("title")],Q.prototype,"writeTitle",null),Q=(0,i._)([(0,h.j)("esri.PopupTemplate")],Q);const tt=Q},90344:(t,e,o)=>{o.d(e,{LJ:()=>C,Xr:()=>v,Ze:()=>_,cZ:()=>p,i$:()=>j,o5:()=>l,o8:()=>I,p6:()=>x});var i=o(35454),r=o(70171),n=o(17126);const s={year:void 0,month:void 0,day:void 0,weekday:void 0},a={hour:void 0,minute:void 0,second:void 0},l={timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone},p={timeZone:"Etc/UTC"},d={year:"numeric",month:"numeric",day:"numeric"},u={year:"numeric",month:"long",day:"numeric"},c={year:"numeric",month:"short",day:"numeric"},h={year:"numeric",month:"long",weekday:"long",day:"numeric"},y={hour:"numeric",minute:"numeric"},m={...y,second:"numeric"},f={"short-date":d,"short-date-short-time":{...d,...y},"short-date-short-time-24":{...d,...y,hour12:!1},"short-date-long-time":{...d,...m},"short-date-long-time-24":{...d,...m,hour12:!1},"short-date-le":d,"short-date-le-short-time":{...d,...y},"short-date-le-short-time-24":{...d,...y,hour12:!1},"short-date-le-long-time":{...d,...m},"short-date-le-long-time-24":{...d,...m,hour12:!1},"long-month-day-year":u,"long-month-day-year-short-time":{...u,...y},"long-month-day-year-short-time-24":{...u,...y,hour12:!1},"long-month-day-year-long-time":{...u,...m},"long-month-day-year-long-time-24":{...u,...m,hour12:!1},"day-short-month-year":c,"day-short-month-year-short-time":{...c,...y},"day-short-month-year-short-time-24":{...c,...y,hour12:!1},"day-short-month-year-long-time":{...c,...m},"day-short-month-year-long-time-24":{...c,...m,hour12:!1},"long-date":h,"long-date-short-time":{...h,...y},"long-date-short-time-24":{...h,...y,hour12:!1},"long-date-long-time":{...h,...m},"long-date-long-time-24":{...h,...m,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":y,"long-time":m},v=(0,i.w)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),w={ar:"ar-u-nu-latn-ca-gregory"};let g=new WeakMap,b=f["short-date-short-time"];function _(t){return f[t]}function x(t,e){return function(t){const e=t||b;let o=g.get(e);if(!o){const t=(0,r.Kd)(),i=w[t]||t;o=new Intl.DateTimeFormat(i,e),g.set(e,o)}return o}(e).format(t)}function I(t,e=f["short-date"]){return x(new Date(t),{...e,...p,...a})}function C(t,e=f["short-time"]){return x(new Date(`1970-01-01T${t}Z`),{...e,...p,...s})}function j(t,e=f["short-date-short-time"]){const o=n.ou.fromISO(t,{setZone:!0}),i=(0,r.Kd)(),s=w[i]??i;return o.toLocaleString(e,{locale:s})}(0,r.Ze)((()=>{g=new WeakMap,b=f["short-date-short-time"]}))},18848:(t,e,o)=>{o.d(e,{sh:()=>l,uf:()=>p});var i=o(70586),r=o(70171);const n={ar:"ar-u-nu-latn"};let s=new WeakMap,a={};function l(t={}){const e={};return null!=t.digitSeparator&&(e.useGrouping=t.digitSeparator),null!=t.places&&(e.minimumFractionDigits=e.maximumFractionDigits=t.places),e}function p(t,e){return Object.is(t,-0)&&(t=0),function(t){const e=t||a;if(!s.has(e)){const o=(0,r.Kd)(),i=n[(0,r.Kd)()]||o;s.set(e,new Intl.NumberFormat(i,t))}return(0,i.j0)(s.get(e))}(e).format(t)}(0,r.Ze)((()=>{s=new WeakMap,a={}}))},21506:(t,e,o)=>{o.d(e,{qG:()=>b,PV:()=>m,id:()=>x,iR:()=>c,rn:()=>y,rT:()=>j,u1:()=>C,rO:()=>I,Oh:()=>w,bT:()=>g,C_:()=>u,Lx:()=>f,vg:()=>_,YI:()=>d,HQ:()=>h});var i=o(92835),r=o(6570),n=o(82971),s=o(25929),a=(o(67676),o(95330),o(35463)),l=o(86787),p=o(65242);const d={type:Boolean,value:!0,json:{origins:{service:{read:!1,write:!1},"web-map":{read:!1,write:!1}},name:"screenSizePerspective",write:!0}},u={type:Boolean,value:!0,json:{name:"disablePopup",read:{reader:(t,e)=>!e.disablePopup},write:{enabled:!0,writer(t,e,o){e[o]=!t}}}},c={type:Boolean,value:!0,nonNullable:!0,json:{name:"showLabels",write:!0}},h={type:String,json:{origins:{"portal-item":{write:!1}},write:{isRequired:!0,ignoreOrigin:!0,writer:s.w}}},y={type:Boolean,value:!0,nonNullable:!0,json:{origins:{service:{read:{enabled:!1}}},name:"showLegend",write:!0}},m={value:null,type:l.Z,json:{origins:{service:{name:"elevationInfo",write:!0}},name:"layerDefinition.elevationInfo",write:!0}};function f(t){return{type:t,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}}}const v={write:!0,read:!0},w={type:Number,json:{origins:{"web-document":v,"portal-item":{write:!0}}}},g={...w,json:{...w.json,origins:{"web-document":{...v,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}}}},read:{source:["layerDefinition.drawingInfo.transparency","drawingInfo.transparency"],reader:(t,e,o)=>o&&"service"!==o.origin||!e.drawingInfo||void 0===e.drawingInfo.transparency?e.layerDefinition&&e.layerDefinition.drawingInfo&&void 0!==e.layerDefinition.drawingInfo.transparency?(0,p.b)(e.layerDefinition.drawingInfo.transparency):void 0:(0,p.b)(e.drawingInfo.transparency)}}},b={type:i.Z,readOnly:!0,get(){if(!this.layer?.timeInfo)return null;const{datesInUnknownTimezone:t,timeOffset:e,useViewTime:o}=this.layer,r=this.view?.timeExtent;let n=this.layer.timeExtent;t&&(n=function(t){if(!t)return t;const{start:e,end:o}=t;return new i.Z({start:null!=e?(0,a.Nm)(e,e.getTimezoneOffset(),"minutes"):e,end:null!=o?(0,a.Nm)(o,o.getTimezoneOffset(),"minutes"):o})}(n));let s=o?r&&n?r.intersection(n):r||n:n;if(!s||s.isEmpty||s.isAllTime)return s;e&&(s=s.offset(-e.value,e.unit)),t&&(s=function(t){if(!t)return t;const{start:e,end:o}=t;return new i.Z({start:null!=e?(0,a.Nm)(e,-e.getTimezoneOffset(),"minutes"):e,end:null!=o?(0,a.Nm)(o,-o.getTimezoneOffset(),"minutes"):o})}(s));const l=this._get("timeExtent");return s.equals(l)?l:s}},_={type:r.Z,readOnly:!0,json:{origins:{service:{read:{source:["fullExtent","spatialReference"],reader:(t,e)=>{const o=r.Z.fromJSON(t);return null!=e.spatialReference&&"object"==typeof e.spatialReference&&(o.spatialReference=n.Z.fromJSON(e.spatialReference)),o}}}},read:!1}},x={type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}}}},I={type:Number,json:{origins:{service:{write:{enabled:!1}}},read:{source:"layerDefinition.minScale"},write:{target:"layerDefinition.minScale"}}},C={type:Number,json:{origins:{service:{write:{enabled:!1}}},read:{source:"layerDefinition.maxScale"},write:{target:"layerDefinition.maxScale"}}},j={json:{write:{ignoreOrigin:!0},origins:{"web-map":{read:!1,write:!1}}}}},11223:(t,e,o)=>{o.d(e,{Z:()=>p});var i,r=o(43697),n=o(96674),s=o(5600),a=(o(75215),o(67676),o(80442),o(52011));let l=i=class extends n.wq{constructor(t){super(t),this.name=null,this.title=null,this.expression=null,this.returnType=null}clone(){return new i({name:this.name,title:this.title,expression:this.expression,returnType:this.returnType})}};(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],l.prototype,"name",void 0),(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],l.prototype,"title",void 0),(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],l.prototype,"expression",void 0),(0,r._)([(0,s.Cb)({type:["string","number"],json:{write:!0}})],l.prototype,"returnType",void 0),l=i=(0,r._)([(0,a.j)("esri.popup.ExpressionInfo")],l);const p=l},422:(t,e,o)=>{o.d(e,{Z:()=>h});var i,r=o(43697),n=o(35454),s=o(96674),a=o(22974),l=o(5600),p=(o(75215),o(36030)),d=o(52011),u=o(29986);let c=i=class extends s.wq{constructor(t){super(t),this.fieldName=null,this.format=null,this.isEditable=!0,this.label=null,this.stringFieldOption="text-box",this.statisticType=null,this.tooltip=null,this.visible=!0}clone(){return new i({fieldName:this.fieldName,format:this.format?(0,a.d9)(this.format):null,isEditable:this.isEditable,label:this.label,stringFieldOption:this.stringFieldOption,statisticType:this.statisticType,tooltip:this.tooltip,visible:this.visible})}};(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],c.prototype,"fieldName",void 0),(0,r._)([(0,l.Cb)({type:u.Z,json:{write:!0}})],c.prototype,"format",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0,default:!0}})],c.prototype,"isEditable",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],c.prototype,"label",void 0),(0,r._)([(0,p.J)(new n.X({richtext:"rich-text",textarea:"text-area",textbox:"text-box"}),{default:"text-box"})],c.prototype,"stringFieldOption",void 0),(0,r._)([(0,l.Cb)({type:["count","sum","min","max","avg","stddev","var"],json:{write:!0}})],c.prototype,"statisticType",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],c.prototype,"tooltip",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],c.prototype,"visible",void 0),c=i=(0,r._)([(0,d.j)("esri.popup.FieldInfo")],c);const h=c},84649:(t,e,o)=>{o.d(e,{Z:()=>p});var i,r=o(43697),n=o(5600),s=(o(75215),o(67676),o(80442),o(52011)),a=o(63801);let l=i=class extends a.Z{constructor(t){super(t),this.description=null,this.displayType="auto",this.title=null,this.type="attachments"}clone(){return new i({description:this.description,displayType:this.displayType,title:this.title})}};(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],l.prototype,"description",void 0),(0,r._)([(0,n.Cb)({type:["auto","preview","list"],json:{write:!0}})],l.prototype,"displayType",void 0),(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],l.prototype,"title",void 0),(0,r._)([(0,n.Cb)({type:["attachments"],readOnly:!0,json:{read:!1,write:!0}})],l.prototype,"type",void 0),l=i=(0,r._)([(0,s.j)("esri.popup.content.AttachmentsContent")],l);const p=l},41463:(t,e,o)=>{o.d(e,{Z:()=>d});var i,r=o(43697),n=o(5600),s=(o(75215),o(67676),o(80442),o(52011)),a=o(50379),l=o(87102);let p=i=class extends a.Z{constructor(t){super(t),this.type="bar-chart"}clone(){return new i({altText:this.altText,title:this.title,caption:this.caption,value:this.value?this.value.clone():null})}};(0,r._)([(0,n.Cb)({type:["bar-chart"],readOnly:!0,json:{type:["barchart"],read:!1,write:l.l.write}})],p.prototype,"type",void 0),p=i=(0,r._)([(0,s.j)("esri.popup.content.BarChartMediaInfo")],p);const d=p},87131:(t,e,o)=>{o.d(e,{Z:()=>d});var i,r=o(43697),n=o(5600),s=(o(75215),o(67676),o(80442),o(52011)),a=o(50379),l=o(87102);let p=i=class extends a.Z{constructor(t){super(t),this.type="column-chart"}clone(){return new i({altText:this.altText,title:this.title,caption:this.caption,value:this.value?this.value.clone():null})}};(0,r._)([(0,n.Cb)({type:["column-chart"],readOnly:!0,json:{type:["columnchart"],read:!1,write:l.l.write}})],p.prototype,"type",void 0),p=i=(0,r._)([(0,s.j)("esri.popup.content.ColumnChartMediaInfo")],p);const d=p},63801:(t,e,o)=>{o.d(e,{Z:()=>l});var i=o(43697),r=o(96674),n=o(5600),s=(o(75215),o(67676),o(80442),o(52011));let a=class extends r.wq{constructor(t){super(t),this.type=null}};(0,i._)([(0,n.Cb)({type:["attachments","custom","fields","media","text","expression","relationship"],readOnly:!0,json:{read:!1,write:!0}})],a.prototype,"type",void 0),a=(0,i._)([(0,s.j)("esri.popup.content.Content")],a);const l=a},48074:(t,e,o)=>{o.d(e,{Z:()=>d});var i,r=o(43697),n=o(22974),s=o(5600),a=(o(75215),o(52011)),l=o(63801);let p=i=class extends l.Z{constructor(t){super(t),this.creator=null,this.destroyer=null,this.outFields=null,this.type="custom"}clone(){return new i({creator:this.creator,destroyer:this.destroyer,outFields:Array.isArray(this.outFields)?(0,n.d9)(this.outFields):null})}};(0,r._)([(0,s.Cb)()],p.prototype,"creator",void 0),(0,r._)([(0,s.Cb)()],p.prototype,"destroyer",void 0),(0,r._)([(0,s.Cb)()],p.prototype,"outFields",void 0),(0,r._)([(0,s.Cb)({type:["custom"],readOnly:!0})],p.prototype,"type",void 0),p=i=(0,r._)([(0,a.j)("esri.popup.content.CustomContent")],p);const d=p},38745:(t,e,o)=>{o.d(e,{Z:()=>h});var i,r=o(43697),n=o(5600),s=(o(75215),o(67676),o(80442),o(52011)),a=o(96674);let l=i=class extends a.wq{constructor(t){super(t),this.title=null,this.expression=null,this.returnType="dictionary"}clone(){return new i({title:this.title,expression:this.expression})}};(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],l.prototype,"title",void 0),(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],l.prototype,"expression",void 0),(0,r._)([(0,n.Cb)({type:["dictionary"],readOnly:!0,json:{read:!1,write:!0}})],l.prototype,"returnType",void 0),l=i=(0,r._)([(0,s.j)("esri.popup.ElementExpressionInfo")],l);const p=l;var d,u=o(63801);let c=d=class extends u.Z{constructor(t){super(t),this.expressionInfo=null,this.type="expression"}clone(){return new d({expressionInfo:this.expressionInfo?.clone()})}};(0,r._)([(0,n.Cb)({type:p,json:{write:!0}})],c.prototype,"expressionInfo",void 0),(0,r._)([(0,n.Cb)({type:["expression"],readOnly:!0,json:{read:!1,write:!0}})],c.prototype,"type",void 0),c=d=(0,r._)([(0,s.j)("esri.popup.content.ExpressionContent")],c);const h=c},9190:(t,e,o)=>{o.d(e,{Z:()=>c});var i,r=o(43697),n=o(22974),s=o(5600),a=(o(75215),o(52011)),l=o(30556),p=o(422),d=o(63801);let u=i=class extends d.Z{constructor(t){super(t),this.attributes=null,this.description=null,this.fieldInfos=null,this.title=null,this.type="fields"}writeFieldInfos(t,e){e.fieldInfos=t&&t.map((t=>t.toJSON()))}clone(){return new i((0,n.d9)({attributes:this.attributes,description:this.description,fieldInfos:this.fieldInfos,title:this.title}))}};(0,r._)([(0,s.Cb)({type:Object,json:{write:!0}})],u.prototype,"attributes",void 0),(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],u.prototype,"description",void 0),(0,r._)([(0,s.Cb)({type:[p.Z]})],u.prototype,"fieldInfos",void 0),(0,r._)([(0,l.c)("fieldInfos")],u.prototype,"writeFieldInfos",null),(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],u.prototype,"title",void 0),(0,r._)([(0,s.Cb)({type:["fields"],readOnly:!0,json:{read:!1,write:!0}})],u.prototype,"type",void 0),u=i=(0,r._)([(0,a.j)("esri.popup.content.FieldsContent")],u);const c=u},13151:(t,e,o)=>{o.d(e,{Z:()=>h});var i,r=o(43697),n=o(5600),s=(o(75215),o(67676),o(80442),o(52011)),a=o(35320),l=o(96674);let p=i=class extends l.wq{constructor(t){super(t),this.linkURL=null,this.sourceURL=null}clone(){return new i({linkURL:this.linkURL,sourceURL:this.sourceURL})}};(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],p.prototype,"linkURL",void 0),(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],p.prototype,"sourceURL",void 0),p=i=(0,r._)([(0,s.j)("esri.popup.content.support.ImageMediaInfoValue")],p);const d=p;var u;let c=u=class extends a.Z{constructor(t){super(t),this.refreshInterval=null,this.type="image",this.value=null}clone(){return new u({altText:this.altText,title:this.title,caption:this.caption,refreshInterval:this.refreshInterval,value:this.value?this.value.clone():null})}};(0,r._)([(0,n.Cb)({type:Number,json:{write:!0}})],c.prototype,"refreshInterval",void 0),(0,r._)([(0,n.Cb)({type:["image"],readOnly:!0,json:{read:!1,write:!0}})],c.prototype,"type",void 0),(0,r._)([(0,n.Cb)({type:d,json:{write:!0}})],c.prototype,"value",void 0),c=u=(0,r._)([(0,s.j)("esri.popup.content.ImageMediaInfo")],c);const h=c},55869:(t,e,o)=>{o.d(e,{Z:()=>d});var i,r=o(43697),n=o(5600),s=(o(75215),o(67676),o(80442),o(52011)),a=o(50379),l=o(87102);let p=i=class extends a.Z{constructor(t){super(t),this.type="line-chart"}clone(){return new i({altText:this.altText,title:this.title,caption:this.caption,value:this.value?this.value.clone():null})}};(0,r._)([(0,n.Cb)({type:["line-chart"],readOnly:!0,json:{type:["linechart"],read:!1,write:l.l.write}})],p.prototype,"type",void 0),p=i=(0,r._)([(0,s.j)("esri.popup.content.LineChartMediaInfo")],p);const d=p},10214:(t,e,o)=>{o.d(e,{Z:()=>w});var i,r=o(43697),n=o(22974),s=o(5600),a=(o(75215),o(71715)),l=o(52011),p=o(30556),d=o(41463),u=o(87131),c=o(63801),h=o(13151),y=o(55869),m=o(13353),f=o(79742);let v=i=class extends c.Z{constructor(t){super(t),this.activeMediaInfoIndex=null,this.attributes=null,this.description=null,this.mediaInfos=null,this.title=null,this.type="media"}readMediaInfos(t){return t&&t.map((t=>"image"===t.type?h.Z.fromJSON(t):"barchart"===t.type?d.Z.fromJSON(t):"columnchart"===t.type?u.Z.fromJSON(t):"linechart"===t.type?y.Z.fromJSON(t):"piechart"===t.type?m.Z.fromJSON(t):void 0)).filter(Boolean)}writeMediaInfos(t,e){e.mediaInfos=t&&t.map((t=>t.toJSON()))}clone(){return new i((0,n.d9)({activeMediaInfoIndex:this.activeMediaInfoIndex,attributes:this.attributes,description:this.description,mediaInfos:this.mediaInfos,title:this.title}))}};(0,r._)([(0,s.Cb)()],v.prototype,"activeMediaInfoIndex",void 0),(0,r._)([(0,s.Cb)({type:Object,json:{write:!0}})],v.prototype,"attributes",void 0),(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],v.prototype,"description",void 0),(0,r._)([(0,s.Cb)({types:[f.V]})],v.prototype,"mediaInfos",void 0),(0,r._)([(0,a.r)("mediaInfos")],v.prototype,"readMediaInfos",null),(0,r._)([(0,p.c)("mediaInfos")],v.prototype,"writeMediaInfos",null),(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],v.prototype,"title",void 0),(0,r._)([(0,s.Cb)({type:["media"],readOnly:!0,json:{read:!1,write:!0}})],v.prototype,"type",void 0),v=i=(0,r._)([(0,l.j)("esri.popup.content.MediaContent")],v);const w=v},13353:(t,e,o)=>{o.d(e,{Z:()=>d});var i,r=o(43697),n=o(5600),s=(o(75215),o(67676),o(80442),o(52011)),a=o(50379),l=o(87102);let p=i=class extends a.Z{constructor(t){super(t),this.type="pie-chart"}clone(){return new i({altText:this.altText,title:this.title,caption:this.caption,value:this.value?this.value.clone():null})}};(0,r._)([(0,n.Cb)({type:["pie-chart"],readOnly:!0,json:{type:["piechart"],read:!1,write:l.l.write}})],p.prototype,"type",void 0),p=i=(0,r._)([(0,s.j)("esri.popup.content.PieChartMediaInfo")],p);const d=p},71423:(t,e,o)=>{o.d(e,{Z:()=>u});var i=o(43697),r=o(2368),n=o(5600),s=o(75215),a=(o(67676),o(80442),o(52011)),l=o(63801),p=o(44729);let d=class extends((0,r.J)(l.Z)){constructor(t){super(t),this.description=null,this.displayCount=null,this.displayType="list",this.orderByFields=null,this.relationshipId=null,this.title=null,this.type="relationship"}};(0,i._)([(0,n.Cb)({type:String,json:{write:!0}})],d.prototype,"description",void 0),(0,i._)([(0,n.Cb)({type:Number,json:{type:s.z8,write:!0}})],d.prototype,"displayCount",void 0),(0,i._)([(0,n.Cb)({type:["list"],json:{write:!0}})],d.prototype,"displayType",void 0),(0,i._)([(0,n.Cb)({type:[p.Z],json:{write:!0}})],d.prototype,"orderByFields",void 0),(0,i._)([(0,n.Cb)({type:Number,json:{type:s.z8,write:!0}})],d.prototype,"relationshipId",void 0),(0,i._)([(0,n.Cb)({type:String,json:{write:!0}})],d.prototype,"title",void 0),(0,i._)([(0,n.Cb)({type:["relationship"],readOnly:!0,json:{read:!1,write:!0}})],d.prototype,"type",void 0),d=(0,i._)([(0,a.j)("esri.popup.content.RelationshipContent")],d);const u=d},44951:(t,e,o)=>{o.d(e,{Z:()=>p});var i,r=o(43697),n=o(5600),s=(o(75215),o(67676),o(80442),o(52011)),a=o(63801);let l=i=class extends a.Z{constructor(t){super(t),this.text=null,this.type="text"}clone(){return new i({text:this.text})}};(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],l.prototype,"text",void 0),(0,r._)([(0,n.Cb)({type:["text"],readOnly:!0,json:{read:!1,write:!0}})],l.prototype,"type",void 0),l=i=(0,r._)([(0,s.j)("esri.popup.content.TextContent")],l);const p=l},50379:(t,e,o)=>{o.d(e,{Z:()=>v});var i,r=o(43697),n=o(5600),s=(o(75215),o(67676),o(80442),o(52011)),a=o(35320),l=o(96674),p=o(22974),d=o(92036);let u=i=class extends d.Z{constructor(t){super(t),this.fieldName=null,this.tooltip=null,this.value=null}clone(){return new i({fieldName:this.fieldName,tooltip:this.tooltip,value:this.value})}};(0,r._)([(0,n.Cb)()],u.prototype,"fieldName",void 0),(0,r._)([(0,n.Cb)()],u.prototype,"tooltip",void 0),(0,r._)([(0,n.Cb)()],u.prototype,"value",void 0),u=i=(0,r._)([(0,s.j)("esri.popup.content.support.ChartMediaInfoValueSeries")],u);const c=u;var h;let y=h=class extends l.wq{constructor(t){super(t),this.fields=[],this.normalizeField=null,this.series=[],this.tooltipField=null}clone(){return new h({fields:(0,p.d9)(this.fields),normalizeField:this.normalizeField,tooltipField:this.tooltipField})}};(0,r._)([(0,n.Cb)({type:[String],json:{write:!0}})],y.prototype,"fields",void 0),(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],y.prototype,"normalizeField",void 0),(0,r._)([(0,n.Cb)({type:[c],json:{read:!1}})],y.prototype,"series",void 0),(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],y.prototype,"tooltipField",void 0),y=h=(0,r._)([(0,s.j)("esri.popup.content.support.ChartMediaInfoValue")],y);const m=y;let f=class extends a.Z{constructor(t){super(t),this.type=null,this.value=null}};(0,r._)([(0,n.Cb)({type:["bar-chart","column-chart","line-chart","pie-chart"],readOnly:!0,json:{read:!1,write:!0}})],f.prototype,"type",void 0),(0,r._)([(0,n.Cb)({type:m,json:{write:!0}})],f.prototype,"value",void 0),f=(0,r._)([(0,s.j)("esri.popup.content.mixins.ChartMediaInfo")],f);const v=f},35320:(t,e,o)=>{o.d(e,{Z:()=>l});var i=o(43697),r=o(96674),n=o(5600),s=(o(75215),o(67676),o(80442),o(52011));let a=class extends r.wq{constructor(t){super(t),this.altText=null,this.caption="",this.title="",this.type=null}};(0,i._)([(0,n.Cb)({type:String,json:{write:!0}})],a.prototype,"altText",void 0),(0,i._)([(0,n.Cb)({type:String,json:{write:!0}})],a.prototype,"caption",void 0),(0,i._)([(0,n.Cb)({type:String,json:{write:!0}})],a.prototype,"title",void 0),(0,i._)([(0,n.Cb)({type:["image","bar-chart","column-chart","line-chart","pie-chart"],readOnly:!0,json:{read:!1,write:!0}})],a.prototype,"type",void 0),a=(0,i._)([(0,s.j)("esri.popup.content.mixins.MediaInfo")],a);const l=a},87102:(t,e,o)=>{o.d(e,{l:()=>i});const i=(0,o(35454).w)()({barchart:"bar-chart",columnchart:"column-chart",linechart:"line-chart",piechart:"pie-chart"})},79742:(t,e,o)=>{o.d(e,{V:()=>l});var i=o(41463),r=o(87131),n=o(13151),s=o(55869),a=o(13353);const l={base:o(35320).Z,key:"type",defaultKeyValue:"image",typeMap:{"bar-chart":i.Z,"column-chart":r.Z,"line-chart":s.Z,"pie-chart":a.Z,image:n.Z}}},29986:(t,e,o)=>{o.d(e,{Z:()=>h});var i=o(43697),r=o(2368),n=o(96674),s=o(5600),a=o(75215),l=(o(67676),o(80442),o(36030)),p=o(52011),d=o(90344),u=o(18848);let c=class extends((0,r.J)(n.wq)){constructor(t){super(t),this.dateFormat=null,this.digitSeparator=!1,this.places=null}formatNumber(t){return(0,u.uf)(t,(0,u.sh)(this))}formatDate(t,e=!1){return this.dateFormat?(0,d.p6)(t,{...(0,d.Ze)(this.dateFormat),...e&&d.cZ}):this.formatNumber(t)}formatDateOnly(t){const e=(this.dateFormat&&(0,d.Ze)(this.dateFormat))??void 0;return(0,d.o8)(t,e)}formatTimeOnly(t){const e=(this.dateFormat&&(0,d.Ze)(this.dateFormat))??void 0;return(0,d.LJ)(t,e)}formatTimestamp(t){return(0,d.i$)(t,{...(0,d.Ze)(this.dateFormat??"short-date-short-time"),...d.o5})}formatRasterPixelValue(t){return t.includes("-")?t:t.trim().includes(",")?this._formatDelimitedString(t,",",", "):t.trim().includes(";")?this._formatDelimitedString(t,";","; "):t.trim().includes(" ")?this._formatDelimitedString(t," "," "):this.formatNumber(Number(t))}_formatDelimitedString(t,e,o){return t&&e&&o?t.trim().split(e).map((t=>this.formatNumber(Number(t)))).join(o):t}};(0,i._)([(0,l.J)(d.Xr)],c.prototype,"dateFormat",void 0),(0,i._)([(0,s.Cb)({type:Boolean,json:{write:!0}})],c.prototype,"digitSeparator",void 0),(0,i._)([(0,s.Cb)({type:a.z8,json:{write:!0}})],c.prototype,"places",void 0),c=(0,i._)([(0,p.j)("esri.popup.support.FieldInfoFormat")],c);const h=c},44729:(t,e,o)=>{o.d(e,{Z:()=>p});var i,r=o(43697),n=o(96674),s=o(5600),a=(o(75215),o(67676),o(80442),o(52011));let l=i=class extends n.wq{constructor(t){super(t),this.field=null,this.order=null}clone(){return new i({field:this.field,order:this.order})}};(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],l.prototype,"field",void 0),(0,r._)([(0,s.Cb)({type:["asc","desc"],json:{write:!0}})],l.prototype,"order",void 0),l=i=(0,r._)([(0,a.j)("esri.popup.support.RelatedRecordsInfoFieldOrder")],l);const p=l},99282:(t,e,o)=>{o.d(e,{a:()=>n});var i=o(67900),r=o(68441);const n={unknown:1,inches:(0,i.En)(1,"meters","inches"),feet:(0,i.En)(1,"meters","feet"),"us-feet":(0,i.En)(1,"meters","us-feet"),yards:(0,i.En)(1,"meters","yards"),miles:(0,i.En)(1,"meters","miles"),"nautical-miles":(0,i.En)(1,"meters","nautical-miles"),millimeters:(0,i.En)(1,"meters","millimeters"),centimeters:(0,i.En)(1,"meters","centimeters"),decimeters:(0,i.En)(1,"meters","decimeters"),meters:(0,i.En)(1,"meters","meters"),kilometers:(0,i.En)(1,"meters","kilometers"),"decimal-degrees":1/(0,i.ty)(1,"meters",r.sv.radius)}},86787:(t,e,o)=>{o.d(e,{Z:()=>b});var i,r=o(43697),n=o(35454),s=o(96674),a=o(70586),l=o(5600),p=(o(75215),o(67676),o(80442),o(71715)),d=o(52011),u=o(30556),c=o(35671);let h=i=class extends s.wq{constructor(t){super(t)}async collectRequiredFields(t,e){return(0,c.io)(t,e,this.expression)}clone(){return new i({expression:this.expression,title:this.title})}equals(t){return this.expression===t.expression&&this.title===t.title}};(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],h.prototype,"expression",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],h.prototype,"title",void 0),h=i=(0,r._)([(0,d.j)("esri.layers.support.FeatureExpressionInfo")],h);const y=h;var m,f=o(12541);const v=(0,n.w)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),w=new n.X({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let g=m=class extends s.wq{constructor(t){super(t),this.offset=null}readFeatureExpressionInfo(t,e){return null!=t?t:e.featureExpression&&0===e.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(t,e,o,i){e[o]=t.write({},i),"0"===t.expression&&(e.featureExpression={value:0})}get mode(){const{offset:t,featureExpressionInfo:e}=this;return this._isOverridden("mode")?this._get("mode"):null!=t||e?"relative-to-ground":"on-the-ground"}set mode(t){this._override("mode",t)}set unit(t){this._set("unit",t)}write(t,e){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(t,e):null}clone(){return new m({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}equals(t){return this.mode===t.mode&&this.offset===t.offset&&this.unit===t.unit&&(0,a._W)(this.featureExpressionInfo,t.featureExpressionInfo)}};(0,r._)([(0,l.Cb)({type:y,json:{write:!0}})],g.prototype,"featureExpressionInfo",void 0),(0,r._)([(0,p.r)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],g.prototype,"readFeatureExpressionInfo",null),(0,r._)([(0,u.c)("featureExpressionInfo",{featureExpressionInfo:{type:y},"featureExpression.value":{type:[0]}})],g.prototype,"writeFeatureExpressionInfo",null),(0,r._)([(0,l.Cb)({type:v.apiValues,nonNullable:!0,json:{type:v.jsonValues,read:v.read,write:{writer:v.write,isRequired:!0}}})],g.prototype,"mode",null),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],g.prototype,"offset",void 0),(0,r._)([(0,l.Cb)({type:f.f9,json:{type:String,read:w.read,write:w.write}})],g.prototype,"unit",null),g=m=(0,r._)([(0,d.j)("esri.layers.support.ElevationInfo")],g);const b=g},12541:(t,e,o)=>{o.d(e,{Z7:()=>r,f9:()=>n});var i=o(99282);function r(t){return 1/(i.a[t]||1)}const n=function(){const t=Object.keys(i.a);return t.sort(),t}()}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2437],{51773:(t,e,o)=>{o.d(e,{Z:()=>tt});var i=o(43697),r=o(2368),n=o(46791),s=o(96674),a=o(22974),l=o(92604),p=o(95330),d=o(5600),u=o(90578),c=o(71715),h=o(52011),y=o(30556),m=o(75215),f=o(35671),v=o(84649),w=o(63801),g=o(48074),b=o(38745),_=o(9190),x=o(10214),I=o(71423),C=o(44951);const j={base:null,key:"type",typeMap:{attachment:v.Z,media:x.Z,text:C.Z,expression:b.Z,field:_.Z,relationship:I.Z}};var F,Z=o(11223),N=o(422);o(67676),o(80442);let S=F=class extends s.wq{constructor(t){super(t),this.returnTopmostRaster=null,this.showNoDataRecords=null}clone(){return new F({showNoDataRecords:this.showNoDataRecords,returnTopmostRaster:this.returnTopmostRaster})}};(0,i._)([(0,d.Cb)({type:Boolean,json:{write:!0}})],S.prototype,"returnTopmostRaster",void 0),(0,i._)([(0,d.Cb)({type:Boolean,json:{write:!0}})],S.prototype,"showNoDataRecords",void 0),S=F=(0,i._)([(0,h.j)("esri.popup.LayerOptions")],S);const T=S;var E,O=o(44729);let R=E=class extends s.wq{constructor(t){super(t),this.showRelatedRecords=null,this.orderByFields=null}clone(){return new E({showRelatedRecords:this.showRelatedRecords,orderByFields:this.orderByFields?(0,a.d9)(this.orderByFields):null})}};(0,i._)([(0,d.Cb)({type:Boolean,json:{write:!0}})],R.prototype,"showRelatedRecords",void 0),(0,i._)([(0,d.Cb)({type:[O.Z],json:{write:!0}})],R.prototype,"orderByFields",void 0),R=E=(0,i._)([(0,h.j)("esri.popup.RelatedRecordsInfo")],R);const D=R;var A,M=o(79742),L=o(92036),B=o(10699);let J=A=class extends((0,B.IG)(L.Z)){constructor(t){super(t),this.active=!1,this.className=null,this.disabled=!1,this.icon=null,this.id=null,this.indicator=!1,this.title=null,this.type=null,this.visible=!0}clone(){return new A({active:this.active,className:this.className,disabled:this.disabled,icon:this.icon,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible})}};(0,i._)([(0,d.Cb)()],J.prototype,"active",void 0),(0,i._)([(0,d.Cb)()],J.prototype,"className",void 0),(0,i._)([(0,d.Cb)()],J.prototype,"disabled",void 0),(0,i._)([(0,d.Cb)()],J.prototype,"icon",void 0),(0,i._)([(0,d.Cb)()],J.prototype,"id",void 0),(0,i._)([(0,d.Cb)()],J.prototype,"indicator",void 0),(0,i._)([(0,d.Cb)()],J.prototype,"title",void 0),(0,i._)([(0,d.Cb)()],J.prototype,"type",void 0),(0,i._)([(0,d.Cb)()],J.prototype,"visible",void 0),J=A=(0,i._)([(0,h.j)("esri.support.actions.ActionBase")],J);const k=J;var q;let z=q=class extends k{constructor(t){super(t),this.image=null,this.type="button"}clone(){return new q({active:this.active,className:this.className,disabled:this.disabled,icon:this.icon,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible,image:this.image})}};(0,i._)([(0,d.Cb)()],z.prototype,"image",void 0),z=q=(0,i._)([(0,h.j)("esri.support.Action.ActionButton")],z);const P=z;var V;let Y=V=class extends k{constructor(t){super(t),this.image=null,this.type="toggle",this.value=!1}clone(){return new V({active:this.active,className:this.className,disabled:this.disabled,icon:this.icon,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible,image:this.image,value:this.value})}};(0,i._)([(0,d.Cb)()],Y.prototype,"image",void 0),(0,i._)([(0,d.Cb)()],Y.prototype,"value",void 0),Y=V=(0,i._)([(0,h.j)("esri.support.Action.ActionToggle")],Y);const U=Y,W=l.Z.getLogger("esri.PopupTemplate"),$="relationships/",G="expression/",K=n.Z.ofType({key:"type",defaultKeyValue:"button",base:k,typeMap:{button:P,toggle:U}}),X={base:w.Z,key:"type",typeMap:{media:x.Z,custom:g.Z,text:C.Z,attachments:v.Z,fields:_.Z,expression:b.Z,relationship:I.Z}},H=["attachments","fields","media","text","expression","relationship"];let Q=class extends((0,r.J)(s.wq)){constructor(){super(...arguments),this.actions=null,this.content="",this.expressionInfos=null,this.fieldInfos=null,this.layerOptions=null,this.lastEditInfoEnabled=!0,this.outFields=null,this.overwriteActions=!1,this.returnGeometry=!1,this.title=""}castContent(t){return Array.isArray(t)?t.map((t=>(0,m.N7)(X,t))):"string"==typeof t||"function"==typeof t||t instanceof HTMLElement||(0,p.y8)(t)?t:(W.error("content error","unsupported content value",{value:t}),null)}readContent(t,e){const{popupElements:o}=e;return Array.isArray(o)&&o.length>0?this._readPopupInfoElements(e.description,e.mediaInfos,o):this._readPopupInfo(e)}writeContent(t,e,o,i){"string"!=typeof t?Array.isArray(t)&&(e.popupElements=t.filter((t=>H.includes(t.type))).map((t=>t&&t.toJSON(i))),e.popupElements.forEach((t=>{"attachments"===t.type?this._writeAttachmentContent(e):"media"===t.type?this._writeMediaContent(t,e):"text"===t.type?this._writeTextContent(t,e):"relationship"===t.type&&this._writeRelationshipContent(t,e)}))):e.description=t}writeFieldInfos(t,e,o,i){const{content:r}=this,n=Array.isArray(r)?r:null;if(t){const o=n?n.filter((t=>"fields"===t.type)):[],r=o.length&&o.every((t=>t.fieldInfos?.length));e.fieldInfos=t.filter(Boolean).map((t=>{const e=t.toJSON(i);return r&&(e.visible=!1),e}))}if(n)for(const t of n)"fields"===t.type&&this._writeFieldsContent(t,e)}writeLayerOptions(t,e,o,i){e[o]=!t||null===t.showNoDataRecords&&null===t.returnTopmostRaster?null:t.toJSON(i)}writeTitle(t,e){e.title=t||""}async collectRequiredFields(t,e){const o=this.expressionInfos||[];await this._collectExpressionInfoFields(t,e,[...o,...this._getContentExpressionInfos(this.content,o)]),(0,f.gd)(t,e,[...this.outFields||[],...this._getActionsFields(this.actions),...this._getTitleFields(this.title),...this._getContentFields(this.content)])}async getRequiredFields(t){const e=new Set;return await this.collectRequiredFields(e,t),[...e].sort()}_writeFieldsContent(t,e){if(!Array.isArray(t.fieldInfos)||!t.fieldInfos.length)return;const o=(0,a.d9)(t.fieldInfos);Array.isArray(e.fieldInfos)?o.forEach((t=>{const o=e.fieldInfos.find((e=>e.fieldName.toLowerCase()===t.fieldName.toLowerCase()));o?o.visible=!0:e.fieldInfos.push(t)})):e.fieldInfos=o}_writeAttachmentContent(t){t.showAttachments||(t.showAttachments=!0)}_writeRelationshipContent(t,e){const o=t.orderByFields?.map((e=>this._toFieldOrderJSON(e,t.relationshipId)))||[],i=[...e.relatedRecordsInfo?.orderByFields||[],...o];e.relatedRecordsInfo={showRelatedRecords:!0,...i?.length&&{orderByFields:i}}}_writeTextContent(t,e){!e.description&&t.text&&(e.description=t.text)}_writeMediaContent(t,e){if(!Array.isArray(t.mediaInfos)||!t.mediaInfos.length)return;const o=(0,a.d9)(t.mediaInfos);Array.isArray(e.mediaInfos)?e.mediaInfos=[...e.mediaInfos,...o]:e.mediaInfos=o}_readPopupInfoElements(t,e,o){const i={description:!1,mediaInfos:!1};return o.map((o=>"media"===o.type?(o.mediaInfos||!e||i.mediaInfos||(o.mediaInfos=e,i.mediaInfos=!0),x.Z.fromJSON(o)):"text"===o.type?(o.text||!t||i.description||(o.text=t,i.description=!0),C.Z.fromJSON(o)):"attachments"===o.type?v.Z.fromJSON(o):"fields"===o.type?_.Z.fromJSON(o):"expression"===o.type?b.Z.fromJSON(o):"relationship"===o.type?I.Z.fromJSON(o):void 0)).filter(Boolean)}_toRelationshipContent(t){const{field:e,order:o}=t;if(!e?.startsWith($))return null;const i=e.replace($,"").split("/");if(2!==i.length)return null;const r=parseInt(i[0],10),n=i[1];return"number"==typeof r&&n?I.Z.fromJSON({relationshipId:r,orderByFields:[{field:n,order:o}]}):null}_toFieldOrderJSON(t,e){const{order:o,field:i}=t;return{field:`${$}${e}/${i}`,order:o}}_readPopupInfo({description:t,mediaInfos:e,showAttachments:o,relatedRecordsInfo:i={showRelatedRecords:!1}}){const r=[];t?r.push(new C.Z({text:t})):r.push(new _.Z),Array.isArray(e)&&e.length&&r.push(x.Z.fromJSON({mediaInfos:e})),o&&r.push(v.Z.fromJSON({displayType:"auto"}));const{showRelatedRecords:n,orderByFields:s}=i;return n&&s?.length&&s.forEach((t=>{const e=this._toRelationshipContent(t);e&&r.push(e)})),r.length?r:t}_getContentElementFields(t){const e=t?.type;if("attachments"===e)return[...this._extractFieldNames(t.title),...this._extractFieldNames(t.description)];if("custom"===e)return t.outFields||[];if("fields"===e)return[...this._extractFieldNames(t.title),...this._extractFieldNames(t.description),...this._getFieldInfoFields(t.fieldInfos??this.fieldInfos)];if("media"===e){const e=t.mediaInfos||[];return[...this._extractFieldNames(t.title),...this._extractFieldNames(t.description),...e.reduce(((t,e)=>[...t,...this._getMediaInfoFields(e)]),[])]}return"text"===e?this._extractFieldNames(t.text):[]}_getMediaInfoFields(t){const{caption:e,title:o,value:i}=t,r=i||{},{fields:n,normalizeField:s,tooltipField:a,sourceURL:l,linkURL:p}=r,d=[...this._extractFieldNames(o),...this._extractFieldNames(e),...this._extractFieldNames(l),...this._extractFieldNames(p),...n??[]];return s&&d.push(s),a&&d.push(a),d}_getContentExpressionInfos(t,e){return Array.isArray(t)?t.reduce(((t,e)=>[...t,..."expression"===e.type&&e.expressionInfo?[e.expressionInfo]:[]]),e):[]}_getContentFields(t){return"string"==typeof t?this._extractFieldNames(t):Array.isArray(t)?t.reduce(((t,e)=>[...t,...this._getContentElementFields(e)]),[]):[]}async _collectExpressionInfoFields(t,e,o){o&&await Promise.all(o.map((o=>(0,f.io)(t,e,o.expression))))}_getFieldInfoFields(t){return t?t.filter((t=>void 0===t.visible||!!t.visible)).map((t=>t.fieldName)).filter((t=>!t.startsWith($)&&!t.startsWith(G))):[]}_getActionsFields(t){return t?t.toArray().reduce(((t,e)=>[...t,...this._getActionFields(e)]),[]):[]}_getActionFields(t){const{className:e,title:o,type:i}=t,r="button"===i||"toggle"===i?t.image:"";return[...this._extractFieldNames(o),...this._extractFieldNames(e),...this._extractFieldNames(r)]}_getTitleFields(t){return"string"==typeof t?this._extractFieldNames(t):[]}_extractFieldNames(t){if(!t||"string"!=typeof t)return[];const e=t.match(/{[^}]*}/g);if(!e)return[];const o=/\{(\w+):.+\}/,i=e.filter((t=>!(0===t.indexOf(`{${$}`)||0===t.indexOf(`{${G}`)))).map((t=>t.replace(o,"{$1}")));return i?i.map((t=>t.slice(1,-1))):[]}};(0,i._)([(0,d.Cb)({type:K})],Q.prototype,"actions",void 0),(0,i._)([(0,d.Cb)()],Q.prototype,"content",void 0),(0,i._)([(0,u.p)("content")],Q.prototype,"castContent",null),(0,i._)([(0,c.r)("content",["description","fieldInfos","popupElements","mediaInfos","showAttachments","relatedRecordsInfo"])],Q.prototype,"readContent",null),(0,i._)([(0,y.c)("content",{popupElements:{type:n.Z.ofType(j)},showAttachments:{type:Boolean},mediaInfos:{type:n.Z.ofType(M.V)},description:{type:String},relatedRecordsInfo:{type:D}})],Q.prototype,"writeContent",null),(0,i._)([(0,d.Cb)({type:[Z.Z],json:{write:!0}})],Q.prototype,"expressionInfos",void 0),(0,i._)([(0,d.Cb)({type:[N.Z]})],Q.prototype,"fieldInfos",void 0),(0,i._)([(0,y.c)("fieldInfos")],Q.prototype,"writeFieldInfos",null),(0,i._)([(0,d.Cb)({type:T})],Q.prototype,"layerOptions",void 0),(0,i._)([(0,y.c)("layerOptions")],Q.prototype,"writeLayerOptions",null),(0,i._)([(0,d.Cb)({type:Boolean,json:{read:{source:"showLastEditInfo"},write:{target:"showLastEditInfo"},default:!0}})],Q.prototype,"lastEditInfoEnabled",void 0),(0,i._)([(0,d.Cb)()],Q.prototype,"outFields",void 0),(0,i._)([(0,d.Cb)()],Q.prototype,"overwriteActions",void 0),(0,i._)([(0,d.Cb)()],Q.prototype,"returnGeometry",void 0),(0,i._)([(0,d.Cb)({json:{type:String}})],Q.prototype,"title",void 0),(0,i._)([(0,y.c)("title")],Q.prototype,"writeTitle",null),Q=(0,i._)([(0,h.j)("esri.PopupTemplate")],Q);const tt=Q},90344:(t,e,o)=>{o.d(e,{LJ:()=>C,Xr:()=>v,Ze:()=>_,cZ:()=>p,i$:()=>j,o5:()=>l,o8:()=>I,p6:()=>x});var i=o(35454),r=o(70171),n=o(17126);const s={year:void 0,month:void 0,day:void 0,weekday:void 0},a={hour:void 0,minute:void 0,second:void 0},l={timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone},p={timeZone:"Etc/UTC"},d={year:"numeric",month:"numeric",day:"numeric"},u={year:"numeric",month:"long",day:"numeric"},c={year:"numeric",month:"short",day:"numeric"},h={year:"numeric",month:"long",weekday:"long",day:"numeric"},y={hour:"numeric",minute:"numeric"},m={...y,second:"numeric"},f={"short-date":d,"short-date-short-time":{...d,...y},"short-date-short-time-24":{...d,...y,hour12:!1},"short-date-long-time":{...d,...m},"short-date-long-time-24":{...d,...m,hour12:!1},"short-date-le":d,"short-date-le-short-time":{...d,...y},"short-date-le-short-time-24":{...d,...y,hour12:!1},"short-date-le-long-time":{...d,...m},"short-date-le-long-time-24":{...d,...m,hour12:!1},"long-month-day-year":u,"long-month-day-year-short-time":{...u,...y},"long-month-day-year-short-time-24":{...u,...y,hour12:!1},"long-month-day-year-long-time":{...u,...m},"long-month-day-year-long-time-24":{...u,...m,hour12:!1},"day-short-month-year":c,"day-short-month-year-short-time":{...c,...y},"day-short-month-year-short-time-24":{...c,...y,hour12:!1},"day-short-month-year-long-time":{...c,...m},"day-short-month-year-long-time-24":{...c,...m,hour12:!1},"long-date":h,"long-date-short-time":{...h,...y},"long-date-short-time-24":{...h,...y,hour12:!1},"long-date-long-time":{...h,...m},"long-date-long-time-24":{...h,...m,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":y,"long-time":m},v=(0,i.w)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),w={ar:"ar-u-nu-latn-ca-gregory"};let g=new WeakMap,b=f["short-date-short-time"];function _(t){return f[t]}function x(t,e){return function(t){const e=t||b;let o=g.get(e);if(!o){const t=(0,r.Kd)(),i=w[t]||t;o=new Intl.DateTimeFormat(i,e),g.set(e,o)}return o}(e).format(t)}function I(t,e=f["short-date"]){return x(new Date(t),{...e,...p,...a})}function C(t,e=f["short-time"]){return x(new Date(`1970-01-01T${t}Z`),{...e,...p,...s})}function j(t,e=f["short-date-short-time"]){const o=n.ou.fromISO(t,{setZone:!0}),i=(0,r.Kd)(),s=w[i]??i;return o.toLocaleString(e,{locale:s})}(0,r.Ze)((()=>{g=new WeakMap,b=f["short-date-short-time"]}))},18848:(t,e,o)=>{o.d(e,{sh:()=>l,uf:()=>p});var i=o(70586),r=o(70171);const n={ar:"ar-u-nu-latn"};let s=new WeakMap,a={};function l(t={}){const e={};return null!=t.digitSeparator&&(e.useGrouping=t.digitSeparator),null!=t.places&&(e.minimumFractionDigits=e.maximumFractionDigits=t.places),e}function p(t,e){return Object.is(t,-0)&&(t=0),function(t){const e=t||a;if(!s.has(e)){const o=(0,r.Kd)(),i=n[(0,r.Kd)()]||o;s.set(e,new Intl.NumberFormat(i,t))}return(0,i.j0)(s.get(e))}(e).format(t)}(0,r.Ze)((()=>{s=new WeakMap,a={}}))},21506:(t,e,o)=>{o.d(e,{qG:()=>b,PV:()=>m,id:()=>x,iR:()=>c,rn:()=>y,rT:()=>j,u1:()=>C,rO:()=>I,Oh:()=>w,bT:()=>g,C_:()=>u,Lx:()=>f,vg:()=>_,YI:()=>d,HQ:()=>h});var i=o(92835),r=o(6570),n=o(82971),s=o(25929),a=(o(67676),o(95330),o(35463)),l=o(86787),p=o(65242);const d={type:Boolean,value:!0,json:{origins:{service:{read:!1,write:!1},"web-map":{read:!1,write:!1}},name:"screenSizePerspective",write:!0}},u={type:Boolean,value:!0,json:{name:"disablePopup",read:{reader:(t,e)=>!e.disablePopup},write:{enabled:!0,writer(t,e,o){e[o]=!t}}}},c={type:Boolean,value:!0,nonNullable:!0,json:{name:"showLabels",write:!0}},h={type:String,json:{origins:{"portal-item":{write:!1}},write:{isRequired:!0,ignoreOrigin:!0,writer:s.w}}},y={type:Boolean,value:!0,nonNullable:!0,json:{origins:{service:{read:{enabled:!1}}},name:"showLegend",write:!0}},m={value:null,type:l.Z,json:{origins:{service:{name:"elevationInfo",write:!0}},name:"layerDefinition.elevationInfo",write:!0}};function f(t){return{type:t,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}}}const v={write:!0,read:!0},w={type:Number,json:{origins:{"web-document":v,"portal-item":{write:!0}}}},g={...w,json:{...w.json,origins:{"web-document":{...v,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}}}},read:{source:["layerDefinition.drawingInfo.transparency","drawingInfo.transparency"],reader:(t,e,o)=>o&&"service"!==o.origin||!e.drawingInfo||void 0===e.drawingInfo.transparency?e.layerDefinition&&e.layerDefinition.drawingInfo&&void 0!==e.layerDefinition.drawingInfo.transparency?(0,p.b)(e.layerDefinition.drawingInfo.transparency):void 0:(0,p.b)(e.drawingInfo.transparency)}}},b={type:i.Z,readOnly:!0,get(){if(!this.layer?.timeInfo)return null;const{datesInUnknownTimezone:t,timeOffset:e,useViewTime:o}=this.layer,r=this.view?.timeExtent;let n=this.layer.timeExtent;t&&(n=function(t){if(!t)return t;const{start:e,end:o}=t;return new i.Z({start:null!=e?(0,a.Nm)(e,e.getTimezoneOffset(),"minutes"):e,end:null!=o?(0,a.Nm)(o,o.getTimezoneOffset(),"minutes"):o})}(n));let s=o?r&&n?r.intersection(n):r||n:n;if(!s||s.isEmpty||s.isAllTime)return s;e&&(s=s.offset(-e.value,e.unit)),t&&(s=function(t){if(!t)return t;const{start:e,end:o}=t;return new i.Z({start:null!=e?(0,a.Nm)(e,-e.getTimezoneOffset(),"minutes"):e,end:null!=o?(0,a.Nm)(o,-o.getTimezoneOffset(),"minutes"):o})}(s));const l=this._get("timeExtent");return s.equals(l)?l:s}},_={type:r.Z,readOnly:!0,json:{origins:{service:{read:{source:["fullExtent","spatialReference"],reader:(t,e)=>{const o=r.Z.fromJSON(t);return null!=e.spatialReference&&"object"==typeof e.spatialReference&&(o.spatialReference=n.Z.fromJSON(e.spatialReference)),o}}}},read:!1}},x={type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}}}},I={type:Number,json:{origins:{service:{write:{enabled:!1}}},read:{source:"layerDefinition.minScale"},write:{target:"layerDefinition.minScale"}}},C={type:Number,json:{origins:{service:{write:{enabled:!1}}},read:{source:"layerDefinition.maxScale"},write:{target:"layerDefinition.maxScale"}}},j={json:{write:{ignoreOrigin:!0},origins:{"web-map":{read:!1,write:!1}}}}},11223:(t,e,o)=>{o.d(e,{Z:()=>p});var i,r=o(43697),n=o(96674),s=o(5600),a=(o(75215),o(67676),o(80442),o(52011));let l=i=class extends n.wq{constructor(t){super(t),this.name=null,this.title=null,this.expression=null,this.returnType=null}clone(){return new i({name:this.name,title:this.title,expression:this.expression,returnType:this.returnType})}};(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],l.prototype,"name",void 0),(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],l.prototype,"title",void 0),(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],l.prototype,"expression",void 0),(0,r._)([(0,s.Cb)({type:["string","number"],json:{write:!0}})],l.prototype,"returnType",void 0),l=i=(0,r._)([(0,a.j)("esri.popup.ExpressionInfo")],l);const p=l},422:(t,e,o)=>{o.d(e,{Z:()=>h});var i,r=o(43697),n=o(35454),s=o(96674),a=o(22974),l=o(5600),p=(o(75215),o(36030)),d=o(52011),u=o(29986);let c=i=class extends s.wq{constructor(t){super(t),this.fieldName=null,this.format=null,this.isEditable=!0,this.label=null,this.stringFieldOption="text-box",this.statisticType=null,this.tooltip=null,this.visible=!0}clone(){return new i({fieldName:this.fieldName,format:this.format?(0,a.d9)(this.format):null,isEditable:this.isEditable,label:this.label,stringFieldOption:this.stringFieldOption,statisticType:this.statisticType,tooltip:this.tooltip,visible:this.visible})}};(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],c.prototype,"fieldName",void 0),(0,r._)([(0,l.Cb)({type:u.Z,json:{write:!0}})],c.prototype,"format",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:{alwaysWriteDefaults:!0},default:!0}})],c.prototype,"isEditable",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],c.prototype,"label",void 0),(0,r._)([(0,p.J)(new n.X({richtext:"rich-text",textarea:"text-area",textbox:"text-box"}),{default:"text-box"})],c.prototype,"stringFieldOption",void 0),(0,r._)([(0,l.Cb)({type:["count","sum","min","max","avg","stddev","var"],json:{write:!0}})],c.prototype,"statisticType",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],c.prototype,"tooltip",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],c.prototype,"visible",void 0),c=i=(0,r._)([(0,d.j)("esri.popup.FieldInfo")],c);const h=c},84649:(t,e,o)=>{o.d(e,{Z:()=>p});var i,r=o(43697),n=o(5600),s=(o(75215),o(67676),o(80442),o(52011)),a=o(63801);let l=i=class extends a.Z{constructor(t){super(t),this.description=null,this.displayType="auto",this.title=null,this.type="attachments"}clone(){return new i({description:this.description,displayType:this.displayType,title:this.title})}};(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],l.prototype,"description",void 0),(0,r._)([(0,n.Cb)({type:["auto","preview","list"],json:{write:!0}})],l.prototype,"displayType",void 0),(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],l.prototype,"title",void 0),(0,r._)([(0,n.Cb)({type:["attachments"],readOnly:!0,json:{read:!1,write:!0}})],l.prototype,"type",void 0),l=i=(0,r._)([(0,s.j)("esri.popup.content.AttachmentsContent")],l);const p=l},41463:(t,e,o)=>{o.d(e,{Z:()=>d});var i,r=o(43697),n=o(5600),s=(o(75215),o(67676),o(80442),o(52011)),a=o(50379),l=o(87102);let p=i=class extends a.Z{constructor(t){super(t),this.type="bar-chart"}clone(){return new i({altText:this.altText,title:this.title,caption:this.caption,value:this.value?this.value.clone():null})}};(0,r._)([(0,n.Cb)({type:["bar-chart"],readOnly:!0,json:{type:["barchart"],read:!1,write:l.l.write}})],p.prototype,"type",void 0),p=i=(0,r._)([(0,s.j)("esri.popup.content.BarChartMediaInfo")],p);const d=p},87131:(t,e,o)=>{o.d(e,{Z:()=>d});var i,r=o(43697),n=o(5600),s=(o(75215),o(67676),o(80442),o(52011)),a=o(50379),l=o(87102);let p=i=class extends a.Z{constructor(t){super(t),this.type="column-chart"}clone(){return new i({altText:this.altText,title:this.title,caption:this.caption,value:this.value?this.value.clone():null})}};(0,r._)([(0,n.Cb)({type:["column-chart"],readOnly:!0,json:{type:["columnchart"],read:!1,write:l.l.write}})],p.prototype,"type",void 0),p=i=(0,r._)([(0,s.j)("esri.popup.content.ColumnChartMediaInfo")],p);const d=p},63801:(t,e,o)=>{o.d(e,{Z:()=>l});var i=o(43697),r=o(96674),n=o(5600),s=(o(75215),o(67676),o(80442),o(52011));let a=class extends r.wq{constructor(t){super(t),this.type=null}};(0,i._)([(0,n.Cb)({type:["attachments","custom","fields","media","text","expression","relationship"],readOnly:!0,json:{read:!1,write:!0}})],a.prototype,"type",void 0),a=(0,i._)([(0,s.j)("esri.popup.content.Content")],a);const l=a},48074:(t,e,o)=>{o.d(e,{Z:()=>d});var i,r=o(43697),n=o(22974),s=o(5600),a=(o(75215),o(52011)),l=o(63801);let p=i=class extends l.Z{constructor(t){super(t),this.creator=null,this.destroyer=null,this.outFields=null,this.type="custom"}clone(){return new i({creator:this.creator,destroyer:this.destroyer,outFields:Array.isArray(this.outFields)?(0,n.d9)(this.outFields):null})}};(0,r._)([(0,s.Cb)()],p.prototype,"creator",void 0),(0,r._)([(0,s.Cb)()],p.prototype,"destroyer",void 0),(0,r._)([(0,s.Cb)()],p.prototype,"outFields",void 0),(0,r._)([(0,s.Cb)({type:["custom"],readOnly:!0})],p.prototype,"type",void 0),p=i=(0,r._)([(0,a.j)("esri.popup.content.CustomContent")],p);const d=p},38745:(t,e,o)=>{o.d(e,{Z:()=>h});var i,r=o(43697),n=o(5600),s=(o(75215),o(67676),o(80442),o(52011)),a=o(96674);let l=i=class extends a.wq{constructor(t){super(t),this.title=null,this.expression=null,this.returnType="dictionary"}clone(){return new i({title:this.title,expression:this.expression})}};(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],l.prototype,"title",void 0),(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],l.prototype,"expression",void 0),(0,r._)([(0,n.Cb)({type:["dictionary"],readOnly:!0,json:{read:!1,write:!0}})],l.prototype,"returnType",void 0),l=i=(0,r._)([(0,s.j)("esri.popup.ElementExpressionInfo")],l);const p=l;var d,u=o(63801);let c=d=class extends u.Z{constructor(t){super(t),this.expressionInfo=null,this.type="expression"}clone(){return new d({expressionInfo:this.expressionInfo?.clone()})}};(0,r._)([(0,n.Cb)({type:p,json:{write:!0}})],c.prototype,"expressionInfo",void 0),(0,r._)([(0,n.Cb)({type:["expression"],readOnly:!0,json:{read:!1,write:!0}})],c.prototype,"type",void 0),c=d=(0,r._)([(0,s.j)("esri.popup.content.ExpressionContent")],c);const h=c},9190:(t,e,o)=>{o.d(e,{Z:()=>c});var i,r=o(43697),n=o(22974),s=o(5600),a=(o(75215),o(52011)),l=o(30556),p=o(422),d=o(63801);let u=i=class extends d.Z{constructor(t){super(t),this.attributes=null,this.description=null,this.fieldInfos=null,this.title=null,this.type="fields"}writeFieldInfos(t,e){e.fieldInfos=t&&t.map((t=>t.toJSON()))}clone(){return new i((0,n.d9)({attributes:this.attributes,description:this.description,fieldInfos:this.fieldInfos,title:this.title}))}};(0,r._)([(0,s.Cb)({type:Object,json:{write:!0}})],u.prototype,"attributes",void 0),(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],u.prototype,"description",void 0),(0,r._)([(0,s.Cb)({type:[p.Z]})],u.prototype,"fieldInfos",void 0),(0,r._)([(0,l.c)("fieldInfos")],u.prototype,"writeFieldInfos",null),(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],u.prototype,"title",void 0),(0,r._)([(0,s.Cb)({type:["fields"],readOnly:!0,json:{read:!1,write:!0}})],u.prototype,"type",void 0),u=i=(0,r._)([(0,a.j)("esri.popup.content.FieldsContent")],u);const c=u},13151:(t,e,o)=>{o.d(e,{Z:()=>h});var i,r=o(43697),n=o(5600),s=(o(75215),o(67676),o(80442),o(52011)),a=o(35320),l=o(96674);let p=i=class extends l.wq{constructor(t){super(t),this.linkURL=null,this.sourceURL=null}clone(){return new i({linkURL:this.linkURL,sourceURL:this.sourceURL})}};(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],p.prototype,"linkURL",void 0),(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],p.prototype,"sourceURL",void 0),p=i=(0,r._)([(0,s.j)("esri.popup.content.support.ImageMediaInfoValue")],p);const d=p;var u;let c=u=class extends a.Z{constructor(t){super(t),this.refreshInterval=null,this.type="image",this.value=null}clone(){return new u({altText:this.altText,title:this.title,caption:this.caption,refreshInterval:this.refreshInterval,value:this.value?this.value.clone():null})}};(0,r._)([(0,n.Cb)({type:Number,json:{write:!0}})],c.prototype,"refreshInterval",void 0),(0,r._)([(0,n.Cb)({type:["image"],readOnly:!0,json:{read:!1,write:!0}})],c.prototype,"type",void 0),(0,r._)([(0,n.Cb)({type:d,json:{write:!0}})],c.prototype,"value",void 0),c=u=(0,r._)([(0,s.j)("esri.popup.content.ImageMediaInfo")],c);const h=c},55869:(t,e,o)=>{o.d(e,{Z:()=>d});var i,r=o(43697),n=o(5600),s=(o(75215),o(67676),o(80442),o(52011)),a=o(50379),l=o(87102);let p=i=class extends a.Z{constructor(t){super(t),this.type="line-chart"}clone(){return new i({altText:this.altText,title:this.title,caption:this.caption,value:this.value?this.value.clone():null})}};(0,r._)([(0,n.Cb)({type:["line-chart"],readOnly:!0,json:{type:["linechart"],read:!1,write:l.l.write}})],p.prototype,"type",void 0),p=i=(0,r._)([(0,s.j)("esri.popup.content.LineChartMediaInfo")],p);const d=p},10214:(t,e,o)=>{o.d(e,{Z:()=>w});var i,r=o(43697),n=o(22974),s=o(5600),a=(o(75215),o(71715)),l=o(52011),p=o(30556),d=o(41463),u=o(87131),c=o(63801),h=o(13151),y=o(55869),m=o(13353),f=o(79742);let v=i=class extends c.Z{constructor(t){super(t),this.activeMediaInfoIndex=null,this.attributes=null,this.description=null,this.mediaInfos=null,this.title=null,this.type="media"}readMediaInfos(t){return t&&t.map((t=>"image"===t.type?h.Z.fromJSON(t):"barchart"===t.type?d.Z.fromJSON(t):"columnchart"===t.type?u.Z.fromJSON(t):"linechart"===t.type?y.Z.fromJSON(t):"piechart"===t.type?m.Z.fromJSON(t):void 0)).filter(Boolean)}writeMediaInfos(t,e){e.mediaInfos=t&&t.map((t=>t.toJSON()))}clone(){return new i((0,n.d9)({activeMediaInfoIndex:this.activeMediaInfoIndex,attributes:this.attributes,description:this.description,mediaInfos:this.mediaInfos,title:this.title}))}};(0,r._)([(0,s.Cb)()],v.prototype,"activeMediaInfoIndex",void 0),(0,r._)([(0,s.Cb)({type:Object,json:{write:!0}})],v.prototype,"attributes",void 0),(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],v.prototype,"description",void 0),(0,r._)([(0,s.Cb)({types:[f.V]})],v.prototype,"mediaInfos",void 0),(0,r._)([(0,a.r)("mediaInfos")],v.prototype,"readMediaInfos",null),(0,r._)([(0,p.c)("mediaInfos")],v.prototype,"writeMediaInfos",null),(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],v.prototype,"title",void 0),(0,r._)([(0,s.Cb)({type:["media"],readOnly:!0,json:{read:!1,write:!0}})],v.prototype,"type",void 0),v=i=(0,r._)([(0,l.j)("esri.popup.content.MediaContent")],v);const w=v},13353:(t,e,o)=>{o.d(e,{Z:()=>d});var i,r=o(43697),n=o(5600),s=(o(75215),o(67676),o(80442),o(52011)),a=o(50379),l=o(87102);let p=i=class extends a.Z{constructor(t){super(t),this.type="pie-chart"}clone(){return new i({altText:this.altText,title:this.title,caption:this.caption,value:this.value?this.value.clone():null})}};(0,r._)([(0,n.Cb)({type:["pie-chart"],readOnly:!0,json:{type:["piechart"],read:!1,write:l.l.write}})],p.prototype,"type",void 0),p=i=(0,r._)([(0,s.j)("esri.popup.content.PieChartMediaInfo")],p);const d=p},71423:(t,e,o)=>{o.d(e,{Z:()=>u});var i=o(43697),r=o(2368),n=o(5600),s=o(75215),a=(o(67676),o(80442),o(52011)),l=o(63801),p=o(44729);let d=class extends((0,r.J)(l.Z)){constructor(t){super(t),this.description=null,this.displayCount=null,this.displayType="list",this.orderByFields=null,this.relationshipId=null,this.title=null,this.type="relationship"}};(0,i._)([(0,n.Cb)({type:String,json:{write:!0}})],d.prototype,"description",void 0),(0,i._)([(0,n.Cb)({type:Number,json:{type:s.z8,write:!0}})],d.prototype,"displayCount",void 0),(0,i._)([(0,n.Cb)({type:["list"],json:{write:!0}})],d.prototype,"displayType",void 0),(0,i._)([(0,n.Cb)({type:[p.Z],json:{write:!0}})],d.prototype,"orderByFields",void 0),(0,i._)([(0,n.Cb)({type:Number,json:{type:s.z8,write:!0}})],d.prototype,"relationshipId",void 0),(0,i._)([(0,n.Cb)({type:String,json:{write:!0}})],d.prototype,"title",void 0),(0,i._)([(0,n.Cb)({type:["relationship"],readOnly:!0,json:{read:!1,write:!0}})],d.prototype,"type",void 0),d=(0,i._)([(0,a.j)("esri.popup.content.RelationshipContent")],d);const u=d},44951:(t,e,o)=>{o.d(e,{Z:()=>p});var i,r=o(43697),n=o(5600),s=(o(75215),o(67676),o(80442),o(52011)),a=o(63801);let l=i=class extends a.Z{constructor(t){super(t),this.text=null,this.type="text"}clone(){return new i({text:this.text})}};(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],l.prototype,"text",void 0),(0,r._)([(0,n.Cb)({type:["text"],readOnly:!0,json:{read:!1,write:!0}})],l.prototype,"type",void 0),l=i=(0,r._)([(0,s.j)("esri.popup.content.TextContent")],l);const p=l},50379:(t,e,o)=>{o.d(e,{Z:()=>v});var i,r=o(43697),n=o(5600),s=(o(75215),o(67676),o(80442),o(52011)),a=o(35320),l=o(96674),p=o(22974),d=o(92036);let u=i=class extends d.Z{constructor(t){super(t),this.fieldName=null,this.tooltip=null,this.value=null}clone(){return new i({fieldName:this.fieldName,tooltip:this.tooltip,value:this.value})}};(0,r._)([(0,n.Cb)()],u.prototype,"fieldName",void 0),(0,r._)([(0,n.Cb)()],u.prototype,"tooltip",void 0),(0,r._)([(0,n.Cb)()],u.prototype,"value",void 0),u=i=(0,r._)([(0,s.j)("esri.popup.content.support.ChartMediaInfoValueSeries")],u);const c=u;var h;let y=h=class extends l.wq{constructor(t){super(t),this.fields=[],this.normalizeField=null,this.series=[],this.tooltipField=null}clone(){return new h({fields:(0,p.d9)(this.fields),normalizeField:this.normalizeField,tooltipField:this.tooltipField})}};(0,r._)([(0,n.Cb)({type:[String],json:{write:!0}})],y.prototype,"fields",void 0),(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],y.prototype,"normalizeField",void 0),(0,r._)([(0,n.Cb)({type:[c],json:{read:!1}})],y.prototype,"series",void 0),(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],y.prototype,"tooltipField",void 0),y=h=(0,r._)([(0,s.j)("esri.popup.content.support.ChartMediaInfoValue")],y);const m=y;let f=class extends a.Z{constructor(t){super(t),this.type=null,this.value=null}};(0,r._)([(0,n.Cb)({type:["bar-chart","column-chart","line-chart","pie-chart"],readOnly:!0,json:{read:!1,write:!0}})],f.prototype,"type",void 0),(0,r._)([(0,n.Cb)({type:m,json:{write:!0}})],f.prototype,"value",void 0),f=(0,r._)([(0,s.j)("esri.popup.content.mixins.ChartMediaInfo")],f);const v=f},35320:(t,e,o)=>{o.d(e,{Z:()=>l});var i=o(43697),r=o(96674),n=o(5600),s=(o(75215),o(67676),o(80442),o(52011));let a=class extends r.wq{constructor(t){super(t),this.altText=null,this.caption="",this.title="",this.type=null}};(0,i._)([(0,n.Cb)({type:String,json:{write:!0}})],a.prototype,"altText",void 0),(0,i._)([(0,n.Cb)({type:String,json:{write:!0}})],a.prototype,"caption",void 0),(0,i._)([(0,n.Cb)({type:String,json:{write:!0}})],a.prototype,"title",void 0),(0,i._)([(0,n.Cb)({type:["image","bar-chart","column-chart","line-chart","pie-chart"],readOnly:!0,json:{read:!1,write:!0}})],a.prototype,"type",void 0),a=(0,i._)([(0,s.j)("esri.popup.content.mixins.MediaInfo")],a);const l=a},87102:(t,e,o)=>{o.d(e,{l:()=>i});const i=(0,o(35454).w)()({barchart:"bar-chart",columnchart:"column-chart",linechart:"line-chart",piechart:"pie-chart"})},79742:(t,e,o)=>{o.d(e,{V:()=>l});var i=o(41463),r=o(87131),n=o(13151),s=o(55869),a=o(13353);const l={base:o(35320).Z,key:"type",defaultKeyValue:"image",typeMap:{"bar-chart":i.Z,"column-chart":r.Z,"line-chart":s.Z,"pie-chart":a.Z,image:n.Z}}},29986:(t,e,o)=>{o.d(e,{Z:()=>h});var i=o(43697),r=o(2368),n=o(96674),s=o(5600),a=o(75215),l=(o(67676),o(80442),o(36030)),p=o(52011),d=o(90344),u=o(18848);let c=class extends((0,r.J)(n.wq)){constructor(t){super(t),this.dateFormat=null,this.digitSeparator=!1,this.places=null}formatNumber(t){return(0,u.uf)(t,(0,u.sh)(this))}formatDate(t,e=!1){return this.dateFormat?(0,d.p6)(t,{...(0,d.Ze)(this.dateFormat),...e&&d.cZ}):this.formatNumber(t)}formatDateOnly(t){const e=(this.dateFormat&&(0,d.Ze)(this.dateFormat))??void 0;return(0,d.o8)(t,e)}formatTimeOnly(t){const e=(this.dateFormat&&(0,d.Ze)(this.dateFormat))??void 0;return(0,d.LJ)(t,e)}formatTimestamp(t){return(0,d.i$)(t,{...(0,d.Ze)(this.dateFormat??"short-date-short-time"),...d.o5})}formatRasterPixelValue(t){return t.includes("-")?t:t.trim().includes(",")?this._formatDelimitedString(t,",",", "):t.trim().includes(";")?this._formatDelimitedString(t,";","; "):t.trim().includes(" ")?this._formatDelimitedString(t," "," "):this.formatNumber(Number(t))}_formatDelimitedString(t,e,o){return t&&e&&o?t.trim().split(e).map((t=>this.formatNumber(Number(t)))).join(o):t}};(0,i._)([(0,l.J)(d.Xr)],c.prototype,"dateFormat",void 0),(0,i._)([(0,s.Cb)({type:Boolean,json:{write:!0}})],c.prototype,"digitSeparator",void 0),(0,i._)([(0,s.Cb)({type:a.z8,json:{write:!0}})],c.prototype,"places",void 0),c=(0,i._)([(0,p.j)("esri.popup.support.FieldInfoFormat")],c);const h=c},44729:(t,e,o)=>{o.d(e,{Z:()=>p});var i,r=o(43697),n=o(96674),s=o(5600),a=(o(75215),o(67676),o(80442),o(52011));let l=i=class extends n.wq{constructor(t){super(t),this.field=null,this.order=null}clone(){return new i({field:this.field,order:this.order})}};(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],l.prototype,"field",void 0),(0,r._)([(0,s.Cb)({type:["asc","desc"],json:{write:!0}})],l.prototype,"order",void 0),l=i=(0,r._)([(0,a.j)("esri.popup.support.RelatedRecordsInfoFieldOrder")],l);const p=l},99282:(t,e,o)=>{o.d(e,{a:()=>n});var i=o(67900),r=o(68441);const n={unknown:1,inches:(0,i.En)(1,"meters","inches"),feet:(0,i.En)(1,"meters","feet"),"us-feet":(0,i.En)(1,"meters","us-feet"),yards:(0,i.En)(1,"meters","yards"),miles:(0,i.En)(1,"meters","miles"),"nautical-miles":(0,i.En)(1,"meters","nautical-miles"),millimeters:(0,i.En)(1,"meters","millimeters"),centimeters:(0,i.En)(1,"meters","centimeters"),decimeters:(0,i.En)(1,"meters","decimeters"),meters:(0,i.En)(1,"meters","meters"),kilometers:(0,i.En)(1,"meters","kilometers"),"decimal-degrees":1/(0,i.ty)(1,"meters",r.sv.radius)}},86787:(t,e,o)=>{o.d(e,{Z:()=>b});var i,r=o(43697),n=o(35454),s=o(96674),a=o(70586),l=o(5600),p=(o(75215),o(67676),o(80442),o(71715)),d=o(52011),u=o(30556),c=o(35671);let h=i=class extends s.wq{constructor(t){super(t)}async collectRequiredFields(t,e){return(0,c.io)(t,e,this.expression)}clone(){return new i({expression:this.expression,title:this.title})}equals(t){return this.expression===t.expression&&this.title===t.title}};(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],h.prototype,"expression",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],h.prototype,"title",void 0),h=i=(0,r._)([(0,d.j)("esri.layers.support.FeatureExpressionInfo")],h);const y=h;var m,f=o(12541);const v=(0,n.w)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),w=new n.X({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let g=m=class extends s.wq{constructor(t){super(t),this.offset=null}readFeatureExpressionInfo(t,e){return null!=t?t:e.featureExpression&&0===e.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(t,e,o,i){e[o]=t.write({},i),"0"===t.expression&&(e.featureExpression={value:0})}get mode(){const{offset:t,featureExpressionInfo:e}=this;return this._isOverridden("mode")?this._get("mode"):null!=t||e?"relative-to-ground":"on-the-ground"}set mode(t){this._override("mode",t)}set unit(t){this._set("unit",t)}write(t,e){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(t,e):null}clone(){return new m({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}equals(t){return this.mode===t.mode&&this.offset===t.offset&&this.unit===t.unit&&(0,a._W)(this.featureExpressionInfo,t.featureExpressionInfo)}};(0,r._)([(0,l.Cb)({type:y,json:{write:!0}})],g.prototype,"featureExpressionInfo",void 0),(0,r._)([(0,p.r)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],g.prototype,"readFeatureExpressionInfo",null),(0,r._)([(0,u.c)("featureExpressionInfo",{featureExpressionInfo:{type:y},"featureExpression.value":{type:[0]}})],g.prototype,"writeFeatureExpressionInfo",null),(0,r._)([(0,l.Cb)({type:v.apiValues,nonNullable:!0,json:{type:v.jsonValues,read:v.read,write:{writer:v.write,isRequired:!0}}})],g.prototype,"mode",null),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],g.prototype,"offset",void 0),(0,r._)([(0,l.Cb)({type:f.f9,json:{type:String,read:w.read,write:w.write}})],g.prototype,"unit",null),g=m=(0,r._)([(0,d.j)("esri.layers.support.ElevationInfo")],g);const b=g},12541:(t,e,o)=>{o.d(e,{Z7:()=>r,f9:()=>n});var i=o(99282);function r(t){return 1/(i.a[t]||1)}const n=function(){const t=Object.keys(i.a);return t.sort(),t}()}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6472,5732],{5732:(e,t,r)=>{r.d(t,{c:()=>i,g:()=>s});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},57435:(e,t,r)=>{r.d(t,{Z:()=>u});var i=r(43697),s=r(46791),o=(r(20102),r(92604),r(26258),r(87538)),n=r(5600),l=r(52011);let a=class extends s.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.own((0,o.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new s.Z(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i._)([(0,n.Cb)()],a.prototype,"getCollections",void 0),(0,i._)([(0,n.Cb)()],a.prototype,"getChildrenFunction",void 0),(0,i._)([(0,n.Cb)()],a.prototype,"itemFilterFunction",void 0),a=(0,i._)([(0,l.j)("esri.core.CollectionFlattener")],a);const u=a},16453:(e,t,r)=>{r.d(t,{R:()=>b,w:()=>S});var i=r(43697),s=r(92036),o=r(70586),n=r(41103),l=r(22974),a=r(31263);class u{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.kk),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new u,r=this._originStores[a.s3.DEFAULTS];r&&r.forEach(((e,r)=>{t.set(r,(0,l.d9)(e),a.s3.DEFAULTS)}));for(let r=a.s3.SERVICE;r<a.kk;r++){const i=this._originStores[r];i&&i.forEach(((i,s)=>{e&&e.has(s)||t.set(s,(0,l.d9)(i),r)}))}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=a.s3.USER){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(e,t),!this._values.has(e)||(0,o.j0)(this._propertyOriginMap.get(e))<=r){const i=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),i!==t}return!1}delete(e,t=a.s3.USER){const r=this._originStores[t];if(!r)return;const i=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return i}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],i=r&&r.get(e),s=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,t),s!==i}originOf(e){return this._propertyOriginMap.get(e)||a.s3.DEFAULTS}forEach(e){this._values.forEach(e)}}var p=r(50549),y=r(1153),c=r(52011);const h=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,o.j0)((0,y.vw)(this)),r=t.store,i=new u;t.store=i,(0,n.M)(t,r,i)}read(e,t){(0,p.i)(this,e,t)}getAtOrigin(e,t){const r=d(this),i=(0,a.M9)(t);if("string"==typeof e)return r.get(e,i);const s={};return e.forEach((e=>{s[e]=r.get(e,i)})),s}originOf(e){return(0,a.x3)(this.originIdOf(e))}originIdOf(e){return d(this).originOf(e)}revert(e,t){const r=d(this),i=(0,a.M9)(t),s=(0,y.vw)(this);let o;o="string"==typeof e?"*"===e?r.keys(i):[e]:e,o.forEach((e=>{s.invalidate(e),r.revert(e,i),s.commit(e)}))}};return t=(0,i._)([(0,c.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function d(e){return(0,y.vw)(e).store}let f=class extends(h(s.Z)){};f=(0,i._)([(0,c.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],f);var g=r(76169);const m=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return v(this).delete(e,(0,a.M9)(t))}write(e,t){return(0,g.c)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,y.vw)(this).setAtOrigin(e,t,(0,a.M9)(r))}removeOrigin(e){const t=v(this),r=(0,a.M9)(e),i=t.keys(r);for(const e of i)t.originOf(e)===r&&t.set(e,t.get(e,r),a.s3.USER)}updateOrigin(e,t){const r=v(this),i=(0,a.M9)(t),s=this.get(e);for(let t=i+1;t<a.kk;++t)r.delete(e,t);r.set(e,s,i)}toJSON(e){return this.write({},e)}};return t=(0,i._)([(0,c.j)("esri.core.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function v(e){return(0,y.vw)(e).store}const b=e=>{let t=class extends(m(h(e))){constructor(...e){super(...e)}};return t=(0,i._)([(0,c.j)("esri.core.MultiOriginJSONSupport")],t),t};let S=class extends(b(s.Z)){};S=(0,i._)([(0,c.j)("esri.core.MultiOriginJSONSupport")],S)},42756:(e,t,r)=>{r.r(t),r.d(t,{default:()=>$});var i=r(43697),s=(r(66577),r(46791)),o=r(57435),n=r(16453),l=r(95330),a=r(17445),u=r(81271),p=r(5600),y=r(75215),c=(r(67676),r(80442),r(71715)),h=r(52011),d=r(30556),f=r(82971),g=r(87085),m=r(71612),v=r(38009),b=r(16859),S=r(34760),_=r(72965),w=r(21506),I=r(32448),L=r(96674),C=r(83379),O=r(19153),M=r(68773),G=r(40330),T=(r(51773),r(3172)),P=r(22974),E=r(60437),x=r(20322);r(91423),r(74889);const F={esriGeometryPoint:"points",esriGeometryPolyline:"polylines",esriGeometryPolygon:"polygons"};function k(e){const t=e.folders||[],r=t.slice(),i=new Map,s=new Map,o=new Map,n=new Map,l=new Map,a={esriGeometryPoint:s,esriGeometryPolyline:o,esriGeometryPolygon:n};(e.featureCollection&&e.featureCollection.layers||[]).forEach((e=>{const t=(0,P.d9)(e);t.featureSet.features=[];const r=e.featureSet.geometryType;i.set(r,t);const l=e.layerDefinition.objectIdField;"esriGeometryPoint"===r?Z(s,l,e.featureSet.features):"esriGeometryPolyline"===r?Z(o,l,e.featureSet.features):"esriGeometryPolygon"===r&&Z(n,l,e.featureSet.features)})),e.groundOverlays&&e.groundOverlays.forEach((e=>{l.set(e.id,e)})),t.forEach((t=>{t.networkLinkIds.forEach((i=>{const s=function(e,t,r){const i=function(e,t){let r;return t.some((t=>t.id===e&&(r=t,!0))),r}(e,r);return i&&(i.parentFolderId=t,i.networkLink=i),i}(i,t.id,e.networkLinks);s&&r.push(s)}))})),r.forEach((e=>{if(e.featureInfos){e.points=(0,P.d9)(i.get("esriGeometryPoint")),e.polylines=(0,P.d9)(i.get("esriGeometryPolyline")),e.polygons=(0,P.d9)(i.get("esriGeometryPolygon")),e.mapImages=[];for(const t of e.featureInfos)switch(t.type){case"esriGeometryPoint":case"esriGeometryPolyline":case"esriGeometryPolygon":{const r=a[t.type].get(t.id);r&&e[F[t.type]]?.featureSet.features.push(r);break}case"GroundOverlay":{const r=l.get(t.id);r&&e.mapImages.push(r);break}}e.fullExtent=j([e])}}));const u=j(r);return{folders:t,sublayers:r,extent:u}}function A(e,t,r,i){const s=G.id&&G.id.findCredential(e);e=(0,u.fl)(e,{token:s&&s.token});const o=M.default.kmlServiceUrl;return(0,T.default)(o,{query:{url:e,model:"simple",folders:"",refresh:0!==r||void 0,outSR:JSON.stringify(t)},responseType:"json",signal:i})}function R(e,t,r=null,i=[]){const s=[],o={},n=t.sublayers,l=t.folders.map((e=>e.id));return n.forEach((t=>{const n=new e;if(r?n.read(t,r):n.read(t),i.length&&l.includes(n.id)&&(n.visible=i.includes(n.id)),o[t.id]=n,null!=t.parentFolderId&&-1!==t.parentFolderId){const e=o[t.parentFolderId];e.sublayers||(e.sublayers=[]),e.sublayers?.unshift(n)}else s.unshift(n)})),s}function Z(e,t,r){r.forEach((r=>{e.set(r.attributes[t],r)}))}function j(e){const t=(0,E.Ue)(E.Gv),r=(0,E.Ue)(E.Gv);for(const i of e){if(i.polygons&&i.polygons.featureSet&&i.polygons.featureSet.features)for(const e of i.polygons.featureSet.features)(0,x.Yg)(t,e.geometry),(0,E.TC)(r,t);if(i.polylines&&i.polylines.featureSet&&i.polylines.featureSet.features)for(const e of i.polylines.featureSet.features)(0,x.Yg)(t,e.geometry),(0,E.TC)(r,t);if(i.points&&i.points.featureSet&&i.points.featureSet.features)for(const e of i.points.featureSet.features)(0,x.Yg)(t,e.geometry),(0,E.TC)(r,t);if(i.mapImages)for(const e of i.mapImages)(0,x.Yg)(t,e.extent),(0,E.TC)(r,t)}return(0,E.fS)(r,E.Gv)?void 0:{xmin:r[0],ymin:r[1],zmin:r[2],xmax:r[3],ymax:r[4],zmax:r[5],spatialReference:f.Z.WGS84}}var N,U=r(6570);let D=N=class extends(I.Z.EventedMixin((0,L.eC)(C.Z))){constructor(...e){super(...e),this.description=null,this.fullExtent=null,this.id=null,this.networkLink=null,this.parent=null,this.sublayers=null,this.title=null,this.sourceJSON=null,this.layer=null,this.addHandles([(0,a.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=this,e.layer=this.layer}),a.Z_),(0,a.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),a.Z_),(0,a.YP)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=this,t.layer=this.layer}),a.Z_),(0,a.YP)((()=>this.layer),(e=>{if(this.sublayers)for(const t of this.sublayers)t.layer=e}),a.Z_)])}initialize(){(0,a.N1)((()=>this.networkLink)).then((()=>(0,a.N1)((()=>!0===this.visible)))).then((()=>this.load()))}load(e){if(!this.networkLink)return;if(this.networkLink.viewFormat)return;const t=null!=e?e.signal:null,r=this._fetchService(this._get("networkLink")?.href??"",t).then((e=>{const t=j(e.sublayers);this.fullExtent=U.Z.fromJSON(t),this.sourceJSON=e;const r=(0,y.se)(s.Z.ofType(N),R(N,e));this.sublayers?this.sublayers.addMany(r):this.sublayers=r,this.layer?.emit("sublayer-update"),this.layer&&this.layer.notifyChange("visibleSublayers")}));return this.addResolvingPromise(r),Promise.resolve(this)}get visible(){return this._get("visible")}set visible(e){this._get("visible")!==e&&(this._set("visible",e),this.layer&&this.layer.notifyChange("visibleSublayers"))}readVisible(e,t){return!!t.visibility}_fetchService(e,t){return A(e,this.layer.outSpatialReference,this.layer.refreshInterval,t).then((e=>k(e.data)))}};(0,i._)([(0,p.Cb)()],D.prototype,"description",void 0),(0,i._)([(0,p.Cb)({type:U.Z})],D.prototype,"fullExtent",void 0),(0,i._)([(0,p.Cb)()],D.prototype,"id",void 0),(0,i._)([(0,p.Cb)({readOnly:!0,value:null})],D.prototype,"networkLink",void 0),(0,i._)([(0,p.Cb)({json:{write:{allowNull:!0}}})],D.prototype,"parent",void 0),(0,i._)([(0,p.Cb)({type:s.Z.ofType(N),json:{write:{allowNull:!0}}})],D.prototype,"sublayers",void 0),(0,i._)([(0,p.Cb)({value:null,json:{read:{source:"name",reader:e=>(0,O.Cb)(e)}}})],D.prototype,"title",void 0),(0,i._)([(0,p.Cb)({value:!0})],D.prototype,"visible",null),(0,i._)([(0,c.r)("visible",["visibility"])],D.prototype,"readVisible",null),(0,i._)([(0,p.Cb)()],D.prototype,"sourceJSON",void 0),(0,i._)([(0,p.Cb)()],D.prototype,"layer",void 0),D=N=(0,i._)([(0,h.j)("esri.layers.support.KMLSublayer")],D);const J=D,H=["kml","xml"];let q=class extends((0,m.h)((0,S.Q)((0,_.M)((0,v.q)((0,b.I)((0,n.R)(g.Z))))))){constructor(...e){super(...e),this._visibleFolders=[],this.allSublayers=new o.Z({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.outSpatialReference=f.Z.WGS84,this.path=null,this.legendEnabled=!1,this.operationalLayerType="KML",this.sublayers=null,this.type="kml",this.url=null}initialize(){this.addHandles([(0,a.YP)((()=>this.sublayers),((e,t)=>{t&&t.forEach((e=>{e.parent=null,e.layer=null})),e&&e.forEach((e=>{e.parent=this,e.layer=this}))}),a.Z_),this.on("sublayer-update",(()=>this.notifyChange("fullExtent")))])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}readSublayersFromItemOrWebMap(e,t){this._visibleFolders=t.visibleFolders}readSublayers(e,t,r){return R(J,t,r,this._visibleFolders)}writeSublayers(e,t){const r=[],i=e.toArray();for(;i.length;){const e=i[0];e.networkLink||(e.visible&&r.push(e.id),e.sublayers&&i.push(...e.sublayers.toArray())),i.shift()}t.visibleFolders=r}get title(){const e=this._get("title");return e&&"defaults"!==this.originOf("title")?e:this.url?(0,u.vt)(this.url,H)||"KML":e||""}set title(e){this._set("title",e)}get visibleSublayers(){const e=this.sublayers,t=[],r=e=>{e.visible&&(t.push(e),e.sublayers&&e.sublayers.forEach(r))};return e&&e.forEach(r),t}get fullExtent(){return this._recomputeFullExtent()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["KML"],supportsData:!1},e).catch(l.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}destroy(){super.destroy(),this.allSublayers.destroy()}async _fetchService(e){const t=k((await Promise.resolve().then((()=>this.resourceInfo?{ssl:!1,data:this.resourceInfo}:A(this.url??"",this.outSpatialReference,this.refreshInterval,e)))).data);t&&this.read(t,{origin:"service"})}_recomputeFullExtent(){let e=null;null!=this.extent&&(e=this.extent.clone());const t=r=>{if(r.sublayers)for(const i of r.sublayers.items)t(i),i.visible&&i.fullExtent&&(null!=e?e.union(i.fullExtent):e=i.fullExtent.clone())};return t(this),e}};(0,i._)([(0,p.Cb)({readOnly:!0})],q.prototype,"allSublayers",void 0),(0,i._)([(0,p.Cb)({type:f.Z})],q.prototype,"outSpatialReference",void 0),(0,i._)([(0,p.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],q.prototype,"path",void 0),(0,i._)([(0,p.Cb)({readOnly:!0,json:{read:!1,write:!1}})],q.prototype,"legendEnabled",void 0),(0,i._)([(0,p.Cb)({type:["show","hide","hide-children"]})],q.prototype,"listMode",void 0),(0,i._)([(0,p.Cb)({type:["KML"]})],q.prototype,"operationalLayerType",void 0),(0,i._)([(0,p.Cb)({})],q.prototype,"resourceInfo",void 0),(0,i._)([(0,p.Cb)({type:s.Z.ofType(J),json:{write:{ignoreOrigin:!0}}})],q.prototype,"sublayers",void 0),(0,i._)([(0,c.r)(["web-map","portal-item"],"sublayers",["visibleFolders"])],q.prototype,"readSublayersFromItemOrWebMap",null),(0,i._)([(0,c.r)("service","sublayers",["sublayers"])],q.prototype,"readSublayers",null),(0,i._)([(0,d.c)("sublayers")],q.prototype,"writeSublayers",null),(0,i._)([(0,p.Cb)({readOnly:!0,json:{read:!1}})],q.prototype,"type",void 0),(0,i._)([(0,p.Cb)({json:{origins:{"web-map":{read:{source:"title"}}},write:{ignoreOrigin:!0}}})],q.prototype,"title",null),(0,i._)([(0,p.Cb)(w.HQ)],q.prototype,"url",void 0),(0,i._)([(0,p.Cb)({readOnly:!0})],q.prototype,"visibleSublayers",null),(0,i._)([(0,p.Cb)({type:U.Z})],q.prototype,"extent",void 0),(0,i._)([(0,p.Cb)()],q.prototype,"fullExtent",null),q=(0,i._)([(0,h.j)("esri.layers.KMLLayer")],q);const $=q},38009:(e,t,r)=>{r.d(t,{q:()=>g});var i=r(43697),s=r(20102),o=r(81271),n=r(5600),l=(r(75215),r(67676),r(80442),r(52011)),a=r(30556),u=r(50549),p=r(76169);const y={ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CSV:!0,GeoRSS:!0,GeoJSON:!0,GroupLayer:!0,KML:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},c={ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0,BingMapsAerial:!0,BingMapsRoad:!0,BingMapsHybrid:!0},h={ArcGISFeatureLayer:!0},d={"web-scene/operational-layers":{ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,GroupLayer:!0,IntegratedMeshLayer:!0,OGCFeatureLayer:!0,PointCloudLayer:!0,WebTiledLayer:!0,CSV:!0,GeoJSON:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,KML:!0,RasterDataLayer:!0,Voxel:!0,LineOfSightLayer:!0},"web-scene/basemap":{ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,WebTiledLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,ArcGISImageServiceLayer:!0,WMS:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-map/operational-layers":y,"web-map/basemap":c,"web-map/tables":h,"link-chart/operational-layers":{...y,LinkChartLayer:!0},"link-chart/basemap":c,"link-chart/tables":h,"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISSceneServiceLayer:!0,PointCloudLayer:!0,BuildingSceneLayer:!0,IntegratedMeshLayer:!0,OrientedImageryLayer:!0}};var f=r(21506);const g=e=>{let t=class extends e{constructor(){super(...arguments),this.title=null}writeListMode(e,t,r,i){(i&&"ground"===i.layerContainerType||e&&(0,p.d)(this,r,{},i))&&(t[r]=e)}writeOperationalLayerType(e,t,r,i){!e||i&&"tables"===i.layerContainerType||(t.layerType=e)}writeTitle(e,t){t.title=e??"Layer"}read(e,t){t&&(t.layer=this),(0,u.$)(this,e,(t=>super.read(e,t)),t)}write(e,t){if(t?.origin){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`,r=d[e];let i=!!r?.[this.operationalLayerType];if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(i=!1),"ArcGISDimensionLayer"===this.operationalLayerType&&"web-map/operational-layers"===e&&(i=!1),!i)return t.messages?.push(new s.Z("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const r=super.write(e,{...t,layer:this}),i=!!t&&!!t.messages&&!!t.messages.filter((e=>e instanceof s.Z&&"web-document-write:property-required"===e.name)).length;return(0,o.jc)(r?.url)?(t?.messages?.push(new s.Z("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&i?null:r}beforeSave(){}};return(0,i._)([(0,n.Cb)({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],t.prototype,"id",void 0),(0,i._)([(0,n.Cb)(f.rT)],t.prototype,"listMode",void 0),(0,i._)([(0,a.c)("listMode")],t.prototype,"writeListMode",null),(0,i._)([(0,n.Cb)({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1}}}})],t.prototype,"operationalLayerType",void 0),(0,i._)([(0,a.c)("operationalLayerType")],t.prototype,"writeOperationalLayerType",null),(0,i._)([(0,n.Cb)(f.Oh)],t.prototype,"opacity",void 0),(0,i._)([(0,n.Cb)({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],t.prototype,"title",void 0),(0,i._)([(0,a.c)("title"),(0,a.c)(["web-scene"],"title")],t.prototype,"writeTitle",null),(0,i._)([(0,n.Cb)({type:Boolean,json:{name:"visibility"}})],t.prototype,"visible",void 0),t=(0,i._)([(0,l.j)("esri.layers.mixins.OperationalLayer")],t),t}},16859:(e,t,r)=>{r.d(t,{I:()=>w});var i=r(43697),s=r(68773),o=r(40330),n=r(3172),l=r(66643),a=r(20102),u=r(92604),p=r(70586),y=r(95330),c=r(81271),h=r(5600),d=(r(75215),r(67676),r(80442),r(71715)),f=r(52011),g=r(30556),m=r(84230),v=r(48522),b=r(15235),S=r(86082),_=r(14661);const w=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new b.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:i}=await r.e(8062).then(r.bind(r,18062));return(0,y.k_)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,y.D_)(e)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,y.r9)(e),!0))))}async _setUserPrivileges(e,t){if(!s.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,y.r9)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,_.Ss)(r);let s,n;if(i)s=r.portal.url;else try{s=await(0,m.oP)(this.url,t)}catch(e){(0,y.r9)(e)}if(!s||!(0,c.Zo)(s,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;n=await(o.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,y.r9)(e)}if(!n)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(i?await r.reload():(r=new b.default({id:e,portal:{url:s}}),await r.load(t)),r.portal.user)return(0,_.Ss)(r)}catch(e){(0,y.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,y.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const r=I.credential===t?I.user:await this._fetchEditingUser(e);return I.credential=t,I.user=r,null==r||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=o.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=v.Z.getDefault();if(s&&s.loaded&&(0,c.Fv)(s.restUrl)===(0,c.Fv)(i))return s.user;const a=`${i}/community/self`,u=null!=e?e.signal:null,p=await(0,l.q6)((0,n.default)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?S.default.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,i=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||v.Z.getDefault());return r&&i&&!(0,c.tm)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,h.Cb)({type:b.default})],t.prototype,"portalItem",null),(0,i._)([(0,d.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,g.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,h.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,h.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,h.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,h.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,f.j)("esri.layers.mixins.PortalLayer")],t),t},I={credential:null,user:null}},34760:(e,t,r)=>{r.d(t,{Q:()=>m});var i=r(43697),s=r(92604),o=r(95330),n=r(5600),l=(r(75215),r(67676),r(80442),r(52011)),a=r(46791),u=(r(20102),r(26258),r(87538));const p=new a.Z,y=new WeakMap;function c(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e}function h(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:h(t,e%t):0}let d=0,f=0;function g(){const e=Date.now();for(const t of p)t.refreshInterval&&e-(y.get(t)??0)+5>=6e4*t.refreshInterval&&(y.set(t,e),t.refresh(e))}(0,u.EH)((()=>{const e=Date.now();let t=0;for(const r of p)t=h(Math.round(6e4*r.refreshInterval),t),r.refreshInterval?y.get(r)||y.set(r,e):y.delete(r);if(t!==f){if(f=t,clearInterval(d),0===f)return void(d=0);d=setInterval(g,f)}}));const m=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,o.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||function(e){c(e)&&p.push(e)}(this)}),(()=>{}))}destroy(){c(this)&&p.includes(this)&&p.remove(this)}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,o.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{s.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}};return(0,i._)([(0,n.Cb)({type:Number,cast:e=>e>=.1?e:e<=0?0:.1,json:{write:!0}})],t.prototype,"refreshInterval",void 0),(0,i._)([(0,n.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,i._)([(0,n.Cb)()],t.prototype,"refreshParameters",null),t=(0,i._)([(0,l.j)("esri.layers.mixins.RefreshableLayer")],t),t}},74889:(e,t,r)=>{r.d(t,{Z:()=>b});var i,s=r(43697),o=r(66577),n=r(38171),l=r(35454),a=r(96674),u=r(22974),p=r(5600),y=(r(75215),r(71715)),c=r(52011),h=r(30556),d=r(82971),f=r(33955),g=r(1231);const m=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=i=class extends a.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=d.Z.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const s=e[t],o=n.Z.fromJSON(s),l=s.geometry&&s.geometry.spatialReference;null==o.geometry||l||(o.geometry.spatialReference=r);const a=s.aggregateGeometries,u=o.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],i=a[e],s=i?.spatialReference;null==t||s||(t.spatialReference=r)}i.push(o)}return i}writeGeometryType(e,t,r,i){if(e)return void m.write(e,t,r,i);const{features:s}=this;if(s)for(const e of s)if(e&&null!=e.geometry)return void m.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,f.im)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=d.Z.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,u.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e&&e[r];i.geometry=t&&t.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,s]}=e,o=this.features,n=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((s-e)/r)));for(let e=0,t=o.length;e<t;e++)n?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,s],scale:[o,n]}=r,l=this._getHydrationFunction(e,(e=>e*o+i),(e=>s-e*n));for(const{geometry:e}of t)null!=e&&l&&l(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,s;const o=[];for(let n=0,l=e.length;n<l;n++){const l=e[n];if(n>0){const e=t(l[0]),n=r(l[1]);e===i&&n===s||(o.push([e-i,n-s]),i=e,s=n)}else i=t(l[0]),s=r(l[1]),o.push([i,s])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,f.oU)(e)?e.rings:e.paths,s=[];for(let e=0,o=i.length;e<o;e++){const o=i[e],n=this._quantizePoints(o,t,r);n&&s.push(n)}return s.length>0?((0,f.oU)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y)}:"polyline"===e||"polygon"===e?e=>{const i=(0,f.oU)(e)?e.rings:e.paths;let s,o;for(let e=0,n=i.length;e<n;e++){const n=i[e];for(let e=0,i=n.length;e<i;e++){const i=n[e];e>0?(s+=i[0],o+=i[1]):(s=i[0],o=i[1]),i[0]=t(s),i[1]=r(o)}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax)}:"multipoint"===e?e=>{const i=e.points;let s,o;for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(s+=n[0],o+=n[1]):(s=n[0],o=n[1]),n[0]=t(s),n[1]=r(o)}}:null}};(0,s._)([(0,p.Cb)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,p.Cb)({type:[n.Z],json:{write:!0}})],v.prototype,"features",void 0),(0,s._)([(0,y.r)("features")],v.prototype,"readFeatures",null),(0,s._)([(0,p.Cb)({type:[g.Z],json:{write:!0}})],v.prototype,"fields",void 0),(0,s._)([(0,p.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:m.read}}})],v.prototype,"geometryType",void 0),(0,s._)([(0,h.c)("geometryType")],v.prototype,"writeGeometryType",null),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,s._)([(0,p.Cb)({types:o.qM,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,s._)([(0,y.r)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,s._)([(0,p.Cb)({type:d.Z,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,s._)([(0,h.c)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,s._)([(0,p.Cb)({json:{write:!0}})],v.prototype,"transform",void 0),v=i=(0,s._)([(0,c.j)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0;const b=v}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6472,5732],{5732:(e,t,r)=>{r.d(t,{c:()=>i,g:()=>s});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},57435:(e,t,r)=>{r.d(t,{Z:()=>u});var i=r(43697),s=r(46791),o=(r(20102),r(92604),r(26258),r(87538)),n=r(5600),l=r(52011);let a=class extends s.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.own((0,o.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new s.Z(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i._)([(0,n.Cb)()],a.prototype,"getCollections",void 0),(0,i._)([(0,n.Cb)()],a.prototype,"getChildrenFunction",void 0),(0,i._)([(0,n.Cb)()],a.prototype,"itemFilterFunction",void 0),a=(0,i._)([(0,l.j)("esri.core.CollectionFlattener")],a);const u=a},16453:(e,t,r)=>{r.d(t,{R:()=>b,w:()=>S});var i=r(43697),s=r(92036),o=r(70586),n=r(41103),l=r(22974),a=r(31263);class u{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.kk),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new u,r=this._originStores[a.s3.DEFAULTS];r&&r.forEach(((e,r)=>{t.set(r,(0,l.d9)(e),a.s3.DEFAULTS)}));for(let r=a.s3.SERVICE;r<a.kk;r++){const i=this._originStores[r];i&&i.forEach(((i,s)=>{e&&e.has(s)||t.set(s,(0,l.d9)(i),r)}))}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=a.s3.USER){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(e,t),!this._values.has(e)||(0,o.j0)(this._propertyOriginMap.get(e))<=r){const i=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),i!==t}return!1}delete(e,t=a.s3.USER){const r=this._originStores[t];if(!r)return;const i=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return i}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],i=r&&r.get(e),s=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,t),s!==i}originOf(e){return this._propertyOriginMap.get(e)||a.s3.DEFAULTS}forEach(e){this._values.forEach(e)}}var p=r(50549),y=r(1153),c=r(52011);const h=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,o.j0)((0,y.vw)(this)),r=t.store,i=new u;t.store=i,(0,n.M)(t,r,i)}read(e,t){(0,p.i)(this,e,t)}getAtOrigin(e,t){const r=d(this),i=(0,a.M9)(t);if("string"==typeof e)return r.get(e,i);const s={};return e.forEach((e=>{s[e]=r.get(e,i)})),s}originOf(e){return(0,a.x3)(this.originIdOf(e))}originIdOf(e){return d(this).originOf(e)}revert(e,t){const r=d(this),i=(0,a.M9)(t),s=(0,y.vw)(this);let o;o="string"==typeof e?"*"===e?r.keys(i):[e]:e,o.forEach((e=>{s.invalidate(e),r.revert(e,i),s.commit(e)}))}};return t=(0,i._)([(0,c.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function d(e){return(0,y.vw)(e).store}let f=class extends(h(s.Z)){};f=(0,i._)([(0,c.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],f);var g=r(76169);const m=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return v(this).delete(e,(0,a.M9)(t))}write(e,t){return(0,g.c)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,y.vw)(this).setAtOrigin(e,t,(0,a.M9)(r))}removeOrigin(e){const t=v(this),r=(0,a.M9)(e),i=t.keys(r);for(const e of i)t.originOf(e)===r&&t.set(e,t.get(e,r),a.s3.USER)}updateOrigin(e,t){const r=v(this),i=(0,a.M9)(t),s=this.get(e);for(let t=i+1;t<a.kk;++t)r.delete(e,t);r.set(e,s,i)}toJSON(e){return this.write({},e)}};return t=(0,i._)([(0,c.j)("esri.core.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function v(e){return(0,y.vw)(e).store}const b=e=>{let t=class extends(m(h(e))){constructor(...e){super(...e)}};return t=(0,i._)([(0,c.j)("esri.core.MultiOriginJSONSupport")],t),t};let S=class extends(b(s.Z)){};S=(0,i._)([(0,c.j)("esri.core.MultiOriginJSONSupport")],S)},42756:(e,t,r)=>{r.r(t),r.d(t,{default:()=>q});var i=r(43697),s=(r(66577),r(46791)),o=r(57435),n=r(16453),l=r(95330),a=r(17445),u=r(81271),p=r(5600),y=r(75215),c=(r(67676),r(80442),r(71715)),h=r(52011),d=r(30556),f=r(82971),g=r(87085),m=r(71612),v=r(38009),b=r(16859),S=r(34760),_=r(72965),w=r(21506),I=r(32448),L=r(96674),C=r(83379),O=r(19153),M=r(68773),G=r(40330),T=(r(51773),r(3172)),x=r(22974),P=r(60437),E=r(20322);r(91423),r(74889);const F={esriGeometryPoint:"points",esriGeometryPolyline:"polylines",esriGeometryPolygon:"polygons"};function k(e){const t=e.folders||[],r=t.slice(),i=new Map,s=new Map,o=new Map,n=new Map,l=new Map,a={esriGeometryPoint:s,esriGeometryPolyline:o,esriGeometryPolygon:n};(e.featureCollection&&e.featureCollection.layers||[]).forEach((e=>{const t=(0,x.d9)(e);t.featureSet.features=[];const r=e.featureSet.geometryType;i.set(r,t);const l=e.layerDefinition.objectIdField;"esriGeometryPoint"===r?Z(s,l,e.featureSet.features):"esriGeometryPolyline"===r?Z(o,l,e.featureSet.features):"esriGeometryPolygon"===r&&Z(n,l,e.featureSet.features)})),e.groundOverlays&&e.groundOverlays.forEach((e=>{l.set(e.id,e)})),t.forEach((t=>{t.networkLinkIds.forEach((i=>{const s=function(e,t,r){const i=function(e,t){let r;return t.some((t=>t.id===e&&(r=t,!0))),r}(e,r);return i&&(i.parentFolderId=t,i.networkLink=i),i}(i,t.id,e.networkLinks);s&&r.push(s)}))})),r.forEach((e=>{if(e.featureInfos){e.points=(0,x.d9)(i.get("esriGeometryPoint")),e.polylines=(0,x.d9)(i.get("esriGeometryPolyline")),e.polygons=(0,x.d9)(i.get("esriGeometryPolygon")),e.mapImages=[];for(const t of e.featureInfos)switch(t.type){case"esriGeometryPoint":case"esriGeometryPolyline":case"esriGeometryPolygon":{const r=a[t.type].get(t.id);r&&e[F[t.type]]?.featureSet.features.push(r);break}case"GroundOverlay":{const r=l.get(t.id);r&&e.mapImages.push(r);break}}e.fullExtent=j([e])}}));const u=j(r);return{folders:t,sublayers:r,extent:u}}function A(e,t,r,i){const s=G.id&&G.id.findCredential(e);e=(0,u.fl)(e,{token:s&&s.token});const o=M.default.kmlServiceUrl;return(0,T.default)(o,{query:{url:e,model:"simple",folders:"",refresh:0!==r||void 0,outSR:JSON.stringify(t)},responseType:"json",signal:i})}function R(e,t,r=null,i=[]){const s=[],o={},n=t.sublayers,l=t.folders.map((e=>e.id));return n.forEach((t=>{const n=new e;if(r?n.read(t,r):n.read(t),i.length&&l.includes(n.id)&&(n.visible=i.includes(n.id)),o[t.id]=n,null!=t.parentFolderId&&-1!==t.parentFolderId){const e=o[t.parentFolderId];e.sublayers||(e.sublayers=[]),e.sublayers?.unshift(n)}else s.unshift(n)})),s}function Z(e,t,r){r.forEach((r=>{e.set(r.attributes[t],r)}))}function j(e){const t=(0,P.Ue)(P.Gv),r=(0,P.Ue)(P.Gv);for(const i of e){if(i.polygons&&i.polygons.featureSet&&i.polygons.featureSet.features)for(const e of i.polygons.featureSet.features)(0,E.Yg)(t,e.geometry),(0,P.TC)(r,t);if(i.polylines&&i.polylines.featureSet&&i.polylines.featureSet.features)for(const e of i.polylines.featureSet.features)(0,E.Yg)(t,e.geometry),(0,P.TC)(r,t);if(i.points&&i.points.featureSet&&i.points.featureSet.features)for(const e of i.points.featureSet.features)(0,E.Yg)(t,e.geometry),(0,P.TC)(r,t);if(i.mapImages)for(const e of i.mapImages)(0,E.Yg)(t,e.extent),(0,P.TC)(r,t)}return(0,P.fS)(r,P.Gv)?void 0:{xmin:r[0],ymin:r[1],zmin:r[2],xmax:r[3],ymax:r[4],zmax:r[5],spatialReference:f.Z.WGS84}}var N,U=r(6570);let D=N=class extends(I.Z.EventedMixin((0,L.eC)(C.Z))){constructor(...e){super(...e),this.description=null,this.fullExtent=null,this.id=null,this.networkLink=null,this.parent=null,this.sublayers=null,this.title=null,this.sourceJSON=null,this.layer=null,this.addHandles([(0,a.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=this,e.layer=this.layer}),a.Z_),(0,a.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),a.Z_),(0,a.YP)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=this,t.layer=this.layer}),a.Z_),(0,a.YP)((()=>this.layer),(e=>{if(this.sublayers)for(const t of this.sublayers)t.layer=e}),a.Z_)])}initialize(){(0,a.N1)((()=>this.networkLink)).then((()=>(0,a.N1)((()=>!0===this.visible)))).then((()=>this.load()))}load(e){if(!this.networkLink)return;if(this.networkLink.viewFormat)return;const t=null!=e?e.signal:null,r=this._fetchService(this._get("networkLink")?.href??"",t).then((e=>{const t=j(e.sublayers);this.fullExtent=U.Z.fromJSON(t),this.sourceJSON=e;const r=(0,y.se)(s.Z.ofType(N),R(N,e));this.sublayers?this.sublayers.addMany(r):this.sublayers=r,this.layer?.emit("sublayer-update"),this.layer&&this.layer.notifyChange("visibleSublayers")}));return this.addResolvingPromise(r),Promise.resolve(this)}get visible(){return this._get("visible")}set visible(e){this._get("visible")!==e&&(this._set("visible",e),this.layer&&this.layer.notifyChange("visibleSublayers"))}readVisible(e,t){return!!t.visibility}_fetchService(e,t){return A(e,this.layer.outSpatialReference,this.layer.refreshInterval,t).then((e=>k(e.data)))}};(0,i._)([(0,p.Cb)()],D.prototype,"description",void 0),(0,i._)([(0,p.Cb)({type:U.Z})],D.prototype,"fullExtent",void 0),(0,i._)([(0,p.Cb)()],D.prototype,"id",void 0),(0,i._)([(0,p.Cb)({readOnly:!0,value:null})],D.prototype,"networkLink",void 0),(0,i._)([(0,p.Cb)({json:{write:{allowNull:!0}}})],D.prototype,"parent",void 0),(0,i._)([(0,p.Cb)({type:s.Z.ofType(N),json:{write:{allowNull:!0}}})],D.prototype,"sublayers",void 0),(0,i._)([(0,p.Cb)({value:null,json:{read:{source:"name",reader:e=>(0,O.Cb)(e)}}})],D.prototype,"title",void 0),(0,i._)([(0,p.Cb)({value:!0})],D.prototype,"visible",null),(0,i._)([(0,c.r)("visible",["visibility"])],D.prototype,"readVisible",null),(0,i._)([(0,p.Cb)()],D.prototype,"sourceJSON",void 0),(0,i._)([(0,p.Cb)()],D.prototype,"layer",void 0),D=N=(0,i._)([(0,h.j)("esri.layers.support.KMLSublayer")],D);const J=D,H=["kml","xml"];let z=class extends((0,m.h)((0,S.Q)((0,_.M)((0,v.q)((0,b.I)((0,n.R)(g.Z))))))){constructor(...e){super(...e),this._visibleFolders=[],this.allSublayers=new o.Z({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.outSpatialReference=f.Z.WGS84,this.path=null,this.legendEnabled=!1,this.operationalLayerType="KML",this.sublayers=null,this.type="kml",this.url=null}initialize(){this.addHandles([(0,a.YP)((()=>this.sublayers),((e,t)=>{t&&t.forEach((e=>{e.parent=null,e.layer=null})),e&&e.forEach((e=>{e.parent=this,e.layer=this}))}),a.Z_),this.on("sublayer-update",(()=>this.notifyChange("fullExtent")))])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}readSublayersFromItemOrWebMap(e,t){this._visibleFolders=t.visibleFolders}readSublayers(e,t,r){return R(J,t,r,this._visibleFolders)}writeSublayers(e,t){const r=[],i=e.toArray();for(;i.length;){const e=i[0];e.networkLink||(e.visible&&r.push(e.id),e.sublayers&&i.push(...e.sublayers.toArray())),i.shift()}t.visibleFolders=r}get title(){const e=this._get("title");return e&&"defaults"!==this.originOf("title")?e:this.url?(0,u.vt)(this.url,H)||"KML":e||""}set title(e){this._set("title",e)}get visibleSublayers(){const e=this.sublayers,t=[],r=e=>{e.visible&&(t.push(e),e.sublayers&&e.sublayers.forEach(r))};return e&&e.forEach(r),t}get fullExtent(){return this._recomputeFullExtent()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["KML"],supportsData:!1},e).catch(l.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}destroy(){super.destroy(),this.allSublayers.destroy()}async _fetchService(e){const t=k((await Promise.resolve().then((()=>this.resourceInfo?{ssl:!1,data:this.resourceInfo}:A(this.url??"",this.outSpatialReference,this.refreshInterval,e)))).data);t&&this.read(t,{origin:"service"})}_recomputeFullExtent(){let e=null;null!=this.extent&&(e=this.extent.clone());const t=r=>{if(r.sublayers)for(const i of r.sublayers.items)t(i),i.visible&&i.fullExtent&&(null!=e?e.union(i.fullExtent):e=i.fullExtent.clone())};return t(this),e}};(0,i._)([(0,p.Cb)({readOnly:!0})],z.prototype,"allSublayers",void 0),(0,i._)([(0,p.Cb)({type:f.Z})],z.prototype,"outSpatialReference",void 0),(0,i._)([(0,p.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],z.prototype,"path",void 0),(0,i._)([(0,p.Cb)({readOnly:!0,json:{read:!1,write:!1}})],z.prototype,"legendEnabled",void 0),(0,i._)([(0,p.Cb)({type:["show","hide","hide-children"]})],z.prototype,"listMode",void 0),(0,i._)([(0,p.Cb)({type:["KML"]})],z.prototype,"operationalLayerType",void 0),(0,i._)([(0,p.Cb)({})],z.prototype,"resourceInfo",void 0),(0,i._)([(0,p.Cb)({type:s.Z.ofType(J),json:{write:{ignoreOrigin:!0}}})],z.prototype,"sublayers",void 0),(0,i._)([(0,c.r)(["web-map","portal-item"],"sublayers",["visibleFolders"])],z.prototype,"readSublayersFromItemOrWebMap",null),(0,i._)([(0,c.r)("service","sublayers",["sublayers"])],z.prototype,"readSublayers",null),(0,i._)([(0,d.c)("sublayers")],z.prototype,"writeSublayers",null),(0,i._)([(0,p.Cb)({readOnly:!0,json:{read:!1}})],z.prototype,"type",void 0),(0,i._)([(0,p.Cb)({json:{origins:{"web-map":{read:{source:"title"}}},write:{ignoreOrigin:!0}}})],z.prototype,"title",null),(0,i._)([(0,p.Cb)(w.HQ)],z.prototype,"url",void 0),(0,i._)([(0,p.Cb)({readOnly:!0})],z.prototype,"visibleSublayers",null),(0,i._)([(0,p.Cb)({type:U.Z})],z.prototype,"extent",void 0),(0,i._)([(0,p.Cb)()],z.prototype,"fullExtent",null),z=(0,i._)([(0,h.j)("esri.layers.KMLLayer")],z);const q=z},38009:(e,t,r)=>{r.d(t,{q:()=>g});var i=r(43697),s=r(20102),o=r(81271),n=r(5600),l=(r(75215),r(67676),r(80442),r(52011)),a=r(30556),u=r(50549),p=r(76169);const y={ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CSV:!0,GeoRSS:!0,GeoJSON:!0,GroupLayer:!0,KML:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},c={ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0,BingMapsAerial:!0,BingMapsRoad:!0,BingMapsHybrid:!0},h={ArcGISFeatureLayer:!0},d={"web-scene/operational-layers":{ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,GroupLayer:!0,IntegratedMeshLayer:!0,OGCFeatureLayer:!0,PointCloudLayer:!0,WebTiledLayer:!0,CSV:!0,GeoJSON:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,KML:!0,RasterDataLayer:!0,Voxel:!0,LineOfSightLayer:!0},"web-scene/basemap":{ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,WebTiledLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,ArcGISImageServiceLayer:!0,WMS:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-map/operational-layers":y,"web-map/basemap":c,"web-map/tables":h,"link-chart/operational-layers":{...y,LinkChartLayer:!0},"link-chart/basemap":c,"link-chart/tables":h,"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISSceneServiceLayer:!0,PointCloudLayer:!0,BuildingSceneLayer:!0,IntegratedMeshLayer:!0,OrientedImageryLayer:!0}};var f=r(21506);const g=e=>{let t=class extends e{constructor(){super(...arguments),this.title=null}writeListMode(e,t,r,i){(i&&"ground"===i.layerContainerType||e&&(0,p.d)(this,r,{},i))&&(t[r]=e)}writeOperationalLayerType(e,t,r,i){!e||i&&"tables"===i.layerContainerType||(t.layerType=e)}writeTitle(e,t){t.title=e??"Layer"}read(e,t){t&&(t.layer=this),(0,u.$)(this,e,(t=>super.read(e,t)),t)}write(e,t){if(t?.origin){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`,r=d[e];let i=!!r?.[this.operationalLayerType];if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(i=!1),"ArcGISDimensionLayer"===this.operationalLayerType&&"web-map/operational-layers"===e&&(i=!1),!i)return t.messages?.push(new s.Z("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const r=super.write(e,{...t,layer:this}),i=!!t&&!!t.messages&&!!t.messages.filter((e=>e instanceof s.Z&&"web-document-write:property-required"===e.name)).length;return(0,o.jc)(r?.url)?(t?.messages?.push(new s.Z("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&i?null:r}beforeSave(){}};return(0,i._)([(0,n.Cb)({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],t.prototype,"id",void 0),(0,i._)([(0,n.Cb)(f.rT)],t.prototype,"listMode",void 0),(0,i._)([(0,a.c)("listMode")],t.prototype,"writeListMode",null),(0,i._)([(0,n.Cb)({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1}}}})],t.prototype,"operationalLayerType",void 0),(0,i._)([(0,a.c)("operationalLayerType")],t.prototype,"writeOperationalLayerType",null),(0,i._)([(0,n.Cb)(f.Oh)],t.prototype,"opacity",void 0),(0,i._)([(0,n.Cb)({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],t.prototype,"title",void 0),(0,i._)([(0,a.c)("title"),(0,a.c)(["web-scene"],"title")],t.prototype,"writeTitle",null),(0,i._)([(0,n.Cb)({type:Boolean,json:{name:"visibility"}})],t.prototype,"visible",void 0),t=(0,i._)([(0,l.j)("esri.layers.mixins.OperationalLayer")],t),t}},16859:(e,t,r)=>{r.d(t,{I:()=>w});var i=r(43697),s=r(68773),o=r(40330),n=r(3172),l=r(66643),a=r(20102),u=r(92604),p=r(70586),y=r(95330),c=r(81271),h=r(5600),d=(r(75215),r(67676),r(80442),r(71715)),f=r(52011),g=r(30556),m=r(84230),v=r(48522),b=r(15235),S=r(86082),_=r(14661);const w=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new b.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:i}=await r.e(8062).then(r.bind(r,18062));return(0,y.k_)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,y.D_)(e)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,y.r9)(e),!0))))}async _setUserPrivileges(e,t){if(!s.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,y.r9)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,_.Ss)(r);let s,n;if(i)s=r.portal.url;else try{s=await(0,m.oP)(this.url,t)}catch(e){(0,y.r9)(e)}if(!s||!(0,c.Zo)(s,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;n=await(o.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,y.r9)(e)}if(!n)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(i?await r.reload():(r=new b.default({id:e,portal:{url:s}}),await r.load(t)),r.portal.user)return(0,_.Ss)(r)}catch(e){(0,y.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,y.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const r=I.credential===t?I.user:await this._fetchEditingUser(e);return I.credential=t,I.user=r,null==r||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=o.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=v.Z.getDefault();if(s&&s.loaded&&(0,c.Fv)(s.restUrl)===(0,c.Fv)(i))return s.user;const a=`${i}/community/self`,u=null!=e?e.signal:null,p=await(0,l.q6)((0,n.default)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?S.default.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,i=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||v.Z.getDefault());return r&&i&&!(0,c.tm)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,h.Cb)({type:b.default})],t.prototype,"portalItem",null),(0,i._)([(0,d.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,g.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,h.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,h.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,h.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,h.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,f.j)("esri.layers.mixins.PortalLayer")],t),t},I={credential:null,user:null}},34760:(e,t,r)=>{r.d(t,{Q:()=>m});var i=r(43697),s=r(92604),o=r(95330),n=r(5600),l=(r(75215),r(67676),r(80442),r(52011)),a=r(46791),u=(r(20102),r(26258),r(87538));const p=new a.Z,y=new WeakMap;function c(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e}function h(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:h(t,e%t):0}let d=0,f=0;function g(){const e=Date.now();for(const t of p)t.refreshInterval&&e-(y.get(t)??0)+5>=6e4*t.refreshInterval&&(y.set(t,e),t.refresh(e))}(0,u.EH)((()=>{const e=Date.now();let t=0;for(const r of p)t=h(Math.round(6e4*r.refreshInterval),t),r.refreshInterval?y.get(r)||y.set(r,e):y.delete(r);if(t!==f){if(f=t,clearInterval(d),0===f)return void(d=0);d=setInterval(g,f)}}));const m=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,o.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||function(e){c(e)&&p.push(e)}(this)}),(()=>{}))}destroy(){c(this)&&p.includes(this)&&p.remove(this)}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,o.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{s.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}};return(0,i._)([(0,n.Cb)({type:Number,cast:e=>e>=.1?e:e<=0?0:.1,json:{write:!0}})],t.prototype,"refreshInterval",void 0),(0,i._)([(0,n.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,i._)([(0,n.Cb)()],t.prototype,"refreshParameters",null),t=(0,i._)([(0,l.j)("esri.layers.mixins.RefreshableLayer")],t),t}},74889:(e,t,r)=>{r.d(t,{Z:()=>b});var i,s=r(43697),o=r(66577),n=r(38171),l=r(35454),a=r(96674),u=r(22974),p=r(5600),y=(r(75215),r(71715)),c=r(52011),h=r(30556),d=r(82971),f=r(33955),g=r(1231);const m=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=i=class extends a.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=d.Z.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const s=e[t],o=n.Z.fromJSON(s),l=s.geometry&&s.geometry.spatialReference;null==o.geometry||l||(o.geometry.spatialReference=r);const a=s.aggregateGeometries,u=o.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],i=a[e],s=i?.spatialReference;null==t||s||(t.spatialReference=r)}i.push(o)}return i}writeGeometryType(e,t,r,i){if(e)return void m.write(e,t,r,i);const{features:s}=this;if(s)for(const e of s)if(e&&null!=e.geometry)return void m.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,f.im)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=d.Z.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,u.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e&&e[r];i.geometry=t&&t.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,s]}=e,o=this.features,n=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((s-e)/r)));for(let e=0,t=o.length;e<t;e++)n?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,s],scale:[o,n]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*o+i),(e=>s-e*n),l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,s;const o=[];for(let n=0,l=e.length;n<l;n++){const l=e[n];if(n>0){const e=t(l[0]),n=r(l[1]);e===i&&n===s||(o.push([e-i,n-s]),i=e,s=n)}else i=t(l[0]),s=r(l[1]),o.push([i,s])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,f.oU)(e)?e.rings:e.paths,s=[];for(let e=0,o=i.length;e<o;e++){const o=i[e],n=this._quantizePoints(o,t,r);n&&s.push(n)}return s.length>0?((0,f.oU)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,s){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,f.oU)(e)?e.rings:e.paths;let n,l;for(let e=0,i=o.length;e<i;e++){const i=o[e];for(let e=0,s=i.length;e<s;e++){const s=i[e];e>0?(n+=s[0],l+=s[1]):(n=s[0],l=s[1]),s[0]=t(n),s[1]=r(l)}}if(i&&s)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=s(r[3])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let n,l;for(let e=0,i=o.length;e<i;e++){const i=o[e];e>0?(n+=i[0],l+=i[1]):(n=i[0],l=i[1]),i[0]=t(n),i[1]=r(l)}if(i&&s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2]),t[3]=s(t[3])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=s(t[2])}}:null}};(0,s._)([(0,p.Cb)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,p.Cb)({type:[n.Z],json:{write:!0}})],v.prototype,"features",void 0),(0,s._)([(0,y.r)("features")],v.prototype,"readFeatures",null),(0,s._)([(0,p.Cb)({type:[g.Z],json:{write:!0}})],v.prototype,"fields",void 0),(0,s._)([(0,p.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:m.read}}})],v.prototype,"geometryType",void 0),(0,s._)([(0,h.c)("geometryType")],v.prototype,"writeGeometryType",null),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,s._)([(0,p.Cb)({types:o.qM,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,s._)([(0,y.r)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,s._)([(0,p.Cb)({type:d.Z,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,s._)([(0,h.c)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,s._)([(0,p.Cb)({json:{write:!0}})],v.prototype,"transform",void 0),v=i=(0,s._)([(0,c.j)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0;const b=v}}]);
|