@arcgis/core 4.34.0-next.54 → 4.34.0-next.55
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/ElevationProfile/ElevationProfileGroundLine.d.ts +4 -0
- package/analysis/ElevationProfile/ElevationProfileGroundLine.js +5 -0
- package/analysis/ElevationProfile/ElevationProfileInputLine.d.ts +4 -0
- package/analysis/ElevationProfile/ElevationProfileInputLine.js +5 -0
- package/analysis/ElevationProfile/ElevationProfileLine.d.ts +4 -0
- package/analysis/ElevationProfile/ElevationProfileLine.js +5 -0
- package/analysis/ElevationProfile/ElevationProfileLineChartOptions.d.ts +4 -0
- package/analysis/ElevationProfile/{LineChartOptions.js → ElevationProfileLineChartOptions.js} +1 -1
- package/analysis/ElevationProfile/ElevationProfileLineViewOptions.d.ts +4 -0
- package/analysis/ElevationProfile/{LineViewOptions.js → ElevationProfileLineViewOptions.js} +1 -1
- package/analysis/ElevationProfile/ElevationProfileQueryLine.d.ts +4 -0
- package/analysis/ElevationProfile/ElevationProfileQueryLine.js +5 -0
- package/analysis/ElevationProfile/ElevationProfileSceneLine.d.ts +4 -0
- package/analysis/ElevationProfile/ElevationProfileSceneLine.js +5 -0
- package/analysis/ElevationProfile/ElevationProfileUnits.d.ts +4 -0
- package/analysis/ElevationProfile/{Units.js → ElevationProfileUnits.js} +1 -1
- package/analysis/ElevationProfile/ElevationProfileViewOptions.d.ts +4 -0
- package/analysis/ElevationProfile/{ViewOptions.js → ElevationProfileViewOptions.js} +1 -1
- package/analysis/ElevationProfile/elevationProfileLineTypes.js +1 -1
- package/analysis/ElevationProfileAnalysis.js +1 -1
- package/applications/KnowledgeStudio/resourceSerializationUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/01e8b9dc77a57d1c2a52.js +1 -0
- package/assets/esri/core/workers/chunks/027cfcde29fe87aa2ffe.js +1 -0
- package/assets/esri/core/workers/chunks/18ceea59e469a0f2721b.js +1 -0
- package/assets/esri/core/workers/chunks/199a17b0a0f75cbaed16.js +1 -0
- package/assets/esri/core/workers/chunks/1eee7cf11df01a52c1bf.js +1 -0
- package/assets/esri/core/workers/chunks/{ac41b882f9cbf8d56f0c.js → 222f981e876f60ae282f.js} +1 -1
- package/assets/esri/core/workers/chunks/22334a464f798b5279b2.js +1 -0
- package/assets/esri/core/workers/chunks/{99b9392946d776a62997.js → 23e600e368ac829680b5.js} +1 -1
- package/assets/esri/core/workers/chunks/24ac204d8a045aa821be.js +1 -0
- package/assets/esri/core/workers/chunks/252ee00fd6c4ae0ee7fa.js +1 -0
- package/assets/esri/core/workers/chunks/27197b0a2ffb2b6104ea.js +1 -0
- package/assets/esri/core/workers/chunks/{93af38d29d066f27ed28.js → 2cb14d040e67a261b31c.js} +1 -1
- package/assets/esri/core/workers/chunks/{0021118bafefd1e47ff7.js → 31c088966ccfff2ea1db.js} +1 -1
- package/assets/esri/core/workers/chunks/3b51b61a7b8a1ef87c9b.js +1 -0
- package/assets/esri/core/workers/chunks/3d800fbc449bea18b1cd.js +1 -0
- package/assets/esri/core/workers/chunks/4874aabdb5c60ca66216.js +1 -0
- package/assets/esri/core/workers/chunks/4d2473e680324dc17cfa.js +1 -0
- package/assets/esri/core/workers/chunks/{2da12a64d3baef4aaaa1.js → 4f8dab492331c9a2d67a.js} +1 -1
- package/assets/esri/core/workers/chunks/527557b603400189d49a.js +1 -0
- package/assets/esri/core/workers/chunks/{4bd92232928b832dea76.js → 5900dde7a201a7d47469.js} +1 -1
- package/assets/esri/core/workers/chunks/62ade6f18b375795ddfd.js +1 -0
- package/assets/esri/core/workers/chunks/63f3e46bfa820436161c.js +1 -0
- package/assets/esri/core/workers/chunks/{b0ee061747bef6729bb9.js → 6801b92bce7a918fda6f.js} +1 -1
- package/assets/esri/core/workers/chunks/6940bb6524938894a246.js +1 -0
- package/assets/esri/core/workers/chunks/6b11476b2004b4db576e.js +1 -0
- package/assets/esri/core/workers/chunks/71cac356874b36f9a383.js +1 -0
- package/assets/esri/core/workers/chunks/{69dc5a7abc1fda2474ad.js → 722931d1a60be461e521.js} +1 -1
- package/assets/esri/core/workers/chunks/79ab06fb4c91ac8da323.js +1 -0
- package/assets/esri/core/workers/chunks/{0a4357af5b8c0532b439.js → 7bdfc7c7ce1d94c00745.js} +1 -1
- package/assets/esri/core/workers/chunks/{0ce671588de2858516d2.js → 83737d86584bf1b32368.js} +1 -1
- package/assets/esri/core/workers/chunks/{98ea12c7a000a30f3dc0.js → 87f68c2b9361bd3f8cac.js} +1 -1
- package/assets/esri/core/workers/chunks/97ae2fdb6cb98249f5fa.js +1 -0
- package/assets/esri/core/workers/chunks/9a20390602126995f831.js +1 -0
- package/assets/esri/core/workers/chunks/9cdeead9d444e8d95477.js +1 -0
- package/assets/esri/core/workers/chunks/a778a72456fefdf40115.js +1 -0
- package/assets/esri/core/workers/chunks/a999f804fc2f00b2e7ae.js +1 -0
- package/assets/esri/core/workers/chunks/ae73ac81bd10614c2b53.js +1 -0
- package/assets/esri/core/workers/chunks/c7d4c296011c5393bcaa.js +1 -0
- package/assets/esri/core/workers/chunks/c86e339e45900c54c9f5.js +1 -0
- package/assets/esri/core/workers/chunks/{a1d3f1c221389eb6090c.js → c95e6bef8c97cf647869.js} +1 -1
- package/assets/esri/core/workers/chunks/cbec768cd98caff212f2.js +1 -0
- package/assets/esri/core/workers/chunks/d81c4afad4abe2d1d0b9.js +1 -0
- package/assets/esri/core/workers/chunks/dfb12f42b8d319ffa5fc.js +1 -0
- package/assets/esri/core/workers/chunks/e04951ee32f041faaeca.js +1 -0
- package/assets/esri/core/workers/chunks/e982cf44906eb26164f2.js +1 -0
- package/assets/esri/core/workers/chunks/{081b22fa73ef7b696409.js → ead1acf95c3385630da8.js} +2 -2
- package/assets/esri/core/workers/chunks/f1c50f37a81c672263a1.js +1 -0
- package/assets/esri/core/workers/chunks/fe5c37c69da3ec1e56ac.js +1 -0
- package/assets/esri/core/workers/chunks/ff323db554c9e09749e8.js +1 -0
- package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
- package/chunks/Laserlines.glsl.js +1 -1
- package/chunks/LineSeries.js +1 -1
- package/chunks/Theme.js +1 -1
- package/chunks/boundedPlane.js +1 -1
- package/chunks/bundle.js +1 -1
- package/chunks/chartUtilsAm5.js +1 -1
- package/chunks/sphere.js +1 -1
- package/chunks/vec42.js +1 -1
- package/config.js +1 -1
- package/core/ArrayPool.js +1 -1
- package/core/Collection.js +1 -1
- package/core/ObjectPool.js +1 -1
- package/core/accessorSupport/Properties.js +1 -1
- package/core/accessorSupport/watch.js +1 -1
- package/core/arrayUtils.js +1 -1
- package/core/libs/gl-matrix-2/math/quat.js +1 -1
- package/core/libs/gl-matrix-2/math/vec4.js +1 -1
- package/core/pbf.js +1 -1
- package/core/typedArrayUtil.js +1 -1
- package/geohash/GeohashCell.js +1 -1
- package/geohash/GeohashTree.js +1 -1
- package/geometry/support/DoubleArray.js +1 -1
- package/geometry/support/boundedPlane.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
- package/geometry/support/sphere.js +1 -1
- package/interfaces.d.ts +141 -139
- package/kernel.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/sources/ParquetSource.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/package.json +1 -1
- package/rest/knowledgeGraphService.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
- package/views/2d/engine/Container.js +1 -1
- package/views/2d/engine/DisplayObject.js +1 -1
- package/views/2d/engine/flow/dataUtils.js +1 -1
- package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
- package/views/2d/engine/webgl/DisplayEntity.js +1 -1
- package/views/2d/engine/webgl/DisplayRecord.js +1 -1
- package/views/2d/engine/webgl/FeatureDisplayList.js +1 -1
- package/views/2d/engine/webgl/FeatureTile.js +1 -1
- package/views/2d/engine/webgl/PooledUint32Array.js +1 -1
- package/views/2d/engine/webgl/cpuMapped/Buffer.js +1 -1
- package/views/2d/engine/webgl/cpuMapped/MappedMesh.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/interactive/editingTools/TransformTool.js +1 -1
- package/views/2d/interactive/editingTools/manipulations/ScaleManipulation.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
- package/views/2d/layers/features/FeatureSourceEventLog.js +1 -1
- package/views/2d/layers/features/FeatureSpatialIndex.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/RenderState.js +1 -1
- package/views/2d/layers/features/aggregation/AccumulatedStatistics.js +1 -1
- package/views/2d/layers/features/aggregation/GeohashSpatialIndex.js +1 -1
- package/views/2d/layers/features/aggregation/GridCell.js +1 -1
- package/views/2d/layers/features/aggregation/GridSpatialIndex.js +1 -1
- package/views/2d/layers/features/processor/AProcessorStrategy.js +1 -1
- package/views/2d/layers/features/schema/processor/LabelMatcherSchema.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/ASourceChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
- package/views/2d/layers/features/support/AttributeStore.js +1 -1
- package/views/2d/layers/features/support/DisplayIdGenerator.js +1 -1
- package/views/2d/layers/features/support/FeatureSetCache.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
- package/views/2d/layers/features/support/StaticBitSet.js +1 -1
- package/views/2d/tiling/TileCoverage.js +1 -1
- package/views/2d/tiling/TileKey.js +1 -1
- package/views/3d/FocusAreasView.js +1 -1
- package/views/3d/analysis/ElevationProfile/{HoveredPointVisualization.js → ElevationProfileHoveredPointVisualization.js} +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileHoveredPointsVisualization.js +5 -0
- package/views/3d/analysis/ElevationProfile/ElevationProfileInputVisualization.js +5 -0
- package/views/3d/analysis/ElevationProfile/ElevationProfileLinesVisualization.js +5 -0
- package/views/3d/analysis/ElevationProfile/ElevationProfileSceneLineComputation.js +5 -0
- package/views/3d/analysis/ElevationProfile/ElevationProfileVisualization.js +5 -0
- package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
- package/views/3d/analysis/Slice/SliceController.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/camera/constraintUtils/distance.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/ExtentRotate.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/ExtentScale.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/extentUtils.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/i3s/I3SClientMaterialUtil.js +1 -1
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/layers/i3s/I3SNode.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/state/ViewState.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
- package/views/3d/support/ViewSlice.js +1 -1
- package/views/3d/support/orientedBoundingBox.js +1 -1
- package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/Focus.js +1 -1
- package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
- package/views/3d/terrain/ScaleRangeQueries.js +1 -1
- package/views/3d/terrain/SphericalPatch.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/terrain/TilePerLayerInfo.js +1 -1
- package/views/3d/webgl-engine/core/material/MaterialBase.js +1 -1
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/Octree.js +1 -1
- package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/SliceHelper.js +1 -1
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/InstanceOctree.js +1 -1
- package/views/3d/webgl-engine/lib/octreeUtils.js +1 -1
- package/views/3d/webgl-engine/materials/internal/MaterialUtil.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileController.js +5 -0
- package/views/analysis/ElevationProfile/{ProfileGenerationError.js → ElevationProfileGenerationError.js} +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileGroundLineComputation.js +5 -0
- package/views/analysis/ElevationProfile/ElevationProfileInputLineComputation.js +5 -0
- package/views/analysis/ElevationProfile/ElevationProfileLineComputation.js +5 -0
- package/views/analysis/ElevationProfile/ElevationProfileQueryLineComputation.js +5 -0
- package/views/analysis/ElevationProfile/ElevationProfileResult.d.ts +4 -0
- package/views/analysis/ElevationProfile/ElevationProfileResult.js +5 -0
- package/views/analysis/ElevationProfile/elevationProfileGenerationUtils.js +5 -0
- package/views/analysis/ElevationProfile/elevationProfileGeometryUtils.js +5 -0
- package/views/input/InputManager.js +1 -1
- package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
- package/views/interactive/sketch/constraints.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/tileUtils.js +1 -1
- package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
- package/views/interactive/snapping/featureSources/sceneLayerSource/sceneLayerSnappingUtils.js +1 -1
- package/views/layers/FeatureLayerView.js +1 -1
- package/views/support/PropertiesPool.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileLine.d.ts +2 -2
- package/analysis/ElevationProfile/GroundLine.d.ts +0 -4
- package/analysis/ElevationProfile/GroundLine.js +0 -5
- package/analysis/ElevationProfile/InputLine.d.ts +0 -4
- package/analysis/ElevationProfile/InputLine.js +0 -5
- package/analysis/ElevationProfile/Line.d.ts +0 -4
- package/analysis/ElevationProfile/Line.js +0 -5
- package/analysis/ElevationProfile/LineChartOptions.d.ts +0 -4
- package/analysis/ElevationProfile/LineViewOptions.d.ts +0 -4
- package/analysis/ElevationProfile/QueryLine.d.ts +0 -4
- package/analysis/ElevationProfile/QueryLine.js +0 -5
- package/analysis/ElevationProfile/SceneLine.d.ts +0 -4
- package/analysis/ElevationProfile/SceneLine.js +0 -5
- package/analysis/ElevationProfile/Units.d.ts +0 -4
- package/analysis/ElevationProfile/ViewOptions.d.ts +0 -4
- package/assets/esri/core/workers/chunks/14c6ae4feb4859cfa7c5.js +0 -1
- package/assets/esri/core/workers/chunks/20a2b3d1f826e9059884.js +0 -1
- package/assets/esri/core/workers/chunks/250b1629becca0410f2a.js +0 -1
- package/assets/esri/core/workers/chunks/2efa4d8fe5454f8b2a05.js +0 -1
- package/assets/esri/core/workers/chunks/3149a86cd25684dcb0b3.js +0 -1
- package/assets/esri/core/workers/chunks/38f84294fb2fb4663ba5.js +0 -1
- package/assets/esri/core/workers/chunks/3eb3af0b6cf3c2f28131.js +0 -1
- package/assets/esri/core/workers/chunks/43bd338bb0de375b9bb7.js +0 -1
- package/assets/esri/core/workers/chunks/4622a3e64d3c4aafa56b.js +0 -1
- package/assets/esri/core/workers/chunks/47f2e905ef42e36897aa.js +0 -1
- package/assets/esri/core/workers/chunks/50e9eafb118d2a221f10.js +0 -1
- package/assets/esri/core/workers/chunks/55588e668b6acb6aa390.js +0 -1
- package/assets/esri/core/workers/chunks/5b112471dca94b2e8462.js +0 -1
- package/assets/esri/core/workers/chunks/5dfe1aed10095385c066.js +0 -1
- package/assets/esri/core/workers/chunks/5fc414fc2cfc68828c5b.js +0 -1
- package/assets/esri/core/workers/chunks/7389841fabe0f319f1e5.js +0 -1
- package/assets/esri/core/workers/chunks/8e0559cc6295008fcdf7.js +0 -1
- package/assets/esri/core/workers/chunks/944fa8261aad94ae0542.js +0 -1
- package/assets/esri/core/workers/chunks/9639a6f6fab52a501bf7.js +0 -1
- package/assets/esri/core/workers/chunks/9e479e7e2e51476c3d27.js +0 -1
- package/assets/esri/core/workers/chunks/a1e179dd6de9c8769b02.js +0 -1
- package/assets/esri/core/workers/chunks/a6493607b98783bf1ef2.js +0 -1
- package/assets/esri/core/workers/chunks/a829969ed44cdb814f27.js +0 -1
- package/assets/esri/core/workers/chunks/b2a035befeeff1a55ad8.js +0 -1
- package/assets/esri/core/workers/chunks/b4251e10621fb3ad03a3.js +0 -1
- package/assets/esri/core/workers/chunks/b9f5672093727c6f92c9.js +0 -1
- package/assets/esri/core/workers/chunks/ba45dccb4dab5a74d224.js +0 -1
- package/assets/esri/core/workers/chunks/cda27c0fafd687dfa72e.js +0 -1
- package/assets/esri/core/workers/chunks/ddd6597a66ec6b972f9c.js +0 -1
- package/assets/esri/core/workers/chunks/e28d3ed65c3a76a044c8.js +0 -1
- package/assets/esri/core/workers/chunks/e3f68f7b408a08d7cd5d.js +0 -1
- package/assets/esri/core/workers/chunks/e9716995ce0c3683eafc.js +0 -1
- package/assets/esri/core/workers/chunks/ed25bf087f52e5d3e71b.js +0 -1
- package/assets/esri/core/workers/chunks/ee0286b5f5475f2d853f.js +0 -1
- package/assets/esri/core/workers/chunks/f8505bf69795f5293a79.js +0 -1
- package/assets/esri/core/workers/chunks/f92e608931b1c168cb45.js +0 -1
- package/views/3d/analysis/ElevationProfile/HoveredPointsVisualization.js +0 -5
- package/views/3d/analysis/ElevationProfile/InputVisualization.js +0 -5
- package/views/3d/analysis/ElevationProfile/ProfileLinesVisualization.js +0 -5
- package/views/3d/analysis/ElevationProfile/SceneLineComputation.js +0 -5
- package/views/3d/analysis/ElevationProfile/Visualization.js +0 -5
- package/views/analysis/ElevationProfile/Controller.js +0 -5
- package/views/analysis/ElevationProfile/GroundLineComputation.js +0 -5
- package/views/analysis/ElevationProfile/InputLineComputation.js +0 -5
- package/views/analysis/ElevationProfile/LineComputation.js +0 -5
- package/views/analysis/ElevationProfile/QueryLineComputation.js +0 -5
- package/views/analysis/ElevationProfile/Result.d.ts +0 -4
- package/views/analysis/ElevationProfile/Result.js +0 -5
- package/views/analysis/ElevationProfile/geometryUtils.js +0 -5
- package/views/analysis/ElevationProfile/profileGenerationUtils.js +0 -5
- /package/views/analysis/ElevationProfile/{elevationQuerySourceUtils.js → elevationProfileQuerySourceUtils.js} +0 -0
- /package/views/analysis/ElevationProfile/{statisticsUtils.js → elevationProfileStatisticsUtils.js} +0 -0
- /package/views/analysis/ElevationProfile/{traversalUtils.js → elevationProfileTraversalUtils.js} +0 -0
- /package/views/analysis/ElevationProfile/{unitUtils.js → elevationProfileUnitUtils.js} +0 -0
- /package/views/analysis/ElevationProfile/{visualizationUtils.js → elevationProfileVisualizationUtils.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4937],{4902:(e,t,i)=>{i.d(t,{PH:()=>n,sA:()=>o});var r=i(31635),s=i(40608);let l=0;const o=e=>{const t=e;let i=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+l++})}};return i=(0,r.Cg)([(0,s.$)("esri.core.Identifiable")],i),i},n=e=>{const t=e;let i=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:l++})}};return i=(0,r.Cg)([(0,s.$)("esri.core.Identifiable.NumericIdentifiable")],i),i};o(class{})},8303:(e,t,i)=>{i.d(t,{A:()=>S});var r=i(31635),s=i(92602),l=i(70333),o=i(78888),n=i(60999),a=i(49186),u=i(53966),h=i(97768),c=i(74887),p=i(84952),d=i(10107),y=(i(44208),i(87811),i(36005)),f=i(40608),m=i(43937),g=i(77548),_=i(20655),w=i(80812),A=i(41318),v=i(10407);const S=e=>{const t=e;let S=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,h.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new w.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await i.e(1204).then(i.bind(i,41204));return(0,c.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,c.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,c.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=!l.id?.findCredential(this.url),s=e===i.id;if(s&&i.portal.user)return this._getUserPrivileges(i,r);let o,n;if(s)o=i.portal.url;else try{o=await(0,g.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!o||!(0,p.b8)(o,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;n=await(l.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const a=!0,u=!1,h=!1;if(!n)return{features:{edit:a,fullEdit:u},content:{updateItem:h}};try{if(s?await i.reload():(i=new w.default({id:e,portal:{url:o}}),await i.load(t)),i.portal.user)return this._getUserPrivileges(i,r)}catch(e){(0,c.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:h}}}_getUserPrivileges(e,t){const i=(0,v.It)(e);return t&&(i.features.edit=!0),i}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?l.id?.findCredential(this.url):null;if(!t)return!0;const i=x.credential===t?x.user:await this._fetchEditingUser(e);return x.credential=t,x.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=l.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,s=_.A.getDefault();if(s&&s.loaded&&(0,p.S8)(s.restUrl)===(0,p.S8)(r))return s.user;const a=`${r}/community/self`,u=null!=e?e.signal:null,h=await(0,n.Ke)((0,o.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return h.ok?A.A.fromJSON(h.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||_.A.getDefault());return i&&r&&!(0,p.ut)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r.Cg)([(0,d.MZ)({type:w.default})],S.prototype,"portalItem",null),(0,r.Cg)([(0,y.w)("web-document","portalItem",["itemId"])],S.prototype,"readPortalItem",null),(0,r.Cg)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],S.prototype,"writePortalItem",null),(0,r.Cg)([(0,d.MZ)({clonable:!1})],S.prototype,"resourceReferences",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],S.prototype,"userHasEditingPrivileges",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],S.prototype,"userHasFullEditingPrivileges",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],S.prototype,"userHasUpdateItemPrivileges",void 0),S=(0,r.Cg)([(0,f.$)("esri.layers.mixins.PortalLayer")],S),S},x={credential:null,user:null}},18768:(e,t,i)=>{i.d(t,{b:()=>a});var r=i(31635),s=i(53966),l=i(10107),o=(i(44208),i(87811),i(40608)),n=i(60694);const a=e=>{const t=e;let i=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,n.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,n.Jf)(e,s.A.getLogger(this)))}};return(0,r.Cg)([(0,l.MZ)()],i.prototype,"title",null),(0,r.Cg)([(0,l.MZ)({type:String})],i.prototype,"url",null),i=(0,r.Cg)([(0,o.$)("esri.layers.mixins.ArcGISService")],i),i}},44159:(e,t,i)=>{i.d(t,{A:()=>s});var r=i(93687);class s{static{this.pool=new r.A(s,null,null,25,50)}static getId(e,t,i,r){return"object"==typeof e?`${e.level}/${e.row}/${e.col}/${e.world}`:`${e}/${t}/${i}/${r}`}constructor(e,t,i,r){this.set(e,t,i,r)}get key(){return this}get id(){return this.toString()}get normalizedId(){return`${this.level}/${this.row}/${this.col}`}set id(e){this.set(e)}get hash(){const e=4095&this.row,t=4095&this.col,i=63&this.level;return(3&this.world)<<30|t<<22|e<<8|i}acquire(e,t,i,r){this.set(e,t,i,r)}contains(e){const t=e.level-this.level;return t>=0&&this.row===e.row>>t&&this.col===e.col>>t&&this.world===e.world}containsChild(e){const t=e.level-this.level;return t>0&&this.row===e.row>>t&&this.col===e.col>>t&&this.world===e.world}equals(e){return this.level===e.level&&this.row===e.row&&this.col===e.col&&this.world===e.world}clone(){return new s(this)}release(){this.level=0,this.row=0,this.col=0,this.world=0}set(e,t,i,r){if(null==e)this.level=0,this.row=0,this.col=0,this.world=0;else if("object"==typeof e)this.level=e.level||0,this.row=e.row||0,this.col=e.col||0,this.world=e.world||0;else if("string"==typeof e){const[t,i,r,s]=e.split("/");this.level=parseFloat(t),this.row=parseFloat(i),this.col=parseFloat(r),this.world=parseFloat(s)}else this.level=+e,this.row=+t,this.col=+i,this.world=+r||0;return this}toString(){return`${this.level}/${this.row}/${this.col}/${this.world}`}getParentKey(){return this.level<=0?null:new s(this.level-1,this.row>>1,this.col>>1,this.world)}getNormalizedNeighbor(e,t,i){const r=this.clone();return r.col+=e,r.row+=t,i.normalizeKey(r),r}getChildKeys(){const e=this.level+1,t=this.row<<1,i=this.col<<1,r=this.world;return[new s(e,t,i,r),new s(e,t,i+1,r),new s(e,t+1,i,r),new s(e,t+1,i+1,r)]}compareRowMajor(e){return this.row<e.row?-1:this.row>e.row?1:this.col<e.col?-1:this.col>e.col?1:0}}},48757:(e,t,i)=>{i.r(t),i.d(t,{default:()=>ce});var r=i(31635),s=i(78888),l=i(60999),o=i(49186),n=i(4718),a=i(92071),u=i(74887),h=i(84952),c=i(10107),p=(i(44208),i(53966)),d=i(36005),y=i(40608),f=i(43937),m=i(5443),g=i(16930),_=i(4146),w=i(52136),A=i(89186),v=i(18768),S=i(63074),x=i(69208),b=i(16131),I=i(8303),P=i(54310),T=i(25036);let R=null;var C=i(34275);class U{constructor(e,t){this._spriteSource=e,this._maxTextureSize=t,this.devicePixelRatio=1,this._spriteImageFormat="png",this._isRetina=!1,this._spritesData={},this.image=null,this.width=null,this.height=null,this.loadStatus="not-loaded","url"===e.type&&e.spriteFormat&&(this._spriteImageFormat=e.spriteFormat),e.pixelRatio&&(this.devicePixelRatio=e.pixelRatio),this.baseURL=e.spriteUrl}get spriteNames(){const e=[];for(const t in this._spritesData)e.push(t);return e.sort(),e}getSpriteInfo(e){return this._spritesData?this._spritesData[e]:null}async load(e){if(this.baseURL){this.loadStatus="loading";try{await this._loadSprites(e),this.loadStatus="loaded"}catch{this.loadStatus="failed"}}else this.loadStatus="failed"}async _loadSprites(e){this._isRetina=this.devicePixelRatio>1.15;const{width:t,height:i,data:r,json:s}=await this._getSpriteData(this._spriteSource,e),l=Object.keys(s);if(!l||0===l.length||!r)return this._spritesData=this.image=null,void(this.width=this.height=0);this._spritesData=s,this.width=t,this.height=i;const n=Math.max(this._maxTextureSize,4096);if(t>n||i>n){const e=`Sprite resource for style ${this.baseURL} is bigger than the maximum allowed of ${n} pixels}`;throw p.A.getLogger("esri.layers.support.SpriteSource").error(e),new o.A("SpriteSource",e)}let a;for(let e=0;e<r.length;e+=4)a=r[e+3]/255,r[e]=r[e]*a,r[e+1]=r[e+1]*a,r[e+2]=r[e+2]*a;this.image=r}async _getSpriteData(e,t){if("image"===e.type){let t,i;if(this.devicePixelRatio<1.15){if(!e.spriteSource1x)throw new o.A("SpriteSource","no image data provided for low resolution sprites!");t=e.spriteSource1x.image,i=e.spriteSource1x.json}else{if(!e.spriteSource2x)throw new o.A("SpriteSource","no image data provided for high resolution sprites!");t=e.spriteSource2x.image,i=e.spriteSource2x.json}return"width"in t&&"height"in t&&"data"in t&&((0,C.mw)(t.data)||(0,C.UR)(t.data))?{width:t.width,height:t.height,data:new Uint8Array(t.data),json:i}:{...M(t),json:i}}const i=(0,h.An)(this.baseURL),r=i.query?"?"+(0,h.x0)(i.query):"",l=this._isRetina?"@2x":"",n=`${i.path}${l}.${this._spriteImageFormat}${r}`,a=`${i.path}${l}.json${r}`,[u,c]=await Promise.all([(0,s.A)(a,t),(0,s.A)(n,{responseType:"image",...t})]);return{...M(c.data),json:u.data}}}function M(e){const t=document.createElement("canvas"),i=t.getContext("2d");t.width=e.width,t.height=e.height,i.drawImage(e,0,0,e.width,e.height);const r=i.getImageData(0,0,e.width,e.height);return{width:e.width,height:e.height,data:new Uint8Array(r.data)}}var E=i(87045),z=i(25943),O=i(21325),L=i(28735),D=i(44159);class j{constructor(e){this.url=e}destroy(){this._tileIndexPromise=null}async fetchTileIndex(){return this._tileIndexPromise||(this._tileIndexPromise=(0,s.A)(this.url).then(e=>e.data.index)),this._tileIndexPromise}async dataKey(e,t){const i=await this.fetchTileIndex();return(0,u.Te)(t),this._getIndexedDataKey(i,e)}_getIndexedDataKey(e,t){const i=[t];if(t.level<0||t.row<0||t.col<0||t.row>>t.level>0||t.col>>t.level>0)return null;let r=t;for(;0!==r.level;)r=new D.A(r.level-1,r.row>>1,r.col>>1,r.world),i.push(r);let s,l,o=e,n=i.pop();if(1===o)return n;for(;i.length;)if(s=i.pop(),l=(1&s.col)+((1&s.row)<<1),o){if(0===o[l]){n=null;break}if(1===o[l]){n=s;break}n=s,o=o[l]}return n}}var k=i(97768);class ${constructor(e,t){this._tilemap=e,this._tileIndexUrl=t}destroy(){this._tilemap=(0,k.pR)(this._tilemap),this._tileIndexPromise=null}async fetchTileIndex(e){return this._tileIndexPromise||(this._tileIndexPromise=(0,s.A)(this._tileIndexUrl,{query:{...e?.query}}).then(e=>e.data.index)),this._tileIndexPromise}dataKey(e,t){const{level:i,row:r,col:s}=e,l=new D.A(e);return this._tilemap.fetchAvailabilityUpsample(i,r,s,l,t).then(()=>(l.world=e.world,l)).catch(e=>{if((0,u.zf)(e))throw e;return null})}}var B=i(91869);class N{constructor(e){this._tileUrl=e,this._promise=null,this._abortController=null,this._abortOptions=[]}getData(e){(null==this._promise||(0,u.G4)(this._abortController?.signal))&&(this._promise=this._makeRequest(this._tileUrl));const t=this._abortOptions;return t.push(e),(0,u.u7)(e,()=>{t.every(e=>(0,u.G4)(e))&&this._abortController.abort()}),this._promise.then(e=>(0,n.o8)(e))}async _makeRequest(e){this._abortController=new AbortController;const{data:t}=await(0,s.A)(e,{responseType:"array-buffer",signal:this._abortController.signal});return t}}const F=new Map;function K(e,t){return(0,B.tE)(F,e,()=>new N(e)).getData(t).finally(()=>F.delete(e))}class Z{constructor(e,t,i){this.tilemap=null,this.tileInfo=null,this.capabilities=null,this.fullExtent=null,this.initialExtent=null,this.name=e,this.sourceUrl=t;const r=(0,h.An)(this.sourceUrl),s=(0,n.o8)(i),l=s.tiles;if(r)for(let e=0;e<l.length;e++){const t=(0,h.An)(l[e]);t&&((0,h.oP)(t.path)||(t.path=(0,h.fj)(r.path,t.path)),l[e]=(0,h.a6)(t.path,{...r.query,...t.query}))}this.tileServers=l;const o=i.capabilities&&i.capabilities.split(",").map(e=>e.toLowerCase().trim()),a=!0===i?.exportTilesAllowed,u=!0===o?.includes("tilemap"),c=a&&i.hasOwnProperty("maxExportTilesCount")?i.maxExportTilesCount:0;this.capabilities={operations:{supportsExportTiles:a,supportsTileMap:u},exportTiles:a?{maxExportTilesCount:+c}:null},this.tileInfo=E.A.fromJSON(s.tileInfo);const p=i.tileMap?(0,h.a6)((0,h.fj)(r.path,i.tileMap),r.query??{}):null;u?(this.type="vector-tile",this.tilemap=new $(new z.d({layer:{parsedUrl:r,tileInfo:this.tileInfo},minLOD:s.minLOD??this.tileInfo.lods[0].level,maxLOD:s.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}),p)):p&&(this.tilemap=new j(p)),this.fullExtent=m.A.fromJSON(i.fullExtent),this.initialExtent=m.A.fromJSON(i.initialExtent)}destroy(){this.tilemap?.destroy()}async getRefKey(e,t){return this.tilemap?this.tilemap.dataKey(e,t):e}requestTile(e,t,i,r){return function(e,t,i,r,s){const l=(0,h.An)(e),o=l.query;if(o)for(const[e,s]of Object.entries(o))switch(s){case"{x}":o[e]=r.toString();break;case"{y}":o[e]=i.toString();break;case"{z}":o[e]=t.toString()}const n=l.path;return K((0,h.a6)(n.replaceAll(/\{z\}/gi,t.toString()).replaceAll(/\{y\}/gi,i.toString()).replaceAll(/\{x\}/gi,r.toString()),{...l.query}),s)}(this.tileServers[t%this.tileServers.length],e,t,i,r)}isCompatibleWith(e){const t=this.tileInfo,i=e.tileInfo;if(!t.spatialReference.equals(i.spatialReference))return!1;if(!t.origin.equals(i.origin))return!1;if(Math.round(t.dpi)!==Math.round(i.dpi))return!1;const r=t.lods,s=i.lods,l=Math.min(r.length,s.length);for(let e=0;e<l;e++){const t=r[e],i=s[e];if(t.level!==i.level||Math.round(t.scale)!==Math.round(i.scale))return!1}return!0}}function q(...e){let t;for(const i of e)if(null!=i)if((0,h.BQ)(i)){if(t){const e=t.split("://")[0];t=e+":"+i.trim()}}else t=(0,h.oP)(i)?i:(0,h.fj)(t,i);return t?(0,h.UC)(t):void 0}async function Q(e,t,i,r,l){let o,n,a;if((0,u.Te)(l),"string"==typeof i){const e=(0,h.S8)(i);a=await(0,s.A)(e,{...l,responseType:"json",query:{f:"json",...l?.query}}),a.ssl&&(o&&(o=o.replace(/^http:/i,"https:")),n&&(n=n.replace(/^http:/i,"https:"))),o=e,n=e}else null!=i&&(a={data:i},o=i.jsonUrl||null,n=r);const c=a?.data;if(G(c))return e.styleUrl=o||null,async function(e,t,i,r){const s=i?(0,h.nM)(i):(0,h.gd)();e.styleBase=s,e.style=t,t["sprite-format"]&&"webp"===t["sprite-format"].toLowerCase()&&(e.spriteFormat="webp");const l=[];if(t.sources&&t.sources.esri){const i=t.sources.esri;i.url?await Q(e,"esri",q(s,i.url),void 0,r):l.push(Q(e,"esri",i,s,r))}for(const i of Object.keys(t.sources))"esri"!==i&&"vector"===t.sources[i].type&&(t.sources[i].url?l.push(Q(e,i,q(s,t.sources[i].url),void 0,r)):t.sources[i].tiles&&l.push(Q(e,i,t.sources[i],s,r)));await Promise.all(l)}(e,c,n,l);if(function(e){return!G(e)}(c))return e.sourceUrl?W(e,c,n,!1,t,l):(e.sourceUrl=o||null,W(e,c,n,!0,t,l));throw new Error("You must specify the URL or the JSON for a service or for a style.")}function H(e){return"object"==typeof e&&!!e&&"tilejson"in e&&null!=e.tilejson}function G(e){return!!e&&"sources"in e&&!!e.sources}async function W(e,t,i,r,s,l){const o=i?(0,h.UC)(i)+"/":(0,h.gd)(),a=function(e){const t=512;if(function(e){return e.hasOwnProperty("tileInfo")}(e)){const i=e?.tileInfo;return null!=i&&(null==i.rows&&(i.rows=t),null==i.cols&&(i.cols=t)),e}const i={xmin:-20037507.067161843,ymin:-20037507.067161843,xmax:20037507.067161843,ymax:20037507.067161843,spatialReference:{wkid:102100,latestWkid:3857}};let r=null;if(H(e)){const{bounds:t}=e;if(t){const e=(0,L.Gh)({x:t[0],y:t[1],spatialReference:(0,n.o8)(O.KK)}),i=(0,L.Gh)({x:t[2],y:t[3],spatialReference:(0,n.o8)(O.KK)});r={xmin:e.x,ymin:e.y,xmax:i.x,ymax:i.y,spatialReference:(0,n.o8)(O.ch)}}}null===r&&(r=i);let s=78271.51696400007,l=295828763.7957775;const o=[],a=e.hasOwnProperty("maxzoom")&&null!=e.maxzoom?+e.maxzoom:22;for(let e=0;e<=a;e++)o.push({level:e,scale:l,resolution:s}),s/=2,l/=2;return{capabilities:"TilesOnly",initialExtent:r,fullExtent:i,minScale:0,maxScale:0,tiles:e.tiles,tileInfo:{rows:t,cols:t,dpi:96,format:"pbf",origin:{x:-20037508.342787,y:20037508.342787},lods:o,spatialReference:(0,n.o8)(O.ch)}}}(t),u=new Z(s,(0,h.a6)(o,l?.query??{}),a);if(!r&&e.primarySourceName in e.sourceNameToSource){const t=e.sourceNameToSource[e.primarySourceName];if(!t.isCompatibleWith(u))return;null!=u.fullExtent&&(null!=t.fullExtent?t.fullExtent.union(u.fullExtent):t.fullExtent=u.fullExtent.clone()),t.tileInfo&&u.tileInfo&&t.tileInfo.lods.length<u.tileInfo.lods.length&&(t.tileInfo=u.tileInfo)}if(r&&(e.sourceBase=o,e.source=t,e.validatedSource=a,e.primarySourceName=s),e.sourceNameToSource[s]=u,!H(e)&&"defaultStyles"in t&&!e.style){if(null==t.defaultStyles)throw new Error;return"string"==typeof t.defaultStyles?Q(e,"",q(o,t.defaultStyles,"root.json"),void 0,l):Q(e,"",t.defaultStyles,q(o,"root.json"),l)}}var V=i(88788),J=i(39131),X=i(97159),Y=i(86738),ee=i(91806);const te=1e-6;function ie(e,t){if(e===t)return!0;if(null==e&&null!=t)return!1;if(null!=e&&null==t)return!1;if(null==e||null==t)return!1;if(!e.spatialReference.equals(t.spatialReference)||e.dpi!==t.dpi)return!1;const i=e.origin,r=t.origin;if(Math.abs(i.x-r.x)>=te||Math.abs(i.y-r.y)>=te)return!1;let s,l;e.lods[0].scale>t.lods[0].scale?(s=e,l=t):(l=e,s=t);for(let e=s.lods[0].scale;e>=l.lods[l.lods.length-1].scale-te;e/=2)if(Math.abs(e-l.lods[0].scale)<te)return!0;return!1}function re(e,t){if(e===t)return e;if(null==e&&null!=t)return t;if(null!=e&&null==t)return e;if(null==e||null==t)return null;const i=e.size[0],r=e.format,s=e.dpi,l=new Y.A({x:e.origin.x,y:e.origin.y}),o=e.spatialReference,n=e.lods[0].scale>t.lods[0].scale?e.lods[0]:t.lods[0],a=e.lods[e.lods.length-1].scale<=t.lods[t.lods.length-1].scale?e.lods[e.lods.length-1]:t.lods[t.lods.length-1],u=n.scale,h=n.resolution,c=a.scale,p=[];let d=u,y=h,f=0;for(;d>=c;)p.push(new ee.A({level:f,resolution:y,scale:d})),f++,d/=2,y/=2;return new E.A({size:[i,i],dpi:s,format:r||"pbf",origin:l,lods:p,spatialReference:o})}var se=i(45013);class le{constructor(e){this.getUnmaskedRenderer=e}}function oe(e){const t=e.getExtension("WEBGL_debug_renderer_info");return t?new le(()=>e.getParameter(t.UNMASKED_RENDERER_WEBGL)):null}let ne;function ae(){return ne??=function(){const e=new ue,t=function(e){if("undefined"==typeof WebGL2RenderingContext)return null;const t=document.createElement("canvas");if(!t)return null;let i=t.getContext("webgl2",{failIfMajorPerformanceCaveat:!0});if(null==i&&(i=t.getContext("webgl2"),null!=i&&(e.majorPerformanceCaveat=!0,e.unmaskedRenderer=oe(i)?.getUnmaskedRenderer()??"unknown")),null==i)return i;e.available=!0,e.maxTextureSize=i.getParameter(i.MAX_TEXTURE_SIZE),e.supportsVertexShaderSamplers=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>0;const r=i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT);return r&&(e.supportsHighPrecisionFragment=r.precision>0),i}(e);return null==t||(e.supportsColorBufferFloat=null!==t.getExtension("EXT_color_buffer_float"),e.supportsColorBufferFloatBlend=null!==t.getExtension("EXT_float_blend"),e.supportsColorBufferHalfFloat=e.supportsColorBufferFloat||null!==t.getExtension("EXT_color_buffer_half_float")),e}(),ne}class ue{constructor(){this.available=!1,this.majorPerformanceCaveat=!1,this.maxTextureSize=0,this.supportsVertexShaderSamplers=!1,this.supportsHighPrecisionFragment=!1,this.supportsColorBufferFloat=!1,this.supportsColorBufferFloatBlend=!1,this.supportsColorBufferHalfFloat=!1,this.unmaskedRenderer="unloaded"}}let he=class extends((0,S.dM)((0,T.j)((0,P.J)((0,A.f)((0,v.b)((0,b.q)((0,I.A)((0,x.d)((0,w.p)((0,a.P)(_.A))))))))))){constructor(...e){super(...e),this._spriteSourceMap=new Map,this.currentStyleInfo=null,this.isReference=null,this.operationalLayerType="VectorTileLayer",this.path=null,this.refreshInterval=0,this.style=null,this.tilemapCache=null,this.type="vector-tile",this.url=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){if(this.sourceNameToSource)for(const e of Object.values(this.sourceNameToSource))e?.destroy();this.primarySource?.destroy(),this._spriteSourceMap.clear()}async prefetchResources(e){await this.loadSpriteSource(globalThis.devicePixelRatio||1,e)}load(e){const t=this.loadFromPortal({supportedTypes:["Vector Tile Service"],supportsData:!1},e).catch(u.QP).then(async()=>{if(!this.portalItem?.id)return;const t=`${this.portalItem.itemCdnUrl}/resources/styles/root.json`;(await(0,s.A)(t,{...e,query:{f:"json",...this.customParameters,token:this.apiKey},authMode:this.portalItem.portal.authMode})).data&&this.read({url:t},(0,V.v)(this.portalItem,"portal-item"))}).catch(u.QP).then(()=>this._loadStyle(e));return this.addResolvingPromise(t),Promise.resolve(this)}get apiKey(){return super.apiKey}set apiKey(e){super.apiKey=e}set portalItem(e){super.portalItem=e}get attributionDataUrl(){const e=this.currentStyleInfo,t=e?.serviceUrl&&(0,h.An)(e.serviceUrl);if(!t)return null;const i=this._getDefaultAttribution(t.path);return i?(0,h.a6)(i,{...this.customParameters,token:this.apiKey}):null}get capabilities(){const e=this.primarySource;return e?e.capabilities:{operations:{supportsExportTiles:!1,supportsTileMap:!1},exportTiles:null}}get fullExtent(){return this.primarySource?.fullExtent||null}get initialExtent(){return this.primarySource?.initialExtent||null}get parsedUrl(){return this.serviceUrl?(0,h.An)(this.serviceUrl):null}get serviceUrl(){return this.currentStyleInfo?.serviceUrl||null}get spatialReference(){return this.tileInfo?.spatialReference??null}get styleUrl(){return this.currentStyleInfo?.styleUrl||null}writeStyleUrl(e,t){e&&(0,h.BQ)(e)&&(e=`https:${e}`);const i=(0,J.py)(e);t.styleUrl=(0,X.e)(e,i)}get tileInfo(){const e=[];for(const t in this.sourceNameToSource)e.push(this.sourceNameToSource[t]);let t=this.primarySource?.tileInfo||new E.A;if(e.length>1)for(let i=0;i<e.length;i++)ie(t,e[i].tileInfo)&&(t=re(t,e[i].tileInfo));return t}readTilemapCache(e,t){const i=t.capabilities?.includes("Tilemap");return i?new z.d({layer:this}):null}readVersion(e,t){return t.version?parseFloat(t.version):parseFloat(t.currentVersion)}async loadSpriteSource(e=1,t){if(!this._spriteSourceMap.has(e)){const i=ae().maxTextureSize,r=this.currentStyleInfo?.spriteUrl?(0,h.a6)(this.currentStyleInfo.spriteUrl,{...this.customParameters,token:this.apiKey}):null,s=new U({type:"url",spriteUrl:r,pixelRatio:e,spriteFormat:this.currentStyleInfo?.spriteFormat},i);await s.load(t),this._spriteSourceMap.set(e,s)}return this._spriteSourceMap.get(e)}async setSpriteSource(e,t){if(!e)return null;const i=ae().maxTextureSize,r=e.spriteUrl,s=r?(0,h.a6)(r,{...this.customParameters,token:this.apiKey}):null;if(!s&&"url"===e.type)return null;const l=new U(e,i);try{await l.load(t);const i=e.pixelRatio||1;return this._spriteSourceMap.clear(),this._spriteSourceMap.set(i,l),s&&this.currentStyleInfo&&(this.currentStyleInfo.spriteUrl=s),this.emit("spriteSource-change",{spriteSource:l}),l}catch(e){(0,u.QP)(e)}return null}async loadStyle(e,t){const i=e||this.style||this.url;return this._loadingTask&&"string"==typeof i&&this.url===i||(this._loadingTask?.abort(),this._loadingTask=(0,l.UT)(e=>(this._spriteSourceMap.clear(),this._getSourceAndStyle(i,{signal:e})),t)),this._loadingTask.promise}getStyleLayerId(e){return this.styleRepository.getStyleLayerId(e)}getStyleLayerIndex(e){return this.styleRepository.getStyleLayerIndex(e)}getPaintProperties(e){return(0,n.o8)(this.styleRepository?.getPaintProperties(e))}setPaintProperties(e,t){const i=this.styleRepository.isPainterDataDriven(e);this.styleRepository.setPaintProperties(e,t);const r=this.styleRepository.isPainterDataDriven(e);this.emit("paint-change",{layer:e,paint:t,isDataDriven:i||r})}getStyleLayer(e){return(0,n.o8)(this.styleRepository.getStyleLayer(e))}setStyleLayer(e,t){this.styleRepository.setStyleLayer(e,t),this.emit("style-layer-change",{layer:e,index:t})}deleteStyleLayer(e){this.styleRepository.deleteStyleLayer(e),this.emit("delete-style-layer",{layer:e})}getLayoutProperties(e){return(0,n.o8)(this.styleRepository.getLayoutProperties(e))}setLayoutProperties(e,t){this.styleRepository.setLayoutProperties(e,t),this.emit("layout-change",{layer:e,layout:t})}setStyleLayerVisibility(e,t){this.styleRepository.setStyleLayerVisibility(e,t),this.emit("style-layer-visibility-change",{layer:e,visibility:t})}getStyleLayerVisibility(e){return this.styleRepository.getStyleLayerVisibility(e)}write(e,t){return t?.origin&&!this.styleUrl?(t.messages&&t.messages.push(new o.A("vectortilelayer:unsupported",`VectorTileLayer (${this.title}, ${this.id}) with style defined by JSON only are not supported`,{layer:this})),null):super.write(e,t)}getTileUrl(e,t,i){return null}async _getSourceAndStyle(e,t){if(!e)throw new Error("invalid style!");const i=await async function(e,t){const i={source:null,sourceBase:null,sourceUrl:null,validatedSource:null,style:null,styleBase:null,styleUrl:null,sourceNameToSource:{},primarySourceName:"",spriteFormat:"png"},[r,s]="string"==typeof e?[e,null]:[null,e.jsonUrl];return await Q(i,"esri",e,s,t),{layerDefinition:i.validatedSource,url:r,serviceUrl:i.sourceUrl,style:i.style,styleUrl:i.styleUrl,spriteUrl:i.style.sprite&&q(i.styleBase,i.style.sprite),spriteFormat:i.spriteFormat,glyphsUrl:i.style.glyphs&&q(i.styleBase,i.style.glyphs),sourceNameToSource:i.sourceNameToSource,primarySourceName:i.primarySourceName}}(e,{...t,query:{...this.customParameters,token:this.apiKey}});"webp"===i.spriteFormat&&(await function(){if(R)return R;const e={lossy:"UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",lossless:"UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"};return R=new Promise(t=>{const i=new Image;i.onload=()=>{i.onload=i.onerror=null,t(i.width>0&&i.height>0)},i.onerror=()=>{i.onload=i.onerror=null,t(!1)},i.src="data:image/webp;base64,"+e.lossy}),R}()||(i.spriteFormat="png")),this._set("currentStyleInfo",{...i}),"string"==typeof e?(this.url=e,this.style=null):(this.url=null,this.style=e),this._set("sourceNameToSource",i.sourceNameToSource),this._set("primarySource",i.sourceNameToSource[i.primarySourceName]),this._set("styleRepository",new se.A(i.style,!1)),this.read(i.layerDefinition,{origin:"service"}),this.emit("load-style")}_getDefaultAttribution(e){const t=e.match(/^https?:\/\/(?:basemaps|basemapsbeta|basemapsdev)(?:-api)?\.arcgis\.com(\/[^/]+)?\/arcgis\/rest\/services\/([^/]+(\/[^/]+)*)\/vectortileserver/i),i=["OpenBasemap_v2","OpenBasemap_GCS_v2","OpenStreetMap_v2","OpenStreetMap_Daylight_v2","OpenStreetMap_Export_v2","OpenStreetMap_FTS_v2","OpenStreetMap_GCS_v2","World_Basemap","World_Basemap_v2","World_Basemap_Export_v2","World_Basemap_GCS_v2","World_Basemap_WGS84","World_Contours_v2","World_Hillshade_v2"];if(!t)return;const r=t[2]&&t[2].toLowerCase();if(!r)return;const s=t[1]||"";for(const e of i)if(e.toLowerCase().includes(r))return(0,h.S8)(`//static.arcgis.com/attribution/Vector${s}/${e}`)}async _loadStyle(e){return this._loadingTask?.promise??this.loadStyle(null,e)}};(0,r.Cg)([(0,c.MZ)({readOnly:!0})],he.prototype,"attributionDataUrl",null),(0,r.Cg)([(0,c.MZ)({type:["show","hide"]})],he.prototype,"listMode",void 0),(0,r.Cg)([(0,c.MZ)({json:{read:!0,write:!0}})],he.prototype,"blendMode",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],he.prototype,"capabilities",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],he.prototype,"currentStyleInfo",void 0),(0,r.Cg)([(0,c.MZ)({json:{read:!1},readOnly:!0,type:m.A})],he.prototype,"fullExtent",null),(0,r.Cg)([(0,c.MZ)({json:{read:!1},readOnly:!0,type:m.A})],he.prototype,"initialExtent",null),(0,r.Cg)([(0,c.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],he.prototype,"isReference",void 0),(0,r.Cg)([(0,c.MZ)({type:["VectorTileLayer"]})],he.prototype,"operationalLayerType",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],he.prototype,"parsedUrl",null),(0,r.Cg)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],he.prototype,"path",void 0),(0,r.Cg)([(0,c.MZ)({type:Number,json:{write:!1,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],he.prototype,"refreshInterval",void 0),(0,r.Cg)([(0,c.MZ)()],he.prototype,"style",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],he.prototype,"serviceUrl",null),(0,r.Cg)([(0,c.MZ)({type:g.A,readOnly:!0})],he.prototype,"spatialReference",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],he.prototype,"styleRepository",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],he.prototype,"sourceNameToSource",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],he.prototype,"primarySource",void 0),(0,r.Cg)([(0,c.MZ)({type:String,readOnly:!0,json:{write:{ignoreOrigin:!0},origins:{"web-document":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],he.prototype,"styleUrl",null),(0,r.Cg)([(0,f.K)(["portal-item","web-document"],"styleUrl")],he.prototype,"writeStyleUrl",null),(0,r.Cg)([(0,c.MZ)({json:{read:!1,origins:{service:{read:!1}}},readOnly:!0,type:E.A})],he.prototype,"tileInfo",null),(0,r.Cg)([(0,c.MZ)()],he.prototype,"tilemapCache",void 0),(0,r.Cg)([(0,d.w)("service","tilemapCache",["capabilities","tileInfo"])],he.prototype,"readTilemapCache",null),(0,r.Cg)([(0,c.MZ)({json:{read:!1},readOnly:!0,value:"vector-tile"})],he.prototype,"type",void 0),(0,r.Cg)([(0,c.MZ)({json:{origins:{"web-document":{read:{source:"styleUrl"}},"portal-item":{read:{source:"url"}}},write:!1,read:!1}})],he.prototype,"url",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],he.prototype,"version",void 0),(0,r.Cg)([(0,d.w)("version",["version","currentVersion"])],he.prototype,"readVersion",null),he=(0,r.Cg)([(0,y.$)("esri.layers.VectorTileLayer")],he);const ce=he},52136:(e,t,i)=>{i.d(t,{p:()=>o});var r=i(31635),s=i(10107),l=(i(44208),i(53966),i(87811),i(40608));const o=e=>{const t=e;let i=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,r.Cg)([(0,s.MZ)({type:String})],i.prototype,"apiKey",null),i=(0,r.Cg)([(0,l.$)("esri.layers.mixins.APIKeyMixin")],i),i}},64272:(e,t,i)=>{i.d(t,{T:()=>p});var r,s=i(31635),l=i(25482),o=i(88930),n=i(10107),a=(i(44208),i(53966),i(87811),i(36005)),u=i(40608),h=i(43937),c=i(98623);let p=class extends l.o{static{r=this}static get allTime(){return d}static get empty(){return y}static fromArray(e){return new r({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,s=e.end?.getTime()??e.end;return t===r&&i===s}expandTo(e,t=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();let i=this.start;i&&(i=(0,o.lL)(i,e,t));let s=this.end;if(s){const i=(0,o.lL)(s,e,t);s=s.getTime()===i.getTime()?i:(0,o.S1)(i,1,e,t)}return new r({start:i,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,l=e.end?.getTime()??1/0;let o,n;return s>=t&&s<=i?o=s:t>=s&&t<=l&&(o=t),i>=s&&i<=l?n=i:l>=t&&l<=i&&(n=l),null==o||null==n||isNaN(o)||isNaN(n)?r.empty:new r({start:o===-1/0?null:new Date(o),end:n===1/0?null:new Date(n)})}offset(e,t,i=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();const s=new r,{start:l,end:n}=this;return null!=l&&(s.start=(0,o.S1)(l,e,t,i)),null!=n&&(s.end=(0,o.S1)(n,e,t,i)),s}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return d.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:i})}};(0,s.Cg)([(0,n.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,s.Cg)([(0,a.w)("end")],p.prototype,"readEnd",null),(0,s.Cg)([(0,h.K)("end")],p.prototype,"writeEnd",null),(0,s.Cg)([(0,n.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,s.Cg)([(0,n.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,s.Cg)([(0,n.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,s.Cg)([(0,a.w)("start")],p.prototype,"readStart",null),(0,s.Cg)([(0,h.K)("start")],p.prototype,"writeStart",null),p=r=(0,s.Cg)([(0,u.$)("esri.time.TimeExtent")],p);const d=new p,y=new p({start:void 0,end:void 0})},66344:(e,t,i)=>{i.d(t,{q:()=>n});const r=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class s{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=null}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,s,o){t=e.id+t;const n=this._db.get(t);if(n&&(this._size-=n.size,e.size-=n.size,this._db.delete(t),n.entry!==i&&this._notifyRemove(t,n.entry,n.size,0)),s>this._maxSize)return void this._notifyRemove(t,i,s,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return r||console.warn(`Refusing to cache entry with size ${s} for key ${t}`),void this._notifyRemove(t,i,0,0);const a=1+Math.max(o,-4)- -3;this._db.set(t,new l(i,s,a)),this._size+=s,e.size+=s,this._checkSize()}updateSize(e,t,i,r){t=e.id+t;const s=this._db.get(t);if(s&&s.entry===i){for(this._size-=s.size,e.size-=s.size;r>this._maxSize;){const e=this._notifyRemove(t,i,r,1);if(!(null!=e&&e>0))return void this._db.delete(t);r=e}s.size=r,this._size+=r,e.size+=r,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,r)=>{const s=e.lifetime;i[s]=(i[s]||0)+e.size,this._users.forEach(i=>{const{id:s,name:l}=i;if(r.startsWith(s)){const i=t[l]||0;t[l]=i+e.size}})});const r={};this._users.forEach(e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const s=t[i]||0;t[i]=s,r[i]=Math.round(100*e.hitRate)+"%"}else r[i]="0%"});const s=Object.keys(t);s.sort((e,i)=>t[i]-t[e]),s.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+r[i]);for(let t=i.length-1;t>=0;--t){const r=i[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/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,r){const s=this._users.get(e.split(o)[0])?.removeFunc,l=s?.(t,r,i);return"number"==typeof l?l: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 r=t?.id;let s=!0;for(;s;){s=!1;for(const[l,n]of this._db)if(0===n.lifetime&&(!r||l.startsWith(r))){const r=t??this._users.get(l.split(o)[0]);if(this._purgeItem(l,n,r),i.size<=.9*e)return;s||=this._db.has(l)}}for(const[s,l]of this._db)if(!r||s.startsWith(r)){const r=t??this._users.get(s.split(o)[0]);if(this._purgeItem(s,l,r),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 r=this._notifyRemove(e,t.entry,t.size,1);null!=r&&r>0&&(this._size+=r,i&&(i.size+=r),t.lives=t.lifetime,t.size=r,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}class l{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const o=":";class n{constructor(e,t){this.removeFunc=t,this._storage=new s,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(){}}},69208:(e,t,i)=>{i.d(t,{d:()=>o});var r=i(31635),s=i(10107),l=(i(44208),i(53966),i(87811),i(40608));const o=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,r.Cg)([(0,s.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],i.prototype,"customParameters",void 0),i=(0,r.Cg)([(0,l.$)("esri.layers.mixins.CustomParametersMixin")],i),i}},69540:(e,t,i)=>{i.d(t,{O:()=>u,P:()=>h});var r=i(31635),s=i(65008),l=(i(44208),i(4718)),o=(i(53966),i(97768)),n=i(88620),a=i(40608);const u=e=>{const t=e;let i=class extends t{clone(e){const t=(0,n.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const i=t.metadata,r=t.store,s={},a=new Map;for(const t in i){const o=i[t],n=r?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||7!==n&&0!==n&&5!==n&&4!==n)continue;const h=this[t];let c=null;if("function"==typeof u)c=u(h,e);else if("reference"===u)c=h;else if(c=(0,l.TU)(h,e),null!=h&&null==c)continue;0===n?a.set(t,c):s[t]=c}const u=new(0,Object.getPrototypeOf(this).constructor)(s);if(a.size){const e=(0,n.oY)(u)?.store;if(e)for(const[t,i]of a)e.set(t,i,0)}return u}};return i=(0,r.Cg)([(0,a.$)("esri.core.Clonable")],i),i},h=u(s.A)},78553:(e,t,i)=>{i.d(t,{D:()=>l,p:()=>s});var r=i(56507);function s(e){const t=(0,r.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function l(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}},88788:(e,t,i)=>{i.d(t,{m:()=>o,v:()=>l});var r=i(84952),s=i(20655);function l(e,t){return{...n(e,t),readResourcePaths:[]}}function o(e,t,i){const s=(0,r.An)(e.itemUrl);return{...n(e,t),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:s?{rootPath:s.path,writtenUrls:[]}:null,resources:i?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function n(e,t){return{origin:t,url:(0,r.An)(e.itemUrl),portal:e.portal||s.A.getDefault(),portalItem:e}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4649,7136],{4197:(e,t,i)=>{i.d(t,{Vj:()=>u,cj:()=>l,jh:()=>r,l5:()=>o,xm:()=>a});var s=i(34275),n=i(9093);function r(e,t=!1){return e<=s.y9?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function a(e){return((0,s.iu)(e)?e.byteLength/8:e.length)<=s.y9?Array.from(e):new Float64Array(e)}function o(e,t,i){return Array.isArray(e)?e.slice(t,t+i):e.subarray(t,t+i)}function l(e){return[...e]}function u(e){const t=(0,n.vt)();for(let i=0;i<16;++i)t[i]=e[i];return t}},5834:(e,t,i)=>{i.d(t,{A:()=>h});var s=i(31635),n=i(93637),r=i(10107),a=i(56507),o=(i(44208),i(87811),i(93223)),l=i(40608),u=i(41266),c=i(41366);function d(e,t,i){(0,n.sM)(i,e instanceof Date?e.getTime():e,t)}let h=class extends((0,c.K)(u.A)){constructor(e){super(e),this.numBins=null,this.end=null,this.start=null,this.type="auto-interval"}};(0,s.Cg)([(0,r.MZ)({type:Number,json:{name:"parameters.numberOfBins",write:!0}})],h.prototype,"numBins",void 0),(0,s.Cg)([(0,r.MZ)({json:{name:"parameters.end",write:{writer:d}}})],h.prototype,"end",void 0),(0,s.Cg)([(0,r.MZ)({json:{name:"parameters.start",write:{writer:d}}})],h.prototype,"start",void 0),(0,s.Cg)([(0,o.e)({autoIntervalBin:"auto-interval"},{readOnly:!0})],h.prototype,"type",void 0),h=(0,s.Cg)([(0,l.$)("esri.rest.support.AutoIntervalBinParameters")],h),h.from=(0,a.dp)(h)},7320:(e,t,i)=>{i.d(t,{g:()=>s});const s={convertToGEGeometry:function(e,t){return null==t?null:e.convertJSONToGeometry(t)},exportPoint:function(e,t,i){const s=new n(e.getPointX(t),e.getPointY(t),i),r=e.hasZ(t),a=e.hasM(t);return r&&(s.z=e.getPointZ(t)),a&&(s.m=e.getPointM(t)),s},exportPolygon:function(e,t,i){return new r(e.exportPaths(t),i,e.hasZ(t),e.hasM(t))},exportPolyline:function(e,t,i){return new a(e.exportPaths(t),i,e.hasZ(t),e.hasM(t))},exportMultipoint:function(e,t,i){return new o(e.exportPoints(t),i,e.hasZ(t),e.hasM(t))},exportExtent:function(e,t,i){const s=e.hasZ(t),n=e.hasM(t),r=new l(e.getXMin(t),e.getYMin(t),e.getXMax(t),e.getYMax(t),i);if(s){const i=e.getZExtent(t);r.zmin=i.vmin,r.zmax=i.vmax}if(n){const i=e.getMExtent(t);r.mmin=i.vmin,r.mmax=i.vmax}return r}};class n{constructor(e,t,i){this.x=e,this.y=t,this.spatialReference=i,this.z=void 0,this.m=void 0}}class r{constructor(e,t,i,s){this.rings=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),s&&(this.hasM=s)}}class a{constructor(e,t,i,s){this.paths=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),s&&(this.hasM=s)}}class o{constructor(e,t,i,s){this.points=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,i&&(this.hasZ=i),s&&(this.hasM=s)}}class l{constructor(e,t,i,s,n){this.xmin=e,this.ymin=t,this.xmax=i,this.ymax=s,this.spatialReference=n,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},8384:(e,t,i)=>{i.d(t,{G:()=>M});var s=i(4718),n=i(12359),r=i(90634),a=i(62577),o=i(21325),l=i(29441),u=i(51441),c=i(30524),d=i(87445),h=i(1873),p=i(43668);class f{constructor(e,t,i){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=i,this.featureAdapter=t;const s=e.outFields;if(s&&!s.includes("*")){this.outFields=s;let e=0;for(const t of s){const s=(0,l.Wq)(t),n=this.fieldsIndex.get(s),r=n?null:(0,l.j4)(s,i),a=n?n.name:(0,l.SY)(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:r})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach(e=>this.getAttributes(e)),this._returnDistinctMap.size):e.length}getAttributes(e){const t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,i){const s=i?i.name:t;let n=null;return this._fieldDataCache.has(s)?n=this._fieldDataCache.get(s)?.clause:i||(n=(0,l.j4)(t,this.fieldsIndex),this._fieldDataCache.set(s,{alias:s,clause:n})),i?this.featureAdapter.getAttribute(e,s):n?.calculateValue(e,this.featureAdapter)}getDataValues(e,t,i=!0){const s=t.normalizationType,n=t.normalizationTotal,r=this.fieldsIndex.get(t.field),a=(0,c.zD)(r)||(0,c.Ah)(r),o=(0,c.OH)(r);return e.map(e=>{let r=t.field&&this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2?(r=`${(0,h.gJ)(r)}${t.fieldDelimiter}${(0,h.gJ)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(r=`${r}${t.fieldDelimiter}${(0,h.gJ)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)):"string"==typeof r&&i&&(a?r=r?new Date(r).getTime():null:o&&(r=r?(0,d.rb)(r):null)),s&&Number.isFinite(r)){const i="field"===s&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;r=(0,h.zS)(r,s,i,n)}return r})}async getExpressionValues(e,t,i,s,n){const{arcadeUtils:r}=await(0,p.l)(),a=r.hasGeometryOperations(t);a&&await r.enableGeometryOperations();const o=r.createFunction(t),l=r.getViewInfo(i),c={fields:this.fieldsIndex.fields};return e.map(e=>{const t={attributes:this.featureAdapter.getAttributes(e),layer:c,geometry:a?{...(0,u.pL)(s.geometryType,s.hasZ,s.hasM,this.featureAdapter.getGeometry(e)),spatialReference:i?.spatialReference}:null},d=r.createExecContext(t,l,n);return r.executeFunction(o,d)})}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,l.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testFeature(e,this.featureAdapter)??!1}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,l.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testSet(e,this.featureAdapter)??!1}_processAttributesForOutFields(e){const t=this.outFields;if(!t?.length)return this.featureAdapter.getAttributes(e);const i={};for(const s of t){const{alias:t,clause:n}=this._fieldDataCache.get(s);i[t]=n?n.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return i}_processAttributesForDistinctValues(e){if(null==e||!this.returnDistinctValues)return e;const t=this.outFields,i=[];if(t)for(const s of t){const{alias:t}=this._fieldDataCache.get(s);i.push(e[t])}else for(const t in e)i.push(e[t]);const s=`${(t||["*"]).join(",")}=${i.join(",")}`;let n=this._returnDistinctMap.get(s)||0;return this._returnDistinctMap.set(s,++n),n>1?null:e}}var m=i(31464),y=i(58727);function g(e,t,i){return{objectId:e,target:t,distance:i,type:"vertex"}}function x(e,t,i,s,n,r=!1){return{objectId:e,target:t,distance:i,type:"edge",start:s,end:n,draped:r}}var F=i(5834),_=i(59977),v=i(57231),w=i(11440),S=i(60909),I=i(98623),T=i(96285);const R="bin";class M{constructor(e,t,i){this.items=e,this.query=t,this.geometryType=i.geometryType,this.hasM=i.hasM,this.hasZ=i.hasZ,this.fieldsIndex=i.fieldsIndex,this.objectIdField=i.objectIdField,this.spatialReference=i.spatialReference,this.featureAdapter=i.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new f(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:i,outStatistics:s}=this.query,n=t?.length;if(!n)return 1;const r=new Map,a=new Map,o=new Set;for(const n of s){const{statisticType:s}=n,l="exceedslimit"!==s?n.onStatisticField:void 0;if(!a.has(l)){const i=[];for(const s of t){const t=this._getAttributeValues(e,s,this.items,r);i.push(t)}a.set(l,this._calculateUniqueValues(i,this.items,e.returnDistinctValues))}const u=a.get(l);for(const t in u){const{data:s,items:n}=u[t],r=s.join(",");i&&!e.validateItems(n,i)||o.add(r)}}return o.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some(e=>"exceedslimit"===e.statisticType)?this._createExceedsLimitQueryResponse():await this._createStatisticsQueryResponse(this.query,this.items):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){const t=this.query.geometry;(0,o.fn)(this.query.outSR)&&!(0,o.aI)(t.spatialReference,this.query.outSR)?e.queryGeometry=(0,u.ag)({spatialReference:this.query.outSR,...(0,m.Cv)(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=(0,u.ag)({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t,i){const s=this.featureAdapter,n=A(this.hasZ,this.hasM),{point:r,mode:a}=e,o="number"==typeof e.distance?e.distance:e.distance.x,l="number"==typeof e.distance?e.distance:e.distance.y,u={candidates:[]},c="esriGeometryPolygon"===this.geometryType,d="esriGeometryPolyline"===this.geometryType||"esriGeometryPoint"===this.geometryType,h=this._getPointCreator(a,t,this.spatialReference,i),p=new C(null,0),f=new C(null,0),m={x:0,y:0,z:0};for(const t of this.items){const i=s.getGeometry(t);if(null==i)continue;const{coords:a}=i,y=i.isPoint?z:i.lengths;if(p.coords=a,f.coords=a,e.returnEdge){let e=0;for(let i=0;i<y.length;i++){const a=y[i],d=e;for(let i=0;i<a;i++,e+=n){if(!c&&i===a-1)continue;const y=p;y.coordsIndex=e;const g=f;g.coordsIndex=i===a-1?d:e+n;const F=m;if(!b(m,r,y,g))continue;const _=(r.x-F.x)/o,v=(r.y-F.y)/l,w=_*_+v*v;w<=1&&u.candidates.push(x(s.getObjectId(t),h(F),Math.sqrt(w),h(y),h(g)))}}}if("all"===e.vertexMode){let e=0;for(let i=0;i<y.length;i++){const a=y[i],d=e,m=f;m.coordsIndex=d;for(let i=0;i<a;i++,e+=n){const n=p;if(n.coordsIndex=e,c&&i===a-1&&n.x===m.x&&n.y===m.y)continue;const d=(r.x-n.x)/o,f=(r.y-n.y)/l,y=d*d+f*f;y<=1&&u.candidates.push(g(s.getObjectId(t),h(n),Math.sqrt(y)))}}}else if(d&&"ends"===e.vertexMode){let e=0;const i=[];for(let t=0;t<y.length;t++){i.push(e);const s=y[t];e+=s*n,!c&&s>1&&i.push(e-n)}for(const e of i){const i=p;i.coordsIndex=e;const n=(r.x-i.x)/o,a=(r.y-i.y)/l,c=n*n+a*a;c<=1&&u.candidates.push(g(s.getObjectId(t),h(i),Math.sqrt(c)))}}}return u.candidates.sort((e,t)=>e.distance-t.distance),u}_getPointCreator(e,t,i,s){const n=null==s||(0,o.aI)(i,s)?e=>e:e=>(0,m.Cv)(e,i,s),{hasZ:r}=this;return"3d"===e?r&&t?({x:e,y:t,z:i})=>n({x:e,y:t,z:i}):({x:e,y:t})=>n({x:e,y:t,z:0}):({x:e,y:t})=>n({x:e,y:t})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,minValue:a,maxValue:o,scale:l,timeZone:u,outStatisticTypes:d}=e,p=this.fieldsIndex.get(t),f=(0,c.vE)(p)||(0,c.zD)(p)||(0,c.Ah)(p),m=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,scale:l,timeZone:u},this.items),y=(0,h.Vb)({normalizationType:n,normalizationField:s,minValue:a,maxValue:o}),g={value:.5,fieldType:p?.type},x=(0,c.yM)(p)?(0,h.z9)({values:m,supportsNullCount:y,percentileParams:g,outStatisticTypes:d}):(0,h.G_)({values:m,minValue:a,maxValue:o,useSampleStdDev:!n,supportsNullCount:y,percentileParams:g,outStatisticTypes:d});return(0,h.oZ)(x,d,f)}async createUniqueValuesResponse(e){const{field:t,valueExpression:i,domains:s,returnAllCodedValues:n,scale:r,timeZone:a}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:i,scale:r,timeZone:a},this.items,!1),l=(0,h.b3)(o);return(0,h.lv)(l,s,n,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:d,timeZone:p}=e,f=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,scale:d,timeZone:p},this.items),m=(0,h.Rw)(f,{field:t,normalizationField:s,normalizationType:n,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return(0,h.jM)(m,a)}async createHistogramResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:d,timeZone:p}=e,f=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:n,normalizationTotal:r,scale:d,timeZone:p},this.items);return(0,h.$y)(f,{field:t,normalizationField:s,normalizationType:n,normalizationTotal:r,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,i){if(e.length>1&&t?.length)for(const s of t.slice().reverse()){const t=s.split(" "),n=t[0],r=this.fieldsIndex.get(n),a=!!t[1]&&"desc"===t[1].toLowerCase(),o=(0,h.FM)(r?.type,a);e.sort((e,t)=>{const s=i(e,n,r),a=i(t,n,r);return o(s,a)})}}_createFeatureQueryResponse(e){const{items:t,geometryType:i,hasM:s,hasZ:n,objectIdField:r,spatialReference:o}=this,{outFields:l,outSR:c,quantizationParameters:d,resultRecordCount:h,resultOffset:p,returnZ:f,returnM:m}=e,y=null!=h&&t.length>(p||0)+h,g=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map(e=>this.fieldsIndex.get(e)));return{exceededTransferLimit:y,features:this._createFeatures(e,t),fields:g,geometryType:i,hasM:s&&m,hasZ:n&&f,objectIdFieldName:r,spatialReference:(0,u.ag)(c||o),transform:d&&(0,a.VV)(d)||null}}_createFeatures(e,t){const i=new f(e,this.featureAdapter,this.fieldsIndex),{hasM:s,hasZ:n}=this,{orderByFields:r,quantizationParameters:o,returnGeometry:l,returnCentroid:c,maxAllowableOffset:d,resultOffset:h,resultRecordCount:p,returnZ:m=!1,returnM:y=!1}=e,g=n&&m,x=s&&y;let F=[],_=0;const v=[...t];if(this._sortFeatures(v,r,(e,t,s)=>i.getFieldValue(e,t,s)),this.geometryType&&(l||c)){const e=(0,a.VV)(o)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(l&&!c)for(const s of v){const n=this.featureAdapter.getGeometry(s),r={attributes:i.getAttributes(s),geometry:(0,u.pL)(this.geometryType,this.hasZ,this.hasM,n,d,e,g,x),metadata:this.featureAdapter.getMetadata?.(s)};t&&n&&!r.geometry&&(r.centroid=(0,u.LQ)(this,this.featureAdapter.getCentroid(s,this),e)),F[_++]=r}else if(!l&&c)for(const t of v)F[_++]={attributes:i.getAttributes(t),centroid:(0,u.LQ)(this,this.featureAdapter.getCentroid(t,this),e)};else for(const t of v)F[_++]={attributes:i.getAttributes(t),centroid:(0,u.LQ)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,u.pL)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),d,e,g,x),metadata:this.featureAdapter.getMetadata?.(t)}}else for(const e of v){const t=i.getAttributes(e);t&&(F[_++]={attributes:t})}const w=h||0;if(null!=p){const e=w+p;F=F.slice(w,Math.min(F.length,e))}return F}_createExceedsLimitQueryResponse(){let e=!1,t=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;for(const e of this.query.outStatistics??[])if("exceedslimit"===e.statisticType){t=null!=e.maxPointCount?e.maxPointCount:Number.POSITIVE_INFINITY,i=null!=e.maxRecordCount?e.maxRecordCount:Number.POSITIVE_INFINITY,s=null!=e.maxVertexCount?e.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)e=this.items.length>t;else if(this.items.length>i)e=!0;else{const t=A(this.hasZ,this.hasM),i=this.featureAdapter;e=this.items.reduce((e,t)=>{const s=i.getGeometry(t);return e+(null!=s&&s.coords.length||0)},0)/t>s}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,i={attributes:{}}){const s=[],n=new Map,r=new Map,a=new Map,o=new Map,l=new f(e,this.featureAdapter,this.fieldsIndex),u=e.outStatistics,{groupByFieldsForStatistics:d,having:h,orderByFields:p,resultRecordCount:m}=e,y=d?.length,g=!!y,x=g?d[0]:null,F=g&&!this.fieldsIndex.get(x);for(const e of u??[]){const{outStatisticFieldName:u,statisticType:p}=e,f=e,m="exceedslimit"!==p?e.onStatisticField:void 0,_="percentile_disc"===p||"percentile_cont"===p,v="EnvelopeAggregate"===p||"CentroidAggregate"===p||"ConvexHullAggregate"===p,w=g&&1===y&&(m===x||F)&&"count"===p;if(g){if(!a.has(m)){const e=[];for(const i of d){const s=this._getAttributeValues(l,i,t,n);e.push(s)}a.set(m,this._calculateUniqueValues(e,t,!v&&l.returnDistinctValues))}const e=a.get(m);if(!e)continue;const i=Object.keys(e);for(const s of i){const{count:i,data:r,items:a,itemPositions:c}=e[s],p=r.join(",");if(!h||l.validateItems(a,h)){const e=o.get(p)||{attributes:{}};if(v){e.aggregateGeometries||(e.aggregateGeometries={});const{aggregateGeometries:t,outStatisticFieldName:i}=await this._getAggregateGeometry(f,a);e.aggregateGeometries[i]=t}else{let s=null;if(w)s=i;else{const e=this._getAttributeValues(l,m,t,n),i=c.map(t=>e[t]);s=_&&"statisticParameters"in f?this._getPercentileValue(f,i):this._getStatisticValue(f,i,null,l.returnDistinctValues)}e.attributes[u]=s}let s=0;d.forEach((t,i)=>e.attributes[this.fieldsIndex.get(t)?t:"EXPR_"+ ++s]=r[i]),o.set(p,e)}}}else if(v){i.aggregateGeometries||(i.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:s}=await this._getAggregateGeometry(f,t);i.aggregateGeometries[s]=e}else{const e=this._getAttributeValues(l,m,t,n);i.attributes[u]=_&&"statisticParameters"in f?this._getPercentileValue(f,e):this._getStatisticValue(f,e,r,l.returnDistinctValues)}const S="min"!==p&&"max"!==p||!(0,c.yM)(this.fieldsIndex.get(m))&&!this._isAnyDateField(m)?null:this.fieldsIndex.get(m)?.type;s.push({name:u,alias:u,type:S||"esriFieldTypeDouble"})}const _=g?Array.from(o.values()):[i];return this._sortFeatures(_,p,(e,t)=>e.attributes[t]),m&&(_.length=Math.min(m,_.length)),{fields:s,features:_}}_isAnyDateField(e){const t=this.fieldsIndex.get(e);return(0,c.vE)(t)||(0,c.zD)(t)||(0,c.Ah)(t)||(0,c.OH)(t)}async _getAggregateGeometry(e,t){const{convexHull:s,union:a}=await Promise.all([i.e(9930),i.e(9940)]).then(i.bind(i,47559)),{statisticType:o,outStatisticFieldName:l}=e,{featureAdapter:c,spatialReference:d,geometryType:h,hasZ:p,hasM:f}=this,m=t.map(e=>(0,u.pL)(h,p,f,c.getGeometry(e))),y=s(d,m,!0)[0],g={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===o){const e=y?(0,r.v)(y):(0,r.HA)(a(d,m));g.aggregateGeometries={...e,spatialReference:d},g.outStatisticFieldName=l||"extent"}else if("CentroidAggregate"===o){const e=y?(0,n.l8)(y):(0,n.Z4)((0,r.HA)(a(d,m)));g.aggregateGeometries={x:e[0],y:e[1],spatialReference:d},g.outStatisticFieldName=l||"centroid"}else"ConvexHullAggregate"===o&&(g.aggregateGeometries=y,g.outStatisticFieldName=l||"convexHull");return g}_getStatisticValue(e,t,i,s){const{onStatisticField:n,statisticType:r}=e;let a=null;return a=i?.has(n)?i.get(n):(0,c.yM)(this.fieldsIndex.get(n))||this._isAnyDateField(n)?(0,h.z9)({values:t,returnDistinct:s}):(0,h.G_)({values:s?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),i&&i.set(n,a),a["var"===r?"variance":r]}_getPercentileValue(e,t){const{onStatisticField:i,statisticParameters:s,statisticType:n}=e,{value:r,orderBy:a}=s,o=this.fieldsIndex.get(i);return(0,h.qg)(t,{value:r,orderBy:a,fieldType:o?.type,isDiscrete:"percentile_disc"===n})}_getAttributeValues(e,t,i,s){if(s.has(t))return s.get(t);const n=this.fieldsIndex.get(t),r=i.map(i=>e.getFieldValue(i,t,n));return s.set(t,r),r}_calculateUniqueValues(e,t,i){const s={},n=t.length;for(let r=0;r<n;r++){const n=t[r],a=[];for(const t of e)a.push(t[r]);const o=a.join(",");null==s[o]?s[o]={count:1,data:a,items:[n],itemPositions:[r]}:(i||s[o].count++,s[o].items.push(n),s[o].itemPositions.push(r))}return s}async _getDataValues(e,t,i=!0){const n=new f(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:r,scale:a,timeZone:o}=e;return r?n.getExpressionValues(t,r,{viewingMode:"map",scale:a,spatialReference:this.query.outSR||this.spatialReference},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},o):n.getDataValues(t,(0,s.o8)(e),i)}_calculateHistogramBins(e,t,i){if(null==t.min&&null==t.max)return[];const s=t.intervals,n=t.min??0,r=t.max??0,a=s.map(([e,t])=>({minValue:e,maxValue:t,count:0,items:[]}));for(let t=0;t<e.length;t++){const o=e[t],l=i[t];if(null!=o&&o>=n&&o<=r){const e=(0,h.Ak)(s,o);e>-1&&(a[e].count++,a[e].items.push(l))}}return a}async createQueryBinsResponse(e){const t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);const{value:i,outAlias:s,valueType:n}=t,r=[],a=[{name:s??i,alias:s??i,type:n??"esriFieldTypeString"},{name:R,alias:R,type:"esriFieldTypeInteger"}],o=new f(e,this.featureAdapter,this.fieldsIndex),l=new Map,u=[...this.items];this._sortFeatures(u,[i],(e,t,i)=>o.getFieldValue(e,t,i));const c=this._getAttributeValues(o,i,u,l),d=this._calculateUniqueValues([c],u,o.returnDistinctValues);for(const t in d){const{items:n}=d[t],o=await this._createBinsResponse(e,n);if(r.push(...o.features.map(e=>({...e,attributes:{...e.attributes,[s??i]:t}}))),o.fields)for(const e of o.fields)a.some(t=>t.name===e.name)||a.push(e)}return{fields:a,features:r}}async _createBinsResponse(e,t){const i=e.bin;switch(t=t??this.items,i.type){case"autoIntervalBin":return this._createAutoIntervalBinsResponse(F.A.fromJSON(i),e,t);case"dateBin":return this._createDateBinsResponse(_.A.fromJSON(i),e,t);case"fixedBoundariesBin":return this._createFixedBoundariesBinsResponse(w.A.fromJSON(i),e,t);case"fixedIntervalBin":return this._createFixedIntervalBinsResponse(S.A.fromJSON(i),e,t)}}async _createAutoIntervalBinsResponse(e,t,i){const{field:s,normalizationField:n,numBins:r,normalizationType:a,normalizationTotal:o,start:l,end:u}=e,c=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),d=(0,h.sU)(c,{field:s,normalizationField:n,normalizationType:a,normalizationTotal:o,numBins:r,minValue:(0,y.dO)(l,!1),maxValue:(0,y.dO)(u,!1)}),p=this._calculateHistogramBins(c,d,i);return this._createFeaturesFromHistogramBins(p,t)}async _createDateBinsResponse(e,t,i){const{field:s,interval:n,start:r,end:a,snapToData:o,returnFullIntervalBin:l}=e,u=n.unit,d=await this._getDataValues({field:e.field,timeZone:t.outTimeReference?.ianaTimeZone},i),h=(0,c.OH)(this.fieldsIndex.get(s)),p=v.g.toJSON(u),f=d.filter(Boolean).sort((e,t)=>e-t),m=null!=r?(0,y.dO)(r,h):f[0],g=null!=a?(0,y.dO)(a,h):f[f.length-1],x={zone:t.outTimeReference?.ianaTimeZone??I.n$},F=T.c9.fromMillis(m,x),_=T.c9.fromMillis(g,x),w=[];if("last"===o){let e=_;for(;e>F;){const t=e.minus({[p]:n.value});if(t<F){w.unshift([l?t.toMillis():F.toMillis(),e.toMillis()]);break}w.unshift([t.toMillis(),e.toMillis()]),e=t}}else{let e="first"===o?F:F.startOf(p);for(;e<=_;){const t=e.plus({[p]:n.value});if(t>_){w.push([e.toMillis(),l?t.toMillis():_.toMillis()]);break}w.push([e.toMillis(),t.toMillis()]),e=t}}const S=this._calculateHistogramBins(d,{intervals:w,min:m,max:g},i);return this._createFeaturesFromHistogramBins(S,t)}async _createFixedBoundariesBinsResponse(e,t,i){const{field:s}=e,n=await this._getDataValues({field:s,timeZone:t.outTimeReference?.ianaTimeZone},i),r=(0,c.OH)(this.fieldsIndex.get(s)),a=e.boundaries.map(e=>(0,y.dO)(e,r)).sort((e,t)=>e-t),o=[];for(let e=0;e<a.length-1;e++)o.push([a[e],a[e+1]]);const l={intervals:o,min:a.at(0),max:a.at(-1)},u=this._calculateHistogramBins(n,l,i);return this._createFeaturesFromHistogramBins(u,t)}async _createFixedIntervalBinsResponse(e,t,i){const{field:s,interval:n,start:r,end:a}=e,o=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),l=(0,c.OH)(this.fieldsIndex.get(s)),u=(0,h.sU)(o,{field:s,classificationMethod:"defined-interval",definedInterval:n,minValue:(0,y.dO)(r,l),maxValue:(0,y.dO)(a,l)},!0),d=this._calculateHistogramBins(o,u,i);return this._createFeaturesFromHistogramBins(d,t)}async _createFeaturesFromHistogramBins(e,t){const{upperBoundaryAlias:i,lowerBoundaryAlias:s}=t,n=s||"lowerBoundary",r=i||"upperBoundary",a=[],o=[{name:n,alias:n,type:"esriFieldTypeDouble"},{name:r,alias:r,type:"esriFieldTypeDouble"}],l=t.bin?.stackBy?.value,u=t.bin?.stackBy?.outAlias;l&&o.push({name:R,alias:R,type:"esriFieldTypeInteger"},{name:u??l,alias:u??l,type:"esriFieldTypeString"});let c=0;const d="dateBin"===t.bin.type,h=t.outTimeReference?.ianaTimeZone;for(const i of e){const{minValue:e,maxValue:s,items:p}=i,f={attributes:{}};let m;if(f.attributes[n]=d&&h&&null!=e?T.c9.fromMillis(e,{zone:h}).toISO():e,f.attributes[r]=d&&h&&null!=s?T.c9.fromMillis(s,{zone:h}).toISO():s,l?(m=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[l],orderByFields:[l]},p),f.attributes[R]=++c,"flat"===t.bin.jsonStyle?a.push(...m.features.map(({attributes:{EXPR_1:e,...t},...i})=>({...i,attributes:u??e?{...t,[u??e]:e,...f.attributes}:{...t,...f.attributes}}))):(f.stackedAttributes=m.features.map(({attributes:{EXPR_1:e,...t}})=>u??e?{...t,[u??e]:e}:t),a.push(f))):(t.bin?.splitBy&&(f.attributes[R]=++c),m=await this._createStatisticsQueryResponse(t,p,f),a.push(f)),m.fields)for(const e of m.fields)o.some(t=>t.name===e.name)||o.push(e)}return"desc"===t.binOrder&&a.reverse(),{fields:o,features:a}}}function b(e,t,i,s){const n=s.x-i.x,r=s.y-i.y,a=t.x-i.x,o=t.y-i.y,l=n*n+r*r;if(0===l)return!1;const u=a*n+o*r,c=Math.min(1,Math.max(0,u/l));return e.x=i.x+n*c,e.y=i.y+r*c,!0}function A(e,t){return e?t?4:3:t?3:2}class C{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}const z=[1]},9093:(e,t,i)=>{function s(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function n(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]]}i.d(t,{o8:()=>n,vt:()=>s,zK:()=>r});const r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:r,clone:n,create:s,fromValues:function(e,t,i,s,n,r,a,o,l,u,c,d,h,p,f,m){return[e,t,i,s,n,r,a,o,l,u,c,d,h,p,f,m]}},Symbol.toStringTag,{value:"Module"}))},11006:(e,t,i)=>{function s(e,t,i,s,r){n(e,t,i||0,s||e.length-1,r||a)}function n(e,t,i,s,a){for(;s>i;){if(s-i>600){var o=s-i+1,l=t-i+1,u=Math.log(o),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(o-c)/o)*(l-o/2<0?-1:1);n(e,t,Math.max(i,Math.floor(t-l*c/o+d)),Math.min(s,Math.floor(t+(o-l)*c/o+d)),a)}var h=e[t],p=i,f=s;for(r(e,i,t),a(e[s],h)>0&&r(e,i,s);p<f;){for(r(e,p,f),p++,f--;a(e[p],h)<0;)p++;for(;a(e[f],h)>0;)f--}0===a(e[i],h)?r(e,i,f):r(e,++f,s),f<=t&&(i=f+1),t<=f&&(s=f-1)}}function r(e,t,i){var s=e[t];e[t]=e[i],e[i]=s}function a(e,t){return e<t?-1:e>t?1:0}i.d(t,{q:()=>s})},11440:(e,t,i)=>{i.d(t,{A:()=>c});var s=i(31635),n=i(93637),r=i(10107),a=i(56507),o=(i(44208),i(87811),i(93223)),l=i(40608),u=i(41266);let c=class extends u.A{constructor(e){super(e),this.boundaries=[],this.type="fixed-boundaries"}};(0,s.Cg)([(0,r.MZ)({json:{name:"parameters.boundaries",write:{writer:function(e,t,i){(0,n.sM)(i,e&&function(e){return e[0]instanceof Date}(e)?e.map(e=>e.getTime()):e,t)}}}})],c.prototype,"boundaries",void 0),(0,s.Cg)([(0,o.e)({fixedBoundariesBin:"fixed-boundaries"},{readOnly:!0})],c.prototype,"type",void 0),c=(0,s.Cg)([(0,l.$)("esri.rest.support.FixedBoundariesBinParameters")],c),c.from=(0,a.dp)(c)},17136:(e,t,i)=>{i.d(t,{O7:()=>S,el:()=>w});var s=i(92602),n=i(49186),r=i(53966),a=i(39829),o=i(82799),l=i(80754),u=i(21325),c=i(28735),d=i(78888),h=i(65864),p=i(2272),f=i(84952),m=i(92300);const y=()=>r.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function x(e){return"polyline"===e[0].type}function F(e,t,i){if(t){const t=function(e,t){if(!(e instanceof o.A||e instanceof a.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y().error(e),new n.A("internal:geometry",e)}const i=(0,l.r8)(e),s=[];for(const e of i){const i=[];s.push(i),i.push([e[0][0],e[0][1]]);for(let s=0;s<e.length-1;s++){const n=e[s][0],r=e[s][1],a=e[s+1][0],o=e[s+1][1],l=Math.sqrt((a-n)*(a-n)+(o-r)*(o-r)),u=(o-r)/l,c=(a-n)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const s=e*t,a=c*s+n,o=u*s+r;i.push([a,o])}const e=(l+Math.floor(d-1)*t)/2,s=c*e+n,a=u*e+r;i.push([s,a])}i.push([a,o])}}return function(e){return"polygon"===e.type}(e)?new a.A({rings:s,spatialReference:e.spatialReference}):new o.A({paths:s,spatialReference:e.spatialReference})}(e,1e6);e=(0,c.ci)(t,!0)}return i&&(e=(0,l.kS)(e,i)),e}function _(e,t,i){if(Array.isArray(e)){const s=e[0];if(s>t){const i=(0,l.kd)(s,t);e[0]=s+i*(-2*t)}else if(s<i){const t=(0,l.kd)(s,i);e[0]=s+t*(-2*i)}}else{const s=e.x;if(s>t){const i=(0,l.kd)(s,t);e=e.clone().offset(i*(-2*t),0)}else if(s<i){const t=(0,l.kd)(s,i);e=e.clone().offset(t*(-2*i),0)}}return e}function v(e,t){let i=-1;for(let s=0;s<t.cutIndexes.length;s++){const n=t.cutIndexes[s],r=t.geometries[s],a=(0,l.r8)(r);for(let e=0;e<a.length;e++){const t=a[e];t.some(i=>{if(i[0]<180)return!0;{let i=0;for(let e=0;e<t.length;e++){const s=t[e][0];i=s>i?s:i}i=Number(i.toFixed(9));const s=-360*(0,l.kd)(i,180);for(let i=0;i<t.length;i++){const t=r.getPoint(e,i);r.setPoint(e,i,t.clone().offset(s,0))}return!0}})}if(n===i){if(g(e))for(const t of(0,l.r8)(r))e[n]=e[n].addRing(t);else if(x(e))for(const t of(0,l.r8)(r))e[n]=e[n].addPath(t)}else i=n,e[n]=r}return e}async function w(e,t,i){if(!Array.isArray(e))return w([e],t);t&&"string"!=typeof t&&y().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??s.A.geometryServiceUrl;let r,g,x,S,I,T,R,M,b=0;const A=[],C=[];for(const t of e)if(null!=t)if(r||(r=t.spatialReference,g=(0,u.Vp)(r),x=r.isWebMercator,T=x?102100:4326,S=l.j7[T].maxX,I=l.j7[T].minX,R=l.j7[T].plus180Line,M=l.j7[T].minus180Line),g)if("mesh"===t.type)C.push(t);else if("point"===t.type)C.push(_(t.clone(),S,I));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>_(e,S,I)),C.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);C.push(e.rings?new a.A(e):e)}else if(t.extent){const e=t.extent,i=(0,l.kd)(e.xmin,I)*(2*S);let s=0===i?t.clone():(0,l.kS)(t.clone(),i);e.offset(i,0);let{xmin:n,xmax:r}=e;n=Number(n.toFixed(9)),r=Number(r.toFixed(9)),e.intersects(R)&&r!==S?(b=r>b?r:b,s=F(s,x),A.push(s),C.push("cut")):e.intersects(M)&&n!==I?(b=r*(2*S)>b?r*(2*S):b,s=F(s,x,360),A.push(s),C.push("cut")):C.push(s)}else C.push(t.clone());else C.push(t);else C.push(t);let z=(0,l.kd)(b,S),B=-90;const N=z,G=new o.A;for(;z>0;){const e=360*z-180;G.addPath([[e,B],[e,-1*B]]),B*=-1,z--}if(A.length>0&&N>0){const t=v(A,await async function(e,t,i,s){const n=(0,p.Dl)(e),r=t[0].spatialReference,a={...s,responseType:"json",query:{...n.query,f:"json",sr:(0,u.YX)(r),target:JSON.stringify({geometryType:(0,h.$B)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},o=await(0,d.A)(n.path+"/cut",a),{cutIndexes:l,geometries:c=[]}=o.data;return{cutIndexes:l,geometries:c.map(e=>{const t=(0,h.rS)(e);return t.spatialReference=r,t})}}(n,A,G,i)),s=[],r=[];for(let i=0;i<C.length;i++){const n=C[i];if("cut"!==n)r.push(n);else{const n=t.shift(),a=e[i];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&n.rings.length>=a.rings.length?(s.push(n),r.push("simplify")):r.push(x?(0,c.Gh)(n):n)}}if(!s.length)return r;const a=await async function(e,t,i){const s="string"==typeof e?(0,f.An)(e):e,n=t[0].spatialReference,r=(0,h.$B)(t[0]),a={...i,query:{...s.query,f:"json",sr:(0,u.YX)(n),geometries:JSON.stringify((0,m.X)(t))}},{data:o}=await(0,d.A)(s.path+"/simplify",a);return(0,m.V)(o.geometries,r,n)}(n,s,i),o=[];for(let e=0;e<r.length;e++){const t=r[e];"simplify"!==t?o.push(t):o.push(x?(0,c.Gh)(a.shift()):a.shift())}return o}const E=[];for(let e=0;e<C.length;e++){const t=C[e];if("cut"!==t)E.push(t);else{const e=A.shift();E.push(!0===x?(0,c.Gh)(e):e)}}return E}function S(e,t,i){const s=(0,u.Vp)(i);if(null==s)return e;const[n,r]=s.valid,a=2*r;let o=0,l=0;t>r?o=Math.ceil(Math.abs(t-r)/a):t<n&&(o=-Math.ceil(Math.abs(t-n)/a)),e>r?l=Math.ceil(Math.abs(e-r)/a):e<n&&(l=-Math.ceil(Math.abs(e-n)/a));let c=e+(o-l)*a;const d=c-t;return d>r?c-=a:d<n&&(c+=a),c}},29441:(e,t,i)=>{i.d(t,{MG:()=>x,SN:()=>p,SY:()=>g,VW:()=>c,Wq:()=>y,eD:()=>f,j4:()=>m,vl:()=>u});var s=i(49186),n=i(44123),r=i(98453);const a=new n.WhereClauseCache(50,500),o="unsupported-query",l=" as ",u=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeBigInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong"]),c=new Set(["esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]),d=new Set(["esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...u,...c]);function h(e,t,i={}){const n=m(t,e);if(!n){const i=a.getError(t,e);throw new s.A(o,"invalid SQL expression",{expression:t,error:i})}const r=i.expressionName||"expression";if(i.validateStandardized&&!n.isStandardized)throw new s.A(o,`${r} is not standard`,{expression:t});if(i.validateAggregate&&!n.isAggregate)throw new s.A(o,`${r} does not contain a valid aggregate function`,{expression:t});return n.fieldNames}function p(e,t,i,s){if(!i)return!0;const n="where clause";return x(e,t,h(e,i,{validateStandardized:!0,expressionName:n}),{expressionName:n,query:s}),!0}function f(e,t,i,n,r){if(!i)return!0;const a="having clause",l=h(e,i,{validateAggregate:!0,expressionName:a});x(e,t,l,{expressionName:a,query:r});const u=m(i,e),c=u?.getExpressions().every(t=>{const{aggregateType:i,field:s}=t,r=e.get(s)?.name;return n.some(t=>{const{onStatisticField:s,statisticType:n}=t,a=e.get(s)?.name;return a===r&&n.toLowerCase().trim()===i})});if(!c)throw new s.A(o,"expressions in having clause should also exist in outStatistics",{having:i});return!0}function m(e,t){return e?a.get(e,t):null}function y(e){return/\((.*?)\)/.test(e)?e:e.split(l)[0]}function g(e){return e.split(l)[1]}function x(e,t,i,n={}){const r=new Map;if(function(e,t,i,s,n){const r=n.includes("*")?[...i,...n.filter(e=>"*"!==e)]:n;for(const n of r)if(t.get(n))F(e,t,i,s,n);else try{const r=h(t,y(n),{validateStandardized:!0});for(const n of r)F(e,t,i,s,n)}catch(t){e.set(n,{type:"expression-error",expression:n,error:t})}}(r,e,t,n.allowedFieldTypes??d,i),r.size){const e=n.expressionName??"expression";throw new s.A(o,`${e} contains invalid or missing fields`,{errors:Array.from(r.values()),query:n.query})}}function F(e,t,i,s,n){const a=t.get(n);a?i.has(a.name)?"all"!==s&&!1===s?.has(a.type)&&e.set(n,{type:"invalid-type",fieldName:a.name,fieldType:r.m.fromJSON(a.type),allowedFieldTypes:Array.from(s,e=>r.m.fromJSON(e))}):e.set(n,{type:"missing-field",fieldName:a.name}):e.set(n,{type:"invalid-field",fieldName:n})}},31464:(e,t,i)=>{i.d(t,{Cv:()=>y,Nk:()=>p,lK:()=>x});var s=i(4576),n=i(74887),r=i(98988),a=i(7320),o=i(21325),l=i(28735);const u=[0,0];function c(e,t){if(!t)return null;if("x"in t){const i={x:0,y:0};return[i.x,i.y]=e(t.x,t.y,u),null!=t.z&&(i.z=t.z),null!=t.m&&(i.m=t.m),i}if("xmin"in t){const i={xmin:0,ymin:0,xmax:0,ymax:0};return[i.xmin,i.ymin]=e(t.xmin,t.ymin,u),[i.xmax,i.ymax]=e(t.xmax,t.ymax,u),t.hasZ&&(i.zmin=t.zmin,i.zmax=t.zmax,i.hasZ=!0),t.hasM&&(i.mmin=t.mmin,i.mmax=t.mmax,i.hasM=!0),i}return"rings"in t?{rings:d(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:d(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:h(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:null}function d(e,t){const i=[];for(const s of e)i.push(h(s,t));return i}function h(e,t){const i=[];for(const s of e){const e=t(s[0],s[1],[0,0]);i.push(e),s.length>2&&e.push(s[2]),s.length>3&&e.push(s[3])}return i}async function p(e,t){if(!e||!t)return;const i=Array.isArray(e)?e.map(e=>null!=e.geometry?e.geometry.spatialReference:null).filter(s.Ru):[e];await(0,r.initializeProjection)(i.map(e=>({source:e,dest:t})))}const f=c.bind(null,l.je),m=c.bind(null,l.tD);function y(e,t,i,s){if(!e)return null;if(i||(i=t,t=e.spatialReference),!(0,o.fn)(t)||!(0,o.fn)(i)||(0,o.aI)(t,i))return e;if((0,l.y7)(t,i)){const t=(0,o.K8)(i)?f(e):m(e);return t.spatialReference=i,t}return(0,r.projectMany)(a.g,[e],t,i,null,s)[0]}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,i,s){if(!e?.length||!t||!i||(0,o.aI)(t,i))return e;const r={geometries:e,inSpatialReference:t,outSpatialReference:i,geographicTransformation:s,resolve:(0,n.Tw)()};return this._jobs.push(r),this._timer??=setTimeout(this._process,10),r.resolve.promise}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:i,outSpatialReference:s,resolve:n,geographicTransformation:u}=e;(0,l.y7)(i,s)?(0,o.K8)(s)?n(t.map(f)):n(t.map(m)):n((0,r.projectMany)(a.g,t,i,s,u,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function x(e,t,i,s){return g.push(e,t,i,s)}},41266:(e,t,i)=>{i.d(t,{A:()=>y});var s=i(31635),n=i(69540),r=i(66552),a=i(25482),o=i(10107),l=(i(44208),i(53966),i(87811),i(93223)),u=i(40608),c=i(56507);const d=new r.J({esriFieldTypeInteger:"integer",esriFieldTypeString:"string"});let h=class extends((0,n.O)(a.o)){constructor(e){super(e),this.alias=null,this.responseType=null,this.type=null,this.value=null,this.valueType=null}};(0,s.Cg)([(0,o.MZ)({type:String,json:{name:"outAlias",write:!0}})],h.prototype,"alias",void 0),(0,s.Cg)([(0,o.MZ)({type:String})],h.prototype,"responseType",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"type",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"value",void 0),(0,s.Cg)([(0,l.e)(d)],h.prototype,"valueType",void 0),h=(0,s.Cg)([(0,u.$)("esri.rest.support.AttributeBinsGrouping")],h);const p=h;h.from=(0,c.dp)(h);const f=new r.J({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeDate:"date",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"}),m=new r.J({naturalLog:"natural-log",squareRoot:"square-root"});let y=class extends((0,n.O)(a.o)){constructor(e){super(e),this.expression=null,this.expressionValueType=null,this.field=null,this.firstDayOfWeek=null,this.hideUpperBound=null,this.splitBy=null,this.stackBy=null,this.transformation=null}};(0,s.Cg)([(0,o.MZ)({type:String,json:{name:"onExpression.value",write:!0}})],y.prototype,"expression",void 0),(0,s.Cg)([(0,l.e)(f,{name:"onExpression.valueType"})],y.prototype,"expressionValueType",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{name:"onField",write:!0}})],y.prototype,"field",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],y.prototype,"firstDayOfWeek",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],y.prototype,"hideUpperBound",void 0),(0,s.Cg)([(0,o.MZ)({type:p,json:{write:{overridePolicy(){return{enabled:null!=this.splitBy?.value||null!=this.splitBy?.type}}}}})],y.prototype,"splitBy",void 0),(0,s.Cg)([(0,o.MZ)({type:p,json:{write:{target:{stackBy:{type:p},jsonStyle:{type:String}},writer:(e,t)=>{e&&(t.stackBy=e.toJSON(),null!=e.responseType&&(t.jsonStyle=e.responseType))},overridePolicy(){return{enabled:null!=this.stackBy?.value||null!=this.stackBy?.type}}},read:{source:["stackBy","jsonStyle"],reader:(e,t)=>p.fromJSON({...t.stackBy,responseType:t.jsonStyle})}}})],y.prototype,"stackBy",void 0),(0,s.Cg)([(0,l.e)(m)],y.prototype,"transformation",void 0),y=(0,s.Cg)([(0,u.$)("esri.rest.support.BinParametersBase")],y)},41366:(e,t,i)=>{i.d(t,{K:()=>h,Q:()=>u});var s=i(31635),n=i(66552),r=i(53966),a=i(10107),o=(i(44208),i(87811),i(93223)),l=i(40608);const u=(0,n.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",d="field",h=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,i=null!=this.normalizationTotal;return t||i?(e=t&&d||i&&c||null,t&&i&&r.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==d&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,s.Cg)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],i.prototype,"normalizationField",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],i.prototype,"normalizationMaxValue",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],i.prototype,"normalizationMinValue",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],i.prototype,"normalizationTotal",void 0),(0,s.Cg)([(0,o.e)(u,{name:"parameters.normalizationType"})],i.prototype,"normalizationType",null),i=(0,s.Cg)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],i),i}},44123:(e,t,i)=>{i.r(t),i.d(t,{WhereClauseCache:()=>r});var s=i(66344),n=i(88368);class r{constructor(e,t){this._cache=new s.q(e),this._invalidCache=new s.q(t)}get(e,t){const i=`${t?.uid}:${e}`,s=this._cache.get(i);if(s)return s;if(null!=this._invalidCache.get(i))return null;try{const s=n.A.create(e,{fieldsIndex:t});return this._cache.put(i,s),s}catch(e){return this._invalidCache.put(i,e),null}}getError(e,t){const i=`${t?.uid}:${e}`;return this._invalidCache.get(i)??null}}},44794:(e,t,i)=>{i.d(t,{v:()=>o});var s=i(4718),n=i(62788),r=i(95488);class a{constructor(e,t){this._observable=new r.I,this._value=e,this._equalityFunction=t}get value(){return(0,n.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function o(e,t=s.gh){return new a(e,t)}},51441:(e,t,i)=>{i.d(t,{LQ:()=>u,ag:()=>d,pL:()=>c});var s=i(90708),n=i(92722);const r=new n.A,a=new n.A,o=new n.A,l={esriGeometryPoint:s.DF,esriGeometryPolyline:s.BW,esriGeometryPolygon:s.z5,esriGeometryMultipoint:s.qK};function u(e,t,i,n=e.hasZ,r=e.hasM){if(null==t)return null;const a=e.hasZ&&n,l=e.hasM&&r;if(i){const u=(0,s.Nl)(o,t,e.hasZ,e.hasM,"esriGeometryPoint",i,n,r);return(0,s.DF)(u,a,l)}return(0,s.DF)(t,a,l)}function c(e,t,i,n,u,c,d=t,h=i){const p=t&&d,f=i&&h,m=null!=n?"coords"in n?n:n.geometry:null;if(null==m)return null;if(u){let n=(0,s.kz)(a,m,t,i,e,u,d,h);return c&&(n=(0,s.Nl)(o,n,p,f,e,c)),l[e]?.(n,p,f)??null}if(c){const n=(0,s.Nl)(o,m,t,i,e,c,d,h);return l[e]?.(n,p,f)??null}return(0,s.Q4)(r,m,t,i,d,h),l[e]?.(r,p,f)??null}function d(e){return e&&h in e?JSON.parse(JSON.stringify(e,p)):e}const h="_geVersion",p=(e,t)=>e===h?void 0:t},54339:(e,t,i)=>{function s(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const i=[];for(const s of t.fieldNames)i.push(e.attributes[s]??null);return JSON.stringify(i)}}}function n(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const i=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(i)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}i.d(t,{W:()=>s,r:()=>n})},56390:(e,t,i)=>{i.d(t,{do:()=>L,Wc:()=>$});var s=i(4576),n=i(21818),r=i(49186),a=(i(44208),i(4718)),o=i(97768),l=i(74887),u=i(83047),c=i(12195),d=i(98988),h=i(70328),p=i(19419),f=i(537),m=i(65864),y=i(17136),g=i(21325),x=i(90708),F=i(29441),_=i(51441),v=i(31464);class w{constructor(){this._storage=new Map,this._purgeInterval=5,this._sweep=()=>{if(this._timer=void 0,!this._storage)return;const e=1e3*this._purgeInterval,t=performance.now()-e;for(const[i,s]of this._storage){if(!(s.time<t))return void(this._storage.size>0&&(this._timer=setTimeout(this._sweep,e)));this._storage.delete(i)}}}destroy(){this._storage?.clear(),this._storage=null,clearTimeout(this._timer)}put(e,t){this._storage?.set(e,new I(t)),this._scheduleSweep()}get(e){const t=this._storage?.get(e);if(t)return this._storage?.delete(e),t.time=performance.now(),this._storage?.set(e,t),t.items}clear(){this._storage?.clear()}_scheduleSweep(){this._storage&&(this._timer??=setTimeout(this._sweep,1e3*this._purgeInterval))}get test(){}}let S=0;class I{constructor(e){this.items=e,this.time=performance.now(),this.id=S++}}var T=i(99352),R=i(8384),M=i(58727),b=i(62660),A=i(43668);const C="unsupported-query";async function z(e,{fieldsIndex:t,geometryType:i,spatialReference:s,availableFields:n}){if(null!=e.geometryPrecision||e.multipatchOption&&"xyFootprint"!==e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new r.A(C,"Unsupported query options",{query:e});return B(t,n,e),function(e,t,i){const{outStatistics:s,groupByFieldsForStatistics:n,having:a}=i,o=n?.length,l=s?.length;if(a){if(!o||!l)throw new r.A(C,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:i});(0,F.eD)(e,t,a,s,i)}if(l){if(null==(u=s)||!u.every(e=>"exceedslimit"!==e.statisticType))return;const a=s.map(e=>e.onStatisticField).filter(Boolean);(0,F.MG)(e,t,a,{expressionName:"onStatisticFields",query:i}),o&&(0,F.MG)(e,t,n,{expressionName:"groupByFieldsForStatistics",query:i});for(const n of s){const{onStatisticField:s,statisticType:a}=n;if("percentile_disc"!==a&&"percentile_cont"!==a||!("statisticParameters"in n))e.get(s)&&"count"!==a&&"min"!==a&&"max"!==a&&(0,F.MG)(e,t,[s],{expressionName:`outStatistics with '${a}' statistic type`,allowedFieldTypes:N,query:i});else{const{statisticParameters:e}=n;if(!e)throw new r.A(C,"statisticParameters should be set for percentile type",{definition:n,query:i})}}}var u}(t,n,e),Promise.all([(0,b.c0)(e,i,s),(0,v.Nk)(s,e.outSR)]).then(()=>e)}function B(e,t,i){const{returnDistinctValues:s,outStatistics:n}=i,a=n?n.map(e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase()).filter(Boolean):[];if("orderByFields"in i&&i.orderByFields&&i.orderByFields.length>0){const s=" asc",n=" desc",r=i.orderByFields.map(e=>{const t=e.toLowerCase();return t.includes(s)?t.split(s)[0]:t.includes(n)?t.split(n)[0]:e}).filter(e=>!a.includes(e));(0,F.MG)(e,t,r,{expressionName:"orderByFields",query:i})}if("outFields"in i)if(i.outFields?.length)(0,F.MG)(e,t,i.outFields,{expressionName:"outFields",query:i,allowedFieldTypes:"all"});else if(s)throw new r.A(C,"outFields should be specified for returnDistinctValues",{query:i});(0,F.SN)(e,t,i.where,i)}const N=new Set([...F.vl,...F.VW]);async function G(e,t,i,s){let n=[];if(i.valueExpression){const{arcadeUtils:e}=await(0,A.l)();n=e.extractFieldNames(i.valueExpression)}if(i.field&&n.push(i.field),i.field2&&n.push(i.field2),i.field3&&n.push(i.field3),i.normalizationField&&n.push(i.normalizationField),!n.length&&!i.valueExpression)throw new r.A(C,"field or valueExpression is required",{params:i});(0,F.MG)(e,t,n,{expressionName:"statistics",query:s})}var E=i(86420),q=i(95466),O=(i(53966),i(36708),i(44794),i(78659)),D=i(31635),P=i(65008),Z=i(10107),V=(i(87811),i(40608));let Q=class extends P.A{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,D.Cg)([(0,Z.MZ)()],Q.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,D.Cg)([(0,Z.MZ)()],Q.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),Q=(0,D.Cg)([(0,V.$)("esri.views.support.debugFlags")],Q),new Q,Symbol("Yield");new Map([["immediate",0],["schedule",4],["slide",0],["stream loader",0],["elevation query",0],["terrain",1],["surface geometry updates",1],["LoD renderer",2],["Graphics3D",2],["I3S",2],["point cloud",2],["feature fetcher",2],["stream controller",2],["clouds generator",2],["overlay",4],["overlay renderer",4],["stage",4],["graphics deconflictor",4],["Graphics3D filter visibility",4],["Graphics3D scale visibility",4],["Graphics3D frustum visibility",4],["POI frequent",6],["POI infrequent",30],["labeler",8],["feature query",8],["feature tile tree",16],["fast feature tile tree",0],["elevation alignment",12],["elevation alignment scene",14],["text texture atlas",12],["texture unload",12],["line of sight tool",16],["interactive line of sight tool",0],["snapping",0],["shadow accumulator",30],["flow generator",12],["mapview fetch queue",0],["mapview layerview update",2],["mapview vector tile parsing queue",0]]),(0,O.l5)(6.5),(0,O.l5)(1),(0,O.l5)(30),(0,O.l5)(1e3/30),(0,O.l5)(100);const j=new class{constructor(){this._begin=performance?.now()??0,this._budget=0,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e){this._begin=this.now(),this._budget=e,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}};j.enabled=!1;const k=new class{remove(){}processQueue(){}schedule(e,t,i){try{if((0,l.G4)(t)){const e=(0,l.NK)();return i?Promise.resolve(i(e)):Promise.reject(e)}return(0,l.z7)(e(j))}catch(e){return Promise.reject(e)}}reschedule(e,t,i){return this.schedule(e,t,i)}async scheduleGenerator(e,t,i){if((0,l.G4)(t)){const e=(0,l.NK)();if(i)return i(e);throw e}const s=e(j);for(;;){const e=s.next(j),n=(0,l.$X)(e)?await e:e;if((0,l.G4)(t)){const e=(0,l.NK)();if(i){const t=i(e);return s.return(null),t}throw s.throw(e),e}if(n.done)return n.value}}};class L{constructor(e){this._changeHandle=null,this.capabilities={query:T.F},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._cache=e.cache??new w,this.timeInfo=e.timeInfo,this.featureIdInfo=e.featureIdInfo,"object-id"===e.featureIdInfo.type&&(this.objectIdField=e.featureIdInfo.fieldName),this._changeHandle=this.featureStore.events.on("changed",()=>this._clearCache()),this.fieldsIndex=(0,c.W)(e.fieldsIndex)?e.fieldsIndex:q.A.fromJSON(e.fieldsIndex),!e.availableFields||1===e.availableFields.length&&"*"===e.availableFields[0]?this.availableFields=new Set(this.fieldsIndex.fields.map(e=>e.name)):this.availableFields=new Set(e.availableFields.map(e=>this.fieldsIndex.get(e)?.name).filter(e=>null!=e)),e.scheduler&&e.priority?this._frameTask=e.scheduler.registerTask(e.priority):this._frameTask=k}destroy(){this._changeHandle=(0,o.xt)(this._changeHandle),this._frameTask=(0,o.xt)(this._frameTask),this._clearCache(),(0,o.pR)(this._cache)}get featureAdapter(){return this.featureStore.featureAdapter}async executeQuery(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryFeatureSet(e),i)}async executeQueryForCount(e={},t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForCount(e),i)}async executeQueryForExtent(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForExtent(e),i)}async executeQueryForIds(e,t){return Array.from(await this.executeQueryForIdSet(e,t))}async executeQueryForIdSet(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForIdSet(e),i)}async executeQueryForLatestObservations(e,t){const i=(0,l.Mq)(t);if(!this.timeInfo?.trackIdField)throw new r.A("unsupported-query","Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});return await this._frameTask.scheduleGenerator(()=>this._executeQueryForLatestObservations(e),i)}async executeQueryForOpaqueFeatures(e,t){const i=(0,l.Mq)(t);return(await this._frameTask.scheduleGenerator(()=>this._executeQuery(e,{}),i)).items}async executeAttributeBinsQuery(e,t){const i=(0,l.Mq)(t);return e=(0,a.o8)(e),await this._frameTask.scheduleGenerator(()=>this._executeAttributeBinsQuery(e),i)}async executeQueryForSummaryStatistics(e={},t,i){const s=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSummaryStatistics(e,t),s)}async executeQueryForUniqueValues(e={},t,i){const s=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForUniqueValues(e,t),s)}async executeQueryForClassBreaks(e={},t,i){const s=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForClassBreaks(e,t),s)}async executeQueryForHistogram(e={},t,i){const s=(0,l.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForHistogram(e,t),s)}async executeQueryForSnapping(e,t){const i=(0,l.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSnapping(e,i),i)}async fetchRecomputedExtents(e){const t=(0,l.Mq)(e);this._timeExtentPromise||=(0,E.W)(this.timeInfo,this.featureStore);const[i,s]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return(0,l.Te)(t),{fullExtent:i,timeExtent:s}}_clearCache(){this._cache.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async*_executeQueryFeatureSet(e){try{const t=yield*this._executeQuery(e,{});return yield,await t.createQueryResponse()}catch(t){if(t!==M.v8)throw t;return await new R.G([],e,this).createQueryResponse()}}async*_executeQueryForCount(e){try{const t=yield*this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null});return yield,t.createQueryResponseForCount()}catch(e){if(e!==M.v8)throw e;return 0}}async*_executeQueryForExtent(e){const t=e.outSR;try{const i=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;const s=i.size;if(!s)return{count:0,extent:null};const n=await this._getBounds(i.items,i.spatialReference,t??this.spatialReference);return yield,{count:s,extent:n}}catch(e){if(e===M.v8)return{count:0,extent:null};throw e}}async*_executeQueryForIdSet(e){try{const t=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;const i=t.items,s=new Set;for(const e of i)s.add(t.featureAdapter.getObjectId(e));return s}catch(e){if(e===M.v8)return new Set;throw e}}async*_executeQueryForLatestObservations(e){try{const t=yield*this._executeQuery(e,{});return yield,this._filterLatest(t),yield,await t.createQueryResponse()}catch(t){if(t!==M.v8)throw t;return await new R.G([],e,this).createQueryResponse()}}async*_executeAttributeBinsQuery(e){let t;try{e=await(0,M.iJ)(e,this.definitionExpression,this.spatialReference),yield,e=await async function(e,t){const i=e.bin;if(!i.onField&&!i.onExpression?.value||"autoIntervalBin"===i.type&&null==i.parameters.numberOfBins||"dateBin"===i.type&&(null==i.parameters.number||null==i.parameters.unit)||"fixedBoundariesBin"===i.type&&null==i.parameters.boundaries||"fixedIntervalBin"===i.type&&null==i.parameters.interval)throw new r.A(C,"Unsupported query options",{query:e});return z(e,t)}(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const i=yield*this._executeSceneFilterQuery(e);yield,t=yield*this._executeGeometryQuery(e,i),yield,this._executeAggregateIdsQuery(t),yield,this._executeObjectIdsQuery(t),yield,this._executeTimeQuery(t),yield,this._executeAttributesQuery(t),yield}catch(i){if(i!==M.v8)throw i;t=new R.G([],e,this)}return await t.createQueryBinsResponse(e)}async*_executeQueryForSummaryStatistics(e={},t){const{field:i,normalizationField:s,valueExpression:n}=t,r=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:s,valueExpression:n});return yield,await r.createSummaryStatisticsResponse(t)}async*_executeQueryForUniqueValues(e={},t){const{field:i,field2:s,field3:n,valueExpression:r}=t,a=yield*this._executeQueryForStatistics(e,{field:i,field2:s,field3:n,valueExpression:r});return yield,await a.createUniqueValuesResponse(t)}async*_executeQueryForClassBreaks(e,t){const{field:i,normalizationField:s,valueExpression:n}=t,r=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:s,valueExpression:n});return yield,await r.createClassBreaksResponse(t)}async*_executeQueryForHistogram(e,t){const{field:i,normalizationField:s,valueExpression:n}=t,r=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:s,valueExpression:n});return yield,await r.createHistogramResponse(t)}async*_executeQueryForSnapping(e,t){const{point:i,distance:s,returnEdge:n,vertexMode:r}=e;if(!n&&"none"===r)return{candidates:[]};let o=(0,a.o8)(e.query);o=await(0,M.T2)(o,this.definitionExpression,this.spatialReference),yield,o=await z(o,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const l=!(0,g.aI)(i.spatialReference,this.spatialReference);l&&(await(0,v.Nk)(i.spatialReference,this.spatialReference),yield);const u="number"==typeof s?s:s.x,c="number"==typeof s?s:s.y,d={xmin:i.x-u,xmax:i.x+u,ymin:i.y-c,ymax:i.y+c,spatialReference:i.spatialReference},h=l?(0,v.Cv)(d,this.spatialReference):d;if(!h)return{candidates:[]};const p=(await(0,y.el)((0,m.rS)(i),null,{signal:t}))[0];yield;const f=(await(0,y.el)((0,m.rS)(h),null,{signal:t}))[0];if(yield,null==p||null==f)return{candidates:[]};const x=await this._searchFeatures(H(f.toJSON()));yield;const F=new R.G(x,o,this);this._executeObjectIdsQuery(F),yield,this._executeTimeQuery(F),yield,this._executeAttributesQuery(F),yield,yield*this._executeGeometryQueryForSnapping(F),yield;const _=p.toJSON(),w=l?(0,v.Cv)(_,this.spatialReference):_,S=l?Math.max(h.xmax-h.xmin,h.ymax-h.ymin)/2:s;return F.createSnappingResponse({...e,point:w,distance:S},o.returnZ,i.spatialReference)}async _getBounds(e,t,i){const s=(0,h.hZ)((0,h.vt)(),h.qv);return await this.featureStore.forEachBounds(e,e=>(0,h.RF)(s,e)),$(s,t,i,this.spatialReference,this.hasZ)}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then(e=>this._getBounds(e,this.spatialReference,this.spatialReference)),this._fullExtentPromise}async _getAllFeaturesQueryEngineResult(e){return new R.G(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>await this.featureStore.forEach(t=>e.push(t)))().then(()=>(0,n.zI)(e))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async*_executeQuery(e,t){e=(0,a.o8)(e),e=await(0,M.GC)(e,this.definitionExpression,this.spatialReference),yield,e=await z(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield,e={...e,...t};const i=yield*this._executeSceneFilterQuery(e);yield;const s=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(s),yield,this._executeObjectIdsQuery(s),yield,this._executeTimeQuery(s),yield,this._executeAttributesQuery(s),s}async*_executeSceneFilterQuery(e){if(null==e.sceneFilter)return null;const{outSR:t,returnGeometry:i,returnCentroid:s}=e,n=this.featureStore.featureSpatialReference,r=e.sceneFilter.geometry,a=null==n||(0,g.aI)(n,r.spatialReference)?r:(0,v.Cv)(r,n);if(!a)return null;const o=i||s,l=(0,g.fn)(t)&&!(0,g.aI)(this.spatialReference,t)&&o?async e=>this._project(e,t):e=>e;yield;const u=this.featureAdapter,c=await this._searchFeatures(H(a));if(yield,"disjoint"===e.sceneFilter.spatialRelationship){if(!c.length)return null;const t=new Set;for(const e of c)t.add(u.getObjectId(e));const i=await this._getAllFeatures();yield;const s=await(0,b.xt)("esriSpatialRelDisjoint",a,this.geometryType,this.hasZ,this.hasM);yield;const n=e=>!t.has(u.getObjectId(e))||s(u.getGeometry(e)),r=yield*this._runSpatialFilter(i,n);yield;const o=new R.G(r,e,this);return await l(o)}if(!c.length)return new R.G([],e,this);if(this._canExecuteSinglePass(a,e))return await l(new R.G(c,e,this));const d=await(0,b.xt)("esriSpatialRelContains",a,this.geometryType,this.hasZ,this.hasM);yield;const h=yield*this._runSpatialFilter(c,e=>d(u.getGeometry(e)));return yield,await l(new R.G(h,e,this))}async*_executeGeometryQuery(e,t){if(null!=t&&0===t.items.length)return t;const{geometry:i,outSR:n,returnGeometry:r,returnCentroid:a}=e,o=t?null:this._getCacheKey(e),l=o?this._cache.get(o):null;if(l)return new R.G(l,e,this);const u=(0,g.fn)(n)&&!(0,g.aI)(this.spatialReference,n),c=r||a,d=async e=>(u&&c&&await this._project(e,n),o&&this._cache.put(o,e.items),e),h=this.featureStore.featureSpatialReference,p=!i||null==h||(0,g.aI)(h,i.spatialReference)?i:(0,v.Cv)(i,h);if(!p)return await d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));yield;const f=this.featureAdapter;let m=await this._searchFeatures(H(i));yield;const y=e.spatialRel??"esriSpatialRelIntersects";if("esriSpatialRelDisjoint"===y){if(!m.length)return await d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const i=new Set;for(const e of m)i.add(f.getObjectId(e));let s;null!=t?s=t.items:(yield,s=await this._getAllFeatures(),yield);const n=await(0,b.xt)(y,p,this.geometryType,this.hasZ,this.hasM);yield;const r=e=>!i.has(f.getObjectId(e))||n(f.getGeometry(e)),a=yield*this._runSpatialFilter(s,r);yield;const o=new R.G(a,e,this);return await d(o)}if(null!=t){const e=new s.vW;m=m.filter(i=>(0,s.qh)(t.items,i,t.items.length,e)>=0)}if(!m.length){const t=new R.G([],e,this);return o&&this._cache.put(o,t.items),t}if(this._canExecuteSinglePass(p,e))return await d(new R.G(m,e,this));const x=await(0,b.xt)(y,p,this.geometryType,this.hasZ,this.hasM);yield;const F=yield*this._runSpatialFilter(m,e=>x(f.getGeometry(e)));return yield,await d(new R.G(F,e,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const i of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(i).forEach(e=>t.add(e));const i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeTimeQuery(e){if(0===e.items.length)return;const t=(0,E.I)(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(0===e.items.length)return;const t=(0,F.j4)(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter(e=>t.testFeature(e,this.featureAdapter))}}async*_executeGeometryQueryForSnapping(e){const{query:t}=e,{spatialRel:i}=t;if(!e?.items?.length||!t.geometry||!i)return;const s=await(0,b.xt)(i,t.geometry,this.geometryType,this.hasZ,this.hasM);yield;const n=this.featureAdapter,r=yield*this._runSpatialFilter(e.items,e=>s(n.getGeometry(e)));e.items=r}*_runSpatialFilter(e,t){if(!t)return e;if(null==this._frameTask)return e.filter(e=>t(e));let i=yield;const s=new Array;for(const n of e)t(n)&&s.push(n),i.madeProgress(),i.done&&(i=yield);return s}_filterLatest(e){const{trackIdField:t,startTimeField:i,endTimeField:s}=this.timeInfo,n=s||i,r=new Map,a=this.featureAdapter.getAttribute;for(const i of e.items){const e=a(i,t),s=a(i,n),o=r.get(e);(!o||s>a(o,n))&&r.set(e,i)}e.items=Array.from(r.values())}_getCacheKey(e){const{geometry:t,spatialRel:i,returnGeometry:s,returnCentroid:n,outSR:r,resultType:a,cacheHint:o}=e;if("tile"!==a&&!o)return null;const l=s||n;return(0,g.fn)(r)&&!(0,g.aI)(this.spatialReference,r)&&l?JSON.stringify([t,i,r]):JSON.stringify([t,i])}_canExecuteSinglePass(e,t){const{spatialRel:i}=t;return(0,b.tC)(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i))}async _project(e,t){if(!t||(0,g.aI)(this.spatialReference,t))return e;const i=this.featureAdapter;let s;try{const e=await this._getFullExtent();s=(0,d.getTransformation)(this.spatialReference,t,e)}catch{}const r=await(0,v.lK)(e.items.map(e=>(0,_.pL)(this.geometryType,this.hasZ,this.hasM,i.getGeometry(e))),this.spatialReference,t,s);return e.items=(0,n.zI)(r.map((t,s)=>i.cloneWithGeometry(e.items[s],(0,x.Ux)(t,this.hasZ,this.hasM)))),e}async _searchFeatures(e){const t=new Set;await Promise.all(e.map(e=>this.featureStore.forEachInBounds(e,e=>t.add(e))));const i=Array.from(t.values());return t.clear(),i}async*_executeQueryForStatistics(e,t){e=(0,a.o8)(e);try{e=await(0,M.GC)(e,this.definitionExpression,this.spatialReference),yield,e=await async function(e,t,{fieldsIndex:i,geometryType:s,spatialReference:n,availableFields:a}){if(null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new r.A(C,"Unsupported query options",{query:e});return B(i,a,e),Promise.all([G(i,a,t,e),(0,b.c0)(e,s,n),(0,v.Nk)(n,e.outSR)]).then(()=>e)}(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const i=yield*this._executeSceneFilterQuery(e);yield;const s=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(s),yield,this._executeObjectIdsQuery(s),yield,this._executeTimeQuery(s),yield,this._executeAttributesQuery(s),yield,s}catch(t){if(t!==M.v8)throw t;return new R.G([],e,this)}}get test(){}}function H(e){if((0,b.tC)(e)){if((0,m.ZC)(e))return[(0,p.fA)(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if((0,m.Bi)(e))return e.rings.map(e=>(0,p.fA)(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1])))}return[(0,f.Rg)((0,p.vt)(),e)]}function $(e,t,i,s,n){const r={xmin:e[0],ymin:e[1],xmax:e[3],ymax:e[4],spatialReference:(0,_.ag)(s)};n&&isFinite(e[2])&&isFinite(e[5])&&(r.zmin=e[2],r.zmax=e[5],r.hasZ=!0);const a=(0,v.Cv)(r,t,i);if(a.spatialReference=(0,_.ag)(i),a.xmax-a.xmin===0){const e=(0,u.GA)(a.spatialReference);a.xmin-=e,a.xmax+=e}if(a.ymax-a.ymin===0){const e=(0,u.GA)(a.spatialReference);a.ymin-=e,a.ymax+=e}if(n&&null!=a.zmin&&null!=a.zmax&&a.zmax-a.zmin===0){const e=(0,u.GA)(a.spatialReference);a.zmin-=e,a.zmax+=e}return a}},57231:(e,t,i)=>{i.d(t,{g:()=>s});const s=(0,i(66552).O)()({year:"years",quarter:"quarters",month:"months",week:"weeks",day:"days",hour:"hours",minute:"minutes",second:"seconds"})},58727:(e,t,i)=>{i.d(t,{GC:()=>y,T2:()=>g,VY:()=>h,dO:()=>F,iJ:()=>m,v8:()=>p});var s=i(49186),n=i(66552),r=i(83047),a=i(98988),o=i(90634),l=i(65864),u=i(17136),c=i(21325),d=i(31464);const h=new n.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),p=Object.freeze({}),f="frequency";async function m(e,t,i){const s=e.bin;return s.onField&&(s.onField=s.onField.trim()),s.onExpression?.value&&(s.onExpression.value=s.onExpression.value.trim()),s.splitBy&&(s.splitBy.value&&(s.splitBy.value=s.splitBy.value.trim()),s.splitBy.outAlias&&(s.splitBy.outAlias=s.splitBy.outAlias.trim())),s.stackBy&&(s.stackBy.value&&(s.stackBy.value=s.stackBy.value.trim()),s.stackBy.outAlias&&(s.stackBy.outAlias=s.stackBy.outAlias.trim())),"normalizationField"in s.parameters&&s.parameters.normalizationField&&(s.parameters.normalizationField=s.parameters.normalizationField.trim()),e.outStatistics?.length||(e.outStatistics=[{statisticType:"count",onStatisticField:"1",outStatisticFieldName:f}]),y(e,t,i)}async function y(e,t,i){const{outFields:s,orderByFields:n,groupByFieldsForStatistics:r,outStatistics:a}=e;if(s)for(let e=0;e<s.length;e++)s[e]=s[e].trim();if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(a)for(let e=0;e<a.length;e++)a[e].onStatisticField&&(a[e].onStatisticField=a[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),g(e,t,i)}async function g(e,t,n){if(!e)return null;let{where:a}=e;if(e.where=a=a?.trim(),(!a||/^1 *= *1$/.test(a)||t&&t===a)&&(e.where=null),!e.geometry)return e;let f=await async function(e){const{distance:t,units:n}=e,a=e.geometry;if(null==t||"vertexAttributes"in a)return a;const o=a.spatialReference,u=n?h.fromJSON(n):(0,r.Ij)(o),p=o&&((0,c.EA)(o)||(0,c.K8)(o))?a:await(0,d.Nk)(o,c.KK).then(()=>(0,d.Cv)(a,c.KK)),f=await i.e(9159).then(i.bind(i,49159));await f.load();const m=f.execute(p,t||1,{unit:u})??void 0;if(!m||!(0,l.Bi)(m)||0===m.rings.length)throw new s.A("unsupported-query:invalid-parameters","Invalid parameters for query by distance");return m}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;f=(0,o.HA)(f),f.spatialReference=t}if(f){await(0,d.Nk)(f.spatialReference,n),f=function(e,t){const i=e.spatialReference;return x(e,t)&&(0,l.ZC)(e)?{spatialReference:i,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}:e}(f,n);const t=(await(0,u.el)((0,l.rS)(f)))[0];if(null==t)throw p;const i="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,s=i&&x(f,n)?{densificationStep:8*i}:void 0,r=t.toJSON(),a=(0,d.Cv)(r,r.spatialReference,n,s);if(!a)throw p;a.spatialReference=n,e.geometry=a}return e}function x(e,t){if(!e)return!1;const i=e.spatialReference;return((0,l.ZC)(e)||(0,l.Bi)(e)||(0,l.Rg)(e))&&!(0,c.aI)(i,t)&&!(0,a.canProjectWithoutEngine)(i,t)}function F(e,t){return null==e?null:"string"==typeof e?t?new Date(`1970-01-01T${e}Z`).getTime():new Date(e).getTime():e instanceof Date?e.getTime():e}},59977:(e,t,i)=>{i.d(t,{A:()=>g});var s=i(31635),n=i(93637),r=i(10107),a=i(56507),o=(i(44208),i(87811),i(93223)),l=i(40608),u=i(41266),c=i(69540),d=i(25482),h=i(57231);let p=class extends((0,c.O)(d.o)){constructor(e){super(e),this.value=null,this.unit=null}};(0,s.Cg)([(0,r.MZ)({type:Number,json:{name:"number",write:!0}})],p.prototype,"value",void 0),(0,s.Cg)([(0,o.e)(h.g)],p.prototype,"unit",void 0),p=(0,s.Cg)([(0,l.$)("esri.rest.support.DateBinTimeInterval")],p);const f=p;function m(e,t,i){(0,n.sM)(i,"string"==typeof e?e:e?.getTime(),t)}function y(e,t){const i=e.parameters[t];return i?"string"==typeof i?i:new Date(i):null}p.from=(0,a.dp)(p);let g=class extends u.A{constructor(e){super(e),this.end=null,this.interval=null,this.offset=null,this.returnFullIntervalBin=!1,this.start=null,this.snapToData=null,this.type="date"}};(0,s.Cg)([(0,r.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.end",read:{reader:(e,t)=>y(t,"end")},write:{writer:m}}})],g.prototype,"end",void 0),(0,s.Cg)([(0,r.MZ)({type:f,json:{name:"parameters",write:!0}})],g.prototype,"interval",void 0),(0,s.Cg)([(0,r.MZ)({type:f,json:{name:"parameters.offset",write:!0}})],g.prototype,"offset",void 0),(0,s.Cg)([(0,r.MZ)({type:Boolean,json:{name:"parameters.returnFullIntervalBin",write:!0}})],g.prototype,"returnFullIntervalBin",void 0),(0,s.Cg)([(0,r.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.start",read:{reader:(e,t)=>y(t,"start")},write:{writer:m}}})],g.prototype,"start",void 0),(0,s.Cg)([(0,r.MZ)({type:String,json:{name:"parameters.snapToData",write:!0}})],g.prototype,"snapToData",void 0),(0,s.Cg)([(0,o.e)({dateBin:"date"},{readOnly:!0})],g.prototype,"type",void 0),g=(0,s.Cg)([(0,l.$)("esri.rest.support.DateBinParameters")],g),g.from=(0,a.dp)(g)},60909:(e,t,i)=>{i.d(t,{A:()=>h});var s=i(31635),n=i(93637),r=i(10107),a=i(56507),o=(i(44208),i(87811),i(93223)),l=i(40608),u=i(41266),c=i(41366);function d(e,t,i){(0,n.sM)(i,e instanceof Date?e.getTime():e,t)}let h=class extends((0,c.K)(u.A)){constructor(e){super(e),this.end=null,this.interval=null,this.start=null,this.type="fixed-interval"}};(0,s.Cg)([(0,r.MZ)({json:{name:"parameters.end",write:{writer:d}}})],h.prototype,"end",void 0),(0,s.Cg)([(0,r.MZ)({type:Number,json:{name:"parameters.interval",write:!0}})],h.prototype,"interval",void 0),(0,s.Cg)([(0,r.MZ)({json:{name:"parameters.start",write:{writer:d}}})],h.prototype,"start",void 0),(0,s.Cg)([(0,o.e)({fixedIntervalBin:"fixed-interval"},{readOnly:!0})],h.prototype,"type",void 0),h=(0,s.Cg)([(0,l.$)("esri.rest.support.FixedIntervalBinParameters")],h),h.from=(0,a.dp)(h)},62660:(e,t,i)=>{i.d(t,{tC:()=>v,c0:()=>_,xt:()=>F});var s=i(49186),n=i(94078),r=i(12176),a=i(65864),o=i(21325);function l(e,t){return e?t?4:3:t?3:2}function u(e,t,i,s,n,r){const a=l(n,r),{coords:o,lengths:u}=s;if(!u)return!1;for(let s=0,n=0;s<u.length;s++,n+=a)if(!c(e,t,i,o[n],o[n+1]))return!1;return!0}function c(e,t,i,s,n){if(!e)return!1;const r=l(t,i),{coords:a,lengths:o}=e;let u=!1,c=0;for(const e of o)u=d(u,a,r,c,e,s,n),c+=e*r;return u}function d(e,t,i,s,n,r,a){let o=e,l=s;for(let e=s,u=s+n*i;e<u;e+=i){l=e+i,l===u&&(l=s);const n=t[e],c=t[e+1],d=t[l],h=t[l+1];(c<a&&h>=a||h<a&&c>=a)&&n+(a-c)/(h-c)*(d-n)<r&&(o=!o)}return o}var h=i(90708),p=i(92722),f=i(51441),m=i(31464);const y="unsupported-query",g={spatialRelationship:{esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},queryGeometry:{esriGeometryPoint:!0,esriGeometryMultiPatch:!1,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},layerGeometry:{esriGeometryPoint:!0,esriGeometryMultiPatch:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1}},x={esriSpatialRelIntersects:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(7360)]).then(i.bind(i,55284)),esriSpatialRelContains:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(1867)]).then(i.bind(i,29127)),esriSpatialRelCrosses:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(9700)]).then(i.bind(i,85672)),esriSpatialRelDisjoint:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(1598)]).then(i.bind(i,7978)),esriSpatialRelEnvelopeIntersects:null,esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(1414)]).then(i.bind(i,46178)),esriSpatialRelTouches:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(2503)]).then(i.bind(i,83547)),esriSpatialRelWithin:()=>Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(9265)]).then(i.bind(i,85445)),esriSpatialRelRelation:null};async function F(e,t,i,s,o){if((0,a.Bi)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,h.Ye)(new p.A,t,!1,!1);return t=>function(e,t,i,s){return c(e,!1,!1,s.coords[0],s.coords[1])}(e,0,0,t)}if("esriGeometryMultipoint"===i){const i=(0,h.Ye)(new p.A,t,!1,!1);if("esriSpatialRelContains"===e)return e=>u(i,!1,!1,e,s,o)}}if((0,a.ZC)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return e=>(0,n.qz)(t,(0,f.pL)(i,s,o,e));if("esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return e=>(0,n.rL)(t,(0,f.pL)(i,s,o,e));if("esriSpatialRelIntersects"===e){const e="mesh"===(l=i)?r.xB:(0,r.xK)(l);return n=>e(t,(0,f.pL)(i,s,o,n))}}var l;"esriSpatialRelEnvelopeIntersects"===e&&(e="esriSpatialRelIntersects");const d=await function(e){const t=x[e];if(null==t)throw new Error(`Cannot load unsupported spatial operator: ${e}`);return t()}(e);return e=>d.execute(t,(0,f.pL)(i,s,o,e))}async function _(e,t,i){const{spatialRel:n,geometry:r}=e;if(r){if(!function(e){return null!=e&&!0===g.spatialRelationship[e]}(n))throw new s.A(y,"Unsupported query spatial relationship",{query:e});if((0,o.fn)(r.spatialReference)&&(0,o.fn)(i)){if(!function(e){return null!=e&&!0===g.queryGeometry[(0,a.$B)(e)]}(r))throw new s.A(y,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===g.layerGeometry[e]}(t))throw new s.A(y,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,m.Nk)(e.geometry?.spatialReference,e.outSR)}}}function v(e){if((0,a.ZC)(e))return!0;if((0,a.Bi)(e)){for(const t of e.rings){if(5!==t.length)return!1;if(t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1}return!0}return!1}},70328:(e,t,i)=>{i.d(t,{BI:()=>F,DC:()=>d,Ej:()=>p,Ie:()=>g,Jt:()=>x,Ne:()=>f,RF:()=>c,aI:()=>v,fA:()=>a,gE:()=>l,hZ:()=>y,iT:()=>h,is:()=>_,qv:()=>w,vI:()=>m,vY:()=>o,v_:()=>S,vt:()=>r,w1:()=>u});var s=i(5443),n=(i(19419),i(4197));function r(e=S){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function a(e,t,i,s,n,a,o=r()){return o[0]=e,o[1]=t,o[2]=i,o[3]=s,o[4]=n,o[5]=a,o}function o(e,t=r()){return function(e,t,i,s=r()){return y(s,w),function(e,t,i=0,s=t.length/3){let n=e[0],r=e[1],a=e[2],o=e[3],l=e[4],u=e[5];for(let e=0;e<s;e++)n=Math.min(n,t[i+3*e]),r=Math.min(r,t[i+3*e+1]),a=Math.min(a,t[i+3*e+2]),o=Math.max(o,t[i+3*e]),l=Math.max(l,t[i+3*e+1]),u=Math.max(u,t[i+3*e+2]);e[0]=n,e[1]=r,e[2]=a,e[3]=o,e[4]=l,e[5]=u}(s,e,t,i),s}(e,0,e.length/3,t)}function l(e,t=(0,n.jh)(24)){const[i,s,r,a,o,l]=e;return t[0]=i,t[1]=s,t[2]=r,t[3]=i,t[4]=s,t[5]=l,t[6]=i,t[7]=o,t[8]=r,t[9]=i,t[10]=o,t[11]=l,t[12]=a,t[13]=s,t[14]=r,t[15]=a,t[16]=s,t[17]=l,t[18]=a,t[19]=o,t[20]=r,t[21]=a,t[22]=o,t[23]=l,t}function u(e,t){const i=isFinite(e[2])||isFinite(e[5]);return new s.A(i?{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 c(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 d(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 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[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function p(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 f(e,t,i=e){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i!==e&&(i[3]=e[3],i[4]=e[4],i[5]=e[5]),i}function m(e,t,i=e){return i[3]=t[0],i[4]=t[1],i[5]=t[2],i!==e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2]),e}function y(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 g(e){return e?y(e,w):r(w)}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 F(e,t,i,s,n){return e[0]=t,e[1]=i,e[2]=Number.NEGATIVE_INFINITY,e[3]=s,e[4]=n,e[5]=Number.POSITIVE_INFINITY,e}function _(e){return 6===e.length}function v(e,t,i){if(null==e||null==t)return e===t;if(!_(e)||!_(t))return!1;if(i){for(let s=0;s<e.length;s++)if(!i(e[s],t[s]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}const w=[1/0,1/0,1/0,-1/0,-1/0,-1/0],S=[0,0,0,0,0,0];r()},80754:(e,t,i)=>{i.d(t,{j7:()=>a,kS:()=>l,kd:()=>o,r8:()=>u});var s=i(82799),n=i(16930),r=i(65864);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new s.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new s.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const i=u(e);for(const e of i)for(const i of e)i[0]+=t;return e}function u(e){return(0,r.Bi)(e)?e.rings:e.paths}},86420:(e,t,i)=>{i.d(t,{I:()=>r,W:()=>n});var s=i(21818);async function n(e,t){if(!e)return null;const i=t.featureAdapter,{startTimeField:n,endTimeField:r}=e;let a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;if(n&&r)await t.forEach(e=>{const t=i.getAttribute((0,s.zI)(e),n),l=i.getAttribute((0,s.zI)(e),r);null==t||isNaN(t)||(a=Math.min(a,t)),null==l||isNaN(l)||(o=Math.max(o,l))});else{const e=n||r;await t.forEach(t=>{const n=i.getAttribute((0,s.zI)(t),e);null==n||isNaN(n)||(a=Math.min(a,n),o=Math.max(o,n))})}return{start:a,end:o}}function r(e,t,i){if(!t||!e)return null;const{startTimeField:s,endTimeField:n}=e;if(!s&&!n)return null;const{start:r,end:a}=t;if(null===r&&null===a)return null;if(void 0===r&&void 0===a)return()=>!1;const o=i.getAttributeAsTimestamp?.bind(i)??i.getAttribute.bind(i);return s&&n?function(e,t,i,s,n){return null!=s&&null!=n?r=>{const a=e(r,t),o=e(r,i);return(null==a||a<=n)&&(null==o||o>=s)}:null!=s?t=>{const n=e(t,i);return null==n||n>=s}:null!=n?i=>{const s=e(i,t);return null==s||s<=n}:void 0}(o,s,n,r,a):function(e,t,i,s){return null!=i&&null!=s&&i===s?s=>e(s,t)===i:null!=i&&null!=s?n=>{const r=e(n,t);return null!=r&&r>=i&&r<=s}:null!=i?s=>{const n=e(s,t);return null!=n&&n>=i}:null!=s?i=>{const n=e(i,t);return null!=n&&n<=s}:void 0}(o,s||n,r,a)}},92300:(e,t,i)=>{i.d(t,{V:()=>r,X:()=>n});var s=i(65864);function n(e){return{geometryType:(0,s.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function r(e,t,i){const n=(0,s.xD)(t);return e.map(e=>{const t=n.fromJSON(e);return t.spatialReference=i,t})}},95466:(e,t,i)=>{i.d(t,{A:()=>p});var s=i(49186),n=i(53966),r=i(91869),a=i(3330),o=i(12195),l=i(30524),u=i(98623),c=i(56400),d=i(96285);const h=new Map;class p{static fromJSON(e){return new p(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new p(e.fields??[],g(e))}static fromLayerJSON(e){return new p(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const i=[];for(const e of this.fields){const t=e?.name,s=m(t);if(t&&s){const n=f(t);this._fieldsMap.set(t,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(s,e),i.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(f(e))??this._normalizedFieldsMap.get(m(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new s.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):y.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?a.GB.instance:t===u.n$?d.mQ.utcInstance:(0,r.tE)(h,t,()=>d.oh.create(t)):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map(e=>(0,o.W)(e)?e.toJSON():e),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function f(e){return e.trim().toLowerCase()}function m(e){return(0,l.rS)(e)?.toLowerCase()??""}const y=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const i=!0===e.datesInUnknownTimezone,{timeInfo:s,editFieldsInfo:n}=e,r=(s?"startField"in s?s.startField:s.startTimeField:"")??"",a=(s?"endField"in s?s.endField:s.endTimeField:"")??"",o=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,c.ZS)(e.dateFieldsTimeReference):null,l=n?function(e){return"timeZone"in e}(n)?n.timeZone??o:n.dateFieldsTimeReference?(0,c.ZS)(n.dateFieldsTimeReference):o??u.n$:null,d=s?function(e){return"timeZone"in e}(s)?s.timeZone??o:s.timeReference?(0,c.ZS)(s.timeReference):o:null,h=new Map([[f(n?.creationDateField??""),l],[f(n?.editDateField??""),l],[f(r),d],[f(a),d]]);for(const{name:s,type:n}of e.fields)if(y.has(n))t.set(s,u.L5);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(s,null);else if(i)t.set(s,u.L5);else{const e=h.get(f(s??""))??o;t.set(s,e)}return t}},99352:(e,t,i)=>{i.d(t,{F:()=>s,P:()=>n});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},n={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}}}]);
|