@arcgis/core 5.0.0-next.36 → 5.0.0-next.38
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/WebLinkChart.js +1 -1
- package/analysis/ShadowCast/types.d.ts +2 -0
- package/applications/Components/analysisUtils.d.ts +1 -0
- package/applications/Components/analysisUtils.js +1 -1
- package/applications/Components/testUtils.d.ts +4 -0
- package/applications/Components/testUtils.js +5 -0
- package/arcade/arcadeAsyncRuntime.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/featureSetUtils.js +1 -1
- package/arcade/featureset/actions/Adapted.js +1 -1
- package/arcade/featureset/actions/AttributeFilter.js +1 -1
- package/arcade/featureset/actions/GroupBy.js +1 -1
- package/arcade/featureset/actions/SpatialFilter.js +1 -1
- package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
- package/arcade/featureset/sources/FeatureLayerMemory.js +1 -1
- package/arcade/featureset/sources/FeatureLayerOGC.js +1 -1
- package/arcade/featureset/sources/FeatureLayerRelated.js +1 -1
- package/arcade/featureset/support/FeatureSet.js +1 -1
- package/arcade/featureset/support/FeatureSetIterator.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/014dbe6fa93a277b08f7.js +1 -0
- package/assets/esri/core/workers/chunks/{51355866a0dcf41cfded.js → 0a5427127634738aa239.js} +1 -1
- package/assets/esri/core/workers/chunks/{c7c721de93bc8688e13c.js → 1d4ea8db272655c0608c.js} +1 -1
- package/assets/esri/core/workers/chunks/1d566539ff6fb6ac798c.js +1 -0
- package/assets/esri/core/workers/chunks/1de216d9850c39c1735d.js +1 -0
- package/assets/esri/core/workers/chunks/262232437d37a7460b11.js +1 -0
- package/assets/esri/core/workers/chunks/2795e491f803654413d2.js +1 -0
- package/assets/esri/core/workers/chunks/2f9129003f77bfeab2f9.js +1 -0
- package/assets/esri/core/workers/chunks/{1817cf11e85afca947d3.js → 328106e181e5957ceaa5.js} +1 -1
- package/assets/esri/core/workers/chunks/{d3db7244fac7398cc700.js → 4b6a44c6265c8959abd8.js} +1 -1
- package/assets/esri/core/workers/chunks/50ffb22c48fadd36c748.js +1 -0
- package/assets/esri/core/workers/chunks/{f1ac1c8b1331ec79e898.js → 59ce992d3a5e7c32b9fb.js} +1 -1
- package/assets/esri/core/workers/chunks/{8a946cbc816f373c136b.js → 5e30acfda04f7fc2b676.js} +1 -1
- package/assets/esri/core/workers/chunks/6330d8767ba1d5329daa.js +1 -0
- package/assets/esri/core/workers/chunks/{3f03165487c1c2340fff.js → 690a40d2eef52bfc149f.js} +1 -1
- package/assets/esri/core/workers/chunks/{dd34d56caafa38d4b8e4.js → 7aa730e5ac7b268e3c98.js} +1 -1
- package/assets/esri/core/workers/chunks/{b451dc416eebd0931ef8.js → 7ab237d19b84d89ff483.js} +7 -7
- package/assets/esri/core/workers/chunks/{1fa55d4c4b092a98bdd7.js → b56c07c0b43cb1999070.js} +1 -1
- package/assets/esri/core/workers/chunks/{bfb9cbe59d36d18f9157.js → cda5c95fd49b8901f7d4.js} +1 -1
- package/assets/esri/core/workers/chunks/{c9e7cc5d853908ab5b2f.js → ce99abfdcd71ff9e4e36.js} +1 -1
- package/assets/esri/core/workers/chunks/{726a797f5df7eeee0b3d.js → d786b17cc9062b1450ac.js} +1 -1
- package/assets/esri/core/workers/chunks/{52c8687b473c9953c2f2.js → d9958654c6438f28237b.js} +1 -1
- package/assets/esri/core/workers/chunks/{2e76fbd3c874300fc4a7.js → de3da4d31a7529761565.js} +1 -1
- package/assets/esri/core/workers/chunks/{eb6218634a492667506a.js → e501d68a1464805c4b4e.js} +1 -1
- package/assets/esri/core/workers/chunks/{33431e8131f6017de2f9.js → e7f4d135ef9665de1468.js} +1 -1
- package/assets/esri/core/workers/chunks/{d8623f5f13a084e439c2.js → e9bc3c6482ba778c9349.js} +37 -37
- package/assets/esri/core/workers/chunks/{7420fa18ba12014b22ea.js → ee67c8a7c1f8b482cd99.js} +1 -1
- package/assets/esri/core/workers/chunks/{abb05a903440d97a6a74.js → f441fc74451330384fb0.js} +1 -1
- package/assets/esri/core/workers/chunks/f609b256df9eb3803464.js +1 -0
- package/assets/esri/core/workers/chunks/f97a7cb367634353177d.js +1 -0
- package/chunks/CloudsComposition.glsl.js +1 -1
- package/chunks/ComponentShader.glsl.js +2 -2
- package/chunks/DefaultMaterial.glsl.js +1 -1
- package/chunks/GaussianSplat.glsl.js +2 -2
- package/chunks/Laserlines.glsl.js +1 -1
- package/chunks/Path.glsl.js +1 -1
- package/chunks/RealisticTree.glsl.js +1 -1
- package/chunks/Terrain.glsl.js +34 -36
- package/chunks/WaterSurface.glsl.js +1 -1
- package/chunks/boundedPlane.js +1 -1
- package/chunks/cameraUtilsSpherical.js +1 -1
- package/chunks/vec32.js +1 -1
- package/config.js +1 -1
- package/core/has.js +1 -1
- package/core/iteratorUtils.js +1 -1
- package/core/libs/gl-matrix-2/math/quat.js +1 -1
- package/core/libs/gl-matrix-2/math/vec3.js +1 -1
- package/geometry/support/buffer/BufferView.js +1 -1
- package/geometry/support/curves/densifyCurvedGeometry.js +1 -1
- package/geometry/support/lineSegment.js +1 -1
- package/geometry/support/meshUtils/merge.js +1 -1
- package/geometry/support/sphere.js +1 -1
- package/interfaces.d.ts +59 -5
- package/kernel.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/knowledgeGraph/layerUtils.js +1 -1
- package/layers/orientedImagery/transformations/worldToImage.js +1 -1
- package/layers/support/csvUtils.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/layers/voxel/VoxelVolume.js +1 -1
- package/package.json +5 -5
- package/support/revision.js +1 -1
- package/support/tests/meshUtils.js +5 -0
- package/support/tests/serviceMockDependencies.js +5 -0
- package/support/tests/setupServiceMocksMesh.js +5 -0
- package/views/2d/analysis/ElevationProfile/ElevationProfileLineVisualization2D.js +1 -1
- package/views/2d/interactive/SegmentLabels2D.js +1 -1
- package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
- package/views/3d/FocusAreasView.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
- package/views/3d/analysis/Dimension/DimensionTool.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileLineVisualization3D.js +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileVisualization3D.js +1 -1
- package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedScaleOrientManipulation.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubVisualization.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
- package/views/3d/animation/pointToPoint/Camera.js +1 -1
- package/views/3d/camera/constraintUtils/distance.js +1 -1
- package/views/3d/camera/constraintUtils/tilt.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.js +1 -1
- package/views/3d/environment/CloudsParameters.js +1 -1
- package/views/3d/environment/EnvironmentManager.js +1 -1
- package/views/3d/environment/MarsAtmosphere.js +1 -1
- package/views/3d/interactive/SegmentLabels3D.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
- package/views/3d/interactive/editingTools/media/MediaElementManipulator3D.js +1 -1
- package/views/3d/interactive/editingTools/reshape/edgeOffsetUtils.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
- package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/FlowSubView3D.js +1 -1
- package/views/3d/layers/GraphicsLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/ImagerySubView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudWorker.js +1 -1
- package/views/3d/layers/RouteLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DScaleVisibility.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/graphics/pipeline/rendering/DirectRenderer.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
- package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
- package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
- package/views/3d/state/Frustum.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/state/controllers/FovController.js +1 -1
- package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
- package/views/3d/state/controllers/momentum/ZoomPlanarMomentumController.js +1 -1
- package/views/3d/support/FrustumExtentIntersection.js +1 -1
- package/views/3d/support/cameraUtils.js +1 -1
- package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatFadeHelper.js +1 -1
- package/views/3d/support/intersectionUtils.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/viewpointUtils.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/PatchRenderData.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/TileCompositor.js +1 -1
- package/views/3d/webgl/RenderCamera.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +4 -7
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBuffer.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +19 -15
- package/views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +5 -5
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js +14 -14
- package/views/3d/webgl-engine/core/shaderLibrary/util/BlendModes.glsl.js +16 -37
- package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js +8 -8
- package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
- package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
- package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillColor.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/Normals.js +1 -1
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBuffer.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFieldCreation.js +5 -0
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFields.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferLayout.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferLayoutField.js +5 -0
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBufferView.js +5 -0
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
- package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
- package/views/3d/webgl-engine/lib/triangleIntersectionUtils.js +1 -1
- package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/SlicePlaneMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +9 -10
- package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
- package/views/BreakpointsOwner.js +1 -1
- package/views/GroundView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/ToolViewManager.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileVisualizationUtils.js +1 -1
- package/views/interactive/GraphicManipulator.js +1 -1
- package/views/interactive/InteractiveToolBase.js +1 -1
- package/views/interactive/ToolViewManagerManipulatorState.js +1 -1
- package/views/interactive/coordinateHelper.js +1 -1
- package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
- package/views/interactive/sketch/constraints.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/interactive/snapping/hints/LineSnappingHint.js +1 -1
- package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
- package/views/layers/LayerView.js +1 -1
- package/views/navigation/PanSphericalMomentumEstimator.js +1 -1
- package/views/support/LayerViewManager.js +1 -1
- package/views/support/euclideanAreaMeasurementUtils.js +1 -1
- package/views/support/euclideanLengthMeasurementUtils.js +1 -1
- package/views/support/geodesicLengthMeasurementUtils.js +1 -1
- package/views/support/geometry3dUtils.js +1 -1
- package/webmap/utils.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Slider.js +1 -1
- package/assets/esri/core/workers/chunks/11687718c8635eb7bf37.js +0 -1
- package/assets/esri/core/workers/chunks/15c1a48e8cd2a8882d85.js +0 -1
- package/assets/esri/core/workers/chunks/1b9e7d416c9f00e020bb.js +0 -1
- package/assets/esri/core/workers/chunks/24a3c6f0154787968724.js +0 -1
- package/assets/esri/core/workers/chunks/5000a37fba27464d10ca.js +0 -1
- package/assets/esri/core/workers/chunks/951a3442d4342539f2ea.js +0 -1
- package/assets/esri/core/workers/chunks/b075d3714fab0591d67c.js +0 -1
- package/assets/esri/core/workers/chunks/d8975dd7b85b5d065ee4.js +0 -1
- package/assets/esri/core/workers/chunks/e0a74250d22fa1d7dc18.js +0 -1
- package/assets/esri/core/workers/chunks/f43e1e1a1b2eb737e00c.js +0 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/FastApproximateTrigonometry.glsl.js +0 -26
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2561,3345,3548,4342,7548,7694],{159:(e,t,r)=>{r.d(t,{A:()=>o});var i,n=r(31635),s=r(69622),a=r(91429),l=r(99157);let o=i=class extends s.A{constructor(e){super(e),this.steps=[]}getInverse(){const e=new i;for(let t=this.steps.length-1;t>=0;t--){const r=this.steps[t];e.steps.push(r.getInverse())}return e}};(0,n.Cg)([(0,a.MZ)({type:[l.A],nonNullable:!0})],o.prototype,"steps",void 0),o=i=(0,n.Cg)([(0,a.$K)("esri.geometry.operators.support.GeographicTransformation")],o)},4146:(e,t,r)=>{r.d(t,{A:()=>_});var i=r(31635),n=r(11254),s=r(49186),a=r(65529),l=r(4902),o=r(92474),u=r(53966),c=r(74887),d=r(84952),p=r(91429),h=r(5443),y=r(16930),f=r(92602),m=r(79677);let g=0,_=class extends((0,a.Zt)((0,l.s)(o.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new h.A(-180,-90,180,90,y.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+g++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=y.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([r.e(812),r.e(7982)]).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await Promise.all([r.e(812),r.e(5613),r.e(5710)]).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",n=r?.portal?.url||f.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,c.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,d.An)(this.url)}createLayerView(e,t){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,n.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i.Cg)([(0,p.MZ)({type:String})],_.prototype,"attributionDataUrl",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],_.prototype,"effectiveVisible",null),(0,i.Cg)([(0,p.MZ)({type:h.A})],_.prototype,"fullExtent",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],_.prototype,"hasAttributionData",null),(0,i.Cg)([(0,p.MZ)({type:String,clonable:!1})],_.prototype,"id",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:["show","hide","hide-children"]})],_.prototype,"listMode",void 0),(0,i.Cg)([(0,p.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],_.prototype,"opacity",void 0),(0,i.Cg)([(0,p.MZ)({clonable:!1})],_.prototype,"parent",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],_.prototype,"parsedUrl",null),(0,i.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],_.prototype,"persistenceEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean})],_.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean})],_.prototype,"attributionVisible",void 0),(0,i.Cg)([(0,p.MZ)({type:y.A})],_.prototype,"spatialReference",void 0),(0,i.Cg)([(0,p.MZ)({type:String})],_.prototype,"title",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],_.prototype,"type",void 0),(0,i.Cg)([(0,p.MZ)()],_.prototype,"url",void 0),(0,i.Cg)([(0,p.MZ)({type:m.A})],_.prototype,"visibilityTimeExtent",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"visible",void 0),_=(0,i.Cg)([(0,p.$K)("esri.layers.Layer")],_)},4902:(e,t,r)=>{r.d(t,{s:()=>a});var i=r(31635),n=r(64108);let s=0;const a=e=>{const t=e;let r=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return r=(0,i.Cg)([(0,n.$)("esri.core.Identifiable")],r),r};a(class{})},6797:(e,t,r)=>{r.d(t,{Ui:()=>p});var i=r(69622),n=r(7762),s=r(88620);const a=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof i.A}function o(e){return e instanceof n.A?Object.keys(e.items):l(e)?(0,s.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof n.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function d(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=o(e),n=o(t);if(0===i.length&&0===n.length)return;if(!i.length||!n.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const s=n.filter(e=>!i.includes(e)),p=i.filter(e=>!n.includes(e)),h=i.filter(r=>n.includes(r)&&u(e,r)!==u(t,r)).concat(s,p).sort(),y=c(e);if(y&&a.has(y)&&h.length)return{type:"complete",oldValue:e,newValue:t};let f;const m=l(e)&&l(t);for(const i of h){const n=u(e,i),s=u(t,i);let a;if((m||"function"!=typeof n&&"function"!=typeof s)&&n!==s&&(null!=n||null!=s)){if(r&&r[i]&&"function"==typeof r[i])a=r[i]?.(n,s);else if(n instanceof Date&&s instanceof Date){if(n.getTime()===s.getTime())continue;a={type:"complete",oldValue:n,newValue:s}}else a="object"==typeof n&&"object"==typeof s&&c(n)===c(s)?d(n,s):{type:"complete",oldValue:n,newValue:s};null!=a&&(null!=f?f.diff[i]=a:f={type:"partial",diff:{[i]:a}})}}return f}function p(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:d(e,t)}},9762:(e,t,r)=>{r.r(t),r.d(t,{projectBuffer:()=>n});var i=r(37539);function n(e,t,r,n,s,a,l=Math.floor(e.length/3)){const o=(0,i.jd)(t,s);if(null==o)return!1;if(o===i.pO){if(e===n&&r===a)return!0;const t=r+3*l;for(let i=r,s=a;i<t;i++,s++)n[s]=e[i]??0;return!0}const u=r+3*l;for(let t=r,i=a;t<u;t+=3,i+=3)o(e,t,n,i);return!0}},10536:(e,t,r)=>{function i(e){const t={};for(const r in e){if("declaredClass"===r)continue;const n=e[r];if(null!=n&&"function"!=typeof n)if(Array.isArray(n)){t[r]=[];for(let e=0;e<n.length;e++)t[r][e]=i(n[e])}else"object"==typeof n?n.toJSON&&(t[r]=JSON.stringify(n)):t[r]=n}return t}r.d(t,{z:()=>i})},16215:(e,t,r)=>{r.d(t,{S:()=>n,Y:()=>i});const i=Symbol("BasemapInstance");function n(e){return null!=e&&"object"==typeof e&&i in e}},16494:(e,t,r)=>{r.d(t,{Nd:()=>l,W5:()=>a});var i=r(37330);const n=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup","animate","animatetransform","circle","clippath","defs","ellipse","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","svg","switch","symbol","text","textpath","tspan","use"].reduce((e,t)=>(e[t]=[],e),{}),s=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","class","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],a=new i.I({whiteList:n,onTagAttr:(e,t,r)=>{const i=`${t}="${r}"`;if(s.includes(t))return i},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),l=new i.I({whiteList:{br:[]},stripIgnoreTag:!0,escapeHtml:e=>e},!1)},17126:(e,t,r)=>{r.d(t,{dw:()=>a,qD:()=>l,qW:()=>o});var i=r(11254),n=r(21325),s=r(10536);function a(e,t){const r=e.toJSON();return r.objectIds&&(r.objectIds=r.objectIds.join(",")),r.orderByFields&&(r.orderByFields=r.orderByFields.join(",")),r.outFields&&!t?.returnCountOnly?r.outFields.includes("*")?r.outFields="*":r.outFields=r.outFields.join(","):delete r.outFields,r.outSR&&(r.outSR=(0,n.YX)(r.outSR)),r.dynamicDataSource&&(r.layer=JSON.stringify({source:r.dynamicDataSource}),delete r.dynamicDataSource),r}async function l(e,t,r){const i=await u(e,t,r),n=i.data,s=n.geometryType,a=n.spatialReference,l={};for(const e of n.relatedRecordGroups){const t={fields:void 0,geometryType:s,spatialReference:a,hasZ:!!n.hasZ,hasM:!!n.hasM,features:e.relatedRecords};if(null!=e.objectId)l[e.objectId]=t;else for(const r of Object.keys(e))"relatedRecords"!==r&&(l[e[r]]=t)}return{...i,data:l}}async function o(e,t,r){const i=await u(e,t,r,{returnCountOnly:!0}),n=i.data,s={};for(const e of n.relatedRecordGroups)null!=e.objectId&&(s[e.objectId]=e.count);return{...i,data:s}}async function u(e,t,r={},n){const l=(0,s.z)({...e.query,f:"json",...n,...a(t,n)});return(0,i.A)(e.path+"/queryRelatedRecords",{...r,query:{...r.query,...l}})}},17311:(e,t,r)=>{r.d(t,{A:()=>h});var i=r(31635),n=r(69622),s=r(4576),a=r(60999),l=r(7762),o=r(16494),u=r(91429),c=r(30524),d=r(43668);const p=/<br\s*\/*>/gi;let h=class extends n.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,a.UT)(()=>(0,d.l)()):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??r.e(9926).then(r.bind(r,29926)).then(e=>this._featureUtils=e)}get calculatedExpressions(){const e=new l.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const r=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(r.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:r,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(r,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter(t=>e.includes(`{expression/${t.name.toLowerCase()}}`))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some(e=>!0===e.invalid)}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const r=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of r){const r=t.split("."),i=this.fieldsIndex.get(r.at(-1)??"");i&&e.add(i.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const r of t){const t=this.fieldsIndex.get(r);t&&e.add(t.name)}return null!=this.objectIdField&&e.add(this.objectIdField),e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,r){const i=t.getObjectId()??t.attributes[e.objectIdField];return(await this.getTitles(e,[t],r)).get(i)??""}async getTitles(e,t,r){const i=new Map,n=r?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:s}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);r?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:a,workingTitle:l}=this,u=l&&a;t.forEach(t=>{const c=t.getObjectId()??t.attributes[e.objectIdField];let d=u?s({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:a,globalAttributes:this._createFormattedAttributes(e,t,n).global,layer:e,text:l}):"";r?.removeHTML&&(d=o.Nd.sanitize(d).replaceAll(p," ")),i.set(c,d)})}catch{}return i}async _checkAndReQueryGraphics(e,t){const r=t.map(t=>t.getObjectId()??t.attributes[e.objectIdField]).filter(s.Ru);if(r.length!==t.length)return t;if(t.some(e=>!(0,c.Kl)(e,this.requiredFields))){const i=e.createQuery();i.where="1=1",i.outFields=[...this.requiredFields],i.objectIds=r;const n=await e.queryFeatures(i);if(n?.features.length===t.length)return n.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const r of e){if(!r.fieldName)continue;const e=this.fieldsIndex.get(r.fieldName),i=e?.name??r.fieldName;r.fieldName=i,t.set(i.toLowerCase(),r)}return t}_createFormattedAttributes(e,t,r="system"){const i=this.effectivePopupTemplate?.fieldInfos??[],n={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const r=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{n[`expression/${e.name}`]=e.func({vars:{$feature:r}})}catch{}}const s={...t.attributes,...n};return{global:this._featureUtils.formatAttributes({fieldInfos:i,attributes:s,graphic:t,timeZone:r,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,c.nw)(e).filter(e=>!(e.startsWith("relationships/")||e.startsWith("expression/")))}};(0,i.Cg)([(0,u.MZ)({readOnly:!0})],h.prototype,"_arcadeTask",null),(0,i.Cg)([(0,u.MZ)()],h.prototype,"_featureUtils",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],h.prototype,"featureUtilsPromise",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],h.prototype,"calculatedExpressions",null),(0,i.Cg)([(0,u.MZ)()],h.prototype,"displayField",void 0),(0,i.Cg)([(0,u.MZ)()],h.prototype,"effectivePopupTemplate",void 0),(0,i.Cg)([(0,u.MZ)()],h.prototype,"expressionsUsedInTitle",null),(0,i.Cg)([(0,u.MZ)()],h.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,u.MZ)()],h.prototype,"fieldInfoMap",null),(0,i.Cg)([(0,u.MZ)()],h.prototype,"fields",void 0),(0,i.Cg)([(0,u.MZ)()],h.prototype,"objectIdField",void 0),(0,i.Cg)([(0,u.MZ)()],h.prototype,"requiredFields",null),h=(0,i.Cg)([(0,u.$K)("esri.layers.support.TitleCreator")],h)},22671:(e,t,r)=>{r.d(t,{A:()=>g});var i,n=r(31635),s=r(52106),a=r(66552),l=r(25482),o=r(4718),u=r(91429),c=r(16930),d=r(65864),p=r(50498),h=r(20437),y=r(36005),f=r(43937);const m=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let g=i=class extends l.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,s.A)}writeGeometryType(e,t,r,i){if(e)return void m.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void m.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,d.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=c.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,o.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,s=this.features,a=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((n-e)/r));for(let e=0,t=s.length;e<t;e++)a?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,n],scale:[s,a]}=r;let l=null,o=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;o=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,e=>e*s+i,e=>n-e*a,l,o);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const i=c.A.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const s=e[t],a=r.fromJSON(s),l=s.geometry?.spatialReference;null==a.geometry||l||(a.geometry.spatialReference=i);const o=s.aggregateGeometries,u=a.aggregateGeometries;if(o&&null!=u)for(const e in u){const t=u[e],r=o[e],n=r?.spatialReference;null==t||n||(t.spatialReference=i)}n.push(a)}return n}_quantizePoints(e,t,r){let i,n;const s=[];for(let a=0,l=e.length;a<l;a++){const l=e[a];if(a>0){const e=t(l[0]),a=r(l[1]);e===i&&a===n||(s.push([e-i,a-n]),i=e,n=a)}else i=t(l[0]),n=r(l[1]),s.push([i,n])}return s.length>0?s:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,d.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,s=i.length;e<s;e++){const s=i[e],a=this._quantizePoints(s,t,r);a&&n.push(a)}return n.length>0?((0,d.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,d.Bi)(e)?e.rings:e.paths;let a,l;for(let e=0,i=s.length;e<i;e++){const i=s[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(a+=n[0],l+=n[1]):(a=n[0],l=n[1]),n[0]=t(a),n[1]=r(l)}}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let a,l;for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(a+=i[0],l+=i[1]):(a=i[0],l=i[1]),i[0]=t(a),i[1]=r(l)}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2])}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=n(t[2])}}:null}};(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],g.prototype,"displayFieldName",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"exceededTransferLimit",void 0),(0,n.Cg)([(0,u.MZ)({type:[s.A],json:{write:!0}})],g.prototype,"features",void 0),(0,n.Cg)([(0,y.w)("features")],g.prototype,"readFeatures",null),(0,n.Cg)([(0,u.MZ)({type:[h.A],json:{write:!0}})],g.prototype,"fields",void 0),(0,n.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:m.read}}})],g.prototype,"geometryType",void 0),(0,n.Cg)([(0,f.K)("geometryType")],g.prototype,"writeGeometryType",null),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasM",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasZ",void 0),(0,n.Cg)([(0,u.MZ)({types:p.yR,json:{write:!0}})],g.prototype,"queryGeometry",void 0),(0,n.Cg)([(0,y.w)("queryGeometry")],g.prototype,"readQueryGeometry",null),(0,n.Cg)([(0,u.MZ)({type:c.A,json:{write:!0}})],g.prototype,"spatialReference",void 0),(0,n.Cg)([(0,f.K)("spatialReference")],g.prototype,"writeSpatialReference",null),(0,n.Cg)([(0,u.MZ)({json:{write:!0}})],g.prototype,"transform",void 0),g=i=(0,n.Cg)([(0,u.$K)("esri.rest.support.FeatureSet")],g),g.prototype.toJSON.isDefaultToJSON=!0},29005:(e,t,r)=>{r.d(t,{A:()=>u});var i=r(31635),n=r(69540),s=r(66552),a=r(25482),l=r(91429);const o=new s.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,n.OU)(a.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"description",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:o.read,write:o.write}})],u.prototype,"drawingTool",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,i.Cg)([(0,l.$K)("esri.layers.support.FeatureTemplate")],u)},30235:(e,t,r)=>{r.d(t,{A:()=>f});var i=r(52106),n=r(48938),s=r(87449),a=r(11221),l=r(33325),o=r(80609),u=r(4576),c=r(39516),d=r(91075),p=r(68654),h=r(33143),y=r(20437);class f extends a.Jn{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerMemory",this._removeGeometry=!1,this._overrideFields=null,this._forceIsTable=!1,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),!0===e.isTable&&(this._forceIsTable=!0),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return l.gO}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}get gdbVersion(){return""}_initialiseFeatureSet(){if(this.spatialReference??=this._layer.spatialReference,this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=new Set(this._overrideFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||this._layer.objectIdField===r||e.has(r.toLowerCase())),this._overrideFields=this.fields.map(({name:e})=>e)}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this._databaseType=0,this.hasZ=!0===this._layer.capabilities?.data?.supportsZ,this.hasM=!0===this._layer.capabilities?.data?.supportsM,this.subtypeField=("subtypeField"in this._layer?this._layer.subtypeField:null)??"",this.subtypes="subtypes"in this._layer?this._layer.subtypes:null,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}isTable(){return this._forceIsTable||"isTable"in this._layer&&this._layer.isTable||"table"===this._layer.type||!this._layer.geometryType}async _queryAll(){return(await this.query({abortSignal:n._})).features}async query(e){await this._ensureLoaded();let t="",r=!1;if(null!=e.orderBy&&(t=e.orderBy.constructClause(),r=!0),this.isTable()&&null!=e.spatialFilter)return a.An;const i=this._createQuery();return i.where=(0,c.mA)(i.where,null==e.where?null==e.spatialFilter?"1=1":"":(0,o.YY)(e.where,0)),null!=e.spatialFilter&&(i.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),i.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),i.geometry=e.spatialFilter.geometry),i.outSpatialReference=this.spatialReference,i.orderByFields=""!==t?t.split(","):null,{filterApplied:!0,spatialFilterApplied:!0,ordered:r,features:async function*(){const t=await this._layer.queryFeatures(i);(0,s.dZ)(e.abortSignal);for(const e of(0,u.Ho)(t.features,this._maxQueryRate()))yield e.map(e=>this._changeFeature(e))}.apply(this)}}async queryStat(e){return{calculated:!1}}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new s.dr("NeverReach")}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,e.outFields=this._overrideFields??["*"],e.returnGeometry=!this._removeGeometry,e}_changeFeature(e){const t={};for(const r of this.fields)t[r.name]=e.attributes[r.name];return new i.A({geometry:!0===this._removeGeometry?null:e.geometry,attributes:t})}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}relationshipMetadata(){return[]}nativeCapabilities(){return{title:this._layer.title??"",canQueryRelated:!1,source:this,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:!0}}static create(e,t){let r=e.layerDefinition.objectIdField;const i=e.layerDefinition.typeIdField??"",n=[];if(e.layerDefinition.types)for(const t of e.layerDefinition.types)n.push(h.A.fromJSON(t));let s=e.layerDefinition.geometryType;void 0===s&&(s=e.featureSet.geometryType||"");let a=e.featureSet.features;if(!r){let t=!1;for(const i of e.layerDefinition.fields)if("oid"===i.type||"esriFieldTypeOID"===i.type){r=i.name,t=!0;break}if(!1===t){let t="FID",i=!0,n=0;for(;i;){let r=!0;for(const i of e.layerDefinition.fields)if(i.name===t){r=!1;break}!0===r?i=!1:(n++,t="FID"+n.toString())}e.layerDefinition.fields.push({type:"esriFieldTypeOID",name:t,alias:t});const s=[];for(let r=0;r<a.length;r++)s.push({geometry:e.featureSet.features[r].geometry,attributes:{...e.featureSet.features[r].attributes,[t]:r}});a=s,r=t}}const l=[];for(const t of e.layerDefinition.fields)t instanceof y.A?l.push(t):l.push(y.A.fromJSON(t));let o=s;switch(o||(o=""),o){case"esriGeometryPoint":o="point";break;case"esriGeometryPolyline":o="polyline";break;case"esriGeometryPolygon":o="polygon";break;case"esriGeometryEnvelope":o="extent";break;case"esriGeometryMultipoint":o="multipoint";break;case"":case"esriGeometryNull":o="esriGeometryNull"}if("esriGeometryNull"!==o){const e=t.toJSON();for(const t of a)t.geometry&&t.geometry instanceof d.A==0&&(t.geometry.type=o,void 0===t.geometry.spatialReference&&(t.geometry.spatialReference=e))}else for(const e of a)e.geometry&&(e.geometry=null);const u={outFields:["*"],source:a,fields:l,hasZ:!0===e.layerDefinition.hasZ||!0===e.featureSet.hasZ,hasM:!0===e.layerDefinition.hasM||!0===e.featureSet.hasM,types:n,typeIdField:i,objectIdField:r,spatialReference:t},c="esriGeometryNull"===o||null===o;c||(u.geometryType=o);const m=new p.default(u);return e.layerDefinition.subtypeField&&e.layerDefinition.subtypes&&m.read({subtypes:e.layerDefinition.subtypes,subtypeField:e.layerDefinition.subtypeField}),new f({layer:m,spatialReference:t,isTable:c})}async queryAttachments(){return[]}async getFeatureByObjectId(e){const t=this._createQuery();t.where=this.objectIdField+"="+e.toString();const r=await this._layer.queryFeatures(t);return 1===r.features.length?r.features[0]:null}serviceUrl(){return""}async getOwningSystemUrl(){return""}async getIdentityUser(){return""}get preferredTimeZone(){return"preferredTimeZone"in this._layer?this._layer.preferredTimeZone:null}get dateFieldsTimeZone(){return"dateFieldsTimeZone"in this._layer?this._layer.dateFieldsTimeZone:null}get datesInUnknownTimezone(){return"datesInUnknownTimezone"in this._layer&&this._layer.datesInUnknownTimezone}get editFieldsInfo(){return"editFieldsInfo"in this._layer?this._layer.editFieldsInfo:null}get timeInfo(){return this._layer.timeInfo}async getFeatureSetInfo(){const e=this._layer.title&&this._layer.parent;return{layerId:null,layerName:null,itemId:null,serviceLayerUrl:null,webMapLayerId:e?this._layer.id??null:null,webMapLayerTitle:e?this._layer.title??null:null,className:null,objectClassId:null}}}},30445:(e,t,r)=>{r.r(t),r.d(t,{constructAssociationMetaDataFeatureSetFromUrl:()=>B,constructFeatureSet:()=>G,constructFeatureSetFromPortalItem:()=>Y,constructFeatureSetFromRelationship:()=>$,constructFeatureSetFromUrl:()=>D,convertToFeatureSet:()=>K,createFeatureSetCollectionFromMap:()=>J,createFeatureSetCollectionFromService:()=>V,initialiseMetaDataCache:()=>N});var i=r(11254);class n{constructor(){this.declaredRootClass="esri.arcade.featureSetCollection",this._layerById={},this._layerByName={}}add(e,t,r){this._layerById[t]=r,this._layerByName[e]=r}async featureSetByName(e,t=!0,r=["*"]){return void 0===this._layerByName[e]?null:this._layerByName[e]}async featureSetById(e,t=!0,r=["*"]){return void 0===this._layerById[e]?null:this._layerById[e]}castToText(e=!1){return"object, FeatureSetCollection"}}var s=r(78878),a=r(35704),l=r(52106),o=r(70333),u=r(48938),c=r(61454),d=r(66395),p=r(87449),h=r(11221),y=r(33325),f=r(80609),m=r(50145),g=r(4576),_=r(80200),w=r(39516),b=r(88368),F=r(65864),v=r(68654),I=r(17126),T=r(54546),S=r(61956),A=r(7562);function C(e,t){null==e.clause&&(e.clause=function(e){if(0===e.length)throw new p.dr("NeverReach");const t=[];for(let r=0;r<e.length;r++){const i=e[r],n=[`"${i.name.replaceAll('"','""')}" ${i.asc?">":"<"} @last_${r}`];for(let t=0;t<r;t++){const r=e[t];n.push(`"${r.name.replaceAll('"','""')}" = @last_${t}`)}t.push(n.join(" AND "))}const r=t.join(" OR ");return b.A.create(r)}(e.keyFields));for(let r=0;r<e.keyFields.length;r++){const i=e.keyFields[r].name;e.clause.parameters[`last_${r}`]=t.attributes[i]}}class R extends h.Jn{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerDynamic",this._removeGeometry=!1,this._overrideFields=null,this._requestStandardised=!1,this._useDefinitionExpression=!0,this._recentlyUsedQueries=null,this._featureSetQueryInterceptor=null,this._featureSetInfo=null,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry),e.lrucache&&(this._recentlyUsedQueries=e.lrucache),e.interceptor&&(this._featureSetQueryInterceptor=e.interceptor)}_maxQueryRate(){return y.gO}get urlQueryPath(){return this._layer.parsedUrl.path||""}convertQueryToLruCacheKey(e){const t=this.urlQueryPath+","+(0,y.JB)(e.toJSON());return(0,_.d)(t,_.T.String)}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(this.spatialReference??=this._layer.spatialReference,this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),this.hasZ=!0===this._layer.capabilities?.data?.supportsZ,this.hasM=!0===this._layer.capabilities?.data?.supportsM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=new Set(this._overrideFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||e.has(r.toLowerCase())),this._overrideFields=this.fields.map(({name:e})=>e)}if(this._layer.source&&this._layer.source.sourceJSON){const e=this._layer.source.sourceJSON.currentVersion;!0===this._layer.source.sourceJSON.useStandardizedQueries?(this._databaseType=1,null!=e&&e>=10.61&&(this._databaseType=0)):null!=e&&(e>=10.5&&(this._databaseType=1,this._requestStandardised=!0),e>=10.61&&(this._databaseType=0))}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this.subtypeField=this._layer.subtypeField??"",this.subtypes=this._layer.subtypes,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}async _runDatabaseProbe(e){await this._ensureLoaded();const t=new S.A;this.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t.where=e.replace("OBJECTID",this._layer.objectIdField);try{return await this._layer.queryObjectIds(t),!0}catch{return!1}}_canUsePagination(){return!(!this._layer.capabilities||!this._layer.capabilities.query||!0!==this._layer.capabilities.query.supportsPagination)}_cacheableFeatureSetSourceKey(){return this._layer.url}get gdbVersion(){return this._layer&&this._layer.capabilities&&this._layer.capabilities.data&&this._layer.capabilities.data.isVersioned?this._layer.gdbVersion||"SDE.DEFAULT":""}nativeCapabilities(){return{title:this._layer.title??"",source:this,canQueryRelated:!0,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:this._requestStandardised}}async _queryAll(){return(await this.query({abortSignal:u._})).features}async query(e){return await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter?h.An:this._canUsePagination()?this._queryUsingPaging(e):this._queryUsingIdSetTraversal(e)}async _queryUsingPaging(e){let t="",r=!1;null!=e.orderBy&&!0===this._layer.capabilities?.query?.supportsOrderBy&&(t=e.orderBy.constructClause(),r=!0);const i=await this.databaseType(),n=null==e.where?null==e.spatialFilter?"1=1":"":(0,f.YY)(e.where,i);let s=this._maxQueryRate();const a=this._layer.capabilities?.query.maxRecordCount;null!=a&&a<s&&(s=a);const l=!0!==this._removeGeometry,o=this._overrideFields??this._fieldsIncludingObjectId(["*"]),u=this._createQuery();return u.where=(0,w.mA)(u.where,n),null!=e.spatialFilter&&(u.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),u.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),u.geometry=e.spatialFilter.geometry),u.orderByFields=""!==t?t.split(","):null,u.outFields=o,u.returnGeometry=l,u.outSpatialReference=this.spatialReference,{ordered:r,filterApplied:!0,spatialFilterApplied:!0,features:this._queryPaginated(u,s,e.abortSignal)}}async*_queryPaginated(e,t,r){let i;e.num=t,e.start=0;do{(0,p.dZ)(r),i=await this.executeQuery(e,"execute"),yield i.features,e.start+=t}while(void 0===i.exceededTransferLimit&&i.features.length===t||!1!==i.exceededTransferLimit)}async _queryUsingIdSetTraversal(e){let t="",r=!1;null!=e.orderBy&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(t=e.orderBy.constructClause(),r=!0);const i=await this.databaseType(),n=null==e.where?null==e.spatialFilter?"1=1":"":(0,f.YY)(e.where,i),s=this._createQuery();s.where=(0,w.mA)(s.where,n),null!=e.spatialFilter&&(s.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),s.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),s.geometry=e.spatialFilter.geometry),s.orderByFields=""!==t?t.split(","):null,s.outSpatialReference=this.spatialReference;const a=await this.executeQuery(s,"executeForIds");if((0,p.dZ)(e.abortSignal),null==a||a.length<=0)return h.An;let l=this._maxQueryRate();const o=this._layer.capabilities?.query.maxRecordCount;null!=o&&o<l&&(l=o);const u=this._createQuery();return s.outFields=this._overrideFields??this._fieldsIncludingObjectId(["*"]),s.returnGeometry=!0!==this._removeGeometry,s.outSpatialReference=this.spatialReference,{ordered:r,filterApplied:!0,spatialFilterApplied:!0,features:this._traverseIdSet(u,a,l,e.abortSignal)}}async*_traverseIdSet(e,t,r,i){for(let n=0;n<t.length;n+=r){e.objectIds=t.slice(n,n+r),(0,p.dZ)(i);const s=await this.executeQuery(e,"execute");yield s.features}}async queryStat(e){await this._ensureLoaded();const t=this._layer.capabilities?.query,r=!!t?.supportsSqlExpression,i=!!t?.supportsStatistics,n=!!t?.supportsDistinct,s=(0,m.Dp)(e.stat);if("count"===s)return n?this._queryCount(e):{calculated:!1};const a=e.field;if(null==a)return{calculated:!1};if(!1===i||!1===(0,f.DA)(a)&&!1===r||!1===a.isStandardized)return null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(e.stat,a,e.limit??y.gO,e.abortSignal);if("distinct"===s)return!1===n?null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(s,a,e.limit??y.gO,e.abortSignal):{calculated:!1};const l=await this.databaseType();if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:null};const o=this._createQuery();o.where=(0,w.mA)(o.where,null==e.where?null==e.spatialFilter?"1=1":"":(0,f.YY)(e.where,l)),null!=e.spatialFilter&&(o.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),o.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),o.geometry=e.spatialFilter.geometry);const u=new A.A;u.statisticType=s,u.onStatisticField=(0,f.YY)(a,l),u.outStatisticFieldName="ARCADE_STAT_RESULT",o.returnGeometry=!1;let c="ARCADE_STAT_RESULT";o.outStatistics=[u];const d=await this.executeQuery(o,"execute");if(!d.hasOwnProperty("features")||0===d.features.length)throw new p.dr("InvalidStatResponse");let h=!1;const g=d.fields??[];for(const e of g)if("ARCADE_STAT_RESULT"===e.name.toUpperCase()){c=e.name,"date"===e.type&&(h=!0);break}const _=d.features[0].attributes[c];return{calculated:!0,result:h&&null!=_?new Date(_):_}}async _queryCount(e){const t=await this.databaseType();if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:0};const r=this._createQuery();return r.where=(0,w.mA)(r.where,null==e.where?null==e.spatialFilter?"1=1":"":(0,f.YY)(e.where,t)),null!=e.spatialFilter&&(r.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),r.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),r.geometry=e.spatialFilter.geometry),r.returnGeometry=!1,{calculated:!0,result:await this.executeQuery(r,"executeForCount")}}async canQueryAggregate(e){await this._ensureLoaded();let t=!1;const r=this._layer.capabilities?.query,i=!0===r?.supportsSqlExpression;if(null!=r&&!0===r.supportsStatistics&&!0===r.supportsOrderBy&&(t=!0),t)for(const r of e.statistics)(!1===r.workingexpr?.isStandardized||!1===(0,f.DA)(r.workingexpr)&&!1===i)&&(t=!1);return t}async queryAggregate(e){if(await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter)return h.An;const t=await this.databaseType(),r=e.groupBy,i=e.orderBy;let n=null;if(!this._layer.capabilities.query.supportsPaginationOnAggregatedQueries){const e=this.getFieldsIndex();n={keyFields:r.map((t,r)=>({name:e.normalizeFieldName(t)??t,asc:null==i||1===i._directions[r]}))}}let s="",a=!1;null!=i&&!0===this._layer.capabilities?.query?.supportsOrderBy&&(null==n||(0,g.MJ)(r,0,r.length,i._fields,0,Math.min(i._fields.length,r.length),(e,t)=>e.toLowerCase()===t.toLowerCase()))&&(s=i.constructClause(),a=!0),""===s&&(s=r.join(","));const l=e.statistics.map(e=>new A.A({onStatisticField:null!==e.workingexpr?(0,f.YY)(e.workingexpr,t):"",outStatisticFieldName:e.field,statisticType:e.toStatisticsName()}));let o=this._maxQueryRate();const u=this._layer.capabilities?.query.maxRecordCount;null!=u&&u<o&&(o=u);const c=null==e.where?null==e.spatialFilter?"1=1":"":(0,f.YY)(e.where,t),d=this._createQuery();return d.where=(0,w.mA)(d.where,c),null!=e.spatialFilter&&(d.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),d.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),d.geometry=e.spatialFilter.geometry),d.orderByFields=""!==s?s.split(","):null,d.outFields=["*"],d.outStatistics=l,d.groupByFieldsForStatistics=r,d.returnGeometry=!1,null==n?{filterApplied:!0,spatialFilterApplied:!0,ordered:a,features:this._queryPaginated(d,o,e.abortSignal)}:{filterApplied:!0,spatialFilterApplied:!0,ordered:a,features:this._queryKeysetPaginated(d,n,e.abortSignal)}}async*_queryKeysetPaginated(e,t,r){const i=e.where;for(;;){if(null!=t.clause){if(!this._layer.capabilities.query.supportsOrderBy)throw new p.dr("NotImplemented");e.where=(0,w.mA)(i,(0,f.YY)(t.clause,await this.databaseType()))}const n=await this.executeQuery(e,"execute");if((0,p.dZ)(r),!n.hasOwnProperty("features"))throw new p.dr("InvalidStatResponse");if(yield n.features,0===n.features.length||!n.exceededTransferLimit)break;C(t,n.features.at(-1))}}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,this.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),this._requestStandardised&&(e.sqlFormat="standard"),this._useDefinitionExpression?"subtype-group"===this._layer.type&&(e.where=this._layer.definitionExpression):e.where=null,e}executeQuery(e,t){const r="execute"===t?this._layer.queryFeatures.bind(this._layer):"executeForCount"===t?this._layer.queryFeatureCount.bind(this._layer):this._layer.queryObjectIds.bind(this._layer);let i=null;if(this._recentlyUsedQueries){const t=this.convertQueryToLruCacheKey(e);i=this._recentlyUsedQueries.getFromCache(t),null===i&&(i=r(e),this._recentlyUsedQueries.addToCache(t,i),i=i.catch(e=>{throw this._recentlyUsedQueries?.removeFromCache(t),e}))}return this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===i&&(i=r(e)),i}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let r=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return r||t.push(this.objectIdField),t}isTable(){return this._layer.isTable||null===this._layer.geometryType||"table"===this._layer.type||""===this._layer.geometryType||"esriGeometryNull"===this._layer.geometryType}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}static create(e,t,r,i,n){const s=new v.default({url:e,outFields:null===t?["*"]:t});return new R({layer:s,spatialReference:r,lrucache:i,interceptor:n})}relationshipMetadata(){return this._layer&&this._layer.source&&this._layer.source.sourceJSON?.relationships?this._layer.source.sourceJSON.relationships:[]}serviceUrl(){return(0,y.Qi)(this._layer.parsedUrl.path)}async queryAttachments(e,t,r,i,n){const s=this._layer;if(!function(e){const t=e.capabilities;return t?.data.supportsAttachment&&t?.operations.supportsQueryAttachments}(s))return[];const a=new T.A({objectIds:[e],returnMetadata:n});(t&&t>0||r&&r>0)&&(a.size=[t&&t>0?t:0,r&&r>0?r:t+1]),i&&i.length>0&&(a.attachmentTypes=i),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:s,query:a,method:"attachments"});const l=await s.queryAttachments(a);return l?.[e]?l[e].map(t=>{const r=`${this._layer.parsedUrl.path}/${e}/attachments/${t.id}`;let i=null;return n&&t.exifInfo&&(i=d.A.convertJsonToArcade(t.exifInfo,"system",!0)),new c.A(t.id,t.name,t.contentType,t.size,r,i,t.keywords??null)}):[]}async queryRelatedFeatures(e){const t=(0,I.dw)(e);t.f="json",this._requestStandardised&&(t.sqlFormat="standard"),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:t,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"});const r=await(0,i.A)(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:t});if(r.data){const e={},t=r.data;if(t?.relatedRecordGroups){const r=t.spatialReference,i=!0===t.exceededTransferLimit;for(const n of t.relatedRecordGroups){const t=n.relatedRecords.map(e=>(e.geometry&&(e.geometry.spatialReference=r),new l.A({geometry:e.geometry?(0,F.rS)(e.geometry):null,attributes:e.attributes})));e[n.objectId]={features:t,exceededTransferLimit:i}}}return e}throw new p.dr("InvalidRequest")}async getFeatureByObjectId(e,t){const r=this._createQuery();r.outFields=t,r.returnGeometry=!1,r.outSpatialReference=this.spatialReference,r.where=(0,w.mA)(r.where,this.objectIdField+"="+e.toString()),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:r,method:"execute"});const i=await this._layer.queryFeatures(r);return 1===i.features.length?i.features[0]:null}async getIdentityUser(){await this.load();const e=o.id?.findCredential(this._layer.url);return e?e.userId:null}async getOwningSystemUrl(){await this.load();const e=o.id?.findServerInfo(this._layer.url);if(e)return e.owningSystemUrl??"";let t=this._layer.url;const r=t.toLowerCase().indexOf("/rest/services");if(t=r>-1?t.slice(0,r):t,t){t+="/rest/info";try{const e=await(0,i.A)(t,{query:{f:"json"}});let r="";return e.data?.owningSystemUrl&&(r=e.data.owningSystemUrl),r}catch{return""}}return""}getDataSourceFeatureSet(){const e=new R({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._overrideFields??void 0,includeGeometry:!this._removeGeometry,lrucache:this._recentlyUsedQueries??void 0,interceptor:this._featureSetQueryInterceptor??void 0});return e._useDefinitionExpression=!1,e}get preferredTimeZone(){return this._layer.preferredTimeZone??null}get dateFieldsTimeZone(){return this._layer.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._layer.datesInUnknownTimezone??!1}get editFieldsInfo(){return this._layer.editFieldsInfo??null}get timeInfo(){return this._layer.timeInfo??null}async getFeatureSetInfo(){if(this._featureSetInfo)return this._featureSetInfo;let e=null,t="serviceItemId"in this._layer?this._layer.serviceItemId:null;const r=this._layer.parsedUrl?.path??null;if(r){const n=await(0,i.A)(r,{responseType:"json",query:{f:"json"}});e=n?.data?.name??null,t=n?.data?.serviceItemId??null}const n=this._layer.title&&null!==(this._layer.parent??null);return this._featureSetInfo={layerId:this._layer.layerId,layerName:""===e?null:e,itemId:""===t?null:t,serviceLayerUrl:""===r?null:r,webMapLayerId:n?this._layer.id??null:null,webMapLayerTitle:n?this._layer.title??null:null,className:null,objectClassId:null},this._featureSetInfo}}var x=r(30235),M=r(52006);class L extends h.Jn{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerOGC",this._outFields=null,this._returnGeometry=!0,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),null!=e.outFields&&(this._outFields=e.outFields),null!=e.includeGeometry&&(this._returnGeometry=e.includeGeometry)}_maxQueryRate(){return this._layer.effectiveMaxRecordCount}async loadImpl(){return this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(this.spatialReference??=this._layer.spatialReference,this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),null!=this._outFields)if(1===this._outFields.length&&"*"===this._outFields[0])this._outFields=null;else{const e=new Set(this._outFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({name:t})=>t===this._layer.objectIdField||e.has(t.toLowerCase())),this._outFields=this.fields.map(({name:e})=>e)}this.objectIdField=this._layer.objectIdField,this.hasZ=!!this._layer.hasZ,this.hasM=!1,this.typeIdField=this._layer.typeIdField??"",this.types=this._layer.types??null;const e=this._layer.source.getSource().layerDefinition.featureCount;null!=e&&e>=0&&(this._totalCount=e)}isTable(){return this._layer.isTable}async _queryAll(){const e=this._layer.createQuery();return e.outSpatialReference=this.spatialReference,this._queryPaginated(e,this._layer.effectiveMaxRecordCount,u._)}async query(e){await this._ensureLoaded();const t=this._layer.createQuery();if(t.outSpatialReference=this.spatialReference,null!=e.spatialFilter&&!(0,M.Ed)(e.spatialFilter.geometry))switch(e.spatialFilter.relation){case"esriSpatialRelIntersects":case"esriSpatialRelContains":case"esriSpatialRelOverlaps":case"esriSpatialRelWithin":case"esriSpatialRelTouches":case"esriSpatialRelCrosses":t.geometry=e.spatialFilter.geometry.extent}return this._hasCachedFeatures||null==t.geometry?{filterApplied:null==e.where,spatialFilterApplied:null==e.spatialFilter,ordered:!1,features:await this.queryAll(e.abortSignal)}:{filterApplied:null==e.where,spatialFilterApplied:null==e.spatialFilter||"extent"===e.spatialFilter.geometry.type&&"esriSpatialRelIntersects"===e.spatialFilter.relation,ordered:!1,features:this._queryPaginated(t,this._layer.effectiveMaxRecordCount,e.abortSignal)}}async*_queryPaginated(e,t,r){let i;e.num=t,e.start=0;do{(0,p.dZ)(r),i=await this._layer.queryFeatures(e),yield i.features.map(e=>{const t={};for(const r of this.fields)t[r.name]=e.attributes[r.name];return new l.A({geometry:this._returnGeometry&&!this.isTable()?e.geometry:null,attributes:t})}),e.start+=i.features.length}while(i.exceededTransferLimit)}async queryStat(e){return{calculated:!1}}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new p.dr("NeverReach")}nativeCapabilities(){return{title:this._layer.title??"",canQueryRelated:!1,source:this,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:!0}}async queryAttachments(){return[]}serviceUrl(){return""}relationshipMetadata(){return[]}get gdbVersion(){return""}getFeatureByObjectId(){throw new p.dr("NeverReach")}async getOwningSystemUrl(){return""}async getIdentityUser(){return""}get preferredTimeZone(){return null}get dateFieldsTimeZone(){return null}get datesInUnknownTimezone(){return!1}get editFieldsInfo(){return null}get timeInfo(){return this._layer.timeInfo}async getFeatureSetInfo(){const e=this._layer.title&&this._layer.parent;return{layerId:null,layerName:null,itemId:null,serviceLayerUrl:null,webMapLayerId:e?this._layer.id??null:null,webMapLayerTitle:e?this._layer.title??null:null,className:null,objectClassId:null}}}var j=r(26591);class O extends h.Jn{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerRelated",this._removeGeometry=!1,this._overrideFields=null,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),this._findObjectId=e.objectId,this.relationship=e.relationship,this._relatedLayer=e.relatedLayer,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return y.gO}async loadImpl(){return await Promise.all([this._layer.load(),this._relatedLayer.load()]),this._initialiseFeatureSet(),this}nativeCapabilities(){return this._relatedLayer.nativeCapabilities()}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._relatedLayer.geometryType,this.fields=this._relatedLayer.fields.slice(),this.hasZ=this._relatedLayer.hasZ,this.hasM=this._relatedLayer.hasM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=new Set(this._overrideFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||e.has(r.toLowerCase())),this._overrideFields=this.fields.map(({name:e})=>e)}const e=this._layer.nativeCapabilities();e&&(this._databaseType=e.databaseType),this.objectIdField=this._relatedLayer.objectIdField,this.globalIdField=this._relatedLayer.globalIdField,this.hasM=this._relatedLayer.supportsM,this.hasZ=this._relatedLayer.supportsZ,this.typeIdField=this._relatedLayer.typeIdField,this.types=this._relatedLayer.types,this.subtypeField=this._relatedLayer.subtypeField,this.subtypes=this._relatedLayer.subtypes}async databaseType(){return this._databaseType=await this._relatedLayer.databaseType(),this._databaseType}isTable(){return this._relatedLayer.isTable()}async _queryAll(){return(await this.query({abortSignal:u._})).features}async query(e){if(await this._ensureLoaded(),await this.databaseType(),this.isTable()&&null!=e.spatialFilter)return h.An;const t=this._layer.nativeCapabilities();if(!1===t.canQueryRelated)return h.An;if(t.capabilities?.queryRelated.supportsPagination)return this._queryUsingPaging(t.source,e);let r="",i=!1;null!=e.orderBy&&!0===t.capabilities?.queryRelated.supportsOrderBy&&(r=e.orderBy.constructClause(),i=!0);const n=new j.default;return n.objectIds=[this._findObjectId],n.outFields=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map(e=>e.name):["*"]),n.relationshipId=this.relationship.id,n.where="1=1",n.returnGeometry=!0!==this._removeGeometry,n.outSpatialReference=this.spatialReference,n.orderByFields=""!==r?r.split(","):null,{filterApplied:null==e.where,spatialFilterApplied:null==e.spatialFilter,ordered:i,features:async function*(){const r=await t.source.queryRelatedFeatures(n);(0,p.dZ)(e.abortSignal),yield r[this._findObjectId]?r[this._findObjectId].features:[]}.apply(this)}}async _queryUsingPaging(e,t){let r="",i=!1;const n=this._layer.nativeCapabilities();null!=t.orderBy&&!0===n.capabilities?.queryRelated.supportsOrderBy&&(r=t.orderBy.constructClause(),i=!0),await this.databaseType();let s=this._maxQueryRate();const a=n.capabilities?.query.maxRecordCount;null!=a&&a<s&&(s=a);const l=new j.default;return l.relationshipId=this.relationship.id,l.objectIds=[this._findObjectId],l.outFields=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map(e=>e.name):["*"]),l.where="1=1",l.orderByFields=""!==r?r.split(","):null,l.returnGeometry=!0!==this._removeGeometry,l.outSpatialReference=this.spatialReference,{filterApplied:null==t.where,spatialFilterApplied:null==t.spatialFilter,ordered:i,features:this._queryPaginated(e,l,s,t.abortSignal)}}async*_queryPaginated(e,t,r,i){let n;t.num=r,t.start=0;do{(0,p.dZ)(i),n=(await e.queryRelatedFeatures(t))[this._findObjectId]??{exceededTransferLimit:!1,features:[]},yield n.features,t.start+=r}while(void 0===n.exceededTransferLimit&&n.features.length===r||!1!==n.exceededTransferLimit)}async queryStat(e){return{calculated:!1}}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new p.dr("NeverReach")}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let r=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return r||t.push(this.objectIdField),t}get gdbVersion(){return this._relatedLayer.gdbVersion}relationshipMetadata(){return this._relatedLayer.relationshipMetadata()}serviceUrl(){return this._relatedLayer.serviceUrl()}queryAttachments(e,t,r,i,n){return this._relatedLayer.queryAttachments(e,t,r,i,n)}getFeatureByObjectId(e,t){return this._relatedLayer.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._relatedLayer.getOwningSystemUrl()}getIdentityUser(){return this._relatedLayer.getIdentityUser()}getDataSourceFeatureSet(){return this._relatedLayer}get preferredTimeZone(){return this._relatedLayer.preferredTimeZone??null}get dateFieldsTimeZone(){return this._relatedLayer.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._relatedLayer.datesInUnknownTimezone}get editFieldsInfo(){return this._relatedLayer.editFieldsInfo??null}get timeInfo(){return this._relatedLayer.timeInfo??null}getFeatureSetInfo(){return this._relatedLayer.getFeatureSetInfo()}}var k=r(23732),Z=r(92474),q=r(4146),E=r(80812);function N(){null===k.A.applicationCache&&(k.A.applicationCache=new k.A)}async function P(e,t,r){if(k.A.applicationCache){const r=k.A.applicationCache.getLayerInfo(e);if(r){const i=await r;return new v.default({url:e,outFields:t,sourceJSON:i})}const i=new v.default({url:e,outFields:t}),n=(async()=>(await i.load(),i.sourceJSON))();if(k.A.applicationCache){k.A.applicationCache.setLayerInfo(e,n);try{return await n,i}catch(t){throw k.A.applicationCache.clearLayerInfo(e),t}}return await n,i}if(null!=r){const i=r.getCachedLayerMetadata(e);if(i){const r=await i;return new v.default({url:e,outFields:t,sourceJSON:r})}const n=new v.default({url:e,outFields:t}),s=(async()=>(await n.load(),n.sourceJSON))();r.setCachedLayerMetadata(e,s);try{return await s,n}catch(t){throw r.removeCachedLayerMetadata(e,s),t}}return new v.default({url:e,outFields:t})}async function D(e,t,r,i,n,s=null){return G(await P(e,["*"],n),t,r,i,n,s)}function G(e,t=null,r=null,i=!0,n=null,s=null){switch(e.type){case"catalog-footprint":return G(e.parent,t,r,i,n,s);case"subtype-sublayer":{const l=G(e.parent,t,r,i,n,s);return new a.A({parentfeatureset:l,whereclause:b.A.create(e.parent.subtypeField+"="+e.subtypeCode.toString(),{fieldsIndex:e.parent.fieldsIndex,timeZone:l.dateFieldsTimeZoneDefaultUTC})})}case"csv":case"geojson":case"knowledge-graph-sublayer":case"wfs":return new x.A({layer:e,spatialReference:t,outFields:r,includeGeometry:i,lrucache:n,interceptor:s});case"catalog":case"feature":case"oriented-imagery":case"subtype-group":{const a={layer:e,spatialReference:t,outFields:r,includeGeometry:i,lrucache:n,interceptor:s};return!e.url&&e.source?new x.A(a):new R(a)}case"ogc-feature":return new L({layer:e,spatialReference:t,outFields:r,includeGeometry:i});default:throw new Error(`Unsupported layer type: ${e.type}`)}}async function U(e,t){if(null!==k.A.applicationCache){const t=k.A.applicationCache.getLayerInfo(e);if(null!==t)return t}if(null!=t){const r=t.getCachedServiceMetadata(e);if(null!=r)return r}const r=(async()=>{const t=await(0,i.A)(e,{responseType:"json",query:{f:"json"}});if(t.data){const e=t.data;return e.layers||(e.layers=[]),e.tables||(e.tables=[]),e}return{layers:[],tables:[]}})();if(null!==k.A.applicationCache){k.A.applicationCache.setLayerInfo(e,r);try{return await r}catch(t){throw k.A.applicationCache.clearLayerInfo(e),t}}if(null!=t){t.setCachedServiceMetadata(e,r);try{return await r}catch(i){throw t.removeCachedServiceMetadata(e,r),i}}return r}async function B(e,t,r){const n={metadata:null,networkId:-1,unVersion:3,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map,queryelem:null,layerNameLkp:{},lkp:null},s=await U(e,null);if(n.metadata=s,void 0!==s.controllerDatasetLayers?.utilityNetworkLayerId&&null!==s.controllerDatasetLayers.utilityNetworkLayerId){if(s.layers)for(const e of s.layers)n.layerNameLkp[e.id]=e.name;if(s.tables)for(const e of s.tables)n.layerNameLkp[e.id]=e.name;const l=s.controllerDatasetLayers.utilityNetworkLayerId;n.networkId=l;const o=await async function(e,t){const r="QUERYDATAELEMTS:"+t.toString()+":"+e;if(null!==k.A.applicationCache){const e=k.A.applicationCache.getLayerInfo(r);if(null!==e)return e}const n=(async()=>{const r=await(0,i.A)(e+"/queryDataElements",{method:"post",responseType:"json",query:{layers:JSON.stringify([t.toString()]),f:"json"}});if(r.data){const e=r.data;if(e.layerDataElements?.[0])return e.layerDataElements[0]}throw new p.dr("DataElementsNotFound")})();if(null!==k.A.applicationCache){k.A.applicationCache.setLayerInfo(r,n);try{return await n}catch(e){throw k.A.applicationCache.clearLayerInfo(r),e}}return n}(e,l);if(o){n.queryelem=o,n.queryelem?.dataElement&&void 0!==n.queryelem.dataElement.schemaGeneration&&(n.unVersion=n.queryelem.dataElement.schemaGeneration),n.lkp={},n.queryelem.dataElement.domainNetworks||(n.queryelem.dataElement.domainNetworks=[]);for(const e of n.queryelem.dataElement.domainNetworks){for(const t of e.edgeSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:n.layerNameLkp[t.layerId]??null};n.layerIdLookup.set(e.layerId,e),n.sourceIdLookup.set(e.sourceId,e),e.className&&(n.lkp[e.className]=e)}for(const t of e.junctionSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:n.layerNameLkp[t.layerId]??null};n.layerIdLookup.set(e.layerId,e),n.sourceIdLookup.set(e.sourceId,e),e.className&&(n.lkp[e.className]=e)}}if(n.queryelem.dataElement.terminalConfigurations)for(const e of n.queryelem.dataElement.terminalConfigurations)for(const t of e.terminals)n.terminals.push({terminalId:t.terminalId,terminalName:t.terminalName});const s=await async function(e){if(null!==k.A.applicationCache){const t=k.A.applicationCache.getLayerInfo(e);if(null!==t)return t}const t=(async()=>{const t=await(0,i.A)(e,{responseType:"json",query:{f:"json"}});return t.data?t.data:null})();if(null!==k.A.applicationCache){k.A.applicationCache.setLayerInfo(e,t);try{return await t}catch(t){throw k.A.applicationCache.clearLayerInfo(e),t}}return t}(e+"/"+l);if(void 0!==s.systemLayers?.associationsTableId&&null!==s.systemLayers.associationsTableId){let i=null;if(r&&n.unVersion<8){const r=[];n.unVersion>=4&&(r.push("STATUS"),r.push("PERCENTALONG")),i=await D(e+"/"+s.systemLayers.associationsTableId,t,["OBJECTID","FROMNETWORKSOURCEID","TONETWORKSOURCEID","FROMGLOBALID","TOGLOBALID","TOTERMINALID","FROMTERMINALID","ASSOCIATIONTYPE","ISCONTENTVISIBLE","GLOBALID",...r],!1,null,null),await i.load(),n.unVersion>=4&&(i=new a.A({parentfeatureset:i,whereclause:b.A.create("STATUS NOT IN (1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63)",{fieldsIndex:i.getFieldsIndex(),timeZone:i.dateFieldsTimeZoneDefaultUTC})}),await i.load())}return{lkp:n.lkp,associations:i,unVersion:n.unVersion,terminals:n.terminals,layerIdLookup:n.layerIdLookup,sourceIdLookup:n.sourceIdLookup}}return{associations:null,unVersion:n.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:n.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:n.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}async function $(e,t,r,i=null,n=null,s=!0,a=null,l=null){let o=e.serviceUrl();if(!o)return null;o=o.endsWith("/")?o+t.relatedTableId.toString():o+"/"+t.relatedTableId.toString();const u=await D(o,i,n,s,a,l);return new O({layer:e,relatedLayer:u,relationship:t,objectId:r,spatialReference:i,outFields:n,includeGeometry:s,lrucache:a,interceptor:l})}class z extends n{constructor(e,t=null,r=null,i=null){super(),this._map=e,this._overrideSpatialReference=t,this._lrucache=r,this._interceptor=i,this._instantLayers=[]}_makeAndAddFeatureSet(e,t=!0,r=null){const i=G(e,this._overrideSpatialReference,null===r?["*"]:r,t,this._lrucache,this._interceptor);return this._instantLayers.push({featureset:i,opitem:e,includeGeometry:t,outFields:JSON.stringify(r)}),i}async featureSetByName(e,t=!0,r=null){if((0,Z.Zm)(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetByName(e,t,r);null===r&&(r=["*"]),r=(r=r.slice()).sort();const i=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const n=this._instantLayers[r];if(n.opitem.title===e&&n.includeGeometry===t&&n.outFields===i)return this._instantLayers[r].featureset}const n=this._map.allLayers.find(t=>(0,y.eB)(t)&&t.title===e);if(null!=n)return this._makeAndAddFeatureSet(n,t,r);if(this._map.allTables){const i=this._map.allTables.find(t=>(0,y.eB)(t)&&t.title===e);if(null!=i)return this._makeAndAddFeatureSet(i,t,r)}return null}async featureSetById(e,t=!0,r=["*"]){if((0,Z.Zm)(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetById(e,t,r);null===r&&(r=["*"]),r=(r=r.slice()).sort();const i=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const n=this._instantLayers[r];if(n.opitem.id===e&&n.includeGeometry===t&&n.outFields===i)return this._instantLayers[r].featureset}const n=this._map.allLayers.find(t=>(0,y.eB)(t)&&t.id===e);if(n)return this._makeAndAddFeatureSet(n,t,r);if(this._map.allTables){const i=this._map.allTables.find(t=>(0,y.eB)(t)&&t.id===e);if(null!=i)return this._makeAndAddFeatureSet(i,t,r)}return null}}class Q extends n{constructor(e,t=null,r=null,i=null){super(),this._url=e,this._overrideSpatialReference=t,this._lrucache=r,this._interceptor=i,this.metadata=null,this._instantLayers=[]}get url(){return this._url}_makeAndAddFeatureSet(e,t=!0,r=null){const i=G(e,this._overrideSpatialReference,null===r?["*"]:r,t,this._lrucache);return this._instantLayers.push({featureset:i,opitem:e,includeGeometry:t,outFields:JSON.stringify(r)}),i}async _loadMetaData(){const e=await U(this._url,this._lrucache);return this.metadata=e,e}load(){return this._loadMetaData()}clone(){return new Q(this._url,this._overrideSpatialReference,this._lrucache,this._interceptor)}async featureSetByName(e,t=!0,r=null){null===r&&(r=["*"]),r=(r=r.slice()).sort();const i=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const n=this._instantLayers[r];if(n.opitem.title===e&&n.includeGeometry===t&&n.outFields===i)return this._instantLayers[r].featureset}const n=await this._loadMetaData();let s=null;for(const t of n.layers??[])t.name===e&&(s=t);if(!s)for(const t of n.tables??[])t.name===e&&(s=t);if(s){const e=await P(this._url+"/"+s.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,r)}return null}async featureSetById(e,t=!0,r=["*"]){null===r&&(r=["*"]),r=(r=r.slice()).sort();const i=JSON.stringify(r);e=null!=e?e.toString():"";for(let r=0;r<this._instantLayers.length;r++){const n=this._instantLayers[r];if(n.opitem.id===e&&n.includeGeometry===t&&n.outFields===i)return this._instantLayers[r].featureset}const n=await this._loadMetaData();let s=null;for(const t of n.layers??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(s=t);if(!s)for(const t of n.tables??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(s=t);if(s){const e=await P(this._url+"/"+s.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,r)}return null}}function J(e,t,r=null,i=null){return new z(e,t,r,i)}function V(e,t,r=null,i=null){return new Q(e,t,r,i)}function K(e,t,r,i,n){if(null===e)return null;if((0,s.m)(e)){switch(t){case"datasource":return e.getDataSourceFeatureSet();case"parent":return e;case"root":return e.getRootFeatureSet()}return null}if(e instanceof q.A&&(0,y.NI)(e)){const s=e;switch(t){case"datasource":return G(s,n,"outFields"in s?s.outFields:null,!0,r,i).getDataSourceFeatureSet();case"parent":case"root":return G(s,n,"outFields"in s?s.outFields:null,!0,r,i)}return null}if((0,s.a1)(e)){switch(t){case"datasource":return G(e.parent,n,e.parent.outFields,!0,r,i).getDataSourceFeatureSet();case"parent":case"root":return G(e,n,e.parent.outFields,!0,r,i)}return null}return null}async function Y(e,t,r,i,n,s,a,l=null){if(k.A.applicationCache){const o=k.A.applicationCache.getLayerInfo(e+":"+s.url);if(o)return W(await o,t,r,i,n,a,l)}if(null!=a){const o=a.getCachedPortalItem(s.url,e);if(null!=o)return await W(await o,t,r,i,n,a,l)}const o=new E.default({id:e,portal:s}).load();k.A.applicationCache?k.A.applicationCache.setLayerInfo(e+":"+s.url,o):null!=a&&a.setCachedPortalItem(s.url,e,o);try{return await W(await o,t,r,i,n,a,l)}catch(t){throw k.A.applicationCache&&k.A.applicationCache.clearLayerInfo(e+":"+s.url),null!=a&&a.removeCachedPortalItem(s.url,e,o),t}}async function W(e,t,r,i,n,s,a){let l;if("Feature Service"===e.type||"Map Service"===e.type)l=await P((0,y.Qi)(e.url??"")+"/"+t,["*"],s);else{if(t)throw new Error(`layerId=${t} provided for ${e.type} item`);if(null!=s){const t=s.getCachedPortalItemLayer(e.portal.url,e.id);if(null!=t)l=await t;else{const t=q.A.fromPortalItem(e);s.setCachedPortalItemLayer(e.portal.url,e.id,t);try{l=await t}catch(r){throw s.removeCachedPortalItemLayer(e.portal.url,e.id,t),r}}}else l=await q.A.fromPortalItem(e)}return G(l,r,i,n,s,a)}},32730:(e,t,r)=>{r.d(t,{BI:()=>m,D3:()=>y,XJ:()=>f,lc:()=>h,mX:()=>_,rU:()=>g,tH:()=>I});var i=r(799);const n="__begin__",s="__end__",a=new RegExp(n,"ig"),l=new RegExp(s,"ig"),o=new RegExp("^"+n,"i"),u=new RegExp(s+"$","i"),c='"',d=c+" + ",p=" + "+c;function h(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function y(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function f(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=h(e.labelExpression),t.type="conventional"),t}function m(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return _(t.expression);case"arcade":return t.expression}return null}function g(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return I(t.expression)}return null}function _(e){let t;return e?(t=(0,i.HC)(e,e=>n+'$feature["'+e+'"]'+s),t=o.test(t)?t.replace(o,""):c+t,t=u.test(t)?t.replace(u,""):t+c,t=t.replaceAll(a,d).replaceAll(l,p)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,F=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,v=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function I(e){if(!e)return null;let t=b.exec(e)||F.exec(e);return t?t[1]||t[3]:(t=v.exec(e),t?t[2]:null)}},32756:(e,t,r)=>{r.d(t,{Rr:()=>l,fY:()=>u,ne:()=>o});var i=r(31635),n=r(93637),s=r(91429),a=r(91880);function l(e,t,r){if(!e)return null;const i=e.find(e=>!!e.field);if(!i)return null;const n=new a.A;return n.read(i,r),[n]}const o={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,i){const s=e.find(e=>!!e.field);s&&(0,n.sM)(r,[s.toJSON()],t)}}}},u=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,s.MZ)(o)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.OrderedLayer")],r),r}},33143:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(31635),n=r(69540),s=r(25482),a=r(91429),l=r(8631),o=r(29005),u=r(36005),c=r(43937);let d=class extends((0,n.OU)(s.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,l.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,i.Cg)([(0,u.w)("domains")],d.prototype,"readDomains",null),(0,i.Cg)([(0,c.K)("domains")],d.prototype,"writeDomains",null),(0,i.Cg)([(0,a.MZ)({type:[o.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,i.Cg)([(0,a.$K)("esri.layers.support.FeatureType")],d)},35704:(e,t,r)=>{r.d(t,{A:()=>u});var i=r(48938),n=r(87449),s=r(11221),a=r(33325),l=r(80609),o=r(88368);class u extends s.t1{constructor(e){super(),this.declaredClass="esri.arcade.featureset.actions.AttributeFilter",this._maxProcessing=1e3,this._parent=e.parentfeatureset,e.whereclause instanceof o.A?(this._whereClause=e.whereclause,this._whereClauseFunction=null):(this._whereClauseFunction=e.whereclause,this._whereClause=null)}_initialiseFeatureSet(){this.fields=this._parent.fields.slice(),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types,this.subtypeField=this._parent.subtypeField,this.subtypes=this._parent.subtypes}async _queryAll(){return(await this.query({abortSignal:i._})).features}async query(e){let t=e.where;null!==this._whereClauseFunction||(null!=t?null!==this._whereClause&&(t=(0,l.kg)(this._whereClause,t)):t=this._whereClause),await this._ensureLoaded();const r=await this._parent.query({...e,where:t});return(0,n.dZ)(e.abortSignal),r.filterApplied&&null==this._whereClauseFunction?r:{...r,features:this._applyFilter(r.features,e.abortSignal)}}async*_applyFilter(e,t){for await(const r of e)if((0,n.dZ)(t),null==this._whereClauseFunction){const e=r.filter(e=>this.executeWhereClause(e));e.length>0&&(yield e)}else{const e=[];for(const t of r)await this.executeWhereClauseDeferred(t)&&e.push(t);e.length>0&&(yield e)}}async queryStat(e){if(null!==this._whereClauseFunction)return null==e.where&&null==e.spatialFilter?this._manualStat(e.stat,e.field,e.limit??a.gO,e.abortSignal):{calculated:!1};let t=this._whereClause;null!=e.where&&null!==this._whereClause&&(t=(0,l.kg)(this._whereClause,e.where));const r=await this._parent.queryStat({...e,where:t});return r.calculated?r:null==e.where&&null==e.spatialFilter?this._manualStat(e.stat,e.field,e.limit??a.gO,e.abortSignal):{calculated:!1}}async canQueryAggregate(e){if(null!==this._whereClauseFunction)return!1;let t=e.where;return null!=t?null!==this._whereClause&&(t=(0,l.kg)(this._whereClause,t)):t=this._whereClause,this._parent.canQueryAggregate({...e,where:t})}async queryAggregate(e){let t=e.where;return null!=t?null!==this._whereClause&&(t=(0,l.kg)(this._whereClause,t)):t=this._whereClause,this._parent.queryAggregate({...e,where:t})}executeWhereClause(e){return this._whereClause?.testFeature(e)??!1}async executeWhereClauseDeferred(e){return null!==this._whereClauseFunction?this._whereClauseFunction(e):this.executeWhereClause(e)}getFieldsIndex(){return this._parent.getFieldsIndex()}}},36708:(e,t,r)=>{r.d(t,{C_:()=>p,OH:()=>f,Vh:()=>m,on:()=>d,pc:()=>g,wB:()=>o,z7:()=>u});var i=r(37955),n=r(36563),s=r(97768),a=r(74887),l=r(14012);function o(e,t,r={}){return c(e,t,r,h)}function u(e,t,r={}){return c(e,t,r,y)}function c(e,t,r={},i){let n=null;const a=r.once?(e,r)=>{i(e)&&((0,s.xt)(n),t(e,r))}:(e,r)=>{i(e)&&t(e,r)};if(n=(0,l.Cn)(e,a,r.sync,r.equals),r.initial){const t=e();a(t,t)}return n}function d(e,t,r,a={}){let l=null,u=null,c=null;function d(){l&&u&&(u.remove(),a.onListenerRemove?.(l),l=null,u=null)}function p(e){a.once&&a.once&&(0,s.xt)(c),r(e)}const h=o(e,(e,r)=>{d(),(0,i.wb)(e)&&(l=e,u=(0,i.on)(e,t,p),a.onListenerAdd?.(e))},{sync:a.sync,initial:!0});return c=(0,n.hA)(()=>{h.remove(),d()}),c}function p(e,t){return function(e,t,r){if((0,a.G4)(r))return Promise.reject((0,a.NK)());const i=e();if(t?.(i))return Promise.resolve(i);let l=null;function o(){l=(0,s.xt)(l)}return new Promise((i,s)=>{l=(0,n.vE)([(0,a.u7)(r,()=>{o(),s((0,a.NK)())}),c(e,e=>{o(),i(e)},{sync:!1,once:!0},t??h)])})}(e,y,t)}function h(e){return!0}function y(e){return!!e}r(80559);const f={sync:!0},m={initial:!0},g={sync:!0,initial:!0}},37352:(e,t,r)=>{r.d(t,{A:()=>o});var i,n=r(31635),s=r(7762),a=r(25482),l=r(91429);let o=i=class extends a.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new s.A}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,n.Cg)([(0,l.MZ)({type:String,json:{write:{isRequired:!0}}})],o.prototype,"floorField",void 0),(0,n.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],o.prototype,"viewAllMode",void 0),(0,n.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],o.prototype,"viewAllLevelIds",void 0),o=i=(0,n.Cg)([(0,l.$K)("esri.layers.support.LayerFloorInfo")],o)},37539:(e,t,r)=>{r.d(t,{pO:()=>f,jd:()=>p,Tp:()=>h,w5:()=>d});var i=r(34727),n=r(86211),s=r(73941),a=r(79258);Math.PI;const l=a.$O.radius,o=a.$O.eccentricitySquared,u={a1:l*o,a2:l*o*l*o,a3:l*o*o/2,a4:l*o*l*o*2.5,a5:l*o+l*o*o/2,a6:1-o};a.$O.radius,a.$O.flattening,a.Sw.radius,a.Sw.flattening,a.sH.radius,a.sH.flattening,a.sH.radius;var c=r(21325);const d={2:{5:f,7:null,9:null,10:f,1:I,6:null,8:null,0:null,3:g,11:_,2:f,4:R},5:{5:f,7:null,9:null,10:f,1:I,6:null,8:null,0:null,3:g,11:_,2:f,4:R},7:{5:null,7:f,9:null,10:f,1:null,6:v,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:f,10:f,1:null,6:null,8:F,0:null,3:null,11:null,2:null,4:null},3:{5:m,7:null,9:null,10:m,1:function(e,t,r,i){const n=e[t]/k,s=O-2*Math.atan(Math.exp(-e[t+1]/k)),a=k+(e[t+2]??0),l=Math.cos(s)*a;r[i]=Math.cos(n)*l,r[i+1]=Math.sin(n)*l,r[i+2]=Math.sin(s)*a},6:null,8:null,0:null,3:f,11:function(e,t,r,i){m(e,t,r,i),_(r,i,r,i)},2:m,4:function(e,t,r,i){m(e,t,r,i),R(r,i,r,i)}},4:{5:x,7:null,9:null,10:x,1:function(e,t,r,i){x(e,t,r,i),I(r,i,r,i)},6:null,8:null,0:null,3:function(e,t,r,i){x(e,t,r,i),g(r,i,r,i)},11:function(e,t,r,i){x(e,t,r,i),_(r,i,r,i)},2:x,4:f},1:{5:C,7:null,9:null,10:C,1:f,6:null,8:null,0:null,3:function(e,t,r,i){C(e,t,r,i),g(r,i,r,i)},11:function(e,t,r,i){C(e,t,r,i),_(r,i,r,i)},2:C,4:function(e,t,r,i){C(e,t,r,i),R(r,i,r,i)}},6:{5:null,7:A,9:null,10:A,1:null,6:f,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:S,10:S,1:null,6:null,8:f,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:f,3:null,11:null,2:null,4:null},10:{5:f,7:f,9:f,10:f,1:I,6:v,8:F,0:null,3:g,11:_,2:f,4:R},11:{5:w,7:null,9:null,10:w,1:function(e,t,r,i){w(e,t,r,i),I(r,i,r,i)},6:null,8:null,0:null,3:function(e,t,r,i){w(e,t,r,i),g(r,i,r,i)},11:f,2:w,4:function(e,t,r,i){w(e,t,r,i),R(r,i,r,i)}}};function p(e,t){return h(e,t)?.projector}function h(e,t){if(null==e||null==t)return null;if(M.source.spatialReference===e&&M.dest.spatialReference===t)return M;const r=y(e,M.source),i=y(t,M.dest);return 0===r&&0===i?(0,c.aI)(e,t)?M.projector=f:M.projector=null:M.projector=d[r][i],M}function y(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,n.GA)(e,1)),(0,s.jA)(e)?t.spatialReferenceId=1:(0,c.oT)(e)?t.spatialReferenceId=2:(0,c.K8)(e)?t.spatialReferenceId=3:(0,c.r1)(e)?t.spatialReferenceId=11:e.wkt===s.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===s.FY.wkt?t.spatialReferenceId=6:e.wkt===s.LJ.wkt?t.spatialReferenceId=8:(0,c.q8)(e)?t.spatialReferenceId=7:(0,c.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function f(e,t,r,i){e!==r&&(r[i++]=e[t++],r[i++]=e[t++],r[i]=e[t]??0)}function m(e,t,r,i){r[i]=j*(e[t]/k),r[i+1]=j*(O-2*Math.atan(Math.exp(-e[t+1]/k))),r[i+2]=e[t+2]??0}function g(e,t,r,n){!function(e,t,r,n,s){const a=.4999999*Math.PI,l=(0,i.qE)(L*e[t+1],-a,a),o=Math.sin(l);r[n++]=L*e[t]*s.radius,r[n++]=s.halfSemiMajorAxis*Math.log((1+o)/(1-o)),r[n]=e[t+2]??0}(e,t,r,n,a.$O)}function _(e,t,r,i){r[i]=e[t]*Z,r[i+1]=e[t+1]*Z,r[i+2]=e[t+2]??0}function w(e,t,r,i){r[i]=e[t]*q,r[i+1]=e[t+1]*q,r[i+2]=e[t+2]??0}function b(e,t,r,i,n){const s=n+(e[t+2]??0),a=L*e[t],l=L*e[t+1],o=Math.cos(l)*s;r[i]=Math.cos(a)*o,r[i+1]=Math.sin(a)*o,r[i+2]=Math.sin(l)*s}function F(e,t,r,i){b(e,t,r,i,a.Sw.radius)}function v(e,t,r,i){b(e,t,r,i,a.sH.radius)}function I(e,t,r,i){b(e,t,r,i,a.$O.radius)}function T(e,t,r,n,s){const a=e[t],l=e[t+1],o=e[t+2]??0,u=Math.sqrt(a*a+l*l+o*o),c=(0,i.YN)(o/(0===u?1:u)),d=Math.atan2(l,a);r[n++]=j*d,r[n++]=j*c,r[n]=u-s}function S(e,t,r,i){T(e,t,r,i,a.Sw.radius)}function A(e,t,r,i){T(e,t,r,i,a.sH.radius)}function C(e,t,r,i){T(e,t,r,i,a.$O.radius)}function R(e,t,r,i){!function(e,t,r,i,n){const s=L*e[t],a=L*e[t+1],l=e[t+2]??0,o=Math.sin(a),u=Math.cos(a),c=n.radius/Math.sqrt(1-n.eccentricitySquared*o*o);r[i++]=(c+l)*u*Math.cos(s),r[i++]=(c+l)*u*Math.sin(s),r[i++]=(c*(1-n.eccentricitySquared)+l)*o}(e,t,r,i,a.$O)}function x(e,t,r,i){const n=u,s=e[t],l=e[t+1],o=e[t+2]??0;let c,d,p,h,y,f,m,g,_,w,b,F,v,I,T,S,A,C,R,x,M;c=Math.abs(o),d=s*s+l*l,p=Math.sqrt(d),h=d+o*o,y=Math.sqrt(h),x=Math.atan2(l,s),f=o*o/h,m=d/h,I=n.a2/y,T=n.a3-n.a4/y,m>.3?(g=c/y*(1+m*(n.a1+I+f*T)/y),R=Math.asin(g),w=g*g,_=Math.sqrt(1-w)):(_=p/y*(1-f*(n.a5-I-m*T)/y),R=Math.acos(_),w=1-_*_,g=Math.sqrt(w)),b=1-a.$O.eccentricitySquared*w,F=a.$O.radius/Math.sqrt(b),v=n.a6*F,I=p-F*_,T=c-v*g,A=_*I+g*T,S=_*T-g*I,C=S/(v/b+A),R+=C,M=A+S*C/2,o<0&&(R=-R),r[i++]=j*x,r[i++]=j*R,r[i]=M}const M={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:f},L=(0,i.kU)(1),j=(0,i.KJ)(1),O=.5*Math.PI,k=a.$O.radius,Z=k*Math.PI/180,q=180/(k*Math.PI)},41366:(e,t,r)=>{r.d(t,{K:()=>d,Q:()=>o});var i=r(31635),n=r(66552),s=r(53966),a=r(91429),l=r(93223);const o=(0,n.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",c="field",d=e=>{const t=e;let r=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,r=null!=this.normalizationTotal;return t||r?(e=t&&c||r&&u||null,t&&r&&s.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==c&&e!==u||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i.Cg)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],r.prototype,"normalizationField",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],r.prototype,"normalizationMaxValue",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],r.prototype,"normalizationMinValue",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],r.prototype,"normalizationTotal",void 0),(0,i.Cg)([(0,l.e)(o,{name:"parameters.normalizationType"})],r.prototype,"normalizationType",null),r=(0,i.Cg)([(0,a.$K)("esri.rest.support.NormalizationBinParametersMixin")],r),r}},41560:(e,t,r)=>{r.d(t,{Ch:()=>a,mW:()=>s});var i=r(34727),n=r(39516);function s(e,t){return{...t,filterMode:e.mode}}function a(e,t,r){const s=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:i}of e.filters)t[0]=Math.max(t[0],c(r)),t[1]=Math.min(t[1],d(i));return t}(e);if(s&&((0,i.gg)(t,s[0])||(0,i.ZH)(r,s[1])))return"";const a=Array.from(l(e,t,r)),o=function(e,t,r){if(0===e.length)return!0;const n=c(e.at(0)?.minScale),s=d(e.at(-1)?.maxScale);if((0,i.ZH)(n,t)||(0,i.gg)(s,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],n=e[t+1];if((0,i.ZH)(c(n.minScale),d(r.maxScale)))return!0}return!1}(a,t,r)?"1=1":a.map(e=>e.where||"1=1").reduce((e,t)=>(0,n.IW)(e,t),"");return o&&"1=1"!==o?o:""}function*l(e,t,r){if("manual"===u(e)){const t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const i of e.filters)o(i.minScale,i.maxScale,t,r)&&(yield i)}}function o(e,t,r,n){return e=c(e),r=c(r),t=d(t),!(!(0,i.Sp)(r,e)&&(n??r)>e||(0,i.Hx)(t,r)||void 0!==n&&(0,i.Sp)(n,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function c(e){return e||Number.POSITIVE_INFINITY}function d(e){return e||0}},45067:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(31635),n=r(69540),s=r(66552),a=r(25482),l=r(91429);const o=new s.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),u=new s.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let c=class extends((0,n.OU)(a.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,i.Cg)([(0,l.MZ)({json:{read:o.read,write:o.write}})],c.prototype,"cardinality",void 0),(0,i.Cg)([(0,l.MZ)({json:{name:"catalogID"}})],c.prototype,"catalogId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],c.prototype,"composite",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],c.prototype,"id",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],c.prototype,"keyField",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],c.prototype,"keyFieldInRelationshipTable",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],c.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],c.prototype,"relatedTableId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],c.prototype,"relationshipTableId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:u.read,write:u.write}})],c.prototype,"role",void 0),c=(0,i.Cg)([(0,l.$K)("esri.layers.support.Relationship")],c)},46140:(e,t,r)=>{r.d(t,{R:()=>n});var i=r(49186);let n=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[n,s]=t.split("."),a=/^\s*\d+\s*$/;if(!n?.match||!a.test(n))throw new i.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!s?.match||!a.test(s))throw new i.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const l=parseInt(n,10),o=parseInt(s,10);return new e(l,o,r)}}},50498:(e,t,r)=>{r.d(t,{Ye:()=>d,gy:()=>c,yR:()=>p});var i=r(66552),n=r(5443),s=r(91075),a=r(48526),l=r(86738),o=r(39829),u=r(82799);const c=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),d=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),p={base:s.A,key:"type",typeMap:{extent:n.A,multipoint:a.A,point:l.A,polyline:u.A,polygon:o.A}}},52106:(e,t,r)=>{r.d(t,{A:()=>F});var i,n=r(31635),s=r(37838),a=r(69540),l=r(51447),o=r(25482),u=r(53966),c=r(36708),d=r(24326),p=r(91429),h=r(12195),y=r(65864),f=r(50498),m=r(55156),g=r(60950),_=r(54339),w=r(33910);function b(e){if(null==e)return null;const t={};for(const r in e){const i=e[r];i&&(t[r]=i.toJSON())}return 0!==Object.keys(t).length?t:null}let F=class extends((0,a.OU)(o.o)){static{i=this}constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,d.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,l.eF)(u.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new i({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=(0,g.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;const r=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const t of[r,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=(0,m.I)(this.origin);if(e)return(0,_.r)(this,e);const t=this.sourceLayer??this.layer;return t?(0,_.r)(this,t):null}getGlobalId(){const e=(0,m.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);const t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){return{aggregateGeometries:b(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,h.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,i){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const n={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(n.action=i),"attributes"===e&&(n.attributeName=i),this.layer.graphicChanged(n)}_watchMeshGeometryChanges(){this.addHandles([(0,c.z7)(()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,c.z7)(()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0,()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)},{equals:(e,t)=>e===t,sync:!0})])}};(0,n.Cg)([(0,p.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const i=(0,y.rS)(e[r]);i&&(t[r]=i)}return 0!==Object.keys(t).length?t:null}}})],F.prototype,"aggregateGeometries",null),(0,n.Cg)([(0,p.MZ)({value:null})],F.prototype,"attributes",null),(0,n.Cg)([(0,p.MZ)({value:null,types:f.yR,json:{read:y.rS}})],F.prototype,"geometry",null),(0,n.Cg)([(0,p.MZ)({type:Boolean})],F.prototype,"isAggregate",void 0),(0,n.Cg)([(0,p.MZ)({clonable:!1})],F.prototype,"layer",void 0),(0,n.Cg)([(0,p.MZ)({clonable:"reference"})],F.prototype,"origin",void 0),(0,n.Cg)([(0,p.MZ)({type:s.A,value:null})],F.prototype,"popupTemplate",null),(0,n.Cg)([(0,p.MZ)({clonable:"reference"})],F.prototype,"sourceLayer",void 0),(0,n.Cg)([(0,p.MZ)({value:null,types:w.Es})],F.prototype,"symbol",null),(0,n.Cg)([(0,p.MZ)({clonable:!1,json:{read:!1,write:!1}})],F.prototype,"_version",void 0),(0,n.Cg)([(0,p.MZ)({type:Boolean,value:!0})],F.prototype,"visible",null),F=i=(0,n.Cg)([(0,p.$K)("esri.Graphic")],F)},52136:(e,t,r)=>{r.d(t,{p:()=>s});var i=r(31635),n=r(91429);const s=e=>{const t=e;let r=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,i.Cg)([(0,n.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.APIKeyMixin")],r),r}},55156:(e,t,r)=>{r.d(t,{I:()=>n,e:()=>i});const i=Symbol("idFieldsProviderSymbol");function n(e){return(t=e)&&i in t?e[i]:void 0;var t}},55674:(e,t,r)=>{r.d(t,{Ad:()=>h,Gj:()=>m,QY:()=>p,lL:()=>g,xR:()=>y});var i=r(66131),n=r(49186),s=(r(44208),r(44729)),a=r(15032),l=r(65864),o=r(95466),u=r(43668),c=r(98623);const d=["geometry","scale","timeProperties"];function p(e,t){if(null!=t)for(const r of d)t.hasArcadeDependency(r)&&e.add(r);return e}function h(e,t){return f.create(e,t,null,["$feature","$view"])}function y(e,t,r){return f.create(e,t,r,["$feature","$view","$config"])}class f{static async create(e,t,r,i){const{arcade:s,Dictionary:a}=await(0,u.l)();let l;try{l=s.parseScript(e)}catch(t){throw new n.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const o=s.scriptUsesGeometryEngine(l);o&&await s.enableGeometrySupport(),await s.loadDependentModules(new Set,l,null,!1,o);const c={vars:i.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},d=s.compileScript(l,c);let p=null;null!=r&&(p=new a(r),p.immutable=!0);const h=new a;return h.immutable=!1,h.setField("scale",0),new f(e,s,l,d,t,h,p,a)}constructor(e,t,r,i,n,s,a,l){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=i,this._spatialReference=n,this._viewDict=s,this._configDict=a,this._dictionaryCtor=l,this._dependencies=new Map,this._featureReader=new m,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:n,currentEnd:s}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=n?null!=r?i.lY.epochToArcadeDate(n,r):i.lY.unknownEpochToArcadeDate(n):void 0,currentEnd:null!=s?null!=r?i.lY.epochToArcadeDate(s,r):i.lY.unknownEpochToArcadeDate(s):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class m{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const i=t??new o.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=i.fields,this._boundSchema.fieldsIndex=i,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,l.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}_hasGeometry(){return null!=this._boundTarget.geometry}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===c.L5}field(e,t=!0){const r=this._getField(e);if(r){const t=this._boundTarget.attributes[r.name];if(null==t)return null;switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return s.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return a.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return i.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?i.lY.unknownEpochToArcadeDate(t):i.lY.epochToArcadeDate(t,this.contextTimeZone??c.qU);default:return t}}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map(e=>e.name)}isEmpty(){return this._boundSchema.fields.length<=0&&!this._hasGeometry()}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function g(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},58501:(e,t,r)=>{r.d(t,{q:()=>n});var i=r(62815);function n(e,t,r){if(!r?.features||!r.hasZ)return;const n=(0,i.N)(r.geometryType,t,e.outSpatialReference);if(n)for(const e of r.features)n(e.geometry)}},62815:(e,t,r)=>{r.d(t,{N:()=>a});var i=r(86211),n=r(73941),s=r(21325);function a(e,t,r){if(null==t||null==r||r.vcsWkid||(0,s.aI)(t,r)||(0,n.xP)(t)||(0,n.xP)(r))return null;const a=(0,i.G9)(t)/(0,i.G9)(r);if(1===a)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,a);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const r of e.paths)for(const e of r)e.length>2&&(e[2]*=t)}(e,a);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const r of e.rings)for(const e of r)e.length>2&&(e[2]*=t)}(e,a);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const r of e.points)r.length>2&&(r[2]*=t)}(e,a);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,a);default:return null}}},73681:(e,t,r)=>{r.d(t,{n:()=>o});var i=r(49186),n=r(53966),s=r(46140),a=r(95466),l=r(55674);class o{static async from(e,t,r){const a=e.dictionary_version?s.R.parse(e.dictionary_version):null,c=new Set(e.itemsNames),d={};if(t)for(const e in t)d[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)d.hasOwnProperty(t.name)||(d[t.name]=t.value);const p=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))p.delete(e);p.size&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:p});const h=await(0,l.xR)(e.expression,null,d);if(!h)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const y=!a||!a.greaterEqual(4,0);y&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:a});const f=new u(r,y);return new o(y,c,h,f)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new a.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new a.A(t)}}class u extends l.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},77548:(e,t,r)=>{r.d(t,{Gh:()=>g,tk:()=>h,BR:()=>p,wI:()=>d,G$:()=>f,$x:()=>y,Ov:()=>o,UC:()=>s,W_:()=>u,OP:()=>m,TU:()=>l,XX:()=>a,jy:()=>c});var i=r(70333),n=r(11254);function s(e){return null!=e&&"object"==typeof e&&"type"in e&&"knowledge-graph-sublayer"===e.type}r(7762),r(84952),r(36563),r(36708),r(4146),new WeakMap,r(16215);const a={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function l(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function o(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function u(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function c(e){return function(e){return null!=e&&"object"==typeof e&&"type"in e&&"feature"===e.type}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)}async function d(e,t){const r=i.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const s=e.toLowerCase().indexOf("/rest/services");if(-1===s)return null;const a=`${e.slice(0,s)}/rest/info`,l=null!=t?t.signal:null,{data:o}=await(0,n.A)(a,{query:{f:"json"},responseType:"json",signal:l});return o?.owningSystemUrl||null}function p(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function h(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function y(e,t){return null}function f(e){return null}function m(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function g(e,t){if(!t||!m(e))return;const r=(e.url,null);r&&(e.url=r)}},79677:(e,t,r)=>{r.d(t,{A:()=>d});var i,n=r(31635),s=r(25482),a=r(88930),l=r(91429),o=r(98623),u=r(36005),c=r(43937);let d=class extends s.o{static{i=this}static get allTime(){return p}static get empty(){return h}static fromArray(e){return new i({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(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===i&&r===n}expandTo(e,t=o.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,a.lL)(r,e,t));let n=this.end;if(n){const r=(0,a.lL)(n,e,t);n=n.getTime()===r.getTime()?r:(0,a.S1)(r,1,e,t)}return new i({start:r,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let a,l;return n>=t&&n<=r?a=n:t>=n&&t<=s&&(a=t),r>=n&&r<=s?l=r:s>=t&&s<=r&&(l=s),null==a||null==l||isNaN(a)||isNaN(l)?i.empty:new i({start:a===-1/0?null:new Date(a),end:l===1/0?null:new Date(l)})}offset(e,t,r=o.qU){if(this.isEmpty||this.isAllTime)return this.clone();const n=new i,{start:s,end:l}=this;return null!=s&&(n.start=(0,a.S1)(s,e,t,r)),null!=l&&(n.end=(0,a.S1)(l,e,t,r)),n}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 p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,n.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,n.Cg)([(0,u.w)("end")],d.prototype,"readEnd",null),(0,n.Cg)([(0,c.K)("end")],d.prototype,"writeEnd",null),(0,n.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,n.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,n.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,n.Cg)([(0,u.w)("start")],d.prototype,"readStart",null),(0,n.Cg)([(0,c.K)("start")],d.prototype,"writeStart",null),d=i=(0,n.Cg)([(0,l.$K)("esri.time.TimeExtent")],d);const p=new d,h=new d({start:void 0,end:void 0})},91218:(e,t,r)=>{r.r(t),r.d(t,{canProjectWithoutEngine:()=>$,initializeProjection:()=>Q,isEqualBaseGCS:()=>z,isLoaded:()=>M,isLoadedOrLoad:()=>L,isLoadedOrLoadFor:()=>j,load:()=>k,project:()=>Z,projectExtent:()=>re,projectMany:()=>q,projectMultipoint:()=>Y,projectOrLoad:()=>E,projectOrLoadMany:()=>N,projectPoint:()=>V,projectPolygon:()=>ee,projectPolyline:()=>H,projectWithZConversion:()=>B,projectWithoutEngine:()=>J,requiresLoad:()=>O,test:()=>G,tryProjectWithZConversion:()=>U,unload:()=>D});var i=r(49186),n=r(74887),s=r(62788),a=r(95488),l=r(51850),o=r(21276),u=r(73941),c=r(5443),d=r(91075),p=r(48526),h=r(86738),y=r(39829),f=r(82799),m=r(16930),g=r(159),_=r(9762),w=r(37539);function b(e,t,r,i,n,s){return F[0]=e,F[1]=t,F[2]=r,(0,_.projectBuffer)(F,i,0,n,s,0)}const F=(0,l.vt)();var v=r(21325),I=r(62815);let T=null,S=null,A=null,C=null,R={};const x=new a.I;function M(){return!!(S?.isLoaded()&&A?.isLoaded()&&C?.isLoaded())}function L(){return!!M()||((0,s.gc)(x),k(),!1)}function j(e,t){return!e||!t||$(e,t)||L()}function O(e,t){return!$(e,t)&&!M()}async function k(e){null==T&&(T=Promise.all([r.e(3276).then(r.bind(r,83276)).then(e=>(S=e,S.load())),r.e(8377).then(r.bind(r,8377)).then(e=>(A=e,A.load())),r.e(2158).then(r.bind(r,12158)).then(e=>(C=e,C.load()))])),await T,(0,n.Te)(e),x.notify()}function Z(e,t,r){return Array.isArray(e)?0===e.length?[]:((0,o.H)(e),q(e,e[0].spatialReference,t,r)):((0,o.f)(e),q([e],e.spatialReference,t,r)[0])}function q(e,t,r,i){if(null==t||null==r)return e;if($(t,r,i))return e.map(e=>J(e,t,r));if(null==i?.geographicTransformation&&(0,u.jA)(t))return e.map(e=>J(e,t,m.A.WGS84)).map(e=>U(e,r));if(null==i?.geographicTransformation&&(0,u.jA)(r))return e.map(e=>U(e,m.A.WGS84)).map(e=>J(e,m.A.WGS84,r));if(!M())throw new P;if(!i?.geographicTransformation)if(i?.extendedParams)i={...i,geographicTransformation:C.getTransformation(t,r,i.areaOfInterestExtent)||new g.A};else if(!i?.areaOfInterestExtent){const e=function(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,r);let n=R[e];n||(n=C.getTransformation(t,r)||new g.A,R[e]=n),i={geographicTransformation:n}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof d.A?S.executeMany(e,r,i):A.executeMany(e,r,i)}function E(e,t){const r=N([e],t);return null!=r.pending?{pending:r.pending,geometry:null}:null!=r.geometries?{pending:null,geometry:r.geometries[0]}:{pending:null,geometry:null}}function N(e,t){if(!M())for(const r of e)if(null!=r&&!(0,v.aI)(r.spatialReference,t)&&(0,v.fn)(r.spatialReference)&&(0,v.fn)(t)&&!$(r.spatialReference,t))return(0,s.gc)(x),{pending:k(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,v.aI)(e.spatialReference,t)?e:(0,v.fn)(e.spatialReference)&&(0,v.fn)(t)?U(e,t):null)}}class P extends i.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function D(){T=null,S=null,A=null,C=null,R={}}const G={get loadPromise(){return T}};function U(e,t){try{const r=Z(e,t);if(null==r)return null;"xmin"in e&&"xmin"in r&&(r.zmin=e.zmin,r.zmax=e.zmax);const i=(0,I.N)(r.type,e.spatialReference,t);return null!=i&&i(r),r}catch(e){if(!(e instanceof P))throw e;return null}}async function B(e,t,r){const i=e.spatialReference;return null!=i&&null!=t&&await Q(i,t,null,r),U(e,t)}function $(e,t,r){return!(r?.areaOfInterestExtent||r?.extendedParams||r?.geographicTransformation)&&(!!(0,v.aI)(e,t)||(0,v.fn)(e)&&(0,v.fn)(t)&&!!(0,w.jd)(e,t))}function z(e,t){if((0,v.aI)(e,t))return!0;if(!(0,v.fn)(e)||!(0,v.fn)(t))return!1;const r=(0,v.oT)(e)||(0,v.K8)(e)||(0,v.x1)(e),i=(0,v.oT)(t)||(0,v.K8)(t)||(0,v.x1)(t);return r&&i}async function Q(e,t,r,i){if(M())return(0,n.NO)(i);if(Array.isArray(e)){for(const{source:t,dest:r,options:n}of e)if(t&&r&&!$(t,r,n))return k(i)}else if(e&&t&&!$(e,t,r))return k(i);return(0,n.NO)(i)}function J(e,t,r){return e?"x"in e?K(e,t,new h.A,r,0):"xmin"in e?ie(e,t,new c.A,r,0):"rings"in e?te(e,t,new y.A,r,0):"paths"in e?X(e,t,new f.A,r,0):"points"in e?W(e,t,new p.A,r,0):null:null}function V(e,t,r=t.spatialReference,i=0){return null!=r&&null!=e.spatialReference&&null!=K(e,e.spatialReference,t,r,i)}function K(e,t,r,i,n){se[0]=e.x,se[1]=e.y;const s=e.z;return se[2]=void 0!==s?s:n,(0,_.projectBuffer)(se,t,0,se,i,0)?(r.x=se[0],r.y=se[1],r.spatialReference=i,void 0!==s||(0,u.xP)(i)?(r.z=se[2],r.hasZ=!0):(r.z=void 0,r.hasZ=!1),void 0===e.m?(r.m=void 0,r.hasM=!1):(r.m=e.m,r.hasM=!0),r):null}function Y(e,t,r=t.spatialReference,i=0){return null!=e.spatialReference&&null!=r&&null!=W(e,e.spatialReference,t,r,i)}function W(e,t,r,i,n){const{points:s,hasZ:a,hasM:l}=e,o=[],c=s.length,d=[];for(const e of s)d.push(e[0],e[1],a?e[2]:n);if(!(0,_.projectBuffer)(d,t,0,d,i,0,c))return null;const p=a||(0,u.xP)(i);for(let e=0;e<c;++e){const t=3*e,r=d[t],i=d[t+1];p&&l?o.push([r,i,d[t+2],s[e][3]]):p?o.push([r,i,d[t+2]]):l?o.push([r,i,s[e][2]]):o.push([r,i])}return r.points=o,r.spatialReference=i,r.hasZ=a,r.hasM=l,r}function H(e,t,r=t.spatialReference,i=0){return null!=e.spatialReference&&null!=r&&null!=X(e,e.spatialReference,t,r,i)}function X(e,t,r,i,n){const{paths:s,hasZ:a,hasM:l}=e,o=[];if(!ne(s,a??!1,l??!1,t,o,i,n))return null;const c=a||(0,u.xP)(i);return r.paths=o,r.spatialReference=i,r.hasZ=c,r.hasM=l,r}function ee(e,t,r=t.spatialReference,i=0){return null!=e.spatialReference&&null!=r&&null!=te(e,e.spatialReference,t,r,i)}function te(e,t,r,i,n){const{rings:s,hasZ:a,hasM:l}=e,o=[];if(!ne(s,a??!1,l??!1,t,o,i,n))return null;const c=a||(0,u.xP)(i);return r.rings=o,r.spatialReference=i,r.hasZ=c,r.hasM=l,r}function re(e,t,r=t.spatialReference,i=0){return null!=e.spatialReference&&null!=r&&null!=ie(e,e.spatialReference,t,r,i)}function ie(e,t,r,i,n){const{xmin:s,ymin:a,xmax:l,ymax:o,hasZ:c,hasM:d}=e;if(!b(s,a,c?e.zmin:n,t,se,i))return null;const p=c||(0,u.xP)(i);return r.xmin=se[0],r.ymin=se[1],p&&(r.zmin=se[2]),b(l,o,c?e.zmax:n,t,se,i)?(r.xmax=se[0],r.ymax=se[1],p&&(r.zmax=se[2]),d&&(r.mmin=e.mmin,r.mmax=e.mmax),r.spatialReference=i,r):null}function ne(e,t,r,i,n,s,a=0){const l=new Array;for(const r of e)for(const e of r)l.push(e[0],e[1],t?e[2]:a);if(!(0,_.projectBuffer)(l,i,0,l,s,0))return!1;let o=0;n.length=0;const c=t||(0,u.xP)(s);for(const t of e){const e=new Array;for(const i of t)c&&r?e.push([l[o++],l[o++],l[o++],i[3]]):c?e.push([l[o++],l[o++],l[o++]]):r?(e.push([l[o++],l[o++],i[2]]),o++):(e.push([l[o++],l[o++]]),o++);n.push(e)}return!0}const se=(0,l.vt)()},91880:(e,t,r)=>{r.d(t,{A:()=>u});var i,n=r(31635),s=r(66552),a=r(25482),l=r(91429);const o=new s.J({asc:"ascending",desc:"descending"});let u=class extends a.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],u.prototype,"valueExpression",void 0),(0,n.Cg)([(0,l.MZ)({type:o.apiValues,json:{type:o.jsonValues,read:o.read,write:o.write}})],u.prototype,"order",void 0),u=i=(0,n.Cg)([(0,l.$K)("esri.layers.support.OrderByInfo")],u)},99157:(e,t,r)=>{r.d(t,{A:()=>l});var i,n=r(31635),s=r(69622),a=r(91429);let l=i=class extends s.A{constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new i({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,n.Cg)([(0,a.MZ)()],l.prototype,"isInverse",void 0),(0,n.Cg)([(0,a.MZ)()],l.prototype,"wkt",void 0),(0,n.Cg)([(0,a.MZ)()],l.prototype,"wkid",void 0),l=i=(0,n.Cg)([(0,a.$K)("esri.geometry.operators.support.GeographicTransformationStep")],l)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3693],{3693:(e,t,n)=>{n.r(t),n.d(t,{registerFunctions:()=>Se});var r=n(52106),i=n(66131),a=n(47609),s=n(66395),o=n(59534),l=n(85935),u=n(93833),d=n(30445),c=n(93818),f=n(78878),p=n(80672),h=n(48938),m=n(78502),y=n(87449),g=n(11221),w=n(33325),I=n(80609),F=n(1262),A=n(88368);class b{constructor(e){this.field=e,this.sqlRewritable=!1}postInitialization(e,t){}}class N extends b{constructor(e){super(e),this.sqlRewritable=!0}extractValue(e){return e.attributes[this.field.name]}rewriteSql(e){return{rewritten:this.sqlRewritable,where:e}}}class S extends b{constructor(e,t,n){super((0,w.ke)(e)),this.originalField=e,this.sqlRewritable=!0,this.field.name=t,this.field.alias=n}rewriteSql(e,t){return{rewritten:this.sqlRewritable,where:(0,I.bD)(e,this.field.name,this.originalField.name,t.getFieldsIndex())}}extractValue(e){return e.attributes[this.originalField.name]}}class T extends b{constructor(e,t,n){super(e),this.codefield=t,this._stringToCode=n,this._codeToString={};for(const e in n)this._codeToString[n[e]]=e;this.sqlRewritable=!0}static{this.BADNESS="_!!!_BAD_LKP_!!!!"}rewriteSql(e,t){const n=this.evaluateNodeToWhereClause(e.parseTree,0,this.field.name,this.codefield instanceof A.A?(0,I.YY)(this.codefield,0):this.codefield,e.parameters);return n.includes(T.BADNESS)?{rewritten:!1,where:e}:{rewritten:this.sqlRewritable,where:A.A.create(n,{fieldsIndex:t._parent.getFieldsIndex(),timeZone:t.dateFieldsTimeZoneDefaultUTC})}}evaluateNodeToWhereClause(e,t,n=null,r=null,i){switch(e.type){case"interval":return(0,I.oj)(this.evaluateNodeToWhereClause(e.value,t,n,r,i),e.qualifier,e.op);case"case-expression":{let r=" CASE ";"simple"===e.format&&(r+=this.evaluateNodeToWhereClause(e.operand,t,n,T.BADNESS,i));for(const a of e.clauses)r+=" WHEN "+this.evaluateNodeToWhereClause(a.operand,t,n,T.BADNESS,i)+" THEN "+this.evaluateNodeToWhereClause(a.value,t,n,T.BADNESS,i);return null!==e.else&&(r+=" ELSE "+this.evaluateNodeToWhereClause(e.else,t,n,T.BADNESS,i)),r+=" END ",r}case"parameter":{const n=i[e.value.toLowerCase()];return"string"==typeof n?"'"+n.toString().replaceAll("'","''")+"'":(0,w.$P)(n)||(0,w.Lk)(n)?(0,I.bm)(n,t):(0,w.eg)(n)?(0,I.F1)(n,t):(0,w.rX)(n)?(0,I.R8)(n,t):(0,w.f0)(n)?(0,I.Nf)(n,t):Array.isArray(n)?n.map(e=>"string"==typeof e?"'"+e.toString().replaceAll("'","''")+"'":(0,w.$P)(e)||(0,w.Lk)(e)?(0,I.bm)(e,t):(0,w.eg)(e)?(0,I.F1)(e,t):(0,w.rX)(e)?(0,I.R8)(e,t):(0,w.f0)(e)?(0,I.Nf)(e,t):e.toString()):n.toString()}case"expression-list":{const a=[];for(const s of e.value)a.push(this.evaluateNodeToWhereClause(s,t,n,r,i));return a}case"unary-expression":return" ( NOT "+this.evaluateNodeToWhereClause(e.expr,t,n,T.BADNESS,i)+" ) ";case"binary-expression":switch(e.operator){case"AND":return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" AND "+this.evaluateNodeToWhereClause(e.right,t,n,r,i)+") ";case"OR":return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" OR "+this.evaluateNodeToWhereClause(e.right,t,n,r,i)+") ";case"IS":if("null"!==e.right.type)throw new F.L("UnsupportedIsRhs");return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new F.L("UnsupportedIsRhs");return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" IS NOT NULL )";case"IN":{if("expression-list"===e.right.type){if("column-reference"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const a=[];let s=!0;for(const t of e.right.value){if("string"!==t.type){s=!1;break}if(void 0===this._stringToCode[t.value]){s=!1;break}a.push(this._stringToCode[t.value].toString())}if(s)return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" IN ("+a.join(",")+")) "}const a=this.evaluateNodeToWhereClause(e.right,t,n,r,i);return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" IN ("+a.join(",")+")) "}const a=this.evaluateNodeToWhereClause(e.right,t,n,r,i);return Array.isArray(a)?" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" IN ("+a.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" IN ("+a+")) "}case"NOT IN":{if("expression-list"===e.right.type){if("column-reference"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const a=[];let s=!0;for(const t of e.right.value){if("string"!==t.type){s=!1;break}if(void 0===this._stringToCode[t.value]){s=!1;break}a.push(this._stringToCode[t.value].toString())}if(s)return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" NOT IN ("+a.join(",")+")) "}const a=this.evaluateNodeToWhereClause(e.right,t,n,r,i);return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" NOT IN ("+a.join(",")+")) "}const a=this.evaluateNodeToWhereClause(e.right,t,n,r,i);return Array.isArray(a)?" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" NOT IN ("+a.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" NOT IN ("+a+")) "}case"BETWEEN":{const r=this.evaluateNodeToWhereClause(e.right,t,n,T.BADNESS,i);return" ("+this.evaluateNodeToWhereClause(e.left,t,n,T.BADNESS,i)+" BETWEEN "+r[0]+" AND "+r[1]+" ) "}case"NOTBETWEEN":{const r=this.evaluateNodeToWhereClause(e.right,t,n,T.BADNESS,i);return" ("+this.evaluateNodeToWhereClause(e.left,t,n,T.BADNESS,i)+" NOT BETWEEN "+r[0]+" AND "+r[1]+" ) "}case"LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,n,T.BADNESS,i)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,n,T.BADNESS,i)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,n,T.BADNESS,i)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,n,T.BADNESS,i)+") ";case"NOT LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,n,T.BADNESS,i)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,n,T.BADNESS,i)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,n,T.BADNESS,i)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,n,T.BADNESS,i)+") ";case"<>":case"=":if("column-reference"===e.left.type&&"string"===e.right.type){if(e.left.column.toUpperCase()===this.field.name.toUpperCase()&&void 0!==this._stringToCode[e.right.value.toString()])return" ("+r+" "+e.operator+" "+this._stringToCode[e.right.value.toString()].toString()+") "}else if("column-reference"===e.right.type&&"string"===e.left.type&&e.right.column.toUpperCase()===this.field.name.toUpperCase())return" ("+this._stringToCode[e.left.value.toString()].toString()+" "+e.operator+" "+r+") ";return" ("+this.evaluateNodeToWhereClause(e.left,t,n,T.BADNESS,i)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,n,T.BADNESS,i)+") ";case"<":case">":case">=":case"<=":case"*":case"-":case"+":case"/":case"||":return" ("+this.evaluateNodeToWhereClause(e.left,t,n,T.BADNESS,i)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,n,T.BADNESS,i)+") "}case"null":return"null";case"boolean":return!0===e.value?"1":"0";case"string":return"'"+e.value.toString().replaceAll("'","''")+"'";case"timestamp":return`timestamp '${e.value}'`;case"date":return`date '${e.value}'`;case"time":return`time '${e.value}'`;case"number":return e.value.toString();case"current-time":return(0,I.C6)(e.mode,t);case"current-user":return"CURRENT_USER";case"column-reference":return n&&n.toLowerCase()===e.column.toLowerCase()?"("+r+")":(0,I.Kb)(e);case"data-type":return e.value;case"function":{const r=this.evaluateNodeToWhereClause(e.args,t,n,T.BADNESS,i);return(0,I.F6)(e.name,r,t)}}throw new F.L("UnsupportedSyntax",{node:e.type})}extractValue(e){if(this.codefield instanceof A.A){const t=this.codefield.calculateValueCompiled(e);return this._codeToString[A.A.convertValueToStorageFormat(t)]}return this._codeToString[e.attributes[this.codefield]]}}class _ extends b{constructor(e,t){super(e),this._sql=t}rewriteSql(e,t){return{rewritten:!0,where:(0,I.bD)(e,this.field.name,(0,I.YY)(this._sql,0),t.getFieldsIndex())}}extractValue(e){return A.A.convertValueToStorageFormat(this._sql.calculateValueCompiled(e),this.field.type)}}class C extends g.t1{static findField(e,t){for(const n of e)if(n.name.toLowerCase()===t.toString().toLowerCase())return n;return null}constructor(e){super(),this.declaredClass="esri.arcade.featureset.actions.Adapted",this._maxProcessing=30,this._parent=e.parentfeatureset,this._adaptedFields=e.adaptedFields,this._extraFilter=e.extraFilter}_initialiseFeatureSet(){this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types,this.fields=[];for(const e of this._adaptedFields)e.postInitialization(this,this._parent),this.fields.push(e.field)}async _queryAll(){return await this._ensureLoaded(),this._extraFilter?(await this.query({abortSignal:h._})).features:this._calculateFields(await this._parent.queryAll(h._))}async query(e){let t=e.where??null;const n=this._reformulateWithoutAdaptions(t),r=n.cannot;t=n.where;let i=!1,a=e.orderBy;if(null!=a){i=!0;const e=[];for(const t of this._adaptedFields)if(!(t instanceof N)&&!0===a.scanForField(t.field.name)){if(!(t instanceof S)){a=null,i=!1;break}e.push({field:t.field.name,newfield:t.originalField.name})}a&&e.length>0&&(a=a.replaceFields(e))}null!=t?null!=this._extraFilter&&(t=(0,I.kg)(this._extraFilter,t)):t=this._extraFilter,await this._ensureLoaded();const s=await this._parent.query({...e,where:t,orderBy:a});return(0,y.dZ)(e.abortSignal),r?{...s,filterApplied:!1,ordered:!!i&&s.ordered,features:this._calculateFields(s.features)}:{...s,ordered:!!i&&s.ordered,features:this._calculateFields(s.features)}}async*_calculateFields(e){for await(const t of e)yield t.map(e=>{const t={};for(const n of this._adaptedFields)t[n.field.name]=n.extractValue(e);return new r.A({attributes:t,geometry:(0,m.Yq)(e.geometry)})})}async queryStat(e){let t=!1,n=e.field,r=this._reformulateWithoutAdaptions(n);t=r.cannot,n=r.where;let i=e.where??null;if(r=this._reformulateWithoutAdaptions(i),t=t||r.cannot,i=r.where,null!=i?null!==this._extraFilter&&(i=(0,I.kg)(this._extraFilter,i)):i=this._extraFilter,t)return null==i&&null==e.spatialFilter?this._manualStat(e.stat,n,e.limit??w.gO,e.abortSignal):{calculated:!1};const a=await this._parent.queryStat({...e,field:n,where:i});return a.calculated?a:null==i&&null==e.spatialFilter?this._manualStat(e.stat,n,e.limit??w.gO,e.abortSignal):{calculated:!1}}async canQueryAggregate(e){for(const t of e.groupBy)for(const e of this._adaptedFields)if(t.toLowerCase()===e.field.name.toLowerCase()&&!(e instanceof N))return!1;const t=[];for(const n of e.statistics)if(null!==n.workingexpr){const e=this._reformulateWithoutAdaptions(n.workingexpr);if(e.cannot)return!1;const r=n.clone();r.workingexpr=e.where,t.push(r)}else t.push(n);let n=e.where??null;const r=this._reformulateWithoutAdaptions(n);return!r.cannot&&(n=r.where,null!==n?null!==this._extraFilter&&(n=(0,I.kg)(this._extraFilter,n)):n=this._extraFilter,this._parent.canQueryAggregate({...e,statistics:t,where:n}))}async queryAggregate(e){const t=[];for(const n of e.statistics)if(null!==n.workingexpr){const e=this._reformulateWithoutAdaptions(n.workingexpr);if(e.cannot)throw new y.dr("NeverReach");const r=n.clone();r.workingexpr=e.where,t.push(r)}else t.push(n);let n=e.where??null;const r=this._reformulateWithoutAdaptions(n);if(r.cannot)throw new y.dr("NeverReach");return n=r.where,null!==n?null!==this._extraFilter&&(n=(0,I.kg)(this._extraFilter,n)):n=this._extraFilter,this._parent.queryAggregate({...e,statistics:t,where:n})}_reformulateWithoutAdaptions(e){const t={cannot:!1,where:e};if(null!==e)for(const n of this._adaptedFields)if(!0===(0,I.Ju)(e,n.field.name)){const r=n.rewriteSql(e,this);if(!0!==r.rewritten){t.cannot=!0,t.where=null;break}t.where=r.where}return t}}var v=n(35704),x=n(4576);class D extends g.t1{constructor(e){super(),this.declaredClass="esri.arcade.featureset.actions.OrderBy",this._maxProcessing=100,this._parent=e.parentfeatureset,this._orderByClause=e.orderbyclause}async _queryAll(){return(await this.query({abortSignal:h._})).features}async query(e){await this._ensureLoaded();const t=await this._parent.query({...e,orderBy:null==e.orderBy?this._orderByClause:e.orderBy});return(0,y.dZ)(e.abortSignal),!1===t.ordered?{...t,ordered:!0,features:this._sortFeatures(t.features,e.abortSignal)}:t}async*_sortFeatures(e,t){const n=[];for await(const r of e)n.push(r),await(0,f.a2)(),(0,y.dZ)(t);const r=n.flat();this._orderByClause.order(r);for(const e of(0,x.Ho)(r,this._maxQueryRate()))yield e}async queryStat(e){const t=await this._parent.queryStat(e);return t.calculated?t:null==e.where&&null==e.spatialFilter?this._manualStat(e.stat,e.field,e.limit??w.gO,e.abortSignal):{calculated:!1}}async canQueryAggregate(e){return this._parent.canQueryAggregate(e)}async queryAggregate(e){return this._parent.queryAggregate(e)}getFieldsIndex(){return this._parent.getFieldsIndex()}}function E(e,t){return e===t?0:null===e?-1:null===t?1:e<t?-1:1}class k{constructor(e){const t=e.split(",");this._fields=[],this._directions=[];for(let e=0;e<t.length;e++){const n=t[e].match(/\S+/g);this._fields.push(n[0]),2===n.length?"asc"===n[1].toLowerCase()?this._directions.push(1):this._directions.push(0):this._directions.push(1)}}constructClause(){let e="";for(let t=0;t<this._fields.length;t++)0!==t&&(e+=","),e+=this._fields[t],1===this._directions[t]?e+=" ASC":e+=" DESC";return e}order(e){e.sort((e,t)=>{for(let n=0;n<this._fields.length;n++){const r=this.featureValue(e,this._fields[n],n),i=this.featureValue(t,this._fields[n],n);let a=0;if(a=1===this._directions[n]?E(r,i):-1*E(r,i),0!==a)return a}return 0})}scanForField(e){for(let t=0;t<this._fields.length;t++)if(this._fields[t].toLowerCase().trim()===e.toLowerCase().trim())return!0;return!1}replaceFields(e){let t="";for(let n=0;n<this._fields.length;n++){0!==n&&(t+=",");let r=this._fields[n];for(const t of e)if(r.toLowerCase()===t.field.toLowerCase()){r=t.newfield;break}t+=r,1===this._directions[n]?t+=" ASC":t+=" DESC"}return new k(t)}featureValue(e,t,n){const r=e.attributes[t];if(void 0!==r)return r;for(const r in e.attributes)if(t.toLowerCase()===r.toLowerCase())return this._fields[n]=r,e.attributes[r];return null}}class L{constructor(){this.field="",this.tofieldname="",this.typeofstat="MIN",this.workingexpr=null}clone(){const e=new L;return e.field=this.field,e.tofieldname=this.tofieldname,e.typeofstat=this.typeofstat,e.workingexpr=this.workingexpr,e}static parseStatField(e,t,n,r){const i=new L;i.field=e;const a=A.A.create(t,{fieldsIndex:n,timeZone:r}),s=function(e){if("function"===e.parseTree.type){if(0===e.parseTree.args.value.length)return{name:e.parseTree.name,expr:null};if(e.parseTree.args.value.length>1)throw new F.L("MissingStatisticParameters");const t=A.A.create((0,I.Mi)(e.parseTree.args.value[0],0,e.parameters),{fieldsIndex:e.fieldsIndex,timeZone:e.timeZone,currentUser:e.currentUser});return{name:e.parseTree.name,expr:t}}return null}(a);if(null===s)throw new F.L("UnsupportedSqlFunction",{function:""});const o=s.name.toUpperCase().trim();if("MIN"===o){if(i.typeofstat="MIN",i.workingexpr=s.expr,null===a)throw new F.L("InvalidFunctionParameters",{function:"min"})}else if("MAX"===o){if(i.typeofstat="MAX",i.workingexpr=s.expr,null===a)throw new F.L("InvalidFunctionParameters",{function:"max"})}else if("COUNT"===o)i.typeofstat="COUNT",i.workingexpr=s.expr;else if("STDEV"===o){if(i.typeofstat="STDDEV",i.workingexpr=s.expr,null===a)throw new F.L("InvalidFunctionParameters",{function:"stdev"})}else if("SUM"===o){if(i.typeofstat="SUM",i.workingexpr=s.expr,null===a)throw new F.L("InvalidFunctionParameters",{function:"sum"})}else if("MEAN"===o){if(i.typeofstat="AVG",i.workingexpr=s.expr,null===a)throw new F.L("InvalidFunctionParameters",{function:o})}else if("AVG"===o){if(i.typeofstat="AVG",i.workingexpr=s.expr,null===a)throw new F.L("InvalidFunctionParameters",{function:"avg"})}else{if("VAR"!==o)throw new F.L("UnsupportedSqlFunction",{function:o});if(i.typeofstat="VAR",i.workingexpr=s.expr,null===a)throw new F.L("InvalidFunctionParameters",{function:"var"})}return i}toStatisticsName(){switch(this.typeofstat.toUpperCase()){case"MIN":return"min";case"MAX":return"max";case"SUM":return"sum";case"COUNT":default:return"count";case"VAR":return"var";case"STDDEV":return"stddev";case"AVG":return"avg"}}}var U=n(80200),$=n(74639),j=n(44729),Z=n(55612),B=n(15032),M=n(20437);const W=new o.b(["MIN","MAX","VAR","STDDEV","COUNT","SUM","AVG"],[["VARIANCE","VAR"],["AVERAGE","AVG"],["MEAN","AVG"],["STDEV","STDDEV"]]);class R extends g.t1{constructor(e){super(),this.declaredClass="esri.arcade.featureset.actions.Aggregate",this._decodedStatsFields=[],this._decodedGroupByFields=[],this._canDoSimpleGroupBy=!0,this._physicalGroupByFields=[],this.objectIdField="ROW__ID",this._adaptedFields=[],this._uniqueIds=1,this._maxQuery=10,this._maxProcessing=10,this._parent=e.parentfeatureset,this._config=e}isTable(){return!0}_nextUniqueName(e){for(;1===e["T"+this._uniqueIds.toString()];)this._uniqueIds++;const t="T"+this._uniqueIds.toString();return e[t]=1,t}_convertToEsriFieldType(e){return e}_initialiseFeatureSet(){const e=this._parent.getFieldsIndex();this.objectIdField="ROW__ID",this.globalIdField="";let t=!1,n=1;for(;!1===t;){let e=!1;for(const t of this._config.groupbyfields)if(t.name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}if(!1===e)for(const t of this._config.statsfields)if(t.name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}!1===e?t=!0:(this.objectIdField="ROW__ID"+n.toString(),n++)}for(const t of this._config.statsfields){const n=new L;n.field=t.name,n.tofieldname=t.name,n.workingexpr=t.expression instanceof A.A?t.expression:A.A.create(t.expression,{fieldsIndex:e,timeZone:this.dateFieldsTimeZoneDefaultUTC}),n.typeofstat=W.lookup(t.statistic)??"COUNT",this._decodedStatsFields.push(n)}this._decodedGroupByFields=[];for(const t of this._config.groupbyfields){const n={name:t.name,singlefield:null,tofieldname:t.name,expression:t.expression instanceof A.A?t.expression:A.A.create(t.expression,{fieldsIndex:e,timeZone:this.dateFieldsTimeZoneDefaultUTC}),sqlType:null};this._decodedGroupByFields.push(n)}const r={};this.geometryType=this._parent.geometryType,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField="";for(const e of this._parent.fields)r[e.name.toUpperCase()]=1;this.types=null,this.subtypes=null,this.subtypeField="",this.fields=[];const i=new L;i.field=this._nextUniqueName(r),i.tofieldname=this.objectIdField,i.workingexpr=A.A.create(this._parent.objectIdField,{fieldsIndex:this._parent.getFieldsIndex(),timeZone:this.dateFieldsTimeZoneDefaultUTC}),i.typeofstat="MIN",this._decodedStatsFields.push(i);for(const e of this._decodedGroupByFields){const t=new M.A;if(e.name=this._nextUniqueName(r),t.name=e.tofieldname,t.alias=t.name,(0,I.DA)(e.expression)){const n=this._parent.getField((0,I.YY)(e.expression,0));if(!n)throw new y.dr("AggregationFieldNotFound");e.name=n.name,e.singlefield=n.name,this._physicalGroupByFields.push(n.name),t.type=n.type,e.sqlType=n.type}else{t.type=this._convertToEsriFieldType((0,I.IY)(e.expression,this._parent.fields));const n=new M.A;n.name=e.name,n.alias=n.name,this._physicalGroupByFields.push(e.name),this._adaptedFields.push(new _(n,e.expression)),this._canDoSimpleGroupBy=!1,e.sqlType=t.type}this.fields.push(t)}if(this._adaptedFields.length>0)for(const e of this._parent.fields)this._adaptedFields.push(new N(e));for(const e of this._decodedStatsFields){const t=new M.A;let n=null;e.field=this._nextUniqueName(r),t.name=e.tofieldname,t.alias=t.name;const i=null!==e.workingexpr&&(0,I.DA)(e.workingexpr)?(0,I.YY)(e.workingexpr,0):"";switch(e.typeofstat){case"SUM":if(""!==i){if(n=this._parent.getField(i),!n)throw new y.dr("AggregationFieldNotFound");t.type=n.type}else t.type="double";break;case"MIN":case"MAX":if(""!==i){if(n=this._parent.getField(i),!n)throw new y.dr("AggregationFieldNotFound");t.type=n.type}else t.type="double";break;case"COUNT":t.type="integer";break;case"STDDEV":case"VAR":case"AVG":if(""!==i&&(n=this._parent.getField(i),!n))throw new y.dr("AggregationFieldNotFound");t.type="double"}this.fields.push(t)}}async _queryAll(){return(await this.query({abortSignal:h._})).features}async query(e){if(null!=e.spatialFilter)return g.An;const t={ordered:!1,nowhereclause:!1};await this._ensureLoaded();let n=e.where;if(null!=n)for(const e of this._decodedStatsFields)if(!0===(0,I.Ju)(n,e.tofieldname)){t.nowhereclause=!0,n=null;break}let r=e.orderBy;if(null!=r){t.ordered=!0;for(const e of this._decodedStatsFields)if(!0===r.scanForField(e.tofieldname)){r=null,t.ordered=!1;break}if(null!==r)for(const e of this._decodedGroupByFields)if(null===e.singlefield&&!0===r.scanForField(e.tofieldname)){r=null,t.ordered=!1;break}}if(!1!==this._canDoSimpleGroupBy&&await this._parent.canQueryAggregate({groupBy:this._physicalGroupByFields,statistics:this._decodedStatsFields,where:null,spatialFilter:null,abortSignal:e.abortSignal})){const i=await this._parent.queryAggregate({groupBy:this._physicalGroupByFields,statistics:this._decodedStatsFields,where:n?this._reformulateWhereClauseWithoutGroupByFields(n):null,spatialFilter:null,orderBy:r?this._reformulateOrderClauseWithoutGroupByFields(r):null,abortSignal:e.abortSignal});return(0,y.dZ)(e.abortSignal),{...i,filterApplied:!t.nowhereclause&&i.filterApplied,ordered:!0===t.ordered&&i.ordered,features:this._fixAggregateAttributeNames(i.features)}}const i=this._adaptedFields.length>0?new C({parentfeatureset:this._parent,adaptedFields:this._adaptedFields,extraFilter:null}):this._parent;if(!0===t.nowhereclause){const t=new D({parentfeatureset:i,orderbyclause:new k(this._physicalGroupByFields.join(",")+","+this._parent.objectIdField+" ASC")});return{filterApplied:!1,spatialFilterApplied:!1,ordered:!1,features:this._aggregateSortedFeatureGroups((await t.query({abortSignal:e.abortSignal})).features,this._maxQuery,e.abortSignal)}}let a=i;null!=n&&(a=new v.A({parentfeatureset:a,whereclause:this._reformulateWhereClauseWithoutGroupByFields(n)}));const s=new D({parentfeatureset:a,orderbyclause:new k(this._physicalGroupByFields.join(",")+","+this._parent.objectIdField+" ASC")});return{filterApplied:!1,spatialFilterApplied:!1,ordered:!1,features:this._aggregateSortedFeatureGroups((await s.query({abortSignal:e.abortSignal})).features,this._maxQuery,e.abortSignal)}}async*_fixAggregateAttributeNames(e){for await(const t of e)yield t.map(e=>{const t={geometry:e.geometry,attributes:{}},n={};for(const t in e.attributes)n[t.toLowerCase()]=e.attributes[t];for(const e of this._decodedGroupByFields)t.attributes[e.tofieldname]=n[e.name.toLowerCase()];for(const e of this._decodedStatsFields)t.attributes[e.tofieldname]=n[e.field.toLowerCase()];return new r.A(t)})}async*_aggregateSortedFeatureGroups(e,t,n){let r=null,i=[];for await(const a of e){await(0,f.a2)(),(0,y.dZ)(n);for(const e of a){const t=this._generateAggregateHash(e);null==r?r={features:[e],id:t}:t!==r.id?(i.push(this._calculateAndAppendAggregateItem(r)),r={features:[e],id:t}):r.features.push(e)}i.length>=t&&(yield i,i=[])}null!=r&&(i.push(this._calculateAndAppendAggregateItem(r)),yield i)}async queryStat(e){return{calculated:!1}}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new y.dr("NeverReach")}_reformulateWhereClauseWithoutStatsFields(e){for(const t of this._decodedStatsFields)e=(0,I.bD)(e,t.tofieldname,(0,I.YY)(t.workingexpr,0),this._parent.getFieldsIndex());return e}_reformulateWhereClauseWithoutGroupByFields(e){for(const t of this._decodedGroupByFields)t.tofieldname!==t.name&&(e=(0,I.bD)(e,t.tofieldname,(0,I.YY)(t.expression,0),this._parent.getFieldsIndex()));return e}_reformulateOrderClauseWithoutGroupByFields(e){const t=[];for(const e of this._decodedGroupByFields)e.tofieldname!==e.name&&t.push({field:e.tofieldname,newfield:e.name});return t.length>0?e.replaceFields(t):e}_calculateFieldStat(e,t,n){const r=[];for(const n of e.features)if(null!==t.workingexpr){const e=t.workingexpr.calculateValue(n);null!==e&&(e instanceof j.n||e instanceof B.k?r.push(e.toNumber()):e instanceof Z.g?r.push(e.toMilliseconds()):r.push(e))}else r.push(null);n.attributes[t.tofieldname]=(0,$.s)(t.typeofstat,[r])}_calculateAndAppendAggregateItem(e){const t={attributes:{}};for(const n of this._decodedGroupByFields){const r=n.singlefield?e.features[0].attributes[n.singlefield]:A.A.convertValueToStorageFormat(n.expression.calculateValue(e.features[0]),n.sqlType);t.attributes[n.tofieldname]=r}for(const n of this._decodedStatsFields)this._calculateFieldStat(e,n,t);return new r.A(t)}_generateAggregateHash(e){let t="";for(const n of this._decodedGroupByFields){const r=n.singlefield?e.attributes[n.singlefield]:n.expression.calculateValue(e);t+=null==r?":":":"+r.toString()}return(0,U.d)(t,U.T.String)}async getFeatureByObjectId(){return null}}async function*q(e,t){let n=t;for await(const t of e)if(n>=t.length?(n-=t.length,yield t):(yield t.slice(0,n),n=0),n<=0)break}class P extends g.t1{constructor(e){super(),this.declaredClass="esri.arcade.featureset.actions.Top",this._maxProcessing=100,this._parent=e.parentfeatureset,this._limit=e.topnum}async _queryAll(){return(await this.query({abortSignal:h._})).features}async query(e){await this._ensureLoaded();const t=await this._parent.queryAll(e.abortSignal);return{filterApplied:null==e.where,spatialFilterApplied:null==e.spatialFilter,ordered:!1,features:q(t,this._limit)}}async queryStat(e){return{calculated:!1}}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new y.dr("NeverReach")}getFieldsIndex(){return this._parent.getFieldsIndex()}}var O=n(85978),V=n(30235),G=n(334),K=n(74887),J=n(68654),H=n(20655),z=n(11254),Q=n(51447),Y=n(53966),X=n(66552);new X.J({Clean:"clean",Dirty:"dirty"}),new X.J({Physical:"physical",Virtual:"virtual"}),new X.J({"Start and end":"start-and-end",Start:"start",Midspan:"midspan",End:"end"}),new X.J({startingPoint:"starting-point",barrier:"barrier",stoppingPoint:"stopping-point"}),new X.J({connected:"connected",upstream:"upstream",downstream:"downstream",shortestPath:"shortest-path",subnetwork:"subnetwork",subnetworkController:"subnetwork-controller",loops:"loops",isolation:"isolation",path:"path",circuit:"circuit"});const ee="{00000000-0000-0000-0000-000000000000}",te=new X.J({junctionJunctionConnectivity:"junction-junction-connectivity",connectivity:"connectivity",attachment:"attachment",containment:"containment",junctionEdgeFromConnectivity:"junction-edge-from-connectivity",junctionEdgeMidspanConnectivity:"junction-edge-midspan-connectivity",junctionEdgeToConnectivity:"junction-edge-to-connectivity"});new X.J({normal:"normal",rebuild:"rebuild",forceRebuild:"force-rebuild"});var ne=n(2272),re=n(31635),ie=n(25482),ae=n(91429),se=n(82799);let oe=class extends ie.o{constructor(e){super(e),this.type="networkElement",this.assetGroupCode=null,this.assetTypeCode=null,this.globalId=null,this.networkSourceId=null,this.objectId=null,this.positionFrom=null,this.positionTo=null,this.terminalId=null}};(0,re.Cg)([(0,ae.MZ)({json:{write:!1}})],oe.prototype,"type",void 0),(0,re.Cg)([(0,ae.MZ)({type:Number,json:{write:!0}})],oe.prototype,"assetGroupCode",void 0),(0,re.Cg)([(0,ae.MZ)({type:Number,json:{write:!0}})],oe.prototype,"assetTypeCode",void 0),(0,re.Cg)([(0,ae.MZ)({type:String,json:{write:!0}})],oe.prototype,"globalId",void 0),(0,re.Cg)([(0,ae.MZ)({type:Number,json:{write:!0}})],oe.prototype,"networkSourceId",void 0),(0,re.Cg)([(0,ae.MZ)({type:Number,json:{write:!0}})],oe.prototype,"objectId",void 0),(0,re.Cg)([(0,ae.MZ)({type:Number,json:{write:!0}})],oe.prototype,"positionFrom",void 0),(0,re.Cg)([(0,ae.MZ)({type:Number,json:{write:!0}})],oe.prototype,"positionTo",void 0),(0,re.Cg)([(0,ae.MZ)({type:Number,json:{write:!0}})],oe.prototype,"terminalId",void 0),oe=(0,re.Cg)([(0,ae.$K)("esri.rest.networks.support.NetworkElement")],oe);let le=class extends oe{constructor(e){super(e),this.type="telecomNetworkElement",this.firstUnit=null,this.numUnits=null}};(0,re.Cg)([(0,ae.MZ)({json:{write:!1}})],le.prototype,"type",void 0),(0,re.Cg)([(0,ae.MZ)({json:{write:!0}})],le.prototype,"firstUnit",void 0),(0,re.Cg)([(0,ae.MZ)({json:{write:!0}})],le.prototype,"numUnits",void 0),le=(0,re.Cg)([(0,ae.$K)("esri.rest.networks.support.TelecomNetworkElement")],le);var ue=n(36005),de=n(43937);let ce=class extends ie.o{constructor(e){super(e),this.globalId=null,this.associationType=null,this.fromNetworkElement=null,this.toNetworkElement=null,this.geometry=null,this.errorMessage=null,this.percentAlong=null,this.errorCode=null,this.isContentVisible=null,this.status=null}readFromNetworkElement(e,t){return t.fromFirstUnit||t.fromNumUnits?new le({globalId:t.fromGlobalId,networkSourceId:t.fromNetworkSourceId,terminalId:t.fromTerminalId,firstUnit:t.fromFirstUnit,numUnits:t.fromNumUnits}):new oe({globalId:t.fromGlobalId,networkSourceId:t.fromNetworkSourceId,terminalId:t.fromTerminalId})}writeFromNetworkElement(e,t){if(e&&(t.fromGlobalId=e.globalId,t.fromNetworkSourceId=e.networkSourceId,t.fromTerminalId=e.terminalId,"telecomNetworkElement"===e.type)){const n=e;t.fromFirstUnit=n.firstUnit,t.fromNumUnits=n.numUnits}}readToNetworkElement(e,t){return t.toFirstUnit||t.toNumUnits?new le({globalId:t.toGlobalId,networkSourceId:t.toNetworkSourceId,terminalId:t.toTerminalId,firstUnit:t.toFirstUnit,numUnits:t.toNumUnits}):new oe({globalId:t.toGlobalId,networkSourceId:t.toNetworkSourceId,terminalId:t.toTerminalId})}writeToNetworkElement(e,t){if(e&&(t.toGlobalId=e.globalId,t.toNetworkSourceId=e.networkSourceId,t.toTerminalId=e.terminalId,"telecomNetworkElement"===e.type)){const n=e;t.toFirstUnit=n.firstUnit,t.toNumUnits=n.numUnits}}equals(e){if(this.globalId===ee&&e.globalId===ee){function t(e,t){return e.networkSourceId===t.networkSourceId&&e.globalId===t.globalId&&e.terminalId===t.terminalId&&e.firstUnit===t.firstUnit&&e.numUnits===t.numUnits}const n=this.fromNetworkElement,r=this.toNetworkElement,i=e.fromNetworkElement,a=e.toNetworkElement,s=t(n,i),o=t(r,a);return s&&o&&this.associationType===e.associationType}return null!=this.globalId&&null!=e.globalId&&this.globalId===e.globalId}};(0,re.Cg)([(0,ae.MZ)({type:String,json:{write:!0}})],ce.prototype,"globalId",void 0),(0,re.Cg)([(0,ae.MZ)({type:te.apiValues,json:{type:te.jsonValues,read:te.read,write:te.write}})],ce.prototype,"associationType",void 0),(0,re.Cg)([(0,ae.MZ)({type:oe,json:{write:{target:{fromGlobalId:{type:String},fromNetworkSourceId:{type:Number},fromTerminalId:{type:Number},fromFirstUnit:{type:Number},fromNumUnits:{type:Number}}},read:{source:["fromGlobalId","fromNetworkSourceId","fromTerminalId","fromFirstUnit","fromNumUnits"]}}})],ce.prototype,"fromNetworkElement",void 0),(0,re.Cg)([(0,ue.w)("fromNetworkElement")],ce.prototype,"readFromNetworkElement",null),(0,re.Cg)([(0,de.K)("fromNetworkElement")],ce.prototype,"writeFromNetworkElement",null),(0,re.Cg)([(0,ae.MZ)({type:oe,json:{write:{target:{toGlobalId:{type:String},toNetworkSourceId:{type:Number},toTerminalId:{type:Number},toFirstUnit:{type:Number},toNumUnits:{type:Number}}},read:{source:["toGlobalId","toNetworkSourceId","toTerminalId","toFirstUnit","toNumUnits"]}}})],ce.prototype,"toNetworkElement",void 0),(0,re.Cg)([(0,ue.w)("toNetworkElement")],ce.prototype,"readToNetworkElement",null),(0,re.Cg)([(0,de.K)("toNetworkElement")],ce.prototype,"writeToNetworkElement",null),(0,re.Cg)([(0,ae.MZ)({type:se.A,json:{write:!0}})],ce.prototype,"geometry",void 0),(0,re.Cg)([(0,ae.MZ)({type:String,json:{write:!0}})],ce.prototype,"errorMessage",void 0),(0,re.Cg)([(0,ae.MZ)({type:Number,json:{write:!0}})],ce.prototype,"percentAlong",void 0),(0,re.Cg)([(0,ae.MZ)({type:Number,json:{write:!0}})],ce.prototype,"errorCode",void 0),(0,re.Cg)([(0,ae.MZ)({type:Boolean,json:{write:!0}})],ce.prototype,"isContentVisible",void 0),(0,re.Cg)([(0,ae.MZ)({type:Number,json:{write:!0}})],ce.prototype,"status",void 0),ce=(0,re.Cg)([(0,ae.$K)("esri.rest.networks.support.Association")],ce);let fe=class extends ie.o{constructor(e){super(e),this.associations=[]}};function pe(e){const{returnDeletes:t,elements:n,gdbVersion:r,moment:i}=e.toJSON();return{returnDeletes:t,elements:JSON.stringify(n.map(e=>({globalId:e.globalId,networkSourceId:e.networkSourceId,terminalId:e.terminalId}))),types:JSON.stringify(e.types.map(e=>te.toJSON(e))).replaceAll('"connectivity"','"junctionJunctionConnectivity"'),gdbVersion:r,moment:i??Date.now()}}(0,re.Cg)([(0,ae.MZ)({type:[ce],json:{write:!0}})],fe.prototype,"associations",void 0),fe=(0,re.Cg)([(0,ae.$K)("esri.rest.networks.support.QueryAssociationsResult")],fe);var he,me=n(56507);let ye=he=class extends ie.o{static from(e){return(0,me.PZ)(he,e)}constructor(e){super(e),this.returnDeletes=!1,this.elements=[],this.types=[],this.gdbVersion=null,this.moment=null}};(0,re.Cg)([(0,ae.MZ)({type:Boolean,json:{write:!0}})],ye.prototype,"returnDeletes",void 0),(0,re.Cg)([(0,ae.MZ)({type:[oe],json:{write:!0}})],ye.prototype,"elements",void 0),(0,re.Cg)([(0,ae.MZ)({type:[te.apiValues],json:{type:te.jsonValues,read:te.read,write:te.write}})],ye.prototype,"types",void 0),(0,re.Cg)([(0,ae.MZ)({type:String,json:{write:!0}})],ye.prototype,"gdbVersion",void 0),(0,re.Cg)([(0,ae.MZ)({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.moment=e?.getTime()}}}})],ye.prototype,"moment",void 0),ye=he=(0,re.Cg)([(0,ae.$K)("esri.rest.networks.support.QueryAssociationsParameters")],ye);var ge=n(54218);function we(e,t,n){const r=e.getVariables();if(r.length>0){const i={};for(const e of r)i[e]=t.evaluateIdentifier(n,{name:e});e.parameters=i}return e}function Ie(e,t,n=null){for(const n in e)if(n.toLowerCase()===t.toLowerCase())return e[n];return n}function Fe(e){if(null===e)return null;const t={type:Ie(e,"type",""),name:Ie(e,"name","")};if("range"===t.type)t.range=Ie(e,"range",[]);else{t.codedValues=[];for(const n of Ie(e,"codedValues",[]))t.codedValues.push({name:Ie(n,"name",""),code:Ie(n,"code",null)})}return t}function Ae(e){if(null===e)return null;const t={},n=Ie(e,"wkt");null!==n&&(t.wkt=n);const r=Ie(e,"wkid");return null!==r&&(t.wkid=r),t}function be(e){if(null===e)return null;const t={hasZ:Ie(e,"hasz",!1),hasM:Ie(e,"hasm",!1)},n=Ie(e,"spatialreference");null!=n&&(t.spatialReference=Ae(n));const r=Ie(e,"x",null);if(null!==r)return t.x=r,t.y=Ie(e,"y",null),t.hasZ&&(t.z=Ie(e,"z",null)),t.hasM&&(t.m=Ie(e,"m",null)),t;const i=Ie(e,"rings",null);if(null!==i)return t.rings=i,t;const a=Ie(e,"paths",null);if(null!==a)return t.paths=a,t;const s=Ie(e,"points",null);if(null!==s)return t.points=s,t;for(const n of["xmin","xmax","ymin","ymax","zmin","zmax","mmin","mmax"]){const r=Ie(e,n,null);null!==r&&(t[n]=r)}return t}function Ne(e){return"utc"===e?.toLowerCase()?"UTC":"unknown"===e?.toLowerCase()?"Unknown":e}function Se(e){if("async"===e.mode){e.functions.timezone=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,a)=>{if((0,f.B)(a,1,2,t,n),(0,f.g)(a[0]))return"Unknown";if((0,f.f)(a[0]))return"Unknown";if((0,f.m)(a[0])){if(await a[0].load(),1===a.length||null===a[1])return a[0].datesInUnknownTimezone?Ne("unknown"):Ne(a[0].dateFieldsTimeZone);if(!(a[1]instanceof s.A)||!1===a[1].hasField("type"))throw new l.D$(t,"InvalidParameter",n);const e=a[1].field("type");if(!1===(0,ge.Kg)(e))throw new l.D$(t,"InvalidParameter",n);switch((0,f.u)(e).toLowerCase()){case"preferredtimezone":return Ne(a[0].preferredTimeZone);case"editfieldsinfo":return Ne(a[0].editFieldsInfo?.timeZone??null);case"timeinfo":return Ne(a[0].timeInfo?.timeZone??null);case"field":if(a[1].hasField("fieldname")&&(0,ge.Kg)(a[1].field("fieldname")))return Ne(a[0].fieldTimeZone((0,f.u)(a[1].field("fieldname"))))}throw new l.D$(t,"InvalidParameter",n)}const o=(0,f.O)(a[0],(0,f.K)(t));if(null===o)return null;const u=o.timeZone;return"system"===u?i.lY.systemTimeZoneCanonicalName:"utc"===u.toLowerCase()?"UTC":"unknown"===u.toLowerCase()?"Unknown":u})},e.functions.sqltimestamp=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{(0,f.B)(i,1,3,t,n);const a=i[0];if((0,f.e)(a)){if(1===i.length)return a.toSQLWithKeyword();if(2===i.length)return a.changeTimeZone((0,f.u)(i[1])).toSQLWithKeyword();throw new l.D$(t,"InvalidParameter",n)}if((0,f.f)(a))return a.toSQLWithKeyword();if((0,f.m)(a)){if(3!==i.length)throw new l.D$(t,"InvalidParameter",n);await a.load();const e=(0,f.u)(i[1]);if((0,f.f)(i[2]))return i[2].toSQLWithKeyword();if(!1===(0,f.e)(i[2]))throw new l.D$(t,"InvalidParameter",n);const r=a.fieldTimeZone(e);return null==r?i[2].toSQLWithKeyword():i[2].changeTimeZone(r).toSQLWithKeyword()}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"sqltimestamp",min:2,max:4}),e.functions.featuresetbyid=function(t,n){return e.standardFunctionAsync(t,n,(e,r,i)=>{if((0,f.B)(i,2,4,t,n),(0,f.l)(i[0])){const e=(0,f.u)(i[1]);let r=(0,f.J)(i[2],null);const a=(0,f.H)((0,f.J)(i[3],!0));if(null===r&&(r=["*"]),!1===(0,ge.cy)(r))throw new l.D$(t,"InvalidParameter",n);return i[0].featureSetById(e,a,r)}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"featuresetbyid",min:2,max:4});const t=new o.b(["datasource","parent","root"]);e.functions.getfeatureset=function(n,r){return e.standardFunctionAsync(n,r,async(e,i,a)=>{if((0,f.B)(a,1,2,n,r),(0,f.k)(a[0])){const e=null==a[1]?"datasource":t.lookup((0,f.u)(a[1]));return(0,d.convertToFeatureSet)(a[0].fullSchema(),e,n.lrucache,n.interceptor,n.spatialReference)}throw new l.D$(n,"InvalidParameter",r)})},e.signatures.push({name:"getfeatureset",min:1,max:2}),e.functions.featuresetbyportalitem=function(t,n){return e.standardFunctionAsync(t,n,(e,r,i)=>{if((0,f.B)(i,2,5,t,n),null===i[0])throw new l.D$(t,"PortalRequired",n);if(i[0]instanceof a.A){const e=(0,f.u)(i[1]),r=(0,f.u)(i[2]);let a=(0,f.J)(i[3],null);const s=(0,f.H)((0,f.J)(i[4],!0));if(null===a&&(a=["*"]),!1===(0,ge.cy)(a))throw new l.D$(t,"InvalidParameter",n);let o;return o=t.services?.portal?t.services.portal:H.A.getDefault(),o=(0,p.R)(i[0],o),(0,d.constructFeatureSetFromPortalItem)(e,r,t.spatialReference,a,s,o,t.lrucache,t.interceptor)}if(!1===(0,ge.Kg)(i[0]))throw new l.D$(t,"PortalRequired",n);const s=(0,f.u)(i[0]),o=(0,f.u)(i[1]);let u=(0,f.J)(i[2],null);const c=(0,f.H)((0,f.J)(i[3],!0));if(null===u&&(u=["*"]),!1===(0,ge.cy)(u))throw new l.D$(t,"InvalidParameter",n);return(0,d.constructFeatureSetFromPortalItem)(s,o,t.spatialReference,u,c,t.services?.portal??H.A.getDefault(),t.lrucache,t.interceptor)})},e.signatures.push({name:"featuresetbyportalitem",min:2,max:5}),e.functions.featuresetbyname=function(t,n){return e.standardFunctionAsync(t,n,(e,r,i)=>{if((0,f.B)(i,2,4,t,n),(0,f.l)(i[0])){const e=(0,f.u)(i[1]);let r=(0,f.J)(i[2],null);const a=(0,f.H)((0,f.J)(i[3],!0));if(null===r&&(r=["*"]),!1===(0,ge.cy)(r))throw new l.D$(t,"InvalidParameter",n);return i[0].featureSetByName(e,a,r)}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"featuresetbyname",min:2,max:4}),e.functions.featureset=function(t,n){return e.standardFunction(t,n,(e,r,i)=>{(0,f.B)(i,1,1,t,n);const a={layerDefinition:{geometryType:"",objectIdField:"",globalIdField:"",typeIdField:"",hasM:!1,hasZ:!1,fields:[]},featureSet:{geometryType:"",features:[]}};if((0,ge.Kg)(i[0])){const e=JSON.parse(i[0]);void 0!==e.layerDefinition?(a.layerDefinition=e.layerDefinition,a.featureSet=e.featureSet,e.layerDefinition.spatialReference&&(a.layerDefinition.spatialReference=e.layerDefinition.spatialReference)):(a.featureSet.features=e.features,a.featureSet.geometryType=e.geometryType,a.layerDefinition.geometryType=a.featureSet.geometryType,a.layerDefinition.objectIdField=e.objectIdFieldName??"",a.layerDefinition.typeIdField=e.typeIdFieldName,a.layerDefinition.globalIdField=e.globalIdFieldName,a.layerDefinition.fields=e.fields,e.spatialReference&&(a.layerDefinition.spatialReference=e.spatialReference))}else{if(!(i[0]instanceof s.A))throw new l.D$(t,"InvalidParameter",n);{const e=JSON.parse(i[0].castToText(!0)),r=Ie(e,"layerdefinition");if(null!==r){a.layerDefinition.geometryType=Ie(r,"geometrytype",""),a.featureSet.geometryType=a.layerDefinition.geometryType,a.layerDefinition.globalIdField=Ie(r,"globalidfield",""),a.layerDefinition.objectIdField=Ie(r,"objectidfield",""),a.layerDefinition.typeIdField=Ie(r,"typeidfield",""),a.layerDefinition.hasZ=!0===Ie(r,"hasz",!1),a.layerDefinition.hasM=!0===Ie(r,"hasm",!1);const t=Ie(r,"spatialreference");t&&(a.layerDefinition.spatialReference=Ae(t));const n=[];for(const e of Ie(r,"fields",[])){const t={name:Ie(e,"name",""),alias:Ie(e,"alias",""),type:Ie(e,"type",""),nullable:Ie(e,"nullable",!0),editable:Ie(e,"editable",!0),length:Ie(e,"length",null),domain:Fe(Ie(e,"domain"))};n.push(t)}a.layerDefinition.fields=n;const i=Ie(e,"featureset");if(i){const e={};for(const t of n)e[t.name.toLowerCase()]=t.name;for(const t of Ie(i,"features",[])){const n={},r=Ie(t,"attributes",{});for(const t in r)n[e[t.toLowerCase()]]=r[t];a.featureSet.features.push({attributes:n,geometry:be(Ie(t,"geometry"))})}}}else{a.layerDefinition.hasZ=!0===Ie(e,"hasz",!1),a.layerDefinition.hasM=!0===Ie(e,"hasm",!1),a.layerDefinition.geometryType=Ie(e,"geometrytype",""),a.featureSet.geometryType=a.layerDefinition.geometryType,a.layerDefinition.objectIdField=Ie(e,"objectidfieldname",""),a.layerDefinition.typeIdField=Ie(e,"typeidfieldname","");const r=Ie(e,"spatialreference");r&&(a.layerDefinition.spatialReference=Ae(r));const i=[],s=Ie(e,"fields",null);if(!(0,ge.cy)(s))throw new l.D$(t,"InvalidParameter",n);for(const e of s){const t={name:Ie(e,"name",""),alias:Ie(e,"alias",""),type:Ie(e,"type",""),nullable:Ie(e,"nullable",!0),editable:Ie(e,"editable",!0),length:Ie(e,"length",null),domain:Fe(Ie(e,"domain"))};i.push(t)}a.layerDefinition.fields=i;const o={};for(const e of i)o[e.name.toLowerCase()]=e.name;let u=Ie(e,"features",null);if((0,ge.cy)(u))for(const e of u){const t={},n=Ie(e,"attributes",{});for(const e in n)t[o[e.toLowerCase()]]=n[e];a.featureSet.features.push({attributes:t,geometry:be(Ie(e,"geometry",null))})}else u=null,a.featureSet.features=u}}}if(!1===function(e){return!!e.layerDefinition&&!!e.featureSet&&!1!==function(e){for(const t of["",null,"esriGeometryNull","esriGeometryPoint","esriGeometryPolyline","esriGeometryPolygon","esriGeometryMultipoint","esriGeometryEnvelope"])if(t===e)return!0;return!1}(e.layerDefinition.geometryType)&&!1!==(0,ge.cy)(e.layerDefinition.fields)&&!1!==(0,ge.cy)(e.featureSet.features)}(a))throw new l.D$(t,"InvalidParameter",n);return a.layerDefinition.geometryType||(a.layerDefinition.geometryType="esriGeometryNull"),V.A.create(a,t.spatialReference)})},e.signatures.push({name:"featureset",min:1,max:1}),e.functions.filter=function(t,n){return e.standardFunctionAsync(t,n,async(r,i,a)=>{if((0,f.B)(a,2,2,t,n),(0,ge.cy)(a[0])||(0,f.j)(a[0])){const e=[];let r,i=a[0];if(i instanceof c.A&&(i=i.toArray()),!(0,f.i)(a[1]))throw new l.D$(t,"InvalidParameter",n);r=a[1].createFunction(t);for(const t of i){const n=r(t);(0,K.$X)(n)?!0===await n&&e.push(t):!0===n&&e.push(t)}return e}if((0,f.m)(a[0])){const n=await a[0].load(),r=A.A.create(a[1],{fieldsIndex:n.getFieldsIndex(),timeZone:n.dateFieldsTimeZoneDefaultUTC}),i=r.getVariables();if(i.length>0){const n={};for(const r of i)n[r]=e.evaluateIdentifier(t,{name:r});r.parameters=n}return new v.A({parentfeatureset:a[0],whereclause:r})}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"filter",min:2,max:2}),e.functions.orderby=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{if((0,f.B)(i,2,2,t,n),(0,f.m)(i[0])){const e=new k(i[1]);return new D({parentfeatureset:i[0],orderbyclause:e})}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"orderby",min:2,max:2}),e.functions.top=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{if((0,f.B)(i,2,2,t,n),(0,f.m)(i[0]))return new P({parentfeatureset:i[0],topnum:i[1]});if((0,ge.cy)(i[0]))return(0,f.s)(i[1])>=i[0].length?i[0].slice():i[0].slice(0,(0,f.s)(i[1]));if((0,f.j)(i[0]))return(0,f.s)(i[1])>=i[0].length()?i[0].slice():i[0].slice(0,(0,f.s)(i[1]));throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"top",min:2,max:2}),e.functions.first=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{if((0,f.B)(i,1,1,t,n),(0,f.m)(i[0])){const n=await i[0].first(e.abortSignal);if(null!==n){const e=u.Xj.createFromGraphicLikeObject(n.geometry,n.attributes,i[0],t.timeZone);return e._underlyingGraphic=n,e}return n}return(0,ge.cy)(i[0])?0===i[0].length?null:i[0][0]:(0,f.j)(i[0])?0===i[0].length()?null:i[0].get(0):null})},e.signatures.push({name:"first",min:1,max:1}),e.functions.attachments=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{(0,f.B)(i,1,2,t,n);const a={minsize:-1,maxsize:-1,types:null,returnMetadata:!1};if(i.length>1)if(i[1]instanceof s.A){if(i[1].hasField("minsize")&&(a.minsize=(0,f.s)(i[1].field("minsize"))),i[1].hasField("metadata")&&(a.returnMetadata=(0,f.H)(i[1].field("metadata"))),i[1].hasField("maxsize")&&(a.maxsize=(0,f.s)(i[1].field("maxsize"))),i[1].hasField("types")){const e=(0,f.M)(i[1].field("types"),!1);e.length>0&&(a.types=e)}}else if(null!==i[1])throw new l.D$(t,"InvalidParameter",n);if((0,f.k)(i[0])){const e=i[0]._layer;let n;if((0,f.m)(e))n=e;else{if(null==e||!(0,w.eB)(e))return[];n=(0,d.constructFeatureSet)(e,t.spatialReference,["*"],!0,t.lrucache,t.interceptor)}return await n.load(),n.queryAttachments(i[0].field(n.objectIdField),a.minsize,a.maxsize,a.types,a.returnMetadata)}if(null===i[0])return[];throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"attachments",min:1,max:2}),e.functions.featuresetbyrelationshipname=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{(0,f.B)(i,2,4,t,n);const a=i[0],s=(0,f.u)(i[1]);let o=(0,f.J)(i[2],null);const u=(0,f.H)((0,f.J)(i[3],!0));if(null===o&&(o=["*"]),!1===(0,ge.cy)(o))throw new l.D$(t,"InvalidParameter",n);if(null===i[0])return null;if(!(0,f.k)(i[0]))throw new l.D$(t,"InvalidParameter",n);const c=a._layer;let p;if((0,f.m)(c))p=c;else{if(null==c||!(0,w.eB)(c))return null;p=(0,d.constructFeatureSet)(c,t.spatialReference,["*"],!0,t.lrucache,t.interceptor)}p=await p.load();const h=p.relationshipMetadata().filter(e=>e.name===s);if(0===h.length)return null;if(void 0!==h[0].relationshipTableId&&null!==h[0].relationshipTableId&&h[0].relationshipTableId>-1)return(0,d.constructFeatureSetFromRelationship)(p,h[0],a.field(p.objectIdField),p.spatialReference,o,u,t.lrucache,t.interceptor);let m=p.serviceUrl();if(!m)return null;m=m.endsWith("/")?m+h[0].relatedTableId.toString():m+"/"+h[0].relatedTableId.toString();const y=await(0,d.constructFeatureSetFromUrl)(m,p.spatialReference,o,u,t.lrucache,t.interceptor);await y.load();let g=y.relationshipMetadata();if(g=g.filter(e=>e.id===h[0].id),!1===a.hasField(h[0].keyField)||null===a.field(h[0].keyField)){const e=await p.getFeatureByObjectId(a.field(p.objectIdField),[h[0].keyField]);if(e){const t=A.A.create(g[0].keyField+"= @id",{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC});return t.parameters={id:e.attributes[h[0].keyField]},new v.A({parentfeatureset:y,whereclause:t})}return new O.A({parentfeatureset:y})}const I=A.A.create(g[0].keyField+"= @id",{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC});return I.parameters={id:a.field(h[0].keyField)},new v.A({parentfeatureset:y,whereclause:I})})},e.signatures.push({name:"featuresetbyrelationshipname",min:2,max:4}),e.functions.featuresetbyassociation=function(t,n){return e.standardFunctionAsync(t,n,async(e,i,a)=>{(0,f.B)(a,2,3,t,n);const s=a[0],u=(0,o.B)((0,f.u)((0,f.J)(a[1],""))),c=(0,ge.Kg)(a[2])?(0,f.u)(a[2]):null;if(null===a[0])return null;if(!(0,f.k)(a[0]))throw new l.D$(t,"InvalidParameter",n);let p=s._layer;if(p instanceof J.default&&(p=(0,d.constructFeatureSet)(p,t.spatialReference,["*"],!0,t.lrucache,t.interceptor)),null===p)return null;if(!1===(0,f.m)(p))return null;await p.load();const h=p.serviceUrl(),m=await(0,d.constructAssociationMetaDataFeatureSetFromUrl)(h,t.spatialReference,!0);if(m.unVersion>=8)return await async function(e,t,n,i,a,s,o){const u=await e.getFeatureSetInfo();if(null===(u?.layerId??null))return null;if(!a.layerIdLookup.get(u.layerId))return null;const c=e.serviceUrl().replace(/\/FeatureServer/i,"/UtilityNetworkServer"),f=[];switch(n){case"connected":f.push("connectivity"),f.push("junction-edge-from-connectivity"),f.push("junction-edge-to-connectivity"),f.push("junction-edge-midspan-connectivity"),f.push("junction-junction-connectivity");break;case"container":case"content":f.push("containment");break;case"structure":case"attached":f.push("attachment");break;case"junctionedge":f.push("junction-edge-from-connectivity"),f.push("junction-edge-to-connectivity");break;case"midspan":f.push("junction-edge-midspan-connectivity");break;default:throw new l.D$(s,"InvalidParameter",o)}let p=null,h=!1;if(null!==i&&""!==i&&void 0!==i){for(const e of a.terminals)e.terminalName===i&&(p=e.terminalId);null===p&&(h=!0)}const m=[];if(!h){const i=new oe({globalId:t.field(e.globalIdField),networkSourceId:a.layerIdLookup.get(u.layerId).sourceId,...p?{terminalId:p}:""}),s=await async function(e,t){const n=(0,ne.Dl)(e),r={...pe(t),f:"json"},i=(0,ne.lF)({...n.query,...r}),a=(0,ne.jV)(i,{method:"post"}),s=`${n.path}/associations/query`,{data:o}=await(0,z.A)(s,a),l=fe.fromJSON(o);return t.types.includes("connectivity")&&(0,Q.Lx)(Y.A.getLogger("esri/rest/networks/support/QueryAssociationsParameters"),"types",{replacement:"Please use 'junction-junction-connectivity' instead of 'connectivity'.",see:"https://arcg.is/11Tr8a#types",version:"4.29",warnOnce:!0}),l}(c,new ye({types:f,elements:[i]}));let o=0;for(const e of s.associations){let t=null,s="",l="";if(e.fromNetworkElement?.globalId===i.globalId?(t=e.toNetworkElement,l="to"):e.toNetworkElement?.globalId===i.globalId&&(t=e.fromNetworkElement,l="from"),!t)continue;switch(n){case"attached":if("attachment"!==e.associationType)continue;if("to"!==l)continue;break;case"structure":if("attachment"!==e.associationType)continue;if("from"!==l)continue;break;case"container":if("containment"!==e.associationType)continue;if("from"!==l)continue;break;case"content":if("containment"!==e.associationType)continue;if("to"!==l)continue;break;case"connected":break;case"junctionedge":"junction-edge-to-connectivity"===e.associationType?s="to":"junction-edge-from-connectivity"===e.associationType&&(s="from");break;case"midspan":if("junction-edge-midspan-connectivity"!==e.associationType)continue}const u=a.sourceIdLookup.get(t.networkSourceId)?.className??"";m.push(new r.A({geometry:null,attributes:{objectId:o++,globalId:t.globalId,percentAlong:e.percentAlong??0,isContentVisible:e.isContentVisible?0:1,className:u,side:s}}))}}const y=new J.default({source:m,geometryType:null,objectIdField:"objectId",globalIdField:"globalId",fields:[new M.A({name:"objectId",alias:"objectId",type:"oid"}),new M.A({name:"globalId",alias:"globalId",type:"global-id"}),new M.A({name:"percentAlong",alias:"percentAlong",type:"double"}),new M.A({name:"side",alias:"side",type:"string"}),new M.A({name:"isContentVisible",alias:"isContentVisible",type:"integer"}),new M.A({name:"className",alias:"className",type:"string"})]});return(0,d.constructFeatureSet)(y)}(p,s,u,c,m,t,n);const y=m.associations;let g=null,I=null,F=!1;if(null!==c&&""!==c&&void 0!==c){for(const e of m.terminals)e.terminalName===c&&(I=e.terminalId);null===I&&(F=!0)}const b=y.getFieldsIndex(),v=b.get("TOGLOBALID").name,x=b.get("FROMGLOBALID").name,D=b.get("TOTERMINALID").name,E=b.get("FROMTERMINALID").name,k=b.get("FROMNETWORKSOURCEID").name,L=b.get("TONETWORKSOURCEID").name,U=b.get("ASSOCIATIONTYPE").name,$=b.get("ISCONTENTVISIBLE").name,j=b.get("OBJECTID").name;for(const e of p.fields)if("global-id"===e.type){g=s.field(e.name);break}let Z=null,B=new _(new M.A({name:"percentalong",alias:"percentalong",type:"double"}),A.A.create("0",{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC})),W=new _(new M.A({name:"side",alias:"side",type:"string"}),A.A.create("''",{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC}));const R="globalid",q="globalId",P={};for(const e in m.lkp)P[e]=m.lkp[e].sourceId;const O=new T(new M.A({name:"classname",alias:"classname",type:"string"}),null,P);let V="";switch(u){case"midspan":{V=`((${v}='${g}') OR ( ${x}='${g}')) AND (${U} IN (5))`,O.codefield=A.A.create(`CASE WHEN (${v}='${g}') THEN ${k} ELSE ${L} END`,{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC});const e=(0,w.ke)(C.findField(y.fields,x));e.name=R,e.alias=R,Z=new _(e,A.A.create(`CASE WHEN (${x}='${g}') THEN ${v} ELSE ${x} END`,{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC})),B=m.unVersion>=4?new N(C.findField(y.fields,b.get("PERCENTALONG").name)):new _(new M.A({name:"percentalong",alias:"percentalong",type:"double"}),A.A.create("0",{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC}));break}case"junctionedge":{V=`((${v}='${g}') OR ( ${x}='${g}')) AND (${U} IN (4,6))`,O.codefield=A.A.create(`CASE WHEN (${v}='${g}') THEN ${k} ELSE ${L} END`,{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC});const e=(0,w.ke)(C.findField(y.fields,x));e.name=R,e.alias=R,Z=new _(e,A.A.create(`CASE WHEN (${x}='${g}') THEN ${v} ELSE ${x} END`,{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC})),W=new _(new M.A({name:"side",alias:"side",type:"string"}),A.A.create(`CASE WHEN (${U}=4) THEN 'from' ELSE 'to' END`,{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC}));break}case"connected":{let e=`${v}='@T'`,t=`${x}='@T'`;null!==I&&(e+=` AND ${D}=@A`,t+=` AND ${E}=@A`),V="(("+e+") OR ("+t+"))",V=(0,f._)(V,"@T",g??""),e=(0,f._)(e,"@T",g??""),null!==I&&(e=(0,f._)(e,"@A",I.toString()),V=(0,f._)(V,"@A",I.toString())),O.codefield=A.A.create("CASE WHEN "+e+` THEN ${k} ELSE ${L} END`,{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC});const n=(0,w.ke)(C.findField(y.fields,x));n.name=R,n.alias=R,Z=new _(n,A.A.create("CASE WHEN "+e+` THEN ${x} ELSE ${v} END`,{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC}));break}case"container":V=`${v}='${g}' AND ${U} = 2`,null!==I&&(V+=` AND ${D} = `+I.toString()),O.codefield=k,V="( "+V+" )",Z=new S(C.findField(y.fields,x),R,R);break;case"content":V=`(${x}='${g}' AND ${U} = 2)`,null!==I&&(V+=` AND ${E} = `+I.toString()),O.codefield=L,V="( "+V+" )",Z=new S(C.findField(y.fields,v),R,R);break;case"structure":V=`(${v}='${g}' AND ${U} = 3)`,null!==I&&(V+=` AND ${D} = `+I.toString()),O.codefield=k,V="( "+V+" )",Z=new S(C.findField(y.fields,x),R,q);break;case"attached":V=`(${x}='${g}' AND ${U} = 3)`,null!==I&&(V+=` AND ${E} = `+I.toString()),O.codefield=L,V="( "+V+" )",Z=new S(C.findField(y.fields,v),R,q);break;default:throw new l.D$(t,"InvalidParameter",n)}return F&&(V="1 <> 1"),new C({parentfeatureset:y,adaptedFields:[new N(C.findField(y.fields,j)),new N(C.findField(y.fields,$)),Z,W,O,B],extraFilter:V?A.A.create(V,{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC}):null})})},e.signatures.push({name:"featuresetbyassociation",min:2,max:6}),e.functions.groupby=function(t,n){return e.standardFunctionAsync(t,n,async(r,i,a)=>{if((0,f.B)(a,3,3,t,n),!(0,f.m)(a[0]))throw new l.D$(t,"InvalidParameter",n);const o=await a[0].load(),u=[],d=[];let c=!1,p=[];if((0,ge.Kg)(a[1]))p.push(a[1]);else if(a[1]instanceof s.A)p.push(a[1]);else if((0,ge.cy)(a[1]))p=a[1];else{if(!(0,f.j)(a[1]))throw new l.D$(t,"InvalidParameter",n);p=a[1].toArray()}for(const e of p)if((0,ge.Kg)(e)){const t=A.A.create((0,f.u)(e),{fieldsIndex:o.getFieldsIndex(),timeZone:o.dateFieldsTimeZoneDefaultUTC}),n=!0===(0,I.DA)(t)?(0,f.u)(e):"%%%%FIELDNAME";u.push({name:n,expression:t}),"%%%%FIELDNAME"===n&&(c=!0)}else{if(!(e instanceof s.A))throw new l.D$(t,"InvalidParameter",n);{const r=e.hasField("name")?e.field("name"):"%%%%FIELDNAME",i=e.hasField("expression")?e.field("expression"):"";if("%%%%FIELDNAME"===r&&(c=!0),!r)throw new l.D$(t,"InvalidParameter",n);u.push({name:r,expression:A.A.create(i||r,{fieldsIndex:o.getFieldsIndex(),timeZone:o.dateFieldsTimeZoneDefaultUTC})})}}if(p=[],(0,ge.Kg)(a[2]))p.push(a[2]);else if((0,ge.cy)(a[2]))p=a[2];else if((0,f.j)(a[2]))p=a[2].toArray();else{if(!(a[2]instanceof s.A))throw new l.D$(t,"InvalidParameter",n);p.push(a[2])}for(const e of p){if(!(e instanceof s.A))throw new l.D$(t,"InvalidParameter",n);{const r=e.hasField("name")?e.field("name"):"",i=e.hasField("statistic")?e.field("statistic"):"",a=e.hasField("expression")?e.field("expression"):"";if(!(r&&i&&(0,ge.Kg)(i)&&a))throw new l.D$(t,"InvalidParameter",n);d.push({name:r,statistic:i,expression:A.A.create(a,{fieldsIndex:o.getFieldsIndex(),timeZone:o.dateFieldsTimeZoneDefaultUTC})})}}if(c){const e={};for(const t of o.fields)e[t.name.toLowerCase()]=1;for(const t of u)"%%%%FIELDNAME"!==t.name&&(e[t.name.toLowerCase()]=1);for(const t of d)"%%%%FIELDNAME"!==t.name&&(e[t.name.toLowerCase()]=1);let t=0;for(const n of u)if("%%%%FIELDNAME"===n.name){for(;1===e["field_"+t.toString()];)t++;e["field_"+t.toString()]=1,n.name="FIELD_"+t.toString()}}for(const n of u)we(n.expression,e,t);for(const n of d)we(n.expression,e,t);return new R({parentfeatureset:a[0],groupbyfields:u,statsfields:d})})},e.signatures.push({name:"groupby",min:3,max:3}),e.functions.distinct=function(t,n){return e.standardFunctionAsync(t,n,async(r,i,a)=>{if((0,f.m)(a[0])){(0,f.B)(a,2,2,t,n);const r=await a[0].load(),i=[];let o=[];if((0,ge.Kg)(a[1]))o.push(a[1]);else if(a[1]instanceof s.A)o.push(a[1]);else if((0,ge.cy)(a[1]))o=a[1];else{if(!(0,f.j)(a[1]))throw new l.D$(t,"InvalidParameter",n);o=a[1].toArray()}let u=!1;for(const e of o)if((0,ge.Kg)(e)){const t=A.A.create((0,f.u)(e),{fieldsIndex:r.getFieldsIndex(),timeZone:r.dateFieldsTimeZoneDefaultUTC}),n=!0===(0,I.DA)(t)?(0,f.u)(e):"%%%%FIELDNAME";i.push({name:n,expression:t}),"%%%%FIELDNAME"===n&&(u=!0)}else{if(!(e instanceof s.A))throw new l.D$(t,"InvalidParameter",n);{const a=e.hasField("name")?e.field("name"):"%%%%FIELDNAME",s=e.hasField("expression")?e.field("expression"):"";if("%%%%FIELDNAME"===a&&(u=!0),!a)throw new l.D$(t,"InvalidParameter",n);i.push({name:a,expression:A.A.create(s||a,{fieldsIndex:r.getFieldsIndex(),timeZone:r.dateFieldsTimeZoneDefaultUTC})})}}if(u){const e={};for(const t of r.fields)e[t.name.toLowerCase()]=1;for(const t of i)"%%%%FIELDNAME"!==t.name&&(e[t.name.toLowerCase()]=1);let t=0;for(const n of i)if("%%%%FIELDNAME"===n.name){for(;1===e["field_"+t.toString()];)t++;e["field_"+t.toString()]=1,n.name="FIELD_"+t.toString()}}for(const n of i)we(n.expression,e,t);return new R({parentfeatureset:a[0],groupbyfields:i,statsfields:[]})}return function(e){if(1===e.length){if((0,ge.cy)(e[0]))return(0,G.t)("distinct",e[0],-1);if((0,f.j)(e[0]))return(0,G.t)("distinct",e[0].toArray(),-1)}return(0,G.t)("distinct",e,-1)}(a)})},e.functions.getfeaturesetinfo=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{if((0,f.B)(i,1,1,t,n),!(0,f.m)(i[0]))return null;const a=await i[0].getFeatureSetInfo();return a?s.A.convertObjectToArcadeDictionary({layerId:a.layerId,layerName:a.layerName,itemId:a.itemId,serviceLayerUrl:a.serviceLayerUrl,webMapLayerId:a.webMapLayerId??null,webMapLayerTitle:a.webMapLayerTitle??null,className:null,objectClassId:null},(0,f.K)(t),!1,!1):null})},e.signatures.push({name:"getfeaturesetinfo",min:1,max:1}),e.functions.filterbysubtypecode=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{if((0,f.B)(i,2,2,t,n),(0,f.m)(i[0])){const e=await i[0].load(),r=i[1];if(!(0,ge.Fq)(r))throw new l.D$(t,"InvalidParameter",n);if(e.subtypeField){const t=A.A.create(`${e.subtypeField}= ${i[1]}`,{fieldsIndex:e.getFieldsIndex(),timeZone:e.dateFieldsTimeZoneDefaultUTC});return new v.A({parentfeatureset:i[0],whereclause:t})}if(null===e.typeIdField||""===e.typeIdField)throw new l.D$(t,"FeatureSetDoesNotHaveSubtypes",n);const a=A.A.create(`${e.typeIdField}= ${i[1]}`,{fieldsIndex:e.getFieldsIndex(),timeZone:e.dateFieldsTimeZoneDefaultUTC});return new v.A({parentfeatureset:i[0],whereclause:a})}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"filterbysubtypecode",min:2,max:2})}}},80672:(e,t,n)=>{n.d(t,{R:()=>i});var r=n(20655);function i(e,t){return null===e?t:new r.A({url:e.field("url")})}},85978:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(87449),i=n(11221),a=n(33325);class s extends i.t1{constructor(e){super(),this.declaredClass="esri.layers.featureset.sources.Empty",this._maxProcessing=1e3,this._parent=e.parentfeatureset,this._databaseType=0}async _queryAll(){return i.An.features}async query(e){return i.An}async queryStat(e){return await this._manualStat(e.stat,e.field,e.limit??a.gO,e.abortSignal)}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new r.dr("NeverReach")}async queryAttachments(){return[]}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5967],{9093:(e,t,n)=>{function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function o(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}n.d(t,{o8:()=>o,vt:()=>r,zK:()=>i});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:o,create:r,fromValues:function(e,t,n,r,o,i,l,s,a,u,c,f,d,p,h,g){return[e,t,n,r,o,i,l,s,a,u,c,f,d,p,h,g]}},Symbol.toStringTag,{value:"Module"}))},9762:(e,t,n)=>{n.r(t),n.d(t,{projectBuffer:()=>o});var r=n(37539);function o(e,t,n,o,i,l,s=Math.floor(e.length/3)){const a=(0,r.jd)(t,i);if(null==a)return!1;if(a===r.pO){if(e===o&&n===l)return!0;const t=n+3*s;for(let r=n,i=l;r<t;r++,i++)o[i]=e[r]??0;return!0}const u=n+3*s;for(let t=n,r=l;t<u;t+=3,r+=3)a(e,t,o,r);return!0}},19356:(e,t,n)=>{n.d(t,{i:()=>r});const r=new(n(66552).J)({none:"none",lowFourBit:"low-four-bit",highFourBit:"high-four-bit",absoluteValue:"absolute-value",moduloTen:"modulo-ten"})},20061:(e,t,n)=>{n.d(t,{A:()=>p});var r,o=n(31635),i=n(69540),l=n(66552),s=n(25482),a=n(91429),u=n(56507),c=n(93223);const f=(0,l.O)()({ascendingValues:"ascending-values",descendingValues:"descending-values"});let d=r=class extends((0,i.OU)(s.o)){static from(e){return(0,u.PZ)(r,e)}constructor(e){super(e),this.title=null,this.order=null}};(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],d.prototype,"title",void 0),(0,o.Cg)([(0,c.e)(f)],d.prototype,"order",void 0),d=r=(0,o.Cg)([(0,a.$K)("esri.renderers.support.RendererLegendOptions")],d);const p=d},29242:(e,t,n)=>{function r(){return[1,0,0,0,1,0,0,0,1]}function o(e,t,n,r,o,i,l,s,a){return[e,t,n,r,o,i,l,s,a]}n.d(t,{fA:()=>o,vt:()=>r,zK:()=>i});const i=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:r,fromValues:o},Symbol.toStringTag,{value:"Module"}))},31635:(e,t,n)=>{function r(e,t,n,r){var o,i=arguments.length,l=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(l=(i<3?o(l):i>3?o(t,n,l):o(t,n))||l);return i>3&&l&&Object.defineProperty(t,n,l),l}function o(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var r,o;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(o=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");o&&(r=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}n.d(t,{Cg:()=>r,hk:()=>l,mS:()=>o}),Object.create,Object.create;var i="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function l(e){function t(t){e.error=e.hasError?new i(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var n,r=0;return function o(){for(;n=e.stack.pop();)try{if(!n.async&&1===r)return r=0,e.stack.push(n),Promise.resolve().then(o);if(n.dispose){var i=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(i).then(o,function(e){return t(e),o()})}else r|=1}catch(e){t(e)}if(1===r)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}},34142:(e,t,n)=>{n.r(t),n.d(t,{default:()=>A});var r=n(4576),o=n(34275),i=n(67026),l=n(82534),s=n(38954),a=n(72385),u=n(16930),c=n(9762),f=(n(44208),n(63531)),d=n(69846),p=n(48425),h=n(59418),g=n(37203);function y(e,t,n){return e?.attributeInfo.useElevation?t?function(e,t){const n=new Float64Array(t);for(let r=0;r<t;r++)n[r]=e[3*r+2];return n}(t,n):null:e?.attributeInfo.storageInfo?(0,h.m0)(e.attributeInfo.storageInfo,e.buffer,n,!0):null}function b(e){switch(e){default:case null:case"none":return e=>e;case"low-four-bit":return e=>15&e;case"high-four-bit":return e=>(240&e)>>4;case"absolute-value":return e=>Math.abs(e);case"modulo-ten":return e=>e%10}}function m(e){let t=0;for(const n of e||[])t|=1<<n;return t}var w=n(57005);class M{transform(e){const t=this._transform(e),n=[t.points.buffer,t.rgb.buffer];null!=t.pointIdFilterMap&&n.push(t.pointIdFilterMap.buffer);for(const e of t.attributes)"buffer"in e.values&&(0,o.mw)(e.values.buffer)&&e.values.buffer!==t.rgb.buffer&&n.push(e.values.buffer);return Promise.resolve({result:t,transferList:n})}_transform(e){const t=function(e,t){if(null==e.encoding||""===e.encoding){const n=(0,h.wH)(t,e);if(null==n.vertexAttributes.position)return;const r=(0,h.MA)(t,n.vertexAttributes.position),o=n.header.fields,i=[o.offsetX,o.offsetY,o.offsetZ],l=[o.scaleX,o.scaleY,o.scaleZ],s=r.length/3,a=new Float64Array(3*s);for(let e=0;e<s;e++)a[3*e]=r[3*e]*l[0]+i[0],a[3*e+1]=r[3*e+1]*l[1]+i[1],a[3*e+2]=r[3*e+2]*l[2]+i[2];return a}if("lepcc-xyz"===e.encoding)return(0,g.Me)(t).result}(e.schema,e.geometryBuffer);let n=t.length/3,o=null;const i=new Array,l=y(e.primaryAttributeData,t,n);null!=e.primaryAttributeData&&l&&i.push({attributeInfo:e.primaryAttributeData.attributeInfo,values:l});const s=y(e.modulationAttributeData,t,n);null!=e.modulationAttributeData&&s&&i.push({attributeInfo:e.modulationAttributeData.attributeInfo,values:s});let a=function(e,t,n,r){const{rendererJSON:o,isRGBRenderer:i}=e;let l=null,s=null;if(t&&i)l=t;else if(t&&"pointCloudUniqueValueRenderer"===o?.type){s=p.A.fromJSON(o);const e=s.colorUniqueValueInfos;l=new Uint8Array(3*r);const n=b(s.fieldTransformType);for(let o=0;o<r;o++){const r=(n?n(t[o]):t[o])+"";for(let t=0;t<e.length;t++)if(e[t].values.includes(r)){l[3*o]=e[t].color.r,l[3*o+1]=e[t].color.g,l[3*o+2]=e[t].color.b;break}}}else if(t&&"pointCloudStretchRenderer"===o?.type){s=d.A.fromJSON(o);const e=s.stops;l=new Uint8Array(3*r);const n=b(s.fieldTransformType);for(let o=0;o<r;o++){const r=n?n(t[o]):t[o],i=e.length-1;if(r<e[0].value)l[3*o]=e[0].color.r,l[3*o+1]=e[0].color.g,l[3*o+2]=e[0].color.b;else if(r>=e[i].value)l[3*o]=e[i].color.r,l[3*o+1]=e[i].color.g,l[3*o+2]=e[i].color.b;else for(let t=1;t<e.length;t++)if(r<e[t].value){const n=(r-e[t-1].value)/(e[t].value-e[t-1].value);l[3*o]=e[t].color.r*n+e[t-1].color.r*(1-n),l[3*o+1]=e[t].color.g*n+e[t-1].color.g*(1-n),l[3*o+2]=e[t].color.b*n+e[t-1].color.b*(1-n);break}}}else if(t&&"pointCloudClassBreaksRenderer"===o?.type){s=f.A.fromJSON(o);const e=s.colorClassBreakInfos;l=new Uint8Array(3*r);const n=b(s.fieldTransformType);for(let o=0;o<r;o++){const r=n?n(t[o]):t[o];for(let t=0;t<e.length;t++)if(r>=e[t].minValue&&r<=e[t].maxValue){l[3*o]=e[t].color.r,l[3*o+1]=e[t].color.g,l[3*o+2]=e[t].color.b;break}}}else l=new Uint8Array(3*r).fill(255);if(n&&s?.colorModulation){const e=s.colorModulation.minValue,t=s.colorModulation.maxValue,o=.3;for(let i=0;i<r;i++){const r=n[i],s=r>=t?1:r<=e?o:o+(1-o)*(r-e)/(t-e);l[3*i]=s*l[3*i],l[3*i+1]=s*l[3*i+1],l[3*i+2]=s*l[3*i+2]}}return l}(e.rendererInfo,l,s,n);if(e.filterInfo&&e.filterInfo.length>0&&null!=e.filterAttributesData){const l=e.filterAttributesData.filter(r.Ru).map(e=>{const r=y(e,t,n),o={attributeInfo:e.attributeInfo,values:r};return i.push(o),o});o=new Uint32Array(n),n=function(e,t,n,r,o){const i=e.length/3;let l=0;for(let s=0;s<i;s++){let i=!0;for(let e=0;e<r.length&&i;e++){const{filterJSON:t}=r[e],n=o[e].values[s];switch(t.type){case"pointCloudValueFilter":{const e="exclude"===t.mode;t.values.includes(n)===e&&(i=!1);break}case"pointCloudBitfieldFilter":{const e=m(t.requiredSetBits),r=m(t.requiredClearBits);(n&e)===e&&0===(n&r)||(i=!1);break}case"pointCloudReturnFilter":{const e=15&n,r=n>>>4&15,o=r>1,l=1===e,s=e===r;let a=!1;for(const e of t.includedReturns)if("last"===e&&s||"firstOfMany"===e&&l&&o||"lastOfMany"===e&&s&&o||"single"===e&&!o){a=!0;break}a||(i=!1);break}}}i&&(n[l]=s,e[3*l]=e[3*s],e[3*l+1]=e[3*s+1],e[3*l+2]=e[3*s+2],t[3*l]=t[3*s],t[3*l+1]=t[3*s+1],t[3*l+2]=t[3*s+2],l++)}return l}(t,a,o,e.filterInfo,l)}for(const r of e.userAttributesData){const e=y(r,t,n);i.push({attributeInfo:r.attributeInfo,values:e})}3*n<a.length&&(a=new Uint8Array(a.buffer.slice(0,3*n))),function(e,t,n){if(0!==n)for(let r=0;r<t;r++)e[3*r+2]+=n}(t,n,e.elevationOffset);const c=v(t,n,w.ab.fromData(e.obbData),u.A.fromJSON(e.inSR),u.A.fromJSON(e.outSR));return{obbData:e.obbData,points:c,rgb:a,attributes:i,pointIdFilterMap:o}}}function v(e,t,n,r,o){if(!(0,c.projectBuffer)(e,r,0,e,o,0,t))throw new Error("Can't reproject");const l=(0,a.o8)(n.center),u=(0,a.vt)(),f=(0,a.vt)(),d=(0,a.o8)(n.halfSize);(0,i.Xr)(C,n.quaternion);const p=new Float32Array(3*t);for(let n=0;n<t;n++){let t=3*n;u[0]=e[t]-l[0],u[1]=e[t+1]-l[1],u[2]=e[t+2]-l[2],(0,s.r)(f,u,C),d[0]=Math.max(d[0],Math.abs(f[0])),d[1]=Math.max(d[1],Math.abs(f[1])),d[2]=Math.max(d[2],Math.abs(f[2])),p[t++]=u[0],p[t++]=u[1],p[t]=u[2]}return n.halfSize=d,p}const C=(0,l.vt)();function A(){return new M}},34304:(e,t,n)=>{n.d(t,{DF:()=>a,FD:()=>o,Ov:()=>i,ct:()=>u});let r=1e-6;function o(){return r}const i=Math.random,l=Math.PI/180,s=180/Math.PI;function a(e){return e*l}function u(e){return e*s}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:i,equals:function(e,t){return Math.abs(e-t)<=r*Math.max(1,Math.abs(e),Math.abs(t))},getEpsilon:o,setEpsilon:function(e){r=e},toDegree:u,toRadian:a},Symbol.toStringTag,{value:"Module"}))},37203:(e,t,n)=>{n.d(t,{Ax:()=>b,Me:()=>u,mb:()=>h});var r=n(49186);const o=!0,i={identifierOffset:0,identifierLength:10,versionOffset:10,checksumOffset:12,byteCount:16};function l(e,t,n){return{identifier:String.fromCharCode.apply(null,new Uint8Array(e,n+i.identifierOffset,i.identifierLength)),version:t.getUint16(n+i.versionOffset,o),checksum:t.getUint32(n+i.checksumOffset,o)}}const s={sizeLo:0,sizeHi:4,minX:8,minY:16,minZ:24,maxX:32,maxY:40,maxZ:48,errorX:56,errorY:64,errorZ:72,count:80,reserved:84,byteCount:88};function a(e,t){return{sizeLo:e.getUint32(t+s.sizeLo,o),sizeHi:e.getUint32(t+s.sizeHi,o),minX:e.getFloat64(t+s.minX,o),minY:e.getFloat64(t+s.minY,o),minZ:e.getFloat64(t+s.minZ,o),maxX:e.getFloat64(t+s.maxX,o),maxY:e.getFloat64(t+s.maxY,o),maxZ:e.getFloat64(t+s.maxZ,o),errorX:e.getFloat64(t+s.errorX,o),errorY:e.getFloat64(t+s.errorY,o),errorZ:e.getFloat64(t+s.errorZ,o),count:e.getUint32(t+s.count,o),reserved:e.getUint32(t+s.reserved,o)}}function u(e){const t=new DataView(e,0);let n=0;const{identifier:o,version:u}=l(e,t,n);if(n+=i.byteCount,"LEPCC "!==o)throw new r.A("lepcc-decode-error","Bad identifier");if(u>1)throw new r.A("lepcc-decode-error","Unknown version");const f=a(t,n);if(n+=s.byteCount,f.sizeHi*2**32+f.sizeLo!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const d=new Float64Array(3*f.count),p=[],h=[],g=[],y=[];if(n=c(e,n,p),n=c(e,n,h),n=c(e,n,g),n=c(e,n,y),n!==e.byteLength)throw new r.A("lepcc-decode-error","Bad length");let b=0,m=0;for(let e=0;e<p.length;e++){m+=p[e];let t=0;for(let n=0;n<h[e];n++){t+=g[b];const e=y[b];d[3*b]=Math.min(f.maxX,f.minX+2*f.errorX*t),d[3*b+1]=Math.min(f.maxY,f.minY+2*f.errorY*m),d[3*b+2]=Math.min(f.maxZ,f.minZ+2*f.errorZ*e),b++}}return{errorX:f.errorX,errorY:f.errorY,errorZ:f.errorZ,result:d}}function c(e,t,n){const r=[];t=f(e,t,r);const o=[];for(let i=0;i<r.length;i++){o.length=0,t=f(e,t,o);for(let e=0;e<o.length;e++)n.push(o[e]+r[i])}return t}function f(e,t,n){const i=new DataView(e,t),l=i.getUint8(0),s=31&l,a=!!(32&l),u=(192&l)>>6;let c=0;if(0===u)c=i.getUint32(1,o),t+=5;else if(1===u)c=i.getUint16(1,o),t+=3;else{if(2!==u)throw new r.A("lepcc-decode-error","Bad count type");c=i.getUint8(1),t+=2}if(a)throw new r.A("lepcc-decode-error","LUT not implemented");const f=Math.ceil(c*s/8),d=new Uint8Array(e,t,f);let p=0,h=0,g=0;const y=-1>>>32-s;for(let e=0;e<c;e++){for(;h<s;)p|=d[g]<<h,h+=8,g+=1;n[e]=p&y,p>>>=s,h-=s,h+s>32&&(p|=d[g-1]>>8-h)}return t+g}const d={sizeLo:0,sizeHi:4,count:8,colorMapCount:12,lookupMethod:14,compressionMethod:15,byteCount:16};function p(e,t){return{sizeLo:e.getUint32(t+d.sizeLo,o),sizeHi:e.getUint32(t+d.sizeHi,o),count:e.getUint32(t+d.count,o),colorMapCount:e.getUint16(t+d.colorMapCount,o),lookupMethod:e.getUint8(t+d.lookupMethod),compressionMethod:e.getUint8(t+d.compressionMethod)}}function h(e){const t=new DataView(e,0);let n=0;const{identifier:o,version:s}=l(e,t,n);if(n+=i.byteCount,"ClusterRGB"!==o)throw new r.A("lepcc-decode-error","Bad identifier");if(s>1)throw new r.A("lepcc-decode-error","Unknown version");const a=p(t,n);if(n+=d.byteCount,a.sizeHi*2**32+a.sizeLo!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");if((2===a.lookupMethod||1===a.lookupMethod)&&0===a.compressionMethod){if(3*a.colorMapCount+a.count+n!==e.byteLength||a.colorMapCount>256)throw new r.A("lepcc-decode-error","Bad count");const t=new Uint8Array(e,n,3*a.colorMapCount),o=new Uint8Array(e,n+3*a.colorMapCount,a.count),i=new Uint8Array(3*a.count);for(let e=0;e<a.count;e++){const n=o[e];i[3*e]=t[3*n],i[3*e+1]=t[3*n+1],i[3*e+2]=t[3*n+2]}return i}if(0===a.lookupMethod&&0===a.compressionMethod){if(3*a.count+n!==e.byteLength||0!==a.colorMapCount)throw new r.A("lepcc-decode-error","Bad count");return new Uint8Array(e,n).slice()}if(a.lookupMethod<=2&&1===a.compressionMethod){if(n+3!==e.byteLength||1!==a.colorMapCount)throw new r.A("lepcc-decode-error","Bad count");const o=t.getUint8(n),i=t.getUint8(n+1),l=t.getUint8(n+2),s=new Uint8Array(3*a.count);for(let e=0;e<a.count;e++)s[3*e]=o,s[3*e+1]=i,s[3*e+2]=l;return s}throw new r.A("lepcc-decode-error","Bad method "+a.lookupMethod+","+a.compressionMethod)}const g={sizeLo:0,sizeHi:4,count:8,scaleFactor:12,bitsPerPoint:14,reserved:15,byteCount:16};function y(e,t){return{sizeLo:e.getUint32(t+g.sizeLo,o),sizeHi:e.getUint32(t+g.sizeHi,o),count:e.getUint32(t+g.count,o),scaleFactor:e.getUint16(t+g.scaleFactor,o),bitsPerPoint:e.getUint8(t+g.bitsPerPoint),reserved:e.getUint8(t+g.reserved)}}function b(e){const t=new DataView(e,0);let n=0;const{identifier:o,version:s}=l(e,t,n);if(n+=i.byteCount,"Intensity "!==o)throw new r.A("lepcc-decode-error","Bad identifier");if(s>1)throw new r.A("lepcc-decode-error","Unknown version");const a=y(t,n);if(n+=g.byteCount,a.sizeHi*2**32+a.sizeLo!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const u=new Uint16Array(a.count);if(8===a.bitsPerPoint){if(a.count+n!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const t=new Uint8Array(e,n,a.count);for(let e=0;e<a.count;e++)u[e]=t[e]*a.scaleFactor}else if(16===a.bitsPerPoint){if(2*a.count+n!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const t=new Uint16Array(e,n,a.count);for(let e=0;e<a.count;e++)u[e]=t[e]*a.scaleFactor}else{const t=[];if(f(e,n,t)!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");for(let e=0;e<a.count;e++)u[e]=t[e]*a.scaleFactor}return u}},37539:(e,t,n)=>{n.d(t,{pO:()=>g,jd:()=>d,Tp:()=>p,w5:()=>f});var r=n(34727),o=n(86211),i=n(73941),l=n(79258);Math.PI;const s=l.$O.radius,a=l.$O.eccentricitySquared,u={a1:s*a,a2:s*a*s*a,a3:s*a*a/2,a4:s*a*s*a*2.5,a5:s*a+s*a*a/2,a6:1-a};l.$O.radius,l.$O.flattening,l.Sw.radius,l.Sw.flattening,l.sH.radius,l.sH.flattening,l.sH.radius;var c=n(21325);const f={2:{5:g,7:null,9:null,10:g,1:A,6:null,8:null,0:null,3:b,11:m,2:g,4:j},5:{5:g,7:null,9:null,10:g,1:A,6:null,8:null,0:null,3:b,11:m,2:g,4:j},7:{5:null,7:g,9:null,10:g,1:null,6:C,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:g,10:g,1:null,6:null,8:v,0:null,3:null,11:null,2:null,4:null},3:{5:y,7:null,9:null,10:y,1:function(e,t,n,r){const o=e[t]/V,i=z-2*Math.atan(Math.exp(-e[t+1]/V)),l=V+(e[t+2]??0),s=Math.cos(i)*l;n[r]=Math.cos(o)*s,n[r+1]=Math.sin(o)*s,n[r+2]=Math.sin(i)*l},6:null,8:null,0:null,3:g,11:function(e,t,n,r){y(e,t,n,r),m(n,r,n,r)},2:y,4:function(e,t,n,r){y(e,t,n,r),j(n,r,n,r)}},4:{5:k,7:null,9:null,10:k,1:function(e,t,n,r){k(e,t,n,r),A(n,r,n,r)},6:null,8:null,0:null,3:function(e,t,n,r){k(e,t,n,r),b(n,r,n,r)},11:function(e,t,n,r){k(e,t,n,r),m(n,r,n,r)},2:k,4:g},1:{5:U,7:null,9:null,10:U,1:g,6:null,8:null,0:null,3:function(e,t,n,r){U(e,t,n,r),b(n,r,n,r)},11:function(e,t,n,r){U(e,t,n,r),m(n,r,n,r)},2:U,4:function(e,t,n,r){U(e,t,n,r),j(n,r,n,r)}},6:{5:null,7:O,9:null,10:O,1:null,6:g,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:I,10:I,1:null,6:null,8:g,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:g,3:null,11:null,2:null,4:null},10:{5:g,7:g,9:g,10:g,1:A,6:C,8:v,0:null,3:b,11:m,2:g,4:j},11:{5:w,7:null,9:null,10:w,1:function(e,t,n,r){w(e,t,n,r),A(n,r,n,r)},6:null,8:null,0:null,3:function(e,t,n,r){w(e,t,n,r),b(n,r,n,r)},11:g,2:w,4:function(e,t,n,r){w(e,t,n,r),j(n,r,n,r)}}};function d(e,t){return p(e,t)?.projector}function p(e,t){if(null==e||null==t)return null;if(R.source.spatialReference===e&&R.dest.spatialReference===t)return R;const n=h(e,R.source),r=h(t,R.dest);return 0===n&&0===r?(0,c.aI)(e,t)?R.projector=g:R.projector=null:R.projector=f[n][r],R}function h(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,o.GA)(e,1)),(0,i.jA)(e)?t.spatialReferenceId=1:(0,c.oT)(e)?t.spatialReferenceId=2:(0,c.K8)(e)?t.spatialReferenceId=3:(0,c.r1)(e)?t.spatialReferenceId=11:e.wkt===i.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===i.FY.wkt?t.spatialReferenceId=6:e.wkt===i.LJ.wkt?t.spatialReferenceId=8:(0,c.q8)(e)?t.spatialReferenceId=7:(0,c.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function g(e,t,n,r){e!==n&&(n[r++]=e[t++],n[r++]=e[t++],n[r]=e[t]??0)}function y(e,t,n,r){n[r]=x*(e[t]/V),n[r+1]=x*(z-2*Math.atan(Math.exp(-e[t+1]/V))),n[r+2]=e[t+2]??0}function b(e,t,n,o){!function(e,t,n,o,i){const l=.4999999*Math.PI,s=(0,r.qE)(T*e[t+1],-l,l),a=Math.sin(s);n[o++]=T*e[t]*i.radius,n[o++]=i.halfSemiMajorAxis*Math.log((1+a)/(1-a)),n[o]=e[t+2]??0}(e,t,n,o,l.$O)}function m(e,t,n,r){n[r]=e[t]*q,n[r+1]=e[t+1]*q,n[r+2]=e[t+2]??0}function w(e,t,n,r){n[r]=e[t]*P,n[r+1]=e[t+1]*P,n[r+2]=e[t+2]??0}function M(e,t,n,r,o){const i=o+(e[t+2]??0),l=T*e[t],s=T*e[t+1],a=Math.cos(s)*i;n[r]=Math.cos(l)*a,n[r+1]=Math.sin(l)*a,n[r+2]=Math.sin(s)*i}function v(e,t,n,r){M(e,t,n,r,l.Sw.radius)}function C(e,t,n,r){M(e,t,n,r,l.sH.radius)}function A(e,t,n,r){M(e,t,n,r,l.$O.radius)}function S(e,t,n,o,i){const l=e[t],s=e[t+1],a=e[t+2]??0,u=Math.sqrt(l*l+s*s+a*a),c=(0,r.YN)(a/(0===u?1:u)),f=Math.atan2(s,l);n[o++]=x*f,n[o++]=x*c,n[o]=u-i}function I(e,t,n,r){S(e,t,n,r,l.Sw.radius)}function O(e,t,n,r){S(e,t,n,r,l.sH.radius)}function U(e,t,n,r){S(e,t,n,r,l.$O.radius)}function j(e,t,n,r){!function(e,t,n,r,o){const i=T*e[t],l=T*e[t+1],s=e[t+2]??0,a=Math.sin(l),u=Math.cos(l),c=o.radius/Math.sqrt(1-o.eccentricitySquared*a*a);n[r++]=(c+s)*u*Math.cos(i),n[r++]=(c+s)*u*Math.sin(i),n[r++]=(c*(1-o.eccentricitySquared)+s)*a}(e,t,n,r,l.$O)}function k(e,t,n,r){const o=u,i=e[t],s=e[t+1],a=e[t+2]??0;let c,f,d,p,h,g,y,b,m,w,M,v,C,A,S,I,O,U,j,k,R;c=Math.abs(a),f=i*i+s*s,d=Math.sqrt(f),p=f+a*a,h=Math.sqrt(p),k=Math.atan2(s,i),g=a*a/p,y=f/p,A=o.a2/h,S=o.a3-o.a4/h,y>.3?(b=c/h*(1+y*(o.a1+A+g*S)/h),j=Math.asin(b),w=b*b,m=Math.sqrt(1-w)):(m=d/h*(1-g*(o.a5-A-y*S)/h),j=Math.acos(m),w=1-m*m,b=Math.sqrt(w)),M=1-l.$O.eccentricitySquared*w,v=l.$O.radius/Math.sqrt(M),C=o.a6*v,A=d-v*m,S=c-C*b,O=m*A+b*S,I=m*S-b*A,U=I/(C/M+O),j+=U,R=O+I*U/2,a<0&&(j=-j),n[r++]=x*k,n[r++]=x*j,n[r]=R}const R={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:g},T=(0,r.kU)(1),x=(0,r.KJ)(1),z=.5*Math.PI,V=l.$O.radius,q=V*Math.PI/180,P=180/(V*Math.PI)},40876:(e,t,n)=>{n.d(t,{Eq:()=>p,G1:()=>g,TS:()=>i,Tf:()=>m,V6:()=>o,Vm:()=>h,ay:()=>a,c1:()=>y,c4:()=>l,j5:()=>u,lT:()=>f,oW:()=>c,xV:()=>M});const r={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function o(e){return!!r[e]||!!r[e.toLowerCase()]}function i(e){return r[e]??r[e.toLowerCase()]}function l(e){return[...i(e)]}function s(e,t,n){n<0&&++n,n>1&&--n;const r=6*n;return r<1?e+(t-e)*r:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function a(e,t,n,r=1){const o=(e%360+360)%360/360,i=n<=.5?n*(t+1):n+t-n*t,l=2*n-i;return[Math.round(255*s(l,i,o+1/3)),Math.round(255*s(l,i,o)),Math.round(255*s(l,i,o-1/3)),r]}function u(e){const t=e.length>5,n=t?8:4,r=(1<<n)-1,o=t?1:17,i=t?9===e.length:5===e.length;let l=Number("0x"+e.slice(1));if(isNaN(l))return null;const s=[0,0,0,1];let a;return i&&(a=l&r,l>>=n,s[3]=o*a/255),a=l&r,l>>=n,s[2]=o*a,a=l&r,l>>=n,s[1]=o*a,a=l&r,l>>=n,s[0]=o*a,s}function c(e){if(!e.startsWith("#")||isNaN(Number(`0x${e.slice(1)}`)))return null;switch(e.length){case 4:case 5:{const t=parseInt(e.slice(1,2),16),n=parseInt(e.slice(2,3),16),r=parseInt(e.slice(3,4),16),o=4===e.length?15:parseInt(e.slice(4),16);return[t+16*t,n+16*n,r+16*r,(o+16*o)/255]}case 7:case 9:return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16),(7===e.length?255:parseInt(e.slice(7),16))/255];default:return null}}function f(e){const t=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(t){const e=t[2].split(/\s*,\s*/),n=t[1];if("rgb"===n&&3===e.length||"rgba"===n&&4===e.length){if(e[0].endsWith("%")){const t=e.map(e=>2.56*parseFloat(e));return 4===e.length&&(t[3]=parseFloat(e[3])),d(t)}return d(e.map(e=>parseFloat(e)))}if("hsl"===n&&3===e.length||"hsla"===n&&4===e.length)return a(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3]??"1"))}return null}function d(e){return e[0]=y(e[0]),e[1]=y(e[1]),e[2]=y(e[2]),e[3]=4===e.length?g(e[3]):1,e}function p(e){let t=o(e)?i(e):null;return t??=f(e),t??=c(e),t}function h(e){const t=p(e);return null!=t?[t[0]/255,t[1]/255,t[2]/255,t[3]]:null}function g(e){return b(e,0,1)}function y(e){return Math.round(b(e,0,255))}function b(e,t,n){return e=Number(e),isNaN(e)?n:e<t?t:e>n?n:e}const m=2.2,w=1/m;function M(e){return e**w}},48425:(e,t,n)=>{n.d(t,{A:()=>b});var r,o=n(31635),i=n(4718),l=n(91429),s=n(51857),a=n(20061),u=n(68197),c=n(25482),f=n(56507);let d=r=class extends c.o{constructor(){super(...arguments),this.description=null,this.label=null,this.values=null,this.color=null}clone(){return new r({description:this.description,label:this.label,values:(0,i.o8)(this.values),color:(0,i.o8)(this.color)})}};(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],d.prototype,"description",void 0),(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],d.prototype,"label",void 0),(0,o.Cg)([(0,l.MZ)({type:[String],json:{write:{isRequired:!0}}})],d.prototype,"values",void 0),(0,o.Cg)([(0,l.MZ)({type:u.A,json:{type:[f.jz],write:{isRequired:!0}}})],d.prototype,"color",void 0),d=r=(0,o.Cg)([(0,l.$K)("esri.renderers.support.pointCloud.ColorUniqueValueInfo")],d);const p=d;var h,g=n(19356),y=n(93223);let b=h=class extends s.A{constructor(e){super(e),this.type="point-cloud-unique-value",this.field=null,this.fieldTransformType=null,this.colorUniqueValueInfos=null,this.legendOptions=null}clone(){return new h({...this.cloneProperties(),field:(0,i.o8)(this.field),fieldTransformType:(0,i.o8)(this.fieldTransformType),colorUniqueValueInfos:(0,i.o8)(this.colorUniqueValueInfos),legendOptions:(0,i.o8)(this.legendOptions)})}};(0,o.Cg)([(0,y.e)({pointCloudUniqueValueRenderer:"point-cloud-unique-value"})],b.prototype,"type",void 0),(0,o.Cg)([(0,l.MZ)({json:{write:{isRequired:!0}},type:String})],b.prototype,"field",void 0),(0,o.Cg)([(0,l.MZ)({type:g.i.apiValues,json:{type:g.i.jsonValues,read:g.i.read,write:g.i.write}})],b.prototype,"fieldTransformType",void 0),(0,o.Cg)([(0,l.MZ)({type:[p],json:{write:{isRequired:!0}}})],b.prototype,"colorUniqueValueInfos",void 0),(0,o.Cg)([(0,l.MZ)({type:a.A,json:{write:!0}})],b.prototype,"legendOptions",void 0),b=h=(0,o.Cg)([(0,l.$K)("esri.renderers.PointCloudUniqueValueRenderer")],b)},51850:(e,t,n)=>{function r(){return[0,0,0]}function o(e){return[e[0],e[1],e[2]]}function i(e,t,n){return[e,t,n]}function l(e,t,n){return[e,t,n]}function s(e,t=[0,0,0]){const n=Math.min(3,e.length);for(let r=0;r<n;++r)t[r]=e[r];return t}function a(){return i(1,1,1)}function u(){return i(1,0,0)}function c(){return i(0,1,0)}function f(){return i(0,0,1)}n.d(t,{CN:()=>l,Cb:()=>y,Cw:()=>h,JP:()=>g,Un:()=>p,ci:()=>s,fA:()=>i,o8:()=>o,uY:()=>d,vt:()=>r});const d=[0,0,0],p=a(),h=u(),g=c(),y=f();Object.freeze(Object.defineProperty({__proto__:null,ONES:p,UNIT_X:h,UNIT_Y:g,UNIT_Z:y,ZEROS:d,clone:o,create:r,freeze:l,fromArray:s,fromValues:i,ones:a,unitX:u,unitY:c,unitZ:f,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"}))},51857:(e,t,n)=>{n.d(t,{A:()=>C});var r,o=n(31635),i=n(66552),l=n(25482),s=n(4718),a=n(91429);let u=r=class extends l.o{constructor(){super(...arguments),this.field=null,this.minValue=0,this.maxValue=255}clone(){return new r({field:this.field,minValue:this.minValue,maxValue:this.maxValue})}};(0,o.Cg)([(0,a.MZ)({type:String,json:{write:{isRequired:!0}}})],u.prototype,"field",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],u.prototype,"minValue",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],u.prototype,"maxValue",void 0),u=r=(0,o.Cg)([(0,a.$K)("esri.renderers.support.pointCloud.ColorModulation")],u);const c=u,f=new i.J({pointCloudFixedSizeAlgorithm:"fixed-size",pointCloudSplatAlgorithm:"splat"});let d=class extends l.o{};(0,o.Cg)([(0,a.MZ)({type:f.apiValues,readOnly:!0,nonNullable:!0,json:{type:f.jsonValues,read:!1,write:{writer:f.write,isRequired:!0}}})],d.prototype,"type",void 0),d=(0,o.Cg)([(0,a.$K)("esri.renderers.support.pointCloud.PointSizeAlgorithm")],d);const p=d;var h,g=n(93223);let y=h=class extends p{constructor(){super(...arguments),this.type="fixed-size",this.size=0,this.useRealWorldSymbolSizes=null}clone(){return new h({size:this.size,useRealWorldSymbolSizes:this.useRealWorldSymbolSizes})}};(0,o.Cg)([(0,g.e)({pointCloudFixedSizeAlgorithm:"fixed-size"})],y.prototype,"type",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],y.prototype,"size",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],y.prototype,"useRealWorldSymbolSizes",void 0),y=h=(0,o.Cg)([(0,a.$K)("esri.renderers.support.pointCloud.PointSizeFixedSizeAlgorithm")],y);const b=y;var m;let w=m=class extends p{constructor(){super(...arguments),this.type="splat",this.scaleFactor=1}clone(){return new m({scaleFactor:this.scaleFactor})}};(0,o.Cg)([(0,g.e)({pointCloudSplatAlgorithm:"splat"})],w.prototype,"type",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,value:1,nonNullable:!0,json:{write:{isRequired:!0}}})],w.prototype,"scaleFactor",void 0),w=m=(0,o.Cg)([(0,a.$K)("esri.renderers.support.pointCloud.PointSizeSplatAlgorithm")],w);const M={key:"type",base:p,typeMap:{"fixed-size":b,splat:w}},v=(0,i.O)()({pointCloudClassBreaksRenderer:"point-cloud-class-breaks",pointCloudRGBRenderer:"point-cloud-rgb",pointCloudStretchRenderer:"point-cloud-stretch",pointCloudUniqueValueRenderer:"point-cloud-unique-value"});let C=class extends l.o{constructor(e){super(e),this.type=void 0,this.pointSizeAlgorithm=null,this.colorModulation=null,this.pointsPerInch=10}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}cloneProperties(){return{pointSizeAlgorithm:(0,s.o8)(this.pointSizeAlgorithm),colorModulation:(0,s.o8)(this.colorModulation),pointsPerInch:(0,s.o8)(this.pointsPerInch)}}};(0,o.Cg)([(0,a.MZ)({type:v.apiValues,readOnly:!0,nonNullable:!0,json:{type:v.jsonValues,read:!1,write:{writer:v.write,isRequired:!0}}})],C.prototype,"type",void 0),(0,o.Cg)([(0,a.MZ)({types:M,json:{write:!0}})],C.prototype,"pointSizeAlgorithm",void 0),(0,o.Cg)([(0,a.MZ)({type:c,json:{write:!0}})],C.prototype,"colorModulation",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0},nonNullable:!0,type:Number})],C.prototype,"pointsPerInch",void 0),C=(0,o.Cg)([(0,a.$K)("esri.renderers.PointCloudRenderer")],C)},59418:(e,t,n)=>{n.d(t,{wH:()=>g,MA:()=>d,E5:()=>p,m0:()=>b});var r=n(49186),o=n(4718),i=n(53966),l=n(34275),s=n(37203);const a=()=>i.A.getLogger("esri.views.3d.layers.i3s.I3SBinaryReader");function u(e,t,n){let o="",i=0;for(;i<n;){const l=e[t+i];if(l<128)o+=String.fromCharCode(l),i++;else if(l>=192&&l<224){if(i+1>=n)throw new r.A("utf8-decode-error","UTF-8 Decode failed. Two byte character was truncated.");const s=(31&l)<<6|63&e[t+i+1];o+=String.fromCharCode(s),i+=2}else if(l>=224&&l<240){if(i+2>=n)throw new r.A("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const s=(15&l)<<12|(63&e[t+i+1])<<6|63&e[t+i+2];o+=String.fromCharCode(s),i+=3}else{if(!(l>=240&&l<248))throw new r.A("utf8-decode-error","UTF-8 Decode failed. Invalid multi byte sequence.");{if(i+3>=n)throw new r.A("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const s=(7&l)<<18|(63&e[t+i+1])<<12|(63&e[t+i+2])<<6|63&e[t+i+3];if(s>=65536){const e=55296+(s-65536>>10),t=56320+(1023&s);o+=String.fromCharCode(e,t)}else o+=String.fromCharCode(s);i+=4}}}return o}function c(e,t){const n={byteOffset:0,byteCount:0,fields:Object.create(null)};let r=0;for(let o=0;o<t.length;o++){const i=t[o],l=i.valueType||i.type,s=w[l];n.fields[i.property]=s(e,r),r+=m[l].BYTES_PER_ELEMENT}return n.byteCount=r,n}function f(e,t,n){const o=[];let i,l,s=0;for(l=0;l<e;l+=1){if(i=t[l],i>0){if(o.push(u(n,s,i-1)),0!==n[s+i-1])throw new r.A("string-array-error","Invalid string array: missing null termination.")}else o.push(null);s+=i}return o}function d(e,t){return new(0,m[t.valueType])(e,t.byteOffset,t.count*t.valuesPerElement)}function p(e,t){if(!e)return null;const n=e[t];return(0,l.IY)(e)?n===l.PI?null:n:(0,l._G)(e)?n===l.h2?null:n:n!=n?null:n}function h(e,t,n){if(t!==e&&a().error(`Invalid ${n} buffer size\n expected: ${e}, actual: ${t})`),t<e)throw new r.A("buffer-too-small","Binary buffer is too small",{expectedSize:e,actualSize:t})}function g(e,t){const n=c(e,t&&t.header);let r=n.byteCount;const o={isDraco:!1,header:n,byteOffset:n.byteCount,byteCount:0,vertexAttributes:{}},i=n.fields,l=null!=i.vertexCount?i.vertexCount:i.count;for(const e of t.ordering){if(!t.vertexAttributes[e])continue;const n={...t.vertexAttributes[e],byteOffset:r,count:l},i=y[e]||"_"+e;o.vertexAttributes[i]=n,r+=v(n.valueType)*n.valuesPerElement*l}const s=i.faceCount;if(t.faces&&s){o.faces={};for(const e of t.ordering){if(!t.faces[e])continue;const n={...t.faces[e],byteOffset:r,count:s};o.faces[e]=n,r+=v(n.valueType)*n.valuesPerElement*s}}const a=i.featureCount;if(t.featureAttributes&&t.featureAttributeOrder&&a){o.featureAttributes={};for(const e of t.featureAttributeOrder){if(!t.featureAttributes[e])continue;const n={...t.featureAttributes[e],byteOffset:r,count:a};o.featureAttributes[e]=n,r+=("UInt64"===n.valueType?8:v(n.valueType))*n.valuesPerElement*a}}return h(r,e.byteLength,"geometry"),o.byteCount=r-o.byteOffset,o}const y={position:"position",normal:"normal",color:"color",uv0:"uv0",region:"uvRegion"};function b(e,t,n,i=!1){if("lepcc-rgb"===e.encoding)return i?(0,s.mb)(t):function(e){return Array.isArray(e)?e.length<l.y9?e:new Uint8Array(e):e.length<l.y9?Array.from(e):e}((0,s.mb)(t));if("lepcc-intensity"===e.encoding)return i?(0,s.Ax)(t):function(e){return Array.isArray(e)?e.length<l.y9?e:new Uint16Array(e):e.length<l.y9?Array.from(e):e}((0,s.Ax)(t));if(null!=e.encoding&&""!==e.encoding)throw new r.A("unknown-attribute-storage-info-encoding","Unknown Attribute Storage Info Encoding");e["attributeByteCounts "]&&!e.attributeByteCounts&&(a().warn("Warning: Trailing space in 'attributeByteCounts '."),e.attributeByteCounts=e["attributeByteCounts "]),"ObjectIds"===e.ordering[0]&&e.hasOwnProperty("objectIds")&&(a().warn("Warning: Case error in objectIds"),e.ordering[0]="objectIds");const u=function(e,t,n){const i=null!=t.header?c(e,t.header):{byteOffset:0,byteCount:0,fields:{count:n}},l={header:i,byteOffset:i.byteCount,byteCount:0,entries:Object.create(null)};let s=i.byteCount;for(let e=0;e<t.ordering.length;e++){const n=t.ordering[e],a=(0,o.o8)(t[n]);if(a.count=i.fields.count??0,"String"===a.valueType){if(a.byteOffset=s,a.byteCount=i.fields[n+"ByteCount"],"UTF-8"!==a.encoding)throw new r.A("unsupported-encoding","Unsupported String encoding.",{encoding:a.encoding});if(a.timeEncoding&&"ECMA_ISO8601"!==a.timeEncoding)throw new r.A("unsupported-time-encoding","Unsupported time encoding.",{timeEncoding:a.timeEncoding})}else{if(!M(a.valueType))throw new r.A("unsupported-value-type","Unsupported binary valueType",{valueType:a.valueType});{const e=v(a.valueType);s+=s%e!==0?e-s%e:0,a.byteOffset=s,a.byteCount=e*a.valuesPerElement*a.count}}s+=a.byteCount??0,l.entries[n]=a}return l.byteCount=s-l.byteOffset,l}(t,e,n);h(u.byteOffset+u.byteCount,t.byteLength,"attribute");const g=u.entries.attributeValues||u.entries.objectIds;if(g){if("String"===g.valueType){const e=u.entries.attributeByteCounts,n=d(t,e),r=function(e,t){return new Uint8Array(e,t.byteOffset,t.byteCount)}(t,g);return g.timeEncoding?function(e,t,n){return f(e,t,n).map(e=>{const t=e?Date.parse(e):null;return null==t||Number.isNaN(t)?null:t})}(e.count,n,r):f(e.count,n,r)}return i?d(t,g):function(e,t){const n=d(e,t);if(n.length>=l.y9)return n;const r=new Array;return n.forEach((e,t)=>r.push(p(n,t))),r}(t,g)}throw new r.A("bad-attribute-storage-info","Bad attributeStorageInfo specification.")}const m={Float32:Float32Array,Float64:Float64Array,UInt8:Uint8Array,Int8:Int8Array,UInt16:Uint16Array,Int16:Int16Array,UInt32:Uint32Array,Int32:Int32Array},w={Float32:(e,t)=>new DataView(e,0).getFloat32(t,!0),Float64:(e,t)=>new DataView(e,0).getFloat64(t,!0),UInt8:(e,t)=>new DataView(e,0).getUint8(t),Int8:(e,t)=>new DataView(e,0).getInt8(t),UInt16:(e,t)=>new DataView(e,0).getUint16(t,!0),Int16:(e,t)=>new DataView(e,0).getInt16(t,!0),UInt32:(e,t)=>new DataView(e,0).getUint32(t,!0),Int32:(e,t)=>new DataView(e,0).getInt32(t,!0)};function M(e){return m.hasOwnProperty(e)}function v(e){return M(e)?m[e].BYTES_PER_ELEMENT:0}},63531:(e,t,n)=>{n.d(t,{A:()=>b});var r,o=n(31635),i=n(4718),l=n(91429),s=n(51857),a=n(20061),u=n(68197),c=n(25482),f=n(56507);let d=r=class extends c.o{constructor(){super(...arguments),this.description=null,this.label=null,this.minValue=0,this.maxValue=0,this.color=null}clone(){return new r({description:this.description,label:this.label,minValue:this.minValue,maxValue:this.maxValue,color:(0,i.o8)(this.color)})}};(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],d.prototype,"description",void 0),(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],d.prototype,"label",void 0),(0,o.Cg)([(0,l.MZ)({type:Number,json:{read:{source:"classMinValue"},write:{target:"classMinValue",isRequired:!0}}})],d.prototype,"minValue",void 0),(0,o.Cg)([(0,l.MZ)({type:Number,json:{read:{source:"classMaxValue"},write:{target:"classMaxValue",isRequired:!0}}})],d.prototype,"maxValue",void 0),(0,o.Cg)([(0,l.MZ)({type:u.A,json:{type:[f.jz],write:{isRequired:!0}}})],d.prototype,"color",void 0),d=r=(0,o.Cg)([(0,l.$K)("esri.renderers.support.pointCloud.ColorClassBreakInfo")],d);const p=d;var h,g=n(19356),y=n(93223);let b=h=class extends s.A{constructor(e){super(e),this.type="point-cloud-class-breaks",this.field=null,this.legendOptions=null,this.fieldTransformType=null,this.colorClassBreakInfos=null}clone(){return new h({...this.cloneProperties(),field:this.field,fieldTransformType:this.fieldTransformType,colorClassBreakInfos:(0,i.o8)(this.colorClassBreakInfos),legendOptions:(0,i.o8)(this.legendOptions)})}};(0,o.Cg)([(0,y.e)({pointCloudClassBreaksRenderer:"point-cloud-class-breaks"})],b.prototype,"type",void 0),(0,o.Cg)([(0,l.MZ)({json:{write:{isRequired:!0}},type:String})],b.prototype,"field",void 0),(0,o.Cg)([(0,l.MZ)({type:a.A,json:{write:!0}})],b.prototype,"legendOptions",void 0),(0,o.Cg)([(0,l.MZ)({type:g.i.apiValues,json:{type:g.i.jsonValues,read:g.i.read,write:g.i.write}})],b.prototype,"fieldTransformType",void 0),(0,o.Cg)([(0,l.MZ)({type:[p],json:{write:{isRequired:!0}}})],b.prototype,"colorClassBreakInfos",void 0),b=h=(0,o.Cg)([(0,l.$K)("esri.renderers.PointCloudClassBreaksRenderer")],b)},68197:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(40876),o=n(34727),i=n(56507);function l(e){return(0,o.qE)((0,i.Vr)(e),0,255)}function s(e,t){const n=e.toString(16).padStart(2,"0");return t?n.slice(0,1):n}class a{static blendColors(e,t,n,r=new a){return r.r=Math.round(e.r+(t.r-e.r)*n),r.g=Math.round(e.g+(t.g-e.g)*n),r.b=Math.round(e.b+(t.b-e.b)*n),r.a=e.a+(t.a-e.a)*n,r._sanitize()}static fromRgb(e,t){const n=(0,r.lT)(e);return n?a.fromArray(n,t):null}static fromHex(e,t=new a){const n=(0,r.oW)(e);return n?a.fromArray(n,t):null}static fromArray(e,t=new a){return t._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(t.a)&&(t.a=1),t._sanitize()}static fromString(e,t){const n=(0,r.Eq)(e);return n?a.fromArray(n,t):null}static fromJSON(e){return null!=e?new a([e[0],e[1],e[2],(e[3]??255)/255]):void 0}static toUnitRGB(e){return null!=e?[e.r/255,e.g/255,e.b/255]:null}static toUnitRGBA(e,t){return null==e?null:(t??=[0,0,0,0],t[0]=e.r/255,t[1]=e.g/255,t[2]=e.b/255,t[3]=null!=e.a?e.a:1,t)}constructor(e){this.r=255,this.g=255,this.b=255,this.a=1,e&&this.setColor(e)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(e){if("string"==typeof e)a.fromString(e,this);else if(Array.isArray(e))a.fromArray(e,this);else{const t=e;this._set(t.r??0,t.g??0,t.b??0,t.a??1),e instanceof a||this._sanitize()}return this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(e){const t=e?.capitalize??!1,n=e?.digits??6,r=3===n||4===n,o=4===n||8===n,i=`#${s(this.r,r)}${s(this.g,r)}${s(this.b,r)}${o?s(Math.round(255*this.a),r):""}`;return t?i.toUpperCase():i}toCss(e=!1){const t=this.r+", "+this.g+", "+this.b;return e?`rgba(${t}, ${this.a})`:`rgb(${t})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(e=0){const t=l(this.r),n=l(this.g),r=l(this.b);return 0===e||1!==this.a?[t,n,r,l(255*this.a)]:[t,n,r]}clone(){return new a(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(e){return null!=e&&e.r===this.r&&e.g===this.g&&e.b===this.b&&e.a===this.a}_sanitize(){return this.r=(0,r.c1)(this.r),this.g=(0,r.c1)(this.g),this.b=(0,r.c1)(this.b),this.a=(0,r.G1)(this.a),this}_set(e,t,n,r){this.r=e,this.g=t,this.b=n,this.a=r}}a.prototype.declaredClass="esri.Color"},69540:(e,t,n)=>{n.d(t,{OU:()=>c,Pw:()=>f});var r=n(31635),o=n(69622),i=(n(44208),n(4718)),l=(n(53966),n(97768)),s=n(88620),a=n(64108);const u=Symbol("ClonableMixin"),c=e=>{var t;const n=e;let o=class extends n{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(e){const t=(0,s.oY)(this);(0,l.Lw)(t,"unable to clone instance of non-accessor class");const n=t.metadata,r=t.store,o={},a=new Map;for(const t in n){const l=n[t],s=r?.originOf(t),u=l.clonable;if(l.readOnly||!1===u||7!==s&&0!==s&&5!==s&&4!==s)continue;const c=this[t];let f=null;if("function"==typeof u)f=u(c,e);else if("reference"===u)f=c;else if(f=(0,i.TU)(c,e),null!=c&&null==f)continue;0===s?a.set(t,f):o[t]=f}const u=new(0,Object.getPrototypeOf(this).constructor)(o);if(a.size){const e=(0,s.oY)(u)?.store;if(e)for(const[t,n]of a)e.set(t,n,0)}return u}};return o=(0,r.Cg)([(0,a.$)("esri.core.Clonable")],o),o},f=c(o.A)},69846:(e,t,n)=>{n.d(t,{A:()=>d});var r,o=n(31635),i=n(4718),l=n(91429),s=n(51857),a=n(20061),u=n(19356),c=n(72500),f=n(93223);let d=r=class extends s.A{constructor(e){super(e),this.type="point-cloud-stretch",this.field=null,this.legendOptions=null,this.fieldTransformType=null,this.stops=null}clone(){return new r({...this.cloneProperties(),field:(0,i.o8)(this.field),fieldTransformType:(0,i.o8)(this.fieldTransformType),stops:(0,i.o8)(this.stops),legendOptions:(0,i.o8)(this.legendOptions)})}};(0,o.Cg)([(0,f.e)({pointCloudStretchRenderer:"point-cloud-stretch"})],d.prototype,"type",void 0),(0,o.Cg)([(0,l.MZ)({json:{write:{isRequired:!0}},type:String})],d.prototype,"field",void 0),(0,o.Cg)([(0,l.MZ)({type:a.A,json:{write:!0}})],d.prototype,"legendOptions",void 0),(0,o.Cg)([(0,l.MZ)({type:u.i.apiValues,json:{type:u.i.jsonValues,read:u.i.read,write:u.i.write}})],d.prototype,"fieldTransformType",void 0),(0,o.Cg)([(0,l.MZ)({type:[c.A],json:{write:{isRequired:!0}}})],d.prototype,"stops",void 0),d=r=(0,o.Cg)([(0,l.$K)("esri.renderers.PointCloudStretchRenderer")],d)},72385:(e,t,n)=>{function r(){return new Float32Array(3)}function o(e){const t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function i(e,t,n){const r=new Float32Array(3);return r[0]=e,r[1]=t,r[2]=n,r}function l(){return r()}function s(){return i(1,1,1)}function a(){return i(1,0,0)}function u(){return i(0,1,0)}function c(){return i(0,0,1)}n.d(t,{fA:()=>i,o8:()=>o,vt:()=>r});const f=l(),d=s(),p=a(),h=u(),g=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_X:p,UNIT_Y:h,UNIT_Z:g,ZEROS:f,clone:o,create:r,fromValues:i,ones:s,unitX:a,unitY:u,unitZ:c,zeros:l},Symbol.toStringTag,{value:"Module"}))},72500:(e,t,n)=>{n.d(t,{A:()=>f});var r,o=n(31635),i=n(68197),l=n(25482),s=n(91429),a=n(56507),u=n(43937);let c=r=class extends l.o{constructor(e){super(e),this.color=null,this.label=null,this.value=null}writeValue(e,t,n){t[n]=e??0}clone(){return new r({color:this.color&&this.color.clone(),label:this.label,value:this.value})}};(0,o.Cg)([(0,s.MZ)({type:i.A,json:{type:[a.jz],write:{isRequired:!0}}})],c.prototype,"color",void 0),(0,o.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],c.prototype,"label",void 0),(0,o.Cg)([(0,s.MZ)({type:Number,json:{write:{writerEnsuresNonNull:!0}}})],c.prototype,"value",void 0),(0,o.Cg)([(0,u.K)("value")],c.prototype,"writeValue",null),c=r=(0,o.Cg)([(0,s.$K)("esri.renderers.visualVariables.support.ColorStop")],c);const f=c},77690:(e,t,n)=>{n.d(t,{B8:()=>s,Ge:()=>p,I0:()=>d,KC:()=>a,a4:()=>u,hZ:()=>i,hs:()=>f,lw:()=>c,mg:()=>l,z0:()=>o});var r=n(34304);function o(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function i(e,t,n,r,o,i,l,s,a,u){return e[0]=t,e[1]=n,e[2]=r,e[3]=o,e[4]=i,e[5]=l,e[6]=s,e[7]=a,e[8]=u,e}function l(e,t){if(e===t){const n=t[1],r=t[2],o=t[5];e[1]=t[3],e[2]=t[6],e[3]=n,e[5]=t[7],e[6]=r,e[7]=o}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e}function s(e,t){const n=t[0],r=t[1],o=t[2],i=t[3],l=t[4],s=t[5],a=t[6],u=t[7],c=t[8],f=c*l-s*u,d=-c*i+s*a,p=u*i-l*a;let h=n*f+r*d+o*p;return h?(h=1/h,e[0]=f*h,e[1]=(-c*r+o*u)*h,e[2]=(s*r-o*l)*h,e[3]=d*h,e[4]=(c*n-o*a)*h,e[5]=(-s*n+o*i)*h,e[6]=p*h,e[7]=(-u*n+r*a)*h,e[8]=(l*n-r*i)*h,e):null}function a(e,t){const n=t[0],r=t[1],o=t[2],i=t[3],l=t[4],s=t[5],a=t[6],u=t[7],c=t[8];return e[0]=l*c-s*u,e[1]=o*u-r*c,e[2]=r*s-o*l,e[3]=s*a-i*c,e[4]=n*c-o*a,e[5]=o*i-n*s,e[6]=i*u-l*a,e[7]=r*a-n*u,e[8]=n*l-r*i,e}function u(e){const t=e[0],n=e[1],r=e[2],o=e[3],i=e[4],l=e[5],s=e[6],a=e[7],u=e[8];return t*(u*i-l*a)+n*(-u*o+l*s)+r*(a*o-i*s)}function c(e,t,n){const r=t[0],o=t[1],i=t[2],l=t[3],s=t[4],a=t[5],u=t[6],c=t[7],f=t[8],d=n[0],p=n[1],h=n[2],g=n[3],y=n[4],b=n[5],m=n[6],w=n[7],M=n[8];return e[0]=d*r+p*l+h*u,e[1]=d*o+p*s+h*c,e[2]=d*i+p*a+h*f,e[3]=g*r+y*l+b*u,e[4]=g*o+y*s+b*c,e[5]=g*i+y*a+b*f,e[6]=m*r+w*l+M*u,e[7]=m*o+w*s+M*c,e[8]=m*i+w*a+M*f,e}function f(e,t,n){const r=n[0],o=n[1],i=n[2];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=o*t[3],e[4]=o*t[4],e[5]=o*t[5],e[6]=i*t[6],e[7]=i*t[7],e[8]=i*t[8],e}function d(e,t){const n=t[0],r=t[1],o=t[2],i=t[3],l=n+n,s=r+r,a=o+o,u=n*l,c=r*l,f=r*s,d=o*l,p=o*s,h=o*a,g=i*l,y=i*s,b=i*a;return e[0]=1-f-h,e[3]=c-b,e[6]=d+y,e[1]=c+b,e[4]=1-u-h,e[7]=p-g,e[2]=d-y,e[5]=p+g,e[8]=1-u-f,e}function p(e,t){const n=t[0],r=t[1],o=t[2],i=t[3],l=t[4],s=t[5],a=t[6],u=t[7],c=t[8],f=t[9],d=t[10],p=t[11],h=t[12],g=t[13],y=t[14],b=t[15],m=n*s-r*l,w=n*a-o*l,M=n*u-i*l,v=r*a-o*s,C=r*u-i*s,A=o*u-i*a,S=c*g-f*h,I=c*y-d*h,O=c*b-p*h,U=f*y-d*g,j=f*b-p*g,k=d*b-p*y;let R=m*k-w*j+M*U+v*O-C*I+A*S;return R?(R=1/R,e[0]=(s*k-a*j+u*U)*R,e[1]=(a*O-l*k-u*I)*R,e[2]=(l*j-s*O+u*S)*R,e[3]=(o*j-r*k-i*U)*R,e[4]=(n*k-o*O+i*I)*R,e[5]=(r*O-n*j-i*S)*R,e[6]=(g*A-y*C+b*v)*R,e[7]=(y*M-h*A-b*w)*R,e[8]=(h*C-g*M+b*m)*R,e):null}function h(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e[4]=t[4]-n[4],e[5]=t[5]-n[5],e[6]=t[6]-n[6],e[7]=t[7]-n[7],e[8]=t[8]-n[8],e}const g=c,y=h;Object.freeze(Object.defineProperty({__proto__:null,add:function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e},adjoint:a,copy:function(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[6]=t[6],e[7]=t[7],e[8]=t[8],e},determinant:u,equals:function(e,t){const n=e[0],o=e[1],i=e[2],l=e[3],s=e[4],a=e[5],u=e[6],c=e[7],f=e[8],d=t[0],p=t[1],h=t[2],g=t[3],y=t[4],b=t[5],m=t[6],w=t[7],M=t[8],v=(0,r.FD)();return Math.abs(n-d)<=v*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(o-p)<=v*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(i-h)<=v*Math.max(1,Math.abs(i),Math.abs(h))&&Math.abs(l-g)<=v*Math.max(1,Math.abs(l),Math.abs(g))&&Math.abs(s-y)<=v*Math.max(1,Math.abs(s),Math.abs(y))&&Math.abs(a-b)<=v*Math.max(1,Math.abs(a),Math.abs(b))&&Math.abs(u-m)<=v*Math.max(1,Math.abs(u),Math.abs(m))&&Math.abs(c-w)<=v*Math.max(1,Math.abs(c),Math.abs(w))&&Math.abs(f-M)<=v*Math.max(1,Math.abs(f),Math.abs(M))},exactEquals:function(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[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]},frob:function(e){return Math.sqrt(e[0]**2+e[1]**2+e[2]**2+e[3]**2+e[4]**2+e[5]**2+e[6]**2+e[7]**2+e[8]**2)},fromMat2d:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=t[2],e[4]=t[3],e[5]=0,e[6]=t[4],e[7]=t[5],e[8]=1,e},fromMat4:o,fromQuat:d,fromRotation:function(e,t){const n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=0,e[3]=-n,e[4]=r,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},fromScaling:function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=t[1],e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},fromTranslation:function(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=t[0],e[7]=t[1],e[8]=1,e},identity:function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},invert:s,isOrthoNormal:function(e){const t=(0,r.FD)(),n=e[0],o=e[1],i=e[2],l=e[3],s=e[4],a=e[5],u=e[6],c=e[7],f=e[8];return Math.abs(1-(n*n+l*l+u*u))<=t&&Math.abs(1-(o*o+s*s+c*c))<=t&&Math.abs(1-(i*i+a*a+f*f))<=t},mul:g,multiply:c,multiplyScalar:function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e},multiplyScalarAndAdd:function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e[4]=t[4]+n[4]*r,e[5]=t[5]+n[5]*r,e[6]=t[6]+n[6]*r,e[7]=t[7]+n[7]*r,e[8]=t[8]+n[8]*r,e},normalFromMat4:p,normalFromMat4Legacy:function(e,t){const n=t[0],r=t[1],o=t[2],i=t[4],l=t[5],s=t[6],a=t[8],u=t[9],c=t[10],f=c*l-s*u,d=-c*i+s*a,p=u*i-l*a,h=n*f+r*d+o*p;if(!h)return null;const g=1/h;return e[0]=f*g,e[1]=(-c*r+o*u)*g,e[2]=(s*r-o*l)*g,e[3]=d*g,e[4]=(c*n-o*a)*g,e[5]=(-s*n+o*i)*g,e[6]=p*g,e[7]=(-u*n+r*a)*g,e[8]=(l*n-r*i)*g,e},projection:function(e,t,n){return e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/n,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e},rotate:function(e,t,n){const r=t[0],o=t[1],i=t[2],l=t[3],s=t[4],a=t[5],u=t[6],c=t[7],f=t[8],d=Math.sin(n),p=Math.cos(n);return e[0]=p*r+d*l,e[1]=p*o+d*s,e[2]=p*i+d*a,e[3]=p*l-d*r,e[4]=p*s-d*o,e[5]=p*a-d*i,e[6]=u,e[7]=c,e[8]=f,e},scale:f,scaleByVec2:function(e,t,n){const r=n[0],o=n[1];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=o*t[3],e[4]=o*t[4],e[5]=o*t[5],e},set:i,str:function(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"},sub:y,subtract:h,translate:function(e,t,n){const r=t[0],o=t[1],i=t[2],l=t[3],s=t[4],a=t[5],u=t[6],c=t[7],f=t[8],d=n[0],p=n[1];return e[0]=r,e[1]=o,e[2]=i,e[3]=l,e[4]=s,e[5]=a,e[6]=d*r+p*l+u,e[7]=d*o+p*s+c,e[8]=d*i+p*a+f,e},transpose:l},Symbol.toStringTag,{value:"Module"}))}}]);
|