@arcgis/core 5.0.0-next.59 → 5.0.0-next.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/analysis/Analysis.d.ts +2 -3
- package/analysis/ElevationProfile/ElevationProfileLine.d.ts +1 -1
- package/analysis/ElevationProfile/ElevationProfileLineQuery.d.ts +1 -3
- package/analysis/ElevationProfile/{elevationProfileLineTypes.d.ts → types.d.ts} +2 -2
- package/analysis/ElevationProfileAnalysis.d.ts +1 -1
- package/analysis/LengthDimension.d.ts +1 -1
- package/analysis/LineOfSightAnalysisObserver.d.ts +1 -1
- package/analysis/LineOfSightAnalysisTarget.d.ts +1 -1
- package/analysis/Slice/SliceAnalysisExcludedLayer.js +5 -0
- package/analysis/Slice/types.d.ts +4 -0
- package/analysis/SliceAnalysis.d.ts +1 -4
- package/analysis/SliceAnalysis.js +1 -1
- package/analysis/Viewshed.d.ts +1 -1
- package/analysis/VolumeMeasurementAnalysis.d.ts +1 -1
- package/analysis/VolumeMeasurementAnalysis.js +1 -1
- package/analysis/types.d.ts +22 -1
- package/applications/KnowledgeStudio/generalSdkInternalAccess.d.ts +6 -0
- package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +4 -1
- package/applications/KnowledgeStudio/layerInternalAccessUtils.d.ts +11 -1
- package/applications/KnowledgeStudio/layerInternalAccessUtils.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/arcade.d.ts +27 -4
- package/arcade.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/02cd179176fee25d09a8.js +1 -0
- package/assets/esri/core/workers/chunks/0367a8580fede8f804f9.js +1 -0
- package/assets/esri/core/workers/chunks/0483a2cfdb8c7158e73a.js +1 -0
- package/assets/esri/core/workers/chunks/{73f9cbf0f919b6adc2d5.js → 05ab54b81c366e98138f.js} +1 -1
- package/assets/esri/core/workers/chunks/108a4ab28b6586e281d9.js +1 -0
- package/assets/esri/core/workers/chunks/14f4f5b7549cea7b5a6a.js +1 -0
- package/assets/esri/core/workers/chunks/1b475593c80d7bccdda5.js +1 -0
- package/assets/esri/core/workers/chunks/{de05c59da6d67716795d.js → 1c350a2c4014146dbcd9.js} +1 -1
- package/assets/esri/core/workers/chunks/{b2425f6af7df6902dfc4.js → 1e8ceed33a3657ac02b3.js} +1 -1
- package/assets/esri/core/workers/chunks/{2d61b6efa17e8c5832da.js → 21ebd234cf32ae52b3ea.js} +1 -1
- package/assets/esri/core/workers/chunks/27ec8688f72130239b98.js +1 -0
- package/assets/esri/core/workers/chunks/{087cf25ca211836a084a.js → 2a6231db5ee6cbfd59a5.js} +1 -1
- package/assets/esri/core/workers/chunks/2d8dca9a4a58469ddd05.js +1 -0
- package/assets/esri/core/workers/chunks/2e6bd743b88e83d43137.js +1 -0
- package/assets/esri/core/workers/chunks/2f6fa33692478e99d24b.js +1 -0
- package/assets/esri/core/workers/chunks/31eda00e6842005d0ec8.js +1 -0
- package/assets/esri/core/workers/chunks/{ce90e8489143228262e7.js → 33a13e80badd20ed8de2.js} +1 -1
- package/assets/esri/core/workers/chunks/{01d38a9ca9e88c38aab9.js → 34178ace79e8dea3567d.js} +1 -1
- package/assets/esri/core/workers/chunks/37a3e91791a18ed8b8da.js +1 -0
- package/assets/esri/core/workers/chunks/{47338472f5a8e004a671.js → 37e46461da3000949a26.js} +1 -1
- package/assets/esri/core/workers/chunks/{c531c0e3d420a1be0ad2.js → 3d1a5a3467f3a6585b3e.js} +1 -1
- package/assets/esri/core/workers/chunks/{be6a05d5375e80968877.js → 47e5149765beee46f208.js} +1 -1
- package/assets/esri/core/workers/chunks/{44fb1184eeed0636704a.js → 4b088260252787734c00.js} +1 -1
- package/assets/esri/core/workers/chunks/4cbe78d6a5ff617e15d6.js +1 -0
- package/assets/esri/core/workers/chunks/509065a27bd07bd32475.js +1 -0
- package/assets/esri/core/workers/chunks/{c09cba77ee60a3d765e2.js → 522a6787d9e0f520ac79.js} +1 -1
- package/assets/esri/core/workers/chunks/5686220aed9a74dbd2b1.js +1 -0
- package/assets/esri/core/workers/chunks/584c4602d97a008afb83.js +1 -0
- package/assets/esri/core/workers/chunks/{60954ab810dbbf36e5e1.js → 5a66b7f1f4da75da8e7f.js} +1 -1
- package/assets/esri/core/workers/chunks/{10094eb2b94e98dd4a8a.js → 5dc2f2e28c30386efadf.js} +1 -1
- package/assets/esri/core/workers/chunks/668a868fe2dcb6384ac9.js +1 -0
- package/assets/esri/core/workers/chunks/68cb43f2fa8cc826e99b.js +1 -0
- package/assets/esri/core/workers/chunks/68ee11589de0da7fed08.js +1 -0
- package/assets/esri/core/workers/chunks/{d42273394f575e71dd55.js → 73bee5659414b3687cfc.js} +1 -1
- package/assets/esri/core/workers/chunks/{090dad5579f0148d6486.js → 76dbaef0d0794913f36f.js} +1 -1
- package/assets/esri/core/workers/chunks/{09bd9bd37a339802907a.js → 7bf30c254228f9b7f224.js} +1 -1
- package/assets/esri/core/workers/chunks/7c5218eae13d3bd30598.js +1 -0
- package/assets/esri/core/workers/chunks/7fc09382f934e9223a9b.js +1 -0
- package/assets/esri/core/workers/chunks/{472d290f8eb1c1a85724.js → 8195310b4c53db902fc1.js} +1 -1
- package/assets/esri/core/workers/chunks/831b8282380844a7c4d5.js +1 -0
- package/assets/esri/core/workers/chunks/83c5dea24e36ac2e3497.js +1 -0
- package/assets/esri/core/workers/chunks/{49df576f0215618aa651.js → 84440efe2cc337dab81f.js} +1 -1
- package/assets/esri/core/workers/chunks/852007720e3bc29532db.js +1 -0
- package/assets/esri/core/workers/chunks/87c6470ee295d736b06d.js +1 -0
- package/assets/esri/core/workers/chunks/89853fccdf2bfcc290c0.js +1 -0
- package/assets/esri/core/workers/chunks/{1e152a34e368bd810a0f.js → 8d58e59ea13ecafdd45c.js} +1 -1
- package/assets/esri/core/workers/chunks/{a2442549c5daf3653eb4.js → 8d6641d0f7c93f83c414.js} +1 -1
- package/assets/esri/core/workers/chunks/8db723b8468e408dda46.js +1 -0
- package/assets/esri/core/workers/chunks/92a4f56232f81ca457fa.js +1 -0
- package/assets/esri/core/workers/chunks/{8a132d91077ecf849248.js → 92ef6071ea87b7f940e2.js} +1 -1
- package/assets/esri/core/workers/chunks/{bb4aefaf9b0327dda738.js → 942c80c425b1f13cced5.js} +1 -1
- package/assets/esri/core/workers/chunks/980313a6c35e79812d17.js +1 -0
- package/assets/esri/core/workers/chunks/{e6bab7b739bfbb39f6cd.js → 988f5e003377d734d282.js} +1 -1
- package/assets/esri/core/workers/chunks/{7364fb5e99933533890d.js → 9ba8a2e1c0fb4e1efc7c.js} +1 -1
- package/assets/esri/core/workers/chunks/9c157c0eeadb824ad01e.js +1 -0
- package/assets/esri/core/workers/chunks/a39ac9127a215d14d412.js +1 -0
- package/assets/esri/core/workers/chunks/{63cf702cde83692126be.js → a6f29d1a6356e2de5a79.js} +1 -1
- package/assets/esri/core/workers/chunks/a94dd0f5839b6e2bb2d2.js +1 -0
- package/assets/esri/core/workers/chunks/ab0275669e28e7a34c38.js +1 -0
- package/assets/esri/core/workers/chunks/abc8015e13b1395b8d64.js +1 -0
- package/assets/esri/core/workers/chunks/abcee7cfd53cfe1d91e9.js +1 -0
- package/assets/esri/core/workers/chunks/acdbe0299024d58e1421.js +1 -0
- package/assets/esri/core/workers/chunks/{63c91421a71ae3b3599e.js → adff1791ae44631ad34a.js} +1 -1
- package/assets/esri/core/workers/chunks/{0eb6b9c638a5fcfe9bab.js → b4a59dd11d75df7bd510.js} +1 -1
- package/assets/esri/core/workers/chunks/{224f01b11fdba9250b1e.js → b64cfd86d9204be743c6.js} +1 -1
- package/assets/esri/core/workers/chunks/b7f2fb6684cf684b0bce.js +1 -0
- package/assets/esri/core/workers/chunks/b9f0d313f59fc7c43560.js +1 -0
- package/assets/esri/core/workers/chunks/bb5373ff7cdad7270095.js +1 -0
- package/assets/esri/core/workers/chunks/bb92a9daa0c5b019561f.js +1 -0
- package/assets/esri/core/workers/chunks/bbe2eaef7edfa33b6eea.js +1 -0
- package/assets/esri/core/workers/chunks/bddaa83fcb9fdb1e1856.js +1 -0
- package/assets/esri/core/workers/chunks/bfdf646d4c8f175a4236.js +1 -0
- package/assets/esri/core/workers/chunks/{0000781c850b1b4828b3.js → bfe052b386ec4874f350.js} +1 -1
- package/assets/esri/core/workers/chunks/{aa297e0931213341f51b.js → c3272b09bff886b08ce1.js} +1 -1
- package/assets/esri/core/workers/chunks/c38a07e936226b361b63.js +1 -0
- package/assets/esri/core/workers/chunks/{0d9904ba62558686c289.js → c743e561e7d73a100576.js} +1 -1
- package/assets/esri/core/workers/chunks/{b907d16e82ac908bb896.js → c96083838f919a8f64cd.js} +1 -1
- package/assets/esri/core/workers/chunks/{be80ed6e2955eabe912f.js → ca761dc5f45cafef313e.js} +1 -1
- package/assets/esri/core/workers/chunks/{8a6e50d95539b46f629c.js → cad1d7e5ce89f51b3ac9.js} +1 -1
- package/assets/esri/core/workers/chunks/{dbe55d4731227d6e9571.js → ccc743e41854eb225c23.js} +1 -1
- package/assets/esri/core/workers/chunks/cf3a9ead26629f3508b3.js +1 -0
- package/assets/esri/core/workers/chunks/{3a612f873e29348370b2.js → d129a5a34e9ad09bd39e.js} +1 -1
- package/assets/esri/core/workers/chunks/{461093ce28ceadd7853d.js → d14e75b160aa432233c6.js} +1 -1
- package/assets/esri/core/workers/chunks/{e668ddc7332e5e560e78.js → d2abfcb0c8bf894c7f72.js} +1 -1
- package/assets/esri/core/workers/chunks/d749aa62ad694147aebe.js +1 -0
- package/assets/esri/core/workers/chunks/{f142c5cbdd16f1768275.js → d77f56576a49a998164a.js} +1 -1
- package/assets/esri/core/workers/chunks/{044a0ccd89741c1ae770.js → d79d29b52a65fb6bf94d.js} +1 -1
- package/assets/esri/core/workers/chunks/da7685ec2b6eaf00fd2d.js +1 -0
- package/assets/esri/core/workers/chunks/dae09fb8da0faa6dede4.js +1 -0
- package/assets/esri/core/workers/chunks/e16e88de4e93b0f48b2c.js +1 -0
- package/assets/esri/core/workers/chunks/e8bf362b2631f977b1cb.js +1 -0
- package/assets/esri/core/workers/chunks/ec5f83aa752c39a96609.js +1 -0
- package/assets/esri/core/workers/chunks/ed7e353e290b3a272457.js +1 -0
- package/assets/esri/core/workers/chunks/ef9a23d41acb5ad36426.js +1 -0
- package/assets/esri/core/workers/chunks/{33154a245eeca4ba38c6.js → f3437ae6bba846b524d3.js} +1 -1
- package/assets/esri/core/workers/chunks/{cfd2839e218610a222e5.js → f54ec21fa67db6fef5a6.js} +1 -1
- package/assets/esri/core/workers/chunks/{58242447b72cc60a5040.js → f91e63d7842c427c7f72.js} +1 -1
- package/assets/esri/core/workers/chunks/{914746077017fa50933f.js → fa0bbf0d7eadb924c473.js} +1 -1
- package/assets/esri/core/workers/chunks/fbd577f56529063ce491.js +1 -0
- package/assets/esri/core/workers/chunks/fe33b11ec3f58a0f541a.js +1 -0
- package/assets/esri/core/workers/chunks/fe5d2735f057c7789f4b.js +1 -0
- package/assets/esri/core/workers/chunks/ff7df6fb78fa2c0e9247.js +1 -0
- package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_en.json +1 -1
- package/chunks/bundle.js +1 -1
- package/config.js +1 -1
- package/core/memoryEstimations.js +1 -1
- package/core/promiseUtils.d.ts +1 -1
- package/core/units.d.ts +2 -0
- package/geometry/FlatGeometry.js +1 -1
- package/geometry/operators/support/jsonConverter.js +1 -1
- package/interfaces.d.ts +29 -31
- package/kernel.js +1 -1
- package/layers/FeatureLayer.d.ts +3 -3
- package/layers/GeoJSONLayer.d.ts +1 -1
- package/layers/ImageryTileLayer.d.ts +1 -1
- package/layers/OGCFeatureLayer.d.ts +1 -1
- package/layers/ParquetLayer.d.ts +1 -1
- package/layers/ParquetLayer.js +1 -1
- package/layers/SceneLayer.d.ts +1 -1
- package/layers/StreamLayer.d.ts +8 -7
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/WCSLayer.d.ts +1 -1
- package/layers/WFSLayer.d.ts +1 -1
- package/layers/buildingSublayers/BuildingComponentSublayer.d.ts +1 -1
- package/layers/catalog/CatalogFootprintLayer.d.ts +1 -1
- package/layers/graphics/FlatFeature.js +5 -0
- package/layers/graphics/FlatFeatureSet.js +5 -0
- package/layers/graphics/data/FlatFeatureStore.js +5 -0
- package/layers/graphics/data/QueryEngine.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/data/flatFeatureQueryEngineAdapter.js +5 -0
- package/layers/graphics/data/optimizedFeatureQueryEngineAdapter.js +1 -1
- package/layers/graphics/featureConversionUtils.js +1 -1
- package/layers/graphics/sources/OGCFeatureSource.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +1 -1
- package/layers/mixins/ArcGISImageService.d.ts +1 -1
- package/layers/mixins/ImageryTileMixin.d.ts +1 -1
- package/layers/ogc/ogcFeatureUtils.d.ts +57 -0
- package/layers/ogc/ogcFeatureUtils.js +1 -1
- package/layers/ogc/types.d.ts +73 -0
- package/layers/raster/functions/creators/createDataManagementFunctions.d.ts +1 -1
- package/layers/raster/functions/creators/createSurfaceFunctions.d.ts +1 -1
- package/layers/support/FeatureReductionBinning.d.ts +1 -1
- package/layers/support/FeatureReductionCluster.d.ts +1 -1
- package/layers/support/StreamConnection.d.ts +37 -4
- package/layers/support/Sublayer.d.ts +1 -1
- package/layers/support/TrackPartInfo.d.ts +1 -1
- package/layers/support/fieldUtils.d.ts +1 -1
- package/layers/support/parquetUtils.js +1 -1
- package/libs/parquet/parquet.js +1 -1
- package/package.json +1 -1
- package/pointCloudRenderers.d.ts +1 -1
- package/portal/jsonTypes.d.ts +6 -0
- package/renderers/DictionaryRenderer.d.ts +2 -5
- package/renderers/PointCloudClassBreaksRenderer.d.ts +2 -1
- package/renderers/PointCloudRenderer.d.ts +3 -6
- package/renderers/PointCloudStretchRenderer.d.ts +2 -1
- package/renderers/PointCloudUniqueValueRenderer.d.ts +2 -1
- package/renderers/RasterShadedReliefRenderer.d.ts +2 -3
- package/renderers/RasterStretchRenderer.d.ts +1 -1
- package/renderers/Renderer.d.ts +2 -2
- package/renderers/VectorFieldRenderer.d.ts +4 -3
- package/renderers/support/AuthoringInfo.d.ts +2 -25
- package/renderers/support/AuthoringInfoVisualVariable.d.ts +2 -17
- package/renderers/support/RasterPresetRenderer.d.ts +1 -1
- package/renderers/support/RendererLegendOptions.d.ts +1 -4
- package/renderers/support/jsonUtils.d.ts +1 -1
- package/renderers/support/pointCloud/types.d.ts +10 -0
- package/renderers/support/raster/types.d.ts +54 -0
- package/renderers/support/types.d.ts +44 -0
- package/renderers/support/utils.d.ts +1 -1
- package/renderers/types.d.ts +16 -6
- package/renderers.d.ts +1 -1
- package/rest/knowledgeGraph/GraphObject.d.ts +1 -1
- package/rest/knowledgeGraph/GraphObject.js +1 -1
- package/smartMapping/labels/bins.d.ts +1 -1
- package/smartMapping/popup/clusters.d.ts +1 -1
- package/smartMapping/popup/templates.d.ts +1 -1
- package/smartMapping/raster/renderers/classBreaks.d.ts +1 -1
- package/smartMapping/raster/renderers/rgb.d.ts +1 -1
- package/smartMapping/raster/renderers/stretch.d.ts +1 -1
- package/smartMapping/raster/support/utils.d.ts +1 -1
- package/smartMapping/renderers/color.d.ts +1 -2
- package/smartMapping/renderers/pieChart.d.ts +1 -1
- package/smartMapping/renderers/predominance.d.ts +1 -1
- package/smartMapping/renderers/size.d.ts +1 -2
- package/smartMapping/renderers/support/rendererUtils.d.ts +1 -1
- package/smartMapping/renderers/univariateColorSize.d.ts +1 -1
- package/support/revision.js +1 -1
- package/unionTypes.d.ts +23 -7
- package/views/2d/engine/Stage.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
- package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/Painter.js +1 -1
- package/views/2d/engine/webgl/TileContainer.js +1 -1
- package/views/2d/engine/webgl/WGLContainer.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/templateUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/Technique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BloomShader.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/features/FeaturePipelineWorkerProxy.d.ts +2 -2
- package/views/2d/layers/features/FeatureStoreQueryAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
- package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetSnapshotLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/ASourceChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/FeatureSnapshotSourceChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/ParquetSourceChunk.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
- package/views/2d/layers/features/support/Tile.js +1 -1
- package/views/2d/layers/graphics/AGraphicContainer.js +1 -1
- package/views/2d/layers/graphics/GraphicContainer.js +1 -1
- package/views/2d/layers/support/DebouncedFeatureOverride.js +1 -1
- package/views/2d/layers/support/DebugOverlay.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementResult.d.ts +1 -1
- package/views/3d/environment/ChapmanAtmosphere.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureStore.js +1 -1
- package/views/3d/layers/graphics/pipeline/featureSet/TiledFeatureStore.js +1 -1
- package/views/3d/layers/i3s/I3SQueryFeatureAdapter.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
- package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/BreakpointsOwner.d.ts +26 -21
- package/views/DOMContainer.d.ts +2 -1
- package/views/MapView.d.ts +3 -3
- package/views/SceneView.d.ts +3 -3
- package/views/View.d.ts +2 -2
- package/views/View2D.js +1 -1
- package/views/Viewport2DMixin.d.ts +3 -2
- package/views/analysis/ElevationProfile/ElevationProfileResult.d.ts +1 -1
- package/views/interactive/snapping/LineSnapper.js +1 -1
- package/views/interactive/snapping/ParallelLineSnapper.js +1 -1
- package/views/interactive/snapping/RightAngleSnapper.js +1 -1
- package/views/interactive/snapping/RightAngleTriangleSnapper.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileStore.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
- package/views/layers/BuildingSceneLayerView.d.ts +1 -1
- package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.d.ts +2 -2
- package/widgets/Features/FeaturesViewModel.d.ts +1 -1
- package/widgets/Home/HomeViewModel.d.ts +1 -1
- package/widgets/Locate/LocateViewModel.d.ts +2 -2
- package/widgets/Slice/SliceViewModel.d.ts +2 -1
- package/widgets/TimeSlider/TimeSliderViewModel.d.ts +1 -1
- package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +1 -1
- package/widgets/types.d.ts +1 -1
- package/analysis/FeatureReference.d.ts +0 -19
- package/analysis/VolumeMeasurement/volumeMeasurementUtils.js +0 -5
- package/analysis/support/SliceAnalysisExcludedLayer.js +0 -5
- package/assets/esri/core/workers/chunks/00f044370bf3bb6b24d7.js +0 -1
- package/assets/esri/core/workers/chunks/0136cd1a5da204b6daeb.js +0 -1
- package/assets/esri/core/workers/chunks/097001462d93b78b64f4.js +0 -1
- package/assets/esri/core/workers/chunks/0fcb40204db8ee5571c3.js +0 -1
- package/assets/esri/core/workers/chunks/13167bdd486b41163147.js +0 -1
- package/assets/esri/core/workers/chunks/1363345f31f4f5051132.js +0 -1
- package/assets/esri/core/workers/chunks/13be94357dcf5afc4fcb.js +0 -1
- package/assets/esri/core/workers/chunks/1693f19f1c37e0a2087e.js +0 -1
- package/assets/esri/core/workers/chunks/18c4cd160a4052b05831.js +0 -1
- package/assets/esri/core/workers/chunks/18ce7b1559a45d017c45.js +0 -1
- package/assets/esri/core/workers/chunks/1dc3ab52fcde7bff0f23.js +0 -1
- package/assets/esri/core/workers/chunks/27794d48c04a5875fd22.js +0 -1
- package/assets/esri/core/workers/chunks/2a66841243975cac3e3c.js +0 -1
- package/assets/esri/core/workers/chunks/2c12848e4934e9bb2bd0.js +0 -1
- package/assets/esri/core/workers/chunks/311c4914a4f69f3c1525.js +0 -1
- package/assets/esri/core/workers/chunks/35cbc61a006351620ead.js +0 -1
- package/assets/esri/core/workers/chunks/36a04be40369111a633d.js +0 -1
- package/assets/esri/core/workers/chunks/3b5e71b156244789f624.js +0 -1
- package/assets/esri/core/workers/chunks/3dd0db77a05263000bd8.js +0 -1
- package/assets/esri/core/workers/chunks/5047acfd66539eefe353.js +0 -1
- package/assets/esri/core/workers/chunks/51fd6662245b920af652.js +0 -1
- package/assets/esri/core/workers/chunks/58419d362f24b35003c1.js +0 -1
- package/assets/esri/core/workers/chunks/58cf5b9a6aa685fc3367.js +0 -1
- package/assets/esri/core/workers/chunks/5ffeb8fb58d59bad68c3.js +0 -1
- package/assets/esri/core/workers/chunks/6d09965ab2bff9da88b6.js +0 -1
- package/assets/esri/core/workers/chunks/700122f775b98a7ed353.js +0 -1
- package/assets/esri/core/workers/chunks/7353d78feba7e6302b6e.js +0 -1
- package/assets/esri/core/workers/chunks/7737e69da604d2521da8.js +0 -1
- package/assets/esri/core/workers/chunks/7ba31425caa404f86424.js +0 -1
- package/assets/esri/core/workers/chunks/7cd0ab01933bfb2c6e43.js +0 -1
- package/assets/esri/core/workers/chunks/80c36f1786ae0be00962.js +0 -1
- package/assets/esri/core/workers/chunks/81c2cc77c275a5b555c0.js +0 -1
- package/assets/esri/core/workers/chunks/8892bf3d2367e35de001.js +0 -1
- package/assets/esri/core/workers/chunks/8d941204425571b656ec.js +0 -1
- package/assets/esri/core/workers/chunks/973bf2ed34d57f299472.js +0 -1
- package/assets/esri/core/workers/chunks/9b6e2099aabf67b9f9f2.js +0 -1
- package/assets/esri/core/workers/chunks/a6b1e3ec30f6d641aea9.js +0 -1
- package/assets/esri/core/workers/chunks/a8f7e44657083f6aa3fd.js +0 -1
- package/assets/esri/core/workers/chunks/b648a1e641cf5c772d67.js +0 -1
- package/assets/esri/core/workers/chunks/b91c13f44f4d1bac5799.js +0 -1
- package/assets/esri/core/workers/chunks/be6cc8a1485961f22372.js +0 -1
- package/assets/esri/core/workers/chunks/c91201b37d1cb3875fb4.js +0 -1
- package/assets/esri/core/workers/chunks/d22e0d733bfe821c0510.js +0 -1
- package/assets/esri/core/workers/chunks/d54988c21ea5667d00b7.js +0 -1
- package/assets/esri/core/workers/chunks/d62193323c67b379dee3.js +0 -1
- package/assets/esri/core/workers/chunks/d65ca3b8fccae8c3c3fa.js +0 -1
- package/assets/esri/core/workers/chunks/d8dc130ea559be1f68c6.js +0 -1
- package/assets/esri/core/workers/chunks/dcf6f7001f470f76bd3e.js +0 -1
- package/assets/esri/core/workers/chunks/e00d56ae5e68267fe269.js +0 -1
- package/assets/esri/core/workers/chunks/e2c7c269be93c552dc5b.js +0 -1
- package/assets/esri/core/workers/chunks/e4d593ddcbcf06010ab0.js +0 -1
- package/assets/esri/core/workers/chunks/f286f13686f003c5eec5.js +0 -1
- package/assets/esri/core/workers/chunks/fb6670a929b7333f1764.js +0 -1
- package/assets/esri/core/workers/chunks/fbdf553253cf8f22c022.js +0 -1
- package/assets/esri/core/workers/chunks/fc10c738bae304721ab2.js +0 -1
- package/assets/esri/core/workers/chunks/ff79c2cb28db7e0a1fc4.js +0 -1
- package/assets/esri/core/workers/chunks/ffdf1cbc1e54414d0f96.js +0 -1
- package/renderers/support/colorRampUtils.d.ts +0 -4
- package/renderers/support/pointCloudTypeUtils.d.ts +0 -6
- package/renderers/support/rasterRendererHelper.d.ts +0 -37
- package/renderers/support/rasterTypeUtils.d.ts +0 -9
- package/renderers/support/typeUtils.d.ts +0 -11
- /package/analysis/{dimensionUtils.d.ts → Dimension/types.d.ts} +0 -0
- /package/analysis/VolumeMeasurement/{volumeMeasurementUtils.d.ts → types.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3693],{3693:(e,t,n)=>{n.r(t),n.d(t,{registerFunctions:()=>Se});var r=n(52106),i=n(66131),a=n(47609),s=n(66395),o=n(59534),l=n(85935),u=n(93833),d=n(30445),c=n(93818),f=n(78878),p=n(80672),h=n(48938),m=n(87449),y=n(11221),g=n(33325),w=n(80609),I=n(1262),F=n(88368);class A{constructor(e){this.field=e,this.sqlRewritable=!1}postInitialization(e,t){}}class N extends A{constructor(e){super(e),this.sqlRewritable=!0}extractValue(e){return e.attributes[this.field.name]}rewriteSql(e){return{rewritten:this.sqlRewritable,where:e}}}class b extends A{constructor(e,t,n){super((0,g.ke)(e)),this.originalField=e,this.sqlRewritable=!0,this.field.name=t,this.field.alias=n}rewriteSql(e,t){return{rewritten:this.sqlRewritable,where:(0,w.bD)(e,this.field.name,this.originalField.name,t.getFieldsIndex())}}extractValue(e){return e.attributes[this.originalField.name]}}class S extends A{constructor(e,t,n){super(e),this.codefield=t,this._stringToCode=n,this._codeToString={};for(const e in n)this._codeToString[n[e]]=e;this.sqlRewritable=!0}static{this.BADNESS="_!!!_BAD_LKP_!!!!"}rewriteSql(e,t){const n=this.evaluateNodeToWhereClause(e.parseTree,0,this.field.name,this.codefield instanceof F.A?(0,w.YY)(this.codefield,0):this.codefield,e.parameters);return n.includes(S.BADNESS)?{rewritten:!1,where:e}:{rewritten:this.sqlRewritable,where:F.A.create(n,{fieldsIndex:t._parent.getFieldsIndex(),timeZone:t.dateFieldsTimeZoneDefaultUTC})}}evaluateNodeToWhereClause(e,t,n=null,r=null,i){switch(e.type){case"interval":return(0,w.oj)(this.evaluateNodeToWhereClause(e.value,t,n,r,i),e.qualifier,e.op);case"case-expression":{let r=" CASE ";"simple"===e.format&&(r+=this.evaluateNodeToWhereClause(e.operand,t,n,S.BADNESS,i));for(const a of e.clauses)r+=" WHEN "+this.evaluateNodeToWhereClause(a.operand,t,n,S.BADNESS,i)+" THEN "+this.evaluateNodeToWhereClause(a.value,t,n,S.BADNESS,i);return null!==e.else&&(r+=" ELSE "+this.evaluateNodeToWhereClause(e.else,t,n,S.BADNESS,i)),r+=" END ",r}case"parameter":{const n=i[e.value.toLowerCase()];return"string"==typeof n?"'"+n.toString().replaceAll("'","''")+"'":(0,g.$P)(n)||(0,g.Lk)(n)?(0,w.bm)(n,t):(0,g.eg)(n)?(0,w.F1)(n,t):(0,g.rX)(n)?(0,w.R8)(n,t):(0,g.f0)(n)?(0,w.Nf)(n,t):Array.isArray(n)?n.map(e=>"string"==typeof e?"'"+e.toString().replaceAll("'","''")+"'":(0,g.$P)(e)||(0,g.Lk)(e)?(0,w.bm)(e,t):(0,g.eg)(e)?(0,w.F1)(e,t):(0,g.rX)(e)?(0,w.R8)(e,t):(0,g.f0)(e)?(0,w.Nf)(e,t):e.toString()):n.toString()}case"expression-list":{const a=[];for(const s of e.value)a.push(this.evaluateNodeToWhereClause(s,t,n,r,i));return a}case"unary-expression":return" ( NOT "+this.evaluateNodeToWhereClause(e.expr,t,n,S.BADNESS,i)+" ) ";case"binary-expression":switch(e.operator){case"AND":return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" AND "+this.evaluateNodeToWhereClause(e.right,t,n,r,i)+") ";case"OR":return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" OR "+this.evaluateNodeToWhereClause(e.right,t,n,r,i)+") ";case"IS":if("null"!==e.right.type)throw new I.L("UnsupportedIsRhs");return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new I.L("UnsupportedIsRhs");return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" IS NOT NULL )";case"IN":{if("expression-list"===e.right.type){if("column-reference"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const a=[];let s=!0;for(const t of e.right.value){if("string"!==t.type){s=!1;break}if(void 0===this._stringToCode[t.value]){s=!1;break}a.push(this._stringToCode[t.value].toString())}if(s)return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" IN ("+a.join(",")+")) "}const a=this.evaluateNodeToWhereClause(e.right,t,n,r,i);return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" IN ("+a.join(",")+")) "}const a=this.evaluateNodeToWhereClause(e.right,t,n,r,i);return Array.isArray(a)?" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" IN ("+a.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" IN ("+a+")) "}case"NOT IN":{if("expression-list"===e.right.type){if("column-reference"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const a=[];let s=!0;for(const t of e.right.value){if("string"!==t.type){s=!1;break}if(void 0===this._stringToCode[t.value]){s=!1;break}a.push(this._stringToCode[t.value].toString())}if(s)return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" NOT IN ("+a.join(",")+")) "}const a=this.evaluateNodeToWhereClause(e.right,t,n,r,i);return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" NOT IN ("+a.join(",")+")) "}const a=this.evaluateNodeToWhereClause(e.right,t,n,r,i);return Array.isArray(a)?" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" NOT IN ("+a.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" NOT IN ("+a+")) "}case"BETWEEN":{const r=this.evaluateNodeToWhereClause(e.right,t,n,S.BADNESS,i);return" ("+this.evaluateNodeToWhereClause(e.left,t,n,S.BADNESS,i)+" BETWEEN "+r[0]+" AND "+r[1]+" ) "}case"NOTBETWEEN":{const r=this.evaluateNodeToWhereClause(e.right,t,n,S.BADNESS,i);return" ("+this.evaluateNodeToWhereClause(e.left,t,n,S.BADNESS,i)+" NOT BETWEEN "+r[0]+" AND "+r[1]+" ) "}case"LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,n,S.BADNESS,i)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,n,S.BADNESS,i)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,n,S.BADNESS,i)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,n,S.BADNESS,i)+") ";case"NOT LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,n,S.BADNESS,i)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,n,S.BADNESS,i)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,n,S.BADNESS,i)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,n,S.BADNESS,i)+") ";case"<>":case"=":if("column-reference"===e.left.type&&"string"===e.right.type){if(e.left.column.toUpperCase()===this.field.name.toUpperCase()&&void 0!==this._stringToCode[e.right.value.toString()])return" ("+r+" "+e.operator+" "+this._stringToCode[e.right.value.toString()].toString()+") "}else if("column-reference"===e.right.type&&"string"===e.left.type&&e.right.column.toUpperCase()===this.field.name.toUpperCase())return" ("+this._stringToCode[e.left.value.toString()].toString()+" "+e.operator+" "+r+") ";return" ("+this.evaluateNodeToWhereClause(e.left,t,n,S.BADNESS,i)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,n,S.BADNESS,i)+") ";case"<":case">":case">=":case"<=":case"*":case"-":case"+":case"/":case"||":return" ("+this.evaluateNodeToWhereClause(e.left,t,n,S.BADNESS,i)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,n,S.BADNESS,i)+") "}case"null":return"null";case"boolean":return!0===e.value?"1":"0";case"string":return"'"+e.value.toString().replaceAll("'","''")+"'";case"timestamp":return`timestamp '${e.value}'`;case"date":return`date '${e.value}'`;case"time":return`time '${e.value}'`;case"number":return e.value.toString();case"current-time":return(0,w.C6)(e.mode,t);case"current-user":return"CURRENT_USER";case"column-reference":return n&&n.toLowerCase()===e.column.toLowerCase()?"("+r+")":(0,w.Kb)(e);case"data-type":return e.value;case"function":{const r=this.evaluateNodeToWhereClause(e.args,t,n,S.BADNESS,i);return(0,w.F6)(e.name,r,t)}}throw new I.L("UnsupportedSyntax",{node:e.type})}extractValue(e){if(this.codefield instanceof F.A){const t=this.codefield.calculateValueCompiled(e);return this._codeToString[F.A.convertValueToStorageFormat(t)]}return this._codeToString[e.attributes[this.codefield]]}}class T extends A{constructor(e,t){super(e),this._sql=t}rewriteSql(e,t){return{rewritten:!0,where:(0,w.bD)(e,this.field.name,(0,w.YY)(this._sql,0),t.getFieldsIndex())}}extractValue(e){return F.A.convertValueToStorageFormat(this._sql.calculateValueCompiled(e),this.field.type)}}class _ extends y.t1{static findField(e,t){for(const n of e)if(n.name.toLowerCase()===t.toString().toLowerCase())return n;return null}constructor(e){super(),this.declaredClass="esri.arcade.featureset.actions.Adapted",this._maxProcessing=30,this._parent=e.parentfeatureset,this._adaptedFields=e.adaptedFields,this._extraFilter=e.extraFilter}_initialiseFeatureSet(){this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types,this.fields=[];for(const e of this._adaptedFields)e.postInitialization(this,this._parent),this.fields.push(e.field)}async _queryAll(){return await this._ensureLoaded(),this._extraFilter?(await this.query({abortSignal:h._})).features:this._calculateFields(await this._parent.queryAll(h._))}async query(e){let t=e.where??null;const n=this._reformulateWithoutAdaptions(t),r=n.cannot;t=n.where;let i=!1,a=e.orderBy;if(null!=a){i=!0;const e=[];for(const t of this._adaptedFields)if(!(t instanceof N)&&!0===a.scanForField(t.field.name)){if(!(t instanceof b)){a=null,i=!1;break}e.push({field:t.field.name,newfield:t.originalField.name})}a&&e.length>0&&(a=a.replaceFields(e))}null!=t?null!=this._extraFilter&&(t=(0,w.kg)(this._extraFilter,t)):t=this._extraFilter,await this._ensureLoaded();const s=await this._parent.query({...e,where:t,orderBy:a});return(0,m.dZ)(e.abortSignal),r?{...s,filterApplied:!1,ordered:!!i&&s.ordered,features:this._calculateFields(s.features)}:{...s,ordered:!!i&&s.ordered,features:this._calculateFields(s.features)}}async*_calculateFields(e){for await(const t of e)yield t.map(e=>{const t={};for(const n of this._adaptedFields)t[n.field.name]=n.extractValue(e);return{attributes:t,geometry:e.geometry}})}async queryStat(e){let t=!1,n=e.field,r=this._reformulateWithoutAdaptions(n);t=r.cannot,n=r.where;let i=e.where??null;if(r=this._reformulateWithoutAdaptions(i),t=t||r.cannot,i=r.where,null!=i?null!==this._extraFilter&&(i=(0,w.kg)(this._extraFilter,i)):i=this._extraFilter,t)return null==i&&null==e.spatialFilter?this._manualStat(e.stat,n,e.limit??g.gO,e.abortSignal):{calculated:!1};const a=await this._parent.queryStat({...e,field:n,where:i});return a.calculated?a:null==i&&null==e.spatialFilter?this._manualStat(e.stat,n,e.limit??g.gO,e.abortSignal):{calculated:!1}}async canQueryAggregate(e){for(const t of e.groupBy)for(const e of this._adaptedFields)if(t.toLowerCase()===e.field.name.toLowerCase()&&!(e instanceof N))return!1;const t=[];for(const n of e.statistics)if(null!==n.workingexpr){const e=this._reformulateWithoutAdaptions(n.workingexpr);if(e.cannot)return!1;const r=n.clone();r.workingexpr=e.where,t.push(r)}else t.push(n);let n=e.where??null;const r=this._reformulateWithoutAdaptions(n);return!r.cannot&&(n=r.where,null!==n?null!==this._extraFilter&&(n=(0,w.kg)(this._extraFilter,n)):n=this._extraFilter,this._parent.canQueryAggregate({...e,statistics:t,where:n}))}async queryAggregate(e){const t=[];for(const n of e.statistics)if(null!==n.workingexpr){const e=this._reformulateWithoutAdaptions(n.workingexpr);if(e.cannot)throw new m.dr("NeverReach");const r=n.clone();r.workingexpr=e.where,t.push(r)}else t.push(n);let n=e.where??null;const r=this._reformulateWithoutAdaptions(n);if(r.cannot)throw new m.dr("NeverReach");return n=r.where,null!==n?null!==this._extraFilter&&(n=(0,w.kg)(this._extraFilter,n)):n=this._extraFilter,this._parent.queryAggregate({...e,statistics:t,where:n})}_reformulateWithoutAdaptions(e){const t={cannot:!1,where:e};if(null!==e)for(const n of this._adaptedFields)if(!0===(0,w.Ju)(e,n.field.name)){const r=n.rewriteSql(e,this);if(!0!==r.rewritten){t.cannot=!0,t.where=null;break}t.where=r.where}return t}}var C=n(35704),v=n(4576);class x extends y.t1{constructor(e){super(),this.declaredClass="esri.arcade.featureset.actions.OrderBy",this._maxProcessing=100,this._parent=e.parentfeatureset,this._orderByClause=e.orderbyclause}async _queryAll(){return(await this.query({abortSignal:h._})).features}async query(e){await this._ensureLoaded();const t=await this._parent.query({...e,orderBy:null==e.orderBy?this._orderByClause:e.orderBy});return(0,m.dZ)(e.abortSignal),!1===t.ordered?{...t,ordered:!0,features:this._sortFeatures(t.features,e.abortSignal)}:t}async*_sortFeatures(e,t){const n=[];for await(const r of e)n.push(r),await(0,f.a3)(),(0,m.dZ)(t);const r=n.flat();this._orderByClause.order(r);for(const e of(0,v.Ho)(r,this._maxQueryRate()))yield e}async queryStat(e){const t=await this._parent.queryStat(e);return t.calculated?t:null==e.where&&null==e.spatialFilter?this._manualStat(e.stat,e.field,e.limit??g.gO,e.abortSignal):{calculated:!1}}async canQueryAggregate(e){return this._parent.canQueryAggregate(e)}async queryAggregate(e){return this._parent.queryAggregate(e)}getFieldsIndex(){return this._parent.getFieldsIndex()}}function D(e,t){return e===t?0:null===e?-1:null===t?1:e<t?-1:1}class E{constructor(e){const t=e.split(",");this._fields=[],this._directions=[];for(let e=0;e<t.length;e++){const n=t[e].match(/\S+/g);this._fields.push(n[0]),2===n.length?"asc"===n[1].toLowerCase()?this._directions.push(1):this._directions.push(0):this._directions.push(1)}}constructClause(){let e="";for(let t=0;t<this._fields.length;t++)0!==t&&(e+=","),e+=this._fields[t],1===this._directions[t]?e+=" ASC":e+=" DESC";return e}order(e){e.sort((e,t)=>{for(let n=0;n<this._fields.length;n++){const r=this.featureValue(e,this._fields[n],n),i=this.featureValue(t,this._fields[n],n);let a=0;if(a=1===this._directions[n]?D(r,i):-1*D(r,i),0!==a)return a}return 0})}scanForField(e){for(let t=0;t<this._fields.length;t++)if(this._fields[t].toLowerCase().trim()===e.toLowerCase().trim())return!0;return!1}replaceFields(e){let t="";for(let n=0;n<this._fields.length;n++){0!==n&&(t+=",");let r=this._fields[n];for(const t of e)if(r.toLowerCase()===t.field.toLowerCase()){r=t.newfield;break}t+=r,1===this._directions[n]?t+=" ASC":t+=" DESC"}return new E(t)}featureValue(e,t,n){const r=e.attributes[t];if(void 0!==r)return r;for(const r in e.attributes)if(t.toLowerCase()===r.toLowerCase())return this._fields[n]=r,e.attributes[r];return null}}class k{constructor(){this.field="",this.tofieldname="",this.typeofstat="MIN",this.workingexpr=null}clone(){const e=new k;return e.field=this.field,e.tofieldname=this.tofieldname,e.typeofstat=this.typeofstat,e.workingexpr=this.workingexpr,e}static parseStatField(e,t,n,r){const i=new k;i.field=e;const a=F.A.create(t,{fieldsIndex:n,timeZone:r}),s=function(e){if("function"===e.parseTree.type){if(0===e.parseTree.args.value.length)return{name:e.parseTree.name,expr:null};if(e.parseTree.args.value.length>1)throw new I.L("MissingStatisticParameters");const t=F.A.create((0,w.Mi)(e.parseTree.args.value[0],0,e.parameters),{fieldsIndex:e.fieldsIndex,timeZone:e.timeZone,currentUser:e.currentUser});return{name:e.parseTree.name,expr:t}}return null}(a);if(null===s)throw new I.L("UnsupportedSqlFunction",{function:""});const o=s.name.toUpperCase().trim();if("MIN"===o){if(i.typeofstat="MIN",i.workingexpr=s.expr,null===a)throw new I.L("InvalidFunctionParameters",{function:"min"})}else if("MAX"===o){if(i.typeofstat="MAX",i.workingexpr=s.expr,null===a)throw new I.L("InvalidFunctionParameters",{function:"max"})}else if("COUNT"===o)i.typeofstat="COUNT",i.workingexpr=s.expr;else if("STDEV"===o){if(i.typeofstat="STDDEV",i.workingexpr=s.expr,null===a)throw new I.L("InvalidFunctionParameters",{function:"stdev"})}else if("SUM"===o){if(i.typeofstat="SUM",i.workingexpr=s.expr,null===a)throw new I.L("InvalidFunctionParameters",{function:"sum"})}else if("MEAN"===o){if(i.typeofstat="AVG",i.workingexpr=s.expr,null===a)throw new I.L("InvalidFunctionParameters",{function:o})}else if("AVG"===o){if(i.typeofstat="AVG",i.workingexpr=s.expr,null===a)throw new I.L("InvalidFunctionParameters",{function:"avg"})}else{if("VAR"!==o)throw new I.L("UnsupportedSqlFunction",{function:o});if(i.typeofstat="VAR",i.workingexpr=s.expr,null===a)throw new I.L("InvalidFunctionParameters",{function:"var"})}return i}toStatisticsName(){switch(this.typeofstat.toUpperCase()){case"MIN":return"min";case"MAX":return"max";case"SUM":return"sum";case"COUNT":default:return"count";case"VAR":return"var";case"STDDEV":return"stddev";case"AVG":return"avg"}}}var L=n(80200),U=n(74639),$=n(44729),j=n(55612),Z=n(15032),B=n(20437);const M=new o.b(["MIN","MAX","VAR","STDDEV","COUNT","SUM","AVG"],[["VARIANCE","VAR"],["AVERAGE","AVG"],["MEAN","AVG"],["STDEV","STDDEV"]]);class W extends y.t1{constructor(e){super(),this.declaredClass="esri.arcade.featureset.actions.Aggregate",this._decodedStatsFields=[],this._decodedGroupByFields=[],this._canDoSimpleGroupBy=!0,this._physicalGroupByFields=[],this.objectIdField="ROW__ID",this._adaptedFields=[],this._uniqueIds=1,this._maxQuery=10,this._maxProcessing=10,this._parent=e.parentfeatureset,this._config=e}isTable(){return!0}_nextUniqueName(e){for(;1===e["T"+this._uniqueIds.toString()];)this._uniqueIds++;const t="T"+this._uniqueIds.toString();return e[t]=1,t}_convertToEsriFieldType(e){return e}_initialiseFeatureSet(){const e=this._parent.getFieldsIndex();this.objectIdField="ROW__ID",this.globalIdField="";let t=!1,n=1;for(;!1===t;){let e=!1;for(const t of this._config.groupbyfields)if(t.name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}if(!1===e)for(const t of this._config.statsfields)if(t.name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}!1===e?t=!0:(this.objectIdField="ROW__ID"+n.toString(),n++)}for(const t of this._config.statsfields){const n=new k;n.field=t.name,n.tofieldname=t.name,n.workingexpr=t.expression instanceof F.A?t.expression:F.A.create(t.expression,{fieldsIndex:e,timeZone:this.dateFieldsTimeZoneDefaultUTC}),n.typeofstat=M.lookup(t.statistic)??"COUNT",this._decodedStatsFields.push(n)}this._decodedGroupByFields=[];for(const t of this._config.groupbyfields){const n={name:t.name,singlefield:null,tofieldname:t.name,expression:t.expression instanceof F.A?t.expression:F.A.create(t.expression,{fieldsIndex:e,timeZone:this.dateFieldsTimeZoneDefaultUTC}),sqlType:null};this._decodedGroupByFields.push(n)}const r={};this.geometryType=this._parent.geometryType,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField="";for(const e of this._parent.fields)r[e.name.toUpperCase()]=1;this.types=null,this.subtypes=null,this.subtypeField="",this.fields=[];const i=new k;i.field=this._nextUniqueName(r),i.tofieldname=this.objectIdField,i.workingexpr=F.A.create(this._parent.objectIdField,{fieldsIndex:this._parent.getFieldsIndex(),timeZone:this.dateFieldsTimeZoneDefaultUTC}),i.typeofstat="MIN",this._decodedStatsFields.push(i);for(const e of this._decodedGroupByFields){const t=new B.A;if(e.name=this._nextUniqueName(r),t.name=e.tofieldname,t.alias=t.name,(0,w.DA)(e.expression)){const n=this._parent.getField((0,w.YY)(e.expression,0));if(!n)throw new m.dr("AggregationFieldNotFound");e.name=n.name,e.singlefield=n.name,this._physicalGroupByFields.push(n.name),t.type=n.type,e.sqlType=n.type}else{t.type=this._convertToEsriFieldType((0,w.IY)(e.expression,this._parent.fields));const n=new B.A;n.name=e.name,n.alias=n.name,this._physicalGroupByFields.push(e.name),this._adaptedFields.push(new T(n,e.expression)),this._canDoSimpleGroupBy=!1,e.sqlType=t.type}this.fields.push(t)}if(this._adaptedFields.length>0)for(const e of this._parent.fields)this._adaptedFields.push(new N(e));for(const e of this._decodedStatsFields){const t=new B.A;let n=null;e.field=this._nextUniqueName(r),t.name=e.tofieldname,t.alias=t.name;const i=null!==e.workingexpr&&(0,w.DA)(e.workingexpr)?(0,w.YY)(e.workingexpr,0):"";switch(e.typeofstat){case"SUM":if(""!==i){if(n=this._parent.getField(i),!n)throw new m.dr("AggregationFieldNotFound");t.type=n.type}else t.type="double";break;case"MIN":case"MAX":if(""!==i){if(n=this._parent.getField(i),!n)throw new m.dr("AggregationFieldNotFound");t.type=n.type}else t.type="double";break;case"COUNT":t.type="integer";break;case"STDDEV":case"VAR":case"AVG":if(""!==i&&(n=this._parent.getField(i),!n))throw new m.dr("AggregationFieldNotFound");t.type="double"}this.fields.push(t)}}async _queryAll(){return(await this.query({abortSignal:h._})).features}async query(e){if(null!=e.spatialFilter)return y.An;const t={ordered:!1,nowhereclause:!1};await this._ensureLoaded();let n=e.where;if(null!=n)for(const e of this._decodedStatsFields)if(!0===(0,w.Ju)(n,e.tofieldname)){t.nowhereclause=!0,n=null;break}let r=e.orderBy;if(null!=r){t.ordered=!0;for(const e of this._decodedStatsFields)if(!0===r.scanForField(e.tofieldname)){r=null,t.ordered=!1;break}if(null!==r)for(const e of this._decodedGroupByFields)if(null===e.singlefield&&!0===r.scanForField(e.tofieldname)){r=null,t.ordered=!1;break}}if(!1!==this._canDoSimpleGroupBy&&await this._parent.canQueryAggregate({groupBy:this._physicalGroupByFields,statistics:this._decodedStatsFields,where:null,spatialFilter:null,abortSignal:e.abortSignal})){const i=await this._parent.queryAggregate({groupBy:this._physicalGroupByFields,statistics:this._decodedStatsFields,where:n?this._reformulateWhereClauseWithoutGroupByFields(n):null,spatialFilter:null,orderBy:r?this._reformulateOrderClauseWithoutGroupByFields(r):null,abortSignal:e.abortSignal});return(0,m.dZ)(e.abortSignal),{...i,filterApplied:!t.nowhereclause&&i.filterApplied,ordered:!0===t.ordered&&i.ordered,features:this._fixAggregateAttributeNames(i.features)}}const i=this._adaptedFields.length>0?new _({parentfeatureset:this._parent,adaptedFields:this._adaptedFields,extraFilter:null}):this._parent;if(!0===t.nowhereclause){const t=new x({parentfeatureset:i,orderbyclause:new E(this._physicalGroupByFields.join(",")+","+this._parent.objectIdField+" ASC")});return{filterApplied:!1,spatialFilterApplied:!1,ordered:!1,features:this._aggregateSortedFeatureGroups((await t.query({abortSignal:e.abortSignal})).features,this._maxQuery,e.abortSignal)}}let a=i;null!=n&&(a=new C.A({parentfeatureset:a,whereclause:this._reformulateWhereClauseWithoutGroupByFields(n)}));const s=new x({parentfeatureset:a,orderbyclause:new E(this._physicalGroupByFields.join(",")+","+this._parent.objectIdField+" ASC")});return{filterApplied:!1,spatialFilterApplied:!1,ordered:!1,features:this._aggregateSortedFeatureGroups((await s.query({abortSignal:e.abortSignal})).features,this._maxQuery,e.abortSignal)}}async*_fixAggregateAttributeNames(e){for await(const t of e)yield t.map(e=>{const t={geometry:e.geometry,attributes:{}},n={};for(const t in e.attributes)n[t.toLowerCase()]=e.attributes[t];for(const e of this._decodedGroupByFields)t.attributes[e.tofieldname]=n[e.name.toLowerCase()];for(const e of this._decodedStatsFields)t.attributes[e.tofieldname]=n[e.field.toLowerCase()];return t})}async*_aggregateSortedFeatureGroups(e,t,n){let r=null,i=[];for await(const a of e){await(0,f.a3)(),(0,m.dZ)(n);for(const e of a){const t=this._generateAggregateHash(e);null==r?r={features:[e],id:t}:t!==r.id?(i.push(this._calculateAndAppendAggregateItem(r)),r={features:[e],id:t}):r.features.push(e)}i.length>=t&&(yield i,i=[])}null!=r&&(i.push(this._calculateAndAppendAggregateItem(r)),yield i)}async queryStat(e){return{calculated:!1}}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new m.dr("NeverReach")}_reformulateWhereClauseWithoutStatsFields(e){for(const t of this._decodedStatsFields)e=(0,w.bD)(e,t.tofieldname,(0,w.YY)(t.workingexpr,0),this._parent.getFieldsIndex());return e}_reformulateWhereClauseWithoutGroupByFields(e){for(const t of this._decodedGroupByFields)t.tofieldname!==t.name&&(e=(0,w.bD)(e,t.tofieldname,(0,w.YY)(t.expression,0),this._parent.getFieldsIndex()));return e}_reformulateOrderClauseWithoutGroupByFields(e){const t=[];for(const e of this._decodedGroupByFields)e.tofieldname!==e.name&&t.push({field:e.tofieldname,newfield:e.name});return t.length>0?e.replaceFields(t):e}_calculateFieldStat(e,t,n){const r=[];for(const n of e.features)if(null!==t.workingexpr){const e=t.workingexpr.calculateValue(n);null!==e&&(e instanceof $.n||e instanceof Z.k?r.push(e.toNumber()):e instanceof j.g?r.push(e.toMilliseconds()):r.push(e))}else r.push(null);n.attributes[t.tofieldname]=(0,U.s)(t.typeofstat,[r])}_calculateAndAppendAggregateItem(e){const t={attributes:{}};for(const n of this._decodedGroupByFields){const r=n.singlefield?e.features[0].attributes[n.singlefield]:F.A.convertValueToStorageFormat(n.expression.calculateValue(e.features[0]),n.sqlType);t.attributes[n.tofieldname]=r}for(const n of this._decodedStatsFields)this._calculateFieldStat(e,n,t);return t}_generateAggregateHash(e){let t="";for(const n of this._decodedGroupByFields){const r=n.singlefield?e.attributes[n.singlefield]:n.expression.calculateValue(e);t+=null==r?":":":"+r.toString()}return(0,L.d)(t,L.T.String)}async getFeatureByObjectId(){throw new m.dr("NotImplemented")}}async function*R(e,t){let n=t;for await(const t of e)if(n>=t.length?(n-=t.length,yield t):(yield t.slice(0,n),n=0),n<=0)break}class P extends y.t1{constructor(e){super(),this.declaredClass="esri.arcade.featureset.actions.Top",this._maxProcessing=100,this._parent=e.parentfeatureset,this._limit=e.topnum}async _queryAll(){return(await this.query({abortSignal:h._})).features}async query(e){await this._ensureLoaded();const t=await this._parent.queryAll(e.abortSignal);return{filterApplied:null==e.where,spatialFilterApplied:null==e.spatialFilter,ordered:!1,features:R(t,this._limit)}}async queryStat(e){return{calculated:!1}}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new m.dr("NeverReach")}getFieldsIndex(){return this._parent.getFieldsIndex()}}var q=n(85978),O=n(30235),V=n(334),G=n(74887),K=n(68654),J=n(20655),H=n(11254),z=n(51447),Q=n(53966),Y=n(66552);new Y.J({Clean:"clean",Dirty:"dirty"}),new Y.J({Physical:"physical",Virtual:"virtual"}),new Y.J({"Start and end":"start-and-end",Start:"start",Midspan:"midspan",End:"end"}),new Y.J({startingPoint:"starting-point",barrier:"barrier",stoppingPoint:"stopping-point"}),new Y.J({connected:"connected",upstream:"upstream",downstream:"downstream",shortestPath:"shortest-path",subnetwork:"subnetwork",subnetworkController:"subnetwork-controller",loops:"loops",isolation:"isolation",path:"path",circuit:"circuit"});const X="{00000000-0000-0000-0000-000000000000}",ee=new Y.J({junctionJunctionConnectivity:"junction-junction-connectivity",connectivity:"connectivity",attachment:"attachment",containment:"containment",junctionEdgeFromConnectivity:"junction-edge-from-connectivity",junctionEdgeMidspanConnectivity:"junction-edge-midspan-connectivity",junctionEdgeToConnectivity:"junction-edge-to-connectivity"});new Y.J({normal:"normal",rebuild:"rebuild",forceRebuild:"force-rebuild"});var te=n(2272),ne=n(31635),re=n(25482),ie=n(91429),ae=n(82799);let se=class extends re.o{constructor(e){super(e),this.type="networkElement",this.assetGroupCode=null,this.assetTypeCode=null,this.globalId=null,this.networkSourceId=null,this.objectId=null,this.positionFrom=null,this.positionTo=null,this.terminalId=null}};(0,ne.Cg)([(0,ie.MZ)({json:{write:!1}})],se.prototype,"type",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],se.prototype,"assetGroupCode",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],se.prototype,"assetTypeCode",void 0),(0,ne.Cg)([(0,ie.MZ)({type:String,json:{write:!0}})],se.prototype,"globalId",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],se.prototype,"networkSourceId",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],se.prototype,"objectId",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],se.prototype,"positionFrom",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],se.prototype,"positionTo",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],se.prototype,"terminalId",void 0),se=(0,ne.Cg)([(0,ie.$K)("esri.rest.networks.support.NetworkElement")],se);let oe=class extends se{constructor(e){super(e),this.type="telecomNetworkElement",this.firstUnit=null,this.numUnits=null}};(0,ne.Cg)([(0,ie.MZ)({json:{write:!1}})],oe.prototype,"type",void 0),(0,ne.Cg)([(0,ie.MZ)({json:{write:!0}})],oe.prototype,"firstUnit",void 0),(0,ne.Cg)([(0,ie.MZ)({json:{write:!0}})],oe.prototype,"numUnits",void 0),oe=(0,ne.Cg)([(0,ie.$K)("esri.rest.networks.support.TelecomNetworkElement")],oe);var le=n(36005),ue=n(43937);let de=class extends re.o{constructor(e){super(e),this.globalId=null,this.associationType=null,this.fromNetworkElement=null,this.toNetworkElement=null,this.geometry=null,this.errorMessage=null,this.percentAlong=null,this.errorCode=null,this.isContentVisible=null,this.status=null}readFromNetworkElement(e,t){return t.fromFirstUnit||t.fromNumUnits?new oe({globalId:t.fromGlobalId,networkSourceId:t.fromNetworkSourceId,terminalId:t.fromTerminalId,firstUnit:t.fromFirstUnit,numUnits:t.fromNumUnits}):new se({globalId:t.fromGlobalId,networkSourceId:t.fromNetworkSourceId,terminalId:t.fromTerminalId})}writeFromNetworkElement(e,t){if(e&&(t.fromGlobalId=e.globalId,t.fromNetworkSourceId=e.networkSourceId,t.fromTerminalId=e.terminalId,"telecomNetworkElement"===e.type)){const n=e;t.fromFirstUnit=n.firstUnit,t.fromNumUnits=n.numUnits}}readToNetworkElement(e,t){return t.toFirstUnit||t.toNumUnits?new oe({globalId:t.toGlobalId,networkSourceId:t.toNetworkSourceId,terminalId:t.toTerminalId,firstUnit:t.toFirstUnit,numUnits:t.toNumUnits}):new se({globalId:t.toGlobalId,networkSourceId:t.toNetworkSourceId,terminalId:t.toTerminalId})}writeToNetworkElement(e,t){if(e&&(t.toGlobalId=e.globalId,t.toNetworkSourceId=e.networkSourceId,t.toTerminalId=e.terminalId,"telecomNetworkElement"===e.type)){const n=e;t.toFirstUnit=n.firstUnit,t.toNumUnits=n.numUnits}}equals(e){if(this.globalId===X&&e.globalId===X){function t(e,t){return e.networkSourceId===t.networkSourceId&&e.globalId===t.globalId&&e.terminalId===t.terminalId&&e.firstUnit===t.firstUnit&&e.numUnits===t.numUnits}const n=this.fromNetworkElement,r=this.toNetworkElement,i=e.fromNetworkElement,a=e.toNetworkElement,s=t(n,i),o=t(r,a);return s&&o&&this.associationType===e.associationType}return null!=this.globalId&&null!=e.globalId&&this.globalId===e.globalId}};(0,ne.Cg)([(0,ie.MZ)({type:String,json:{write:!0}})],de.prototype,"globalId",void 0),(0,ne.Cg)([(0,ie.MZ)({type:ee.apiValues,json:{type:ee.jsonValues,read:ee.read,write:ee.write}})],de.prototype,"associationType",void 0),(0,ne.Cg)([(0,ie.MZ)({type:se,json:{write:{target:{fromGlobalId:{type:String},fromNetworkSourceId:{type:Number},fromTerminalId:{type:Number},fromFirstUnit:{type:Number},fromNumUnits:{type:Number}}},read:{source:["fromGlobalId","fromNetworkSourceId","fromTerminalId","fromFirstUnit","fromNumUnits"]}}})],de.prototype,"fromNetworkElement",void 0),(0,ne.Cg)([(0,le.w)("fromNetworkElement")],de.prototype,"readFromNetworkElement",null),(0,ne.Cg)([(0,ue.K)("fromNetworkElement")],de.prototype,"writeFromNetworkElement",null),(0,ne.Cg)([(0,ie.MZ)({type:se,json:{write:{target:{toGlobalId:{type:String},toNetworkSourceId:{type:Number},toTerminalId:{type:Number},toFirstUnit:{type:Number},toNumUnits:{type:Number}}},read:{source:["toGlobalId","toNetworkSourceId","toTerminalId","toFirstUnit","toNumUnits"]}}})],de.prototype,"toNetworkElement",void 0),(0,ne.Cg)([(0,le.w)("toNetworkElement")],de.prototype,"readToNetworkElement",null),(0,ne.Cg)([(0,ue.K)("toNetworkElement")],de.prototype,"writeToNetworkElement",null),(0,ne.Cg)([(0,ie.MZ)({type:ae.A,json:{write:!0}})],de.prototype,"geometry",void 0),(0,ne.Cg)([(0,ie.MZ)({type:String,json:{write:!0}})],de.prototype,"errorMessage",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],de.prototype,"percentAlong",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],de.prototype,"errorCode",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Boolean,json:{write:!0}})],de.prototype,"isContentVisible",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],de.prototype,"status",void 0),de=(0,ne.Cg)([(0,ie.$K)("esri.rest.networks.support.Association")],de);const ce=de;let fe=class extends re.o{constructor(e){super(e),this.associations=[]}};function pe(e){const{returnDeletes:t,elements:n,gdbVersion:r,moment:i}=e.toJSON();return{returnDeletes:t,elements:JSON.stringify(n.map(e=>({globalId:e.globalId,networkSourceId:e.networkSourceId,terminalId:e.terminalId}))),types:JSON.stringify(e.types.map(e=>ee.toJSON(e))).replaceAll('"connectivity"','"junctionJunctionConnectivity"'),gdbVersion:r,moment:i??Date.now()}}(0,ne.Cg)([(0,ie.MZ)({type:[ce],json:{write:!0}})],fe.prototype,"associations",void 0),fe=(0,ne.Cg)([(0,ie.$K)("esri.rest.networks.support.QueryAssociationsResult")],fe);var he,me=n(56507);let ye=he=class extends re.o{static from(e){return(0,me.PZ)(he,e)}constructor(e){super(e),this.returnDeletes=!1,this.elements=[],this.types=[],this.gdbVersion=null,this.moment=null}};(0,ne.Cg)([(0,ie.MZ)({type:Boolean,json:{write:!0}})],ye.prototype,"returnDeletes",void 0),(0,ne.Cg)([(0,ie.MZ)({type:[se],json:{write:!0}})],ye.prototype,"elements",void 0),(0,ne.Cg)([(0,ie.MZ)({type:[ee.apiValues],json:{type:ee.jsonValues,read:ee.read,write:ee.write}})],ye.prototype,"types",void 0),(0,ne.Cg)([(0,ie.MZ)({type:String,json:{write:!0}})],ye.prototype,"gdbVersion",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.moment=e?.getTime()}}}})],ye.prototype,"moment",void 0),ye=he=(0,ne.Cg)([(0,ie.$K)("esri.rest.networks.support.QueryAssociationsParameters")],ye);var ge=n(54218);function we(e,t,n){const r=e.getVariables();if(r.length>0){const i={};for(const e of r)i[e]=t.evaluateIdentifier(n,{name:e});e.parameters=i}return e}function Ie(e,t,n=null){for(const n in e)if(n.toLowerCase()===t.toLowerCase())return e[n];return n}function Fe(e){if(null===e)return null;const t={type:Ie(e,"type",""),name:Ie(e,"name","")};if("range"===t.type)t.range=Ie(e,"range",[]);else{t.codedValues=[];for(const n of Ie(e,"codedValues",[]))t.codedValues.push({name:Ie(n,"name",""),code:Ie(n,"code",null)})}return t}function Ae(e){if(null===e)return null;const t={},n=Ie(e,"wkt");null!==n&&(t.wkt=n);const r=Ie(e,"wkid");return null!==r&&(t.wkid=r),t}function Ne(e){if(null===e)return null;const t={hasZ:Ie(e,"hasz",!1),hasM:Ie(e,"hasm",!1)},n=Ie(e,"spatialreference");null!=n&&(t.spatialReference=Ae(n));const r=Ie(e,"x",null);if(null!==r)return t.x=r,t.y=Ie(e,"y",null),t.hasZ&&(t.z=Ie(e,"z",null)),t.hasM&&(t.m=Ie(e,"m",null)),t;const i=Ie(e,"rings",null);if(null!==i)return t.rings=i,t;const a=Ie(e,"paths",null);if(null!==a)return t.paths=a,t;const s=Ie(e,"points",null);if(null!==s)return t.points=s,t;for(const n of["xmin","xmax","ymin","ymax","zmin","zmax","mmin","mmax"]){const r=Ie(e,n,null);null!==r&&(t[n]=r)}return t}function be(e){return"utc"===e?.toLowerCase()?"UTC":"unknown"===e?.toLowerCase()?"Unknown":e}function Se(e){if("async"===e.mode){e.functions.timezone=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,a)=>{if((0,f.B)(a,1,2,t,n),(0,f.g)(a[0]))return"Unknown";if((0,f.f)(a[0]))return"Unknown";if((0,f.m)(a[0])){if(await a[0].load(),1===a.length||null===a[1])return a[0].datesInUnknownTimezone?be("unknown"):be(a[0].dateFieldsTimeZone);if(!(a[1]instanceof s.A)||!1===a[1].hasField("type"))throw new l.D$(t,"InvalidParameter",n);const e=a[1].field("type");if(!1===(0,ge.Kg)(e))throw new l.D$(t,"InvalidParameter",n);switch((0,f.s)(e).toLowerCase()){case"preferredtimezone":return be(a[0].preferredTimeZone);case"editfieldsinfo":return be(a[0].editFieldsInfo?.timeZone??null);case"timeinfo":return be(a[0].timeInfo?.timeZone??null);case"field":if(a[1].hasField("fieldname")&&(0,ge.Kg)(a[1].field("fieldname")))return be(a[0].fieldTimeZone((0,f.s)(a[1].field("fieldname"))))}throw new l.D$(t,"InvalidParameter",n)}const o=(0,f.P)(a[0],(0,f.K)(t));if(null===o)return null;const u=o.timeZone;return"system"===u?i.lY.systemTimeZoneCanonicalName:"utc"===u.toLowerCase()?"UTC":"unknown"===u.toLowerCase()?"Unknown":u})},e.functions.sqltimestamp=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{(0,f.B)(i,1,3,t,n);const a=i[0];if((0,f.e)(a)){if(1===i.length)return a.toSQLWithKeyword();if(2===i.length)return a.changeTimeZone((0,f.s)(i[1])).toSQLWithKeyword();throw new l.D$(t,"InvalidParameter",n)}if((0,f.f)(a))return a.toSQLWithKeyword();if((0,f.m)(a)){if(3!==i.length)throw new l.D$(t,"InvalidParameter",n);await a.load();const e=(0,f.s)(i[1]);if((0,f.f)(i[2]))return i[2].toSQLWithKeyword();if(!1===(0,f.e)(i[2]))throw new l.D$(t,"InvalidParameter",n);const r=a.fieldTimeZone(e);return null==r?i[2].toSQLWithKeyword():i[2].changeTimeZone(r).toSQLWithKeyword()}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"sqltimestamp",min:2,max:4}),e.functions.featuresetbyid=function(t,n){return e.standardFunctionAsync(t,n,(e,r,i)=>{if((0,f.B)(i,2,4,t,n),(0,f.l)(i[0])){const e=(0,f.s)(i[1]);let r=(0,f.J)(i[2],null);const a=(0,f.H)((0,f.J)(i[3],!0));if(null===r&&(r=["*"]),!1===(0,ge.cy)(r))throw new l.D$(t,"InvalidParameter",n);return i[0].featureSetById(e,a,r)}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"featuresetbyid",min:2,max:4});const t=new o.b(["datasource","parent","root"]);e.functions.getfeatureset=function(n,r){return e.standardFunctionAsync(n,r,async(e,i,a)=>{if((0,f.B)(a,1,2,n,r),(0,f.k)(a[0])){const e=null==a[1]?"datasource":t.lookup((0,f.s)(a[1]));return(0,d.convertToFeatureSet)(a[0].fullSchema(),e,n.lrucache,n.interceptor,n.spatialReference)}throw new l.D$(n,"InvalidParameter",r)})},e.signatures.push({name:"getfeatureset",min:1,max:2}),e.functions.featuresetbyportalitem=function(t,n){return e.standardFunctionAsync(t,n,(e,r,i)=>{if((0,f.B)(i,2,5,t,n),null===i[0])throw new l.D$(t,"PortalRequired",n);if(i[0]instanceof a.A){const e=(0,f.s)(i[1]),r=(0,f.s)(i[2]);let a=(0,f.J)(i[3],null);const s=(0,f.H)((0,f.J)(i[4],!0));if(null===a&&(a=["*"]),!1===(0,ge.cy)(a))throw new l.D$(t,"InvalidParameter",n);let o;return o=t.services?.portal?t.services.portal:J.A.getDefault(),o=(0,p.R)(i[0],o),(0,d.constructFeatureSetFromPortalItem)(e,r,t.spatialReference,a,s,o,t.lrucache,t.interceptor)}if(!1===(0,ge.Kg)(i[0]))throw new l.D$(t,"PortalRequired",n);const s=(0,f.s)(i[0]),o=(0,f.s)(i[1]);let u=(0,f.J)(i[2],null);const c=(0,f.H)((0,f.J)(i[3],!0));if(null===u&&(u=["*"]),!1===(0,ge.cy)(u))throw new l.D$(t,"InvalidParameter",n);return(0,d.constructFeatureSetFromPortalItem)(s,o,t.spatialReference,u,c,t.services?.portal??J.A.getDefault(),t.lrucache,t.interceptor)})},e.signatures.push({name:"featuresetbyportalitem",min:2,max:5}),e.functions.featuresetbyname=function(t,n){return e.standardFunctionAsync(t,n,(e,r,i)=>{if((0,f.B)(i,2,4,t,n),(0,f.l)(i[0])){const e=(0,f.s)(i[1]);let r=(0,f.J)(i[2],null);const a=(0,f.H)((0,f.J)(i[3],!0));if(null===r&&(r=["*"]),!1===(0,ge.cy)(r))throw new l.D$(t,"InvalidParameter",n);return i[0].featureSetByName(e,a,r)}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"featuresetbyname",min:2,max:4}),e.functions.featureset=function(t,n){return e.standardFunction(t,n,(e,r,i)=>{(0,f.B)(i,1,1,t,n);const a={layerDefinition:{geometryType:"",objectIdField:"",globalIdField:"",typeIdField:"",hasM:!1,hasZ:!1,fields:[]},featureSet:{geometryType:"",features:[]}};if((0,ge.Kg)(i[0])){const e=JSON.parse(i[0]);void 0!==e.layerDefinition?(a.layerDefinition=e.layerDefinition,a.featureSet=e.featureSet,e.layerDefinition.spatialReference&&(a.layerDefinition.spatialReference=e.layerDefinition.spatialReference)):(a.featureSet.features=e.features,a.featureSet.geometryType=e.geometryType,a.layerDefinition.geometryType=a.featureSet.geometryType,a.layerDefinition.objectIdField=e.objectIdFieldName??"",a.layerDefinition.typeIdField=e.typeIdFieldName,a.layerDefinition.globalIdField=e.globalIdFieldName,a.layerDefinition.fields=e.fields,e.spatialReference&&(a.layerDefinition.spatialReference=e.spatialReference))}else{if(!(i[0]instanceof s.A))throw new l.D$(t,"InvalidParameter",n);{const e=JSON.parse(i[0].castToText(!0)),r=Ie(e,"layerdefinition");if(null!==r){a.layerDefinition.geometryType=Ie(r,"geometrytype",""),a.featureSet.geometryType=a.layerDefinition.geometryType,a.layerDefinition.globalIdField=Ie(r,"globalidfield",""),a.layerDefinition.objectIdField=Ie(r,"objectidfield",""),a.layerDefinition.typeIdField=Ie(r,"typeidfield",""),a.layerDefinition.hasZ=!0===Ie(r,"hasz",!1),a.layerDefinition.hasM=!0===Ie(r,"hasm",!1);const t=Ie(r,"spatialreference");t&&(a.layerDefinition.spatialReference=Ae(t));const n=[];for(const e of Ie(r,"fields",[])){const t={name:Ie(e,"name",""),alias:Ie(e,"alias",""),type:Ie(e,"type",""),nullable:Ie(e,"nullable",!0),editable:Ie(e,"editable",!0),length:Ie(e,"length",null),domain:Fe(Ie(e,"domain"))};n.push(t)}a.layerDefinition.fields=n;const i=Ie(e,"featureset");if(i){const e={};for(const t of n)e[t.name.toLowerCase()]=t.name;for(const t of Ie(i,"features",[])){const n={},r=Ie(t,"attributes",{});for(const t in r)n[e[t.toLowerCase()]]=r[t];a.featureSet.features.push({attributes:n,geometry:Ne(Ie(t,"geometry"))})}}}else{a.layerDefinition.hasZ=!0===Ie(e,"hasz",!1),a.layerDefinition.hasM=!0===Ie(e,"hasm",!1),a.layerDefinition.geometryType=Ie(e,"geometrytype",""),a.featureSet.geometryType=a.layerDefinition.geometryType,a.layerDefinition.objectIdField=Ie(e,"objectidfieldname",""),a.layerDefinition.typeIdField=Ie(e,"typeidfieldname","");const r=Ie(e,"spatialreference");r&&(a.layerDefinition.spatialReference=Ae(r));const i=[],s=Ie(e,"fields",null);if(!(0,ge.cy)(s))throw new l.D$(t,"InvalidParameter",n);for(const e of s){const t={name:Ie(e,"name",""),alias:Ie(e,"alias",""),type:Ie(e,"type",""),nullable:Ie(e,"nullable",!0),editable:Ie(e,"editable",!0),length:Ie(e,"length",null),domain:Fe(Ie(e,"domain"))};i.push(t)}a.layerDefinition.fields=i;const o={};for(const e of i)o[e.name.toLowerCase()]=e.name;let u=Ie(e,"features",null);if((0,ge.cy)(u))for(const e of u){const t={},n=Ie(e,"attributes",{});for(const e in n)t[o[e.toLowerCase()]]=n[e];a.featureSet.features.push({attributes:t,geometry:Ne(Ie(e,"geometry",null))})}else u=null,a.featureSet.features=u}}}if(!1===function(e){return!!e.layerDefinition&&!!e.featureSet&&!1!==function(e){for(const t of["",null,"esriGeometryNull","esriGeometryPoint","esriGeometryPolyline","esriGeometryPolygon","esriGeometryMultipoint","esriGeometryEnvelope"])if(t===e)return!0;return!1}(e.layerDefinition.geometryType)&&!1!==(0,ge.cy)(e.layerDefinition.fields)&&!1!==(0,ge.cy)(e.featureSet.features)}(a))throw new l.D$(t,"InvalidParameter",n);return a.layerDefinition.geometryType||(a.layerDefinition.geometryType="esriGeometryNull"),O.A.create(a,t.spatialReference)})},e.signatures.push({name:"featureset",min:1,max:1}),e.functions.filter=function(t,n){return e.standardFunctionAsync(t,n,async(r,i,a)=>{if((0,f.B)(a,2,2,t,n),(0,ge.cy)(a[0])||(0,f.j)(a[0])){const e=[];let r,i=a[0];if(i instanceof c.A&&(i=i.toArray()),!(0,f.i)(a[1]))throw new l.D$(t,"InvalidParameter",n);r=a[1].createFunction(t);for(const t of i){const n=r(t);(0,G.$X)(n)?!0===await n&&e.push(t):!0===n&&e.push(t)}return e}if((0,f.m)(a[0])){const n=await a[0].load(),r=F.A.create(a[1],{fieldsIndex:n.getFieldsIndex(),timeZone:n.dateFieldsTimeZoneDefaultUTC}),i=r.getVariables();if(i.length>0){const n={};for(const r of i)n[r]=e.evaluateIdentifier(t,{name:r});r.parameters=n}return new C.A({parentfeatureset:a[0],whereclause:r})}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"filter",min:2,max:2}),e.functions.orderby=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{if((0,f.B)(i,2,2,t,n),(0,f.m)(i[0])){const e=new E(i[1]);return new x({parentfeatureset:i[0],orderbyclause:e})}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"orderby",min:2,max:2}),e.functions.top=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{if((0,f.B)(i,2,2,t,n),(0,f.m)(i[0]))return new P({parentfeatureset:i[0],topnum:i[1]});if((0,ge.cy)(i[0]))return(0,f.r)(i[1])>=i[0].length?i[0].slice():i[0].slice(0,(0,f.r)(i[1]));if((0,f.j)(i[0]))return(0,f.r)(i[1])>=i[0].length()?i[0].slice():i[0].slice(0,(0,f.r)(i[1]));throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"top",min:2,max:2}),e.functions.first=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{if((0,f.B)(i,1,1,t,n),(0,f.m)(i[0])){const n=await i[0].first(e.abortSignal);if(null!==n){const e=u.Xj.createFromGraphicLikeObject(n.geometry,n.attributes,i[0],t.timeZone);return e._underlyingGraphic=n,e}return n}return(0,ge.cy)(i[0])?0===i[0].length?null:i[0][0]:(0,f.j)(i[0])?0===i[0].length()?null:i[0].get(0):null})},e.signatures.push({name:"first",min:1,max:1}),e.functions.attachments=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{(0,f.B)(i,1,2,t,n);const a={minsize:-1,maxsize:-1,types:null,returnMetadata:!1};if(i.length>1)if(i[1]instanceof s.A){if(i[1].hasField("minsize")&&(a.minsize=(0,f.r)(i[1].field("minsize"))),i[1].hasField("metadata")&&(a.returnMetadata=(0,f.H)(i[1].field("metadata"))),i[1].hasField("maxsize")&&(a.maxsize=(0,f.r)(i[1].field("maxsize"))),i[1].hasField("types")){const e=(0,f.N)(i[1].field("types"),!1);e.length>0&&(a.types=e)}}else if(null!==i[1])throw new l.D$(t,"InvalidParameter",n);if((0,f.k)(i[0])){const e=i[0]._layer;let n;if((0,f.m)(e))n=e;else{if(null==e||!(0,g.eB)(e))return[];n=(0,d.constructFeatureSet)(e,t.spatialReference,["*"],!0,t.lrucache,t.interceptor)}return await n.load(),n.queryAttachments(i[0].field(n.objectIdField),a.minsize,a.maxsize,a.types,a.returnMetadata)}if(null===i[0])return[];throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"attachments",min:1,max:2}),e.functions.featuresetbyrelationshipname=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{(0,f.B)(i,2,4,t,n);const a=i[0],s=(0,f.s)(i[1]);let o=(0,f.J)(i[2],null);const u=(0,f.H)((0,f.J)(i[3],!0));if(null===o&&(o=["*"]),!1===(0,ge.cy)(o))throw new l.D$(t,"InvalidParameter",n);if(null===i[0])return null;if(!(0,f.k)(i[0]))throw new l.D$(t,"InvalidParameter",n);const c=a._layer;let p;if((0,f.m)(c))p=c;else{if(null==c||!(0,g.eB)(c))return null;p=(0,d.constructFeatureSet)(c,t.spatialReference,["*"],!0,t.lrucache,t.interceptor)}p=await p.load();const h=p.relationshipMetadata().filter(e=>e.name===s);if(0===h.length)return null;if(void 0!==h[0].relationshipTableId&&null!==h[0].relationshipTableId&&h[0].relationshipTableId>-1)return(0,d.constructFeatureSetFromRelationship)(p,h[0],a.field(p.objectIdField),p.spatialReference,o,u,t.lrucache,t.interceptor);let m=p.serviceUrl();if(!m)return null;m=m.endsWith("/")?m+h[0].relatedTableId.toString():m+"/"+h[0].relatedTableId.toString();const y=await(0,d.constructFeatureSetFromUrl)(m,p.spatialReference,o,u,t.lrucache,t.interceptor);await y.load();let w=y.relationshipMetadata();if(w=w.filter(e=>e.id===h[0].id),!1===a.hasField(h[0].keyField)||null===a.field(h[0].keyField)){const e=await p.getFeatureByObjectId(a.field(p.objectIdField),[h[0].keyField]);if(e){const t=F.A.create(w[0].keyField+"= @id",{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC});return t.parameters={id:e.attributes[h[0].keyField]},new C.A({parentfeatureset:y,whereclause:t})}return new q.A({parentfeatureset:y})}const I=F.A.create(w[0].keyField+"= @id",{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC});return I.parameters={id:a.field(h[0].keyField)},new C.A({parentfeatureset:y,whereclause:I})})},e.signatures.push({name:"featuresetbyrelationshipname",min:2,max:4}),e.functions.featuresetbyassociation=function(t,n){return e.standardFunctionAsync(t,n,async(e,i,a)=>{(0,f.B)(a,2,3,t,n);const s=a[0],u=(0,o.B)((0,f.s)((0,f.J)(a[1],""))),c=(0,ge.Kg)(a[2])?(0,f.s)(a[2]):null;if(null===a[0])return null;if(!(0,f.k)(a[0]))throw new l.D$(t,"InvalidParameter",n);let p=s._layer;if(p instanceof K.default&&(p=(0,d.constructFeatureSet)(p,t.spatialReference,["*"],!0,t.lrucache,t.interceptor)),null===p)return null;if(!1===(0,f.m)(p))return null;await p.load();const h=p.serviceUrl(),m=await(0,d.constructAssociationMetaDataFeatureSetFromUrl)(h,t.spatialReference,!0);if(m.unVersion>=8)return await async function(e,t,n,i,a,s,o){const u=await e.getFeatureSetInfo();if(null===(u?.layerId??null))return null;if(!a.layerIdLookup.get(u.layerId))return null;const c=e.serviceUrl().replace(/\/FeatureServer/i,"/UtilityNetworkServer"),f=[];switch(n){case"connected":f.push("connectivity"),f.push("junction-edge-from-connectivity"),f.push("junction-edge-to-connectivity"),f.push("junction-edge-midspan-connectivity"),f.push("junction-junction-connectivity");break;case"container":case"content":f.push("containment");break;case"structure":case"attached":f.push("attachment");break;case"junctionedge":f.push("junction-edge-from-connectivity"),f.push("junction-edge-to-connectivity");break;case"midspan":f.push("junction-edge-midspan-connectivity");break;default:throw new l.D$(s,"InvalidParameter",o)}let p=null,h=!1;if(null!==i&&""!==i&&void 0!==i){for(const e of a.terminals)e.terminalName===i&&(p=e.terminalId);null===p&&(h=!0)}const m=[];if(!h){const i=new se({globalId:t.field(e.globalIdField),networkSourceId:a.layerIdLookup.get(u.layerId).sourceId,...p?{terminalId:p}:""}),s=await async function(e,t){const n=(0,te.Dl)(e),r={...pe(t),f:"json"},i=(0,te.lF)({...n.query,...r}),a=(0,te.jV)(i,{method:"post"}),s=`${n.path}/associations/query`,{data:o}=await(0,H.A)(s,a),l=fe.fromJSON(o);return t.types.includes("connectivity")&&(0,z.Lx)(Q.A.getLogger("esri/rest/networks/support/QueryAssociationsParameters"),"types",{replacement:"Please use 'junction-junction-connectivity' instead of 'connectivity'.",see:"https://arcg.is/11Tr8a#types",version:"4.29",warnOnce:!0}),l}(c,new ye({types:f,elements:[i]}));let o=0;for(const e of s.associations){let t=null,s="",l="";if(e.fromNetworkElement?.globalId===i.globalId?(t=e.toNetworkElement,l="to"):e.toNetworkElement?.globalId===i.globalId&&(t=e.fromNetworkElement,l="from"),!t)continue;switch(n){case"attached":if("attachment"!==e.associationType)continue;if("to"!==l)continue;break;case"structure":if("attachment"!==e.associationType)continue;if("from"!==l)continue;break;case"container":if("containment"!==e.associationType)continue;if("from"!==l)continue;break;case"content":if("containment"!==e.associationType)continue;if("to"!==l)continue;break;case"connected":break;case"junctionedge":"junction-edge-to-connectivity"===e.associationType?s="to":"junction-edge-from-connectivity"===e.associationType&&(s="from");break;case"midspan":if("junction-edge-midspan-connectivity"!==e.associationType)continue}const u=a.sourceIdLookup.get(t.networkSourceId)?.className??"";m.push(new r.A({geometry:null,attributes:{objectId:o++,globalId:t.globalId,percentAlong:e.percentAlong??0,isContentVisible:e.isContentVisible?0:1,className:u,side:s}}))}}const y=new K.default({source:m,geometryType:null,objectIdField:"objectId",globalIdField:"globalId",fields:[new B.A({name:"objectId",alias:"objectId",type:"oid"}),new B.A({name:"globalId",alias:"globalId",type:"global-id"}),new B.A({name:"percentAlong",alias:"percentAlong",type:"double"}),new B.A({name:"side",alias:"side",type:"string"}),new B.A({name:"isContentVisible",alias:"isContentVisible",type:"integer"}),new B.A({name:"className",alias:"className",type:"string"})]});return(0,d.constructFeatureSet)(y)}(p,s,u,c,m,t,n);const y=m.associations;let w=null,I=null,A=!1;if(null!==c&&""!==c&&void 0!==c){for(const e of m.terminals)e.terminalName===c&&(I=e.terminalId);null===I&&(A=!0)}const C=y.getFieldsIndex(),v=C.get("TOGLOBALID").name,x=C.get("FROMGLOBALID").name,D=C.get("TOTERMINALID").name,E=C.get("FROMTERMINALID").name,k=C.get("FROMNETWORKSOURCEID").name,L=C.get("TONETWORKSOURCEID").name,U=C.get("ASSOCIATIONTYPE").name,$=C.get("ISCONTENTVISIBLE").name,j=C.get("OBJECTID").name;for(const e of p.fields)if("global-id"===e.type){w=s.field(e.name);break}let Z=null,M=new T(new B.A({name:"percentalong",alias:"percentalong",type:"double"}),F.A.create("0",{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC})),W=new T(new B.A({name:"side",alias:"side",type:"string"}),F.A.create("''",{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC}));const R="globalid",P="globalId",q={};for(const e in m.lkp)q[e]=m.lkp[e].sourceId;const O=new S(new B.A({name:"classname",alias:"classname",type:"string"}),null,q);let V="";switch(u){case"midspan":{V=`((${v}='${w}') OR ( ${x}='${w}')) AND (${U} IN (5))`,O.codefield=F.A.create(`CASE WHEN (${v}='${w}') THEN ${k} ELSE ${L} END`,{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC});const e=(0,g.ke)(_.findField(y.fields,x));e.name=R,e.alias=R,Z=new T(e,F.A.create(`CASE WHEN (${x}='${w}') THEN ${v} ELSE ${x} END`,{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC})),M=m.unVersion>=4?new N(_.findField(y.fields,C.get("PERCENTALONG").name)):new T(new B.A({name:"percentalong",alias:"percentalong",type:"double"}),F.A.create("0",{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC}));break}case"junctionedge":{V=`((${v}='${w}') OR ( ${x}='${w}')) AND (${U} IN (4,6))`,O.codefield=F.A.create(`CASE WHEN (${v}='${w}') THEN ${k} ELSE ${L} END`,{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC});const e=(0,g.ke)(_.findField(y.fields,x));e.name=R,e.alias=R,Z=new T(e,F.A.create(`CASE WHEN (${x}='${w}') THEN ${v} ELSE ${x} END`,{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC})),W=new T(new B.A({name:"side",alias:"side",type:"string"}),F.A.create(`CASE WHEN (${U}=4) THEN 'from' ELSE 'to' END`,{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC}));break}case"connected":{let e=`${v}='@T'`,t=`${x}='@T'`;null!==I&&(e+=` AND ${D}=@A`,t+=` AND ${E}=@A`),V="(("+e+") OR ("+t+"))",V=(0,f.$)(V,"@T",w??""),e=(0,f.$)(e,"@T",w??""),null!==I&&(e=(0,f.$)(e,"@A",I.toString()),V=(0,f.$)(V,"@A",I.toString())),O.codefield=F.A.create("CASE WHEN "+e+` THEN ${k} ELSE ${L} END`,{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC});const n=(0,g.ke)(_.findField(y.fields,x));n.name=R,n.alias=R,Z=new T(n,F.A.create("CASE WHEN "+e+` THEN ${x} ELSE ${v} END`,{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC}));break}case"container":V=`${v}='${w}' AND ${U} = 2`,null!==I&&(V+=` AND ${D} = `+I.toString()),O.codefield=k,V="( "+V+" )",Z=new b(_.findField(y.fields,x),R,R);break;case"content":V=`(${x}='${w}' AND ${U} = 2)`,null!==I&&(V+=` AND ${E} = `+I.toString()),O.codefield=L,V="( "+V+" )",Z=new b(_.findField(y.fields,v),R,R);break;case"structure":V=`(${v}='${w}' AND ${U} = 3)`,null!==I&&(V+=` AND ${D} = `+I.toString()),O.codefield=k,V="( "+V+" )",Z=new b(_.findField(y.fields,x),R,P);break;case"attached":V=`(${x}='${w}' AND ${U} = 3)`,null!==I&&(V+=` AND ${E} = `+I.toString()),O.codefield=L,V="( "+V+" )",Z=new b(_.findField(y.fields,v),R,P);break;default:throw new l.D$(t,"InvalidParameter",n)}return A&&(V="1 <> 1"),new _({parentfeatureset:y,adaptedFields:[new N(_.findField(y.fields,j)),new N(_.findField(y.fields,$)),Z,W,O,M],extraFilter:V?F.A.create(V,{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC}):null})})},e.signatures.push({name:"featuresetbyassociation",min:2,max:6}),e.functions.groupby=function(t,n){return e.standardFunctionAsync(t,n,async(r,i,a)=>{if((0,f.B)(a,3,3,t,n),!(0,f.m)(a[0]))throw new l.D$(t,"InvalidParameter",n);const o=await a[0].load(),u=[],d=[];let c=!1,p=[];if((0,ge.Kg)(a[1]))p.push(a[1]);else if(a[1]instanceof s.A)p.push(a[1]);else if((0,ge.cy)(a[1]))p=a[1];else{if(!(0,f.j)(a[1]))throw new l.D$(t,"InvalidParameter",n);p=a[1].toArray()}for(const e of p)if((0,ge.Kg)(e)){const t=F.A.create((0,f.s)(e),{fieldsIndex:o.getFieldsIndex(),timeZone:o.dateFieldsTimeZoneDefaultUTC}),n=!0===(0,w.DA)(t)?(0,f.s)(e):"%%%%FIELDNAME";u.push({name:n,expression:t}),"%%%%FIELDNAME"===n&&(c=!0)}else{if(!(e instanceof s.A))throw new l.D$(t,"InvalidParameter",n);{const r=e.hasField("name")?e.field("name"):"%%%%FIELDNAME",i=e.hasField("expression")?e.field("expression"):"";if("%%%%FIELDNAME"===r&&(c=!0),!r)throw new l.D$(t,"InvalidParameter",n);u.push({name:r,expression:F.A.create(i||r,{fieldsIndex:o.getFieldsIndex(),timeZone:o.dateFieldsTimeZoneDefaultUTC})})}}if(p=[],(0,ge.Kg)(a[2]))p.push(a[2]);else if((0,ge.cy)(a[2]))p=a[2];else if((0,f.j)(a[2]))p=a[2].toArray();else{if(!(a[2]instanceof s.A))throw new l.D$(t,"InvalidParameter",n);p.push(a[2])}for(const e of p){if(!(e instanceof s.A))throw new l.D$(t,"InvalidParameter",n);{const r=e.hasField("name")?e.field("name"):"",i=e.hasField("statistic")?e.field("statistic"):"",a=e.hasField("expression")?e.field("expression"):"";if(!(r&&i&&(0,ge.Kg)(i)&&a))throw new l.D$(t,"InvalidParameter",n);d.push({name:r,statistic:i,expression:F.A.create(a,{fieldsIndex:o.getFieldsIndex(),timeZone:o.dateFieldsTimeZoneDefaultUTC})})}}if(c){const e={};for(const t of o.fields)e[t.name.toLowerCase()]=1;for(const t of u)"%%%%FIELDNAME"!==t.name&&(e[t.name.toLowerCase()]=1);for(const t of d)"%%%%FIELDNAME"!==t.name&&(e[t.name.toLowerCase()]=1);let t=0;for(const n of u)if("%%%%FIELDNAME"===n.name){for(;1===e["field_"+t.toString()];)t++;e["field_"+t.toString()]=1,n.name="FIELD_"+t.toString()}}for(const n of u)we(n.expression,e,t);for(const n of d)we(n.expression,e,t);return new W({parentfeatureset:a[0],groupbyfields:u,statsfields:d})})},e.signatures.push({name:"groupby",min:3,max:3}),e.functions.distinct=function(t,n){return e.standardFunctionAsync(t,n,async(r,i,a)=>{if((0,f.m)(a[0])){(0,f.B)(a,2,2,t,n);const r=await a[0].load(),i=[];let o=[];if((0,ge.Kg)(a[1]))o.push(a[1]);else if(a[1]instanceof s.A)o.push(a[1]);else if((0,ge.cy)(a[1]))o=a[1];else{if(!(0,f.j)(a[1]))throw new l.D$(t,"InvalidParameter",n);o=a[1].toArray()}let u=!1;for(const e of o)if((0,ge.Kg)(e)){const t=F.A.create((0,f.s)(e),{fieldsIndex:r.getFieldsIndex(),timeZone:r.dateFieldsTimeZoneDefaultUTC}),n=!0===(0,w.DA)(t)?(0,f.s)(e):"%%%%FIELDNAME";i.push({name:n,expression:t}),"%%%%FIELDNAME"===n&&(u=!0)}else{if(!(e instanceof s.A))throw new l.D$(t,"InvalidParameter",n);{const a=e.hasField("name")?e.field("name"):"%%%%FIELDNAME",s=e.hasField("expression")?e.field("expression"):"";if("%%%%FIELDNAME"===a&&(u=!0),!a)throw new l.D$(t,"InvalidParameter",n);i.push({name:a,expression:F.A.create(s||a,{fieldsIndex:r.getFieldsIndex(),timeZone:r.dateFieldsTimeZoneDefaultUTC})})}}if(u){const e={};for(const t of r.fields)e[t.name.toLowerCase()]=1;for(const t of i)"%%%%FIELDNAME"!==t.name&&(e[t.name.toLowerCase()]=1);let t=0;for(const n of i)if("%%%%FIELDNAME"===n.name){for(;1===e["field_"+t.toString()];)t++;e["field_"+t.toString()]=1,n.name="FIELD_"+t.toString()}}for(const n of i)we(n.expression,e,t);return new W({parentfeatureset:a[0],groupbyfields:i,statsfields:[]})}return function(e){if(1===e.length){if((0,ge.cy)(e[0]))return(0,V.t)("distinct",e[0],-1);if((0,f.j)(e[0]))return(0,V.t)("distinct",e[0].toArray(),-1)}return(0,V.t)("distinct",e,-1)}(a)})},e.functions.getfeaturesetinfo=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{if((0,f.B)(i,1,1,t,n),!(0,f.m)(i[0]))return null;const a=await i[0].getFeatureSetInfo();return a?s.A.convertObjectToArcadeDictionary({layerId:a.layerId,layerName:a.layerName,itemId:a.itemId,serviceLayerUrl:a.serviceLayerUrl,webMapLayerId:a.webMapLayerId??null,webMapLayerTitle:a.webMapLayerTitle??null,className:null,objectClassId:null},(0,f.K)(t),!1,!1):null})},e.signatures.push({name:"getfeaturesetinfo",min:1,max:1}),e.functions.filterbysubtypecode=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{if((0,f.B)(i,2,2,t,n),(0,f.m)(i[0])){const e=await i[0].load(),r=i[1];if(!(0,ge.Fq)(r))throw new l.D$(t,"InvalidParameter",n);if(e.subtypeField){const t=F.A.create(`${e.subtypeField}= ${i[1]}`,{fieldsIndex:e.getFieldsIndex(),timeZone:e.dateFieldsTimeZoneDefaultUTC});return new C.A({parentfeatureset:i[0],whereclause:t})}if(null===e.typeIdField||""===e.typeIdField)throw new l.D$(t,"FeatureSetDoesNotHaveSubtypes",n);const a=F.A.create(`${e.typeIdField}= ${i[1]}`,{fieldsIndex:e.getFieldsIndex(),timeZone:e.dateFieldsTimeZoneDefaultUTC});return new C.A({parentfeatureset:i[0],whereclause:a})}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"filterbysubtypecode",min:2,max:2})}}},80672:(e,t,n)=>{n.d(t,{R:()=>i});var r=n(20655);function i(e,t){return null===e?t:new r.A({url:e.field("url")})}},85978:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(87449),i=n(11221),a=n(33325);class s extends i.t1{constructor(e){super(),this.declaredClass="esri.layers.featureset.sources.Empty",this._maxProcessing=1e3,this._parent=e.parentfeatureset,this._databaseType=0}async _queryAll(){return i.An.features}async query(e){return i.An}async queryStat(e){return await this._manualStat(e.stat,e.field,e.limit??a.gO,e.abortSignal)}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new r.dr("NeverReach")}async queryAttachments(){return[]}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3693],{3693:(e,t,n)=>{n.r(t),n.d(t,{registerFunctions:()=>Se});var r=n(52106),i=n(66131),a=n(47609),s=n(66395),o=n(59534),l=n(85935),u=n(93833),d=n(30445),c=n(93818),f=n(78878),p=n(80672),h=n(48938),m=n(87449),y=n(11221),g=n(33325),w=n(80609),I=n(1262),F=n(88368);class A{constructor(e){this.field=e,this.sqlRewritable=!1}postInitialization(e,t){}}class N extends A{constructor(e){super(e),this.sqlRewritable=!0}extractValue(e){return e.attributes[this.field.name]}rewriteSql(e){return{rewritten:this.sqlRewritable,where:e}}}class b extends A{constructor(e,t,n){super((0,g.ke)(e)),this.originalField=e,this.sqlRewritable=!0,this.field.name=t,this.field.alias=n}rewriteSql(e,t){return{rewritten:this.sqlRewritable,where:(0,w.bD)(e,this.field.name,this.originalField.name,t.getFieldsIndex())}}extractValue(e){return e.attributes[this.originalField.name]}}class S extends A{constructor(e,t,n){super(e),this.codefield=t,this._stringToCode=n,this._codeToString={};for(const e in n)this._codeToString[n[e]]=e;this.sqlRewritable=!0}static{this.BADNESS="_!!!_BAD_LKP_!!!!"}rewriteSql(e,t){const n=this.evaluateNodeToWhereClause(e.parseTree,0,this.field.name,this.codefield instanceof F.A?(0,w.YY)(this.codefield,0):this.codefield,e.parameters);return n.includes(S.BADNESS)?{rewritten:!1,where:e}:{rewritten:this.sqlRewritable,where:F.A.create(n,{fieldsIndex:t._parent.getFieldsIndex(),timeZone:t.dateFieldsTimeZoneDefaultUTC})}}evaluateNodeToWhereClause(e,t,n=null,r=null,i){switch(e.type){case"interval":return(0,w.oj)(this.evaluateNodeToWhereClause(e.value,t,n,r,i),e.qualifier,e.op);case"case-expression":{let r=" CASE ";"simple"===e.format&&(r+=this.evaluateNodeToWhereClause(e.operand,t,n,S.BADNESS,i));for(const a of e.clauses)r+=" WHEN "+this.evaluateNodeToWhereClause(a.operand,t,n,S.BADNESS,i)+" THEN "+this.evaluateNodeToWhereClause(a.value,t,n,S.BADNESS,i);return null!==e.else&&(r+=" ELSE "+this.evaluateNodeToWhereClause(e.else,t,n,S.BADNESS,i)),r+=" END ",r}case"parameter":{const n=i[e.value.toLowerCase()];return"string"==typeof n?"'"+n.toString().replaceAll("'","''")+"'":(0,g.$P)(n)||(0,g.Lk)(n)?(0,w.bm)(n,t):(0,g.eg)(n)?(0,w.F1)(n,t):(0,g.rX)(n)?(0,w.R8)(n,t):(0,g.f0)(n)?(0,w.Nf)(n,t):Array.isArray(n)?n.map(e=>"string"==typeof e?"'"+e.toString().replaceAll("'","''")+"'":(0,g.$P)(e)||(0,g.Lk)(e)?(0,w.bm)(e,t):(0,g.eg)(e)?(0,w.F1)(e,t):(0,g.rX)(e)?(0,w.R8)(e,t):(0,g.f0)(e)?(0,w.Nf)(e,t):e.toString()):n.toString()}case"expression-list":{const a=[];for(const s of e.value)a.push(this.evaluateNodeToWhereClause(s,t,n,r,i));return a}case"unary-expression":return" ( NOT "+this.evaluateNodeToWhereClause(e.expr,t,n,S.BADNESS,i)+" ) ";case"binary-expression":switch(e.operator){case"AND":return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" AND "+this.evaluateNodeToWhereClause(e.right,t,n,r,i)+") ";case"OR":return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" OR "+this.evaluateNodeToWhereClause(e.right,t,n,r,i)+") ";case"IS":if("null"!==e.right.type)throw new I.L("UnsupportedIsRhs");return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new I.L("UnsupportedIsRhs");return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" IS NOT NULL )";case"IN":{if("expression-list"===e.right.type){if("column-reference"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const a=[];let s=!0;for(const t of e.right.value){if("string"!==t.type){s=!1;break}if(void 0===this._stringToCode[t.value]){s=!1;break}a.push(this._stringToCode[t.value].toString())}if(s)return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" IN ("+a.join(",")+")) "}const a=this.evaluateNodeToWhereClause(e.right,t,n,r,i);return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" IN ("+a.join(",")+")) "}const a=this.evaluateNodeToWhereClause(e.right,t,n,r,i);return Array.isArray(a)?" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" IN ("+a.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" IN ("+a+")) "}case"NOT IN":{if("expression-list"===e.right.type){if("column-reference"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const a=[];let s=!0;for(const t of e.right.value){if("string"!==t.type){s=!1;break}if(void 0===this._stringToCode[t.value]){s=!1;break}a.push(this._stringToCode[t.value].toString())}if(s)return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" NOT IN ("+a.join(",")+")) "}const a=this.evaluateNodeToWhereClause(e.right,t,n,r,i);return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" NOT IN ("+a.join(",")+")) "}const a=this.evaluateNodeToWhereClause(e.right,t,n,r,i);return Array.isArray(a)?" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" NOT IN ("+a.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" NOT IN ("+a+")) "}case"BETWEEN":{const r=this.evaluateNodeToWhereClause(e.right,t,n,S.BADNESS,i);return" ("+this.evaluateNodeToWhereClause(e.left,t,n,S.BADNESS,i)+" BETWEEN "+r[0]+" AND "+r[1]+" ) "}case"NOTBETWEEN":{const r=this.evaluateNodeToWhereClause(e.right,t,n,S.BADNESS,i);return" ("+this.evaluateNodeToWhereClause(e.left,t,n,S.BADNESS,i)+" NOT BETWEEN "+r[0]+" AND "+r[1]+" ) "}case"LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,n,S.BADNESS,i)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,n,S.BADNESS,i)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,n,S.BADNESS,i)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,n,S.BADNESS,i)+") ";case"NOT LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,n,S.BADNESS,i)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,n,S.BADNESS,i)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,n,S.BADNESS,i)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,n,S.BADNESS,i)+") ";case"<>":case"=":if("column-reference"===e.left.type&&"string"===e.right.type){if(e.left.column.toUpperCase()===this.field.name.toUpperCase()&&void 0!==this._stringToCode[e.right.value.toString()])return" ("+r+" "+e.operator+" "+this._stringToCode[e.right.value.toString()].toString()+") "}else if("column-reference"===e.right.type&&"string"===e.left.type&&e.right.column.toUpperCase()===this.field.name.toUpperCase())return" ("+this._stringToCode[e.left.value.toString()].toString()+" "+e.operator+" "+r+") ";return" ("+this.evaluateNodeToWhereClause(e.left,t,n,S.BADNESS,i)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,n,S.BADNESS,i)+") ";case"<":case">":case">=":case"<=":case"*":case"-":case"+":case"/":case"||":return" ("+this.evaluateNodeToWhereClause(e.left,t,n,S.BADNESS,i)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,n,S.BADNESS,i)+") "}case"null":return"null";case"boolean":return!0===e.value?"1":"0";case"string":return"'"+e.value.toString().replaceAll("'","''")+"'";case"timestamp":return`timestamp '${e.value}'`;case"date":return`date '${e.value}'`;case"time":return`time '${e.value}'`;case"number":return e.value.toString();case"current-time":return(0,w.C6)(e.mode,t);case"current-user":return"CURRENT_USER";case"column-reference":return n&&n.toLowerCase()===e.column.toLowerCase()?"("+r+")":(0,w.Kb)(e);case"data-type":return e.value;case"function":{const r=this.evaluateNodeToWhereClause(e.args,t,n,S.BADNESS,i);return(0,w.F6)(e.name,r,t)}}throw new I.L("UnsupportedSyntax",{node:e.type})}extractValue(e){if(this.codefield instanceof F.A){const t=this.codefield.calculateValueCompiled(e);return this._codeToString[F.A.convertValueToStorageFormat(t)]}return this._codeToString[e.attributes[this.codefield]]}}class T extends A{constructor(e,t){super(e),this._sql=t}rewriteSql(e,t){return{rewritten:!0,where:(0,w.bD)(e,this.field.name,(0,w.YY)(this._sql,0),t.getFieldsIndex())}}extractValue(e){return F.A.convertValueToStorageFormat(this._sql.calculateValueCompiled(e),this.field.type)}}class _ extends y.t1{static findField(e,t){for(const n of e)if(n.name.toLowerCase()===t.toString().toLowerCase())return n;return null}constructor(e){super(),this.declaredClass="esri.arcade.featureset.actions.Adapted",this._maxProcessing=30,this._parent=e.parentfeatureset,this._adaptedFields=e.adaptedFields,this._extraFilter=e.extraFilter}_initialiseFeatureSet(){this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types,this.fields=[];for(const e of this._adaptedFields)e.postInitialization(this,this._parent),this.fields.push(e.field)}async _queryAll(){return await this._ensureLoaded(),this._extraFilter?(await this.query({abortSignal:h._})).features:this._calculateFields(await this._parent.queryAll(h._))}async query(e){let t=e.where??null;const n=this._reformulateWithoutAdaptions(t),r=n.cannot;t=n.where;let i=!1,a=e.orderBy;if(null!=a){i=!0;const e=[];for(const t of this._adaptedFields)if(!(t instanceof N)&&!0===a.scanForField(t.field.name)){if(!(t instanceof b)){a=null,i=!1;break}e.push({field:t.field.name,newfield:t.originalField.name})}a&&e.length>0&&(a=a.replaceFields(e))}null!=t?null!=this._extraFilter&&(t=(0,w.kg)(this._extraFilter,t)):t=this._extraFilter,await this._ensureLoaded();const s=await this._parent.query({...e,where:t,orderBy:a});return(0,m.dZ)(e.abortSignal),r?{...s,filterApplied:!1,ordered:!!i&&s.ordered,features:this._calculateFields(s.features)}:{...s,ordered:!!i&&s.ordered,features:this._calculateFields(s.features)}}async*_calculateFields(e){for await(const t of e)yield t.map(e=>{const t={};for(const n of this._adaptedFields)t[n.field.name]=n.extractValue(e);return{attributes:t,geometry:e.geometry}})}async queryStat(e){let t=!1,n=e.field,r=this._reformulateWithoutAdaptions(n);t=r.cannot,n=r.where;let i=e.where??null;if(r=this._reformulateWithoutAdaptions(i),t=t||r.cannot,i=r.where,null!=i?null!==this._extraFilter&&(i=(0,w.kg)(this._extraFilter,i)):i=this._extraFilter,t)return null==i&&null==e.spatialFilter?this._manualStat(e.stat,n,e.limit??g.gO,e.abortSignal):{calculated:!1};const a=await this._parent.queryStat({...e,field:n,where:i});return a.calculated?a:null==i&&null==e.spatialFilter?this._manualStat(e.stat,n,e.limit??g.gO,e.abortSignal):{calculated:!1}}async canQueryAggregate(e){for(const t of e.groupBy)for(const e of this._adaptedFields)if(t.toLowerCase()===e.field.name.toLowerCase()&&!(e instanceof N))return!1;const t=[];for(const n of e.statistics)if(null!==n.workingexpr){const e=this._reformulateWithoutAdaptions(n.workingexpr);if(e.cannot)return!1;const r=n.clone();r.workingexpr=e.where,t.push(r)}else t.push(n);let n=e.where??null;const r=this._reformulateWithoutAdaptions(n);return!r.cannot&&(n=r.where,null!==n?null!==this._extraFilter&&(n=(0,w.kg)(this._extraFilter,n)):n=this._extraFilter,this._parent.canQueryAggregate({...e,statistics:t,where:n}))}async queryAggregate(e){const t=[];for(const n of e.statistics)if(null!==n.workingexpr){const e=this._reformulateWithoutAdaptions(n.workingexpr);if(e.cannot)throw new m.dr("NeverReach");const r=n.clone();r.workingexpr=e.where,t.push(r)}else t.push(n);let n=e.where??null;const r=this._reformulateWithoutAdaptions(n);if(r.cannot)throw new m.dr("NeverReach");return n=r.where,null!==n?null!==this._extraFilter&&(n=(0,w.kg)(this._extraFilter,n)):n=this._extraFilter,this._parent.queryAggregate({...e,statistics:t,where:n})}_reformulateWithoutAdaptions(e){const t={cannot:!1,where:e};if(null!==e)for(const n of this._adaptedFields)if(!0===(0,w.Ju)(e,n.field.name)){const r=n.rewriteSql(e,this);if(!0!==r.rewritten){t.cannot=!0,t.where=null;break}t.where=r.where}return t}}var C=n(35704),v=n(4576);class x extends y.t1{constructor(e){super(),this.declaredClass="esri.arcade.featureset.actions.OrderBy",this._maxProcessing=100,this._parent=e.parentfeatureset,this._orderByClause=e.orderbyclause}async _queryAll(){return(await this.query({abortSignal:h._})).features}async query(e){await this._ensureLoaded();const t=await this._parent.query({...e,orderBy:null==e.orderBy?this._orderByClause:e.orderBy});return(0,m.dZ)(e.abortSignal),!1===t.ordered?{...t,ordered:!0,features:this._sortFeatures(t.features,e.abortSignal)}:t}async*_sortFeatures(e,t){const n=[];for await(const r of e)n.push(r),await(0,f.a3)(),(0,m.dZ)(t);const r=n.flat();this._orderByClause.order(r);for(const e of(0,v.Ho)(r,this._maxQueryRate()))yield e}async queryStat(e){const t=await this._parent.queryStat(e);return t.calculated?t:null==e.where&&null==e.spatialFilter?this._manualStat(e.stat,e.field,e.limit??g.gO,e.abortSignal):{calculated:!1}}async canQueryAggregate(e){return this._parent.canQueryAggregate(e)}async queryAggregate(e){return this._parent.queryAggregate(e)}getFieldsIndex(){return this._parent.getFieldsIndex()}}function D(e,t){return e===t?0:null===e?-1:null===t?1:e<t?-1:1}class E{constructor(e){const t=e.split(",");this._fields=[],this._directions=[];for(let e=0;e<t.length;e++){const n=t[e].match(/\S+/g);this._fields.push(n[0]),2===n.length?"asc"===n[1].toLowerCase()?this._directions.push(1):this._directions.push(0):this._directions.push(1)}}constructClause(){let e="";for(let t=0;t<this._fields.length;t++)0!==t&&(e+=","),e+=this._fields[t],1===this._directions[t]?e+=" ASC":e+=" DESC";return e}order(e){e.sort((e,t)=>{for(let n=0;n<this._fields.length;n++){const r=this.featureValue(e,this._fields[n],n),i=this.featureValue(t,this._fields[n],n);let a=0;if(a=1===this._directions[n]?D(r,i):-1*D(r,i),0!==a)return a}return 0})}scanForField(e){for(let t=0;t<this._fields.length;t++)if(this._fields[t].toLowerCase().trim()===e.toLowerCase().trim())return!0;return!1}replaceFields(e){let t="";for(let n=0;n<this._fields.length;n++){0!==n&&(t+=",");let r=this._fields[n];for(const t of e)if(r.toLowerCase()===t.field.toLowerCase()){r=t.newfield;break}t+=r,1===this._directions[n]?t+=" ASC":t+=" DESC"}return new E(t)}featureValue(e,t,n){const r=e.attributes[t];if(void 0!==r)return r;for(const r in e.attributes)if(t.toLowerCase()===r.toLowerCase())return this._fields[n]=r,e.attributes[r];return null}}class k{constructor(){this.field="",this.tofieldname="",this.typeofstat="MIN",this.workingexpr=null}clone(){const e=new k;return e.field=this.field,e.tofieldname=this.tofieldname,e.typeofstat=this.typeofstat,e.workingexpr=this.workingexpr,e}static parseStatField(e,t,n,r){const i=new k;i.field=e;const a=F.A.create(t,{fieldsIndex:n,timeZone:r}),s=function(e){if("function"===e.parseTree.type){if(0===e.parseTree.args.value.length)return{name:e.parseTree.name,expr:null};if(e.parseTree.args.value.length>1)throw new I.L("MissingStatisticParameters");const t=F.A.create((0,w.Mi)(e.parseTree.args.value[0],0,e.parameters),{fieldsIndex:e.fieldsIndex,timeZone:e.timeZone,currentUser:e.currentUser});return{name:e.parseTree.name,expr:t}}return null}(a);if(null===s)throw new I.L("UnsupportedSqlFunction",{function:""});const o=s.name.toUpperCase().trim();if("MIN"===o){if(i.typeofstat="MIN",i.workingexpr=s.expr,null===a)throw new I.L("InvalidFunctionParameters",{function:"min"})}else if("MAX"===o){if(i.typeofstat="MAX",i.workingexpr=s.expr,null===a)throw new I.L("InvalidFunctionParameters",{function:"max"})}else if("COUNT"===o)i.typeofstat="COUNT",i.workingexpr=s.expr;else if("STDEV"===o){if(i.typeofstat="STDDEV",i.workingexpr=s.expr,null===a)throw new I.L("InvalidFunctionParameters",{function:"stdev"})}else if("SUM"===o){if(i.typeofstat="SUM",i.workingexpr=s.expr,null===a)throw new I.L("InvalidFunctionParameters",{function:"sum"})}else if("MEAN"===o){if(i.typeofstat="AVG",i.workingexpr=s.expr,null===a)throw new I.L("InvalidFunctionParameters",{function:o})}else if("AVG"===o){if(i.typeofstat="AVG",i.workingexpr=s.expr,null===a)throw new I.L("InvalidFunctionParameters",{function:"avg"})}else{if("VAR"!==o)throw new I.L("UnsupportedSqlFunction",{function:o});if(i.typeofstat="VAR",i.workingexpr=s.expr,null===a)throw new I.L("InvalidFunctionParameters",{function:"var"})}return i}toStatisticsName(){switch(this.typeofstat.toUpperCase()){case"MIN":return"min";case"MAX":return"max";case"SUM":return"sum";case"COUNT":default:return"count";case"VAR":return"var";case"STDDEV":return"stddev";case"AVG":return"avg"}}}var L=n(80200),U=n(74639),$=n(44729),j=n(55612),Z=n(15032),B=n(20437);const M=new o.b(["MIN","MAX","VAR","STDDEV","COUNT","SUM","AVG"],[["VARIANCE","VAR"],["AVERAGE","AVG"],["MEAN","AVG"],["STDEV","STDDEV"]]);class W extends y.t1{constructor(e){super(),this.declaredClass="esri.arcade.featureset.actions.Aggregate",this._decodedStatsFields=[],this._decodedGroupByFields=[],this._canDoSimpleGroupBy=!0,this._physicalGroupByFields=[],this.objectIdField="ROW__ID",this._adaptedFields=[],this._uniqueIds=1,this._maxQuery=10,this._maxProcessing=10,this._parent=e.parentfeatureset,this._config=e}isTable(){return!0}_nextUniqueName(e){for(;1===e["T"+this._uniqueIds.toString()];)this._uniqueIds++;const t="T"+this._uniqueIds.toString();return e[t]=1,t}_convertToEsriFieldType(e){return e}_initialiseFeatureSet(){const e=this._parent.getFieldsIndex();this.objectIdField="ROW__ID",this.globalIdField="";let t=!1,n=1;for(;!1===t;){let e=!1;for(const t of this._config.groupbyfields)if(t.name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}if(!1===e)for(const t of this._config.statsfields)if(t.name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}!1===e?t=!0:(this.objectIdField="ROW__ID"+n.toString(),n++)}for(const t of this._config.statsfields){const n=new k;n.field=t.name,n.tofieldname=t.name,n.workingexpr=t.expression instanceof F.A?t.expression:F.A.create(t.expression,{fieldsIndex:e,timeZone:this.dateFieldsTimeZoneDefaultUTC}),n.typeofstat=M.lookup(t.statistic)??"COUNT",this._decodedStatsFields.push(n)}this._decodedGroupByFields=[];for(const t of this._config.groupbyfields){const n={name:t.name,singlefield:null,tofieldname:t.name,expression:t.expression instanceof F.A?t.expression:F.A.create(t.expression,{fieldsIndex:e,timeZone:this.dateFieldsTimeZoneDefaultUTC}),sqlType:null};this._decodedGroupByFields.push(n)}const r={};this.geometryType=this._parent.geometryType,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField="";for(const e of this._parent.fields)r[e.name.toUpperCase()]=1;this.types=null,this.subtypes=null,this.subtypeField="",this.fields=[];const i=new k;i.field=this._nextUniqueName(r),i.tofieldname=this.objectIdField,i.workingexpr=F.A.create(this._parent.objectIdField,{fieldsIndex:this._parent.getFieldsIndex(),timeZone:this.dateFieldsTimeZoneDefaultUTC}),i.typeofstat="MIN",this._decodedStatsFields.push(i);for(const e of this._decodedGroupByFields){const t=new B.A;if(e.name=this._nextUniqueName(r),t.name=e.tofieldname,t.alias=t.name,(0,w.DA)(e.expression)){const n=this._parent.getField((0,w.YY)(e.expression,0));if(!n)throw new m.dr("AggregationFieldNotFound");e.name=n.name,e.singlefield=n.name,this._physicalGroupByFields.push(n.name),t.type=n.type,e.sqlType=n.type}else{t.type=this._convertToEsriFieldType((0,w.IY)(e.expression,this._parent.fields));const n=new B.A;n.name=e.name,n.alias=n.name,this._physicalGroupByFields.push(e.name),this._adaptedFields.push(new T(n,e.expression)),this._canDoSimpleGroupBy=!1,e.sqlType=t.type}this.fields.push(t)}if(this._adaptedFields.length>0)for(const e of this._parent.fields)this._adaptedFields.push(new N(e));for(const e of this._decodedStatsFields){const t=new B.A;let n=null;e.field=this._nextUniqueName(r),t.name=e.tofieldname,t.alias=t.name;const i=null!==e.workingexpr&&(0,w.DA)(e.workingexpr)?(0,w.YY)(e.workingexpr,0):"";switch(e.typeofstat){case"SUM":if(""!==i){if(n=this._parent.getField(i),!n)throw new m.dr("AggregationFieldNotFound");t.type=n.type}else t.type="double";break;case"MIN":case"MAX":if(""!==i){if(n=this._parent.getField(i),!n)throw new m.dr("AggregationFieldNotFound");t.type=n.type}else t.type="double";break;case"COUNT":t.type="integer";break;case"STDDEV":case"VAR":case"AVG":if(""!==i&&(n=this._parent.getField(i),!n))throw new m.dr("AggregationFieldNotFound");t.type="double"}this.fields.push(t)}}async _queryAll(){return(await this.query({abortSignal:h._})).features}async query(e){if(null!=e.spatialFilter)return y.An;const t={ordered:!1,nowhereclause:!1};await this._ensureLoaded();let n=e.where;if(null!=n)for(const e of this._decodedStatsFields)if(!0===(0,w.Ju)(n,e.tofieldname)){t.nowhereclause=!0,n=null;break}let r=e.orderBy;if(null!=r){t.ordered=!0;for(const e of this._decodedStatsFields)if(!0===r.scanForField(e.tofieldname)){r=null,t.ordered=!1;break}if(null!==r)for(const e of this._decodedGroupByFields)if(null===e.singlefield&&!0===r.scanForField(e.tofieldname)){r=null,t.ordered=!1;break}}if(!1!==this._canDoSimpleGroupBy&&await this._parent.canQueryAggregate({groupBy:this._physicalGroupByFields,statistics:this._decodedStatsFields,where:null,spatialFilter:null,abortSignal:e.abortSignal})){const i=await this._parent.queryAggregate({groupBy:this._physicalGroupByFields,statistics:this._decodedStatsFields,where:n?this._reformulateWhereClauseWithoutGroupByFields(n):null,spatialFilter:null,orderBy:r?this._reformulateOrderClauseWithoutGroupByFields(r):null,abortSignal:e.abortSignal});return(0,m.dZ)(e.abortSignal),{...i,filterApplied:!t.nowhereclause&&i.filterApplied,ordered:!0===t.ordered&&i.ordered,features:this._fixAggregateAttributeNames(i.features)}}const i=this._adaptedFields.length>0?new _({parentfeatureset:this._parent,adaptedFields:this._adaptedFields,extraFilter:null}):this._parent;if(!0===t.nowhereclause){const t=new x({parentfeatureset:i,orderbyclause:new E(this._physicalGroupByFields.join(",")+","+this._parent.objectIdField+" ASC")});return{filterApplied:!1,spatialFilterApplied:!1,ordered:!1,features:this._aggregateSortedFeatureGroups((await t.query({abortSignal:e.abortSignal})).features,this._maxQuery,e.abortSignal)}}let a=i;null!=n&&(a=new C.A({parentfeatureset:a,whereclause:this._reformulateWhereClauseWithoutGroupByFields(n)}));const s=new x({parentfeatureset:a,orderbyclause:new E(this._physicalGroupByFields.join(",")+","+this._parent.objectIdField+" ASC")});return{filterApplied:!1,spatialFilterApplied:!1,ordered:!1,features:this._aggregateSortedFeatureGroups((await s.query({abortSignal:e.abortSignal})).features,this._maxQuery,e.abortSignal)}}async*_fixAggregateAttributeNames(e){for await(const t of e)yield t.map(e=>{const t={geometry:e.geometry,attributes:{}},n={};for(const t in e.attributes)n[t.toLowerCase()]=e.attributes[t];for(const e of this._decodedGroupByFields)t.attributes[e.tofieldname]=n[e.name.toLowerCase()];for(const e of this._decodedStatsFields)t.attributes[e.tofieldname]=n[e.field.toLowerCase()];return t})}async*_aggregateSortedFeatureGroups(e,t,n){let r=null,i=[];for await(const a of e){await(0,f.a3)(),(0,m.dZ)(n);for(const e of a){const t=this._generateAggregateHash(e);null==r?r={features:[e],id:t}:t!==r.id?(i.push(this._calculateAndAppendAggregateItem(r)),r={features:[e],id:t}):r.features.push(e)}i.length>=t&&(yield i,i=[])}null!=r&&(i.push(this._calculateAndAppendAggregateItem(r)),yield i)}async queryStat(e){return{calculated:!1}}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new m.dr("NeverReach")}_reformulateWhereClauseWithoutStatsFields(e){for(const t of this._decodedStatsFields)e=(0,w.bD)(e,t.tofieldname,(0,w.YY)(t.workingexpr,0),this._parent.getFieldsIndex());return e}_reformulateWhereClauseWithoutGroupByFields(e){for(const t of this._decodedGroupByFields)t.tofieldname!==t.name&&(e=(0,w.bD)(e,t.tofieldname,(0,w.YY)(t.expression,0),this._parent.getFieldsIndex()));return e}_reformulateOrderClauseWithoutGroupByFields(e){const t=[];for(const e of this._decodedGroupByFields)e.tofieldname!==e.name&&t.push({field:e.tofieldname,newfield:e.name});return t.length>0?e.replaceFields(t):e}_calculateFieldStat(e,t,n){const r=[];for(const n of e.features)if(null!==t.workingexpr){const e=t.workingexpr.calculateValue(n);null!==e&&(e instanceof $.n||e instanceof Z.k?r.push(e.toNumber()):e instanceof j.g?r.push(e.toMilliseconds()):r.push(e))}else r.push(null);n.attributes[t.tofieldname]=(0,U.s)(t.typeofstat,[r])}_calculateAndAppendAggregateItem(e){const t={attributes:{}};for(const n of this._decodedGroupByFields){const r=n.singlefield?e.features[0].attributes[n.singlefield]:F.A.convertValueToStorageFormat(n.expression.calculateValue(e.features[0]),n.sqlType);t.attributes[n.tofieldname]=r}for(const n of this._decodedStatsFields)this._calculateFieldStat(e,n,t);return t}_generateAggregateHash(e){let t="";for(const n of this._decodedGroupByFields){const r=n.singlefield?e.attributes[n.singlefield]:n.expression.calculateValue(e);t+=null==r?":":":"+r.toString()}return(0,L.d)(t,L.T.String)}async getFeatureByObjectId(){throw new m.dr("NotImplemented")}}async function*R(e,t){let n=t;for await(const t of e)if(n>=t.length?(n-=t.length,yield t):(yield t.slice(0,n),n=0),n<=0)break}class P extends y.t1{constructor(e){super(),this.declaredClass="esri.arcade.featureset.actions.Top",this._maxProcessing=100,this._parent=e.parentfeatureset,this._limit=e.topnum}async _queryAll(){return(await this.query({abortSignal:h._})).features}async query(e){await this._ensureLoaded();const t=await this._parent.queryAll(e.abortSignal);return{filterApplied:null==e.where,spatialFilterApplied:null==e.spatialFilter,ordered:!1,features:R(t,this._limit)}}async queryStat(e){return{calculated:!1}}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new m.dr("NeverReach")}getFieldsIndex(){return this._parent.getFieldsIndex()}}var q=n(85978),O=n(30235),V=n(334),G=n(74887),K=n(68654),J=n(20655),H=n(11254),z=n(51447),Q=n(53966),Y=n(66552);new Y.J({Clean:"clean",Dirty:"dirty"}),new Y.J({Physical:"physical",Virtual:"virtual"}),new Y.J({"Start and end":"start-and-end",Start:"start",Midspan:"midspan",End:"end"}),new Y.J({startingPoint:"starting-point",barrier:"barrier",stoppingPoint:"stopping-point"}),new Y.J({connected:"connected",upstream:"upstream",downstream:"downstream",shortestPath:"shortest-path",subnetwork:"subnetwork",subnetworkController:"subnetwork-controller",loops:"loops",isolation:"isolation",path:"path",circuit:"circuit"});const X="{00000000-0000-0000-0000-000000000000}",ee=new Y.J({junctionJunctionConnectivity:"junction-junction-connectivity",connectivity:"connectivity",attachment:"attachment",containment:"containment",junctionEdgeFromConnectivity:"junction-edge-from-connectivity",junctionEdgeMidspanConnectivity:"junction-edge-midspan-connectivity",junctionEdgeToConnectivity:"junction-edge-to-connectivity"});new Y.J({normal:"normal",rebuild:"rebuild",forceRebuild:"force-rebuild"});var te=n(2272),ne=n(31635),re=n(25482),ie=n(91429),ae=n(82799);let se=class extends re.o{constructor(e){super(e),this.type="networkElement",this.assetGroupCode=null,this.assetTypeCode=null,this.globalId=null,this.networkSourceId=null,this.objectId=null,this.positionFrom=null,this.positionTo=null,this.terminalId=null}};(0,ne.Cg)([(0,ie.MZ)({json:{write:!1}})],se.prototype,"type",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],se.prototype,"assetGroupCode",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],se.prototype,"assetTypeCode",void 0),(0,ne.Cg)([(0,ie.MZ)({type:String,json:{write:!0}})],se.prototype,"globalId",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],se.prototype,"networkSourceId",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],se.prototype,"objectId",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],se.prototype,"positionFrom",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],se.prototype,"positionTo",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],se.prototype,"terminalId",void 0),se=(0,ne.Cg)([(0,ie.$K)("esri.rest.networks.support.NetworkElement")],se);let oe=class extends se{constructor(e){super(e),this.type="telecomNetworkElement",this.firstUnit=null,this.numUnits=null}};(0,ne.Cg)([(0,ie.MZ)({json:{write:!1}})],oe.prototype,"type",void 0),(0,ne.Cg)([(0,ie.MZ)({json:{write:!0}})],oe.prototype,"firstUnit",void 0),(0,ne.Cg)([(0,ie.MZ)({json:{write:!0}})],oe.prototype,"numUnits",void 0),oe=(0,ne.Cg)([(0,ie.$K)("esri.rest.networks.support.TelecomNetworkElement")],oe);var le=n(36005),ue=n(43937);let de=class extends re.o{constructor(e){super(e),this.globalId=null,this.associationType=null,this.fromNetworkElement=null,this.toNetworkElement=null,this.geometry=null,this.errorMessage=null,this.percentAlong=null,this.errorCode=null,this.isContentVisible=null,this.status=null}readFromNetworkElement(e,t){return t.fromFirstUnit||t.fromNumUnits?new oe({globalId:t.fromGlobalId,networkSourceId:t.fromNetworkSourceId,terminalId:t.fromTerminalId,firstUnit:t.fromFirstUnit,numUnits:t.fromNumUnits}):new se({globalId:t.fromGlobalId,networkSourceId:t.fromNetworkSourceId,terminalId:t.fromTerminalId})}writeFromNetworkElement(e,t){if(e&&(t.fromGlobalId=e.globalId,t.fromNetworkSourceId=e.networkSourceId,t.fromTerminalId=e.terminalId,"telecomNetworkElement"===e.type)){const n=e;t.fromFirstUnit=n.firstUnit,t.fromNumUnits=n.numUnits}}readToNetworkElement(e,t){return t.toFirstUnit||t.toNumUnits?new oe({globalId:t.toGlobalId,networkSourceId:t.toNetworkSourceId,terminalId:t.toTerminalId,firstUnit:t.toFirstUnit,numUnits:t.toNumUnits}):new se({globalId:t.toGlobalId,networkSourceId:t.toNetworkSourceId,terminalId:t.toTerminalId})}writeToNetworkElement(e,t){if(e&&(t.toGlobalId=e.globalId,t.toNetworkSourceId=e.networkSourceId,t.toTerminalId=e.terminalId,"telecomNetworkElement"===e.type)){const n=e;t.toFirstUnit=n.firstUnit,t.toNumUnits=n.numUnits}}equals(e){if(this.globalId===X&&e.globalId===X){function t(e,t){return e.networkSourceId===t.networkSourceId&&e.globalId===t.globalId&&e.terminalId===t.terminalId&&e.firstUnit===t.firstUnit&&e.numUnits===t.numUnits}const n=this.fromNetworkElement,r=this.toNetworkElement,i=e.fromNetworkElement,a=e.toNetworkElement,s=t(n,i),o=t(r,a);return s&&o&&this.associationType===e.associationType}return null!=this.globalId&&null!=e.globalId&&this.globalId===e.globalId}};(0,ne.Cg)([(0,ie.MZ)({type:String,json:{write:!0}})],de.prototype,"globalId",void 0),(0,ne.Cg)([(0,ie.MZ)({type:ee.apiValues,json:{type:ee.jsonValues,read:ee.read,write:ee.write}})],de.prototype,"associationType",void 0),(0,ne.Cg)([(0,ie.MZ)({type:se,json:{write:{target:{fromGlobalId:{type:String},fromNetworkSourceId:{type:Number},fromTerminalId:{type:Number},fromFirstUnit:{type:Number},fromNumUnits:{type:Number}}},read:{source:["fromGlobalId","fromNetworkSourceId","fromTerminalId","fromFirstUnit","fromNumUnits"]}}})],de.prototype,"fromNetworkElement",void 0),(0,ne.Cg)([(0,le.w)("fromNetworkElement")],de.prototype,"readFromNetworkElement",null),(0,ne.Cg)([(0,ue.K)("fromNetworkElement")],de.prototype,"writeFromNetworkElement",null),(0,ne.Cg)([(0,ie.MZ)({type:se,json:{write:{target:{toGlobalId:{type:String},toNetworkSourceId:{type:Number},toTerminalId:{type:Number},toFirstUnit:{type:Number},toNumUnits:{type:Number}}},read:{source:["toGlobalId","toNetworkSourceId","toTerminalId","toFirstUnit","toNumUnits"]}}})],de.prototype,"toNetworkElement",void 0),(0,ne.Cg)([(0,le.w)("toNetworkElement")],de.prototype,"readToNetworkElement",null),(0,ne.Cg)([(0,ue.K)("toNetworkElement")],de.prototype,"writeToNetworkElement",null),(0,ne.Cg)([(0,ie.MZ)({type:ae.A,json:{write:!0}})],de.prototype,"geometry",void 0),(0,ne.Cg)([(0,ie.MZ)({type:String,json:{write:!0}})],de.prototype,"errorMessage",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],de.prototype,"percentAlong",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],de.prototype,"errorCode",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Boolean,json:{write:!0}})],de.prototype,"isContentVisible",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],de.prototype,"status",void 0),de=(0,ne.Cg)([(0,ie.$K)("esri.rest.networks.support.Association")],de);const ce=de;let fe=class extends re.o{constructor(e){super(e),this.associations=[]}};function pe(e){const{returnDeletes:t,elements:n,gdbVersion:r,moment:i}=e.toJSON();return{returnDeletes:t,elements:JSON.stringify(n.map(e=>({globalId:e.globalId,networkSourceId:e.networkSourceId,terminalId:e.terminalId}))),types:JSON.stringify(e.types.map(e=>ee.toJSON(e))).replaceAll('"connectivity"','"junctionJunctionConnectivity"'),gdbVersion:r,moment:i??Date.now()}}(0,ne.Cg)([(0,ie.MZ)({type:[ce],json:{write:!0}})],fe.prototype,"associations",void 0),fe=(0,ne.Cg)([(0,ie.$K)("esri.rest.networks.support.QueryAssociationsResult")],fe);var he,me=n(56507);let ye=he=class extends re.o{static from(e){return(0,me.PZ)(he,e)}constructor(e){super(e),this.returnDeletes=!1,this.elements=[],this.types=[],this.gdbVersion=null,this.moment=null}};(0,ne.Cg)([(0,ie.MZ)({type:Boolean,json:{write:!0}})],ye.prototype,"returnDeletes",void 0),(0,ne.Cg)([(0,ie.MZ)({type:[se],json:{write:!0}})],ye.prototype,"elements",void 0),(0,ne.Cg)([(0,ie.MZ)({type:[ee.apiValues],json:{type:ee.jsonValues,read:ee.read,write:ee.write}})],ye.prototype,"types",void 0),(0,ne.Cg)([(0,ie.MZ)({type:String,json:{write:!0}})],ye.prototype,"gdbVersion",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.moment=e?.getTime()}}}})],ye.prototype,"moment",void 0),ye=he=(0,ne.Cg)([(0,ie.$K)("esri.rest.networks.support.QueryAssociationsParameters")],ye);var ge=n(54218);function we(e,t,n){const r=e.getVariables();if(r.length>0){const i={};for(const e of r)i[e]=t.evaluateIdentifier(n,{name:e});e.parameters=i}return e}function Ie(e,t,n=null){for(const n in e)if(n.toLowerCase()===t.toLowerCase())return e[n];return n}function Fe(e){if(null===e)return null;const t={type:Ie(e,"type",""),name:Ie(e,"name","")};if("range"===t.type)t.range=Ie(e,"range",[]);else{t.codedValues=[];for(const n of Ie(e,"codedValues",[]))t.codedValues.push({name:Ie(n,"name",""),code:Ie(n,"code",null)})}return t}function Ae(e){if(null===e)return null;const t={},n=Ie(e,"wkt");null!==n&&(t.wkt=n);const r=Ie(e,"wkid");return null!==r&&(t.wkid=r),t}function Ne(e){if(null===e)return null;const t={hasZ:Ie(e,"hasz",!1),hasM:Ie(e,"hasm",!1)},n=Ie(e,"spatialreference");null!=n&&(t.spatialReference=Ae(n));const r=Ie(e,"x",null);if(null!==r)return t.x=r,t.y=Ie(e,"y",null),t.hasZ&&(t.z=Ie(e,"z",null)),t.hasM&&(t.m=Ie(e,"m",null)),t;const i=Ie(e,"rings",null);if(null!==i)return t.rings=i,t;const a=Ie(e,"paths",null);if(null!==a)return t.paths=a,t;const s=Ie(e,"points",null);if(null!==s)return t.points=s,t;for(const n of["xmin","xmax","ymin","ymax","zmin","zmax","mmin","mmax"]){const r=Ie(e,n,null);null!==r&&(t[n]=r)}return t}function be(e){return"utc"===e?.toLowerCase()?"UTC":"unknown"===e?.toLowerCase()?"Unknown":e}function Se(e){if("async"===e.mode){e.functions.timezone=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,a)=>{if((0,f.B)(a,1,2,t,n),(0,f.g)(a[0]))return"Unknown";if((0,f.f)(a[0]))return"Unknown";if((0,f.m)(a[0])){if(await a[0].load(),1===a.length||null===a[1])return a[0].datesInUnknownTimezone?be("unknown"):be(a[0].dateFieldsTimeZone);if(!(a[1]instanceof s.A)||!1===a[1].hasField("type"))throw new l.D$(t,"InvalidParameter",n);const e=a[1].field("type");if(!1===(0,ge.Kg)(e))throw new l.D$(t,"InvalidParameter",n);switch((0,f.s)(e).toLowerCase()){case"preferredtimezone":return be(a[0].preferredTimeZone);case"editfieldsinfo":return be(a[0].editFieldsInfo?.timeZone??null);case"timeinfo":return be(a[0].timeInfo?.timeZone??null);case"field":if(a[1].hasField("fieldname")&&(0,ge.Kg)(a[1].field("fieldname")))return be(a[0].fieldTimeZone((0,f.s)(a[1].field("fieldname"))))}throw new l.D$(t,"InvalidParameter",n)}const o=(0,f.P)(a[0],(0,f.K)(t));if(null===o)return null;const u=o.timeZone;return"system"===u?i.lY.systemTimeZoneCanonicalName:"utc"===u.toLowerCase()?"UTC":"unknown"===u.toLowerCase()?"Unknown":u})},e.functions.sqltimestamp=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{(0,f.B)(i,1,3,t,n);const a=i[0];if((0,f.e)(a)){if(1===i.length)return a.toSQLWithKeyword();if(2===i.length)return a.changeTimeZone((0,f.s)(i[1])).toSQLWithKeyword();throw new l.D$(t,"InvalidParameter",n)}if((0,f.f)(a))return a.toSQLWithKeyword();if((0,f.m)(a)){if(3!==i.length)throw new l.D$(t,"InvalidParameter",n);await a.load();const e=(0,f.s)(i[1]);if((0,f.f)(i[2]))return i[2].toSQLWithKeyword();if(!1===(0,f.e)(i[2]))throw new l.D$(t,"InvalidParameter",n);const r=a.fieldTimeZone(e);return null==r?i[2].toSQLWithKeyword():i[2].changeTimeZone(r).toSQLWithKeyword()}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"sqltimestamp",min:2,max:4}),e.functions.featuresetbyid=function(t,n){return e.standardFunctionAsync(t,n,(e,r,i)=>{if((0,f.B)(i,2,4,t,n),(0,f.l)(i[0])){const e=(0,f.s)(i[1]);let r=(0,f.J)(i[2],null);const a=(0,f.H)((0,f.J)(i[3],!0));if(null===r&&(r=["*"]),!1===(0,ge.cy)(r))throw new l.D$(t,"InvalidParameter",n);return i[0].featureSetById(e,a,r)}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"featuresetbyid",min:2,max:4});const t=new o.b(["datasource","parent","root"]);e.functions.getfeatureset=function(n,r){return e.standardFunctionAsync(n,r,async(e,i,a)=>{if((0,f.B)(a,1,2,n,r),(0,f.k)(a[0])){const e=null==a[1]?"datasource":t.lookup((0,f.s)(a[1]));return(0,d.convertToFeatureSet)(a[0].fullSchema(),e,n.lrucache,n.interceptor,n.spatialReference)}throw new l.D$(n,"InvalidParameter",r)})},e.signatures.push({name:"getfeatureset",min:1,max:2}),e.functions.featuresetbyportalitem=function(t,n){return e.standardFunctionAsync(t,n,(e,r,i)=>{if((0,f.B)(i,2,5,t,n),null===i[0])throw new l.D$(t,"PortalRequired",n);if(i[0]instanceof a.A){const e=(0,f.s)(i[1]),r=(0,f.s)(i[2]);let a=(0,f.J)(i[3],null);const s=(0,f.H)((0,f.J)(i[4],!0));if(null===a&&(a=["*"]),!1===(0,ge.cy)(a))throw new l.D$(t,"InvalidParameter",n);let o;return o=t.services?.portal?t.services.portal:J.A.getDefault(),o=(0,p.R)(i[0],o),(0,d.constructFeatureSetFromPortalItem)(e,r,t.spatialReference,a,s,o,t.lrucache,t.interceptor)}if(!1===(0,ge.Kg)(i[0]))throw new l.D$(t,"PortalRequired",n);const s=(0,f.s)(i[0]),o=(0,f.s)(i[1]);let u=(0,f.J)(i[2],null);const c=(0,f.H)((0,f.J)(i[3],!0));if(null===u&&(u=["*"]),!1===(0,ge.cy)(u))throw new l.D$(t,"InvalidParameter",n);return(0,d.constructFeatureSetFromPortalItem)(s,o,t.spatialReference,u,c,t.services?.portal??J.A.getDefault(),t.lrucache,t.interceptor)})},e.signatures.push({name:"featuresetbyportalitem",min:2,max:5}),e.functions.featuresetbyname=function(t,n){return e.standardFunctionAsync(t,n,(e,r,i)=>{if((0,f.B)(i,2,4,t,n),(0,f.l)(i[0])){const e=(0,f.s)(i[1]);let r=(0,f.J)(i[2],null);const a=(0,f.H)((0,f.J)(i[3],!0));if(null===r&&(r=["*"]),!1===(0,ge.cy)(r))throw new l.D$(t,"InvalidParameter",n);return i[0].featureSetByName(e,a,r)}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"featuresetbyname",min:2,max:4}),e.functions.featureset=function(t,n){return e.standardFunction(t,n,(e,r,i)=>{(0,f.B)(i,1,1,t,n);const a={layerDefinition:{geometryType:"",objectIdField:"",globalIdField:"",typeIdField:"",hasM:!1,hasZ:!1,fields:[]},featureSet:{geometryType:"",features:[]}};if((0,ge.Kg)(i[0])){const e=JSON.parse(i[0]);void 0!==e.layerDefinition?(a.layerDefinition=e.layerDefinition,a.featureSet=e.featureSet,e.layerDefinition.spatialReference&&(a.layerDefinition.spatialReference=e.layerDefinition.spatialReference)):(a.featureSet.features=e.features,a.featureSet.geometryType=e.geometryType,a.layerDefinition.geometryType=a.featureSet.geometryType,a.layerDefinition.objectIdField=e.objectIdFieldName??"",a.layerDefinition.typeIdField=e.typeIdFieldName,a.layerDefinition.globalIdField=e.globalIdFieldName,a.layerDefinition.fields=e.fields,e.spatialReference&&(a.layerDefinition.spatialReference=e.spatialReference))}else{if(!(i[0]instanceof s.A))throw new l.D$(t,"InvalidParameter",n);{const e=JSON.parse(i[0].castToText(!0)),r=Ie(e,"layerdefinition");if(null!==r){a.layerDefinition.geometryType=Ie(r,"geometrytype",""),a.featureSet.geometryType=a.layerDefinition.geometryType,a.layerDefinition.globalIdField=Ie(r,"globalidfield",""),a.layerDefinition.objectIdField=Ie(r,"objectidfield",""),a.layerDefinition.typeIdField=Ie(r,"typeidfield",""),a.layerDefinition.hasZ=!0===Ie(r,"hasz",!1),a.layerDefinition.hasM=!0===Ie(r,"hasm",!1);const t=Ie(r,"spatialreference");t&&(a.layerDefinition.spatialReference=Ae(t));const n=[];for(const e of Ie(r,"fields",[])){const t={name:Ie(e,"name",""),alias:Ie(e,"alias",""),type:Ie(e,"type",""),nullable:Ie(e,"nullable",!0),editable:Ie(e,"editable",!0),length:Ie(e,"length",null),domain:Fe(Ie(e,"domain"))};n.push(t)}a.layerDefinition.fields=n;const i=Ie(e,"featureset");if(i){const e={};for(const t of n)e[t.name.toLowerCase()]=t.name;for(const t of Ie(i,"features",[])){const n={},r=Ie(t,"attributes",{});for(const t in r)n[e[t.toLowerCase()]]=r[t];a.featureSet.features.push({attributes:n,geometry:Ne(Ie(t,"geometry"))})}}}else{a.layerDefinition.hasZ=!0===Ie(e,"hasz",!1),a.layerDefinition.hasM=!0===Ie(e,"hasm",!1),a.layerDefinition.geometryType=Ie(e,"geometrytype",""),a.featureSet.geometryType=a.layerDefinition.geometryType,a.layerDefinition.objectIdField=Ie(e,"objectidfieldname",""),a.layerDefinition.typeIdField=Ie(e,"typeidfieldname","");const r=Ie(e,"spatialreference");r&&(a.layerDefinition.spatialReference=Ae(r));const i=[],s=Ie(e,"fields",null);if(!(0,ge.cy)(s))throw new l.D$(t,"InvalidParameter",n);for(const e of s){const t={name:Ie(e,"name",""),alias:Ie(e,"alias",""),type:Ie(e,"type",""),nullable:Ie(e,"nullable",!0),editable:Ie(e,"editable",!0),length:Ie(e,"length",null),domain:Fe(Ie(e,"domain"))};i.push(t)}a.layerDefinition.fields=i;const o={};for(const e of i)o[e.name.toLowerCase()]=e.name;let u=Ie(e,"features",null);if((0,ge.cy)(u))for(const e of u){const t={},n=Ie(e,"attributes",{});for(const e in n)t[o[e.toLowerCase()]]=n[e];a.featureSet.features.push({attributes:t,geometry:Ne(Ie(e,"geometry",null))})}else u=null,a.featureSet.features=u}}}if(!1===function(e){return!!e.layerDefinition&&!!e.featureSet&&!1!==function(e){for(const t of["",null,"esriGeometryNull","esriGeometryPoint","esriGeometryPolyline","esriGeometryPolygon","esriGeometryMultipoint","esriGeometryEnvelope"])if(t===e)return!0;return!1}(e.layerDefinition.geometryType)&&!1!==(0,ge.cy)(e.layerDefinition.fields)&&!1!==(0,ge.cy)(e.featureSet.features)}(a))throw new l.D$(t,"InvalidParameter",n);return a.layerDefinition.geometryType||(a.layerDefinition.geometryType="esriGeometryNull"),O.A.create(a,t.spatialReference)})},e.signatures.push({name:"featureset",min:1,max:1}),e.functions.filter=function(t,n){return e.standardFunctionAsync(t,n,async(r,i,a)=>{if((0,f.B)(a,2,2,t,n),(0,ge.cy)(a[0])||(0,f.j)(a[0])){const e=[];let r,i=a[0];if(i instanceof c.A&&(i=i.toArray()),!(0,f.i)(a[1]))throw new l.D$(t,"InvalidParameter",n);r=a[1].createFunction(t);for(const t of i){const n=r(t);(0,G.$X)(n)?!0===await n&&e.push(t):!0===n&&e.push(t)}return e}if((0,f.m)(a[0])){const n=await a[0].load(),r=F.A.create(a[1],{fieldsIndex:n.getFieldsIndex(),timeZone:n.dateFieldsTimeZoneDefaultUTC}),i=r.getVariables();if(i.length>0){const n={};for(const r of i)n[r]=e.evaluateIdentifier(t,{name:r});r.parameters=n}return new C.A({parentfeatureset:a[0],whereclause:r})}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"filter",min:2,max:2}),e.functions.orderby=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{if((0,f.B)(i,2,2,t,n),(0,f.m)(i[0])){const e=new E(i[1]);return new x({parentfeatureset:i[0],orderbyclause:e})}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"orderby",min:2,max:2}),e.functions.top=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{if((0,f.B)(i,2,2,t,n),(0,f.m)(i[0]))return new P({parentfeatureset:i[0],topnum:i[1]});if((0,ge.cy)(i[0]))return(0,f.r)(i[1])>=i[0].length?i[0].slice():i[0].slice(0,(0,f.r)(i[1]));if((0,f.j)(i[0]))return(0,f.r)(i[1])>=i[0].length()?i[0].slice():i[0].slice(0,(0,f.r)(i[1]));throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"top",min:2,max:2}),e.functions.first=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{if((0,f.B)(i,1,1,t,n),(0,f.m)(i[0])){const n=await i[0].first(e.abortSignal);if(null!==n){const e=u.Xj.createFromGraphicLikeObject(n.geometry,n.attributes,i[0],t.timeZone);return e._underlyingGraphic=n,e}return n}return(0,ge.cy)(i[0])?0===i[0].length?null:i[0][0]:(0,f.j)(i[0])?0===i[0].length()?null:i[0].get(0):null})},e.signatures.push({name:"first",min:1,max:1}),e.functions.attachments=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{(0,f.B)(i,1,2,t,n);const a={minsize:-1,maxsize:-1,types:null,returnMetadata:!1};if(i.length>1)if(i[1]instanceof s.A){if(i[1].hasField("minsize")&&(a.minsize=(0,f.r)(i[1].field("minsize"))),i[1].hasField("metadata")&&(a.returnMetadata=(0,f.H)(i[1].field("metadata"))),i[1].hasField("maxsize")&&(a.maxsize=(0,f.r)(i[1].field("maxsize"))),i[1].hasField("types")){const e=(0,f.N)(i[1].field("types"),!1);e.length>0&&(a.types=e)}}else if(null!==i[1])throw new l.D$(t,"InvalidParameter",n);if((0,f.k)(i[0])){const e=i[0]._layer;let n;if((0,f.m)(e))n=e;else{if(null==e||!(0,g.eB)(e))return[];n=(0,d.constructFeatureSet)(e,t.spatialReference,["*"],!0,t.lrucache,t.interceptor)}return await n.load(),n.queryAttachments(i[0].field(n.objectIdField),a.minsize,a.maxsize,a.types,a.returnMetadata)}if(null===i[0])return[];throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"attachments",min:1,max:2}),e.functions.featuresetbyrelationshipname=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{(0,f.B)(i,2,4,t,n);const a=i[0],s=(0,f.s)(i[1]);let o=(0,f.J)(i[2],null);const u=(0,f.H)((0,f.J)(i[3],!0));if(null===o&&(o=["*"]),!1===(0,ge.cy)(o))throw new l.D$(t,"InvalidParameter",n);if(null===i[0])return null;if(!(0,f.k)(i[0]))throw new l.D$(t,"InvalidParameter",n);const c=a._layer;let p;if((0,f.m)(c))p=c;else{if(null==c||!(0,g.eB)(c))return null;p=(0,d.constructFeatureSet)(c,t.spatialReference,["*"],!0,t.lrucache,t.interceptor)}p=await p.load();const h=p.relationshipMetadata().filter(e=>e.name===s);if(0===h.length)return null;if(void 0!==h[0].relationshipTableId&&null!==h[0].relationshipTableId&&h[0].relationshipTableId>-1)return(0,d.constructFeatureSetFromRelationship)(p,h[0],a.field(p.objectIdField),p.spatialReference,o,u,t.lrucache,t.interceptor);let m=p.serviceUrl();if(!m)return null;m=m.endsWith("/")?m+h[0].relatedTableId.toString():m+"/"+h[0].relatedTableId.toString();const y=await(0,d.constructFeatureSetFromUrl)(m,p.spatialReference,o,u,t.lrucache,t.interceptor);await y.load();let w=y.relationshipMetadata();if(w=w.filter(e=>e.id===h[0].id),!1===a.hasField(h[0].keyField)||null===a.field(h[0].keyField)){const e=await p.getFeatureByObjectId(a.field(p.objectIdField),[h[0].keyField]);if(e){const t=F.A.create(w[0].keyField+"= @id",{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC});return t.parameters={id:e.attributes[h[0].keyField]},new C.A({parentfeatureset:y,whereclause:t})}return new q.A({parentfeatureset:y})}const I=F.A.create(w[0].keyField+"= @id",{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC});return I.parameters={id:a.field(h[0].keyField)},new C.A({parentfeatureset:y,whereclause:I})})},e.signatures.push({name:"featuresetbyrelationshipname",min:2,max:4}),e.functions.featuresetbyassociation=function(t,n){return e.standardFunctionAsync(t,n,async(e,i,a)=>{(0,f.B)(a,2,3,t,n);const s=a[0],u=(0,o.B)((0,f.s)((0,f.J)(a[1],""))),c=(0,ge.Kg)(a[2])?(0,f.s)(a[2]):null;if(null===a[0])return null;if(!(0,f.k)(a[0]))throw new l.D$(t,"InvalidParameter",n);const p=s._layer;let h;if((0,f.m)(p))h=p;else{if(null==p||!(0,g.eB)(p))return null;h=(0,d.constructFeatureSet)(p,t.spatialReference,["*"],!0,t.lrucache,t.interceptor)}await h.load();const m=h.serviceUrl(),y=await(0,d.constructAssociationMetaDataFeatureSetFromUrl)(m,t.spatialReference,!0);if(y.unVersion>=8)return await async function(e,t,n,i,a,s,o){const u=await e.getFeatureSetInfo();if(null===(u?.layerId??null))return null;if(!a.layerIdLookup.get(u.layerId))return null;const c=e.serviceUrl().replace(/\/FeatureServer/i,"/UtilityNetworkServer"),f=[];switch(n){case"connected":f.push("connectivity"),f.push("junction-edge-from-connectivity"),f.push("junction-edge-to-connectivity"),f.push("junction-edge-midspan-connectivity"),f.push("junction-junction-connectivity");break;case"container":case"content":f.push("containment");break;case"structure":case"attached":f.push("attachment");break;case"junctionedge":f.push("junction-edge-from-connectivity"),f.push("junction-edge-to-connectivity");break;case"midspan":f.push("junction-edge-midspan-connectivity");break;default:throw new l.D$(s,"InvalidParameter",o)}let p=null,h=!1;if(null!==i&&""!==i&&void 0!==i){for(const e of a.terminals)e.terminalName===i&&(p=e.terminalId);null===p&&(h=!0)}const m=[];if(!h){const i=new se({globalId:t.field(e.globalIdField),networkSourceId:a.layerIdLookup.get(u.layerId).sourceId,...p?{terminalId:p}:""}),s=await async function(e,t){const n=(0,te.Dl)(e),r={...pe(t),f:"json"},i=(0,te.lF)({...n.query,...r}),a=(0,te.jV)(i,{method:"post"}),s=`${n.path}/associations/query`,{data:o}=await(0,H.A)(s,a),l=fe.fromJSON(o);return t.types.includes("connectivity")&&(0,z.Lx)(Q.A.getLogger("esri/rest/networks/support/QueryAssociationsParameters"),"types",{replacement:"Please use 'junction-junction-connectivity' instead of 'connectivity'.",see:"https://arcg.is/11Tr8a#types",version:"4.29",warnOnce:!0}),l}(c,new ye({types:f,elements:[i]}));let o=0;for(const e of s.associations){let t=null,s="",l="";if(e.fromNetworkElement?.globalId===i.globalId?(t=e.toNetworkElement,l="to"):e.toNetworkElement?.globalId===i.globalId&&(t=e.fromNetworkElement,l="from"),!t)continue;switch(n){case"attached":if("attachment"!==e.associationType)continue;if("to"!==l)continue;break;case"structure":if("attachment"!==e.associationType)continue;if("from"!==l)continue;break;case"container":if("containment"!==e.associationType)continue;if("from"!==l)continue;break;case"content":if("containment"!==e.associationType)continue;if("to"!==l)continue;break;case"connected":break;case"junctionedge":"junction-edge-to-connectivity"===e.associationType?s="to":"junction-edge-from-connectivity"===e.associationType&&(s="from");break;case"midspan":if("junction-edge-midspan-connectivity"!==e.associationType)continue}const u=a.sourceIdLookup.get(t.networkSourceId)?.className??"";m.push(new r.A({geometry:null,attributes:{objectId:o++,globalId:t.globalId,percentAlong:e.percentAlong??0,isContentVisible:e.isContentVisible?0:1,className:u,side:s}}))}}const y=new K.default({source:m,geometryType:null,objectIdField:"objectId",globalIdField:"globalId",fields:[new B.A({name:"objectId",alias:"objectId",type:"oid"}),new B.A({name:"globalId",alias:"globalId",type:"global-id"}),new B.A({name:"percentAlong",alias:"percentAlong",type:"double"}),new B.A({name:"side",alias:"side",type:"string"}),new B.A({name:"isContentVisible",alias:"isContentVisible",type:"integer"}),new B.A({name:"className",alias:"className",type:"string"})]});return(0,d.constructFeatureSet)(y)}(h,s,u,c,y,t,n);const w=y.associations;if(null==w)return null;let I=null,A=null,C=!1;if(null!==c&&""!==c&&void 0!==c){for(const e of y.terminals)e.terminalName===c&&(A=e.terminalId);null===A&&(C=!0)}const v=w.getFieldsIndex(),x=v.get("TOGLOBALID").name,D=v.get("FROMGLOBALID").name,E=v.get("TOTERMINALID").name,k=v.get("FROMTERMINALID").name,L=v.get("FROMNETWORKSOURCEID").name,U=v.get("TONETWORKSOURCEID").name,$=v.get("ASSOCIATIONTYPE").name,j=v.get("ISCONTENTVISIBLE").name,Z=v.get("OBJECTID").name;for(const e of h.fields)if("global-id"===e.type){I=s.field(e.name);break}let M=null,W=new T(new B.A({name:"percentalong",alias:"percentalong",type:"double"}),F.A.create("0",{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC})),R=new T(new B.A({name:"side",alias:"side",type:"string"}),F.A.create("''",{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC}));const P="globalid",q="globalId",O={};for(const e in y.lkp)O[e]=y.lkp[e].sourceId;const V=new S(new B.A({name:"classname",alias:"classname",type:"string"}),null,O);let G="";switch(u){case"midspan":{G=`((${x}='${I}') OR ( ${D}='${I}')) AND (${$} IN (5))`,V.codefield=F.A.create(`CASE WHEN (${x}='${I}') THEN ${L} ELSE ${U} END`,{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC});const e=(0,g.ke)(_.findField(w.fields,D));e.name=P,e.alias=P,M=new T(e,F.A.create(`CASE WHEN (${D}='${I}') THEN ${x} ELSE ${D} END`,{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC})),W=y.unVersion>=4?new N(_.findField(w.fields,v.get("PERCENTALONG").name)):new T(new B.A({name:"percentalong",alias:"percentalong",type:"double"}),F.A.create("0",{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC}));break}case"junctionedge":{G=`((${x}='${I}') OR ( ${D}='${I}')) AND (${$} IN (4,6))`,V.codefield=F.A.create(`CASE WHEN (${x}='${I}') THEN ${L} ELSE ${U} END`,{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC});const e=(0,g.ke)(_.findField(w.fields,D));e.name=P,e.alias=P,M=new T(e,F.A.create(`CASE WHEN (${D}='${I}') THEN ${x} ELSE ${D} END`,{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC})),R=new T(new B.A({name:"side",alias:"side",type:"string"}),F.A.create(`CASE WHEN (${$}=4) THEN 'from' ELSE 'to' END`,{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC}));break}case"connected":{let e=`${x}='@T'`,t=`${D}='@T'`;null!==A&&(e+=` AND ${E}=@A`,t+=` AND ${k}=@A`),G="(("+e+") OR ("+t+"))",G=(0,f.$)(G,"@T",I??""),e=(0,f.$)(e,"@T",I??""),null!==A&&(e=(0,f.$)(e,"@A",A.toString()),G=(0,f.$)(G,"@A",A.toString())),V.codefield=F.A.create("CASE WHEN "+e+` THEN ${L} ELSE ${U} END`,{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC});const n=(0,g.ke)(_.findField(w.fields,D));n.name=P,n.alias=P,M=new T(n,F.A.create("CASE WHEN "+e+` THEN ${D} ELSE ${x} END`,{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC}));break}case"container":G=`${x}='${I}' AND ${$} = 2`,null!==A&&(G+=` AND ${E} = `+A.toString()),V.codefield=L,G="( "+G+" )",M=new b(_.findField(w.fields,D),P,P);break;case"content":G=`(${D}='${I}' AND ${$} = 2)`,null!==A&&(G+=` AND ${k} = `+A.toString()),V.codefield=U,G="( "+G+" )",M=new b(_.findField(w.fields,x),P,P);break;case"structure":G=`(${x}='${I}' AND ${$} = 3)`,null!==A&&(G+=` AND ${E} = `+A.toString()),V.codefield=L,G="( "+G+" )",M=new b(_.findField(w.fields,D),P,q);break;case"attached":G=`(${D}='${I}' AND ${$} = 3)`,null!==A&&(G+=` AND ${k} = `+A.toString()),V.codefield=U,G="( "+G+" )",M=new b(_.findField(w.fields,x),P,q);break;default:throw new l.D$(t,"InvalidParameter",n)}return C&&(G="1 <> 1"),new _({parentfeatureset:w,adaptedFields:[new N(_.findField(w.fields,Z)),new N(_.findField(w.fields,j)),M,R,V,W],extraFilter:G?F.A.create(G,{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC}):null})})},e.signatures.push({name:"featuresetbyassociation",min:2,max:6}),e.functions.groupby=function(t,n){return e.standardFunctionAsync(t,n,async(r,i,a)=>{if((0,f.B)(a,3,3,t,n),!(0,f.m)(a[0]))throw new l.D$(t,"InvalidParameter",n);const o=await a[0].load(),u=[],d=[];let c=!1,p=[];if((0,ge.Kg)(a[1]))p.push(a[1]);else if(a[1]instanceof s.A)p.push(a[1]);else if((0,ge.cy)(a[1]))p=a[1];else{if(!(0,f.j)(a[1]))throw new l.D$(t,"InvalidParameter",n);p=a[1].toArray()}for(const e of p)if((0,ge.Kg)(e)){const t=F.A.create((0,f.s)(e),{fieldsIndex:o.getFieldsIndex(),timeZone:o.dateFieldsTimeZoneDefaultUTC}),n=!0===(0,w.DA)(t)?(0,f.s)(e):"%%%%FIELDNAME";u.push({name:n,expression:t}),"%%%%FIELDNAME"===n&&(c=!0)}else{if(!(e instanceof s.A))throw new l.D$(t,"InvalidParameter",n);{const r=e.hasField("name")?e.field("name"):"%%%%FIELDNAME",i=e.hasField("expression")?e.field("expression"):"";if("%%%%FIELDNAME"===r&&(c=!0),!r)throw new l.D$(t,"InvalidParameter",n);u.push({name:r,expression:F.A.create(i||r,{fieldsIndex:o.getFieldsIndex(),timeZone:o.dateFieldsTimeZoneDefaultUTC})})}}if(p=[],(0,ge.Kg)(a[2]))p.push(a[2]);else if((0,ge.cy)(a[2]))p=a[2];else if((0,f.j)(a[2]))p=a[2].toArray();else{if(!(a[2]instanceof s.A))throw new l.D$(t,"InvalidParameter",n);p.push(a[2])}for(const e of p){if(!(e instanceof s.A))throw new l.D$(t,"InvalidParameter",n);{const r=e.hasField("name")?e.field("name"):"",i=e.hasField("statistic")?e.field("statistic"):"",a=e.hasField("expression")?e.field("expression"):"";if(!(r&&i&&(0,ge.Kg)(i)&&a))throw new l.D$(t,"InvalidParameter",n);d.push({name:r,statistic:i,expression:F.A.create(a,{fieldsIndex:o.getFieldsIndex(),timeZone:o.dateFieldsTimeZoneDefaultUTC})})}}if(c){const e={};for(const t of o.fields)e[t.name.toLowerCase()]=1;for(const t of u)"%%%%FIELDNAME"!==t.name&&(e[t.name.toLowerCase()]=1);for(const t of d)"%%%%FIELDNAME"!==t.name&&(e[t.name.toLowerCase()]=1);let t=0;for(const n of u)if("%%%%FIELDNAME"===n.name){for(;1===e["field_"+t.toString()];)t++;e["field_"+t.toString()]=1,n.name="FIELD_"+t.toString()}}for(const n of u)we(n.expression,e,t);for(const n of d)we(n.expression,e,t);return new W({parentfeatureset:a[0],groupbyfields:u,statsfields:d})})},e.signatures.push({name:"groupby",min:3,max:3}),e.functions.distinct=function(t,n){return e.standardFunctionAsync(t,n,async(r,i,a)=>{if((0,f.m)(a[0])){(0,f.B)(a,2,2,t,n);const r=await a[0].load(),i=[];let o=[];if((0,ge.Kg)(a[1]))o.push(a[1]);else if(a[1]instanceof s.A)o.push(a[1]);else if((0,ge.cy)(a[1]))o=a[1];else{if(!(0,f.j)(a[1]))throw new l.D$(t,"InvalidParameter",n);o=a[1].toArray()}let u=!1;for(const e of o)if((0,ge.Kg)(e)){const t=F.A.create((0,f.s)(e),{fieldsIndex:r.getFieldsIndex(),timeZone:r.dateFieldsTimeZoneDefaultUTC}),n=!0===(0,w.DA)(t)?(0,f.s)(e):"%%%%FIELDNAME";i.push({name:n,expression:t}),"%%%%FIELDNAME"===n&&(u=!0)}else{if(!(e instanceof s.A))throw new l.D$(t,"InvalidParameter",n);{const a=e.hasField("name")?e.field("name"):"%%%%FIELDNAME",s=e.hasField("expression")?e.field("expression"):"";if("%%%%FIELDNAME"===a&&(u=!0),!a)throw new l.D$(t,"InvalidParameter",n);i.push({name:a,expression:F.A.create(s||a,{fieldsIndex:r.getFieldsIndex(),timeZone:r.dateFieldsTimeZoneDefaultUTC})})}}if(u){const e={};for(const t of r.fields)e[t.name.toLowerCase()]=1;for(const t of i)"%%%%FIELDNAME"!==t.name&&(e[t.name.toLowerCase()]=1);let t=0;for(const n of i)if("%%%%FIELDNAME"===n.name){for(;1===e["field_"+t.toString()];)t++;e["field_"+t.toString()]=1,n.name="FIELD_"+t.toString()}}for(const n of i)we(n.expression,e,t);return new W({parentfeatureset:a[0],groupbyfields:i,statsfields:[]})}return function(e){if(1===e.length){if((0,ge.cy)(e[0]))return(0,V.t)("distinct",e[0],-1);if((0,f.j)(e[0]))return(0,V.t)("distinct",e[0].toArray(),-1)}return(0,V.t)("distinct",e,-1)}(a)})},e.functions.getfeaturesetinfo=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{if((0,f.B)(i,1,1,t,n),!(0,f.m)(i[0]))return null;const a=await i[0].getFeatureSetInfo();return a?s.A.convertObjectToArcadeDictionary({layerId:a.layerId,layerName:a.layerName,itemId:a.itemId,serviceLayerUrl:a.serviceLayerUrl,webMapLayerId:a.webMapLayerId??null,webMapLayerTitle:a.webMapLayerTitle??null,className:null,objectClassId:null},(0,f.K)(t),!1,!1):null})},e.signatures.push({name:"getfeaturesetinfo",min:1,max:1}),e.functions.filterbysubtypecode=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{if((0,f.B)(i,2,2,t,n),(0,f.m)(i[0])){const e=await i[0].load(),r=i[1];if(!(0,ge.Fq)(r))throw new l.D$(t,"InvalidParameter",n);if(e.subtypeField){const t=F.A.create(`${e.subtypeField}= ${i[1]}`,{fieldsIndex:e.getFieldsIndex(),timeZone:e.dateFieldsTimeZoneDefaultUTC});return new C.A({parentfeatureset:i[0],whereclause:t})}if(null===e.typeIdField||""===e.typeIdField)throw new l.D$(t,"FeatureSetDoesNotHaveSubtypes",n);const a=F.A.create(`${e.typeIdField}= ${i[1]}`,{fieldsIndex:e.getFieldsIndex(),timeZone:e.dateFieldsTimeZoneDefaultUTC});return new C.A({parentfeatureset:i[0],whereclause:a})}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"filterbysubtypecode",min:2,max:2})}}},80672:(e,t,n)=>{n.d(t,{R:()=>i});var r=n(20655);function i(e,t){return null===e?t:new r.A({url:e.field("url")})}},85978:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(87449),i=n(11221),a=n(33325);class s extends i.t1{constructor(e){super(),this.declaredClass="esri.layers.featureset.sources.Empty",this._maxProcessing=1e3,this._parent=e.parentfeatureset,this._databaseType=0}async _queryAll(){return i.An.features}async query(e){return i.An}async queryStat(e){return await this._manualStat(e.stat,e.field,e.limit??a.gO,e.abortSignal)}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new r.dr("NeverReach")}async queryAttachments(){return[]}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1867,6061],{29127:(e,t,s)=>{s.r(t),s.d(t,{execute:()=>n});var o=s(15756),r=s(
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1867,6061],{29127:(e,t,s)=>{s.r(t),s.d(t,{execute:()=>n});var o=s(15756),r=s(83299);const m=new o.g;function n(e,t){const s=(0,r.fromGeometry)(e);return m.execute(s.getGeometry(),(0,r.fromGeometryToGXGeometry)(t),s.getSpatialReference(),null)}},76061:(e,t,s)=>{s.d(t,{G:()=>o,S:()=>r});class o{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class r extends o{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5710],{4513:(e,a,t)=>{t.d(a,{S:()=>n});const n={BingMapsLayer:async()=>(await Promise.all([t.e(3508),t.e(6554),t.e(9036)]).then(t.bind(t,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([t.e(7330),t.e(3508),t.e(2869),t.e(6554),t.e(3910),t.e(6728),t.e(8303),t.e(4903),t.e(1214),t.e(9953),t.e(1956),t.e(8399),t.e(1017),t.e(957),t.e(9708),t.e(8654),t.e(6647),t.e(6673),t.e(7005),t.e(8570),t.e(6011),t.e(8993),t.e(1437)]).then(t.bind(t,82411))).default,CSVLayer:async()=>(await Promise.all([t.e(7330),t.e(3508),t.e(2869),t.e(6554),t.e(3910),t.e(6728),t.e(8303),t.e(4903),t.e(1214),t.e(9953),t.e(1956),t.e(8399),t.e(1017),t.e(957),t.e(9708),t.e(8654),t.e(6647),t.e(1197)]).then(t.bind(t,68695))).default,CatalogLayer:async()=>(await Promise.all([t.e(3508),t.e(2869),t.e(6554),t.e(3910),t.e(6728),t.e(8303),t.e(4903),t.e(1214),t.e(1956),t.e(8399),t.e(708),t.e(957),t.e(9708),t.e(6647),t.e(893),t.e(8628),t.e(2593),t.e(9279),t.e(1874)]).then(t.bind(t,83508))).default,DimensionLayer:async()=>(await Promise.all([t.e(3508),t.e(3813)]).then(t.bind(t,71493))).default,ElevationLayer:async()=>(await Promise.all([t.e(3508),t.e(9953),t.e(4802),t.e(8207)]).then(t.bind(t,68611))).default,FeatureLayer:async()=>(await Promise.all([t.e(7330),t.e(3508),t.e(2869),t.e(6554),t.e(3910),t.e(6728),t.e(8303),t.e(4903),t.e(1214),t.e(9953),t.e(1956),t.e(8399),t.e(1017),t.e(957),t.e(9708),t.e(8654),t.e(6647),t.e(9247)]).then(t.bind(t,68654))).default,GaussianSplatLayer:async()=>(await Promise.all([t.e(3508),t.e(6673),t.e(6730)]).then(t.bind(t,36475))).default,GeoJSONLayer:async()=>(await Promise.all([t.e(3508),t.e(2869),t.e(6554),t.e(3910),t.e(6728),t.e(8303),t.e(4903),t.e(1214),t.e(9953),t.e(1956),t.e(8399),t.e(1017),t.e(8766)]).then(t.bind(t,15481))).default,GeoRSSLayer:async()=>(await Promise.all([t.e(3508),t.e(6554),t.e(5890)]).then(t.bind(t,85582))).default,GroupLayer:async()=>(await Promise.all([t.e(3508),t.e(5613),t.e(3562)]).then(t.bind(t,85989))).default,ImageryLayer:async()=>(await Promise.all([t.e(3508),t.e(2869),t.e(6554),t.e(3910),t.e(6728),t.e(8303),t.e(4903),t.e(9953),t.e(1956),t.e(893),t.e(6673),t.e(6543),t.e(5142),t.e(8824)]).then(t.bind(t,87772))).default,ImageryTileLayer:async()=>(await Promise.all([t.e(3508),t.e(2869),t.e(6554),t.e(3910),t.e(6728),t.e(8303),t.e(4903),t.e(9953),t.e(6673),t.e(6543),t.e(8144),t.e(5142),t.e(2168),t.e(9478)]).then(t.bind(t,9478))).default,IntegratedMesh3DTilesLayer:async()=>(await Promise.all([t.e(3508),t.e(6673),t.e(5942),t.e(1312)]).then(t.bind(t,61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([t.e(3508),t.e(6673),t.e(6011),t.e(5942),t.e(7464)]).then(t.bind(t,74660))).default,KMLLayer:async()=>(await Promise.all([t.e(3508),t.e(2869),t.e(6554),t.e(3910),t.e(6728),t.e(8303),t.e(4903),t.e(1214),t.e(1863)]).then(t.bind(t,162))).default,KnowledgeGraphLayer:async()=>(await Promise.all([t.e(3508),t.e(2869),t.e(6554),t.e(3910),t.e(6728),t.e(8303),t.e(4903),t.e(1214),t.e(9953),t.e(1956),t.e(8399),t.e(708),t.e(1017),t.e(9708),t.e(8368),t.e(4649),t.e(217),t.e(8441),t.e(3463),t.e(8948),t.e(8692)]).then(t.bind(t,28692))).default,LineOfSightLayer:async()=>(await Promise.all([t.e(3508),t.e(6673),t.e(1224),t.e(9695)]).then(t.bind(t,49695))).default,LinkChartLayer:async()=>(await Promise.all([t.e(3508),t.e(2869),t.e(6554),t.e(3910),t.e(6728),t.e(8303),t.e(4903),t.e(1214),t.e(9953),t.e(1956),t.e(8399),t.e(708),t.e(1017),t.e(9708),t.e(8368),t.e(4649),t.e(217),t.e(8441),t.e(3463),t.e(8948),t.e(1728)]).then(t.bind(t,71728))).default,MapImageLayer:async()=>(await Promise.all([t.e(3508),t.e(2869),t.e(6554),t.e(3910),t.e(6728),t.e(8303),t.e(4903),t.e(1214),t.e(1956),t.e(8399),t.e(708),t.e(957),t.e(893),t.e(7048),t.e(7656),t.e(8999)]).then(t.bind(t,7656))).default,MapNotesLayer:async()=>(await Promise.all([t.e(7330),t.e(3508),t.e(2869),t.e(6554),t.e(3910),t.e(6728),t.e(8303),t.e(4903),t.e(1214),t.e(9953),t.e(1956),t.e(8399),t.e(1017),t.e(957),t.e(9708),t.e(8654),t.e(6647),t.e(3463),t.e(744)]).then(t.bind(t,96299))).default,MediaLayer:async()=>(await Promise.all([t.e(7330),t.e(3508),t.e(3444),t.e(9203)]).then(t.bind(t,29203))).default,OGCFeatureLayer:async()=>(await Promise.all([t.e(3508),t.e(2869),t.e(6554),t.e(3910),t.e(6728),t.e(8303),t.e(4903),t.e(1214),t.e(1956),t.e(8399),t.e(708),t.e(1017),t.e(8570),t.e(5977)]).then(t.bind(t,65977))).default,OpenStreetMapLayer:async()=>(await Promise.all([t.e(3508),t.e(6554),t.e(9573),t.e(2712)]).then(t.bind(t,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([t.e(7330),t.e(3508),t.e(2869),t.e(6554),t.e(3910),t.e(6728),t.e(8303),t.e(4903),t.e(1214),t.e(9953),t.e(1956),t.e(8399),t.e(1017),t.e(957),t.e(9708),t.e(8654),t.e(6647),t.e(9361),t.e(9644)]).then(t.bind(t,9352))).default,ParquetLayer:async()=>(await Promise.all([t.e(3508),t.e(2869),t.e(3910),t.e(6728),t.e(8303),t.e(4903),t.e(1214),t.e(9953),t.e(1956),t.e(8399),t.e(1017),t.e(5695)]).then(t.bind(t,99680))).default,PointCloudLayer:async()=>(await Promise.all([t.e(3508),t.e(2869),t.e(6673),t.e(7885)]).then(t.bind(t,77885))).default,RouteLayer:async()=>(await Promise.all([t.e(3508),t.e(2869),t.e(3910),t.e(6728),t.e(8303),t.e(4903),t.e(1214),t.e(217),t.e(9785)]).then(t.bind(t,34507))).default,SceneLayer:async()=>(await Promise.all([t.e(3508),t.e(2869),t.e(3910),t.e(6728),t.e(8303),t.e(4903),t.e(1214),t.e(1956),t.e(8399),t.e(6673),t.e(7005),t.e(8570),t.e(6011),t.e(8993),t.e(1713)]).then(t.bind(t,36969))).default,StreamLayer:async()=>(await Promise.all([t.e(3508),t.e(2869),t.e(6554),t.e(3910),t.e(6728),t.e(8303),t.e(4903),t.e(1214),t.e(1956),t.e(8399),t.e(1017),t.e(73)]).then(t.bind(t,79457))).default,SubtypeGroupLayer:async()=>(await Promise.all([t.e(7330),t.e(3508),t.e(2869),t.e(6554),t.e(3910),t.e(6728),t.e(8303),t.e(4903),t.e(1956),t.e(8399),t.e(957),t.e(9708),t.e(6647),t.e(9645)]).then(t.bind(t,97483))).default,TileLayer:async()=>(await Promise.all([t.e(3508),t.e(2869),t.e(6554),t.e(3910),t.e(6728),t.e(8303),t.e(4903),t.e(1214),t.e(1956),t.e(8399),t.e(708),t.e(957),t.e(893),t.e(4802),t.e(7048),t.e(573)]).then(t.bind(t,71756))).default,UnknownLayer:async()=>(await t.e(146).then(t.bind(t,146))).default,UnsupportedLayer:async()=>(await t.e(5165).then(t.bind(t,45165))).default,VectorTileLayer:async()=>(await Promise.all([t.e(3508),t.e(6554),t.e(4802),t.e(5897),t.e(1776)]).then(t.bind(t,48757))).default,VideoLayer:async()=>(await Promise.all([t.e(3508),t.e(3910),t.e(6728),t.e(8303),t.e(957),t.e(3444),t.e(2274)]).then(t.bind(t,86875))).default,ViewshedLayer:async()=>(await Promise.all([t.e(3508),t.e(1224),t.e(6650)]).then(t.bind(t,96650))).default,VoxelLayer:async()=>(await Promise.all([t.e(3508),t.e(2869),t.e(1005)]).then(t.bind(t,21005))).default,WCSLayer:async()=>(await Promise.all([t.e(3508),t.e(2869),t.e(6554),t.e(3910),t.e(6728),t.e(8303),t.e(4903),t.e(9953),t.e(6543),t.e(8144),t.e(5142),t.e(2168),t.e(5694)]).then(t.bind(t,20521))).default,WFSLayer:async()=>(await Promise.all([t.e(3508),t.e(2869),t.e(6554),t.e(3910),t.e(6728),t.e(8303),t.e(4903),t.e(1214),t.e(9953),t.e(1956),t.e(8399),t.e(708),t.e(1017),t.e(9110)]).then(t.bind(t,21901))).default,WMSLayer:async()=>(await Promise.all([t.e(7330),t.e(3508),t.e(2869),t.e(6554),t.e(3910),t.e(6728),t.e(5181)]).then(t.bind(t,51904))).default,WMTSLayer:async()=>(await Promise.all([t.e(3508),t.e(6554),t.e(4802),t.e(9573),t.e(309)]).then(t.bind(t,20309))).default,WebTileLayer:async()=>(await Promise.all([t.e(3508),t.e(6554),t.e(9573),t.e(2848)]).then(t.bind(t,47314))).default}},7861:(e,a,t)=>{t.d(a,{L:()=>r});var n=t(11254);async function r(e,a){return(await(0,n.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}})).data}},23154:(e,a,t)=>{t.d(a,{K:()=>f,Q:()=>l});var n=t(77548),r=t(7861);const i=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function l(e,a){const{loadContext:t,...i}=a||{},l=t?await t.fetchServiceMetadata(e,i):await(0,r.L)(e,i),s=(0,n.G$)();d(l),y(l);const o={serviceJSON:l,preferredHost:s};if((l.currentVersion??0)<10.5)return o;const c=`${(0,n.$x)()??e}/layers`,u=t?await t.fetchServiceMetadata(c,i):await(0,r.L)(c,i);return d(u),y(u),o.layersJSON={layers:u.layers,tables:u.tables},o}function s(e){const{type:a}=e;return!!a&&i.has(a)}function o(e){return"Table"===e.type}function y(e){e.layers=e.layers?.filter(s),e.tables=e.tables?.filter(o)}function c(e){e.type||="Feature Layer"}function u(e){e.type||="Table"}function d(e){e.layers?.forEach(c),e.tables?.forEach(u)}function f(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}},92009:(e,a,t)=>{t.d(a,{L:()=>c});var n=t(70333),r=t(11254),i=t(49186),l=t(74887),s=t(60694),o=t(20655),y=t(80812);async function c(e,a){const t=(0,s.qg)(e);if(!t)throw new i.A("invalid-url","Invalid scene service url");const c={...a,sceneServerUrl:t.url.path,layerId:t.sublayer??void 0};if(c.sceneLayerItem??=await async function(e){const a=(await u(e)).serviceItemId;if(!a)return null;const t=new y.default({id:a,apiKey:e.apiKey}),i=await async function(e){const a=n.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const t=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,r.A)(t,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,l.QP)(e)}return null}(e);null!=i&&(t.portal=new o.A({url:i}));try{return await t.load({signal:e.signal})}catch(e){return(0,l.QP)(e),null}}(c),null==c.sceneLayerItem)return d(c.sceneServerUrl.replace("/SceneServer","/FeatureServer"),c);const f=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const t=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find(e=>"Feature Service"===e.type)||null;if(!t)return null;const n=new y.default({portal:t.portal,id:t.id});return await n.load(),n}catch(e){return(0,l.QP)(e),null}}(c);if(!f?.url)throw new i.A("related-service-not-found","Could not find feature service through portal item relationship");c.featureServiceItem=f;const w=await d(f.url,c);return w.portalItem=f,w}async function u(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const t=await(0,r.A)(e.sceneServerUrl,a);e.rootDocument=t.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const t=(0,s.qg)(e);if(!t)throw new i.A("invalid-feature-service-url","Invalid feature service url");const n=t.url.path,l=a.layerId;if(null==l)return{serverUrl:n};const o=u(a),y=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,c=(y?.layers?.[0]||y?.tables?.[0])?.customParameters,d=e=>{const t={query:{f:"json",...c},responseType:"json",authMode:e,signal:a.signal};return(0,r.A)(n,t)},f=d("anonymous").catch(()=>d("no-prompt")),[w,h]=await Promise.all([f,o]),m=h?.layers,L=w.data&&w.data.layers;if(!Array.isArray(L))throw new Error("expected layers array");if(Array.isArray(m)){for(let e=0;e<Math.min(m.length,L.length);e++)if(m[e].id===l)return{serverUrl:n,layerId:L[e].id}}else if(null!=l&&l<L.length)return{serverUrl:n,layerId:L[l].id};throw new Error("could not find matching associated sublayer")}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[189,3169,4161,4170,6061,7373,8125],{4197:(e,t,n)=>{n.d(t,{Vj:()=>c,cj:()=>u,jh:()=>o,l5:()=>a,xm:()=>i});var r=n(34275),s=n(9093);function o(e){return e<=r.y9?new Array(e).fill(0):new Float64Array(e)}function i(e){return((0,r.iu)(e)?e.byteLength/8:e.length)<=r.y9?Array.from(e):new Float64Array(e)}function a(e,t,n){return Array.isArray(e)?e.slice(t,t+n):e.subarray(t,t+n)}function u(e){return[...e]}function c(e){const t=(0,s.vt)();for(let n=0;n<16;++n)t[n]=e[n];return t}},9093:(e,t,n)=>{function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function s(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}n.d(t,{o8:()=>s,vt:()=>r,zK:()=>o});const o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:s,create:r,fromValues:function(e,t,n,r,s,o,i,a,u,c,h,l,f,m,y,g){return[e,t,n,r,s,o,i,a,u,c,h,l,f,m,y,g]}},Symbol.toStringTag,{value:"Module"}))},43628:(e,t,n)=>{n.d(t,{execute:()=>r.e});var r=n(65416);n(78125)},65416:(e,t,n)=>{n.d(t,{e:()=>i,r:()=>u});var r=n(15756),s=n(78125);const o=new class{supportsCurves(){return!0}getOperatorType(){return 1}execute(e,t,n,s,o){return(0,r.an)(e,t,n,s,o)}isValidDE9IM(e){return 0===(0,r.ao)(e)}accelerateGeometry(e,t,n){return(0,r.ap)(e,t,n)}canAccelerateGeometry(e){return(0,r.aq)(e)}};function i(e,t,n){return o.execute((0,s.fromGeometry)(e),(0,s.fromGeometry)(t),(0,s.fromSpatialReference)(e.spatialReference),n,null)}const a=o.supportsCurves(),u=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:function(e){const t=(0,s.getSpatialReference)(e);return o.accelerateGeometry((0,s.fromGeometry)(e),(0,s.fromSpatialReference)(t),1)},execute:i,isValidDE9IM:function(e){return o.isValidDE9IM(e)},supportsCurves:a},Symbol.toStringTag,{value:"Module"}))},69397:(e,t,n)=>{n.d(t,{$B:()=>s,Qf:()=>c,Qh:()=>a,RS:()=>o,Ul:()=>y,ez:()=>f,lM:()=>i,qK:()=>l});var r=n(34275);function s(e){return 32+e.length}const o=16;function i(e){if(!e)return 0;let t=l;for(const n in e)e.hasOwnProperty(n)&&(t+=u(e[n],!1));return t}function a(e){if(!e)return 0;if("number"==typeof e[0])return c(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return h(e,8);let n=f;for(let r=0;r<t;r++)n+=u(e[r]);return n}(e);let t=l;for(const n in e)e.hasOwnProperty(n)&&(t+=u(e[n]));return t}function u(e,t=!0){switch(typeof e){case"object":return t?a(e):l;case"string":return s(e);case"number":return o;case"boolean":return 4;default:return 8}}function c(...e){return e.reduce((e,t)=>e+(t?(0,r.iu)(t)?t.byteLength+m:Array.isArray(t)?h(t,o):0:0),0)}function h(e,t){return f+e.length*t}const l=32,f=16,m=145,y=64},70328:(e,t,n)=>{n.d(t,{BI:()=>d,DC:()=>l,Ej:()=>m,Ie:()=>M,Jt:()=>x,Ne:()=>y,RF:()=>h,aI:()=>C,fA:()=>i,gE:()=>u,hZ:()=>p,iT:()=>f,is:()=>G,qv:()=>V,vI:()=>g,vY:()=>a,v_:()=>v,vt:()=>o,w1:()=>c});var r=n(5443),s=(n(19419),n(4197));function o(e=v){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function i(e,t,n,r,s,i,a=o()){return a[0]=e,a[1]=t,a[2]=n,a[3]=r,a[4]=s,a[5]=i,a}function a(e,t=o()){return function(e,t,n,r=o()){return p(r,V),function(e,t,n=0,r=t.length/3){let s=e[0],o=e[1],i=e[2],a=e[3],u=e[4],c=e[5];for(let e=0;e<r;e++)s=Math.min(s,t[n+3*e]),o=Math.min(o,t[n+3*e+1]),i=Math.min(i,t[n+3*e+2]),a=Math.max(a,t[n+3*e]),u=Math.max(u,t[n+3*e+1]),c=Math.max(c,t[n+3*e+2]);e[0]=s,e[1]=o,e[2]=i,e[3]=a,e[4]=u,e[5]=c}(r,e,t,n),r}(e,0,e.length/3,t)}function u(e,t=(0,s.jh)(24)){const[n,r,o,i,a,u]=e;return t[0]=n,t[1]=r,t[2]=o,t[3]=n,t[4]=r,t[5]=u,t[6]=n,t[7]=a,t[8]=o,t[9]=n,t[10]=a,t[11]=u,t[12]=i,t[13]=r,t[14]=o,t[15]=i,t[16]=r,t[17]=u,t[18]=i,t[19]=a,t[20]=o,t[21]=i,t[22]=a,t[23]=u,t}function c(e,t){const n=isFinite(e[2])||isFinite(e[5]);return new r.A(n?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function h(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function f(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function m(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function y(e,t,n=e){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n!==e&&(n[3]=e[3],n[4]=e[4],n[5]=e[5]),n}function g(e,t,n=e){return n[3]=t[0],n[4]=t[1],n[5]=t[2],n!==e&&(n[0]=e[0],n[1]=e[1],n[2]=e[2]),e}function p(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function M(e){return e?p(e,V):o(V)}function x(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function d(e,t,n,r,s){return e[0]=t,e[1]=n,e[2]=Number.NEGATIVE_INFINITY,e[3]=r,e[4]=s,e[5]=Number.POSITIVE_INFINITY,e}function G(e){return 6===e.length}function C(e,t,n){if(null==e||null==t)return e===t;if(!G(e)||!G(t))return!1;if(n){for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1}else for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}const V=[1/0,1/0,1/0,-1/0,-1/0,-1/0],v=[0,0,0,0,0,0];o()},76061:(e,t,n)=>{n.d(t,{G:()=>r,S:()=>s});class r{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class s extends r{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},78125:(e,t,n)=>{n.r(t),n.d(t,{fromExtent:()=>x,fromGeometry:()=>M,fromMultipoint:()=>d,fromPoint:()=>G,fromPolygon:()=>C,fromPolyline:()=>V,fromPolylineUsingImportOperator:()=>v,fromSpatialReference:()=>I,getSpatialReference:()=>p,toExtent:()=>w,toGeometry:()=>P,toMultipoint:()=>A,toPoint:()=>R,toPolygon:()=>E,toPolyline:()=>Z});var r=n(83661),s=(n(79187),n(55537)),o=n(95213),i=n(88885),a=n(5443),u=n(48526),c=n(86738),h=n(39829),l=n(82799),f=(n(90293),n(83299));const m="_gxVersion",y=2,g=1;function p(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function M(e){switch(e.type){case"point":return G(e);case"multipoint":return d(e);case"polyline":return V(e);case"polygon":return C(e);case"extent":return x(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function x(e){if(!e.getCacheValue(m)){const t=new o.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(y,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(g,0,e.zmin,e.zmax),e.setCacheValue(m,t)}return e.getCacheValue(m)}function d(e){if(!e.getCacheValue(m)){const t=new i.M,n=new o.P,r=e.points,s=e.hasM,a=e.hasZ,u=a?3:2;for(let e=0,o=r.length;e<o;e++){const o=r[e];n.setXYCoords(o[0],o[1]),a&&n.setZ(o[2]??0),s&&n.setM(o[u]??NaN),t.add(n)}e.setCacheValue(m,t)}return e.getCacheValue(m)}function G(e){if(!e.getCacheValue(m)){const t=new o.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(m,t)}return e.getCacheValue(m)}function C(e){if(!e.getCacheValue(m)){const{curveRings:t,hasM:n,hasZ:r,rings:s}=e,o=(0,f.fromGeometryToGXGeometry)({curveRings:t,hasM:n,hasZ:r,rings:s});e.setCacheValue(m,o)}return e.getCacheValue(m)}function V(e){if(!e.getCacheValue(m)){const{curvePaths:t,hasM:n,hasZ:r,paths:s}=e,o=(0,f.fromGeometryToGXGeometry)({curvePaths:t,hasM:n,hasZ:r,paths:s});e.setCacheValue(m,o)}return e.getCacheValue(m)}function v(e){if(!e.getCacheValue(m)){const{curvePaths:t,hasM:n,hasZ:r,paths:s}=e,o=(0,f.fromGeometryToGXGeometryUsingImportOperator)({curvePaths:t,hasM:n,hasZ:r,paths:s});e.setCacheValue(m,o)}return e.getCacheValue(m)}function I(e){return(0,f.fromSpatialReference)(e)}function P(e,t){if(e)switch(e.getGeometryType()){case s.G.enumPoint:return R(e,t);case s.G.enumEnvelope:return w(e,t);case s.G.enumMultiPoint:return A(e,t);case s.G.enumPolyline:return Z(e,t);case s.G.enumPolygon:return E(e,t)}return null}function w(e,t){if(e.isEmpty())return null;const n=new a.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),r=e.getDescription();if(r.hasM()){const t=e.queryInterval(y,0);n.mmin=t.vmin,n.mmax=t.vmax}if(r.hasZ()){const t=e.queryInterval(g,0);n.zmin=t.vmin,n.zmax=t.vmax}return n.setCacheValue(m,e),n}function A(e,t){if(e.isEmpty())return null;const n=e.getDescription(),r=n.hasM(),s=n.hasZ(),i=[],a=new o.P;for(let t=0,n=e.getPointCount();t<n;t++){e.getPointByVal(t,a);const n=[a.getX(),a.getY()];s&&n.push(a.getZ()),r&&n.push(a.getM()),i.push(n)}const c=new u.A({hasM:r,hasZ:s,points:i,spatialReference:t});return c.setCacheValue(m,e),c}function R(e,t){if(e instanceof r.P)return new c.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const n=new c.A({x:e.getX(),y:e.getY(),spatialReference:t}),s=e.getDescription();return s.hasM()&&(n.m=e.getM()),s.hasZ()&&(n.z=e.getZ()),n.setCacheValue(m,e),n}function E(e,t){if(e.isEmpty())return null;const n=h.A.fromJSON({...(0,f.toGeometry)(e,null),spatialReference:t});return n.setCacheValue(m,e),n}function Z(e,t){if(e.isEmpty())return null;const n=l.A.fromJSON({...(0,f.toGeometry)(e,null),spatialReference:t});return n.setCacheValue(m,e),n}},92722:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(69397);class s{constructor(e=[],t=[],n=!1,r=!1){this.lengths=e??[],this.coords=t??[],this.hasZ=n,this.hasM=r}static fromJSON({lengths:e,coords:t,hasZ:n,hasM:r}){return new s(e,t,n||!1,r||!1)}static fromRect([e,t,n,r]){const o=n-e,i=r-t;return new s([5],[e,t,o,0,0,i,-o,0,0,-i])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((e,t)=>e+t,0)}get usedMemory(){return 64+(0,r.Qf)(this.lengths,this.coords)}get stride(){return 2+(this.hasZ?1:0)+(this.hasM?1:0)}area(){if(this.isPoint)return 0;let e=0,t=0;for(const n of this.lengths){if(n<3)continue;const{stride:r}=this;let s=this.coords[r*t],o=this.coords[r*t+1];for(let i=1;i<n;i+=1){const n=r*(t+i),a=this.coords[n],u=this.coords[n+1];e+=-.5*(a-s)*(u+o),s=a,o=u}t+=n}return e}forEachVertex(e){let t=0;if(this.isPoint)return e(this.coords[0],this.coords[1]);const{stride:n}=this;for(const r of this.lengths){for(let s=0;s<r;s++){const r=n*(t+s);e(this.coords[r],this.coords[r+1])}t+=r}}deltaDecode(){const e=this.clone(),{coords:t,lengths:n}=e;let r=0;const{stride:s}=this;for(const e of n){for(let n=1;n<e;n++){const e=s*(r+n);t[e]+=t[e-s],t[e+1]+=t[e+1-s]}r+=e}return e}clone(e){if(this.isPoint)return new s([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);const t=Array.from(this.lengths),{stride:n,size:r}=this,o=this.coords.slice(0,r*n);return e?(e.set(o),new s(t,e)):new s(t,Array.from(o),this.hasZ,this.hasM)}justXY(){const{stride:e,size:t}=this;if(2===e)return this;const n=new Array(t*e);for(let t=0,r=0;t<n.length;t+=e)n[r++]=this.coords[t],n[r++]=this.coords[t+1];return new s(this.lengths,n,!1,!1)}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7229],{2272:(e,t,i)=>{i.d(t,{Dl:()=>l,gf:()=>h,jV:()=>u,lF:()=>d});var s=i(92602),n=i(70333),r=i(4718),o=i(84952),a=i(926);function u(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function l(e){return"string"==typeof e?(0,o.An)(e):(0,r.o8)(e)}function d(e,t,i){const s={};for(const n in e){if("declaredClass"===n)continue;const r=e[n];if(null!=r&&"function"!=typeof r)if(Array.isArray(r))s[n]=r.map(e=>d(e));else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(i?.[n]);s[n]=t?e:JSON.stringify(e)}else s[n]=t?r:JSON.stringify(r);else s[n]=r}return s}async function h(e,t,r){const o=function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.CG)(e)??n.id?.findCredential(e)?.token:null}(e,t);if(o)return o;!n.id&&s.A.request.useIdentity&&await Promise.all([i.e(7330),i.e(168),i.e(148)]).then(i.bind(i,50148));const u=await n.id.getCredential(e,r);return u?.token}},6518:(e,t,i)=>{i.d(t,{F:()=>a});var s=i(44208),n=i(75503),r=i(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.wq(9,(0,s.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach((i,s)=>{e[t++]=s}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,i){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,i)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},29432:(e,t,i)=>{i.r(t),i.d(t,{default:()=>S});var s=i(49186),n=i(60408),r=i(21325),o=i(90708),a=i(33032),u=i(83221),l=i(31464),d=i(56390),h=i(64714),c=i(82832),f=i(95466),m=i(98453),p=i(30524),y=i(98623);const _=r.KK,g={xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:r.KK},b={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsQueryAttachmentOrderByFields:!1,supportsQueryAttachmentWithTypeWildcard:!1,supportsQueryBins:!0,supportsQueryPivot:!1,supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsQueryWithDistance:!0,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQueryWithResultType:!0,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0,supportsQueryWithCacheHint:!0},queryBinsCapabilities:c.PC};function x(e){return(0,n.fT)(e)?null!=e.z:!!e.hasZ}function I(e){return(0,n.fT)(e)?null!=e.m:!!e.hasM}class S{constructor(){this._queryEngine=null,this._nextObjectId=null}destroy(){this._queryEngine?.destroy(),this._queryEngine=this._createDefaultAttributes=null}async load(e){const t=[],{features:i}=e,n=this._inferLayerProperties(i,e.fields),r=e.fields||[],o=null!=e.hasM?e.hasM:!!n.hasM,c=null!=e.hasZ?e.hasZ:!!n.hasZ,x=!e.spatialReference&&!n.spatialReference,I=x?_:e.spatialReference||n.spatialReference,S=x?g:null,v=e.geometryType||n.geometryType,B=!v;let M=e.objectIdField||n.objectIdField,F=e.timeInfo;const z=new f.A(r);if(!B&&(x&&t.push({name:"feature-layer:spatial-reference-not-found",message:"Spatial reference not provided or found in features. Defaults to WGS84"}),!v))throw new s.A("feature-layer:missing-property","geometryType not set and couldn't be inferred from the provided features");if(!M)throw new s.A("feature-layer:missing-property","objectIdField not set and couldn't be found in the provided fields");if(n.objectIdField&&M!==n.objectIdField&&(t.push({name:"feature-layer:duplicated-oid-field",message:`Provided objectIdField "${M}" doesn't match the field name "${n.objectIdField}", found in the provided fields`}),M=n.objectIdField),M&&!n.objectIdField){const e=z.get(M);e?(M=e.name,e.type="esriFieldTypeOID",e.editable=!1,e.nullable=!1):r.unshift({alias:M,name:M,type:"esriFieldTypeOID",editable:!1,nullable:!1})}for(const e of r){if(null==e.name&&(e.name=e.alias),null==e.alias&&(e.alias=e.name),!e.name)throw new s.A("feature-layer:invalid-field-name","field name is missing",{field:e});if(e.name===M&&(e.type="esriFieldTypeOID"),!m.m.jsonValues.includes(e.type))throw new s.A("feature-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e});null==e.length&&(e.length=(0,p._b)(e))}const T={};for(const e of r)if("esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type){const t=(0,p.lD)(e);void 0!==t&&(T[e.name]=t)}if(F){if(F.startTimeField){const e=z.get(F.startTimeField);e?(F.startTimeField=e.name,e.type="esriFieldTypeDate"):F.startTimeField=null}if(F.endTimeField){const e=z.get(F.endTimeField);e?(F.endTimeField=e.name,e.type="esriFieldTypeDate"):F.endTimeField=null}if(F.trackIdField){const e=z.get(F.trackIdField);e?F.trackIdField=e.name:(F.trackIdField=null,t.push({name:"feature-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:F}}))}F.startTimeField||F.endTimeField||(t.push({name:"feature-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing or invalid",details:{timeInfo:F}}),F=null)}const A=z.dateFields.length?{timeZoneIANA:e.dateFieldsTimeZone??y.n$}:null;this._createDefaultAttributes=(0,h.Vx)(T,M);const w={warnings:t,featureErrors:[],layerDefinition:{...b,drawingInfo:(0,h.F0)(v),templates:(0,h.e2)(T),extent:S,geometryType:v,objectIdField:M,fields:r,hasZ:c,hasM:o,timeInfo:F,dateFieldsTimeReference:A},assignedObjectIds:{}},E={type:"object-id",fieldName:M};if(this._queryEngine=new d.do({fieldsIndex:f.A.fromLayerJSON({fields:r,timeInfo:F,dateFieldsTimeReference:A}),geometryType:v,hasM:o,hasZ:c,featureIdInfo:E,spatialReference:I,featureStore:new u.A({geometryType:v,hasM:o,hasZ:c}),timeInfo:F}),!i?.length)return this._nextObjectId=a.L,w;const R=(0,a.H)(M,i);return this._nextObjectId=R+1,await(0,l.Nk)(i,I),this._loadInitialFeatures(w,i)}async applyEdits(e){const{spatialReference:t,geometryType:i}=this._queryEngine;return await Promise.all([(0,c.$1)(t,i),(0,l.Nk)(e.adds,t),(0,l.Nk)(e.updates,t)]),this._applyEdits(e)}queryFeatures(e,t={}){return this._queryEngine.executeQuery(e,t.signal)}queryFeatureCount(e,t={}){return this._queryEngine.executeQueryForCount(e,t.signal)}queryObjectIds(e,t={}){return this._queryEngine.executeQueryForIds(e,t.signal)}queryExtent(e,t={}){return this._queryEngine.executeQueryForExtent(e,t.signal)}querySnapping(e,t={}){return this._queryEngine.executeQueryForSnapping(e,t.signal)}queryAttributeBins(e,t={}){return this._queryEngine.executeAttributeBinsQuery(e,t.signal)}_inferLayerProperties(e,t){let i,s,r=null,o=null,a=null;for(const t of e){const e=t.geometry;if(null!=e&&(r||(r=(0,n.$B)(e)),o||(o=e.spatialReference),null==i&&(i=x(e)),null==s&&(s=I(e)),r&&o&&null!=i&&null!=s))break}if(t&&t.length){let e=null;t.some(t=>{const i="esriFieldTypeOID"===t.type,s=!t.type&&t.name&&"objectid"===t.name.toLowerCase();return e=t,i||s})&&(a=e.name)}return{geometryType:r,spatialReference:o,objectIdField:a,hasM:s,hasZ:i}}async _loadInitialFeatures(e,t){const{geometryType:i,hasM:s,hasZ:r,objectIdField:a,spatialReference:u,featureStore:d,fieldsIndex:h}=this._queryEngine,f=[],m={type:"object-id",fieldName:a};for(const s of t){if(null!=s.uid&&(e.assignedObjectIds[s.uid]=-1),s.geometry&&i!==(0,n.$B)(s.geometry)){e.featureErrors.push((0,c.Yx)("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),r=(0,c.MB)(h,t,s.attributes,!0);r?e.featureErrors.push(r):(this._assignObjectId(t,s.attributes,!0),s.attributes=t,null!=s.uid&&(e.assignedObjectIds[s.uid]=s.attributes[a]),null!=s.geometry&&(s.geometry=(0,l.Cv)(s.geometry,s.geometry.spatialReference,u)),f.push(s))}d.addMany((0,o.Di)([],f,i,r,s,m));const{fullExtent:p,timeExtent:y}=await this._queryEngine.fetchRecomputedExtents();if(e.layerDefinition.extent=p,y){const{start:t,end:i}=y;e.layerDefinition.timeInfo.timeExtent=[t,i]}return e}async _applyEdits(e){const{adds:t,updates:i,deletes:s}=e,n={addResults:[],deleteResults:[],updateResults:[],uidToObjectId:{}};if(t?.length&&this._applyAddEdits(n,t),i?.length&&this._applyUpdateEdits(n,i),s?.length){for(const e of s)n.deleteResults.push((0,c.bP)(e));this._queryEngine.featureStore.removeManyById(s)}const{fullExtent:r,timeExtent:o}=await this._queryEngine.fetchRecomputedExtents();return{extent:r,timeExtent:o,featureEditResults:n}}_applyAddEdits(e,t){const{addResults:i}=e,{geometryType:s,hasM:r,hasZ:a,objectIdField:u,spatialReference:d,featureStore:h,featureIdInfo:f,fieldsIndex:m}=this._queryEngine,p=[];for(const r of t){if(r.geometry&&s!==(0,n.$B)(r.geometry)){i.push((0,c.Yx)("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),o=(0,c.MB)(m,t,r.attributes);if(o)i.push(o);else{if(this._assignObjectId(t,r.attributes),r.attributes=t,null!=r.uid){const t=r.attributes[u];e.uidToObjectId[r.uid]=t}if(null!=r.geometry){const e=r.geometry.spatialReference??d;r.geometry=(0,l.Cv)((0,c.CR)(r.geometry,e),e,d)}p.push(r),i.push((0,c.bP)(r.attributes[u]))}}h.addMany((0,o.Di)([],p,s,a,r,f))}_applyUpdateEdits({updateResults:e},t){const{geometryType:i,hasM:s,hasZ:r,objectIdField:a,spatialReference:u,featureStore:d,fieldsIndex:h,featureIdInfo:f}=this._queryEngine;for(const m of t){const{attributes:t,geometry:p}=m,y=t?.[a];if(null==y){e.push((0,c.Yx)(`Identifier field ${a} missing`));continue}if(!d.has(y)){e.push((0,c.Yx)(`Feature with object id ${y} missing`));continue}const _=(0,o.oN)(d.getFeature(y),i,r,s);if(null!=p){if(i!==(0,n.$B)(p)){e.push((0,c.Yx)("Incorrect geometry type."));continue}const t=p.spatialReference??u;_.geometry=(0,l.Cv)((0,c.CR)(p,t),t,u)}if(t){const i=(0,c.MB)(h,_.attributes,t);if(i){e.push(i);continue}}d.add((0,o.E2)(_,i,r,s,f)),e.push((0,c.bP)(y))}}_assignObjectId(e,t,i=!1){const s=this._queryEngine.objectIdField;i&&t&&isFinite(t[s])?e[s]=t[s]:e[s]=this._nextObjectId++}}},33032:(e,t,i)=>{i.d(t,{H:()=>n,L:()=>s});const s=1;function n(e,t){let i=0;for(const s of t){const t=s.attributes?.[e];"number"==typeof t&&isFinite(t)&&(i=Math.max(i,t))}return i}},36708:(e,t,i)=>{i.d(t,{C_:()=>c,OH:()=>p,Vh:()=>y,on:()=>h,pc:()=>_,wB:()=>u,z7:()=>l});var s=i(37955),n=i(36563),r=i(97768),o=i(74887),a=i(14012);function u(e,t,i={}){return d(e,t,i,f)}function l(e,t,i={}){return d(e,t,i,m)}function d(e,t,i={},s){let n=null;const o=i.once?(e,i)=>{s(e)&&((0,r.xt)(n),t(e,i))}:(e,i)=>{s(e)&&t(e,i)};if(n=(0,a.Cn)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return n}function h(e,t,i,o={}){let a=null,l=null,d=null;function h(){a&&l&&(l.remove(),o.onListenerRemove?.(a),a=null,l=null)}function c(e){o.once&&o.once&&(0,r.xt)(d),i(e)}const f=u(e,(e,i)=>{h(),(0,s.wb)(e)&&(a=e,l=(0,s.on)(e,t,c),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return d=(0,n.hA)(()=>{f.remove(),h()}),d}function c(e,t){return function(e,t,i){if((0,o.G4)(i))return Promise.reject((0,o.NK)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function u(){a=(0,r.xt)(a)}return new Promise((s,r)=>{a=(0,n.vE)([(0,o.u7)(i,()=>{u(),r((0,o.NK)())}),d(e,e=>{u(),s(e)},{sync:!1,once:!0},t??f)])})}(e,m,t)}function f(e){return!0}function m(e){return!!e}i(80559);const p={sync:!0},y={initial:!0},_={sync:!0,initial:!0}},37730:(e,t,i)=>{i.d(t,{T:()=>n});var s=i(43334);const n={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t,i)=>new s.Om(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)}},60408:(e,t,i)=>{function s(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function n(e){return void 0!==e.points}function r(e){return void 0!==e.x&&void 0!==e.y}function o(e){return void 0!==e.paths||void 0!==e.curvePaths}function a(e){return void 0!==e.rings||void 0!==e.curveRings}function u(e){return"object"==typeof e&&"vertexAttributes"in e}function l(e){return e?r(e)?"esriGeometryPoint":o(e)?"esriGeometryPolyline":a(e)?"esriGeometryPolygon":s(e)?"esriGeometryEnvelope":n(e)?"esriGeometryMultipoint":null:null}function d(e){return null!=e&&("hasZ"in e&&e.hasZ||"z"in e&&null!=e.z)}function h(e){return null!=e&&("hasM"in e&&e.hasM||"m"in e&&null!=e.m)}i.d(t,{$B:()=>l,Bi:()=>a,Pv:()=>d,Rg:()=>o,U9:()=>n,W0:()=>h,ZC:()=>s,fT:()=>r,uW:()=>u})},64714:(e,t,i)=>{i.d(t,{F0:()=>a,Vx:()=>d,e2:()=>c,f:()=>f});var s=i(44208),n=i(4718),r=i(99352),o=i(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let l=1;function d(e,t){if((0,s.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let i=`this${h(t)} = null;`;for(const t in e)i+=`this${h(t)} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${l++} {\n constructor() {\n ${i};\n }\n }\n `)();return()=>new s}catch(i){return()=>({[t]:null,...e})}}function h(e){return u.test(e)?`.${e}`:`[${JSON.stringify(e)}]`}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(e)}}]}function f(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:r.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:t,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},65864:(e,t,i)=>{i.d(t,{rS:()=>d,xD:()=>c});var s=i(5443),n=i(91075),r=i(48526),o=i(86738),a=i(39829),u=i(82799),l=i(60408);function d(e){return null==e?null:e instanceof n.A?e:(0,l.fT)(e)?o.A.fromJSON(e):(0,l.Rg)(e)?u.A.fromJSON(e):(0,l.Bi)(e)?a.A.fromJSON(e):(0,l.U9)(e)?r.A.fromJSON(e):(0,l.ZC)(e)?s.A.fromJSON(e):null}const h={esriGeometryPoint:o.A,esriGeometryPolyline:u.A,esriGeometryPolygon:a.A,esriGeometryEnvelope:s.A,esriGeometryMultipoint:r.A,esriGeometryMultiPatch:a.A};function c(e){return e&&h[e]||null}},66344:(e,t,i)=>{i.d(t,{q:()=>a});const s=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class n{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear(),this._db.clear()}register(e){this._users.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._users.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const i=this._db.get(e.id+t);return i?.size??0}put(e,t,i,n,o){t=e.id+t;const a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==i&&this._notifyRemove(t,a.entry,a.size,0)),n>this._maxSize)return void this._notifyRemove(t,i,n,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return s||console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,i,0,0);const u=1+Math.max(o,-4)- -3;this._db.set(t,new r(i,n,u)),this._size+=n,e.size+=n,this._checkSize()}updateSize(e,t){t=e.id+t;const i=this._db.get(t);if(!i)return;this._size-=i.size,e.size-=i.size;let s=i.entry.usedMemory;for(;s>this._maxSize;){const e=this._notifyRemove(t,i.entry,s,1);if(!(null!=e&&e>0))return void this._db.delete(t);s=e}i.size=s,this._size+=s,e.size+=s,this._checkSize()}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach((e,s)=>{const n=e.lifetime;i[n]=(i[n]||0)+e.size,this._users.forEach(i=>{const{id:n,name:r}=i;if(s.startsWith(n)){const i=t[r]||0;t[r]=i+e.size}})});const s={};this._users.forEach(e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[i]||0;t[i]=n,s[i]=Math.round(100*e.hitRate)+"%"}else s[i]="0%"});const n=Object.keys(t);n.sort((e,i)=>t[i]-t[e]),n.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+s[i]);for(let t=i.length-1;t>=0;--t){const s=i[t];s&&(e["Priority "+(t+-3-1)]=Math.round(s/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._users.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,i]of this._db)t.startsWith(e.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,s){const n=this._users.get(e.split(o)[0])?.removeFunc,r=n?.(t,s,i);return"number"==typeof r?r:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._checkSizeLimits(this.maxSize)}setMaxSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const i=t??this;if(i.size<=e)return;const s=t?.id;let n=!0;for(;n;){n=!1;for(const[r,a]of this._db)if(0===a.lifetime&&(!s||r.startsWith(s))){const s=t??this._users.get(r.split(o)[0]);if(this._purgeItem(r,a,s),i.size<=.9*e)return;n||=this._db.has(r)}}for(const[n,r]of this._db)if(!s||n.startsWith(s)){const s=t??this._users.get(n.split(o)[0]);if(this._purgeItem(n,r,s),i.size<=.9*e)return}}_purgeItem(e,t,i){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const s=this._notifyRemove(e,t.entry,t.size,1);null!=s&&s>0&&(this._size+=s,i&&(i.size+=s),t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new n(0);class r{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const o=":";class a{constructor(e,t){this.removeFunc=t,this._storage=new n,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy(),this._storage=null}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},67482:(e,t,i)=>{function s(e){return null!=a(e)||null!=o(e)}function n(e){return u.test(e)}function r(e){return a(e)??o(e)}function o(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let i=!0;if(d&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,s=0;for(;!t&&s<=e.length;)t=!l.test(e[s]),s++;i=!t}}return i}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function a(e){const t=u.exec(e);if(!t?.groups)return null;const i=t.groups,s=+i.year,n=+i.month-1,r=+i.day,o=+(i.hours??"0"),a=+(i.minutes??"0"),l=+(i.seconds??"0");if(o>23)return null;if(a>59)return null;if(l>59)return null;const d=i.ms??"0",h=d?+d.padEnd(3,"0").slice(0,3):0;let c;if(i.isUTC||!i.offsetSign)c=Date.UTC(s,n,r,o,a,l,h);else{const e=+i.offsetHours,t=+i.offsetMinutes;c=6e4*("+"===i.offsetSign?-1:1)*(60*e+t)+Date.UTC(s,n,r,o,a,l,h)}return Number.isNaN(c)?null:c}i.d(t,{Br:()=>n,Cq:()=>s,_U:()=>r});const u=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,l=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,d=!Number.isNaN(new Date("technology 10").getTime())},69540:(e,t,i)=>{i.d(t,{OU:()=>d,Pw:()=>h});var s=i(31635),n=i(69622),r=(i(44208),i(4718)),o=(i(53966),i(97768)),a=i(88620),u=i(64108);const l=Symbol("ClonableMixin"),d=e=>{var t;const i=e;let n=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=l}clone(e){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const i=t.metadata,s=t.store,n={},u=new Map;for(const t in i){const o=i[t],a=s?.originOf(t),l=o.clonable;if(o.readOnly||!1===l||7!==a&&0!==a&&5!==a&&4!==a)continue;const d=this[t];let h=null;if("function"==typeof l)h=l(d,e);else if("reference"===l)h=d;else if(h=(0,r.TU)(d,e),null!=d&&null==h)continue;0===a?u.set(t,h):n[t]=h}const l=new(0,Object.getPrototypeOf(this).constructor)(n);if(u.size){const e=(0,a.oY)(l)?.store;if(e)for(const[t,i]of u)e.set(t,i,0)}return l}};return n=(0,s.Cg)([(0,u.$)("esri.core.Clonable")],n),n},h=d(n.A)},75503:(e,t,i)=>{i.d(t,{EC:()=>M,wq:()=>a});var s=i(4576),n=i(21818),r=(i(44208),i(15142)),o=i(11006);class a{constructor(e=9,t){this._compareMinX=c,this._compareMinY=f,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),I.prune(),S.prune(),v.prune(),B.prune()}all(e){u(this._data,e)}search(e,t){let i=this._data;const s=this._toBBox;if(b(e,i))for(I.clear();i;){for(let n=0,r=i.children.length;n<r;n++){const r=i.children[n],o=i.leaf?s(r):r;b(e,o)&&(i.leaf?t(r):g(e,o)?u(r,t):I.push(r))}i=I.pop()}}collides(e){let t=this._data;const i=this._toBBox;if(!b(e,t))return!1;for(I.clear();t;){for(let s=0,n=t.children.length;s<n;s++){const n=t.children[s],r=t.leaf?i(n):n;if(b(e,r)){if(t.leaf||g(e,r))return!0;I.push(n)}}t=I.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new z([]),this}remove(e){if(!e)return this;let t,i=this._data,r=null,o=0,a=!1;const u=this._toBBox(e);for(v.clear(),B.clear();i||v.length>0;){if(i||(i=v.pop(),r=v.data[v.length-1],o=B.pop()??0,a=!0),i.leaf&&(t=(0,s.qh)(i.children,(0,n.zI)(e),i.children.length,i.indexHint),-1!==t))return i.children.splice(t,1),v.push(i),this._condense(v),this;a||i.leaf||!g(i,u)?r?(o++,i=r.children[o],a=!1):i=null:(v.push(i),B.push(o),o=0,r=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,i,s){const n=i-t+1;let r=this._maxEntries;if(n<=r){const s=new z(e.slice(t,i+1));return l(s,this._toBBox),s}s||(s=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(s-1)));const o=new T([]);o.height=s;const a=Math.ceil(n/r),u=a*Math.ceil(Math.sqrt(r));x(e,t,i,u,this._compareMinX);for(let n=t;n<=i;n+=u){const t=Math.min(n+u-1,i);x(e,n,t,a,this._compareMinY);for(let i=n;i<=t;i+=a){const n=Math.min(i+a-1,t);o.children.push(this._build(e,i,n,s-1))}}return l(o,this._toBBox),o}_insert(e,t,i){const s=this._toBBox,n=i?e:s(e);v.clear();const r=function(e,t,i,s){for(;s.push(t),!0!==t.leaf&&s.length-1!==i;){let i,s=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=m(o),u=y(e,o)-a;u<n?(n=u,s=a<s?a:s,i=o):u===n&&a<s&&(s=a,i=o)}t=i||t.children[0]}return t}(n,this._data,t,v);for(r.children.push(e),h(r,n);t>=0&&v.data[t].children.length>this._maxEntries;)this._split(v,t),t--;!function(e,t,i){for(let s=i;s>=0;s--)h(t.data[s],e)}(n,v,t)}_split(e,t){const i=e.data[t],s=i.children.length,n=this._minEntries;this._chooseSplitAxis(i,n,s);const r=this._chooseSplitIndex(i,n,s);if(!r)return;const o=i.children.splice(r,i.children.length-r),a=i.leaf?new z(o):new T(o);a.height=i.height,l(i,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this._data=new T([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,i){let s,n,r;s=n=1/0;for(let o=t;o<=i-t;o++){const t=d(e,0,o,this._toBBox),a=d(e,o,i,this._toBBox),u=_(t,a),l=m(t)+m(a);u<s?(s=u,r=o,n=l<n?l:n):u===s&&l<n&&(n=l,r=o)}return r}_chooseSplitAxis(e,t,i){const s=e.leaf?this._compareMinX:c,n=e.leaf?this._compareMinY:f;this._allDistMargin(e,t,i,s)<this._allDistMargin(e,t,i,n)&&e.children.sort(s)}_allDistMargin(e,t,i,s){e.children.sort(s);const n=this._toBBox,r=d(e,0,t,n),o=d(e,i-t,i,n);let a=p(r)+p(o);for(let s=t;s<i-t;s++){const t=e.children[s];h(r,e.leaf?n(t):t),a+=p(r)}for(let s=i-t-1;s>=t;s--){const t=e.children[s];h(o,e.leaf?n(t):t),a+=p(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const i=e.data[t];if(0===i.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,s.qh)(r,i,r.length,n.indexHint),1)}else this.clear();else l(i,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function u(e,t){let i=e;for(S.clear();i;){if(!0===i.leaf)for(const e of i.children)t((0,n.zI)(e));else S.pushArray(i.children);i=S.pop()??null}}function l(e,t){d(e,0,e.children.length,t,e)}function d(e,t,i,s,n){n||(n=new z([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<i;o++)r=e.children[o],h(n,e.leaf?s(r):r);return n}function h(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function c(e,t){return e.minX-t.minX}function f(e,t){return e.minY-t.minY}function m(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function p(e){return e.maxX-e.minX+(e.maxY-e.minY)}function y(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function _(e,t){const i=Math.max(e.minX,t.minX),s=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-i)*Math.max(0,r-s)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function b(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function x(e,t,i,s,n){const r=[t,i];for(;r.length;){const t=r.pop(),i=r.pop();if(t-i<=s)continue;const a=i+Math.ceil((t-i)/s/2)*s;(0,o.q)(e,a,i,t,n),r.push(i,a,a,t)}}const I=new r.A,S=new r.A,v=new r.A,B=new r.A({deallocator:void 0});class M{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class F extends M{constructor(){super(...arguments),this.height=1,this.indexHint=new s.vW}}class z extends F{constructor(e){super(),this.children=e,this.leaf=!0}}class T extends F{constructor(e){super(),this.children=e,this.leaf=!1}}},82832:(e,t,i)=>{i.d(t,{$1:()=>y,CR:()=>p,MB:()=>c,PC:()=>_,Yx:()=>u,bP:()=>d});var s=i(67482),n=i(21325),r=i(30524);class o{constructor(e){this.description=e,this.code=null}}class a{constructor(e){this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error=new o(e)}}function u(e){return new a(e)}class l{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function d(e){return new l(e)}const h=new Set;function c(e,t,i,s=!1){h.clear();for(const n in i){const o=e.get(n);if(!o)continue;const a=f(o,i[n]);if(h.add(o.name),o&&(s||o.editable)){const e=(0,r.CJ)(o,a);if(e)return u((0,r.uo)(e,o,a));t[o.name]=a}}for(const t of e.requiredFields??[])if(!h.has(t.name))return u(`missing required field "${t.name}"`);return null}function f(e,t){let i=t;return(0,r.WA)(e)&&"string"==typeof t?i=parseFloat(t):(0,r.yM)(e)&&null!=t&&"string"!=typeof t?i=String(t):(0,r.vE)(e)&&"string"==typeof t&&(i=(0,s._U)(t)),(0,r.WX)(i)}let m;function p(e,t){if(!e||!(0,n.fn)(t))return e;if("rings"in e||"paths"in e){if(null==m)throw new TypeError("geometry engine not loaded");return m.simplify(t,e)}return e}async function y(e,t){!(0,n.fn)(e)||"esriGeometryPolygon"!==t&&"esriGeometryPolyline"!==t||await async function(){return null==m&&(m=await i.e(1023).then(i.bind(i,81023))),m}()}const _={supportsAutoIntervalBin:!0,supportsFixedIntervalBin:!0,supportsFixedBoundariesBin:!0,supportsDateBin:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsNormalization:!0,supportedStatisticTypes:["COUNT","SUM","AVG","VAR","STDDEV","MIN","MAX","PERCENTILE_CONT","PERCENTILE_DISC","CentroidAggregate","EnvelopeAggregate","ConvexHullAggregate"],supportedNormalizationTypes:["field","log","naturalLog","percentOfTotal","squareRoot"]}},83221:(e,t,i)=>{i.d(t,{A:()=>m});var s=i(4576),n=i(49186),r=i(65529),o=i(53966),a=i(70328),u=i(19419),l=i(90708),d=i(6518),h=i(51441),c=i(37730);const f=(0,a.vt)();class m{constructor(e){this.geometryInfo=e,this._boundsStore=new d.F,this._featuresById=new Map,this._usedMemory=0,this.events=new r.bk,this.featureAdapter=c.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach(t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,i,s,n]=this.fullBounds;return{xmin:t,ymin:i,xmax:s,ymax:n,spatialReference:(0,h.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map(e=>this._upsert(e));return this._emitChanged(),t.filter(s.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const i of e){const e=this._boundsStore.get(i.objectId);e&&t((0,a.Jt)(f,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const i=this._featuresById.get(t);let s;if(i?(e.displayId=i.displayId,s=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);s=(0,l.jQ)(null!=s?s:(0,u.vt)(),e.geometry),null!=s&&this._boundsStore.set(t,s),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const i=this._featuresById.get(t);if(!i)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0;const{geometry:s,attributes:r}=e;for(const e in r)i.attributes[e]=r[e];return s&&(i.geometry=s,this._boundsStore.set(t,(0,l.jQ)((0,u.vt)(),s)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(i)??0,i}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}},93470:(e,t,i)=>{i.d(t,{Cb:()=>r,HW:()=>d,JR:()=>n,JZ:()=>u,WR:()=>a,b6:()=>h,fT:()=>s,nC:()=>l,yM:()=>o});const s=[252,146,31,255],n=[153,153,153,255],r={type:"esriSMS",style:"esriSMSCircle",size:6,color:s,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:s},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},u={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},d={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},h={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}},98453:(e,t,i)=>{i.d(t,{m:()=>s});const s=new(i(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[189,1598,6061,8668],{4197:(t,n,e)=>{e.d(n,{Vj:()=>c,cj:()=>h,jh:()=>s,l5:()=>u,xm:()=>o});var r=e(34275),i=e(9093);function s(t){return t<=r.y9?new Array(t).fill(0):new Float64Array(t)}function o(t){return((0,r.iu)(t)?t.byteLength/8:t.length)<=r.y9?Array.from(t):new Float64Array(t)}function u(t,n,e){return Array.isArray(t)?t.slice(n,n+e):t.subarray(n,n+e)}function h(t){return[...t]}function c(t){const n=(0,i.vt)();for(let e=0;e<16;++e)n[e]=t[e];return n}},7978:(t,n,e)=>{e.r(n),e.d(n,{execute:()=>o});var r=e(15756),i=e(83299);const s=new r.j;function o(t,n){const e=(0,i.fromGeometry)(t);return s.execute(e.getGeometry(),(0,i.fromGeometryToGXGeometry)(n),e.getSpatialReference())}},9093:(t,n,e)=>{function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function i(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}e.d(n,{o8:()=>i,vt:()=>r,zK:()=>s});const s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:i,create:r,fromValues:function(t,n,e,r,i,s,o,u,h,c,a,f,l,m,d,g){return[t,n,e,r,i,s,o,u,h,c,a,f,l,m,d,g]}},Symbol.toStringTag,{value:"Module"}))},69397:(t,n,e)=>{e.d(n,{$B:()=>i,Qf:()=>c,Qh:()=>u,RS:()=>s,Ul:()=>d,ez:()=>l,lM:()=>o,qK:()=>f});var r=e(34275);function i(t){return 32+t.length}const s=16;function o(t){if(!t)return 0;let n=f;for(const e in t)t.hasOwnProperty(e)&&(n+=h(t[e],!1));return n}function u(t){if(!t)return 0;if("number"==typeof t[0])return c(t);if(Array.isArray(t))return function(t){const n=t.length;if(0===n||"number"==typeof t[0])return a(t,8);let e=l;for(let r=0;r<n;r++)e+=h(t[r]);return e}(t);let n=f;for(const e in t)t.hasOwnProperty(e)&&(n+=h(t[e]));return n}function h(t,n=!0){switch(typeof t){case"object":return n?u(t):f;case"string":return i(t);case"number":return s;case"boolean":return 4;default:return 8}}function c(...t){return t.reduce((t,n)=>t+(n?(0,r.iu)(n)?n.byteLength+m:Array.isArray(n)?a(n,s):0:0),0)}function a(t,n){return l+t.length*n}const f=32,l=16,m=145,d=64},70328:(t,n,e)=>{e.d(n,{BI:()=>I,DC:()=>f,Ej:()=>m,Ie:()=>M,Jt:()=>x,Ne:()=>d,RF:()=>a,aI:()=>b,fA:()=>o,gE:()=>h,hZ:()=>y,iT:()=>l,is:()=>A,qv:()=>w,vI:()=>g,vY:()=>u,v_:()=>G,vt:()=>s,w1:()=>c});var r=e(5443),i=(e(19419),e(4197));function s(t=G){return[t[0],t[1],t[2],t[3],t[4],t[5]]}function o(t,n,e,r,i,o,u=s()){return u[0]=t,u[1]=n,u[2]=e,u[3]=r,u[4]=i,u[5]=o,u}function u(t,n=s()){return function(t,n,e,r=s()){return y(r,w),function(t,n,e=0,r=n.length/3){let i=t[0],s=t[1],o=t[2],u=t[3],h=t[4],c=t[5];for(let t=0;t<r;t++)i=Math.min(i,n[e+3*t]),s=Math.min(s,n[e+3*t+1]),o=Math.min(o,n[e+3*t+2]),u=Math.max(u,n[e+3*t]),h=Math.max(h,n[e+3*t+1]),c=Math.max(c,n[e+3*t+2]);t[0]=i,t[1]=s,t[2]=o,t[3]=u,t[4]=h,t[5]=c}(r,t,n,e),r}(t,0,t.length/3,n)}function h(t,n=(0,i.jh)(24)){const[e,r,s,o,u,h]=t;return n[0]=e,n[1]=r,n[2]=s,n[3]=e,n[4]=r,n[5]=h,n[6]=e,n[7]=u,n[8]=s,n[9]=e,n[10]=u,n[11]=h,n[12]=o,n[13]=r,n[14]=s,n[15]=o,n[16]=r,n[17]=h,n[18]=o,n[19]=u,n[20]=s,n[21]=o,n[22]=u,n[23]=h,n}function c(t,n){const e=isFinite(t[2])||isFinite(t[5]);return new r.A(e?{xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],zmin:t[2],zmax:t[5],spatialReference:n}:{xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],spatialReference:n})}function a(t,n){t[0]=Math.min(t[0],n[0]),t[1]=Math.min(t[1],n[1]),t[2]=Math.min(t[2],n[2]),t[3]=Math.max(t[3],n[3]),t[4]=Math.max(t[4],n[4]),t[5]=Math.max(t[5],n[5])}function f(t,n){t[0]=Math.min(t[0],n[0]),t[1]=Math.min(t[1],n[1]),t[3]=Math.max(t[3],n[2]),t[4]=Math.max(t[4],n[3])}function l(t,n){t[0]=Math.min(t[0],n[0]),t[1]=Math.min(t[1],n[1]),t[2]=Math.min(t[2],n[2]),t[3]=Math.max(t[3],n[0]),t[4]=Math.max(t[4],n[1]),t[5]=Math.max(t[5],n[2])}function m(t,n=[0,0,0]){return n[0]=function(t){return t[0]>=t[3]?0:t[3]-t[0]}(t),n[1]=function(t){return t[1]>=t[4]?0:t[4]-t[1]}(t),n[2]=function(t){return t[2]>=t[5]?0:t[5]-t[2]}(t),n}function d(t,n,e=t){return e[0]=n[0],e[1]=n[1],e[2]=n[2],e!==t&&(e[3]=t[3],e[4]=t[4],e[5]=t[5]),e}function g(t,n,e=t){return e[3]=n[0],e[4]=n[1],e[5]=n[2],e!==t&&(e[0]=t[0],e[1]=t[1],e[2]=t[2]),t}function y(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t}function M(t){return t?y(t,w):s(w)}function x(t,n){return t[0]=n[0],t[1]=n[1],t[2]=Number.NEGATIVE_INFINITY,t[3]=n[2],t[4]=n[3],t[5]=Number.POSITIVE_INFINITY,t}function I(t,n,e,r,i){return t[0]=n,t[1]=e,t[2]=Number.NEGATIVE_INFINITY,t[3]=r,t[4]=i,t[5]=Number.POSITIVE_INFINITY,t}function A(t){return 6===t.length}function b(t,n,e){if(null==t||null==n)return t===n;if(!A(t)||!A(n))return!1;if(e){for(let r=0;r<t.length;r++)if(!e(t[r],n[r]))return!1}else for(let e=0;e<t.length;e++)if(t[e]!==n[e])return!1;return!0}const w=[1/0,1/0,1/0,-1/0,-1/0,-1/0],G=[0,0,0,0,0,0];s()},76061:(t,n,e)=>{e.d(n,{G:()=>r,S:()=>i});class r{*[Symbol.iterator](){let t=this.next();for(;t;)yield t,t=this.next()}}class i extends r{constructor(t){super(),this.m_iGeom=-1,this.m_aGeoms=t?t.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const t=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,t}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},92722:(t,n,e)=>{e.d(n,{A:()=>i});var r=e(69397);class i{constructor(t=[],n=[],e=!1,r=!1){this.lengths=t??[],this.coords=n??[],this.hasZ=e,this.hasM=r}static fromJSON({lengths:t,coords:n,hasZ:e,hasM:r}){return new i(t,n,e||!1,r||!1)}static fromRect([t,n,e,r]){const s=e-t,o=r-n;return new i([5],[t,n,s,0,0,o,-s,0,0,-o])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((t,n)=>t+n,0)}get usedMemory(){return 64+(0,r.Qf)(this.lengths,this.coords)}get stride(){return 2+(this.hasZ?1:0)+(this.hasM?1:0)}area(){if(this.isPoint)return 0;let t=0,n=0;for(const e of this.lengths){if(e<3)continue;const{stride:r}=this;let i=this.coords[r*n],s=this.coords[r*n+1];for(let o=1;o<e;o+=1){const e=r*(n+o),u=this.coords[e],h=this.coords[e+1];t+=-.5*(u-i)*(h+s),i=u,s=h}n+=e}return t}forEachVertex(t){let n=0;if(this.isPoint)return t(this.coords[0],this.coords[1]);const{stride:e}=this;for(const r of this.lengths){for(let i=0;i<r;i++){const r=e*(n+i);t(this.coords[r],this.coords[r+1])}n+=r}}deltaDecode(){const t=this.clone(),{coords:n,lengths:e}=t;let r=0;const{stride:i}=this;for(const t of e){for(let e=1;e<t;e++){const t=i*(r+e);n[t]+=n[t-i],n[t+1]+=n[t+1-i]}r+=t}return t}clone(t){if(this.isPoint)return new i([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);const n=Array.from(this.lengths),{stride:e,size:r}=this,s=this.coords.slice(0,r*e);return t?(t.set(s),new i(n,t)):new i(n,Array.from(s),this.hasZ,this.hasM)}justXY(){const{stride:t,size:n}=this;if(2===t)return this;const e=new Array(n*t);for(let n=0,r=0;n<e.length;n+=t)e[r++]=this.coords[n],e[r++]=this.coords[n+1];return new i(this.lengths,e,!1,!1)}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[189,3169,4161,4988,6061,7373,8125],{4197:(e,t,n)=>{n.d(t,{Vj:()=>c,cj:()=>u,jh:()=>s,l5:()=>a,xm:()=>i});var r=n(34275),o=n(9093);function s(e){return e<=r.y9?new Array(e).fill(0):new Float64Array(e)}function i(e){return((0,r.iu)(e)?e.byteLength/8:e.length)<=r.y9?Array.from(e):new Float64Array(e)}function a(e,t,n){return Array.isArray(e)?e.slice(t,t+n):e.subarray(t,t+n)}function u(e){return[...e]}function c(e){const t=(0,o.vt)();for(let n=0;n<16;++n)t[n]=e[n];return t}},9093:(e,t,n)=>{function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function o(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}n.d(t,{o8:()=>o,vt:()=>r,zK:()=>s});const s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:o,create:r,fromValues:function(e,t,n,r,o,s,i,a,u,c,l,h,m,f,g,y){return[e,t,n,r,o,s,i,a,u,c,l,h,m,f,g,y]}},Symbol.toStringTag,{value:"Module"}))},36633:(e,t,n)=>{n.d(t,{O:()=>m});var r=n(55537),o=n(79187),s=n(83661),i=n(15756);function a(){return u(new s.P,-1,Number.NaN)}function u(e,t,n){return{m_coordinate:e.clone(),m_vertexIndex:t,m_geometryIndex:0,m_distance:n,m_bRightSide:!1,isEmpty:c}}function c(){return Number.isNaN(this.m_distance)}function l(e,t,n=-1,a=-1){if(e.isEmpty())return 3;const u=e.getGeometryType();if((0,r.f)(u))return function(e,t,n,o){if(n>=0||o>=0)return(0,r.a)("");if(e.isDegenerate(0))return e.getStartXY().equals(t)?2:3;if(!e.isCurve()){const n=s.P.orientationRobust(t,e.getStartXY(),e.getEndXY());return n<0?1:n>0?0:2}const i=e.getClosestCoordinate(t,!1),a=e.getTangent(i),u=e.getCoord2D(i),c=s.P.orientationRobust(t,u,u.add(a));return c<0?1:c>0?0:2}(e,t,n,a);if(u===r.G.enumPolygon)return function(e,t,n,s){(n>=0||s>=0)&&(0,r.a)("");const a=new o.Envelope2D;e.queryEnvelope(a);const u=(0,i.l)(e,t,0);return 0===u?0:1===u?1:2}(e,t,n,a);if(u===r.G.enumPolyline)return function(e,t,n,o){(n<0&&o>=0||n>=0&&o<0)&&(0,r.a)("");const i=e.querySegmentIterator();if(n<0){let e=Number.MAX_VALUE,r=0;for(;i.nextPath();)for(;i.hasNextSegment();){const a=i.nextSegment(),u=a.getClosestCoordinate(t,!1),c=a.getCoord2D(u),l=s.P.sqrDistance(c,t);l<e?(r=1,n=i.getStartPointIndex(),o=i.getPathIndex(),e=l):l===e&&r++}if(0===r)return 3;if(1===r)return i.resetToVertex(n,o),l(i.nextSegment(),t)}const a=function(e,t,n,r){const o={i1:-1,i2:-1,bRight1:!1,bRight2:!1};if(o.i1=function(e,t,n){for(e.resetToVertex(t,n);e.hasNextSegment();)if(!e.nextSegment().isDegenerate(0))return e.getStartPointIndex();for(e.resetToVertex(t,n);e.hasPreviousSegment();)if(!e.previousSegment().isDegenerate(0))return e.getStartPointIndex();return-1}(t,n,r),-1!==o.i1){t.resetToVertex(o.i1,-1);const n=t.nextSegment(),r=n.getClosestCoordinate(e,!1),i=n.getCoord2D(r),a=s.P.sqrDistance(i,e);{const t=i.clone();t.subThis(n.getStartXY());const r=e.clone();r.subThis(n.getStartXY()),o.bRight1=t.crossProduct(r)<0}if(o.i2=function(e,t){for(e.resetToVertex(t,-1),e.nextSegment();e.hasNextSegment();)if(!e.nextSegment().isDegenerate(0))return e.getStartPointIndex();return-1}(t,o.i1),-1!==o.i2){t.resetToVertex(o.i2,-1);const n=t.nextSegment(),r=n.getClosestCoordinate(e,!1),i=n.getCoord2D(r);if(s.P.sqrDistance(i,e)>a)o.i2=-1;else{const t=i.clone();t.subThis(n.getStartXY());const r=e.clone();r.subThis(n.getStartXY()),o.bRight2=t.crossProduct(r)<0}}if(-1===o.i2&&(o.i2=function(e,t){for(e.resetToVertex(t,-1);e.hasPreviousSegment();)if(!e.previousSegment().isDegenerate(0))return e.getStartPointIndex();return-1}(t,o.i1),-1!==o.i2)){t.resetToVertex(o.i2,-1);const n=t.nextSegment(),r=n.getClosestCoordinate(e,!1),i=n.getCoord2D(r);if(s.P.sqrDistance(i,e)>a)o.i2=-1;else{const t=i.clone();t.subThis(n.getStartXY());const r=e.clone();r.subThis(n.getStartXY()),o.bRight2=t.crossProduct(r)<0;const s=o.i1;o.i1=o.i2,o.i2=s;const a=o.bRight1;o.bRight1=o.bRight2,o.bRight2=a}}}return o}(t,i,n,o);if(-1!==a.i1&&-1===a.i2)return a.bRight1?1:0;if(-1!==a.i1&&-1!==a.i2){if(a.bRight1===a.bRight2)return a.bRight1?1:0;{i.resetToVertex(a.i1,-1);const e=i.nextSegment().getTangent(1);i.resetToVertex(a.i2,-1);const t=i.nextSegment().getTangent(0);return e.crossProduct(t)>=0?1:0}}return i.resetToVertex(n,o),l(i.nextSegment(),t)}(e,t,n,a);if(u===r.G.enumEnvelope){const n=new o.Envelope2D;return e.queryEnvelope(n),n.contains(t)?n.containsExclusive(t)?1:2:0}return 3}var h=n(95213);class m{getOperatorType(){return 10500}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}getNearestCoordinate(e,t,n,o){if(t.isNAN()&&(0,r.a)("NAN xy coordinates are not allowed"),e.isEmpty())return a();switch(e.getGeometryType()){case r.G.enumPoint:return this.pointGetNearestVertex(e,t);case r.G.enumMultiPoint:return this.multiVertexGetNearestVertex(e,t);case r.G.enumPolyline:case r.G.enumPolygon:return this.multiPathGetNearestCoordinate(e,t,n,o);default:(0,r.t)("")}}getNearestVertex(e,t){if(t.isNAN()&&(0,r.a)("NAN xy coordinates are not allowed"),e.isEmpty())return a();switch(e.getGeometryType()){case r.G.enumPoint:return this.pointGetNearestVertex(e,t);case r.G.enumMultiPoint:case r.G.enumPolyline:case r.G.enumPolygon:return this.multiVertexGetNearestVertex(e,t);default:(0,r.t)("")}}getNearestVertices(e,t,n,o){if(0===o&&(0,r.a)(""),t.isNAN()&&(0,r.a)("NAN xy coordinates are not allowed"),e.isEmpty())return[];switch(e.getGeometryType()){case r.G.enumPoint:return this.pointGetNearestVertices(e,t,n,o);case r.G.enumMultiPoint:case r.G.enumPolyline:case r.G.enumPolygon:return this.multiVertexGetNearestVertices(e,t,n,o);default:(0,r.t)("")}}multiPathGetNearestCoordinate(e,t,n,a){if(e.getGeometryType()===r.G.enumPolygon&&n){const n=new o.Envelope2D;e.queryEnvelope(n);const r=(0,h.a)(null,n,!1);let s;if(s=(0,i.l)(e,t,a?0:r),0!==s){const e=u(t,-1,0);return a&&(e.m_bRightSide=!0),e}}const c=e.querySegmentIterator(),m=new s.P;let f=-1,g=-1,y=Number.MAX_VALUE,d=0;for(;c.nextPath();)for(;c.hasNextSegment();){const e=c.nextSegment(),n=e.getClosestCoordinate(t,!1),r=e.getCoord2D(n),o=s.P.sqrDistance(r,t);o<y?(d=1,m.assign(r),f=c.getStartPointIndex(),g=c.getPathIndex(),y=o):o===y&&d++}-1===f&&(0,r.a)("");const x=u(m,f,Math.sqrt(y));if(a)if(e.getGeometryType()!==r.G.enumPolygon){let n=!1;if(d>1){const r=l(e,t,f,g);n=0!==r&&3!==r}else c.resetToVertex(f,g),n=0!==l(c.nextSegment(),t);x.m_bRightSide=n}else n||0!==(0,i.l)(e,t,0)&&(x.m_bRightSide=!0);return x}pointGetNearestVertex(e,t){const n=e.getXY();return u(n,0,s.P.distance(n,t))}multiVertexGetNearestVertex(e,t){const n=e.getAttributeStreamRef(0),r=e.getPointCount();let o=-1;const i=new s.P;let a=Number.MAX_VALUE;const c=new s.P;for(let e=0;e<r;e++){n.queryPoint2D(2*e,c);const r=s.P.sqrDistance(c,t);r<a&&(i.assign(c),o=e,a=r)}return u(i,o,Math.sqrt(a))}pointGetNearestVertices(e,t,n,r){const o=[];if(0!==r){const r=n*n,i=e.getXY(),a=s.P.sqrDistance(i,t);a<=r&&o.push(u(i,0,Math.sqrt(a)))}return o}multiVertexGetNearestVertices(e,t,n,r){const o=[];if(0!==r){const i=e.getAttributeStreamRef(0),a=e.getPointCount();o.length=r+1;const c=n*n;for(let e=0;e<a;e++){const n=i.read(2*e),r=i.read(2*e+1),a=t.x-n,l=t.y-r,h=a*a+l*l;h<=c&&o.push(u(s.P.construct(n,r),e,Math.sqrt(h)))}o.sort((e,t)=>e.m_distance-t.m_distance)}return o.slice(0,r)}}},64064:(e,t,n)=>{n.d(t,{executeNearestVertex:()=>u});var r=n(95213),o=n(36633),s=n(78125);function i(e,t,n){if(e.getPointCount()<=0)return"left";const r=e.querySegmentIteratorAtVertex(n),o=r.hasPreviousSegment()?r.previousSegment():r.nextSegment();return function(e,t,n){const r=(t.x-e.x)*(n.y-e.y)-(n.x-e.x)*(t.y-e.y);return r>0?"left":r<0?"right":"straddle"}(o.getStartXY(),o.getEndXY(),t)}const a=new o.O;function u(e,t){const n=(0,s.fromGeometry)(e),o=(0,s.fromPoint)(t).getXY(),u=a.getNearestVertex(n,o);if(u.isEmpty())return null;switch(e.type){case"point":return{coordinate:e,distance:u.m_distance,sideOfLine:0===u.m_distance?"straddle":"left"};case"multipoint":{const t=new r.P;return n.getPointByVal(u.m_vertexIndex,t),{coordinate:(0,s.toPoint)(t,(0,s.getSpatialReference)(e)),distance:u.m_distance,sideOfLine:0===u.m_distance?"straddle":"left"}}case"polyline":case"polygon":{const t=new r.P;return n.getPointByVal(u.m_vertexIndex,t),{coordinate:(0,s.toPoint)(t,(0,s.getSpatialReference)(e)),distance:u.m_distance,sideOfLine:i(n,o,u.m_vertexIndex)}}default:throw new Error(`Unsupported geometry type: ${e.type}`)}}},69397:(e,t,n)=>{n.d(t,{$B:()=>o,Qf:()=>c,Qh:()=>a,RS:()=>s,Ul:()=>g,ez:()=>m,lM:()=>i,qK:()=>h});var r=n(34275);function o(e){return 32+e.length}const s=16;function i(e){if(!e)return 0;let t=h;for(const n in e)e.hasOwnProperty(n)&&(t+=u(e[n],!1));return t}function a(e){if(!e)return 0;if("number"==typeof e[0])return c(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return l(e,8);let n=m;for(let r=0;r<t;r++)n+=u(e[r]);return n}(e);let t=h;for(const n in e)e.hasOwnProperty(n)&&(t+=u(e[n]));return t}function u(e,t=!0){switch(typeof e){case"object":return t?a(e):h;case"string":return o(e);case"number":return s;case"boolean":return 4;default:return 8}}function c(...e){return e.reduce((e,t)=>e+(t?(0,r.iu)(t)?t.byteLength+f:Array.isArray(t)?l(t,s):0:0),0)}function l(e,t){return m+e.length*t}const h=32,m=16,f=145,g=64},70328:(e,t,n)=>{n.d(t,{BI:()=>P,DC:()=>h,Ej:()=>f,Ie:()=>x,Jt:()=>p,Ne:()=>g,RF:()=>l,aI:()=>V,fA:()=>i,gE:()=>u,hZ:()=>d,iT:()=>m,is:()=>G,qv:()=>M,vI:()=>y,vY:()=>a,v_:()=>N,vt:()=>s,w1:()=>c});var r=n(5443),o=(n(19419),n(4197));function s(e=N){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function i(e,t,n,r,o,i,a=s()){return a[0]=e,a[1]=t,a[2]=n,a[3]=r,a[4]=o,a[5]=i,a}function a(e,t=s()){return function(e,t,n,r=s()){return d(r,M),function(e,t,n=0,r=t.length/3){let o=e[0],s=e[1],i=e[2],a=e[3],u=e[4],c=e[5];for(let e=0;e<r;e++)o=Math.min(o,t[n+3*e]),s=Math.min(s,t[n+3*e+1]),i=Math.min(i,t[n+3*e+2]),a=Math.max(a,t[n+3*e]),u=Math.max(u,t[n+3*e+1]),c=Math.max(c,t[n+3*e+2]);e[0]=o,e[1]=s,e[2]=i,e[3]=a,e[4]=u,e[5]=c}(r,e,t,n),r}(e,0,e.length/3,t)}function u(e,t=(0,o.jh)(24)){const[n,r,s,i,a,u]=e;return t[0]=n,t[1]=r,t[2]=s,t[3]=n,t[4]=r,t[5]=u,t[6]=n,t[7]=a,t[8]=s,t[9]=n,t[10]=a,t[11]=u,t[12]=i,t[13]=r,t[14]=s,t[15]=i,t[16]=r,t[17]=u,t[18]=i,t[19]=a,t[20]=s,t[21]=i,t[22]=a,t[23]=u,t}function c(e,t){const n=isFinite(e[2])||isFinite(e[5]);return new r.A(n?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function h(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function m(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function f(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function g(e,t,n=e){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n!==e&&(n[3]=e[3],n[4]=e[4],n[5]=e[5]),n}function y(e,t,n=e){return n[3]=t[0],n[4]=t[1],n[5]=t[2],n!==e&&(n[0]=e[0],n[1]=e[1],n[2]=e[2]),e}function d(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function x(e){return e?d(e,M):s(M)}function p(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function P(e,t,n,r,o){return e[0]=t,e[1]=n,e[2]=Number.NEGATIVE_INFINITY,e[3]=r,e[4]=o,e[5]=Number.POSITIVE_INFINITY,e}function G(e){return 6===e.length}function V(e,t,n){if(null==e||null==t)return e===t;if(!G(e)||!G(t))return!1;if(n){for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1}else for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}const M=[1/0,1/0,1/0,-1/0,-1/0,-1/0],N=[0,0,0,0,0,0];s()},76061:(e,t,n)=>{n.d(t,{G:()=>r,S:()=>o});class r{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class o extends r{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},78125:(e,t,n)=>{n.r(t),n.d(t,{fromExtent:()=>p,fromGeometry:()=>x,fromMultipoint:()=>P,fromPoint:()=>G,fromPolygon:()=>V,fromPolyline:()=>M,fromPolylineUsingImportOperator:()=>N,fromSpatialReference:()=>S,getSpatialReference:()=>d,toExtent:()=>v,toGeometry:()=>C,toMultipoint:()=>b,toPoint:()=>w,toPolygon:()=>I,toPolyline:()=>R});var r=n(83661),o=(n(79187),n(55537)),s=n(95213),i=n(88885),a=n(5443),u=n(48526),c=n(86738),l=n(39829),h=n(82799),m=(n(90293),n(83299));const f="_gxVersion",g=2,y=1;function d(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function x(e){switch(e.type){case"point":return G(e);case"multipoint":return P(e);case"polyline":return M(e);case"polygon":return V(e);case"extent":return p(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function p(e){if(!e.getCacheValue(f)){const t=new s.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(g,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(y,0,e.zmin,e.zmax),e.setCacheValue(f,t)}return e.getCacheValue(f)}function P(e){if(!e.getCacheValue(f)){const t=new i.M,n=new s.P,r=e.points,o=e.hasM,a=e.hasZ,u=a?3:2;for(let e=0,s=r.length;e<s;e++){const s=r[e];n.setXYCoords(s[0],s[1]),a&&n.setZ(s[2]??0),o&&n.setM(s[u]??NaN),t.add(n)}e.setCacheValue(f,t)}return e.getCacheValue(f)}function G(e){if(!e.getCacheValue(f)){const t=new s.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(f,t)}return e.getCacheValue(f)}function V(e){if(!e.getCacheValue(f)){const{curveRings:t,hasM:n,hasZ:r,rings:o}=e,s=(0,m.fromGeometryToGXGeometry)({curveRings:t,hasM:n,hasZ:r,rings:o});e.setCacheValue(f,s)}return e.getCacheValue(f)}function M(e){if(!e.getCacheValue(f)){const{curvePaths:t,hasM:n,hasZ:r,paths:o}=e,s=(0,m.fromGeometryToGXGeometry)({curvePaths:t,hasM:n,hasZ:r,paths:o});e.setCacheValue(f,s)}return e.getCacheValue(f)}function N(e){if(!e.getCacheValue(f)){const{curvePaths:t,hasM:n,hasZ:r,paths:o}=e,s=(0,m.fromGeometryToGXGeometryUsingImportOperator)({curvePaths:t,hasM:n,hasZ:r,paths:o});e.setCacheValue(f,s)}return e.getCacheValue(f)}function S(e){return(0,m.fromSpatialReference)(e)}function C(e,t){if(e)switch(e.getGeometryType()){case o.G.enumPoint:return w(e,t);case o.G.enumEnvelope:return v(e,t);case o.G.enumMultiPoint:return b(e,t);case o.G.enumPolyline:return R(e,t);case o.G.enumPolygon:return I(e,t)}return null}function v(e,t){if(e.isEmpty())return null;const n=new a.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),r=e.getDescription();if(r.hasM()){const t=e.queryInterval(g,0);n.mmin=t.vmin,n.mmax=t.vmax}if(r.hasZ()){const t=e.queryInterval(y,0);n.zmin=t.vmin,n.zmax=t.vmax}return n.setCacheValue(f,e),n}function b(e,t){if(e.isEmpty())return null;const n=e.getDescription(),r=n.hasM(),o=n.hasZ(),i=[],a=new s.P;for(let t=0,n=e.getPointCount();t<n;t++){e.getPointByVal(t,a);const n=[a.getX(),a.getY()];o&&n.push(a.getZ()),r&&n.push(a.getM()),i.push(n)}const c=new u.A({hasM:r,hasZ:o,points:i,spatialReference:t});return c.setCacheValue(f,e),c}function w(e,t){if(e instanceof r.P)return new c.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const n=new c.A({x:e.getX(),y:e.getY(),spatialReference:t}),o=e.getDescription();return o.hasM()&&(n.m=e.getM()),o.hasZ()&&(n.z=e.getZ()),n.setCacheValue(f,e),n}function I(e,t){if(e.isEmpty())return null;const n=l.A.fromJSON({...(0,m.toGeometry)(e,null),spatialReference:t});return n.setCacheValue(f,e),n}function R(e,t){if(e.isEmpty())return null;const n=h.A.fromJSON({...(0,m.toGeometry)(e,null),spatialReference:t});return n.setCacheValue(f,e),n}},92722:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(69397);class o{constructor(e=[],t=[],n=!1,r=!1){this.lengths=e??[],this.coords=t??[],this.hasZ=n,this.hasM=r}static fromJSON({lengths:e,coords:t,hasZ:n,hasM:r}){return new o(e,t,n||!1,r||!1)}static fromRect([e,t,n,r]){const s=n-e,i=r-t;return new o([5],[e,t,s,0,0,i,-s,0,0,-i])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((e,t)=>e+t,0)}get usedMemory(){return 64+(0,r.Qf)(this.lengths,this.coords)}get stride(){return 2+(this.hasZ?1:0)+(this.hasM?1:0)}area(){if(this.isPoint)return 0;let e=0,t=0;for(const n of this.lengths){if(n<3)continue;const{stride:r}=this;let o=this.coords[r*t],s=this.coords[r*t+1];for(let i=1;i<n;i+=1){const n=r*(t+i),a=this.coords[n],u=this.coords[n+1];e+=-.5*(a-o)*(u+s),o=a,s=u}t+=n}return e}forEachVertex(e){let t=0;if(this.isPoint)return e(this.coords[0],this.coords[1]);const{stride:n}=this;for(const r of this.lengths){for(let o=0;o<r;o++){const r=n*(t+o);e(this.coords[r],this.coords[r+1])}t+=r}}deltaDecode(){const e=this.clone(),{coords:t,lengths:n}=e;let r=0;const{stride:o}=this;for(const e of n){for(let n=1;n<e;n++){const e=o*(r+n);t[e]+=t[e-o],t[e+1]+=t[e+1-o]}r+=e}return e}clone(e){if(this.isPoint)return new o([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);const t=Array.from(this.lengths),{stride:n,size:r}=this,s=this.coords.slice(0,r*n);return e?(e.set(s),new o(t,e)):new o(t,Array.from(s),this.hasZ,this.hasM)}justXY(){const{stride:e,size:t}=this;if(2===e)return this;const n=new Array(t*e);for(let t=0,r=0;t<n.length;t+=e)n[r++]=this.coords[t],n[r++]=this.coords[t+1];return new o(this.lengths,n,!1,!1)}}}}]);
|