@arcgis/core 4.22.0-next.20211021 → 4.22.0-next.20211025
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/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/00ac1ce56f9885a8be83.js +1 -0
- package/assets/esri/core/workers/chunks/01c9afe41ab4ccc597c9.js +1 -0
- package/assets/esri/core/workers/chunks/02a3d14adc504a51fa24.js +1 -0
- package/assets/esri/core/workers/chunks/035a9ab0202d5386b782.js +1 -0
- package/assets/esri/core/workers/chunks/062bace5505f13689c7d.js +1 -0
- package/assets/esri/core/workers/chunks/06c7745d813bcb540ce8.js +1 -0
- package/assets/esri/core/workers/chunks/0950b488a60b2abc21fc.js +1 -0
- package/assets/esri/core/workers/chunks/0af396f2e0de681113ef.js +1 -0
- package/assets/esri/core/workers/chunks/131838059f0f81d8eaee.js +1 -0
- package/assets/esri/core/workers/chunks/146cba0d172ec2f4eba2.js +1 -0
- package/assets/esri/core/workers/chunks/17e49c0dfa5a5a6213e2.js +1 -0
- package/assets/esri/core/workers/chunks/1a0b08190274725dc956.js +1 -0
- package/assets/esri/core/workers/chunks/1add7f0779accdf8d204.js +1 -0
- package/assets/esri/core/workers/chunks/20b81d11e6286d347bfc.js +1 -0
- package/assets/esri/core/workers/chunks/{e596bd3de960d1dc1c57.js → 2207580a78ee292ed9b8.js} +1 -1
- package/assets/esri/core/workers/chunks/2d3646a83465c75986f9.js +1 -0
- package/assets/esri/core/workers/chunks/2d38ee3ef3ebe32a1194.js +1 -0
- package/assets/esri/core/workers/chunks/3737dcc3c0dea3ca05d5.js +1 -0
- package/assets/esri/core/workers/chunks/3e2042e70647c1afa6aa.js +1 -0
- package/assets/esri/core/workers/chunks/3ebfaab2855a2236a95d.js +1 -0
- package/assets/esri/core/workers/chunks/{d6fe616192a8efbfbc3e.js → 440f8101402a4c0d7019.js} +1 -1
- package/assets/esri/core/workers/chunks/4587d770767966985e22.js +1 -0
- package/assets/esri/core/workers/chunks/487b8892fae85810a8c0.js +1 -0
- package/assets/esri/core/workers/chunks/4901a78f32c3ea6b823b.js +1 -0
- package/assets/esri/core/workers/chunks/496fe47fc4d28e1a716d.js +1 -0
- package/assets/esri/core/workers/chunks/{9f22f47d4b2e72d7bdcf.js → 4c010119c24510ea31bb.js} +2 -2
- package/assets/esri/core/workers/chunks/{9f22f47d4b2e72d7bdcf.js.LICENSE.txt → 4c010119c24510ea31bb.js.LICENSE.txt} +0 -0
- package/assets/esri/core/workers/chunks/4f5076e1f2b18ce8156d.js +1 -0
- package/assets/esri/core/workers/chunks/{f291ebc4b089bd1f0a3f.js → 50e86a6bb13042b1dbac.js} +1 -1
- package/assets/esri/core/workers/chunks/{64d9a062c1f1ac08a3ac.js → 565020b1c02a8cb33c2b.js} +1 -1
- package/assets/esri/core/workers/chunks/{d78c60a22f76df7c48c7.js → 59640d78295e2e363f18.js} +1 -1
- package/assets/esri/core/workers/chunks/{a0356f320a1b2fbd03f0.js → 5ac2b2598245aa17cdbd.js} +1 -1
- package/assets/esri/core/workers/chunks/5b4a8cce5601cc92c8a3.js +1 -0
- package/assets/esri/core/workers/chunks/5b92d5d4049622531109.js +1 -0
- package/assets/esri/core/workers/chunks/{751c1a2838b54a74a9a6.js → 5f3caa0ddb215342c728.js} +2 -2
- package/assets/esri/core/workers/chunks/615e995d5ce8fa044b09.js +1 -0
- package/assets/esri/core/workers/chunks/62a2453699e0dd2393b9.js +1 -0
- package/assets/esri/core/workers/chunks/67013547be1a7ae1670a.js +1 -0
- package/assets/esri/core/workers/chunks/67eddf4808f8888faeb4.js +1 -0
- package/assets/esri/core/workers/chunks/695dbedff2340aa019ba.js +1 -0
- package/assets/esri/core/workers/chunks/6a7e388c94206d2f61ff.js +1 -0
- package/assets/esri/core/workers/chunks/6e22b69d55e791ab3d9a.js +1 -0
- package/assets/esri/core/workers/chunks/71e6c0c5ef0aa7eb1703.js +1 -0
- package/assets/esri/core/workers/chunks/7a74e230439c5111f852.js +1 -0
- package/assets/esri/core/workers/chunks/7e76a8e6fa67e607d09e.js +1 -0
- package/assets/esri/core/workers/chunks/7fe4985ca0cb3e6d35c6.js +1 -0
- package/assets/esri/core/workers/chunks/8027330714ff5ffb020e.js +1 -0
- package/assets/esri/core/workers/chunks/844b564d1a422a17f6ac.js +1 -0
- package/assets/esri/core/workers/chunks/856f9281a08cb032238e.js +1 -0
- package/assets/esri/core/workers/chunks/89b4983de872780e9aa1.js +1 -0
- package/assets/esri/core/workers/chunks/8f3bc0cd2c2b01ab80cd.js +1 -0
- package/assets/esri/core/workers/chunks/8fd912e325ccd48b98a9.js +1 -0
- package/assets/esri/core/workers/chunks/901907a5c01f0fd1478f.js +1 -0
- package/assets/esri/core/workers/chunks/92a0b88a14c92239df8a.js +1 -0
- package/assets/esri/core/workers/chunks/972e9aeb3c29c9bf441a.js +1 -0
- package/assets/esri/core/workers/chunks/9758c34ce61c3714515a.js +1 -0
- package/assets/esri/core/workers/chunks/{457ea4feaa006d60c6b1.js → 9a04d087a29f0f3937a3.js} +1 -1
- package/assets/esri/core/workers/chunks/9b0bb171224b35ce2031.js +1 -0
- package/assets/esri/core/workers/chunks/9cbe7afdaef8720dfc8d.js +1 -0
- package/assets/esri/core/workers/chunks/9ccde5b6562f0007fe45.js +1 -0
- package/assets/esri/core/workers/chunks/9d320bbeedeea15522ab.js +1 -0
- package/assets/esri/core/workers/chunks/a001b3b4527817548094.js +1 -0
- package/assets/esri/core/workers/chunks/{197b72bca45065e0eb4a.js → a0c580d4a1915ddd3fe4.js} +1 -1
- package/assets/esri/core/workers/chunks/a4a9c15929b43d83701f.js +1 -0
- package/assets/esri/core/workers/chunks/a54d11f44721f808b82f.js +1 -0
- package/assets/esri/core/workers/chunks/a646a11673d513c00e7a.js +1 -0
- package/assets/esri/core/workers/chunks/a792e2bc7cafdc29f05e.js +1 -0
- package/assets/esri/core/workers/chunks/acae1771697034f265b1.js +1 -0
- package/assets/esri/core/workers/chunks/af2ee804a9c63eea610c.js +1 -0
- package/assets/esri/core/workers/chunks/b28b487047da3aeef3fd.js +1 -0
- package/assets/esri/core/workers/chunks/b3e57824a5855cb37a96.js +1 -0
- package/assets/esri/core/workers/chunks/b89449ead32e4cd21edd.js +1 -0
- package/assets/esri/core/workers/chunks/b99891ed5a02cab02173.js +1 -0
- package/assets/esri/core/workers/chunks/bac84bc621be73a7a4bc.js +1 -0
- package/assets/esri/core/workers/chunks/{25037dcf8a0c72b7b647.js → bbe068388167e9dd0c11.js} +1 -1
- package/assets/esri/core/workers/chunks/c271a1857bcc4e9a36dd.js +1 -0
- package/assets/esri/core/workers/chunks/{eb3035e49a45ecc82575.js → c5030664720fcdc6d85e.js} +1 -1
- package/assets/esri/core/workers/chunks/c534ed122f8a1202d3a3.js +1 -0
- package/assets/esri/core/workers/chunks/c5ef2e28b0c539ddb6a7.js +1 -0
- package/assets/esri/core/workers/chunks/c65e5ccfae03d148d82b.js +1 -0
- package/assets/esri/core/workers/chunks/c91660f3982be4e03705.js +1 -0
- package/assets/esri/core/workers/chunks/ce93113b99bdbeddd07b.js +1 -0
- package/assets/esri/core/workers/chunks/cf2d408e669cfa2c65be.js +1 -0
- package/assets/esri/core/workers/chunks/d08f63ffeecefa02ad91.js +1 -0
- package/assets/esri/core/workers/chunks/{8d33644192c01e5416b4.js → d1a71b58ef62e71979c5.js} +1 -1
- package/assets/esri/core/workers/chunks/d30eade5afecd334f6cb.js +1 -0
- package/assets/esri/core/workers/chunks/d8782d0856b9d815cb6c.js +1 -0
- package/assets/esri/core/workers/chunks/db16c21b650001502e6c.js +1 -0
- package/assets/esri/core/workers/chunks/db18110c57253a31ac96.js +1 -0
- package/assets/esri/core/workers/chunks/dbaa5fb466d6c0214f24.js +1 -0
- package/assets/esri/core/workers/chunks/deae370788a7aacf4dd5.js +1 -0
- package/assets/esri/core/workers/chunks/e6ca132e1eeea3aa174e.js +1 -0
- package/assets/esri/core/workers/chunks/e878ccc431729ef3360f.js +1 -0
- package/assets/esri/core/workers/chunks/eb124f15ad4b9193f00a.js +1 -0
- package/assets/esri/core/workers/chunks/ebc71c06c1c22aaef54e.js +1 -0
- package/assets/esri/core/workers/chunks/f183da283af0836421ab.js +1 -0
- package/assets/esri/core/workers/chunks/f42bdc2a134833d33b4e.js +1 -0
- package/assets/esri/core/workers/chunks/{736d628cda4e02d40337.js → f8612c2fc5739e98be58.js} +1 -1
- package/assets/esri/core/workers/chunks/f965e3e5f6f4f9ba54ac.js +1 -0
- package/assets/esri/core/workers/chunks/fa4089640f480b69962e.js +1 -0
- package/assets/esri/core/workers/chunks/fb219563e5169ea67d68.js +1 -0
- package/assets/esri/libs/i3s/i3s.wasm +0 -0
- package/chunks/ChapmanAtmosphere.glsl.js +56 -77
- package/chunks/Clouds.glsl.js +1 -1
- package/chunks/Pattern.glsl.js +9 -11
- package/chunks/RibbonLine.glsl.js +60 -68
- package/chunks/i3s.js +1 -1
- package/chunks/mat4.js +1 -1
- package/chunks/vec3.js +1 -1
- package/core/Collection.js +1 -1
- package/core/Loadable.js +1 -1
- package/core/accessorSupport/ensureType.js +1 -1
- package/core/promiseUtils.js +1 -1
- package/core/support/OwningCollection.js +1 -1
- package/core/workers/RemoteClient.js +1 -1
- package/core/workers/WorkerOwner.js +1 -1
- package/core/workers/workers.js +2 -2
- package/geometry/projection.js +1 -1
- package/identity/IdentityManagerBase.js +1 -1
- package/interfaces.d.ts +205 -497
- package/layers/ElevationLayer.js +1 -1
- package/layers/GeoJSONLayer.js +1 -1
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/VectorTileLayer.js +1 -1
- package/layers/VoxelWasmPerScene.js +1 -1
- package/layers/WCSLayer.js +1 -1
- package/layers/analyses/AreaMeasurement3D.js +1 -1
- package/layers/analyses/DirectLineMeasurement3D.js +1 -1
- package/layers/analyses/Slice.js +1 -1
- package/layers/effects/EffectList.js +1 -1
- package/layers/effects/effects.js +1 -1
- package/layers/effects/jsonUtils.js +1 -1
- package/layers/effects/parser.js +1 -1
- package/layers/effects/utils.js +5 -0
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/data/QueryEngine.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/sources/connections/GeoEventConnection.js +1 -1
- package/layers/mixins/ImageryTileMixin.js +1 -1
- package/layers/support/RasterWorker.js +1 -1
- package/layers/support/TilemapCache.js +1 -1
- package/layers/support/rasterDatasets/BaseRaster.js +1 -1
- package/layers/support/rasterDatasets/ImageServerRaster.js +1 -1
- package/layers/support/rasterDatasets/WCSRaster.js +1 -1
- package/layers/support/rasterFunctions/pixelUtils.js +1 -1
- package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
- package/package.json +2 -2
- package/portal/support/portalLayers.js +1 -1
- package/request.js +1 -1
- package/smartMapping/renderers/support/utils.js +1 -1
- package/smartMapping/statistics/support/WorkerClient.js +1 -1
- package/smartMapping/statistics/support/statsWorker.js +1 -1
- package/smartMapping/statistics/support/utils.js +1 -1
- package/smartMapping/support/adapters/CSVLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/SceneLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/support/utils.js +1 -1
- package/statistics/utils.js +1 -1
- package/support/GraphicsCollection.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/FillSymbol3DLayer.js +1 -1
- package/symbols/IconSymbol3DLayer.js +1 -1
- package/symbols/LineSymbol3DLayer.js +1 -1
- package/symbols/patterns/LinePattern3D.js +5 -0
- package/symbols/patterns/LineStylePattern3D.d.ts +4 -0
- package/symbols/patterns/LineStylePattern3D.js +5 -0
- package/symbols/patterns/StylePattern3D.js +1 -1
- package/symbols/patterns/lineStyles.js +5 -0
- package/symbols/patterns/utils.js +1 -1
- package/symbols/support/Symbol3DFillMaterial.js +1 -1
- package/symbols/support/Symbol3DIconOutline.js +5 -0
- package/symbols/support/Symbol3DMaterial.js +1 -1
- package/symbols/support/Symbol3DOutline.js +1 -1
- package/symbols/support/defaults3D.js +1 -1
- package/symbols/support/previewSymbol3D.js +1 -1
- package/symbols/support/symbolLayerUtils3D.js +1 -1
- package/views/2d/engine/vectorTiles/TileParser.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
- package/views/2d/engine/vectorTiles/style/StyleRepository.js +1 -1
- package/views/2d/engine/webgl/effects/HittestEffect.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/VectorTileLayerView2D.js +1 -1
- package/views/2d/layers/features/controllers/EditsQueue.js +1 -1
- package/views/2d/layers/features/controllers/FeatureController2D.js +1 -1
- package/views/2d/layers/features/support/AttributeStore.js +1 -1
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/2d/layers/support/FeatureLayerProxy.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.js +1 -1
- package/views/3d/environment/ChapmanAtmosphereTechnique.js +1 -1
- package/views/3d/environment/CloudsGenerator.js +1 -1
- package/views/3d/environment/EnvironmentRenderer.js +1 -1
- package/views/3d/environment/PanoramicAtmosphere.js +1 -1
- package/views/3d/environment/SimpleAtmosphere.js +1 -1
- package/views/3d/externalRenderers/ExternalRendererStore.js +1 -1
- package/views/3d/externalRenderers.js +1 -1
- package/views/3d/interactive/Manipulator3D.js +1 -1
- package/views/3d/interactive/analysisTools/slice/SliceTool.js +1 -1
- package/views/3d/interactive/analysisTools/slice/images/Factory.js +5 -0
- package/views/3d/interactive/analysisTools/slice/sliceToolConfig.js +1 -1
- package/views/3d/interactive/analysisTools/slice/sliceToolUtils.js +1 -1
- package/views/3d/interactive/editingTools/settings.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ExtentTransformTool.js +1 -1
- package/views/3d/interactive/graphics/Slice/SliceController.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
- package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/LaserlineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/SlicePlaneVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/VerticesVisualElement.js +1 -1
- package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
- package/views/3d/layers/DynamicLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/VectorTileLayerView3D.js +1 -1
- package/views/3d/layers/analyses/AreaMeasurement3D/AreaMeasurementView3D.js +1 -1
- package/views/3d/layers/analyses/AreaMeasurement3D/support/AreaMeasurementPathHelper.js +1 -1
- package/views/3d/layers/analyses/AreaMeasurement3D/support/AreaMeasurementVisualization.js +1 -1
- package/views/3d/layers/analyses/DirectLineMeasurement3D/DirectLineMeasurementView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/ElevationAligners.js +1 -1
- package/views/3d/layers/graphics/ElevationQuery.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLodInstanceGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
- package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
- package/views/3d/layers/graphics/Labeler.js +1 -1
- package/views/3d/layers/graphics/Loadable.js +1 -1
- package/views/3d/layers/graphics/ObjectResourceCache.js +1 -1
- package/views/3d/layers/graphics/elevationAlignmentUtils.js +1 -1
- package/views/3d/layers/graphics/graphicUtils.js +1 -1
- package/views/3d/layers/graphics/labelPlacement.js +1 -1
- package/views/3d/layers/graphics/pointUtils.js +1 -1
- package/views/3d/layers/i3s/I3SAttributeOverrides.js +1 -1
- package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
- package/views/3d/layers/i3s/I3SStreamDataController.js +1 -1
- package/views/3d/layers/i3s/PointRenderer.js +1 -1
- package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/layers/support/patternUtils.js +1 -1
- package/views/3d/state/GoToOperation.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/support/LaserLineRenderer.js +1 -1
- package/views/3d/support/SharedSymbolResources.js +1 -1
- package/views/3d/support/StreamDataLoader.js +1 -1
- package/views/3d/support/StreamTextureCollection.js +5 -0
- package/views/3d/support/TextureCollection.js +1 -1
- package/views/3d/support/debugFlags.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/StableSurfaceCenter.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/OverlayRenderTarget.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/webgl-engine/Stage.js +1 -1
- package/views/3d/webgl-engine/core/material/RenderTexture.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +13 -12
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Reprojection.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +10 -3
- package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueRepository.js +1 -1
- package/views/3d/webgl-engine/lib/Camera.js +1 -1
- package/views/3d/webgl-engine/lib/GLMaterialRepository.js +1 -1
- package/views/3d/webgl-engine/lib/GLMaterialTexture.js +1 -1
- package/views/3d/webgl-engine/lib/GLMaterials.js +1 -1
- package/views/3d/webgl-engine/lib/Material.js +1 -1
- package/views/3d/webgl-engine/lib/ModelDirtySet.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/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/SmaaRenderPass.js +1 -1
- package/views/3d/webgl-engine/lib/TextTexture.js +1 -1
- package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/lib/Texture.js +1 -1
- package/views/3d/webgl-engine/lib/TextureRepository.js +1 -1
- package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodComponentData.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodLevel.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodResources.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/HUDMaterial.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/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.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/WaterGLMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/lineStippleUtils.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/3d/webgl-engine/parts/Model.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/LayerViewManager.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/ToolViewManager.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
- package/views/support/AllocationTracer.js +1 -1
- package/views/support/DefaultsFromMap.js +1 -1
- package/views/support/QueueProcessor.js +1 -1
- package/views/webgl/capabilities/load.js +1 -1
- package/webscene/Slide.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
- package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.js +1 -1
- package/widgets/BuildingExplorer/support/layerUtils.js +1 -1
- package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.js +1 -1
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/Home/HomeViewModel.js +1 -1
- package/widgets/Locate/LocateViewModel.js +1 -1
- package/widgets/Popup/PopupViewModel.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/widgets/Search.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Slice/SliceViewModel.js +1 -1
- package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/0283801d442984997abe.js +0 -1
- package/assets/esri/core/workers/chunks/0419e14a520b8fcf3e7a.js +0 -1
- package/assets/esri/core/workers/chunks/05318446b6a40caea361.js +0 -1
- package/assets/esri/core/workers/chunks/09e714d4381649348ac9.js +0 -1
- package/assets/esri/core/workers/chunks/0cecd668b9d5d3f83293.js +0 -1
- package/assets/esri/core/workers/chunks/13a73a88efd4f464173e.js +0 -1
- package/assets/esri/core/workers/chunks/1576727e8174d672555b.js +0 -1
- package/assets/esri/core/workers/chunks/1a3cbeb0a53d03a51dad.js +0 -1
- package/assets/esri/core/workers/chunks/1b8524b617bfc6fe422c.js +0 -1
- package/assets/esri/core/workers/chunks/1dc1d750046912ff6cef.js +0 -1
- package/assets/esri/core/workers/chunks/21fa174c114640be5e40.js +0 -1
- package/assets/esri/core/workers/chunks/2a3f6e56079620421a02.js +0 -1
- package/assets/esri/core/workers/chunks/2a5bcc73e55986ad93fe.js +0 -1
- package/assets/esri/core/workers/chunks/2a6f2e3d639aae491171.js +0 -1
- package/assets/esri/core/workers/chunks/2c17d1bad17bcee53f7d.js +0 -1
- package/assets/esri/core/workers/chunks/2cea27a0d07aa9a88ad4.js +0 -1
- package/assets/esri/core/workers/chunks/2e193d97d199b29b00c2.js +0 -1
- package/assets/esri/core/workers/chunks/2eb41fdf0d0a3b0c3232.js +0 -1
- package/assets/esri/core/workers/chunks/2f09ea639ca5d1d6ca7e.js +0 -1
- package/assets/esri/core/workers/chunks/2fb847ab1440bd1bdf15.js +0 -1
- package/assets/esri/core/workers/chunks/402d22ebbae608760b4f.js +0 -1
- package/assets/esri/core/workers/chunks/44daef7f0cbc6f6af09f.js +0 -1
- package/assets/esri/core/workers/chunks/46899156159e398c693f.js +0 -1
- package/assets/esri/core/workers/chunks/46bf8921db25845c63c0.js +0 -1
- package/assets/esri/core/workers/chunks/4eb23554e375350f73b5.js +0 -1
- package/assets/esri/core/workers/chunks/551917be63a513dfa4de.js +0 -1
- package/assets/esri/core/workers/chunks/564f6f5484bcb13ebb2b.js +0 -1
- package/assets/esri/core/workers/chunks/61df67ae47b7fb5875d9.js +0 -1
- package/assets/esri/core/workers/chunks/62642a8fc7bafe339984.js +0 -1
- package/assets/esri/core/workers/chunks/6304f4e53027df04eb8f.js +0 -1
- package/assets/esri/core/workers/chunks/6331987617ad166ea098.js +0 -1
- package/assets/esri/core/workers/chunks/6b13fcbc71c0088d317e.js +0 -1
- package/assets/esri/core/workers/chunks/6f7a6841e7269d2764ad.js +0 -1
- package/assets/esri/core/workers/chunks/70110efd2de23d9a5263.js +0 -1
- package/assets/esri/core/workers/chunks/7eae3f0588cde44fce39.js +0 -1
- package/assets/esri/core/workers/chunks/80d3c7a429c6412f1a8d.js +0 -1
- package/assets/esri/core/workers/chunks/80deebdf54bea04a0889.js +0 -1
- package/assets/esri/core/workers/chunks/81aa5fe7dcb4fdeb0974.js +0 -1
- package/assets/esri/core/workers/chunks/840d08b41913cad4df89.js +0 -1
- package/assets/esri/core/workers/chunks/85d154aeb511c5d70bb1.js +0 -1
- package/assets/esri/core/workers/chunks/8681e99e2bc9ece61c43.js +0 -1
- package/assets/esri/core/workers/chunks/8e5ef967f6518f4c93b1.js +0 -1
- package/assets/esri/core/workers/chunks/8edd7f70c8b95c34125c.js +0 -1
- package/assets/esri/core/workers/chunks/9044a7b90a53312b6392.js +0 -1
- package/assets/esri/core/workers/chunks/905b4dfc1ce57a225fa4.js +0 -1
- package/assets/esri/core/workers/chunks/945f90b31ebfae623ea0.js +0 -1
- package/assets/esri/core/workers/chunks/9943fd69b67cd1871d68.js +0 -1
- package/assets/esri/core/workers/chunks/9ad91c23480ffb656030.js +0 -1
- package/assets/esri/core/workers/chunks/9d103681372ab01a4147.js +0 -1
- package/assets/esri/core/workers/chunks/9d3230f59b4c4d1b2713.js +0 -1
- package/assets/esri/core/workers/chunks/9db75bc0980d16b730a1.js +0 -1
- package/assets/esri/core/workers/chunks/a0659b8bdc067da7badd.js +0 -1
- package/assets/esri/core/workers/chunks/a480ee9a994410177961.js +0 -1
- package/assets/esri/core/workers/chunks/a9b279975d7df0f295d7.js +0 -1
- package/assets/esri/core/workers/chunks/aa3abaa5ad4a5a3bcb84.js +0 -1
- package/assets/esri/core/workers/chunks/aa8e607f908297786675.js +0 -1
- package/assets/esri/core/workers/chunks/ab5a302b5f62d38293f9.js +0 -1
- package/assets/esri/core/workers/chunks/abd6a84396e0eb3f01ad.js +0 -1
- package/assets/esri/core/workers/chunks/abe9f8516b03a3fb0477.js +0 -1
- package/assets/esri/core/workers/chunks/aff6aa5c7f75f8e052d9.js +0 -1
- package/assets/esri/core/workers/chunks/b601cc5304b132536239.js +0 -1
- package/assets/esri/core/workers/chunks/b85f614ddbddd3c3007e.js +0 -1
- package/assets/esri/core/workers/chunks/b944f4ab25a691b3e611.js +0 -1
- package/assets/esri/core/workers/chunks/bbdacddb61e651ca0098.js +0 -1
- package/assets/esri/core/workers/chunks/c2fa728e805637a1783e.js +0 -1
- package/assets/esri/core/workers/chunks/c901f5f85d962254fc2c.js +0 -1
- package/assets/esri/core/workers/chunks/ca173b908d89a4e334f6.js +0 -1
- package/assets/esri/core/workers/chunks/cc2ef3bfa1f614d7452c.js +0 -1
- package/assets/esri/core/workers/chunks/cdb32a9ac9f5804c4212.js +0 -1
- package/assets/esri/core/workers/chunks/ce9a4997973da80141a5.js +0 -1
- package/assets/esri/core/workers/chunks/d0674b50a358d3bb9db2.js +0 -1
- package/assets/esri/core/workers/chunks/d18b7b4b3b9bea7204b0.js +0 -1
- package/assets/esri/core/workers/chunks/d2ce983f7babdf18a0ed.js +0 -1
- package/assets/esri/core/workers/chunks/d38a0d867dc6cecdc551.js +0 -1
- package/assets/esri/core/workers/chunks/e39ca33e9e463c1d6060.js +0 -1
- package/assets/esri/core/workers/chunks/e471d103205018a5cf7f.js +0 -1
- package/assets/esri/core/workers/chunks/e542fb044fc96f7e8af2.js +0 -1
- package/assets/esri/core/workers/chunks/e94e00a28591337b2def.js +0 -1
- package/assets/esri/core/workers/chunks/eb2709ccbc001f42ac1b.js +0 -1
- package/assets/esri/core/workers/chunks/f905511ca5f9b59fc17f.js +0 -1
- package/assets/esri/core/workers/chunks/f910e80dd87727af5184.js +0 -1
- package/assets/esri/core/workers/chunks/f9300a24305b0af1d227.js +0 -1
- package/assets/esri/core/workers/chunks/fa1e1ac5b3ef7bdf8a78.js +0 -1
- package/assets/esri/core/workers/chunks/fce76a84c7d25d8d47e8.js +0 -1
- package/assets/esri/core/workers/chunks/fef4f97fbe861a1b60e8.js +0 -1
- package/layers/AreaMeasurementLayer.d.ts +0 -4
- package/layers/DirectLineMeasurementLayer.d.ts +0 -4
- package/symbols/support/symbolPreview.d.ts +0 -4
- package/symbols/support/symbolPreview.js +0 -5
- package/views/3d/layers/AreaMeasurementLayerView3D.d.ts +0 -4
- package/views/3d/layers/DirectLineMeasurementLayerView3D.d.ts +0 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5877,2515],{28924:(e,t,r)=>{r.d(t,{Z:()=>s});var i=r(95330);class s{constructor(){this.declaredRootClass="esri.arcade.featureSetCollection",this._layerById={},this._layerByName={}}add(e,t,r){this._layerById[t]=r,this._layerByName[e]=r}featureSetByName(e,t=!0,r=["*"]){return void 0===this._layerByName[e]?this.resolvePromise(null):this.resolvePromise(this._layerByName[e])}featureSetById(e,t=!0,r=["*"]){return void 0===this._layerById[e]?this.resolvePromise(null):this.resolvePromise(this._layerById[e])}castToText(){return"object, FeatureSetCollection"}resolvePromise(e){return(0,i.DB)(e)}}},50954:(e,t,r)=>{r.r(t),r.d(t,{constructAssociationMetaDataFeatureSetFromUrl:()=>H,constructFeatureSet:()=>J,constructFeatureSetFromPortalItem:()=>ae,constructFeatureSetFromRelationship:()=>X,constructFeatureSetFromUrl:()=>z,convertToFeatureSet:()=>ne,createFeatureSetCollectionFromMap:()=>te,createFeatureSetCollectionFromService:()=>re,getPortal:()=>ie,initialiseMetaDataCache:()=>Q,lookupUser:()=>se});var i=r(40330),s=r(3172),n=r(28924),a=r(84328),l=r(38171),o=r(61363),u=r(70409),h=r(85065),d=r(91136),c=r(90961),p=r(3823),f=r(90658),y=r(36515),g=r(95002),_=r(41534);class m{clone(){const e=new m;return e.field=this.field,e.tofieldname=this.tofieldname,e.typeofstat=this.typeofstat,e.workingexpr=this.workingexpr,e}static parseStatField(e,t,r){const i=new m;i.field=e;const s=_.WhereClause.create(t,r),n=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 Error("Statistic does not have 1 or 0 Parameters");const t=_.WhereClause.create((0,y.XF)(e.parseTree.args.value[0],f.Bj.Standardised,e.parameters),e.fieldsIndex);return{name:e.parseTree.name,expr:t}}return null}(s);if(null===n)throw new Error("Invalid Statistic Function");const a=n.name.toUpperCase().trim();if("MIN"===a){if(i.typeofstat="MIN",i.workingexpr=n.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}else if("MAX"===a){if(i.typeofstat="MAX",i.workingexpr=n.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}else if("COUNT"===a)i.typeofstat="COUNT",i.workingexpr=n.expr;else if("STDEV"===a){if(i.typeofstat="STDDEV",i.workingexpr=n.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}else if("SUM"===a){if(i.typeofstat="SUM",i.workingexpr=n.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}else if("MEAN"===a){if(i.typeofstat="AVG",i.workingexpr=n.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}else if("AVG"===a){if(i.typeofstat="AVG",i.workingexpr=n.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}else{if("VAR"!==a)throw new Error("Invalid Statistic Function");if(i.typeofstat="VAR",i.workingexpr=n.expr,null===s)throw new Error("Invalid Statistic Function Parameters")}return i}toStatisticsName(){switch(this.typeofstat.toUpperCase()){case"MIN":return"min";case"MAX":return"max";case"SUM":return"sum";default:return"count";case"VAR":return"var";case"STDDEV":return"stddev";case"AVG":return"avg"}}}var w=r(44543),b=r(95330),S=r(82971),F=r(1231),v=r(99514);function I(e){if(!e)return"COUNT";switch(e.toLowerCase()){case"max":return"MAX";case"var":case"variance":return"VAR";case"avg":case"average":case"mean":return"AVG";case"min":return"MIN";case"sum":return"SUM";case"stdev":case"stddev":return"STDDEV";case"count":return"COUNT"}return"COUNT"}class C extends d.Z{constructor(e){super(e),this._decodedStatsfield=[],this._decodedGroupbyfield=[],this._candosimplegroupby=!0,this.phsyicalgroupbyfields=[],this.objectIdField="ROW__ID",this._internalObjectIdField="ROW__ID",this._adaptedFields=[],this.declaredClass="esri.arcade.featureset.actions.Aggregate",this._uniqueIds=1,this._maxQuery=10,this._maxProcessing=10,this._parent=e.parentfeatureset,this._config=e}isTable(){return!0}_getSet(e){return null===this._wset?this._getFilteredSet("",null,null,null,e).then((e=>(this._wset=e,this._wset))):(0,b.DB)(this._wset)}_isInFeatureSet(){return f.dj.InFeatureSet}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={};let t=!1,r=1;const i=this._parent?this._parent.getFieldsIndex():new v.Z([]);for(this.objectIdField="ROW__ID",this.globalIdField="";!1===t;){let e=!1;for(let t=0;t<this._config.groupbyfields.length;t++)if(this._config.groupbyfields[t].name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}if(!1===e)for(let t=0;t<this._config.statsfields.length;t++)if(this._config.statsfields[t].name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}!1===e?t=!0:(this.objectIdField="ROW__ID"+r.toString(),r++)}for(const e of this._config.statsfields){const t=new m;t.field=e.name,t.tofieldname=e.name,t.workingexpr=e.expression instanceof _.WhereClause?e.expression:_.WhereClause.create(e.expression,i),t.typeofstat=I(e.statistic),this._decodedStatsfield.push(t)}this._decodedGroupbyfield=[];for(const e of this._config.groupbyfields){const t={name:e.name,singlefield:null,tofieldname:e.name,expression:e.expression instanceof _.WhereClause?e.expression:_.WhereClause.create(e.expression,i)};this._decodedGroupbyfield.push(t)}if(null!==this._parent){this.geometryType=this._parent.geometryType,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField="";for(const t of this._parent.fields)e[t.name.toUpperCase()]=1;this.types=null}else this.geometryType=f.Qk.point,this.typeIdField="",this.types=null,this.spatialReference=new S.Z({wkid:4326});this.fields=[];const s=new m;s.field=this.nextUniqueName(e),s.tofieldname=this.objectIdField,s.workingexpr=_.WhereClause.create(this._parent.objectIdField,this._parent.getFieldsIndex()),s.typeofstat="MIN",this._decodedStatsfield.push(s);for(const t of this._decodedGroupbyfield){const r=new F.Z;if(t.name=this.nextUniqueName(e),r.name=t.tofieldname,r.alias=r.name,(0,y.y5)(t.expression)){const e=this._parent.getField((0,y.zR)(t.expression,f.Bj.Standardised));if(!e)throw new Error("Field is not present for Aggregation");t.name=e.name,t.singlefield=e.name,this.phsyicalgroupbyfields.push(e.name),r.type=e.type}else{r.type=this.convertToEsriFieldType((0,y.DT)(t.expression,this._parent.fields));const e=new F.Z;e.name=t.name,e.alias=e.name,this.phsyicalgroupbyfields.push(t.name),this._adaptedFields.push(new u.yN(e,t.expression)),this._candosimplegroupby=!1}this.fields.push(r)}if(this._adaptedFields.length>0)for(const e of this._parent.fields)this._adaptedFields.push(new u.$X(e));for(let t=0;t<this._decodedStatsfield.length;t++){const r=new F.Z;let i=null;const s=this._decodedStatsfield[t];s.field=this.nextUniqueName(e),s.tofieldname===this.objectIdField&&(this._internalObjectIdField=s.field),r.name=s.tofieldname,r.alias=r.name;const n=null!==s.workingexpr&&(0,y.y5)(s.workingexpr)?(0,y.zR)(s.workingexpr,f.Bj.Standardised):"";switch(this._decodedStatsfield[t].typeofstat){case"SUM":if(""!==n){if(i=this._parent.getField(n),!i)throw new Error("Field is not present for Aggregation");r.type=i.type}else r.type="double";break;case"MIN":case"MAX":if(""!==n){if(i=this._parent.getField(n),!i)throw new Error("Field is not present for Aggregation");r.type=i.type}else r.type="double";break;case"COUNT":r.type="integer";break;case"STDDEV":case"VAR":case"AVG":if(""!==n&&(i=this._parent.getField(n),!i))throw new Error("Field is not present for Aggregation");r.type="double"}this.fields.push(r)}}_canDoAggregates(){return(0,b.DB)(!1)}_getFeatures(e,t,r,i){-1!==t&&this._featureCache[t];const s=this._maxQuery;return!0===this._checkIfNeedToExpandKnownPage(e,s)?this._expandPagedSet(e,s,0,0,i).then((()=>this._getFeatures(e,t,r,i))):(0,b.DB)("success")}_getFilteredSet(e,t,r,i,s){if(""!==e)return(0,b.DB)(new c.Z([],[],!0,null));let n=null;const l={ordered:!1,nowhereclause:!1};return this._ensureLoaded().then((()=>{if(null!==r)for(let e=0;e<this._decodedStatsfield.length;e++)if(!0===(0,y.hq)(r,this._decodedStatsfield[e].tofieldname)){l.nowhereclause=!0,r=null;break}if(null!==i){l.ordered=!0;for(let e=0;e<this._decodedStatsfield.length;e++)if(!0===i.scanForField(this._decodedStatsfield[e].tofieldname)){i=null,l.ordered=!1;break}if(null!==i)for(const e of this._decodedGroupbyfield)if(null===e.singlefield&&!0===i.scanForField(e.tofieldname)){i=null,l.ordered=!1;break}}return!1===this._candosimplegroupby?(0,b.DB)(!1):this._parent._canDoAggregates(this.phsyicalgroupbyfields,this._decodedStatsfield,"",null,null)})).then((e=>{if(e){let e=null;r&&(e=this._reformulateWhereClauseWithoutGroupByFields(r));let t=null;return i&&(t=this._reformulateOrderClauseWithoutGroupByFields(i)),this._parent._getAggregatePagesDataSourceDefinition(this.phsyicalgroupbyfields,this._decodedStatsfield,"",null,e,t,this._internalObjectIdField).then((e=>(this._checkCancelled(s),n=!0===l.nowhereclause?new c.Z(e._candidates.slice(0).concat(e._known.slice(0)),[],!0===l.ordered&&e._ordered,this._clonePageDefinition(e.pagesDefinition)):new c.Z(e._candidates.slice(0),e._known.slice(0),!0===l.ordered&&e._ordered,this._clonePageDefinition(e.pagesDefinition)),n)))}let t=this._parent;if(this._adaptedFields.length>0&&(t=new u.Xx({parentfeatureset:this._parent,adaptedFields:this._adaptedFields,extraFilter:null})),!0===l.nowhereclause)n=new c.Z(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new h.Z({parentfeatureset:t,orderbyclause:new p.Z(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}});else{let e=t;if(null!==r){let t=null;r&&(t=this._reformulateWhereClauseWithoutGroupByFields(r)),e=new a.Z({parentfeatureset:e,whereclause:t})}n=new c.Z(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new h.Z({parentfeatureset:e,orderbyclause:new p.Z(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}})}return n}))}_reformulateWhereClauseWithoutStatsFields(e){for(const t of this._decodedStatsfield)e=(0,y.bB)(e,t.tofieldname,(0,y.zR)(t.workingexpr,f.Bj.Standardised),this._parent.getFieldsIndex());return e}_reformulateWhereClauseWithoutGroupByFields(e){for(const t of this._decodedGroupbyfield)t.tofieldname!==t.name&&(e=(0,y.bB)(e,t.tofieldname,(0,y.zR)(t.expression,f.Bj.Standardised),this._parent.getFieldsIndex()));return e}_reformulateOrderClauseWithoutGroupByFields(e){const t=[];for(const e of this._decodedGroupbyfield)e.tofieldname!==e.name&&t.push({field:e.tofieldname,newfield:e.name});return t.length>0?e.replaceFields(t):e}_clonePageDefinition(e){return null===e?null:!0===e.aggregatefeaturesetpagedefinition?{aggregatefeaturesetpagedefinition:!0,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,internal:e.internal}:this._parent._clonePageDefinition(e)}_refineSetBlock(e,t,r){try{return!0===this._checkIfNeedToExpandCandidatePage(e,this._maxQuery)?this._expandPagedSet(e,this._maxQuery,0,0,r).then((()=>this._refineSetBlock(e,t,r))):(this._checkCancelled(r),e._candidates.length,this._refineKnowns(e,t),e._candidates.length,e._candidates.length,(0,b.DB)(e))}catch(e){return(0,b.d1)(e)}}_expandPagedSet(e,t,r,i,s){return this._expandPagedSetFeatureSet(e,t,r,i,s)}_getPhysicalPage(e,t,r){return!0===e.pagesDefinition.aggregatefeaturesetpagedefinition?(0,b.Ue)(((t,i)=>{this._sequentialGetPhysicalItem(e,e.pagesDefinition.resultRecordCount,r,[]).then((e=>{t(e)}),i)})):this._getAgregagtePhysicalPage(e,t,r).then((e=>{for(const t of e){const e={geometry:t.geometry,attributes:{}};for(const r of this._decodedGroupbyfield)e.attributes[r.tofieldname]=t.attributes[r.name];for(const r of this._decodedStatsfield)e.attributes[r.tofieldname]=t.attributes[r.field];this._featureCache[e.attributes[this.objectIdField]]=new l.Z(e)}return e.length}))}_sequentialGetPhysicalItem(e,t,r,i){return(0,b.Ue)(((s,n)=>{null===e.pagesDefinition.internal.iterator&&(e.pagesDefinition.internal.iterator=e.pagesDefinition.internal.subfeatureset.iterator(r)),!0===e.pagesDefinition.internal.fullyResolved||0===t?s(i.length):this._nextAggregateItem(e,t,r,i,(n=>{null===n?s(i.length):(t-=1,s(this._sequentialGetPhysicalItem(e,t,r,i)))}),n)}))}_nextAggregateItem(e,t,r,i,s,n){try{(0,o.Q)(e.pagesDefinition.internal.iterator.next()).then((a=>{if(null===a)if(null!==e.pagesDefinition.internal.workingItem){const t=this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);i.push(t),e.pagesDefinition.internal.workingItem=null,e.pagesDefinition.internal.set.push(t.attributes[this.objectIdField]),e.pagesDefinition.internal.fullyResolved=!0,s(null)}else e.pagesDefinition.internal.fullyResolved=!0,s(null);else{const l=this._generateAggregateHash(a);if(null===e.pagesDefinition.internal.workingItem)e.pagesDefinition.internal.workingItem={features:[a],id:l};else{if(l!==e.pagesDefinition.internal.workingItem.id){const r=this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);return i.push(r),e.pagesDefinition.internal.workingItem=null,e.pagesDefinition.internal.set.push(r.attributes[this.objectIdField]),t-=1,e.pagesDefinition.internal.workingItem={features:[a],id:l},void s(r)}e.pagesDefinition.internal.workingItem.features.push(a)}this._nextAggregateItem(e,t,r,i,s,n)}}),n)}catch(e){n(e)}}_calculateFieldStat(e,t,r){const i=[];for(let r=0;r<e.features.length;r++)if(null!==t.workingexpr){const s=t.workingexpr.calculateValue(e.features[r]);null!==s&&i.push(s)}else i.push(null);switch(t.typeofstat){case"MIN":r.attributes[t.tofieldname]=(0,g.tj)("min",i,-1);break;case"MAX":r.attributes[t.tofieldname]=(0,g.tj)("max",i,-1);break;case"SUM":r.attributes[t.tofieldname]=(0,g.tj)("sum",i,-1);break;case"COUNT":r.attributes[t.tofieldname]=i.length;break;case"VAR":r.attributes[t.tofieldname]=(0,g.tj)("var",i,-1);break;case"STDDEV":r.attributes[t.tofieldname]=(0,g.tj)("stddev",i,-1);break;case"AVG":r.attributes[t.tofieldname]=(0,g.tj)("avg",i,-1)}return!0}_calculateAndAppendAggregateItem(e){const t={attributes:{},geometry:null};for(const r of this._decodedGroupbyfield){const i=r.singlefield?e.features[0].attributes[r.singlefield]:r.expression.calculateValue(e.features[0]);t.attributes[r.tofieldname]=i}for(const r of this._decodedStatsfield)this._calculateFieldStat(e,r,t);const r=[];for(let i=0;i<this._decodedStatsfield.length;i++)r.push(this._calculateFieldStat(e,this._decodedStatsfield[i],t));return this._featureCache[t.attributes[this.objectIdField]]=new l.Z({attributes:t.attributes,geometry:t.geometry}),t}_generateAggregateHash(e){let t="";for(const r of this._decodedGroupbyfield){const i=r.singlefield?e.attributes[r.singlefield]:r.expression.calculateValue(e);t+=null==i?":":":"+i.toString()}return(0,w.F)(t,w.M.String)}_stat(){return(0,b.DB)({calculated:!1})}getFeatureByObjectId(){return(0,b.DB)(null)}static registerAction(){d.Z._featuresetFunctions.groupby=function(e,t){return new C({parentfeatureset:this,groupbyfields:e,statsfields:t})}}}var x=r(53073),D=r(63991),k=r(80692),R=r(33955),T=r(67284),O=r(98732),P=r(78760),E=r(74889),N=r(57444),A=r(58539),j=r(27091),L=r(34599),B=r(33586);class M extends d.Z{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerDynamic",this._removeGeometry=!1,this._overrideFields=null,this.formulaCredential=null,this._pageJustIds=!1,this._requestStandardised=!1,this._useDefinitionExpression=!0,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return f.tI}end(){return this._layer}optimisePagingFeatureQueries(e){this._pageJustIds=e}convertQueryToLruCacheKey(e){const t=(0,f.hd)(e.toJSON());return(0,w.F)(t,w.M.String)}load(){return null===this._loadPromise&&(this._loadPromise=(0,b.Ue)(((e,t)=>{try{if(!0===this._layer.loaded)return this._initialiseFeatureSet(),void e(this);this._layer.when().then((()=>{try{this._initialiseFeatureSet(),e(this)}catch(e){t(e)}}),t),this._layer.load()}catch(e){t(e)}}))),this._loadPromise}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType,this.fields=this._layer.fields.slice(0),this._layer.outFields)if(1===this._layer.outFields.length&&"*"===this._layer.outFields[0]);else{const e=[];for(const t of this.fields)if("oid"===t.type)e.push(t);else for(const r of this._layer.outFields)if(r.toLowerCase()===t.name.toLowerCase()){e.push(t);break}this.fields=e}if(null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const r of this.fields)if("oid"===r.type)e.push(r),t.push(r.name);else for(const i of this._overrideFields)if(i.toLowerCase()===r.name.toLowerCase()){e.push(r),t.push(r.name);break}this.fields=e,this._overrideFields=t}if(this._layer.source&&this._layer.source.sourceJSON){const e=this._layer.source.sourceJSON.currentVersion;!0===this._layer.source.sourceJSON.useStandardizedQueries?(this._databaseType=f.Bj.StandardisedNoInterval,null!=e&&e>=10.61&&(this._databaseType=f.Bj.Standardised)):null!=e&&(e>=10.5&&(this._databaseType=f.Bj.StandardisedNoInterval,this._requestStandardised=!0),e>=10.61&&(this._databaseType=f.Bj.Standardised))}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this.hasM=this._layer.supportsM,this.hasZ=this._layer.supportsZ,this.typeIdField=this._layer.typeIdField,this.types=this._layer.types}_isInFeatureSet(){return f.dj.InFeatureSet}_refineSetBlock(e){return(0,b.DB)(e)}_candidateIdTransform(e){return e}_getSet(e){return null===this._wset?this._ensureLoaded().then((()=>this._getFilteredSet("",null,null,null,e))).then((e=>(this._wset=e,e))):(0,b.DB)(this._wset)}_runDatabaseProbe(e){return(0,b.Ue)(((t,r)=>{try{this._ensureLoaded().then((()=>{try{const i=new N.Z;i.where=e.replace("OBJECTID",this._layer.objectIdField),this._layer.queryObjectIds(i).then((()=>{t(!0)}),(()=>{try{t(!1)}catch(e){r(e)}}))}catch(e){r(e)}}))}catch(e){r(e)}}))}_canUsePagination(){return!(!this._layer.capabilities||!this._layer.capabilities.query||!0!==this._layer.capabilities.query.supportsPagination)}_cacheableFeatureSetSourceKey(){return this._layer.url}pbfSupportedForQuery(e){return!e.outStatistics&&this._layer&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsFormatPBF&&!0===this._layer.capabilities.query.supportsQuantizationEditMode}queryPBF(e){return e.quantizationParameters={mode:"edit"},(0,L.executeQueryPBF)(this._layer.parsedUrl,e,new P.J({})).then((e=>E.default.fromJSON((0,O.cn)(e.data)).unquantize()))}get gdbVersion(){return this._layer&&this._layer.capabilities&&this._layer.capabilities.data&&this._layer.capabilities.data.isVersioned?this._layer.gdbVersion?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}}executeQuery(e,t){const r=new j.Z({url:this._layer.parsedUrl.path}),i="execute"===t&&this.pbfSupportedForQuery(e);let s=null;if(this.recentlyUsedQueries){const n=this.convertQueryToLruCacheKey(e);s=this.recentlyUsedQueries.getFromCache(n),null===s&&(s=!0!==i?r[t](e):this.queryPBF(e),this.recentlyUsedQueries.addToCache(n,s),s=s.catch((e=>{throw this.recentlyUsedQueries.removeFromCache(n),e})))}return this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===s&&(s=!0!==i?r[t](e):this.queryPBF(e)),s}_getFilteredSet(e,t,r,i,s){return this.databaseType().then((n=>{if(this.isTable()&&t&&null!==e&&""!==e)return new c.Z([],[],!0,null);if(this._canUsePagination())return this._getFilteredSetUsingPaging(e,t,r,i,s);let a="",l=!1;null!==i&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(a=i.constructClause(),l=!0);const o=new N.Z;return o.where=null===r?null===t?"1=1":"":(0,y.zR)(r,n),this._requestStandardised&&(o.sqlFormat="standard"),o.spatialRelationship=this._makeRelationshipEnum(e),o.outSpatialReference=this.spatialReference,o.orderByFields=""!==a?a.split(","):null,o.geometry=null===t?null:t,o.relationParameter=this._makeRelationshipParam(e),this.executeQuery(o,"executeForIds").then((e=>(null===e&&(e=[]),this._checkCancelled(s),new c.Z([],e,l,null))))}))}_expandPagedSet(e,t,r,i,s){return this._expandPagedSetFeatureSet(e,t,r,i,s)}_getFilteredSetUsingPaging(e,t,r,i,s){try{let n="",a=!1;return null!==i&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(n=i.constructClause(),a=!0),this.databaseType().then((i=>{let l=null===r?null===t?"1=1":"":(0,y.zR)(r,i);this._layer.definitionExpression&&this._useDefinitionExpression&&(l=""!==l?"(("+this._layer.definitionExpression+") AND ("+l+"))":this._layer.definitionExpression);let o=this._maxQueryRate();const u=this._layer.capabilities.query.maxRecordCount;void 0!==u&&u<o&&(o=u);let h=null;if(!0===this._pageJustIds)h=new c.Z([],["GETPAGES"],a,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:this._layer.objectIdField,resultRecordCount:o,resultOffset:0,geometry:null===t?null:t,where:l,orderByFields:n,returnGeometry:!1,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}});else{let r=!0;!0===this._removeGeometry&&(r=!1);const i=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._layer.outFields?this._layer.outFields:["*"]);h=new c.Z([],["GETPAGES"],a,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:i.join(","),resultRecordCount:o,resultOffset:0,geometry:null===t?null:t,where:l,orderByFields:n,returnGeometry:r,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}})}return this._expandPagedSet(h,o,0,1,s).then((()=>h))}))}catch(e){return(0,b.d1)(e)}}_clonePageDefinition(e){return null===e?null:!0!==e.groupbypage?{groupbypage:!1,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}:{groupbypage:!0,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,useOIDpagination:e.useOIDpagination,generatedOid:e.generatedOid,groupByFieldsForStatistics:e.groupByFieldsForStatistics,resultOffset:e.resultOffset,outStatistics:e.outStatistics,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}}_getPhysicalPage(e,t,r){try{const t=e.pagesDefinition.internal.lastRetrieved,i=t,s=e.pagesDefinition.internal.lastPage,n=new N.Z;return this._requestStandardised&&(n.sqlFormat="standard"),n.spatialRelationship=e.pagesDefinition.spatialRel,n.relationParameter=e.pagesDefinition.relationParam,n.outFields=e.pagesDefinition.outFields.split(","),n.num=e.pagesDefinition.resultRecordCount,n.start=e.pagesDefinition.internal.lastPage,n.geometry=e.pagesDefinition.geometry,n.where=e.pagesDefinition.where,n.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,n.returnGeometry=e.pagesDefinition.returnGeometry,n.outSpatialReference=this.spatialReference,this.executeQuery(n,"execute").then((n=>{if(this._checkCancelled(r),e.pagesDefinition.internal.lastPage!==s)return"done";for(let t=0;t<n.features.length;t++)e.pagesDefinition.internal.set[i+t]=n.features[t].attributes[this._layer.objectIdField];if(!1===this._pageJustIds)for(let e=0;e<n.features.length;e++)this._featureCache[n.features[e].attributes[this._layer.objectIdField]]=n.features[e];return(void 0===n.exceededTransferLimit&&n.features.length!==e.pagesDefinition.resultRecordCount||!1===n.exceededTransferLimit)&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=t+n.features.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,"done"}))}catch(e){return(0,b.d1)(e)}}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice(0);if(t.indexOf("*")>-1)return t;let r=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return!1===r&&t.push(this.objectIdField),t}_getFeatures(e,t,r,i){const s=[];try{if(-1!==t&&void 0===this._featureCache[t]&&s.push(t),!0===this._checkIfNeedToExpandKnownPage(e,this._maxProcessingRate()))return this._expandPagedSet(e,this._maxProcessingRate(),0,0,i).then((()=>this._getFeatures(e,t,r,i)));let n=0;for(let i=e._lastFetchedIndex;i<e._known.length;i++){if(e._lastFetchedIndex+=1,n++,void 0===this._featureCache[e._known[i]]){let r=!1;if(null!==this._layer._mode&&void 0!==this._layer._mode){const t=this._layer._mode;if(void 0!==t._featureMap[e._known[i]]){const s=t._featureMap[e._known[i]];null!==s&&(r=!0,this._featureCache[e._known[i]]=s)}}if(!1===r&&(e._known[i]!==t&&s.push(e._known[i]),s.length>=this._maxProcessingRate()-1))break}if(n>=r&&0===s.length)break}if(0===s.length)return(0,b.DB)("success");try{const e=new N.Z;return this._requestStandardised&&(e.sqlFormat="standard"),e.objectIds=s,e.outFields=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._layer.outFields?this._layer.outFields:["*"]),e.returnGeometry=!0,!0===this._removeGeometry&&(e.returnGeometry=!1),e.outSpatialReference=this.spatialReference,this.executeQuery(e,"execute").then((e=>{if(this._checkCancelled(i),void 0!==e.error)return(0,b.d1)(new Error(e.error));for(let t=0;t<e.features.length;t++)this._featureCache[e.features[t].attributes[this._layer.objectIdField]]=e.features[t];return"success"}))}catch(e){return(0,b.d1)(e)}}catch(e){return(0,b.d1)(e)}}_getDistinctPages(e,t,r,i,s,n,a,l,o){return this._ensureLoaded().then((()=>this.databaseType())).then((u=>{let h=r.parseTree.column;for(let e=0;e<this._layer.fields.length;e++)if(this._layer.fields[e].name.toLowerCase()===h.toLowerCase()){h=this._layer.fields[e].name;break}const d=new N.Z;this._requestStandardised&&(d.sqlFormat="standard");let c=null===n?null===s?"1=1":"":(0,y.zR)(n,u);return this._layer.definitionExpression&&this._useDefinitionExpression&&(c=""!==c?"(("+this._layer.definitionExpression+") AND ("+c+"))":this._layer.definitionExpression),d.where=c,d.spatialRelationship=this._makeRelationshipEnum(i),d.relationParameter=this._makeRelationshipParam(i),d.geometry=null===s?null:s,d.returnDistinctValues=!0,d.returnGeometry=!1,d.outFields=[h],this.executeQuery(d,"execute").then((u=>{if(this._checkCancelled(o),!u.hasOwnProperty("features"))return(0,b.d1)(new Error("Unnexected Result querying statistics from layer"));let d=!1;for(let e=0;e<this._layer.fields.length;e++)if(this._layer.fields[e].name===h){"date"===this._layer.fields[e].type&&(d=!0);break}for(let e=0;e<u.features.length;e++){if(d){const t=u.features[e].attributes[h];null!==t?l.push(new Date(t)):l.push(t)}else l.push(u.features[e].attributes[h]);if(l.length>=a)break}return 0===u.features.length?l:u.features.length===this._layer.capabilities.query.maxRecordCount&&l.length<a?this._getDistinctPages(e+u.features.length,t,r,i,s,n,a,l,o).then((e=>({calculated:!0,result:e}))):l}))}))}_distinctStat(e,t,r,i,s,n,a){return this._getDistinctPages(0,e,t,r,i,s,n,[],a).then((e=>({calculated:!0,result:e})))}isTable(){return this._layer.isTable||null===this._layer.geometryType||"table"===this._layer.type||""===this._layer.geometryType}_countstat(e,t,r,i){return this.databaseType().then((e=>{const s=new N.Z;if(this._requestStandardised&&(s.sqlFormat="standard"),this.isTable()&&r&&null!==t&&""!==t)return{calculated:!0,result:0};let n=null===i?null===r?"1=1":"":(0,y.zR)(i,e);return this._layer.definitionExpression&&this._useDefinitionExpression&&(n=""!==n?"(("+this._layer.definitionExpression+") AND ("+n+"))":this._layer.definitionExpression),s.where=n,s.where=n,s.spatialRelationship=this._makeRelationshipEnum(t),s.relationParameter=this._makeRelationshipParam(t),s.geometry=null===r?null:r,s.returnGeometry=!1,this.executeQuery(s,"executeForCount").then((e=>({calculated:!0,result:e})))}))}_stats(e,t,r,i,s,n,a){return this._ensureLoaded().then((()=>{const l=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsSqlExpression,o=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsStatistics,u=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsDistinct;return"count"===e?u?this._countstat(e,r,i,s):{calculated:!1}:!1===o||!1===(0,y.y5)(t)&&!1===l||!1===t.isStandardized?""!==r||null!==s?{calculated:!1}:this._manualStat(e,t,n,a):"distinct"===e?!1===u?""!==r||null!==s?{calculated:!1}:this._manualStat(e,t,n,a):this._distinctStat(e,t,r,i,s,n,a):this.databaseType().then((n=>{if(this.isTable()&&i&&null!==r&&""!==r)return{calculated:!0,result:null};const a=new N.Z;this._requestStandardised&&(a.sqlFormat="standard");let l=null===s?null===i?"1=1":"":(0,y.zR)(s,n);this._layer.definitionExpression&&this._useDefinitionExpression&&(l=""!==l?"(("+this._layer.definitionExpression+") AND ("+l+"))":this._layer.definitionExpression),a.where=l,a.spatialRelationship=this._makeRelationshipEnum(r),a.relationParameter=this._makeRelationshipParam(r),a.geometry=null===i?null:i;const o=new A.Z;o.statisticType=(0,g.g3)(e),o.onStatisticField=(0,y.zR)(t,n),o.outStatisticFieldName="ARCADE_STAT_RESULT",a.returnGeometry=!1;let u="ARCADE_STAT_RESULT";return a.outStatistics=[o],this.executeQuery(a,"execute").then((e=>{if(!e.hasOwnProperty("features")||0===e.features.length)return(0,b.d1)(new Error("Unnexected Result querying statistics from layer"));let t=!1;for(let r=0;r<e.fields.length;r++)if("ARCADE_STAT_RESULT"===e.fields[r].name.toUpperCase()){u=e.fields[r].name,"date"===e.fields[r].type&&(t=!0);break}if(t){let t=e.features[0].attributes[u];return null!==t&&(t=new Date(e.features[0].attributes[u])),{calculated:!0,result:t}}return{calculated:!0,result:e.features[0].attributes[u]}}))}))}))}_stat(e,t,r,i,s,n,a){return this._stats(e,t,r,i,s,n,a)}_canDoAggregates(e,t){return this._ensureLoaded().then((()=>{let e=!1;const r=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsSqlExpression;if(void 0!==this._layer.capabilities&&null!==this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsStatistics&&!0===this._layer.capabilities.query.supportsOrderBy&&(e=!0),e)for(let i=0;i<t.length-1;i++)null!==t[i].workingexpr&&(!1===t[i].workingexpr.isStandardized||!1===(0,y.y5)(t[i].workingexpr)&&!1===r)&&(e=!1);return!1!==e}))}_makeRelationshipEnum(e){if(e.indexOf("esriSpatialRelRelation")>=0)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.indexOf("esriSpatialRelRelation")>=0?e.split(":")[1]:""}_getAggregatePagesDataSourceDefinition(e,t,r,i,s,n,a){return this._ensureLoaded().then((()=>this.databaseType())).then((l=>{let o="",u=!1,h=!1;null!==n&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(o=n.constructClause(),h=!0),this._layer.capabilities&&this._layer.capabilities.query&&!1===this._layer.capabilities.query.supportsPagination&&(h=!1,u=!0,o=this._layer.objectIdField);const d=[];for(let e=0;e<t.length;e++){const r=new A.Z;r.onStatisticField=null!==t[e].workingexpr?(0,y.zR)(t[e].workingexpr,l):"",r.outStatisticFieldName=t[e].field,r.statisticType=t[e].toStatisticsName(),d.push(r)}""===o&&(o=e.join(","));let p=this._maxQueryRate();const f=this._layer.capabilities.query.maxRecordCount;void 0!==f&&f<p&&(p=f);let g=null===s?null===i?"1=1":"":(0,y.zR)(s,l);return this._layer.definitionExpression&&this._useDefinitionExpression&&(g=""!==g?"(("+this._layer.definitionExpression+") AND ("+g+"))":this._layer.definitionExpression),new c.Z([],["GETPAGES"],h,{groupbypage:!0,spatialRel:this._makeRelationshipEnum(r),relationParam:this._makeRelationshipParam(r),outFields:["*"],useOIDpagination:u,generatedOid:a,resultRecordCount:p,resultOffset:0,groupByFieldsForStatistics:e,outStatistics:d,geometry:null===i?null:i,where:g,orderByFields:o,returnGeometry:!1,returnIdsOnly:!1,internal:{lastMaxId:-1,set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}})}))}_getAgregagtePhysicalPage(e,t,r){try{let t=e.pagesDefinition.where;!0===e.pagesDefinition.useOIDpagination&&(t=""!==t?"("+t+") AND ("+e.pagesDefinition.generatedOid+">"+e.pagesDefinition.internal.lastMaxId.toString()+")":e.pagesDefinition.generatedOid+">"+e.pagesDefinition.internal.lastMaxId.toString());const i=e.pagesDefinition.internal.lastRetrieved,s=i,n=e.pagesDefinition.internal.lastPage,a=new N.Z;return this._requestStandardised&&(a.sqlFormat="standard"),a.where=t,a.spatialRelationship=e.pagesDefinition.spatialRel,a.relationParameter=e.pagesDefinition.relationParam,a.outFields=e.pagesDefinition.outFields,a.outStatistics=e.pagesDefinition.outStatistics,a.geometry=e.pagesDefinition.geometry,a.groupByFieldsForStatistics=e.pagesDefinition.groupByFieldsForStatistics,a.num=e.pagesDefinition.resultRecordCount,a.start=e.pagesDefinition.internal.lastPage,a.returnGeometry=e.pagesDefinition.returnGeometry,a.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,this.isTable()&&a.geometry&&a.spatialRelationship?(0,b.DB)([]):this.executeQuery(a,"execute").then((t=>{if(this._checkCancelled(r),!t.hasOwnProperty("features"))return(0,b.d1)(new Error("Unnexected Result querying aggregates from layer"));const a=[];if(e.pagesDefinition.internal.lastPage!==n)return[];for(let r=0;r<t.features.length;r++)e.pagesDefinition.internal.set[s+r]=t.features[r].attributes[e.pagesDefinition.generatedOid];for(let e=0;e<t.features.length;e++)a.push(new l.Z({attributes:t.features[e].attributes,geometry:null}));return!0===e.pagesDefinition.useOIDpagination?0===t.features.length?e.pagesDefinition.internal.fullyResolved=!0:e.pagesDefinition.internal.lastMaxId=t.features[t.features.length-1].attributes[e.pagesDefinition.generatedOid]:(void 0===t.exceededTransferLimit&&t.features.length!==e.pagesDefinition.resultRecordCount||!1===t.exceededTransferLimit)&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=i+t.features.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,a}))}catch(e){return(0,b.d1)(e)}}static create(e,t,r,i,s){const n=new T.default({url:e,outFields:null===t?["*"]:t});return new M({layer:n,spatialReference:r,lrucache:i,interceptor:s})}relationshipMetaData(){return this._layer&&this._layer.source&&this._layer.source.sourceJSON&&this._layer.source.sourceJSON.relationships?this._layer.source.sourceJSON.relationships:[]}serviceUrl(){return(0,f.US)(this._layer.parsedUrl.path)}queryAttachments(e,t,r,i,s){if(this._layer.capabilities.data.supportsAttachment&&this._layer.capabilities.operations.supportsQueryAttachments){const n={objectIds:[e],returnMetadata:s};return(t&&t>0||r&&r>0)&&(n.size=[t&&t>0?t:0,r&&r>0?r:t+1]),i&&i.length>0&&(n.attachmentTypes=i),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:n,method:"attachments"}),this._layer.queryAttachments(n).then((t=>{const r=[];return t&&t[e]&&t[e].forEach((t=>{const i=this._layer.parsedUrl.path+"/"+e.toString()+"/attachments/"+t.id.toString();let n=null;s&&t.exifInfo&&(n=B.Z.convertJsonToArcade(t.exifInfo,!0)),r.push(new k.Z(t.id,t.name,t.contentType,t.size,i,n))})),r}))}return(0,b.DB)([])}queryRelatedFeatures(e){const t={f:"json",relationshipId:e.relationshipId.toString(),definitionExpression:e.where,outFields:e.outFields.join(","),returnGeometry:e.returnGeometry.toString()};return void 0!==e.resultOffset&&null!==e.resultOffset&&(t.resultOffset=e.resultOffset.toString()),void 0!==e.resultRecordCount&&null!==e.resultRecordCount&&(t.resultRecordCount=e.resultRecordCount.toString()),e.orderByFields&&(t.orderByFields=e.orderByFields.join(",")),e.objectIds.length>0&&(t.objectIds=e.objectIds.join(",")),e.outSpatialReference&&(t.outSR=JSON.stringify(e.outSpatialReference.toJSON())),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:t,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"}),(0,s.default)(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:t}).then((e=>{if(e.data){const t={},r=e.data;if(r&&r.relatedRecordGroups){const e=r.spatialReference;for(const i of r.relatedRecordGroups){const s=i.objectId,n=[];for(const t of i.relatedRecords){t.geometry&&(t.geometry.spatialReference=e);const r=new l.Z({geometry:t.geometry?(0,R.im)(t.geometry):null,attributes:t.attributes});n.push(r)}t[s]={features:n,exceededTransferLimit:!0===r.exceededTransferLimit}}}return t}return(0,b.d1)("Invalid Request")}))}getFeatureByObjectId(e,t){const r=new j.Z({url:this._layer.parsedUrl.path}),i=new N.Z;return i.outFields=t,i.returnGeometry=!1,i.outSpatialReference=this.spatialReference,i.where=this.objectIdField+"="+e.toString(),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:i,method:"execute"}),r.execute(i).then((e=>1===e.features.length?e.features[0]:null))}getIdentityUser(){return this.load().then((()=>{var e;const t=null==(e=i.id)?void 0:e.findCredential(this._layer.url);return t?t.userId:null}))}getOwningSystemUrl(){return this.load().then((()=>{var e;const t=null==(e=i.id)?void 0:e.findServerInfo(this._layer.url);if(t)return(0,b.DB)(t.owningSystemUrl);let r=this._layer.url;const n=r.toLowerCase().indexOf("/rest/services");return r=n>-1?r.substring(0,n):r,r?(r+="/rest/info",(0,b.Ue)(((e,t)=>{(0,s.default)(r,{query:{f:"json"}}).then((t=>{let r="";t.data&&t.data.owningSystemUrl&&(r=t.data.owningSystemUrl),e(r)}),(t=>{e("")}))}))):(0,b.DB)("")}))}getDataSourceFeatureSet(){const e=new M({layer:this._layer,spatialReference:this.spatialReference,outFields:this._overrideFields,includeGeometry:!this._removeGeometry,lrucache:this.recentlyUsedQueries,interceptor:this.featureSetQueryInterceptor});return e._useDefinitionExpression=!1,e}}var q=r(17805),Z=r(75935);class U extends d.Z{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerRelated",this._findObjectId=-1,this._requestStandardised=!1,this._removeGeometry=!1,this._overrideFields=null,this.featureObjectId=null,this.relatedLayer=null,this.relationship=null,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,this._findObjectId=e.objectId,this.featureObjectId=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 f.tI}end(){return this._layer}optimisePagingFeatureQueries(){}load(){return null===this._loadPromise&&(this._loadPromise=(0,b.Ue)(((e,t)=>{(0,b.$6)([this._layer.load(),this.relatedLayer.load()]).then((()=>{this._initialiseFeatureSet(),e(this)}),t)}))),this._loadPromise}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(0),null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const r of this.fields)if("oid"===r.type)e.push(r),t.push(r.name);else for(const i of this._overrideFields)if(i.toLowerCase()===r.name.toLowerCase()){e.push(r),t.push(r.name);break}this.fields=e,this._overrideFields=t}const e=this._layer.nativeCapabilities();e&&(this._databaseType=e.databaseType,this._requestStandardised=e.requestStandardised),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}databaseType(){return this.relatedLayer.databaseType().then((()=>(this._databaseType=this.relatedLayer._databaseType,this._databaseType)))}isTable(){return this.relatedLayer.isTable()}_isInFeatureSet(){return f.dj.InFeatureSet}_candidateIdTransform(e){return e}_getSet(e){return null===this._wset?this._ensureLoaded().then((()=>this._getFilteredSet("",null,null,null,e))).then((e=>(this._wset=e,e))):(0,b.DB)(this._wset)}_changeFeature(e){const t={};for(const r of this.fields)t[r.name]=e.attributes[r.name];return new l.Z({geometry:!0===this._removeGeometry?null:e.geometry,attributes:t})}_getFilteredSet(e,t,r,i,s){return this.databaseType().then((()=>{if(this.isTable()&&t&&null!==e&&""!==e)return new c.Z([],[],!0,null);const n=this._layer.nativeCapabilities();if(!1===n.canQueryRelated)return new c.Z([],[],!0,null);if(n.capabilities.queryRelated&&n.capabilities.queryRelated.supportsPagination)return this._getFilteredSetUsingPaging(e,t,r,i,s);let a="",l=!1;null!==i&&n.capabilities&&n.capabilities.queryRelated&&!0===n.capabilities.queryRelated.supportsOrderBy&&(a=i.constructClause(),l=!0);const o=new Z.Z;o.objectIds=[this._findObjectId];const u=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this.relatedLayer.fields?this.relatedLayer.fields.map((e=>e.name)):["*"]);o.outFields=u,o.relationshipId=this.relationship.id,o.where="1=1";let h=!0;return!0===this._removeGeometry&&(h=!1),o.returnGeometry=h,this._requestStandardised&&(o.sqlFormat="standard"),o.outSpatialReference=this.spatialReference,o.orderByFields=""!==a?a.split(","):null,n.source.queryRelatedFeatures(o).then((i=>{this._checkCancelled(s);const n=i[this._findObjectId]?i[this._findObjectId].features:[],a=[];for(let e=0;e<n.length;e++)this._featureCache[n[e].attributes[this._layer.objectIdField]]=n[e],a.push(n[e].attributes[this._layer.objectIdField]);const o=t&&null!==e&&""!==e,u=null!=r;return new c.Z(o||u?a:[],o||u?[]:a,l,null)}))}))}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice(0);if(t.indexOf("*")>-1)return t;let r=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return!1===r&&t.push(this.objectIdField),t}_getFilteredSetUsingPaging(e,t,r,i,s){try{let n="",a=!1;const l=this._layer.nativeCapabilities();return null!==i&&l&&l.capabilities.queryRelated&&!0===l.capabilities.queryRelated.supportsOrderBy&&(n=i.constructClause(),a=!0),this.databaseType().then((()=>{let i=this._maxQueryRate();const o=l.capabilities.query.maxRecordCount;void 0!==o&&o<i&&(i=o);const u=t&&null!==e&&""!==e,h=null!=r;let d=null,p=!0;!0===this._removeGeometry&&(p=!1);const f=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this.relatedLayer.fields?this.relatedLayer.fields.map((e=>e.name)):["*"]);return d=new c.Z(u||h?["GETPAGES"]:[],u||h?[]:["GETPAGES"],a,{outFields:f.join(","),resultRecordCount:i,resultOffset:0,objectIds:[this._findObjectId],where:"1=1",orderByFields:n,returnGeometry:p,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}}),this._expandPagedSet(d,i,0,0,s).then((()=>d))}))}catch(e){return(0,b.d1)(e)}}_expandPagedSet(e,t,r,i,s){return this._expandPagedSetFeatureSet(e,t,r,i,s)}_clonePageDefinition(e){return null===e?null:!0!==e.groupbypage?{groupbypage:!1,outFields:e.outFields,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,where:e.where,objectIds:e.objectIds,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}:{groupbypage:!0,outFields:e.outFields,resultRecordCount:e.resultRecordCount,useOIDpagination:e.useOIDpagination,generatedOid:e.generatedOid,groupByFieldsForStatistics:e.groupByFieldsForStatistics,resultOffset:e.resultOffset,outStatistics:e.outStatistics,geometry:e.geometry,where:e.where,objectIds:e.objectIds,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}}_getPhysicalPage(e,t,r){try{const t=e.pagesDefinition.internal.lastRetrieved,i=t,s=e.pagesDefinition.internal.lastPage,n=this._layer.nativeCapabilities(),a=new Z.Z;return!0===this._requestStandardised&&(a.sqlFormat="standard"),a.relationshipId=this.relationship.id,a.objectIds=e.pagesDefinition.objectIds,a.resultOffset=e.pagesDefinition.internal.lastPage,a.resultRecordCount=e.pagesDefinition.resultRecordCount,a.outFields=e.pagesDefinition.outFields.split(","),a.where=e.pagesDefinition.where,a.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,a.returnGeometry=e.pagesDefinition.returnGeometry,a.outSpatialReference=this.spatialReference,n.source.queryRelatedFeatures(a).then((n=>{if(this._checkCancelled(r),e.pagesDefinition.internal.lastPage!==s)return 0;const a=n[this._findObjectId]?n[this._findObjectId].features:[];for(let t=0;t<a.length;t++)e.pagesDefinition.internal.set[i+t]=a[t].attributes[this._layer.objectIdField];for(let e=0;e<a.length;e++)this._featureCache[a[e].attributes[this._layer.objectIdField]]=a[e];const l=!n[this._findObjectId]||!1===n[this._findObjectId].exceededTransferLimit;return a.length!==e.pagesDefinition.resultRecordCount&&l&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=t+a.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,a.length}))}catch(e){return(0,b.d1)(e)}}_getFeatures(e,t,r,i){const s=[];-1!==t&&void 0===this._featureCache[t]&&s.push(t);const n=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,n))return this._expandPagedSet(e,n,0,0,i).then((()=>this._getFeatures(e,t,r,i)));let a=0;for(let i=e._lastFetchedIndex;i<e._known.length&&(a++,a<=r&&(e._lastFetchedIndex+=1),!("GETPAGES"!==e._known[i]&&void 0===this._featureCache[e._known[i]]&&(e._known[i]!==t&&s.push(e._known[i]),s.length>r)))&&!(a>=r&&0===s.length);i++);return 0===s.length?(0,b.DB)("success"):(0,b.d1)(new Error("Unaccounted for Features. Not in Feature Collection"))}_refineSetBlock(e,t,r){return(0,b.DB)(e)}_stat(e,t,r,i,s,n,a){return(0,b.DB)({calculated:!1})}get gdbVersion(){return this.relatedLayer.gdbVersion}_canDoAggregates(e,t,r,i,s){return(0,b.DB)(!1)}relationshipMetaData(){return this.relatedLayer.relationshipMetaData()}serviceUrl(){return this.relatedLayer.serviceUrl()}queryAttachments(e,t,r,i,s){return this.relatedLayer.queryAttachments(e,t,r,i,s)}getFeatureByObjectId(e,t){return this.relatedLayer.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this.relatedLayer.getOwningSystemUrl()}getIdentityUser(){return this.relatedLayer.getIdentityUser()}getDataSourceFeatureSet(){return this.relatedLayer}}var G=r(48039),W=r(65587),V=r(15235);function Q(){null===G.Z.applicationCache&&(G.Z.applicationCache=new G.Z)}function K(e,t){if(G.Z.applicationCache){const r=G.Z.applicationCache.getLayerInfo(e);if(r)return r.then((r=>(0,b.DB)(new T.default({url:e,outFields:t,sourceJSON:r}))));const i=new T.default({url:e,outFields:t});let s=(0,b.Ue)(((e,t)=>{i.load().then((()=>{e(i.sourceJSON)}),(e=>{t(e)}))}));return G.Z.applicationCache&&(G.Z.applicationCache.setLayerInfo(e,s),s=s.catch((t=>{throw G.Z.applicationCache.clearLayerInfo(e),t}))),s.then((()=>(0,b.DB)(i)))}return(0,b.DB)(new T.default({url:e,outFields:t}))}function z(e,t,r,i,s,n=null){return K(e,["*"]).then((e=>(0,b.DB)(J(e,t,r,i,s,n))))}function J(e,t=null,r=null,i=!0,s=null,n=null){return!0===e._hasMemorySource()?new q.Z({layer:e,spatialReference:t,outFields:r,includeGeometry:i,lrucache:s,interceptor:n}):new M({layer:e,spatialReference:t,outFields:r,includeGeometry:i,lrucache:s,interceptor:n})}function $(e){if(null!==G.Z.applicationCache){const t=G.Z.applicationCache.getLayerInfo(e);if(null!==t)return t}let t=(0,s.default)(e,{responseType:"json",query:{f:"json"}}).then((e=>{if(e.data){const t=e.data;return t.layers||(t.layers=[]),t.tables||(t.tables=[]),(0,b.DB)(t)}return(0,b.DB)({layers:[],tables:[]})}));return null!==G.Z.applicationCache&&(G.Z.applicationCache.setLayerInfo(e,t),t=t.catch((t=>{throw G.Z.applicationCache.clearLayerInfo(e),t}))),t}function H(e,t){const r={metadata:null,networkId:-1,unVersion:3,terminals:[],queryelem:null,layerNameLkp:{},lkp:null};return $(e).then((i=>{if(r.metadata=i,i.controllerDatasetLayers&&void 0!==i.controllerDatasetLayers.utilityNetworkLayerId&&null!==i.controllerDatasetLayers.utilityNetworkLayerId){if(i.layers)for(const e of i.layers)r.layerNameLkp[e.id]=e.name;if(i.tables)for(const e of i.tables)r.layerNameLkp[e.id]=e.name;const n=i.controllerDatasetLayers.utilityNetworkLayerId;return r.networkId=n,function(e,t){const r="QUERYDATAELEMTS:"+t.toString()+":"+e;if(null!==G.Z.applicationCache){const e=G.Z.applicationCache.getLayerInfo(r);if(null!==e)return e}let i=(0,s.default)(e+"/queryDataElements",{method:"post",responseType:"json",query:{layers:JSON.stringify([t.toString()]),f:"json"}}).then((e=>{if(e.data){const t=e.data;if(t.layerDataElements&&t.layerDataElements[0])return t.layerDataElements[0]}throw new Error("Not Found")}));return null!==G.Z.applicationCache&&(G.Z.applicationCache.setLayerInfo(r,i),i=i.catch((e=>{throw G.Z.applicationCache.clearLayerInfo(r),e}))),i}(e,n).then((i=>{if(i){r.queryelem=i,r.queryelem&&r.queryelem.dataElement&&void 0!==r.queryelem.dataElement.schemaGeneration&&(r.unVersion=r.queryelem.dataElement.schemaGeneration),r.lkp={},r.queryelem.dataElement.domainNetworks||(r.queryelem.dataElement.domainNetworks=[]);for(const e of r.queryelem.dataElement.domainNetworks){for(const t of e.edgeSources?e.edgeSources:[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:r.layerNameLkp[t.layerId]?r.layerNameLkp[t.layerId]:null};e.className&&(r.lkp[e.className]=e)}for(const t of e.junctionSources?e.junctionSources:[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:r.layerNameLkp[t.layerId]?r.layerNameLkp[t.layerId]:null};e.className&&(r.lkp[e.className]=e)}}if(r.queryelem.dataElement.terminalConfigurations)for(const e of r.queryelem.dataElement.terminalConfigurations)for(const t of e.terminals)r.terminals.push({terminalId:t.terminalId,terminalName:t.terminalName});return function(e){if(null!==G.Z.applicationCache){const t=G.Z.applicationCache.getLayerInfo(e);if(null!==t)return t}let t=(0,s.default)(e,{responseType:"json",query:{f:"json"}}).then((e=>{if(e.data){const t=e.data;return(0,b.DB)(t)}return(0,b.DB)(null)}));return null!==G.Z.applicationCache&&(G.Z.applicationCache.setLayerInfo(e,t),t=t.catch((t=>{throw G.Z.applicationCache.clearLayerInfo(e),t}))),t}(e+"/"+n).then((i=>{if(i.systemLayers&&void 0!==i.systemLayers.associationsTableId&&null!==i.systemLayers.associationsTableId){const s=[];return r.unVersion>=4&&(s.push("STATUS"),s.push("PERCENTALONG")),z(e+"/"+i.systemLayers.associationsTableId.toString(),t,["OBJECTID","FROMNETWORKSOURCEID","TONETWORKSOURCEID","FROMGLOBALID","TOGLOBALID","TOTERMINALID","FROMTERMINALID","ASSOCIATIONTYPE","ISCONTENTVISIBLE","GLOBALID",...s],!1,null,null).then((e=>e.load())).then((e=>r.unVersion>=4?(e=e.filter(_.WhereClause.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)",e.getFieldsIndex()))).load():e)).then((e=>({lkp:r.lkp,associations:e,unVersion:r.unVersion,terminals:r.terminals})))}return{associations:null,unVersion:r.unVersion,lkp:null,terminals:[]}}))}return{associations:null,unVersion:r.unVersion,lkp:null,terminals:[]}}))}return{associations:null,unVersion:r.unVersion,lkp:null,terminals:[]}}))}function X(e,t,r,i=null,s=null,n=!0,a=null,l=null){let o=e.serviceUrl();return o?(o="/"===o.charAt(o.length-1)?o+t.relatedTableId.toString():o+"/"+t.relatedTableId.toString(),z(o,i,s,n,a,l).then((o=>new U({layer:e,relatedLayer:o,relationship:t,objectId:r,spatialReference:i,outFields:s,includeGeometry:n,lrucache:a,interceptor:l})))):null}a.Z.registerAction(),C.registerAction(),h.Z.registerAction(),x.Z.registerAction(),D.Z.registerAction();class Y extends n.Z{constructor(e,t=null,r=null,i=null){super(),this._map=e,this._overridespref=t,this.lrucache=r,this.interceptor=i,this._instantLayers=[]}makeAndAddFeatureSet(e,t=!0,r=null){const i=J(e,this._overridespref,null===r?["*"]:r,t,this.lrucache,this.interceptor);return this._instantLayers.push({featureset:i,opitem:e,includeGeometry:t,outFields:JSON.stringify(r)}),i}featureSetByName(e,t=!0,r=null){if(void 0!==this._map.loaded&&void 0!==this._map.load&&!1===this._map.loaded)return this._map.load().then((()=>{try{return this.featureSetByName(e,t,r)}catch(e){return(0,b.d1)(e)}}));null===r&&(r=["*"]),r=(r=r.slice(0)).sort();const i=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const s=this._instantLayers[r];if(s.opitem.title===e&&s.includeGeometry===t&&s.outFields===i)return this.resolvePromise(this._instantLayers[r].featureset)}const s=this._map.layers.find((t=>t instanceof T.default&&t.title===e));if(s)return this.resolvePromise(this.makeAndAddFeatureSet(s,t,r));if(this._map.tables){const i=this._map.tables.find((t=>!!(t.title&&t.title===e||t.title&&t.title===e)));if(i){if(i instanceof T.default)return this.resolvePromise(this.makeAndAddFeatureSet(i,t,r));if(i._materializedTable);else{const e=i.outFields?i:{...i,outFields:["*"]};i._materializedTable=new T.default(e)}return i._materializedTable.load().then((()=>this.resolvePromise(this.makeAndAddFeatureSet(i._materializedTable,t,r))))}}return this.resolvePromise(null)}featureSetById(e,t=!0,r=["*"]){if(void 0!==this._map.loaded&&void 0!==this._map.load&&!1===this._map.loaded)return this._map.load().then((()=>{try{return this.featureSetById(e,t,r)}catch(e){return(0,b.d1)(e)}}));null===r&&(r=["*"]),r=(r=r.slice(0)).sort();const i=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const s=this._instantLayers[r];if(s.opitem.id===e&&s.includeGeometry===t&&s.outFields===i)return this.resolvePromise(this._instantLayers[r].featureset)}const s=this._map.layers.find((t=>t instanceof T.default&&t.id===e));if(s)return this.resolvePromise(this.makeAndAddFeatureSet(s,t,r));if(this._map.tables){const i=this._map.tables.find((t=>t.id===e));if(i){if(i instanceof T.default)return this.resolvePromise(this.makeAndAddFeatureSet(i,t,r));if(i._materializedTable);else{const e={...i,outFields:["*"]};i._materializedTable=new T.default(e)}return i._materializedTable.load().then((()=>this.resolvePromise(this.makeAndAddFeatureSet(i._materializedTable,t,r))))}}return this.resolvePromise(null)}}class ee extends n.Z{constructor(e,t=null,r=null,i=null){super(),this._url=e,this._overridespref=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=J(e,this._overridespref,null===r?["*"]:r,t,this.lrucache);return this._instantLayers.push({featureset:i,opitem:e,includeGeometry:t,outFields:JSON.stringify(r)}),i}_loadMetaData(){return $(this._url).then((e=>(this.metadata=e,e)))}load(){return this._loadMetaData()}clone(){return new ee(this._url,this._overridespref,this.lrucache,this.interceptor)}featureSetByName(e,t=!0,r=null){null===r&&(r=["*"]),r=(r=r.slice(0)).sort();const i=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const s=this._instantLayers[r];if(s.opitem.title===e&&s.includeGeometry===t&&s.outFields===i)return this.resolvePromise(this._instantLayers[r].featureset)}return this._loadMetaData().then((i=>{let s=null;for(const t of i.layers?i.layers:[])t.name===e&&(s=t);if(!s)for(const t of i.tables?i.tables:[])t.name===e&&(s=t);return s?K(this._url+"/"+s.id,["*"]).then((e=>this.makeAndAddFeatureSet(e,t,r))):this.resolvePromise(null)}))}featureSetById(e,t=!0,r=["*"]){null===r&&(r=["*"]),r=(r=r.slice(0)).sort();const i=JSON.stringify(r);e=null!=e?e.toString():"";for(let r=0;r<this._instantLayers.length;r++){const s=this._instantLayers[r];if(s.opitem.id===e&&s.includeGeometry===t&&s.outFields===i)return this.resolvePromise(this._instantLayers[r].featureset)}return this._loadMetaData().then((i=>{let s=null;for(const t of i.layers?i.layers:[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(s=t);if(!s)for(const t of i.tables?i.tables:[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(s=t);return s?K(this._url+"/"+s.id,["*"]).then((e=>this.makeAndAddFeatureSet(e,t,r))):this.resolvePromise(null)}))}}function te(e,t,r=null,i=null){return new Y(e,t,r,i)}function re(e,t,r=null,i=null){return new ee(e,t,r,i)}function ie(e,t){return null===e?t:new W.Z({url:e.field("url")})}function se(e,t,r){return i.id.findCredential(e.restUrl)?"loaded"===e.loadStatus&&""===t&&e.user&&e.user.sourceJSON&&!1===r?(0,b.DB)(e.user.sourceJSON):""===t?(0,s.default)(e.restUrl+"/community/self",{responseType:"json",query:{f:"json",...!1===r?{}:{returnUserLicenseTypeExtensions:!0}}}).then((e=>{if(e.data){const t=e.data;if(t&&t.username)return(0,b.DB)(t)}return(0,b.DB)(null)})):(0,s.default)(e.restUrl+"/community/users/"+t,{responseType:"json",query:{f:"json"}}).then((e=>{if(e.data){const t=e.data;return t.error?null:(0,b.DB)(t)}return(0,b.DB)(null)})):(0,b.DB)(null)}function ne(e,t,r,i,s){if(null===e)return null;if(e instanceof T.default){switch(t){case"datasource":return J(e,s,e.outFields,!0,r,i).getDataSourceFeatureSet();case"parent":case"root":return J(e,s,e.outFields,!0,r,i)}return null}if(e instanceof d.Z)switch(t){case"datasource":return e.getDataSourceFeatureSet();case"parent":return e;case"root":return e.getRootFeatureSet()}return null}function ae(e,t,r,i,s,n,a,l=null){if(G.Z.applicationCache){const o=G.Z.applicationCache.getLayerInfo(e+":"+n.url);if(o)return o.then((e=>{try{const n=new T.default({url:(0,f.US)(e.url)+"/"+t,outFields:["*"]});return(0,b.DB)(J(n,r,i,s,a,l))}catch(e){return(0,b.d1)(e)}}),(e=>(0,b.d1)(e)))}return(0,b.Ue)(((o,u)=>{const h=new V.default({id:e,portal:n}).load();G.Z.applicationCache&&G.Z.applicationCache.setLayerInfo(e+":"+n.url,h),h.then((e=>{try{const n=new T.default({url:(0,f.US)(e.url)+"/"+t,outFields:["*"]});o(J(n,r,i,s,a,l))}catch(e){u(e)}}),(t=>{G.Z.applicationCache&&G.Z.applicationCache.clearLayerInfo(e+":"+n.url),u(t)}))}))}},70409:(e,t,r)=>{r.d(t,{Xx:()=>_,QP:()=>f,$X:()=>p,yN:()=>g,TO:()=>y});var i=r(38171),s=r(77286),n=r(91136),a=r(90961),l=r(90658),o=r(36515),u=r(95330),h=r(41534),d=r(82971);class c{constructor(e){this.field=e,this.sqlRewritable=!1}postInitialization(e,t){}}class p extends c{constructor(e){super(e),this.sqlRewritable=!0}extractValue(e){return e.attributes[this.field.name]}rewriteSql(e){return{rewritten:this.sqlRewritable,where:e}}}class f extends c{constructor(e,t,r){super((0,l.JW)(e)),this.originalField=e,this.sqlRewritable=!0,this.field.name=t,this.field.alias=r}rewriteSql(e,t){return{rewritten:this.sqlRewritable,where:(0,o.bB)(e,this.field.name,this.originalField.name,t.getFieldsIndex())}}extractValue(e){return e.attributes[this.originalField.name]}}class y extends c{constructor(e,t,r){super(e),this.codefield=t,this.lkp=r,this.reverseLkp={};for(const e in r)this.reverseLkp[r[e]]=e;this.sqlRewritable=!0}rewriteSql(e,t){const r=this.evaluateNodeToWhereClause(e.parseTree,l.Bj.Standardised,this.field.name,this.codefield instanceof h.WhereClause?(0,o.zR)(this.codefield,l.Bj.Standardised):this.codefield,e.parameters);return r.indexOf(y.BADNESS)>=0?{rewritten:!1,where:e}:{rewritten:this.sqlRewritable,where:h.WhereClause.create(r,t._parent.getFieldsIndex())}}evaluateNodeToWhereClause(e,t,r=null,i=null,s){let n,a,l,u;switch(e.type){case"interval":return(0,o.TE)(this.evaluateNodeToWhereClause(e.value,t,r,i,s),e.qualifier,e.op);case"case_expression":{let i=" CASE ";"simple"===e.format&&(i+=this.evaluateNodeToWhereClause(e.operand,t,r,y.BADNESS,s));for(let n=0;n<e.clauses.length;n++)i+=" WHEN "+this.evaluateNodeToWhereClause(e.clauses[n].operand,t,r,y.BADNESS,s)+" THEN "+this.evaluateNodeToWhereClause(e.clauses[n].value,t,r,y.BADNESS,s);return null!==e.else&&(i+=" ELSE "+this.evaluateNodeToWhereClause(e.else,t,r,y.BADNESS,s)),i+=" END ",i}case"param":{const r=s[e.value.toLowerCase()];if("string"==typeof r)return"'"+s[e.value.toLowerCase()].toString().replace(/'/g,"''")+"'";if(r instanceof Date)return(0,o.oX)(r,t);if(r instanceof Array){const e=[];for(let i=0;i<r.length;i++)"string"==typeof r[i]?e.push("'"+r[i].toString().replace(/'/g,"''")+"'"):r[i]instanceof Date?e.push((0,o.oX)(r[i],t)):e.push(r[i].toString());return e}return r.toString()}case"expr_list":a=[];for(const n of e.value)a.push(this.evaluateNodeToWhereClause(n,t,r,i,s));return a;case"unary_expr":return" ( NOT "+this.evaluateNodeToWhereClause(e.expr,t,r,y.BADNESS,s)+" ) ";case"binary_expr":switch(e.operator){case"AND":return" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" AND "+this.evaluateNodeToWhereClause(e.right,t,r,i,s)+") ";case"OR":return" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" OR "+this.evaluateNodeToWhereClause(e.right,t,r,i,s)+") ";case"IS":if("null"!==e.right.type)throw new Error("Unsupported RHS for IS");return" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new Error("Unsupported RHS for IS");return" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" IS NOT NULL )";case"IN":if(n=[],"expr_list"===e.right.type){if("column_ref"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const n=[];let a=!0;for(const t of e.right.value){if("string"!==t.type){a=!1;break}if(void 0===this.lkp[t.value]){a=!1;break}n.push(this.lkp[t.value].toString())}if(a)return" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" IN ("+n.join(",")+")) "}return n=this.evaluateNodeToWhereClause(e.right,t,r,i,s)," ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" IN ("+n.join(",")+")) "}return u=this.evaluateNodeToWhereClause(e.right,t,r,i,s),u instanceof Array?" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" IN ("+u.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" IN ("+u+")) ";case"NOT IN":if(n=[],"expr_list"===e.right.type){if("column_ref"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const n=[];let a=!0;for(const t of e.right.value){if("string"!==t.type){a=!1;break}if(void 0===this.lkp[t.value]){a=!1;break}n.push(this.lkp[t.value].toString())}if(a)return" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" NOT IN ("+n.join(",")+")) "}return n=this.evaluateNodeToWhereClause(e.right,t,r,i,s)," ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" NOT IN ("+n.join(",")+")) "}return u=this.evaluateNodeToWhereClause(e.right,t,r,i,s),u instanceof Array?" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" NOT IN ("+u.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,r,i,s)+" NOT IN ("+u+")) ";case"BETWEEN":return l=this.evaluateNodeToWhereClause(e.right,t,r,y.BADNESS,s)," ("+this.evaluateNodeToWhereClause(e.left,t,r,y.BADNESS,s)+" BETWEEN "+l[0]+" AND "+l[1]+" ) ";case"NOTBETWEEN":return l=this.evaluateNodeToWhereClause(e.right,t,r,y.BADNESS,s)," ("+this.evaluateNodeToWhereClause(e.left,t,r,y.BADNESS,s)+" NOT BETWEEN "+l[0]+" AND "+l[1]+" ) ";case"LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,r,y.BADNESS,s)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,r,y.BADNESS,s)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,r,y.BADNESS,s)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,r,y.BADNESS,s)+") ";case"NOT LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,r,y.BADNESS,s)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,r,y.BADNESS,s)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,r,y.BADNESS,s)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,r,y.BADNESS,s)+") ";case"<>":case"=":if("column_ref"===e.left.type&&"string"===e.right.type){if(e.left.column.toUpperCase()===this.field.name.toUpperCase()&&void 0!==this.lkp[e.right.value.toString()])return" ("+i+" "+e.operator+" "+this.lkp[e.right.value.toString()].toString()+") "}else if("column_ref"===e.right.type&&"string"===e.left.type&&e.right.column.toUpperCase()===this.field.name.toUpperCase())return" ("+this.lkp[e.right.value.toString()].toString()+" "+e.operator+" "+i+") ";return" ("+this.evaluateNodeToWhereClause(e.left,t,r,y.BADNESS,s)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,r,y.BADNESS,s)+") ";case"<":case">":case">=":case"<=":case"*":case"-":case"+":case"/":return" ("+this.evaluateNodeToWhereClause(e.left,t,r,y.BADNESS,s)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,r,y.BADNESS,s)+") "}throw new Error("Not Supported Operator "+e.operator);case"null":return"null";case"bool":return!0===e.value?"1":"0";case"string":return"'"+e.value.toString().replace(/'/g,"''")+"'";case"timestamp":case"date":return(0,o.oX)(e.value,t);case"number":return e.value.toString();case"current_time":return(0,o.vR)("date"===e.mode,t);case"column_ref":return r&&r.toLowerCase()===e.column.toLowerCase()?"("+i+")":e.column;case"function":{const i=this.evaluateNodeToWhereClause(e.args,t,r,y.BADNESS,s);return(0,o.fz)(e.name,i,t)}}throw new Error("Unsupported sql syntax "+e.type)}extractValue(e){return this.codefield instanceof h.WhereClause?this.reverseLkp[this.codefield.calculateValueCompiled(e)]:this.reverseLkp[e.attributes[this.codefield]]}}y.BADNESS="_!!!_BAD_LKP_!!!!";class g extends c{constructor(e,t){super(e),this.sql=t}rewriteSql(e,t){return{rewritten:!0,where:(0,o.bB)(e,this.field.name,(0,o.zR)(this.sql,l.Bj.Standardised),t.getFieldsIndex())}}extractValue(e){return this.sql.calculateValueCompiled(e)}}class _ extends n.Z{constructor(e){super(e),this._calcFunc=null,this.declaredClass="esri.arcade.featureset.actions.Adapted",this.adaptedFields=null,this._extraFilter=null,this._extraFilter=e.extraFilter,this._parent=e.parentfeatureset,this._maxProcessing=30,this.adaptedFields=e.adaptedFields}static findField(e,t){for(const r of e)if(r.name.toLowerCase()===t.toString().toLowerCase())return r;return null}_initialiseFeatureSet(){null!==this._parent?(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.spatialReference=new d.Z({wkid:4326}),this.objectIdField="",this.globalIdField="",this.geometryType=l.Qk.point,this.typeIdField="",this.types=null),this.fields=[];for(const e of this.adaptedFields)e.postInitialization(this,this._parent),this.fields.push(e.field)}_getSet(e){return null===this._wset?this._ensureLoaded().then((()=>this._extraFilter?this._getFilteredSet("",null,null,null,e):this._parent._getSet(e))).then((t=>(this._checkCancelled(e),this._wset=new a.Z(t._candidates.slice(0),t._known.slice(0),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset))):(0,u.DB)(this._wset)}_isInFeatureSet(e){return this._parent._isInFeatureSet(e)}_getFeatures(e,t,r,n){const l=[];-1!==t&&void 0===this._featureCache[t]&&l.push(t);const o=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,o))return this._expandPagedSet(e,o,0,0,n).then((()=>this._getFeatures(e,t,r,n)));let h=0;for(let i=e._lastFetchedIndex;i<e._known.length&&(h++,h<=r&&(e._lastFetchedIndex+=1),!(void 0===this._featureCache[e._known[i]]&&(e._known[i]!==t&&l.push(e._known[i]),l.length>=o)));i++);if(0===l.length)return(0,u.DB)("success");e=new a.Z([],l,e._ordered,null);const d=Math.min(l.length,r);return this._parent._getFeatures(e,-1,d,n).then((()=>{this._checkCancelled(n);const e=[];for(let t=0;t<d;t++){const r=this._parent._featureFromCache(l[t]);void 0!==r&&e.push({geometry:r.geometry,attributes:r.attributes,id:l[t]})}for(const t of e){const e=[];for(const r of this.adaptedFields)e[r.field.name]=r.extractValue(t);this._featureCache[t.id]=new i.Z({attributes:e,geometry:(0,s.r1)(t.geometry)})}return"success"}))}_fetchAndRefineFeatures(){return(0,u.d1)(new Error("Fetch and Refine should not be called in this featureset"))}_getFilteredSet(e,t,r,i,s){let n=!1;const l=this.reformulateWithoutAdaptions(r);n=l.cannot,r=l.where;let u=!1;if(null!==i){u=!0;const e=[];for(const t of this.adaptedFields)if(!(t instanceof p)&&!0===i.scanForField(t.field.name)){if(!(t instanceof f)){i=null,u=!1;break}e.push({field:t.field.name,newfield:t.originalField.name})}i&&e.length>0&&(i=i.replaceFields(e))}return null!==r?null!==this._extraFilter&&(r=(0,o.$e)(this._extraFilter,r)):r=this._extraFilter,this._ensureLoaded().then((()=>this._parent._getFilteredSet(e,t,r,i,s))).then((e=>{let t;return this._checkCancelled(s),t=!0===n?new a.Z(e._candidates.slice(0).concat(e._known.slice(0)),[],!0===u&&e._ordered,this._clonePageDefinition(e.pagesDefinition)):new a.Z(e._candidates.slice(0),e._known.slice(0),!0===u&&e._ordered,this._clonePageDefinition(e.pagesDefinition)),t}))}reformulateWithoutAdaptions(e){const t={cannot:!1,where:e};if(null!==e)for(const r of this.adaptedFields)if(!0===(0,o.hq)(e,r.field.name)){const i=r.rewriteSql(e,this);if(!0!==i.rewritten){t.cannot=!0,t.where=null;break}t.where=i.where}return t}_stat(e,t,r,i,s,n,a){let l=!1,h=this.reformulateWithoutAdaptions(t);return l=h.cannot,t=h.where,h=this.reformulateWithoutAdaptions(s),l=l||h.cannot,null!==(s=h.where)?null!==this._extraFilter&&(s=(0,o.$e)(this._extraFilter,s)):s=this._extraFilter,!0===l?null===s&&""===r&&null===i?this._manualStat(e,t,n,a):(0,u.DB)({calculated:!1}):this._parent._stat(e,t,r,i,s,n,a).then((l=>!1===l.calculated?null===s&&""===r&&null===i?this._manualStat(e,t,n,a):{calculated:!1}:l))}_canDoAggregates(e,t,r,i,s){if(null===this._parent)return(0,u.DB)(!1);for(let t=0;t<e.length;t++)for(const r of this.adaptedFields)if(e[t].toLowerCase()===r.field.name.toLowerCase()&&!(r instanceof p))return(0,u.DB)(!1);const n=[];for(let e=0;e<t.length;e++){const r=t[e];if(null!==r.workingexpr){const e=this.reformulateWithoutAdaptions(r.workingexpr);if(e.cannot)return(0,u.DB)(!1);const t=r.clone();t.workingexpr=e.where,n.push(t)}else n.push(r)}const a=this.reformulateWithoutAdaptions(s);return a.cannot?(0,u.DB)(!1):(null!==(s=a.where)?null!==this._extraFilter&&(s=(0,o.$e)(this._extraFilter,s)):s=this._extraFilter,this._parent._canDoAggregates(e,n,r,i,s))}_getAggregatePagesDataSourceDefinition(e,t,r,i,s,n,a){if(null===this._parent)return(0,u.d1)(new Error("Should never be called"));const l=[];for(let e=0;e<t.length;e++){const r=t[e];if(null!==r.workingexpr){const e=this.reformulateWithoutAdaptions(r.workingexpr);if(e.cannot)return(0,u.d1)(new Error("Should never be called"));const t=r.clone();t.workingexpr=e.where,l.push(t)}else l.push(r)}const h=this.reformulateWithoutAdaptions(s);return h.cannot?(0,u.d1)(new Error("Should never be called")):(null!==(s=h.where)?null!==this._extraFilter&&(s=(0,o.$e)(this._extraFilter,s)):s=this._extraFilter,this._parent._getAggregatePagesDataSourceDefinition(e,l,r,i,s,n,a))}}},84328:(e,t,r)=>{r.d(t,{Z:()=>h});var i=r(91136),s=r(90961),n=r(90658),a=r(36515),l=r(95330),o=r(41534),u=r(82971);class h extends i.Z{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.actions.AttributeFilter",this._maxProcessing=1e3,this._parent=e.parentfeatureset,e.whereclause instanceof o.WhereClause?(this._whereclause=e.whereclause,this._whereClauseFunction=null):(this._whereClauseFunction=e.whereclause,this._whereclause=null)}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(0),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=[],this.typeIdField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new u.Z({wkid:4326}),this.geometryType=n.Qk.point)}_getSet(e){return null===this._wset?this._ensureLoaded().then((()=>this._parent._getFilteredSet("",null,this._whereclause,null,e))).then((t=>(this._checkCancelled(e),null!==this._whereClauseFunction?this._wset=new s.Z(t._candidates.slice(0).concat(t._known.slice(0)),[],t._ordered,this._clonePageDefinition(t.pagesDefinition)):this._wset=new s.Z(t._candidates.slice(0),t._known.slice(0),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset))):(0,l.DB)(this._wset)}_isInFeatureSet(e){let t=this._parent._isInFeatureSet(e);return t===n.dj.NotInFeatureSet?t:(t=this._idstates[e],void 0===t?n.dj.Unknown:t)}_getFeature(e,t,r){return this._parent._getFeature(e,t,r)}_getFeatures(e,t,r,i){return this._parent._getFeatures(e,t,r,i)}_featureFromCache(e){return this._parent._featureFromCache(e)}executeWhereClause(e){return this._whereclause.testFeature(e)}executeWhereClauseDeferred(e){if(null!==this._whereClauseFunction)try{const t=this._whereClauseFunction(e);return(0,l.y8)(t)?t:(0,l.DB)(t)}catch(e){return(0,l.d1)(e)}return(0,l.DB)(this.executeWhereClause(e))}_fetchAndRefineFeatures(e,t,r){const i=new s.Z([],e,!1,null),a=Math.min(t,e.length);return this._parent._getFeatures(i,-1,a,r).then((()=>{if(this._checkCancelled(r),null==this._whereClauseFunction){for(let t=0;t<a;t++){const r=this._parent._featureFromCache(e[t]);!0===this.executeWhereClause(r)?this._idstates[e[t]]=n.dj.InFeatureSet:this._idstates[e[t]]=n.dj.NotInFeatureSet}return"success"}const i=[];for(let t=0;t<a;t++){const r=this._parent._featureFromCache(e[t]);i.push(this.executeWhereClauseDeferred(r))}return(0,l.$6)(i).then((r=>{for(let i=0;i<t;i++)!0===r[i]?this._idstates[e[i]]=n.dj.InFeatureSet:this._idstates[e[i]]=n.dj.NotInFeatureSet;return"success"}))}))}_getFilteredSet(e,t,r,i,n){return null!==this._whereClauseFunction||(null!==r?null!==this._whereclause&&(r=(0,a.$e)(this._whereclause,r)):r=this._whereclause),this._ensureLoaded().then((()=>this._parent._getFilteredSet(e,t,r,i,n))).then((e=>{let t;return this._checkCancelled(n),t=null!==this._whereClauseFunction?new s.Z(e._candidates.slice(0).concat(e._known.slice(0)),[],e._ordered,this._clonePageDefinition(e.pagesDefinition)):new s.Z(e._candidates.slice(0),e._known.slice(0),e._ordered,this._clonePageDefinition(e.pagesDefinition)),t}))}_stat(e,t,r,i,s,n,o){if(null!==this._whereClauseFunction)return null===s&&""===r&&null===i?this._manualStat(e,t,n,o):(0,l.DB)({calculated:!1});let u=this._whereclause;return null!==s&&null!==this._whereclause&&(u=(0,a.$e)(this._whereclause,s)),this._parent._stat(e,t,r,i,u,n,o).then((a=>!1===a.calculated?null===s&&""===r&&null===i?this._manualStat(e,t,n,o):{calculated:!1}:a))}_canDoAggregates(e,t,r,i,s){return null!==this._whereClauseFunction?(0,l.DB)(!1):(null!==s?null!==this._whereclause&&(s=(0,a.$e)(this._whereclause,s)):s=this._whereclause,null===this._parent?(0,l.DB)(!1):this._parent._canDoAggregates(e,t,r,i,s))}_getAggregatePagesDataSourceDefinition(e,t,r,i,s,n,o){return null===this._parent?(0,l.d1)(new Error("Should never be called")):(null!==s?null!==this._whereclause&&(s=(0,a.$e)(this._whereclause,s)):s=this._whereclause,this._parent._getAggregatePagesDataSourceDefinition(e,t,r,i,s,n,o))}static registerAction(){i.Z._featuresetFunctions.filter=function(e){if("function"==typeof e)return new h({parentfeatureset:this,whereclause:e});let t=null;return e instanceof o.WhereClause&&(t=e),new h({parentfeatureset:this,whereclause:t})}}}},85065:(e,t,r)=>{r.d(t,{Z:()=>o});var i=r(61363),s=r(91136),n=r(90961),a=r(3823),l=r(95330);class o extends s.Z{constructor(e){super(e),this._orderbyclause=null,this.declaredClass="esri.arcade.featureset.actions.OrderBy",this._maxProcessing=100,this._orderbyclause=e.orderbyclause,this._parent=e.parentfeatureset}_getSet(e){return null===this._wset?this._ensureLoaded().then((()=>this._getFilteredSet("",null,null,this._orderbyclause,e))).then((t=>(this._checkCancelled(e),this._wset=t,this._wset))):(0,l.DB)(this._wset)}manualOrderSet(e,t){return this.getIdColumnDictionary(e,[],-1,t).then((e=>{this._orderbyclause.order(e);const t=new n.Z([],[],!0,null);for(let r=0;r<e.length;r++)t._known.push(e[r].id);return t}))}getIdColumnDictionary(e,t,r,s){if(r<e._known.length-1){const n=this._maxQueryRate();if("GETPAGES"===e._known[r+1])return(0,i.Q)(this._parent._expandPagedSet(e,n,0,0,s)).then((()=>this.getIdColumnDictionary(e,t,r,s)));let a=r+1;const l=[];for(;a<e._known.length&&"GETPAGES"!==e._known[a];)l.push(e._known[a]),a++;return r+=l.length,(0,i.Q)(this._parent._getFeatureBatch(l,s)).then((i=>{this._checkCancelled(s);for(const e of i)t.push({id:e.attributes[this.objectIdField],feature:e});return this.getIdColumnDictionary(e,t,r,s)}))}return e._candidates.length>0?(0,i.Q)(this._refineSetBlock(e,this._maxProcessingRate(),s)).then((()=>(this._checkCancelled(s),this.getIdColumnDictionary(e,t,r,s)))):(0,l.DB)(t)}_isInFeatureSet(e){return this._parent._isInFeatureSet(e)}_getFeatures(e,t,r,i){return this._parent._getFeatures(e,t,r,i)}_featureFromCache(e){if(void 0===this._featureCache[e]){const t=this._parent._featureFromCache(e);if(void 0===t)return;return null===t?null:(this._featureCache[e]=t,t)}return this._featureCache[e]}_fetchAndRefineFeatures(){return(0,l.d1)(new Error("Fetch and Refine should not be called in this featureset"))}_getFilteredSet(e,t,r,i,s){return this._ensureLoaded().then((()=>this._parent._getFilteredSet(e,t,r,null===i?this._orderbyclause:i,s))).then((e=>{this._checkCancelled(s);const i=new n.Z(e._candidates.slice(0),e._known.slice(0),e._ordered,this._clonePageDefinition(e.pagesDefinition));let a=!0;return e._candidates.length>0&&(a=!1),!1===i._ordered?this.manualOrderSet(i,s).then((e=>(!1===a&&(null===t&&null===r||(e=new n.Z(e._candidates.slice(0).concat(e._known.slice(0)),[],e._ordered,this._clonePageDefinition(e.pagesDefinition)))),e))):i}))}static registerAction(){s.Z._featuresetFunctions.orderBy=function(e){return""===e?this:new o({parentfeatureset:this,orderbyclause:new a.Z(e)})}}}},63991:(e,t,r)=>{r.d(t,{Z:()=>l});var i=r(91136),s=r(90961),n=r(90658),a=r(95330);class l extends i.Z{constructor(e){super(e),this._topnum=0,this.declaredClass="esri.arcade.featureset.actions.Top",this._countedin=0,this._maxProcessing=100,this._topnum=e.topnum,this._parent=e.parentfeatureset}_getSet(e){return null===this._wset?this._ensureLoaded().then((()=>this._parent._getSet(e))).then((e=>(this._wset=new s.Z(e._candidates.slice(0),e._known.slice(0),!1,this._clonePageDefinition(e.pagesDefinition)),this._setKnownLength(this._wset)>this._topnum&&(this._wset._known=this._wset._known.slice(0,this._topnum)),this._setKnownLength(this._wset)>=this._topnum&&(this._wset._candidates=[]),this._wset))):(0,a.DB)(this._wset)}_setKnownLength(e){return e._known.length>0&&"GETPAGES"===e._known[e._known.length-1]?e._known.length-1:e._known.length}_isInFeatureSet(e){const t=this._parent._isInFeatureSet(e);if(t===n.dj.NotInFeatureSet)return t;const r=this._idstates[e];return r===n.dj.InFeatureSet||r===n.dj.NotInFeatureSet?r:t===n.dj.InFeatureSet&&void 0===r?this._countedin<this._topnum?(this._idstates[e]=n.dj.InFeatureSet,this._countedin++,n.dj.InFeatureSet):(this._idstates[e]=n.dj.NotInFeatureSet,n.dj.NotInFeatureSet):n.dj.Unknown}_expandPagedSet(e,t,r,i,s){if(null===this._parent)return(0,a.d1)(new Error("Parent Paging not implemented"));if(t>this._topnum&&(t=this._topnum),this._countedin>=this._topnum&&e.pagesDefinition.internal.set.length<=e.pagesDefinition.resultOffset){let t=e._known.length;return t>0&&"GETPAGES"===e._known[t-1]&&(e._known.length=t-1),t=e._candidates.length,t>0&&"GETPAGES"===e._candidates[t-1]&&(e._candidates.length=t-1),(0,a.DB)("success")}return this._parent._expandPagedSet(e,t,r,i,s).then((t=>(this._setKnownLength(e)>this._topnum&&(e._known.length=this._topnum),this._setKnownLength(e)>=this._topnum&&(e._candidates.length=0),t)))}_getFeatures(e,t,r,i){const n=[],l=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,l))return this._expandPagedSet(e,l,0,0,i).then((()=>this._getFeatures(e,t,r,i)));-1!==t&&void 0===this._featureCache[t]&&n.push(t);let o=0;for(let i=e._lastFetchedIndex;i<e._known.length&&(o++,o<=r&&(e._lastFetchedIndex+=1),!(void 0===this._featureCache[e._known[i]]&&(e._known[i]!==t&&n.push(e._known[i]),n.length>l)));i++);if(0===n.length)return(0,a.DB)("success");const u=new s.Z([],n,!1,null),h=Math.min(n.length,r);return this._parent._getFeatures(u,-1,h,i).then((()=>{for(let e=0;e<h;e++){const t=this._parent._featureFromCache(n[e]);void 0!==t&&(this._featureCache[n[e]]=t)}return"success"}))}_getFilteredSet(e,t,r,i,n){return this._ensureLoaded().then((()=>this._getSet(n))).then((e=>new s.Z(e._candidates.slice(0).concat(e._known.slice(0)),[],!1,this._clonePageDefinition(e.pagesDefinition))))}_refineKnowns(e,t){let r=0,i=null;const s=[];for(let a=0;a<e._candidates.length;a++){const l=this._isInFeatureSet(e._candidates[a]);if(l===n.dj.InFeatureSet){if(e._known.push(e._candidates[a]),r+=1,null===i?i={start:a,end:a}:i.end===a-1?i.end=a:(s.push(i),i={start:a,end:a}),e._known.length>=this._topnum)break}else if(l===n.dj.NotInFeatureSet)null===i?i={start:a,end:a}:i.end===a-1?i.end=a:(s.push(i),i={start:a,end:a}),r+=1;else if(l===n.dj.Unknown)break;if(r>=t)break}null!==i&&s.push(i);for(let t=s.length-1;t>=0;t--)e._candidates.splice(s[t].start,s[t].end-s[t].start+1);this._setKnownLength(e)>this._topnum&&(e._known=e._known.slice(0,this._topnum)),this._setKnownLength(e)>=this._topnum&&(e._candidates=[])}_stat(){return(0,a.DB)({calculated:!1})}_canDoAggregates(){return(0,a.DB)(!1)}static registerAction(){i.Z._featuresetFunctions.top=function(e){return new l({parentfeatureset:this,topnum:e})}}}},17805:(e,t,r)=>{r.d(t,{Z:()=>f});var i=r(38171),s=r(91136),n=r(90961),a=r(90658),l=r(36515),o=r(95330),u=r(9361),h=r(67284),d=r(16451),c=r(1231),p=r(57444);class f extends s.Z{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerMemory",this._removeGeometry=!1,this._overrideFields=null,this._forceIsTable=!1,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,!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 a.tI}end(){return this._layer}optimisePagingFeatureQueries(){}load(){return null===this._loadPromise&&(this._loadPromise=(0,o.Ue)(((e,t)=>{if(!0===this._layer.loaded)return this._initialiseFeatureSet(),void e(this);this._layer.when().then((()=>{try{this._initialiseFeatureSet(),e(this)}catch(e){t(e)}}),t),this._layer.load()}))),this._loadPromise}get gdbVersion(){return""}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType,this.fields=this._layer.fields.slice(0),this._layer.outFields)if(1===this._layer.outFields.length&&"*"===this._layer.outFields[0]);else{const e=[];for(const t of this.fields)if("oid"===t.type)e.push(t);else for(const r of this._layer.outFields)if(r.toLowerCase()===t.name.toLowerCase()){e.push(t);break}this.fields=e}if(null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const r of this.fields)if("oid"===r.type)e.push(r),t.push(r.name);else for(const i of this._overrideFields)if(i.toLowerCase()===r.name.toLowerCase()){e.push(r),t.push(r.name);break}this.fields=e,this._overrideFields=t}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this.hasM=this._layer.supportsM,this.hasZ=this._layer.supportsZ,this._databaseType=a.Bj.Standardised,this.typeIdField=this._layer.typeIdField,this.types=this._layer.types}isTable(){return this._forceIsTable||this._layer.isTable||"table"===this._layer.type||!this._layer.geometryType}_isInFeatureSet(){return a.dj.InFeatureSet}_candidateIdTransform(e){return e}_getSet(e){return null===this._wset?this._ensureLoaded().then((()=>this._getFilteredSet("",null,null,null,e))).then((e=>(this._wset=e,e))):(0,o.DB)(this._wset)}_changeFeature(e){const t={};for(const r of this.fields)t[r.name]=e.attributes[r.name];return new i.Z({geometry:!0===this._removeGeometry?null:e.geometry,attributes:t})}_getFilteredSet(e,t,r,i,s){let u="",h=!1;if(null!==i&&(u=i.constructClause(),h=!0),this.isTable()&&t&&null!==e&&""!==e){const e=new n.Z([],[],!0,null);return(0,o.DB)(e)}const d=new p.Z;return d.where=null===r?null===t?"1=1":"":(0,l.zR)(r,a.Bj.Standardised),d.spatialRelationship=this._makeRelationshipEnum(e),d.outSpatialReference=this.spatialReference,d.orderByFields=""!==u?u.split(","):null,d.geometry=null===t?null:t,d.returnGeometry=!0,d.relationParameter=this._makeRelationshipParam(e),this._layer.queryFeatures(d).then((e=>{if(null===e)return new n.Z([],[],h,null);this._checkCancelled(s);const t=[];return e.features.forEach((e=>{const r=e.attributes[this._layer.objectIdField];t.push(r),this._featureCache[r]=this._changeFeature(e)})),new n.Z([],t,h,null)}))}_makeRelationshipEnum(e){if(e.indexOf("esriSpatialRelRelation")>=0)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.indexOf("esriSpatialRelRelation")>=0?e.split(":")[1]:""}_queryAllFeatures(){if(this._wset)return(0,o.DB)(this._wset);const e=new p.Z;return e.where="1=1",this._ensureLoaded().then((()=>{if(this._layer.source&&this._layer.source.items){const e=[];return this._layer.source.items.forEach((t=>{const r=t.attributes[this._layer.objectIdField];e.push(r),this._featureCache[r]=this._changeFeature(t)})),this._wset=new n.Z([],e,!1,null),this._wset}return this._layer.queryFeatures(e).then((e=>{const t=[];return e.features.forEach((e=>{const r=e.attributes[this._layer.objectIdField];t.push(r),this._featureCache[r]=this._changeFeature(e)})),this._wset=new n.Z([],t,!1,null),this._wset}))}))}_getFeatures(e,t,r){const i=[];-1!==t&&void 0===this._featureCache[t]&&i.push(t);for(let s=e._lastFetchedIndex;s<e._known.length&&(e._lastFetchedIndex+=1,!(void 0===this._featureCache[e._known[s]]&&(e._known[s]!==t&&i.push(e._known[s]),i.length>r)));s++);return 0===i.length?(0,o.DB)("success"):(0,o.d1)(new Error("Unaccounted for Features. Not in Feature Collection"))}_refineSetBlock(e){return(0,o.DB)(e)}_stat(){return(0,o.DB)({calculated:!1})}_canDoAggregates(){return(0,o.DB)(!1)}relationshipMetaData(){return[]}static _cloneAttr(e){const t={};for(const r in e)t[r]=e[r];return t}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?e.layerDefinition.typeIdField:"",s=[];if(e.layerDefinition.types)for(const t of e.layerDefinition.types)s.push(d.Z.fromJSON(t));let n=e.layerDefinition.geometryType;void 0===n&&(n=e.featureSet.geometryType||"");let a=e.featureSet.features;const l=t.toJSON();if(""===r||void 0===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,s=0;for(;i;){let r=!0;for(const i of e.layerDefinition.fields)if(i.name===t){r=!1;break}!0===r?i=!1:(s++,t="FID"+s.toString())}e.layerDefinition.fields.push({type:"esriFieldTypeOID",name:t,alias:t});const n=[];for(let r=0;r<a.length;r++)n.push({geometry:e.featureSet.features[r].geometry,attributes:e.featureSet.features[r].attributes?this._cloneAttr(e.featureSet.features[r].attributes):{}}),n[r].attributes[t]=r;a=n,r=t}}const o=[];for(const t of e.layerDefinition.fields)t instanceof c.Z?o.push(t):o.push(c.Z.fromJSON(t));let p=n;switch(p){case"esriGeometryPoint":p="point";break;case"esriGeometryPolyline":p="polyline";break;case"esriGeometryPolygon":p="polygon";break;case"esriGeometryExtent":p="extent";break;case"esriGeometryMultipoint":p="multipoint"}for(const e of a)e.geometry&&e.geometry instanceof u.Z==0&&(e.geometry.type=p,void 0===e.geometry.spatialReference&&(e.geometry.spatialReference=l));const y={outFields:["*"],source:a,fields:o,types:s,typeIdField:i,objectIdField:r,spatialReference:t};y.geometryType=p||"point";const g=new h.default(y);return new f({layer:g,spatialReference:t,isTable:null===p||""===p})}queryAttachments(){return(0,o.DB)([])}getFeatureByObjectId(e){const t=new p.Z;return t.where=this.objectIdField+"="+e.toString(),this._layer.queryFeatures(t).then((e=>1===e.features.length?e.features[0]:null))}getOwningSystemUrl(){return(0,o.DB)("")}getIdentityUser(){return(0,o.DB)("")}}},3823:(e,t,r)=>{function i(e,t){return e===t?0:null===e?-1:null===t?1:e<t?-1:1}r.d(t,{Z:()=>s});class s{constructor(e){const t=e.split(",");this._fields=[],this._directions=[];for(let e=0;e<t.length;e++){const r=t[e].match(/\S+/g);this._fields.push(r[0]),2===r.length?"asc"===r[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 r=0;r<this._fields.length;r++){const s=this.featureValue(e.feature,this._fields[r],r),n=this.featureValue(t.feature,this._fields[r],r);let a=0;if(a=1===this._directions[r]?i(s,n):-1*i(s,n),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 r=0;r<this._fields.length;r++){0!==r&&(t+=",");let i=this._fields[r];for(const t of e)if(i.toLowerCase()===t.field.toLowerCase()){i=t.newfield;break}t+=i,1===this._directions[r]?t+=" ASC":t+=" DESC"}return new s(t)}featureValue(e,t,r){const i=e.attributes[t];if(void 0!==i)return i;for(const i in e.attributes)if(t.toLowerCase()===i.toLowerCase())return this._fields[r]=i,e.attributes[i];return null}}},25929:(e,t,r)=>{r.d(t,{f:()=>n,i:()=>d,p:()=>p,r:()=>l,t:()=>a,w:()=>o});var i=r(70586),s=r(17452);function n(e,t){const r=t&&t.url&&t.url.path;if(e&&r&&(e=(0,s.hF)(e,r,{preserveProtocolRelative:!0}),t.portalItem&&t.readResourcePaths)){const r=(0,s.PF)(e,t.portalItem.itemUrl);h.test(r)&&t.readResourcePaths.push(t.portalItem.resourceFromPath(r).path)}return c(e,t&&t.portal)}function a(e,t,r=0){if(!e)return e;!(0,s.YP)(e)&&t&&t.blockedRelativeUrls&&t.blockedRelativeUrls.push(e);let i=(0,s.hF)(e);if(t){const r=t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.rootPath||t.url&&t.url.path;if(r){const n=c(r,t.portal);i=(0,s.PF)(c(i,t.portal),n,n),i!==e&&t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.writtenUrls.push(i)}}return i=function(e,t){return t&&!t.isPortal&&t.urlKey&&t.customBaseUrl?(0,s.Ie)(e,`${t.urlKey}.${t.customBaseUrl}`,t.portalHostname):e}(i,t&&t.portal),(0,s.YP)(i)&&(i=(0,s.Fv)(i)),null!=t&&t.resources&&null!=t&&t.portalItem&&!(0,s.YP)(i)&&!(0,s.HK)(i)&&0===r&&t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(i)}),i}function l(e,t,r){return n(e,r)}function o(e,t,r,i){const s=a(e,i);void 0!==s&&(t[r]=s)}const u=/\/items\/([^\/]+)\/resources\//,h=/^\.\/resources\//;function d(e){const t=(0,i.pC)(e)?e.match(u):null;return(0,i.pC)(t)?t[1]:null}function c(e,t){if(!t||t.isPortal||!t.urlKey||!t.customBaseUrl)return e;const r=`${t.urlKey}.${t.customBaseUrl}`;return(0,s.D6)(s.Gd,`${s.Gd.scheme}://${r}`)?(0,s.Ie)(e,t.portalHostname,r):(0,s.Ie)(e,r,t.portalHostname)}const p=Object.freeze({__proto__:null,fromJSON:n,toJSON:a,read:l,write:o,itemIdFromResourceUrl:d})},17896:(e,t,r)=>{r.d(t,{E:()=>d,a:()=>c,b:()=>o,c:()=>m,d:()=>_,e:()=>w,f:()=>u,g:()=>a,h:()=>f,i:()=>p,k:()=>C,l:()=>n,m:()=>b,n:()=>g,p:()=>y,q:()=>F,r:()=>x,s:()=>l,t:()=>S,u:()=>P,w:()=>D});var i=r(65617),s=r(46851);function n(e){const t=e[0],r=e[1],i=e[2];return Math.sqrt(t*t+r*r+i*i)}function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function l(e,t,r,i){return e[0]=t,e[1]=r,e[2]=i,e}function o(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function u(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function h(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e}function d(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}function c(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function p(e,t){const r=t[0]-e[0],i=t[1]-e[1],s=t[2]-e[2];return Math.sqrt(r*r+i*i+s*s)}function f(e,t){const r=t[0]-e[0],i=t[1]-e[1],s=t[2]-e[2];return r*r+i*i+s*s}function y(e){const t=e[0],r=e[1],i=e[2];return t*t+r*r+i*i}function g(e,t){const r=t[0],i=t[1],s=t[2];let n=r*r+i*i+s*s;return n>0&&(n=1/Math.sqrt(n),e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n),e}function _(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function m(e,t,r){const i=t[0],s=t[1],n=t[2],a=r[0],l=r[1],o=r[2];return e[0]=s*o-n*l,e[1]=n*a-i*o,e[2]=i*l-s*a,e}function w(e,t,r,i){const s=t[0],n=t[1],a=t[2];return e[0]=s+i*(r[0]-s),e[1]=n+i*(r[1]-n),e[2]=a+i*(r[2]-a),e}function b(e,t,r){const i=t[0],s=t[1],n=t[2];return e[0]=r[0]*i+r[4]*s+r[8]*n+r[12],e[1]=r[1]*i+r[5]*s+r[9]*n+r[13],e[2]=r[2]*i+r[6]*s+r[10]*n+r[14],e}function S(e,t,r){const i=t[0],s=t[1],n=t[2];return e[0]=i*r[0]+s*r[3]+n*r[6],e[1]=i*r[1]+s*r[4]+n*r[7],e[2]=i*r[2]+s*r[5]+n*r[8],e}function F(e,t,r){const i=r[0],s=r[1],n=r[2],a=r[3],l=t[0],o=t[1],u=t[2];let h=s*u-n*o,d=n*l-i*u,c=i*o-s*l,p=s*c-n*d,f=n*h-i*c,y=i*d-s*h;const g=2*a;return h*=g,d*=g,c*=g,p*=2,f*=2,y*=2,e[0]=l+h+p,e[1]=o+d+f,e[2]=u+c+y,e}const v=(0,i.c)(),I=(0,i.c)();function C(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function x(e,t,r){const i=r[0]-t[0],s=r[1]-t[1],n=r[2]-t[2];let a=i*i+s*s+n*n;return a>0?(a=1/Math.sqrt(a),e[0]=i*a,e[1]=s*a,e[2]=n*a,e):(e[0]=0,e[1]=0,e[2]=0,e)}const D=u,k=h,R=d,T=p,O=f,P=n,E=y;Object.freeze({__proto__:null,length:n,copy:a,set:l,add:o,subtract:u,multiply:h,divide:d,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},min:function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e},max:function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},scale:c,scaleAndAdd:function(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e},distance:p,squaredDistance:f,squaredLength:y,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e},normalize:g,dot:_,cross:m,lerp:w,hermite:function(e,t,r,i,s,n){const a=n*n,l=a*(2*n-3)+1,o=a*(n-2)+n,u=a*(n-1),h=a*(3-2*n);return e[0]=t[0]*l+r[0]*o+i[0]*u+s[0]*h,e[1]=t[1]*l+r[1]*o+i[1]*u+s[1]*h,e[2]=t[2]*l+r[2]*o+i[2]*u+s[2]*h,e},bezier:function(e,t,r,i,s,n){const a=1-n,l=a*a,o=n*n,u=l*a,h=3*n*l,d=3*o*a,c=o*n;return e[0]=t[0]*u+r[0]*h+i[0]*d+s[0]*c,e[1]=t[1]*u+r[1]*h+i[1]*d+s[1]*c,e[2]=t[2]*u+r[2]*h+i[2]*d+s[2]*c,e},random:function(e,t){t=t||1;const r=2*(0,s.R)()*Math.PI,i=2*(0,s.R)()-1,n=Math.sqrt(1-i*i)*t;return e[0]=Math.cos(r)*n,e[1]=Math.sin(r)*n,e[2]=i*t,e},transformMat4:b,transformMat3:S,transformQuat:F,rotateX:function(e,t,r,i){const s=[],n=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],n[0]=s[0],n[1]=s[1]*Math.cos(i)-s[2]*Math.sin(i),n[2]=s[1]*Math.sin(i)+s[2]*Math.cos(i),e[0]=n[0]+r[0],e[1]=n[1]+r[1],e[2]=n[2]+r[2],e},rotateY:function(e,t,r,i){const s=[],n=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],n[0]=s[2]*Math.sin(i)+s[0]*Math.cos(i),n[1]=s[1],n[2]=s[2]*Math.cos(i)-s[0]*Math.sin(i),e[0]=n[0]+r[0],e[1]=n[1]+r[1],e[2]=n[2]+r[2],e},rotateZ:function(e,t,r,i){const s=[],n=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],n[0]=s[0]*Math.cos(i)-s[1]*Math.sin(i),n[1]=s[0]*Math.sin(i)+s[1]*Math.cos(i),n[2]=s[2],e[0]=n[0]+r[0],e[1]=n[1]+r[1],e[2]=n[2]+r[2],e},angle:function(e,t){a(v,e),a(I,t),g(v,v),g(I,I);const r=_(v,I);return r>1?0:r<-1?Math.PI:Math.acos(r)},str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},exactEquals:C,equals:function(e,t){if(e===t)return!0;const r=e[0],i=e[1],n=e[2],a=t[0],l=t[1],o=t[2];return Math.abs(r-a)<=s.E*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-l)<=s.E*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(n-o)<=s.E*Math.max(1,Math.abs(n),Math.abs(o))},direction:x,sub:D,mul:k,div:R,dist:T,sqrDist:O,len:P,sqrLen:E})},98766:(e,t,r)=>{r.d(t,{a:()=>a,b:()=>h,c:()=>s,d:()=>g,e:()=>p,f:()=>f,g:()=>w,h:()=>b,l:()=>_,n:()=>y,s:()=>n,t:()=>m});var i=r(46851);function s(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function n(e,t,r,i,s){return e[0]=t,e[1]=r,e[2]=i,e[3]=s,e}function a(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function l(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function o(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function u(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}function h(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function d(e,t){const r=t[0]-e[0],i=t[1]-e[1],s=t[2]-e[2],n=t[3]-e[3];return Math.sqrt(r*r+i*i+s*s+n*n)}function c(e,t){const r=t[0]-e[0],i=t[1]-e[1],s=t[2]-e[2],n=t[3]-e[3];return r*r+i*i+s*s+n*n}function p(e){const t=e[0],r=e[1],i=e[2],s=e[3];return Math.sqrt(t*t+r*r+i*i+s*s)}function f(e){const t=e[0],r=e[1],i=e[2],s=e[3];return t*t+r*r+i*i+s*s}function y(e,t){const r=t[0],i=t[1],s=t[2],n=t[3];let a=r*r+i*i+s*s+n*n;return a>0&&(a=1/Math.sqrt(a),e[0]=r*a,e[1]=i*a,e[2]=s*a,e[3]=n*a),e}function g(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function _(e,t,r,i){const s=t[0],n=t[1],a=t[2],l=t[3];return e[0]=s+i*(r[0]-s),e[1]=n+i*(r[1]-n),e[2]=a+i*(r[2]-a),e[3]=l+i*(r[3]-l),e}function m(e,t,r){const i=t[0],s=t[1],n=t[2],a=t[3];return e[0]=r[0]*i+r[4]*s+r[8]*n+r[12]*a,e[1]=r[1]*i+r[5]*s+r[9]*n+r[13]*a,e[2]=r[2]*i+r[6]*s+r[10]*n+r[14]*a,e[3]=r[3]*i+r[7]*s+r[11]*n+r[15]*a,e}function w(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function b(e,t){const r=e[0],s=e[1],n=e[2],a=e[3],l=t[0],o=t[1],u=t[2],h=t[3];return Math.abs(r-l)<=i.E*Math.max(1,Math.abs(r),Math.abs(l))&&Math.abs(s-o)<=i.E*Math.max(1,Math.abs(s),Math.abs(o))&&Math.abs(n-u)<=i.E*Math.max(1,Math.abs(n),Math.abs(u))&&Math.abs(a-h)<=i.E*Math.max(1,Math.abs(a),Math.abs(h))}const S=l,F=o,v=u,I=d,C=c,x=p,D=f;Object.freeze({__proto__:null,copy:s,set:n,add:a,subtract:l,multiply:o,divide:u,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},min:function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e},max:function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e},scale:h,scaleAndAdd:function(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e[3]=t[3]+r[3]*i,e},distance:d,squaredDistance:c,length:p,squaredLength:f,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},normalize:y,dot:g,lerp:_,random:function(e,t){let r,s,n,a,l,o;t=t||1;do{r=2*(0,i.R)()-1,s=2*(0,i.R)()-1,l=r*r+s*s}while(l>=1);do{n=2*(0,i.R)()-1,a=2*(0,i.R)()-1,o=n*n+a*a}while(o>=1);const u=Math.sqrt((1-l)/o);return e[0]=t*r,e[1]=t*s,e[2]=t*n*u,e[3]=t*a*u,e},transformMat4:m,transformQuat:function(e,t,r){const i=t[0],s=t[1],n=t[2],a=r[0],l=r[1],o=r[2],u=r[3],h=u*i+l*n-o*s,d=u*s+o*i-a*n,c=u*n+a*s-l*i,p=-a*i-l*s-o*n;return e[0]=h*u+p*-a+d*-o-c*-l,e[1]=d*u+p*-l+c*-a-h*-o,e[2]=c*u+p*-o+h*-l-d*-a,e[3]=t[3],e},str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},exactEquals:w,equals:b,sub:S,mul:F,div:v,dist:I,sqrDist:C,len:x,sqrLen:D})},3920:(e,t,r)=>{r.d(t,{r:()=>h,p:()=>u});var i=r(43697),s=r(15923),n=r(61247),a=r(5600),l=r(52011),o=r(89749);const u=e=>{let t=class extends e{destroy(){this.destroyed||(this.handles.destroy(),this.updatingHandles.destroy())}get handles(){return this._get("handles")||new n.Z}get updatingHandles(){return this._get("updatingHandles")||new o.t}};return(0,i._)([(0,a.Cb)({readOnly:!0})],t.prototype,"handles",null),(0,i._)([(0,a.Cb)({readOnly:!0})],t.prototype,"updatingHandles",null),t=(0,i._)([(0,l.j)("esri.core.HandleOwner")],t),t};let h=class extends(u(s.Z)){};h=(0,i._)([(0,l.j)("esri.core.HandleOwner")],h)},61247:(e,t,r)=>{r.d(t,{Z:()=>h});var i=r(43697),s=r(15923),n=r(81049),a=r(70586),l=r(5600),o=r(52011);let u=class extends s.Z{constructor(e){super(e),this._groups=new Map}destroy(){this.removeAll()}get size(){let e=0;return this._groups.forEach((t=>{e+=t.length})),e}add(e,t){if(!this._isHandle(e)&&!Array.isArray(e)&&!n.Z.isCollection(e))return this;const r=this._getOrCreateGroup(t);return Array.isArray(e)||n.Z.isCollection(e)?e.forEach((e=>this._isHandle(e)&&r.push(e))):r.push(e),this.notifyChange("size"),this}forEach(e,t){if("function"==typeof e)this._groups.forEach((t=>t.forEach(e)));else{const r=this._getGroup(e);r&&t&&r.forEach(t)}}has(e){return this._groups.has(this._ensureGroupKey(e))}remove(e){if(Array.isArray(e)||n.Z.isCollection(e))return e.forEach(this.remove,this),this;if(!this.has(e))return this;const t=this._getGroup(e);for(let e=0;e<t.length;e++)t[e].remove();return this._deleteGroup(e),this.notifyChange("size"),this}removeAll(){return this._groups.forEach((e=>{for(let t=0;t<e.length;t++)e[t].remove()})),this._groups.clear(),this.notifyChange("size"),this}_isHandle(e){return e&&!!e.remove}_getOrCreateGroup(e){if(this.has(e))return this._getGroup(e);const t=[];return this._groups.set(this._ensureGroupKey(e),t),t}_getGroup(e){return(0,a.j0)(this._groups.get(this._ensureGroupKey(e)))}_deleteGroup(e){return this._groups.delete(this._ensureGroupKey(e))}_ensureGroupKey(e){return e||"_default_"}};(0,i._)([(0,l.Cb)({readOnly:!0})],u.prototype,"size",null),u=(0,i._)([(0,o.j)("esri.core.Handles")],u);const h=u},44543:(e,t,r)=>{r.d(t,{F:()=>d,M:()=>i});const i={Base64:0,Hex:1,String:2,Raw:3};function s(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function n(e,t,r,i,n,a){return s(function(e,t){return e<<t|e>>>32-t}(s(s(t,e),s(i,a)),n),r)}function a(e,t,r,i,s,a,l){return n(t&r|~t&i,e,t,s,a,l)}function l(e,t,r,i,s,a,l){return n(t&i|r&~i,e,t,s,a,l)}function o(e,t,r,i,s,a,l){return n(t^r^i,e,t,s,a,l)}function u(e,t,r,i,s,a,l){return n(r^(t|~i),e,t,s,a,l)}function h(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let r=1732584193,i=-271733879,n=-1732584194,h=271733878;for(let t=0;t<e.length;t+=16){const d=r,c=i,p=n,f=h;r=a(r,i,n,h,e[t+0],7,-680876936),h=a(h,r,i,n,e[t+1],12,-389564586),n=a(n,h,r,i,e[t+2],17,606105819),i=a(i,n,h,r,e[t+3],22,-1044525330),r=a(r,i,n,h,e[t+4],7,-176418897),h=a(h,r,i,n,e[t+5],12,1200080426),n=a(n,h,r,i,e[t+6],17,-1473231341),i=a(i,n,h,r,e[t+7],22,-45705983),r=a(r,i,n,h,e[t+8],7,1770035416),h=a(h,r,i,n,e[t+9],12,-1958414417),n=a(n,h,r,i,e[t+10],17,-42063),i=a(i,n,h,r,e[t+11],22,-1990404162),r=a(r,i,n,h,e[t+12],7,1804603682),h=a(h,r,i,n,e[t+13],12,-40341101),n=a(n,h,r,i,e[t+14],17,-1502002290),i=a(i,n,h,r,e[t+15],22,1236535329),r=l(r,i,n,h,e[t+1],5,-165796510),h=l(h,r,i,n,e[t+6],9,-1069501632),n=l(n,h,r,i,e[t+11],14,643717713),i=l(i,n,h,r,e[t+0],20,-373897302),r=l(r,i,n,h,e[t+5],5,-701558691),h=l(h,r,i,n,e[t+10],9,38016083),n=l(n,h,r,i,e[t+15],14,-660478335),i=l(i,n,h,r,e[t+4],20,-405537848),r=l(r,i,n,h,e[t+9],5,568446438),h=l(h,r,i,n,e[t+14],9,-1019803690),n=l(n,h,r,i,e[t+3],14,-187363961),i=l(i,n,h,r,e[t+8],20,1163531501),r=l(r,i,n,h,e[t+13],5,-1444681467),h=l(h,r,i,n,e[t+2],9,-51403784),n=l(n,h,r,i,e[t+7],14,1735328473),i=l(i,n,h,r,e[t+12],20,-1926607734),r=o(r,i,n,h,e[t+5],4,-378558),h=o(h,r,i,n,e[t+8],11,-2022574463),n=o(n,h,r,i,e[t+11],16,1839030562),i=o(i,n,h,r,e[t+14],23,-35309556),r=o(r,i,n,h,e[t+1],4,-1530992060),h=o(h,r,i,n,e[t+4],11,1272893353),n=o(n,h,r,i,e[t+7],16,-155497632),i=o(i,n,h,r,e[t+10],23,-1094730640),r=o(r,i,n,h,e[t+13],4,681279174),h=o(h,r,i,n,e[t+0],11,-358537222),n=o(n,h,r,i,e[t+3],16,-722521979),i=o(i,n,h,r,e[t+6],23,76029189),r=o(r,i,n,h,e[t+9],4,-640364487),h=o(h,r,i,n,e[t+12],11,-421815835),n=o(n,h,r,i,e[t+15],16,530742520),i=o(i,n,h,r,e[t+2],23,-995338651),r=u(r,i,n,h,e[t+0],6,-198630844),h=u(h,r,i,n,e[t+7],10,1126891415),n=u(n,h,r,i,e[t+14],15,-1416354905),i=u(i,n,h,r,e[t+5],21,-57434055),r=u(r,i,n,h,e[t+12],6,1700485571),h=u(h,r,i,n,e[t+3],10,-1894986606),n=u(n,h,r,i,e[t+10],15,-1051523),i=u(i,n,h,r,e[t+1],21,-2054922799),r=u(r,i,n,h,e[t+8],6,1873313359),h=u(h,r,i,n,e[t+15],10,-30611744),n=u(n,h,r,i,e[t+6],15,-1560198380),i=u(i,n,h,r,e[t+13],21,1309151649),r=u(r,i,n,h,e[t+4],6,-145523070),h=u(h,r,i,n,e[t+11],10,-1120210379),n=u(n,h,r,i,e[t+2],15,718787259),i=u(i,n,h,r,e[t+9],21,-343485551),r=s(r,d),i=s(i,c),n=s(n,p),h=s(h,f)}return[r,i,n,h]}function d(e,t=i.Hex){const r=t||i.Base64,s=h(function(e){const t=[];for(let r=0,i=8*e.length;r<i;r+=8)t[r>>5]|=(255&e.charCodeAt(r/8))<<r%32;return t}(e),8*e.length);switch(r){case i.Raw:return s;case i.Hex:return function(e){const t="0123456789abcdef",r=[];for(let i=0,s=4*e.length;i<s;i++)r.push(t.charAt(e[i>>2]>>i%4*8+4&15)+t.charAt(e[i>>2]>>i%4*8&15));return r.join("")}(s);case i.String:return function(e){const t=[];for(let r=0,i=32*e.length;r<i;r+=8)t.push(String.fromCharCode(e[r>>5]>>>r%32&255));return t.join("")}(s);case i.Base64:return function(e){const t=[];for(let r=0,i=4*e.length;r<i;r+=3){const i=(e[r>>2]>>r%4*8&255)<<16|(e[r+1>>2]>>(r+1)%4*8&255)<<8|e[r+2>>2]>>(r+2)%4*8&255;for(let s=0;s<4;s++)8*r+6*s>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>6*(3-s)&63))}return t.join("")}(s)}}},22862:(e,t,r)=>{r.d(t,{Hg:()=>y,uD:()=>p,V7:()=>f});var i=r(15923),s=r(81049),n=r(70586),a=r(1153);const l=["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"];function o(e){return e instanceof i.Z}function u(e){return e instanceof s.Z?Object.keys(e.items):o(e)?(0,a.vw)(e).keys():e?Object.keys(e):[]}function h(e,t){return e instanceof s.Z?e.items[t]:e[t]}function d(e){return e?e.declaredClass:null}function c(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=u(e),s=u(t);if(0===i.length&&0===s.length)return;if(!i.length||!s.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 a=s.filter((e=>-1===i.indexOf(e))),p=i.filter((e=>-1===s.indexOf(e))),f=i.filter((r=>s.indexOf(r)>-1&&h(e,r)!==h(t,r))).concat(a,p).sort(),y=d(e);if(y&&l.indexOf(y)>-1&&f.length)return{type:"complete",oldValue:e,newValue:t};let g;const _=o(e)&&o(t);for(const i of f){const s=h(e,i),a=h(t,i);let l;(_||"function"!=typeof s&&"function"!=typeof a)&&s!==a&&(null==s&&null==a||(l=r&&r[i]&&"function"==typeof r[i]?r[i](s,a):"object"==typeof s&&"object"==typeof a&&d(s)===d(a)?c(s,a):{type:"complete",oldValue:s,newValue:a},(0,n.pC)(l)&&((0,n.pC)(g)?g.diff[i]=l:g={type:"partial",diff:{[i]:l}})))}return g}function p(e,t){if((0,n.Wi)(e))return!1;const r=t.split(".");let i=e;for(const e of r){if("complete"===i.type)return!0;if("partial"!==i.type)return!1;{const t=i.diff[e];if(!t)return!1;i=t}}return!0}function f(e,t){for(const r of t)if(p(e,r))return!0;return!1}function y(e,t){if(!("function"==typeof e||"function"==typeof t||(0,n.Wi)(e)&&(0,n.Wi)(t)))return(0,n.Wi)(e)||(0,n.Wi)(t)||"object"==typeof e&&"object"==typeof t&&d(e)!==d(t)?{type:"complete",oldValue:e,newValue:t}:c(e,t)}},66643:(e,t,r)=>{r.d(t,{Ed:()=>n,UI:()=>a,q6:()=>l,mt:()=>o});var i=r(70586),s=r(95330);function n(e,t,r){return(0,s.as)(e.map(((e,i)=>t.apply(r,[e,i]))))}function a(e,t,r){return(0,s.as)(e.map(((e,i)=>t.apply(r,[e,i])))).then((e=>e.map((e=>e.value))))}function l(e){return(0,i.Wi)(e)?(0,s.DB)():e.then((e=>({ok:!0,value:e}))).catch((e=>({ok:!1,error:e})))}function o(e){return e.then((e=>({ok:!0,value:e}))).catch((e=>((0,s.r9)(e),{ok:!1,error:e})))}},22021:(e,t,r)=>{r.d(t,{ZF:()=>d,Kt:()=>c,jE:()=>y,uZ:()=>a,oK:()=>p,Vl:()=>u,wt:()=>l,t7:()=>o,Sf:()=>n,BV:()=>h});var i=r(17896);r(98766);const s=new Float32Array(1);function n(e){--e;for(let t=1;t<32;t<<=1)e|=e>>t;return e+1}function a(e,t,r){return Math.min(Math.max(e,t),r)}function l(e){return 0==(e&e-1)}function o(e,t,r){return e+(t-e)*r}function u(e){return e*Math.PI/180}function h(e){return 180*e/Math.PI}function d(e){return Math.acos(a(e,-1,1))}function c(e){return Math.asin(a(e,-1,1))}function p(e){return f(Math.max(-g,Math.min(e,g)))}function f(e){return s[0]=e,s[0]}function y(e,t){const r=(0,i.l)(e),s=c(e[2]/r),n=Math.atan2(e[1]/r,e[0]/r);return(0,i.s)(t,r,s,n),t}const g=f(34028234663852886e22)},17445:(e,t,r)=>{r.d(t,{Ym:()=>n}),r(91460);var i=r(70586),s=r(26258);function n(e,t,r={}){return function(e,t,r={},n){let a=null;const l=r.once?(e,r)=>{n(e)&&((0,i.hw)(a),t(e,r))}:(e,r)=>{n(e)&&t(e,r)};if(a=(0,s.aQ)(e,l,r.sync,r.equals),r.initial){const t=e();l(t,t)}return a}(e,t,r,a)}function a(e){return!0}r(87538)},43050:(e,t,r)=>{r.d(t,{S1:()=>a,on:()=>d,OY:()=>h,cm:()=>o,N1:()=>l,LR:()=>u,tH:()=>c});var i=r(91460),s=(r(22974),r(95330));const n=/\?(\.|$)/g;function a(e,t,r,i){const s=Array.isArray(t)?t:t.indexOf(",")>-1?t.split(","):[t],a=function(e,t,r,i){return e.watch(t,r,i)}(e,t,r,i);for(const t of s){const i=t.trim().replace(n,"$1"),s=e.get(i);r.call(e,s,s,i,e)}return a}function l(e,t,r,i){return c(e,t,p,r,i)}function o(e,t,r,i){return c(e,t,f,r,i)}function u(e,t,r,i){return c(e,t,y,r,i)}function h(e,t,r,i){return c(e,t,g,r,i)}function d(e,t,r,s,n,l,o){const u={};function h(t){const i=u[t];i&&(l&&l(i.target,t,e,r),i.handle.remove(),delete u[t])}const d=a(e,t,((t,a,l)=>{h(l),(0,i.vT)(t)&&(u[l]={handle:(0,i.on)(t,r,s),target:t},n&&n(t,l,e,r))}),o);return{remove(){d.remove();for(const e in u)h(e)}}}function c(e,t,r,i,n){const a="function"==typeof i?i:null,l="object"==typeof i?i:null;"boolean"==typeof i&&(n=i);let o,u=!1;function h(){o&&(o.remove(),o=null)}const d=(0,s.dD)();(0,s.fu)(l,(()=>{h(),d.reject((0,s.zE)())}));const c={then:d.promise.then.bind(d.promise),catch:d.promise.catch.bind(d.promise),remove:h};return Object.freeze(c),o=function(e,t,r,i,s){const n=e.watch(t,((t,s,n,a)=>{r&&!r(t)||null==i||i.call(e,t,s,n,a)}),s);if(Array.isArray(t))for(const s of t){const n=e.get(s);r&&r(n)&&(null==i||i.call(e,n,n,t,e))}else{const s=e.get(t);r&&r(s)&&(null==i||i.call(e,s,s,t,e))}return n}(e,t,r,((t,r,i,s)=>{u=!0,h(),a&&a.call(e,t,r,i,s),d.resolve({value:t,oldValue:r,propertyName:i,target:s})}),n),u&&h(),c}function p(e){return!!e}function f(e){return!e}function y(e){return!0===e}function g(e){return!1===e}},60437:(e,t,r)=>{r.d(t,{Gv:()=>g,Ue:()=>s,cS:()=>c,fS:()=>y,TC:()=>a,pp:()=>l,JR:()=>p,al:()=>n,t8:()=>d,Tn:()=>h,op:()=>u,dp:()=>o});var i=r(70586);function s(e=_){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function n(e,t,r,i,n,a,l=s()){return l[0]=e,l[1]=t,l[2]=r,l[3]=i,l[4]=n,l[5]=a,l}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function o(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function u(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function h(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function d(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function c(e){return e?d(e,g):s(g)}function p(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function f(e){return 6===e.length}function y(e,t,r){if((0,i.Wi)(e)||(0,i.Wi)(t))return e===t;if(!f(e)||!f(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(6570),r(24470);const g=[1/0,1/0,1/0,-1/0,-1/0,-1/0],_=[0,0,0,0,0,0];s()},24470:(e,t,r)=>{r.d(t,{Gv:()=>c,SO:()=>u,r3:()=>d,Ue:()=>n,oJ:()=>l,al:()=>a,kK:()=>h,HH:()=>o}),r(80442),r(22021);var i=r(70586),s=r(6570);function n(e=p){return[e[0],e[1],e[2],e[3]]}function a(e,t,r,i,s=n()){return s[0]=e,s[1]=t,s[2]=r,s[3]=i,s}function l(e,t=n()){return t[0]=e.xmin,t[1]=e.ymin,t[2]=e.xmax,t[3]=e.ymax,t}function o(e,t){return new s.Z({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:t})}function u(e){return function(e){return(0,i.Wi)(e)||e[0]>=e[2]?0:e[2]-e[0]}(e)*function(e){return e[1]>=e[3]?0:e[3]-e[1]}(e)}function h(e,t){return Math.max(t[0],e[0])<=Math.min(t[2],e[2])&&Math.max(t[1],e[1])<=Math.min(t[3],e[3])}function d(e,t){return t[0]>=e[0]&&t[2]<=e[2]&&t[1]>=e[1]&&t[3]<=e[3]}const c=[1/0,1/0,-1/0,-1/0],p=[0,0,0,0]},54295:(e,t,r)=>{r.d(t,{V:()=>a});var i=r(43697),s=r(5600),n=(r(67676),r(80442),r(75215),r(52011));const a=e=>{let t=class extends e{get apiKey(){var e;return this._isOverridden("apiKey")?this._get("apiKey"):function(e){return"portalItem"in e}(this)?null==(e=this.portalItem)?void 0:e.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,s.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,n.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>u});var i=r(43697),s=r(92604),n=r(70586),a=r(5600),l=(r(67676),r(80442),r(75215),r(52011)),o=r(66677);const u=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.Qc)(this.url);if((0,n.pC)(e)&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Nm)(e,s.Z.getLogger(this.declaredClass)))}};return(0,i._)([(0,a.Cb)()],t.prototype,"title",null),(0,i._)([(0,a.Cb)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,l.j)("esri.layers.mixins.ArcGISService")],t),t}},16859:(e,t,r)=>{r.d(t,{I:()=>b});var i=r(43697),s=r(40330),n=r(3172),a=r(66643),l=r(20102),o=r(92604),u=r(70586),h=r(95330),d=r(17452),c=r(5600),p=(r(67676),r(80442),r(75215),r(71715)),f=r(52011),y=r(30556),g=r(65587),_=r(15235),m=r(86082);const w=o.Z.getLogger("esri.layers.mixins.PortalLayer"),b=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0}destroy(){var e;null==(e=this.portalItem)||e.destroy(),this.portalItem=null}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new _.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const i=await r.e(8062).then(r.bind(r,18062));return(0,h.k_)(t),await i.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData},t)}catch(e){throw(0,h.D_)(e)||w.warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this.fetchUserHasEditingPrivileges(e).catch((e=>((0,h.r9)(e),!0))))}async fetchUserHasEditingPrivileges(e){const t=this.url?null==s.id?void 0:s.id.findCredential(this.url):null;if(!t)return!0;const r=S.credential===t?S.user:await this.fetchEditingUser(e);return S.credential=t,S.user=r,(0,u.Wi)(r)||null==r.privileges||r.privileges.includes("features:user:edit")}async fetchEditingUser(e){var t,r;const i=null==(t=this.portalItem)||null==(r=t.portal)?void 0:r.user;if(i)return i;const l=s.id.findServerInfo(this.url);if(null==l||!l.owningSystemUrl)return null;const o=`${l.owningSystemUrl}/sharing/rest`,h=g.Z.getDefault();if(h&&h.loaded&&(0,d.Fv)(h.restUrl)===(0,d.Fv)(o))return h.user;const c=`${o}/community/self`,p=(0,u.pC)(e)?e.signal:null,f=await(0,a.q6)((0,n.default)(c,{authMode:"no-prompt",query:{f:"json"},signal:p}));return f.ok?m.default.fromJSON(f.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,i=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||g.Z.getDefault());return r&&i&&!(0,d.tm)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save the scene, set the layer.portalItem to null or save the scene to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,c.Cb)({type:_.default})],t.prototype,"portalItem",null),(0,i._)([(0,p.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,y.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,c.Cb)()],t.prototype,"resourceReferences",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),t=(0,i._)([(0,f.j)("esri.layers.mixins.PortalLayer")],t),t},S={credential:null,user:null}},70082:(e,t,r)=>{r.d(t,{Z:()=>h});var i=r(43697),s=r(35454),n=r(10736),a=r(5600),l=(r(67676),r(80442),r(75215),r(52011));const o=new s.Xn({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 n.wq{constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"name",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"description",void 0),(0,i._)([(0,a.Cb)({json:{read:o.read,write:o.write}})],u.prototype,"drawingTool",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,i._)([(0,l.j)("esri.layers.support.FeatureTemplate")],u);const h=u},16451:(e,t,r)=>{r.d(t,{Z:()=>c});var i=r(43697),s=r(10736),n=r(5600),a=(r(67676),r(80442),r(75215),r(71715)),l=r(52011),o=r(30556),u=r(72729),h=r(70082);let d=class extends s.wq{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,u.im)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e)){var i;e[t]&&(r[t]=null==(i=e[t])?void 0:i.toJSON())}t.domains=r}};(0,i._)([(0,n.Cb)({json:{write:!0}})],d.prototype,"id",void 0),(0,i._)([(0,n.Cb)({json:{write:!0}})],d.prototype,"name",void 0),(0,i._)([(0,n.Cb)({json:{write:!0}})],d.prototype,"domains",void 0),(0,i._)([(0,a.r)("domains")],d.prototype,"readDomains",null),(0,i._)([(0,o.c)("domains")],d.prototype,"writeDomains",null),(0,i._)([(0,n.Cb)({type:[h.Z],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,i._)([(0,l.j)("esri.layers.support.FeatureType")],d);const c=d},56765:(e,t,r)=>{r.d(t,{Z:()=>h});var i,s=r(43697),n=r(81049),a=r(10736),l=r(5600),o=(r(67676),r(80442),r(75215),r(52011));let u=i=class extends a.wq{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new n.Z}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],u.prototype,"floorField",void 0),(0,s._)([(0,l.Cb)({json:{read:!1,write:!1}})],u.prototype,"viewAllMode",void 0),(0,s._)([(0,l.Cb)({json:{read:!1,write:!1}})],u.prototype,"viewAllLevelIds",void 0),u=i=(0,s._)([(0,o.j)("esri.layers.support.LayerFloorInfo")],u);const h=u},66677:(e,t,r)=>{r.d(t,{ld:()=>f,B5:()=>d,M8:()=>g,G:()=>b,Qc:()=>c,DR:()=>p,Nm:()=>_,XG:()=>m,a7:()=>y,wH:()=>w});var i=r(70586),s=r(17452),n=r(25929);const a={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},l=Object.values(a),o=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${l.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${l.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),h=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function d(e){return!!o.test(e)}function c(e){const t=(0,s.mN)(e),r=t.path.match(o)||t.path.match(u);if(!r)return null;const[,i,n,l,h]=r,d=n.indexOf("/");return{title:f(-1!==d?n.slice(d+1):n),serverType:a[l.toLowerCase()],sublayer:null!=h&&""!==h?parseInt(h,10):null,url:{path:i}}}function p(e){const t=(0,s.mN)(e).path.match(h);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function f(e){return(e=e.replace(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function y(e,t){const r=[];if(e){const t=c(e);(0,i.pC)(t)&&t.title&&r.push(t.title)}if(t){const e=f(t);r.push(e)}if(2===r.length){if(-1!==r[0].toLowerCase().indexOf(r[1].toLowerCase()))return r[0];if(-1!==r[1].toLowerCase().indexOf(r[0].toLowerCase()))return r[1]}return r.join(" - ")}function g(e){if(!e)return!1;const t=-1!==(e=e.toLowerCase()).indexOf(".arcgis.com/"),r=-1!==e.indexOf("//services")||-1!==e.indexOf("//tiles")||-1!==e.indexOf("//features");return t&&r}function _(e,t){return e?(0,s.Qj)((0,s.Hu)(e,t)):e}function m(e){let{url:t}=e;if(!t)return{url:t};t=(0,s.Hu)(t,e.logger);const r=(0,s.mN)(t),n=c(r.path);let a;if((0,i.pC)(n))null!=n.sublayer&&null==e.layer.layerId&&(a=n.sublayer),t=n.url.path;else if(e.nonStandardUrlAllowed){const e=p(r.path);(0,i.pC)(e)&&(t=e.serviceUrl,a=e.sublayerId)}return{url:(0,s.Qj)(t),layerId:a}}function w(e,t,r,i,a){(0,n.w)(t,i,"url",a),i.url&&null!=e.layerId&&(i.url=(0,s.v_)(i.url,r,e.layerId.toString()))}function b(e){if(!e)return!1;const t=e.toLowerCase(),r=-1!==t.indexOf("/services/"),i=-1!==t.indexOf("/mapserver/wmsserver"),s=-1!==t.indexOf("/imageserver/wmsserver"),n=-1!==t.indexOf("/wmsserver");return r&&(i||s||n)}},15235:(e,t,r)=>{r.r(t),r.d(t,{default:()=>D});var i=r(43697),s=r(99880),n=r(20102),a=r(10736),l=r(22974),o=r(83379),u=r(70586),h=r(17452),d=r(5600),c=r(75215),p=r(71715),f=r(52011),y=r(6570),g=r(65587),_=r(15923),m=r(92604),w=(r(67676),r(80442),r(90578));const b=m.Z.getLogger("esri.portal.PortalItemResource");let S=class extends _.Z{constructor(e){super(e),this.portalItem=null}normalizeCtorArgs(e){return e&&e.portalItem&&e.path?{...e,path:this.normalizePath(e.path,e.portalItem)}:e}set path(e){(0,u.pC)(e)&&(0,h.YP)(e)?b.error("portalitemresource:invalid-path","A portal item resource path must be relative"):this._set("path",e)}_castPath(e){return this.normalizePath(e,this.portalItem)}get url(){return this.portalItem&&this.path?`${this.portalItem.itemUrl}/resources/${this.path}`:null}get itemRelativeUrl(){return this.portalItem&&this.path?`./resources/${this.path}`:null}fetch(e="json",t){const r=this.url;if((0,u.Wi)(r))throw new n.Z("portal-item-resource:fetch","Portal item resource does not refer to a valid item or path");return this.portalItem.portal._request(r,{responseType:e,query:{token:this.portalItem.apiKey},signal:(0,u.U2)(t,"signal")})}async update(e,t){return(await r.e(7873).then(r.bind(r,97873))).addOrUpdateResource(this,"update",e,t)}hasPath(){return(0,u.pC)(this.path)}normalizePath(e,t){return(0,u.Wi)(e)?e:(e=e.replace(/^\/+/,""),(0,u.pC)(t)&&(0,h.YP)(e)&&(e=(0,h.PF)(e,t.itemUrl)),e.replace(/^\/+/,"").replace(/^(\.\/)?resources\//,""))}};(0,i._)([(0,d.Cb)()],S.prototype,"portalItem",void 0),(0,i._)([(0,d.Cb)({type:String,value:null})],S.prototype,"path",null),(0,i._)([(0,w.p)("path")],S.prototype,"_castPath",null),(0,i._)([(0,d.Cb)({type:String,readOnly:!0})],S.prototype,"url",null),(0,i._)([(0,d.Cb)({type:String,readOnly:!0})],S.prototype,"itemRelativeUrl",null),S=(0,i._)([(0,f.j)("esri.portal.PortalItemResource")],S);const F=S;let v=class extends _.Z{constructor(e){super(e),this.created=null,this.rating=null}};(0,i._)([(0,d.Cb)()],v.prototype,"created",void 0),(0,i._)([(0,d.Cb)()],v.prototype,"rating",void 0),v=(0,i._)([(0,f.j)("esri.portal.PortalRating")],v);const I=v;var C;let x=C=class extends((0,a.eC)(o.Z)){constructor(e){super(e),this.access=null,this.accessInformation=null,this.apiKey=null,this.applicationProxies=null,this.avgRating=null,this.categories=null,this.created=null,this.culture=null,this.description=null,this.extent=null,this.groupCategories=null,this.id=null,this.itemControl=null,this.licenseInfo=null,this.modified=null,this.name=null,this.numComments=null,this.numRatings=null,this.numViews=null,this.owner=null,this.ownerFolder=null,this.portal=null,this.screenshots=null,this.size=null,this.snippet=null,this.sourceJSON=null,this.tags=null,this.title=null,this.type=null,this.typeKeywords=null,this.url=null}static from(e){return(0,c.TJ)(C,e)}destroy(){this.portal=null}get displayName(){const e=this.type,t=this.typeKeywords||[];let r=e;return"Feature Service"===e||"Feature Collection"===e?r=t.indexOf("Table")>-1?"Table":t.indexOf("Route Layer")>-1?"Route Layer":t.indexOf("Markup")>-1?"Markup":"Feature Layer":"Image Service"===e?r=t.indexOf("Elevation 3D Layer")>-1?"Elevation Layer":t.indexOf("Tiled Imagery")>-1?"Tiled Imagery Layer":"Imagery Layer":"Scene Service"===e?r="Scene Layer":"Scene Package"===e?r="Scene Layer Package":"Stream Service"===e?r="Feature Layer":"Geoprocessing Service"===e&&this.portal&&this.portal.isPortal?r=t.indexOf("Web Tool")>-1?"Tool":"Geoprocessing Service":"Geocoding Service"===e?r="Locator":"Geoenrichment Service"===e?r="GeoEnrichment Service":"Microsoft Powerpoint"===e?r="Microsoft PowerPoint":"GeoJson"===e?r="GeoJSON":"Globe Service"===e?r="Globe Layer":"Vector Tile Service"===e?r="Tile Layer":"netCDF"===e?r="NetCDF":"Map Service"===e?r=-1===t.indexOf("Spatiotemporal")&&(t.indexOf("Hosted Service")>-1||t.indexOf("Tiled")>-1)&&-1===t.indexOf("Relational")?"Tile Layer":"Map Image Layer":e&&e.toLowerCase().indexOf("add in")>-1?r=e.replace(/(add in)/gi,"Add-In"):"datastore catalog service"===e?r="Big Data File Share":"Compact Tile Package"===e?r="Tile Package (tpkx)":"OGCFeatureServer"===e&&(r="OGC Feature Layer"),r}readExtent(e){return e&&e.length?new y.Z(e[0][0],e[0][1],e[1][0],e[1][1]):null}get iconUrl(){const e=this.type&&this.type.toLowerCase()||"",t=this.typeKeywords||[];let r,i=!1,n=!1,a=!1,l=!1,o=!1,u=!1;return e.indexOf("service")>0||"feature collection"===e||"kml"===e||"wms"===e||"wmts"===e||"wfs"===e?(i=t.indexOf("Hosted Service")>-1,"feature service"===e||"feature collection"===e||"kml"===e||"wfs"===e?(n=t.indexOf("Table")>-1,a=t.indexOf("Route Layer")>-1,l=t.indexOf("Markup")>-1,o=-1!==t.indexOf("Spatiotemporal"),u=-1!==t.indexOf("UtilityNetwork"),r=o&&n?"spatiotemporaltable":n?"table":a?"routelayer":l?"markup":o?"spatiotemporal":i?"featureshosted":u?"utilitynetwork":"features"):r="map service"===e||"wms"===e||"wmts"===e?i||t.indexOf("Tiled")>-1||"wmts"===e?"maptiles":"mapimages":"scene service"===e?t.indexOf("Line")>-1?"sceneweblayerline":t.indexOf("3DObject")>-1?"sceneweblayermultipatch":t.indexOf("Point")>-1?"sceneweblayerpoint":t.indexOf("IntegratedMesh")>-1?"sceneweblayermesh":t.indexOf("PointCloud")>-1?"sceneweblayerpointcloud":t.indexOf("Polygon")>-1?"sceneweblayerpolygon":t.indexOf("Building")>-1?"sceneweblayerbuilding":t.indexOf("Voxel")>-1?"sceneweblayervoxel":"sceneweblayer":"image service"===e?t.indexOf("Elevation 3D Layer")>-1?"elevationlayer":t.indexOf("Tiled Imagery")>-1?"tiledimagerylayer":"imagery":"stream service"===e?"streamlayer":"vector tile service"===e?"vectortile":"datastore catalog service"===e?"datastorecollection":"geocoding service"===e?"geocodeservice":"geoprocessing service"===e&&t.indexOf("Web Tool")>-1&&this.portal&&this.portal.isPortal?"tool":"layers"):r="web map"===e||"cityengine web scene"===e?"maps":"web scene"===e?t.indexOf("ViewingMode-Local")>-1?"webscenelocal":"websceneglobal":"web mapping application"===e||"mobile application"===e||"application"===e||"operation view"===e||"desktop application"===e?"apps":"map document"===e||"map package"===e||"published map"===e||"scene document"===e||"globe document"===e||"basemap package"===e||"mobile basemap package"===e||"mobile map package"===e||"project package"===e||"project template"===e||"pro map"===e||"layout"===e||"layer"===e&&t.indexOf("ArcGIS Pro")>-1||"explorer map"===e&&t.indexOf("Explorer Document")?"mapsgray":"service definition"===e||"csv"===e||"shapefile"===e||"cad drawing"===e||"geojson"===e||"360 vr experience"===e||"netcdf"===e||"administrative report"===e?"datafiles":"explorer add in"===e||"desktop add in"===e||"windows viewer add in"===e||"windows viewer configuration"===e?"appsgray":"arcgis pro add in"===e||"arcgis pro configuration"===e?"addindesktop":"rule package"===e||"file geodatabase"===e||"sqlite geodatabase"===e||"csv collection"===e||"kml collection"===e||"windows mobile package"===e||"map template"===e||"desktop application template"===e||"gml"===e||"arcpad package"===e||"code sample"===e||"form"===e||"document link"===e||"earth configuration"===e||"operations dashboard add in"===e||"rules package"===e||"image"===e||"workflow manager package"===e||"explorer map"===e&&t.indexOf("Explorer Mapping Application")>-1||t.indexOf("Document")>-1?"datafilesgray":"network analysis service"===e||"geoprocessing service"===e||"geodata service"===e||"geometry service"===e||"geoprocessing package"===e||"locator package"===e||"geoprocessing sample"===e||"workflow manager service"===e?"toolsgray":"layer"===e||"layer package"===e||"explorer layer"===e?"layersgray":"scene package"===e?"scenepackage":"mobile scene package"===e?"mobilescenepackage":"tile package"===e||"compact tile package"===e?"tilepackage":"task file"===e?"taskfile":"report template"===e?"report-template":"statistical data collection"===e?"statisticaldatacollection":"insights workbook"===e?"workbook":"insights model"===e?"insightsmodel":"insights page"===e?"insightspage":"insights theme"===e?"insightstheme":"hub initiative"===e?"hubinitiative":"hubpage"===e?"hubpage":"hub event"===e?"hubevent":"hub site application"===e?"hubsite":"relational database connection"===e?"relationaldatabaseconnection":"big data file share"===e?"datastorecollection":"image collection"===e?"imagecollection":"style"===e?"style":"desktop style"===e?"desktopstyle":"dashboard"===e?"dashboard":"raster function template"===e?"rasterprocessingtemplate":"vector tile package"===e?"vectortilepackage":"ortho mapping project"===e?"orthomappingproject":"ortho mapping template"===e?"orthomappingtemplate":"solution"===e?"solutions":"geopackage"===e?"geopackage":"deep learning package"===e?"deeplearningpackage":"real time analytic"===e?"realtimeanalytics":"big data analytic"===e?"bigdataanalytics":"feed"===e?"feed":"excalibur imagery project"===e?"excaliburimageryproject":"notebook"===e?"notebook":"storymap"===e?"storymap":"survey123 add in"===e?"survey123addin":"mission"===e?"mission":"mission report"===e?"missionreport":"quickcapture project"===e?"quickcaptureproject":"pro report"===e?"proreport":"urban model"===e?"urbanmodel":"web experience"===e?"experiencebuilder":"web experience template"===e?"webexperiencetemplate":"workflow"===e?"workflow":"insights script"===e?"insightsscript":"kernel gateway connection"===e?"kernelgatewayconnection":"hub initiative template"===e?"hubinitiativetemplate":"storymap theme"===e?"storymaptheme":"knowledge graph"===e?"knowledgegraph":"native application"===e?"nativeapp":"native application installer"===e?"nativeappinstaller":"link chart"===e?"linkchart":"investigation"===e?"investigation":"ogcfeatureserver"===e?"features":"pro project"===e?"proproject":"insights workbook package"===e?"insightsworkbookpackage":"apache parquet"===e?"apacheparquet":"maps",r?(0,s.V)("esri/images/portal/"+r+"16.png"):null}get isLayer(){return["Map Service","Feature Service","Feature Collection","Scene Service","Image Service","Stream Service","Vector Tile Service","WMTS","WMS"].indexOf(this.type)>-1}get itemUrl(){const e=this.get("portal.restUrl");return e?e+"/content/items/"+this.id:null}get thumbnailUrl(){const e=this.itemUrl,t=this.thumbnail;return e&&t?this.portal._normalizeUrl(`${e}/info/${t}?f=json`):null}get userItemUrl(){const e=this.get("portal.restUrl");if(!e)return null;const t=this.owner||this.get("portal.user.username");return t?`${e}/content/users/${this.ownerFolder?`${t}/${this.ownerFolder}`:t}/items/${this.id}`:null}load(e){this.portal||(this.portal=g.Z.getDefault());const t=this.portal.load(e).then((()=>this.sourceJSON?this.sourceJSON:this.id&&this.itemUrl?this.portal._request(this.itemUrl,{signal:(0,u.pC)(e)?e.signal:null,query:{token:this.apiKey}}):{})).then((e=>{this.sourceJSON=e,this.read(e)}));return this.addResolvingPromise(t),Promise.resolve(this)}addRating(e){const t={method:"post",query:{}};return e instanceof I&&(e=e.rating),isNaN(e)||"number"!=typeof e||(t.query.rating=e),this.portal._request(this.itemUrl+"/addRating",t).then((()=>new I({rating:e,created:new Date})))}clone(){const e={access:this.access,accessInformation:this.accessInformation,applicationProxies:(0,l.d9)(this.applicationProxies),avgRating:this.avgRating,categories:(0,l.d9)(this.categories),created:(0,l.d9)(this.created),culture:this.culture,description:this.description,extent:(0,l.d9)(this.extent),groupCategories:(0,l.d9)(this.groupCategories),id:this.id,itemControl:this.itemControl,licenseInfo:this.licenseInfo,modified:(0,l.d9)(this.modified),name:this.name,numComments:this.numComments,numRatings:this.numRatings,numViews:this.numViews,owner:this.owner,ownerFolder:this.ownerFolder,portal:this.portal,screenshots:(0,l.d9)(this.screenshots),size:this.size,snippet:this.snippet,tags:(0,l.d9)(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:(0,l.d9)(this.typeKeywords),url:this.url};return this.loaded&&(e.loadStatus="loaded"),new C({sourceJSON:this.sourceJSON}).set(e)}createPostQuery(){const e=this.toJSON();for(const t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}deleteRating(){return this.portal._request(this.itemUrl+"/deleteRating",{method:"post"}).then((()=>{}))}fetchData(e="json",t){return this.portal._request(this.itemUrl+"/data",{responseType:e,...t,query:{token:this.apiKey}})}fetchRating(e){return this.portal._request(this.itemUrl+"/rating",{query:{token:this.apiKey},...e}).then((e=>null!=e.rating?(e.created=new Date(e.created),new I(e)):null))}fetchRelatedItems(e,t){return this.portal._requestToTypedArray(this.itemUrl+"/relatedItems",{query:{...e,token:this.apiKey},...t},C)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}reload(){return this.portal._request(this.itemUrl,{cacheBust:!0,query:{token:this.apiKey}}).then((e=>(this.sourceJSON=e,this.read(e),this)))}update(e){return this.id?this.load().then((()=>this.portal._signIn())).then((()=>{const t=e&&e.data,r={method:"post"};r.query=this.createPostQuery();for(const e in r.query)null===r.query[e]&&(r.query[e]="");return r.query.clearEmptyFields=!0,null!=t&&("string"==typeof t?r.query.text=t:"object"==typeof t&&(r.query.text=JSON.stringify(t))),this.portal._request(`${this.userItemUrl}/update`,r).then((()=>this.reload()))})):Promise.reject(new n.Z("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}updateThumbnail(e){return this.id?this.load().then((()=>this.portal._signIn())).then((()=>{const t=e.thumbnail,r=e.filename,i={method:"post"};if("string"==typeof t)(0,h.HK)(t)?i.query={data:t}:i.query={url:(0,h.hF)(t)},(0,u.pC)(r)&&(i.query.filename=r);else{const e=new FormData;(0,u.pC)(r)?e.append("file",t,r):e.append("file",t),i.body=e}return this.portal._request(`${this.userItemUrl}/updateThumbnail`,i).then((()=>this.reload()))})):Promise.reject(new n.Z("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async fetchResources(e={},t){return(await r.e(7873).then(r.bind(r,97873))).fetchResources(this,e,t)}async addResource(e,t,i){const s=await r.e(7873).then(r.bind(r,97873));return e.portalItem=this,s.addOrUpdateResource(e,"add",t,i)}async removeResource(e,t){const i=await r.e(7873).then(r.bind(r,97873));if(e.portalItem&&e.portalItem.itemUrl!==this.itemUrl)throw new n.Z("removeresource:portal-item-mismatch","The portal item associated with the provided resource does not match the item");return i.removeResource(this,e,t)}async removeAllResources(e){return(await r.e(7873).then(r.bind(r,97873))).removeAllResources(this,e)}resourceFromPath(e){return new F({portalItem:this,path:e})}toJSON(){const e=this.extent,t={created:this.created&&this.created.getTime(),description:this.description,extent:e&&[[e.xmin,e.ymin],[e.xmax,e.ymax]],id:this.id,modified:this.modified&&this.modified.getTime(),name:this.name,owner:this.owner,ownerFolder:this.ownerFolder,snippet:this.snippet,tags:this.tags,thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:this.typeKeywords,url:this.url};return(0,l.yd)(t)}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new C({sourceJSON:e})}_getPostQuery(){const e=this.toJSON();for(const t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}};(0,i._)([(0,d.Cb)({type:["private","shared","org","public"]})],x.prototype,"access",void 0),(0,i._)([(0,d.Cb)()],x.prototype,"accessInformation",void 0),(0,i._)([(0,d.Cb)({type:String})],x.prototype,"apiKey",void 0),(0,i._)([(0,d.Cb)({json:{read:{source:"appProxies"}}})],x.prototype,"applicationProxies",void 0),(0,i._)([(0,d.Cb)()],x.prototype,"avgRating",void 0),(0,i._)([(0,d.Cb)()],x.prototype,"categories",void 0),(0,i._)([(0,d.Cb)({type:Date})],x.prototype,"created",void 0),(0,i._)([(0,d.Cb)()],x.prototype,"culture",void 0),(0,i._)([(0,d.Cb)()],x.prototype,"description",void 0),(0,i._)([(0,d.Cb)({readOnly:!0})],x.prototype,"displayName",null),(0,i._)([(0,d.Cb)({type:y.Z})],x.prototype,"extent",void 0),(0,i._)([(0,p.r)("extent")],x.prototype,"readExtent",null),(0,i._)([(0,d.Cb)()],x.prototype,"groupCategories",void 0),(0,i._)([(0,d.Cb)({readOnly:!0})],x.prototype,"iconUrl",null),(0,i._)([(0,d.Cb)()],x.prototype,"id",void 0),(0,i._)([(0,d.Cb)({readOnly:!0})],x.prototype,"isLayer",null),(0,i._)([(0,d.Cb)()],x.prototype,"itemControl",void 0),(0,i._)([(0,d.Cb)({readOnly:!0})],x.prototype,"itemUrl",null),(0,i._)([(0,d.Cb)()],x.prototype,"licenseInfo",void 0),(0,i._)([(0,d.Cb)({type:Date})],x.prototype,"modified",void 0),(0,i._)([(0,d.Cb)()],x.prototype,"name",void 0),(0,i._)([(0,d.Cb)()],x.prototype,"numComments",void 0),(0,i._)([(0,d.Cb)()],x.prototype,"numRatings",void 0),(0,i._)([(0,d.Cb)()],x.prototype,"numViews",void 0),(0,i._)([(0,d.Cb)()],x.prototype,"owner",void 0),(0,i._)([(0,d.Cb)()],x.prototype,"ownerFolder",void 0),(0,i._)([(0,d.Cb)({type:g.Z})],x.prototype,"portal",void 0),(0,i._)([(0,d.Cb)()],x.prototype,"screenshots",void 0),(0,i._)([(0,d.Cb)()],x.prototype,"size",void 0),(0,i._)([(0,d.Cb)()],x.prototype,"snippet",void 0),(0,i._)([(0,d.Cb)()],x.prototype,"sourceJSON",void 0),(0,i._)([(0,d.Cb)()],x.prototype,"tags",void 0),(0,i._)([(0,d.Cb)()],x.prototype,"thumbnail",void 0),(0,i._)([(0,d.Cb)({readOnly:!0})],x.prototype,"thumbnailUrl",null),(0,i._)([(0,d.Cb)()],x.prototype,"title",void 0),(0,i._)([(0,d.Cb)()],x.prototype,"type",void 0),(0,i._)([(0,d.Cb)()],x.prototype,"typeKeywords",void 0),(0,i._)([(0,d.Cb)()],x.prototype,"url",void 0),(0,i._)([(0,d.Cb)({readOnly:!0})],x.prototype,"userItemUrl",null),x=C=(0,i._)([(0,f.j)("esri.portal.PortalItem")],x);const D=x},28694:(e,t,r)=>{r.d(t,{p:()=>s});var i=r(50459);function s(e,t,r){if(!r||!r.features||!r.hasZ)return;const s=(0,i.k)(r.geometryType,t,e.outSpatialReference);if(s)for(const e of r.features)s(e.geometry)}},50459:(e,t,r)=>{r.d(t,{k:()=>a,P:()=>o});var i=r(70586),s=r(67900),n=r(8744);function a(e,t,r){if((0,i.Wi)(t)||(0,i.Wi)(r)||r.vcsWkid||(0,n.fS)(t,r))return null;const a=(0,s._R)(t)/(0,s._R)(r);if(1===a)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){e&&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);default:return null}}function l(e,t,r){if(null==e.hasM||e.hasZ)for(const e of t)for(const t of e)t.length>2&&(t[2]*=r)}function o(e,t,r){if(!e&&!t||!r)return;const i=(0,s._R)(r);u(e,r,i),u(t,r,i)}function u(e,t,r){if(e)for(const i of e)h(i.geometry,t,r)}function h(e,t,r){if((0,i.Wi)(e)||!e.spatialReference||(0,n.fS)(e.spatialReference,t))return;const a=(0,s._R)(e.spatialReference)/r;if(1!==a)if("x"in e)null!=e.z&&(e.z*=a);else if("rings"in e)l(e,e.rings,a);else if("paths"in e)l(e,e.paths,a);else if("points"in e&&(null==e.hasM||e.hasZ))for(const t of e.points)t.length>2&&(t[2]*=a)}},89749:(e,t,r)=>{r.d(t,{t:()=>p});var i=r(43697),s=r(15923),n=r(61247),a=r(70586),l=r(17445),o=r(90584),u=r(43050),h=r(67723),d=r(5600),c=r(52011);let p=class extends s.Z{constructor(){super(...arguments),this.updating=!1,this.handleId=0,this.handles=new n.Z,this.scheduleHandleId=0,this.pendingPromises=new Set}destroy(){this.removeAll(),this.handles.destroy()}add(e,t,r,i=0){const s=0!=(1&i),n=++this.handleId;s||this.installSyncUpdatingWatch(e,t,n);const a=0!=(2&i)?(0,u.S1)(e,t,r,s):e.watch(t,r,s);return this.handles.add(a,n),{remove:()=>this.handles.remove(n)}}addOnCollectionPropertyChange(e,t,r,i=0){const s=0!=(2&i),n=++this.handleId;return this.handles.add([(0,u.on)(e,t,"after-changes",this.createSyncUpdatingCallback()),(0,u.on)(e,t,"change",r,s?e=>{r({added:e.items,removed:[],moved:[],target:e})}:void 0)],n),{remove:()=>{this.handles.remove(n)}}}addOnCollectionChange(e,t,r=0){const i=0!=(2&r),s=++this.handleId;return this.handles.add([e.on("after-changes",this.createSyncUpdatingCallback()),e.on("change",t)],s),i&&t({added:e.items,removed:[],moved:[],target:e}),{remove:()=>{this.handles.remove(s)}}}addPromise(e){if((0,a.Wi)(e))return e;const t=++this.handleId;this.handles.add({remove:()=>{this.pendingPromises.delete(e)&&(0!==this.pendingPromises.size||this.handles.has(f)||this._set("updating",!1))}},t),this.pendingPromises.add(e),this._set("updating",!0);const r=()=>this.handles.remove(t);return e.then(r,r),e}removeAll(){this.pendingPromises.clear(),this.handles.removeAll(),this._set("updating",!1)}installSyncUpdatingWatch(e,t,r){const i=this.createSyncUpdatingCallback(),s=(0,l.Ym)((()=>(0,h.$z)(e,t)),i,{sync:!0,equals:()=>!1});return this.handles.add(s,r),s}createSyncUpdatingCallback(){return()=>{this.handles.remove(f),++this.scheduleHandleId;const e=this.scheduleHandleId;this._get("updating")||this._set("updating",!0),this.handles.add((0,o.Os)((()=>{e===this.scheduleHandleId&&(this._set("updating",this.pendingPromises.size>0),this.handles.remove(f))})),f)}}};(0,i._)([(0,d.Cb)({readOnly:!0})],p.prototype,"updating",void 0),p=(0,i._)([(0,c.j)("esri.views.support.WatchUpdatingTracking")],p);const f=-42}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5001],{25929:(e,t,r)=>{r.d(t,{f:()=>i,i:()=>d,p:()=>p,r:()=>o,t:()=>a,w:()=>l});var n=r(70586),s=r(17452);function i(e,t){const r=t&&t.url&&t.url.path;if(e&&r&&(e=(0,s.hF)(e,r,{preserveProtocolRelative:!0}),t.portalItem&&t.readResourcePaths)){const r=(0,s.PF)(e,t.portalItem.itemUrl);c.test(r)&&t.readResourcePaths.push(t.portalItem.resourceFromPath(r).path)}return h(e,t&&t.portal)}function a(e,t,r=0){if(!e)return e;!(0,s.YP)(e)&&t&&t.blockedRelativeUrls&&t.blockedRelativeUrls.push(e);let n=(0,s.hF)(e);if(t){const r=t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.rootPath||t.url&&t.url.path;if(r){const i=h(r,t.portal);n=(0,s.PF)(h(n,t.portal),i,i),n!==e&&t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.writtenUrls.push(n)}}return n=function(e,t){return t&&!t.isPortal&&t.urlKey&&t.customBaseUrl?(0,s.Ie)(e,`${t.urlKey}.${t.customBaseUrl}`,t.portalHostname):e}(n,t&&t.portal),(0,s.YP)(n)&&(n=(0,s.Fv)(n)),null!=t&&t.resources&&null!=t&&t.portalItem&&!(0,s.YP)(n)&&!(0,s.HK)(n)&&0===r&&t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(n)}),n}function o(e,t,r){return i(e,r)}function l(e,t,r,n){const s=a(e,n);void 0!==s&&(t[r]=s)}const u=/\/items\/([^\/]+)\/resources\//,c=/^\.\/resources\//;function d(e){const t=(0,n.pC)(e)?e.match(u):null;return(0,n.pC)(t)?t[1]:null}function h(e,t){if(!t||t.isPortal||!t.urlKey||!t.customBaseUrl)return e;const r=`${t.urlKey}.${t.customBaseUrl}`;return(0,s.D6)(s.Gd,`${s.Gd.scheme}://${r}`)?(0,s.Ie)(e,t.portalHostname,r):(0,s.Ie)(e,r,t.portalHostname)}const p=Object.freeze({__proto__:null,fromJSON:i,toJSON:a,read:o,write:l,itemIdFromResourceUrl:d})},17896:(e,t,r)=>{r.d(t,{E:()=>d,a:()=>h,b:()=>l,c:()=>g,d:()=>v,e:()=>_,f:()=>u,g:()=>a,h:()=>f,i:()=>p,k:()=>U,l:()=>i,m:()=>b,n:()=>y,p:()=>m,q:()=>S,r:()=>O,s:()=>o,t:()=>M,u:()=>B,w:()=>I});var n=r(65617),s=r(46851);function i(e){const t=e[0],r=e[1],n=e[2];return Math.sqrt(t*t+r*r+n*n)}function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function o(e,t,r,n){return e[0]=t,e[1]=r,e[2]=n,e}function l(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function u(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function c(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e}function d(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}function h(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function p(e,t){const r=t[0]-e[0],n=t[1]-e[1],s=t[2]-e[2];return Math.sqrt(r*r+n*n+s*s)}function f(e,t){const r=t[0]-e[0],n=t[1]-e[1],s=t[2]-e[2];return r*r+n*n+s*s}function m(e){const t=e[0],r=e[1],n=e[2];return t*t+r*r+n*n}function y(e,t){const r=t[0],n=t[1],s=t[2];let i=r*r+n*n+s*s;return i>0&&(i=1/Math.sqrt(i),e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i),e}function v(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function g(e,t,r){const n=t[0],s=t[1],i=t[2],a=r[0],o=r[1],l=r[2];return e[0]=s*l-i*o,e[1]=i*a-n*l,e[2]=n*o-s*a,e}function _(e,t,r,n){const s=t[0],i=t[1],a=t[2];return e[0]=s+n*(r[0]-s),e[1]=i+n*(r[1]-i),e[2]=a+n*(r[2]-a),e}function b(e,t,r){const n=t[0],s=t[1],i=t[2];return e[0]=r[0]*n+r[4]*s+r[8]*i+r[12],e[1]=r[1]*n+r[5]*s+r[9]*i+r[13],e[2]=r[2]*n+r[6]*s+r[10]*i+r[14],e}function M(e,t,r){const n=t[0],s=t[1],i=t[2];return e[0]=n*r[0]+s*r[3]+i*r[6],e[1]=n*r[1]+s*r[4]+i*r[7],e[2]=n*r[2]+s*r[5]+i*r[8],e}function S(e,t,r){const n=r[0],s=r[1],i=r[2],a=r[3],o=t[0],l=t[1],u=t[2];let c=s*u-i*l,d=i*o-n*u,h=n*l-s*o,p=s*h-i*d,f=i*c-n*h,m=n*d-s*c;const y=2*a;return c*=y,d*=y,h*=y,p*=2,f*=2,m*=2,e[0]=o+c+p,e[1]=l+d+f,e[2]=u+h+m,e}const w=(0,n.c)(),C=(0,n.c)();function U(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function O(e,t,r){const n=r[0]-t[0],s=r[1]-t[1],i=r[2]-t[2];let a=n*n+s*s+i*i;return a>0?(a=1/Math.sqrt(a),e[0]=n*a,e[1]=s*a,e[2]=i*a,e):(e[0]=0,e[1]=0,e[2]=0,e)}const I=u,T=c,x=d,q=p,R=f,B=i,j=m;Object.freeze({__proto__:null,length:i,copy:a,set:o,add:l,subtract:u,multiply:c,divide:d,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},min:function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e},max:function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},scale:h,scaleAndAdd:function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e},distance:p,squaredDistance:f,squaredLength:m,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e},normalize:y,dot:v,cross:g,lerp:_,hermite:function(e,t,r,n,s,i){const a=i*i,o=a*(2*i-3)+1,l=a*(i-2)+i,u=a*(i-1),c=a*(3-2*i);return e[0]=t[0]*o+r[0]*l+n[0]*u+s[0]*c,e[1]=t[1]*o+r[1]*l+n[1]*u+s[1]*c,e[2]=t[2]*o+r[2]*l+n[2]*u+s[2]*c,e},bezier:function(e,t,r,n,s,i){const a=1-i,o=a*a,l=i*i,u=o*a,c=3*i*o,d=3*l*a,h=l*i;return e[0]=t[0]*u+r[0]*c+n[0]*d+s[0]*h,e[1]=t[1]*u+r[1]*c+n[1]*d+s[1]*h,e[2]=t[2]*u+r[2]*c+n[2]*d+s[2]*h,e},random:function(e,t){t=t||1;const r=2*(0,s.R)()*Math.PI,n=2*(0,s.R)()-1,i=Math.sqrt(1-n*n)*t;return e[0]=Math.cos(r)*i,e[1]=Math.sin(r)*i,e[2]=n*t,e},transformMat4:b,transformMat3:M,transformQuat:S,rotateX:function(e,t,r,n){const s=[],i=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],i[0]=s[0],i[1]=s[1]*Math.cos(n)-s[2]*Math.sin(n),i[2]=s[1]*Math.sin(n)+s[2]*Math.cos(n),e[0]=i[0]+r[0],e[1]=i[1]+r[1],e[2]=i[2]+r[2],e},rotateY:function(e,t,r,n){const s=[],i=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],i[0]=s[2]*Math.sin(n)+s[0]*Math.cos(n),i[1]=s[1],i[2]=s[2]*Math.cos(n)-s[0]*Math.sin(n),e[0]=i[0]+r[0],e[1]=i[1]+r[1],e[2]=i[2]+r[2],e},rotateZ:function(e,t,r,n){const s=[],i=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],i[0]=s[0]*Math.cos(n)-s[1]*Math.sin(n),i[1]=s[0]*Math.sin(n)+s[1]*Math.cos(n),i[2]=s[2],e[0]=i[0]+r[0],e[1]=i[1]+r[1],e[2]=i[2]+r[2],e},angle:function(e,t){a(w,e),a(C,t),y(w,w),y(C,C);const r=v(w,C);return r>1?0:r<-1?Math.PI:Math.acos(r)},str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},exactEquals:U,equals:function(e,t){if(e===t)return!0;const r=e[0],n=e[1],i=e[2],a=t[0],o=t[1],l=t[2];return Math.abs(r-a)<=s.E*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(n-o)<=s.E*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-l)<=s.E*Math.max(1,Math.abs(i),Math.abs(l))},direction:O,sub:I,mul:T,div:x,dist:q,sqrDist:R,len:B,sqrLen:j})},98766:(e,t,r)=>{r.d(t,{a:()=>a,b:()=>c,c:()=>s,d:()=>y,e:()=>p,f:()=>f,g:()=>_,h:()=>b,l:()=>v,n:()=>m,s:()=>i,t:()=>g});var n=r(46851);function s(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function i(e,t,r,n,s){return e[0]=t,e[1]=r,e[2]=n,e[3]=s,e}function a(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function o(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function l(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function u(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}function c(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function d(e,t){const r=t[0]-e[0],n=t[1]-e[1],s=t[2]-e[2],i=t[3]-e[3];return Math.sqrt(r*r+n*n+s*s+i*i)}function h(e,t){const r=t[0]-e[0],n=t[1]-e[1],s=t[2]-e[2],i=t[3]-e[3];return r*r+n*n+s*s+i*i}function p(e){const t=e[0],r=e[1],n=e[2],s=e[3];return Math.sqrt(t*t+r*r+n*n+s*s)}function f(e){const t=e[0],r=e[1],n=e[2],s=e[3];return t*t+r*r+n*n+s*s}function m(e,t){const r=t[0],n=t[1],s=t[2],i=t[3];let a=r*r+n*n+s*s+i*i;return a>0&&(a=1/Math.sqrt(a),e[0]=r*a,e[1]=n*a,e[2]=s*a,e[3]=i*a),e}function y(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function v(e,t,r,n){const s=t[0],i=t[1],a=t[2],o=t[3];return e[0]=s+n*(r[0]-s),e[1]=i+n*(r[1]-i),e[2]=a+n*(r[2]-a),e[3]=o+n*(r[3]-o),e}function g(e,t,r){const n=t[0],s=t[1],i=t[2],a=t[3];return e[0]=r[0]*n+r[4]*s+r[8]*i+r[12]*a,e[1]=r[1]*n+r[5]*s+r[9]*i+r[13]*a,e[2]=r[2]*n+r[6]*s+r[10]*i+r[14]*a,e[3]=r[3]*n+r[7]*s+r[11]*i+r[15]*a,e}function _(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function b(e,t){const r=e[0],s=e[1],i=e[2],a=e[3],o=t[0],l=t[1],u=t[2],c=t[3];return Math.abs(r-o)<=n.E*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(s-l)<=n.E*Math.max(1,Math.abs(s),Math.abs(l))&&Math.abs(i-u)<=n.E*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(a-c)<=n.E*Math.max(1,Math.abs(a),Math.abs(c))}const M=o,S=l,w=u,C=d,U=h,O=p,I=f;Object.freeze({__proto__:null,copy:s,set:i,add:a,subtract:o,multiply:l,divide:u,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},min:function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e},max:function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e},scale:c,scaleAndAdd:function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e},distance:d,squaredDistance:h,length:p,squaredLength:f,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},normalize:m,dot:y,lerp:v,random:function(e,t){let r,s,i,a,o,l;t=t||1;do{r=2*(0,n.R)()-1,s=2*(0,n.R)()-1,o=r*r+s*s}while(o>=1);do{i=2*(0,n.R)()-1,a=2*(0,n.R)()-1,l=i*i+a*a}while(l>=1);const u=Math.sqrt((1-o)/l);return e[0]=t*r,e[1]=t*s,e[2]=t*i*u,e[3]=t*a*u,e},transformMat4:g,transformQuat:function(e,t,r){const n=t[0],s=t[1],i=t[2],a=r[0],o=r[1],l=r[2],u=r[3],c=u*n+o*i-l*s,d=u*s+l*n-a*i,h=u*i+a*s-o*n,p=-a*n-o*s-l*i;return e[0]=c*u+p*-a+d*-l-h*-o,e[1]=d*u+p*-o+h*-a-c*-l,e[2]=h*u+p*-l+c*-o-d*-a,e[3]=t[3],e},str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},exactEquals:_,equals:b,sub:M,mul:S,div:w,dist:C,sqrDist:U,len:O,sqrLen:I})},3920:(e,t,r)=>{r.d(t,{r:()=>c,p:()=>u});var n=r(43697),s=r(15923),i=r(61247),a=r(5600),o=r(52011),l=r(89749);const u=e=>{let t=class extends e{destroy(){this.destroyed||(this.handles.destroy(),this.updatingHandles.destroy())}get handles(){return this._get("handles")||new i.Z}get updatingHandles(){return this._get("updatingHandles")||new l.t}};return(0,n._)([(0,a.Cb)({readOnly:!0})],t.prototype,"handles",null),(0,n._)([(0,a.Cb)({readOnly:!0})],t.prototype,"updatingHandles",null),t=(0,n._)([(0,o.j)("esri.core.HandleOwner")],t),t};let c=class extends(u(s.Z)){};c=(0,n._)([(0,o.j)("esri.core.HandleOwner")],c)},61247:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(43697),s=r(15923),i=r(81049),a=r(70586),o=r(5600),l=r(52011);let u=class extends s.Z{constructor(e){super(e),this._groups=new Map}destroy(){this.removeAll()}get size(){let e=0;return this._groups.forEach((t=>{e+=t.length})),e}add(e,t){if(!this._isHandle(e)&&!Array.isArray(e)&&!i.Z.isCollection(e))return this;const r=this._getOrCreateGroup(t);return Array.isArray(e)||i.Z.isCollection(e)?e.forEach((e=>this._isHandle(e)&&r.push(e))):r.push(e),this.notifyChange("size"),this}forEach(e,t){if("function"==typeof e)this._groups.forEach((t=>t.forEach(e)));else{const r=this._getGroup(e);r&&t&&r.forEach(t)}}has(e){return this._groups.has(this._ensureGroupKey(e))}remove(e){if(Array.isArray(e)||i.Z.isCollection(e))return e.forEach(this.remove,this),this;if(!this.has(e))return this;const t=this._getGroup(e);for(let e=0;e<t.length;e++)t[e].remove();return this._deleteGroup(e),this.notifyChange("size"),this}removeAll(){return this._groups.forEach((e=>{for(let t=0;t<e.length;t++)e[t].remove()})),this._groups.clear(),this.notifyChange("size"),this}_isHandle(e){return e&&!!e.remove}_getOrCreateGroup(e){if(this.has(e))return this._getGroup(e);const t=[];return this._groups.set(this._ensureGroupKey(e),t),t}_getGroup(e){return(0,a.j0)(this._groups.get(this._ensureGroupKey(e)))}_deleteGroup(e){return this._groups.delete(this._ensureGroupKey(e))}_ensureGroupKey(e){return e||"_default_"}};(0,n._)([(0,o.Cb)({readOnly:!0})],u.prototype,"size",null),u=(0,n._)([(0,l.j)("esri.core.Handles")],u);const c=u},36030:(e,t,r)=>{r.d(t,{J:()=>i});var n=r(35454),s=r(5600);function i(e,t={}){var r;const i=e instanceof n.Xn?e:new n.Xn(e,t),a={type:null==(r=null==t?void 0:t.ignoreUnknown)||r?i.apiValues:String,readOnly:null==t?void 0:t.readOnly,json:{type:i.jsonValues,read:(null==t||!t.readOnly)&&{reader:i.read},write:{writer:i.write}}};return void 0!==(null==t?void 0:t.default)&&(a.json.default=t.default),void 0!==(null==t?void 0:t.name)&&(a.json.name=t.name),(0,s.Cb)(a)}},22021:(e,t,r)=>{r.d(t,{ZF:()=>d,Kt:()=>h,jE:()=>m,uZ:()=>a,oK:()=>p,Vl:()=>u,wt:()=>o,t7:()=>l,Sf:()=>i,BV:()=>c});var n=r(17896);r(98766);const s=new Float32Array(1);function i(e){--e;for(let t=1;t<32;t<<=1)e|=e>>t;return e+1}function a(e,t,r){return Math.min(Math.max(e,t),r)}function o(e){return 0==(e&e-1)}function l(e,t,r){return e+(t-e)*r}function u(e){return e*Math.PI/180}function c(e){return 180*e/Math.PI}function d(e){return Math.acos(a(e,-1,1))}function h(e){return Math.asin(a(e,-1,1))}function p(e){return f(Math.max(-y,Math.min(e,y)))}function f(e){return s[0]=e,s[0]}function m(e,t){const r=(0,n.l)(e),s=h(e[2]/r),i=Math.atan2(e[1]/r,e[0]/r);return(0,n.s)(t,r,s,i),t}const y=f(34028234663852886e22)},17445:(e,t,r)=>{r.d(t,{Ym:()=>i}),r(91460);var n=r(70586),s=r(26258);function i(e,t,r={}){return function(e,t,r={},i){let a=null;const o=r.once?(e,r)=>{i(e)&&((0,n.hw)(a),t(e,r))}:(e,r)=>{i(e)&&t(e,r)};if(a=(0,s.aQ)(e,o,r.sync,r.equals),r.initial){const t=e();o(t,t)}return a}(e,t,r,a)}function a(e){return!0}r(87538)},67900:(e,t,r)=>{r.d(t,{gV:()=>E,En:()=>w,Z7:()=>x,c9:()=>T,_R:()=>O,qE:()=>B,cM:()=>I,hd:()=>c,ty:()=>C,Jo:()=>G,$C:()=>U}),r(80442);var n=r(35454),s=r(70586),i=r(24678),a=r(82971),o=r(68441),l=r(8744),u=r(58116);const c=39.37,d=o.sv.radius*Math.PI/200,h=/UNIT\[([^\]]+)\]\]$/i,p=u.Z,f=/UNIT\[([^\]]+)\]/i,m=new Set([4261,4305,4807,4810,4811,4812,4816,4819,4821,4901,4902,37225,104139,104140]),y=(0,n.wY)()({meter:"meters",foot:"feet",foot_us:"us-feet",foot_clarke:"clarke-feet",yard_clarke:"clarke-yards",link_clarke:"clarke-links",yard_sears:"sears-yards",foot_sears:"sears-feet",chain_sears:"sears-chains",chain_benoit_1895_b:"benoit-1895-b-chains",yard_indian:"indian-yards",yard_indian_1937:"indian-1937-yards",foot_gold_coast:"gold-coast-feet",chain_sears_1922_truncated:"sears-1922-truncated-chains","50_kilometers":"50-kilometers","150_kilometers":"150-kilometers"}),v=e=>e*e,g=e=>e*e*e,_={length:{baseUnit:"meters",units:{millimeters:{inBaseUnits:.001},centimeters:{inBaseUnits:.01},decimeters:{inBaseUnits:.1},meters:{inBaseUnits:1},kilometers:{inBaseUnits:1e3},inches:{inBaseUnits:.0254},feet:{inBaseUnits:.3048},yards:{inBaseUnits:.9144},miles:{inBaseUnits:1609.344},"nautical-miles":{inBaseUnits:1852},"us-feet":{inBaseUnits:1200/3937}}},area:{baseUnit:"square-meters",units:{"square-millimeters":{inBaseUnits:v(.001)},"square-centimeters":{inBaseUnits:v(.01)},"square-decimeters":{inBaseUnits:v(.1)},"square-meters":{inBaseUnits:1},"square-kilometers":{inBaseUnits:v(1e3)},"square-inches":{inBaseUnits:v(.0254)},"square-feet":{inBaseUnits:v(.3048)},"square-yards":{inBaseUnits:v(.9144)},"square-miles":{inBaseUnits:v(1609.344)},"square-us-feet":{inBaseUnits:v(1200/3937)},acres:{inBaseUnits:.0015625*v(1609.344)},ares:{inBaseUnits:100},hectares:{inBaseUnits:1e4}}},volume:{baseUnit:"liters",units:{liters:{inBaseUnits:1},"cubic-millimeters":{inBaseUnits:1e3*g(.001)},"cubic-centimeters":{inBaseUnits:1e3*g(.01)},"cubic-decimeters":{inBaseUnits:1e3*g(.1)},"cubic-meters":{inBaseUnits:1e3},"cubic-kilometers":{inBaseUnits:1e3*g(1e3)},"cubic-inches":{inBaseUnits:1e3*g(.0254)},"cubic-feet":{inBaseUnits:1e3*g(.3048)},"cubic-yards":{inBaseUnits:1e3*g(.9144)},"cubic-miles":{inBaseUnits:1e3*g(1609.344)}}},angle:{baseUnit:"radians",units:{radians:{inBaseUnits:1},degrees:{inBaseUnits:Math.PI/180}}}},b=function(){const e={};for(const t in _)for(const r in _[t].units)e[r]=t;return e}();function M(e){const t=b[e];if(t)return t;throw new Error("unknown measure")}function S(e,t=null){return t=t||M(e),_[t].baseUnit===e}function w(e,t,r){if(t===r)return e;const n=M(t);if(n!==M(r))throw new Error("incompatible units");const s=S(t,n)?e:function(e,t,r){return e*_[r].units[t].inBaseUnits}(e,t,n);return S(r,n)?s:function(e,t,r){return e/_[r].units[t].inBaseUnits}(s,r,n)}function C(e,t,r){return w(e,t,"meters")/(r*Math.PI/180)}function U(e){return y.fromJSON(e.toLowerCase())||null}function O(e){if(e&&"object"==typeof e&&!(0,l.N$)(e))return 1;const t=T(e);return t>1e5?1:t}function I(e){return T(e)>=(e instanceof a.Z?(0,i.Iu)(e).metersPerDegree:1e5)?"meters":B(e)}function T(e,t=o.sv.metersPerDegree){return x(e,!0)||t}function x(e,t=!1){let r,n,s=null;if(null!=e&&("object"==typeof e?(r=e.wkid,n=e.wkt):"number"==typeof e?r=e:"string"==typeof e&&(n=e)),r){if((0,l.o$)(r))return o.yr.metersPerDegree;if((0,l.ME)(r))return o.Z1.metersPerDegree;s=p.values[p[r]],!s&&t&&m.has(r)&&(s=d)}else n&&(P(n)?s=q(h.exec(n),s):j(n)&&(s=q(f.exec(n),s)));return s}function q(e,t){return e&&e[1]?R(e[1]):t}function R(e){return parseFloat(e.split(",")[1])}function B(e){let t,r,n=null;if(null!=e&&("object"==typeof e?(t=e.wkid,r=e.wkt):"number"==typeof e?t=e:"string"==typeof e&&(r=e)),t)n=p.units[p[t]];else if(r){const e=P(r)?h:j(r)?f:null;if(e){const t=e.exec(r);t&&t[1]&&(n=function(e){const t=/[\\"\\']{1}([^\\"\\']+)/.exec(e);let r=t&&t[1];if(!r||-1===p.units.indexOf(r)){const t=R(e);r=null;const n=p.values;for(let e=0;e<n.length;++e)if(Math.abs(t-n[e])<1e-7){r=p.units[e];break}}return r}(t[1]))}}return(0,s.pC)(n)?U(n):null}function j(e){return/^GEOCCS/i.test(e)}function P(e){return/^PROJCS/i.test(e)}const k={esriAcres:"acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-feet",esriSquareInches:"square-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-miles",esriSquareMillimeters:"square-millimeters",esriSquareUsFeet:"square-us-feet",esriSquareYards:"square-yards"},A={esriCentimeters:"centimeters",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriYards:"yards"},E=(0,n.wY)()(k),G=(0,n.wY)()(A);(0,n.wY)()({...k,...A})},43050:(e,t,r)=>{r.d(t,{S1:()=>a,on:()=>d,OY:()=>c,cm:()=>l,N1:()=>o,LR:()=>u,tH:()=>h});var n=r(91460),s=(r(22974),r(95330));const i=/\?(\.|$)/g;function a(e,t,r,n){const s=Array.isArray(t)?t:t.indexOf(",")>-1?t.split(","):[t],a=function(e,t,r,n){return e.watch(t,r,n)}(e,t,r,n);for(const t of s){const n=t.trim().replace(i,"$1"),s=e.get(n);r.call(e,s,s,n,e)}return a}function o(e,t,r,n){return h(e,t,p,r,n)}function l(e,t,r,n){return h(e,t,f,r,n)}function u(e,t,r,n){return h(e,t,m,r,n)}function c(e,t,r,n){return h(e,t,y,r,n)}function d(e,t,r,s,i,o,l){const u={};function c(t){const n=u[t];n&&(o&&o(n.target,t,e,r),n.handle.remove(),delete u[t])}const d=a(e,t,((t,a,o)=>{c(o),(0,n.vT)(t)&&(u[o]={handle:(0,n.on)(t,r,s),target:t},i&&i(t,o,e,r))}),l);return{remove(){d.remove();for(const e in u)c(e)}}}function h(e,t,r,n,i){const a="function"==typeof n?n:null,o="object"==typeof n?n:null;"boolean"==typeof n&&(i=n);let l,u=!1;function c(){l&&(l.remove(),l=null)}const d=(0,s.dD)();(0,s.fu)(o,(()=>{c(),d.reject((0,s.zE)())}));const h={then:d.promise.then.bind(d.promise),catch:d.promise.catch.bind(d.promise),remove:c};return Object.freeze(h),l=function(e,t,r,n,s){const i=e.watch(t,((t,s,i,a)=>{r&&!r(t)||null==n||n.call(e,t,s,i,a)}),s);if(Array.isArray(t))for(const s of t){const i=e.get(s);r&&r(i)&&(null==n||n.call(e,i,i,t,e))}else{const s=e.get(t);r&&r(s)&&(null==n||n.call(e,s,s,t,e))}return i}(e,t,r,((t,r,n,s)=>{u=!0,c(),a&&a.call(e,t,r,n,s),d.resolve({value:t,oldValue:r,propertyName:n,target:s})}),i),u&&c(),h}function p(e){return!!e}function f(e){return!e}function m(e){return!0===e}function y(e){return!1===e}},24678:(e,t,r)=>{r.d(t,{GG:()=>o,HQ:()=>l,VY:()=>u,wY:()=>c,Iu:()=>p,e8:()=>f,rS:()=>h,N_:()=>d});var n=r(82971),s=r(68441),i=r(8744);function a(e){return new n.Z({wkt:`GEOCCS["Spherical geocentric",\n DATUM["Not specified",\n SPHEROID["Sphere",${e.radius},0]],\n PRIMEM["Greenwich",0.0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",EAST],\n AXIS["Geocentric Z",NORTH]\n ]`})}const o=a(s.sv),l=a(s.yr),u=a(s.Z1),c=new n.Z({wkt:`GEOCCS["WGS 84",\n DATUM["WGS_1984",\n SPHEROID["WGS 84",${s.sv.radius},298.257223563,\n AUTHORITY["EPSG","7030"]],\n AUTHORITY["EPSG","6326"]],\n PRIMEM["Greenwich",0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0,\n AUTHORITY["EPSG","9001"]],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",OTHER],\n AXIS["Geocentric Z",NORTH],\n AUTHORITY["EPSG","4978"]\n]`});function d(e){return e&&e===s.yr?l:e&&e===s.Z1?u:o}function h(e){return e&&((0,i.BZ)(e)||e===l)?l:e&&((0,i.V2)(e)||e===u)?u:o}function p(e){return e&&((0,i.BZ)(e)||e===l)?s.yr:e&&((0,i.V2)(e)||e===u)?s.Z1:s.sv}function f(e){return(0,i.o$)(e)?s.yr:(0,i.ME)(e)?s.Z1:s.sv}},24470:(e,t,r)=>{r.d(t,{Gv:()=>h,SO:()=>u,r3:()=>d,Ue:()=>i,oJ:()=>o,al:()=>a,kK:()=>c,HH:()=>l}),r(80442),r(22021);var n=r(70586),s=r(6570);function i(e=p){return[e[0],e[1],e[2],e[3]]}function a(e,t,r,n,s=i()){return s[0]=e,s[1]=t,s[2]=r,s[3]=n,s}function o(e,t=i()){return t[0]=e.xmin,t[1]=e.ymin,t[2]=e.xmax,t[3]=e.ymax,t}function l(e,t){return new s.Z({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:t})}function u(e){return function(e){return(0,n.Wi)(e)||e[0]>=e[2]?0:e[2]-e[0]}(e)*function(e){return e[1]>=e[3]?0:e[3]-e[1]}(e)}function c(e,t){return Math.max(t[0],e[0])<=Math.min(t[2],e[2])&&Math.max(t[1],e[1])<=Math.min(t[3],e[3])}function d(e,t){return t[0]>=e[0]&&t[2]<=e[2]&&t[1]>=e[1]&&t[3]<=e[3]}const h=[1/0,1/0,-1/0,-1/0],p=[0,0,0,0]},98636:(e,t,r)=>{r.r(t),r.d(t,{default:()=>P});var n=r(43697),s=(r(66577),r(3172)),i=r(20102),a=r(3920),o=r(70586),l=r(16453),u=r(95330),c=r(17452),d=r(5600),h=(r(67676),r(80442),r(90578)),p=r(71715),f=r(52011),m=r(30556),y=r(29600),v=r(54295),g=r(46486),_=r(7944),b=r(17287),M=r(41522),S=r(17017),w=r(38009),C=r(16859),U=r(34760),O=r(72965),I=r(10343),T=r(66677),x=r(21506),q=r(49867),R=r(82971);const B=["Canvas/World_Dark_Gray_Base","Canvas/World_Dark_Gray_Reference","Canvas/World_Light_Gray_Base","Canvas/World_Light_Gray_Reference","Elevation/World_Hillshade","Elevation/World_Hillshade_Dark","Ocean/World_Ocean_Base","Ocean/World_Ocean_Reference","Ocean_Basemap","Reference/World_Boundaries_and_Places","Reference/World_Boundaries_and_Places_Alternate","Reference/World_Transportation","World_Imagery","World_Street_Map","World_Topo_Map"];let j=class extends((0,M.h)((0,I.x)((0,O.M)((0,w.q)((0,C.I)((0,g.Z)((0,_.O)((0,b.Y)((0,l.R)((0,a.p)((0,U.Q)((0,v.V)((0,S.N)(y.Z)))))))))))))){constructor(...e){super(...e),this.listMode="show",this.isReference=null,this.operationalLayerType="ArcGISTiledMapServiceLayer",this.resampling=!0,this.sourceJSON=null,this.spatialReference=null,this.path=null,this.sublayers=null,this.type="tile",this.url=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=(0,o.pC)(e)?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Map Service"]},e).catch(u.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}get attributionDataUrl(){var e;const t=null==(e=this.parsedUrl)?void 0:e.path.toLowerCase();return t&&this._getDefaultAttribution(this._getMapName(t))}readSpatialReference(e,t){return(e=e||t.tileInfo&&t.tileInfo.spatialReference)&&R.Z.fromJSON(e)}writeSublayers(e,t,r,n){if(!this.loaded||!e)return;const s=e.slice().reverse().flatten((({sublayers:e})=>e&&e.toArray().reverse())).toArray(),i=[],a={writeSublayerStructure:!1,...n};s.forEach((e=>{const t=e.write({},a);i.push(t)})),i.some((e=>Object.keys(e).length>1))&&(t.layers=i)}get tileServers(){return this._getDefaultTileServers(this.parsedUrl.path)}castTileServers(e){return Array.isArray(e)?e.map((e=>(0,c.mN)(e).path)):null}fetchTile(e,t,r,n={}){const{signal:i}=n,a=this.getTileUrl(e,t,r),o={responseType:"image",signal:i,query:{...this.refreshParameters}};return(0,s.default)(a,o).then((e=>e.data))}getTileUrl(e,t,r){const n=!this.tilemapCache&&this.supportsBlankTile,s=(0,c.B7)({...this.parsedUrl.query,blankTile:!n&&null,...this.customParameters,token:this.apiKey}),i=this.tileServers;return`${i&&i.length?i[t%i.length]:this.parsedUrl.path}/tile/${e}/${t}/${r}${s?"?"+s:""}`}_fetchService(e){return new Promise(((t,r)=>{if(this.sourceJSON){if(null!=this.sourceJSON.bandCount&&null!=this.sourceJSON.pixelSizeX)throw new i.Z("tile-layer:unsupported-url","use ImageryTileLayer to open a tiled image service");return void t({data:this.sourceJSON})}if(!this.parsedUrl)throw new i.Z("tile-layer:undefined-url","layer's url is not defined");const n=(0,T.Qc)(this.parsedUrl.path);if((0,o.pC)(n)&&"ImageServer"===n.serverType)throw new i.Z("tile-layer:unsupported-url","use ImageryTileLayer to open a tiled image service");(0,s.default)(this.parsedUrl.path,{query:{f:"json",...this.parsedUrl.query,...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then(t,r)})).then((t=>{if(t.ssl&&(this.url=this.url.replace(/^http:/i,"https:")),this.sourceJSON=t.data,this.read(t.data,{origin:"service",url:this.parsedUrl}),10.1===this.version&&!(0,T.M8)(this.url))return this._fetchServerVersion(this.url,e).then((e=>{this.read({currentVersion:e})})).catch((()=>{}))}))}_fetchServerVersion(e,t){if(!(0,T.B5)(e))return Promise.reject();const r=e.replace(/(.*\/rest)\/.*/i,"$1")+"/info";return(0,s.default)(r,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:t}).then((e=>{if(e.data&&e.data.currentVersion)return e.data.currentVersion;throw new i.Z("tile-layer:version-not-available")}))}_getMapName(e){const t=e.match(/^(?:https?:)?\/\/(server\.arcgisonline\.com|services\.arcgisonline\.com|ibasemaps-api\.arcgis\.com)\/arcgis\/rest\/services\/([^\/]+(\/[^\/]+)*)\/mapserver/i);return t&&t[2]}_getDefaultAttribution(e){if(!e)return;let t;e=e.toLowerCase();for(let r=0,n=B.length;r<n;r++)if(t=B[r],t.toLowerCase().indexOf(e)>-1)return(0,c.hF)("//static.arcgis.com/attribution/"+t)}_getDefaultTileServers(e){const t=-1!==e.search(/^(?:https?:)?\/\/server\.arcgisonline\.com/i),r=-1!==e.search(/^(?:https?:)?\/\/services\.arcgisonline\.com/i);return t||r?[e,e.replace(t?/server\.arcgisonline/i:/services\.arcgisonline/i,t?"services.arcgisonline":"server.arcgisonline")]:[]}get hasOverriddenFetchTile(){return!this.fetchTile.__isDefault__}};(0,n._)([(0,d.Cb)({readOnly:!0})],j.prototype,"attributionDataUrl",null),(0,n._)([(0,d.Cb)({type:["show","hide","hide-children"]})],j.prototype,"listMode",void 0),(0,n._)([(0,d.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],j.prototype,"isReference",void 0),(0,n._)([(0,d.Cb)({readOnly:!0,type:["ArcGISTiledMapServiceLayer"]})],j.prototype,"operationalLayerType",void 0),(0,n._)([(0,d.Cb)({type:Boolean})],j.prototype,"resampling",void 0),(0,n._)([(0,d.Cb)()],j.prototype,"sourceJSON",void 0),(0,n._)([(0,d.Cb)({type:R.Z})],j.prototype,"spatialReference",void 0),(0,n._)([(0,p.r)("spatialReference",["spatialReference","tileInfo"])],j.prototype,"readSpatialReference",null),(0,n._)([(0,d.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],j.prototype,"path",void 0),(0,n._)([(0,d.Cb)({readOnly:!0})],j.prototype,"sublayers",void 0),(0,n._)([(0,m.c)("sublayers",{layers:{type:[q.Z]}})],j.prototype,"writeSublayers",null),(0,n._)([(0,d.Cb)({json:{read:!1,write:!1}})],j.prototype,"popupEnabled",void 0),(0,n._)([(0,d.Cb)()],j.prototype,"tileServers",null),(0,n._)([(0,h.p)("tileServers")],j.prototype,"castTileServers",null),(0,n._)([(0,d.Cb)({readOnly:!0,json:{read:!1}})],j.prototype,"type",void 0),(0,n._)([(0,d.Cb)(x.HQ)],j.prototype,"url",void 0),j=(0,n._)([(0,f.j)("esri.layers.TileLayer")],j),j.prototype.fetchTile.__isDefault__=!0;const P=j},46486:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(43697),s=(r(66577),r(5600)),i=(r(67676),r(80442),r(75215),r(71715)),a=r(52011),o=r(45322),l=r(56608),u=r(82971);const c=e=>{let t=class extends e{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,t){return t.capabilities&&t.capabilities.indexOf("Tilemap")>-1?new l.y({layer:this}):null}};return(0,n._)([(0,s.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,n._)([(0,s.Cb)()],t.prototype,"minScale",void 0),(0,n._)([(0,i.r)("service","minScale")],t.prototype,"readMinScale",null),(0,n._)([(0,s.Cb)()],t.prototype,"maxScale",void 0),(0,n._)([(0,i.r)("service","maxScale")],t.prototype,"readMaxScale",null),(0,n._)([(0,s.Cb)({type:u.Z})],t.prototype,"spatialReference",void 0),(0,n._)([(0,s.Cb)({readOnly:!0})],t.prototype,"supportsBlankTile",null),(0,n._)([(0,s.Cb)(o.h)],t.prototype,"tileInfo",void 0),(0,n._)([(0,s.Cb)()],t.prototype,"tilemapCache",void 0),(0,n._)([(0,i.r)("service","tilemapCache",["capabilities"])],t.prototype,"readTilemapCache",null),(0,n._)([(0,s.Cb)()],t.prototype,"version",void 0),t=(0,n._)([(0,a.j)("esri.layers.mixins.ArcGISCachedService")],t),t}},1231:(e,t,r)=>{r.d(t,{Z:()=>y});var n,s=r(43697),i=r(35454),a=r(10736),o=r(5600),l=(r(67676),r(80442),r(75215)),u=r(36030),c=r(71715),d=r(52011),h=r(72729),p=r(86719);const f=new i.Xn({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let m=n=class extends a.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=-1,this.name=null,this.nullable=!0,this.type=null,this.valueType=null}readDescription(e,{description:t}){let r;try{r=JSON.parse(t)}catch(e){}return r?r.value:null}readValueType(e,{description:t}){let r;try{r=JSON.parse(t)}catch(e){}return r?f.fromJSON(r.fieldValueType):null}clone(){return new n({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType})}};(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,s._)([(0,o.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,s._)([(0,o.Cb)()],m.prototype,"description",void 0),(0,s._)([(0,c.r)("description")],m.prototype,"readDescription",null),(0,s._)([(0,o.Cb)({types:h.V5,json:{read:{reader:h.im},write:!0}})],m.prototype,"domain",void 0),(0,s._)([(0,o.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,s._)([(0,o.Cb)({type:l.z8,json:{write:!0}})],m.prototype,"length",void 0),(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,s._)([(0,o.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,s._)([(0,u.J)(p.v)],m.prototype,"type",void 0),(0,s._)([(0,o.Cb)()],m.prototype,"valueType",void 0),(0,s._)([(0,c.r)("valueType",["description"])],m.prototype,"readValueType",null),m=n=(0,s._)([(0,d.j)("esri.layers.support.Field")],m);const y=m},66677:(e,t,r)=>{r.d(t,{ld:()=>f,B5:()=>d,M8:()=>y,G:()=>b,Qc:()=>h,DR:()=>p,Nm:()=>v,XG:()=>g,a7:()=>m,wH:()=>_});var n=r(70586),s=r(17452),i=r(25929);const a={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},o=Object.values(a),l=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),c=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function d(e){return!!l.test(e)}function h(e){const t=(0,s.mN)(e),r=t.path.match(l)||t.path.match(u);if(!r)return null;const[,n,i,o,c]=r,d=i.indexOf("/");return{title:f(-1!==d?i.slice(d+1):i),serverType:a[o.toLowerCase()],sublayer:null!=c&&""!==c?parseInt(c,10):null,url:{path:n}}}function p(e){const t=(0,s.mN)(e).path.match(c);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function f(e){return(e=e.replace(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function m(e,t){const r=[];if(e){const t=h(e);(0,n.pC)(t)&&t.title&&r.push(t.title)}if(t){const e=f(t);r.push(e)}if(2===r.length){if(-1!==r[0].toLowerCase().indexOf(r[1].toLowerCase()))return r[0];if(-1!==r[1].toLowerCase().indexOf(r[0].toLowerCase()))return r[1]}return r.join(" - ")}function y(e){if(!e)return!1;const t=-1!==(e=e.toLowerCase()).indexOf(".arcgis.com/"),r=-1!==e.indexOf("//services")||-1!==e.indexOf("//tiles")||-1!==e.indexOf("//features");return t&&r}function v(e,t){return e?(0,s.Qj)((0,s.Hu)(e,t)):e}function g(e){let{url:t}=e;if(!t)return{url:t};t=(0,s.Hu)(t,e.logger);const r=(0,s.mN)(t),i=h(r.path);let a;if((0,n.pC)(i))null!=i.sublayer&&null==e.layer.layerId&&(a=i.sublayer),t=i.url.path;else if(e.nonStandardUrlAllowed){const e=p(r.path);(0,n.pC)(e)&&(t=e.serviceUrl,a=e.sublayerId)}return{url:(0,s.Qj)(t),layerId:a}}function _(e,t,r,n,a){(0,i.w)(t,n,"url",a),n.url&&null!=e.layerId&&(n.url=(0,s.v_)(n.url,r,e.layerId.toString()))}function b(e){if(!e)return!1;const t=e.toLowerCase(),r=-1!==t.indexOf("/services/"),n=-1!==t.indexOf("/mapserver/wmsserver"),s=-1!==t.indexOf("/imageserver/wmsserver"),i=-1!==t.indexOf("/wmsserver");return r&&(n||s||i)}},72729:(e,t,r)=>{r.d(t,{im:()=>U,V5:()=>C}),r(80442);var n,s=r(43697),i=r(22974),a=r(5600),o=(r(75215),r(36030)),l=r(52011),u=r(10736);r(67676);let c=n=class extends u.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new n({name:this.name,code:this.code})}};(0,s._)([(0,a.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,s._)([(0,a.Cb)({type:[String,Number],json:{write:!0}})],c.prototype,"code",void 0),c=n=(0,s._)([(0,l.j)("esri.layers.support.CodedValue")],c);const d=c,h=new(r(35454).Xn)({inherited:"inherited",codedValue:"coded-value",range:"range"});let p=class extends u.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,s._)([(0,a.Cb)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,s._)([(0,o.J)(h)],p.prototype,"type",void 0),p=(0,s._)([(0,l.j)("esri.layers.support.Domain")],p);const f=p;var m;let y=m=class extends f{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new m({codedValues:(0,i.d9)(this.codedValues),name:this.name})}};(0,s._)([(0,a.Cb)({type:[d],json:{write:!0}})],y.prototype,"codedValues",void 0),(0,s._)([(0,o.J)({codedValue:"coded-value"})],y.prototype,"type",void 0),y=m=(0,s._)([(0,l.j)("esri.layers.support.CodedValueDomain")],y);const v=y;var g;r(92604),r(37697);let _=g=class extends f{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,s._)([(0,o.J)({inherited:"inherited"})],_.prototype,"type",void 0),_=g=(0,s._)([(0,l.j)("esri.layers.support.InheritedDomain")],_);const b=_;var M;let S=M=class extends f{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new M({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,s._)([(0,a.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],S.prototype,"maxValue",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],S.prototype,"minValue",void 0),(0,s._)([(0,o.J)({range:"range"})],S.prototype,"type",void 0),S=M=(0,s._)([(0,l.j)("esri.layers.support.RangeDomain")],S);const w=S,C={key:"type",base:f,typeMap:{range:S,"coded-value":v,inherited:b}};function U(e){if(!e||!e.type)return null;switch(e.type){case"range":return w.fromJSON(e);case"codedValue":return v.fromJSON(e);case"inherited":return b.fromJSON(e)}return null}},86719:(e,t,r)=>{r.d(t,{v:()=>n});const n=new(r(35454).Xn)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml"})},89749:(e,t,r)=>{r.d(t,{t:()=>p});var n=r(43697),s=r(15923),i=r(61247),a=r(70586),o=r(17445),l=r(90584),u=r(43050),c=r(67723),d=r(5600),h=r(52011);let p=class extends s.Z{constructor(){super(...arguments),this.updating=!1,this.handleId=0,this.handles=new i.Z,this.scheduleHandleId=0,this.pendingPromises=new Set}destroy(){this.removeAll(),this.handles.destroy()}add(e,t,r,n=0){const s=0!=(1&n),i=++this.handleId;s||this.installSyncUpdatingWatch(e,t,i);const a=0!=(2&n)?(0,u.S1)(e,t,r,s):e.watch(t,r,s);return this.handles.add(a,i),{remove:()=>this.handles.remove(i)}}addOnCollectionPropertyChange(e,t,r,n=0){const s=0!=(2&n),i=++this.handleId;return this.handles.add([(0,u.on)(e,t,"after-changes",this.createSyncUpdatingCallback()),(0,u.on)(e,t,"change",r,s?e=>{r({added:e.items,removed:[],moved:[],target:e})}:void 0)],i),{remove:()=>{this.handles.remove(i)}}}addOnCollectionChange(e,t,r=0){const n=0!=(2&r),s=++this.handleId;return this.handles.add([e.on("after-changes",this.createSyncUpdatingCallback()),e.on("change",t)],s),n&&t({added:e.items,removed:[],moved:[],target:e}),{remove:()=>{this.handles.remove(s)}}}addPromise(e){if((0,a.Wi)(e))return e;const t=++this.handleId;this.handles.add({remove:()=>{this.pendingPromises.delete(e)&&(0!==this.pendingPromises.size||this.handles.has(f)||this._set("updating",!1))}},t),this.pendingPromises.add(e),this._set("updating",!0);const r=()=>this.handles.remove(t);return e.then(r,r),e}removeAll(){this.pendingPromises.clear(),this.handles.removeAll(),this._set("updating",!1)}installSyncUpdatingWatch(e,t,r){const n=this.createSyncUpdatingCallback(),s=(0,o.Ym)((()=>(0,c.$z)(e,t)),n,{sync:!0,equals:()=>!1});return this.handles.add(s,r),s}createSyncUpdatingCallback(){return()=>{this.handles.remove(f),++this.scheduleHandleId;const e=this.scheduleHandleId;this._get("updating")||this._set("updating",!0),this.handles.add((0,l.Os)((()=>{e===this.scheduleHandleId&&(this._set("updating",this.pendingPromises.size>0),this.handles.remove(f))})),f)}}};(0,n._)([(0,d.Cb)({readOnly:!0})],p.prototype,"updating",void 0),p=(0,n._)([(0,h.j)("esri.views.support.WatchUpdatingTracking")],p);const f=-42},410:(e,t,r)=>{function n(e){var t;const r=e.layer;return"floorInfo"in r&&null!=(t=r.floorInfo)&&t.floorField&&"floors"in e.view?a(e.view.floors,r.floorInfo.floorField):null}function s(e,t){var r;return"floorInfo"in t&&null!=(r=t.floorInfo)&&r.floorField?a(e,t.floorInfo.floorField):null}function i(e,t){const{definitionExpression:r}=t;return e?r?`(${r}) AND (${e})`:e:r}function a(e,t){if(null==e||!e.length)return null;const r=e.filter((e=>""!==e)).map((e=>`'${e}'`));return r.push("''"),`${t} IN (${r.join(",")}) OR ${t} IS NULL`}r.d(t,{Hp:()=>i,cx:()=>n,ff:()=>s})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1938],{91460:(e,t,n)=>{function r(e){return e&&("function"==typeof e.on||"function"==typeof e.addEventListener)}function i(e,t,n){if(!r(e))throw new TypeError("target is not a Evented or EventTarget object");if("on"in e)return e.on(t,n);if(Array.isArray(t)){const r=t.slice();for(const t of r)e.addEventListener(t,n);return{remove(){for(const t of r)e.removeEventListener(t,n)}}}return e.addEventListener(t,n),{remove(){e.removeEventListener(t,n)}}}function l(e,t,n){if(!r(e))throw new TypeError("target is not a Evented or EventTarget object");if("once"in e)return e.once(t,n);const l=i(e,t,(t=>{l.remove(),n.call(e,t)}));return{remove(){l.remove()}}}n.d(t,{vT:()=>r,on:()=>i,IH:()=>l})},95330:(e,t,n)=>{n.d(t,{e4:()=>T,$6:()=>c,Ue:()=>u,zE:()=>h,dD:()=>$,hh:()=>j,vr:()=>L,Ds:()=>U,as:()=>x,WW:()=>O,R8:()=>_,D_:()=>b,Hc:()=>d,tI:()=>P,y8:()=>A,fu:()=>v,$F:()=>g,d1:()=>I,DB:()=>C,r9:()=>m,k_:()=>f,H9:()=>y,gx:()=>q,Hl:()=>w});var r=n(16358);const i=(l=r.Z,{setTimeout:(e,t)=>{const n=l.setTimeout(e,t);return{remove:()=>l.clearTimeout(n)}}});var l,o=n(20102),s=n(91460),a=(n(92604),n(70586));function c(e){return Promise.all(e)}function u(e){return new Promise(((t,n)=>{try{e(t,n)}catch(e){Promise.resolve().then((()=>n(e)))}}))}function h(e="Aborted"){return new o.Z("AbortError",e)}function f(e,t="Aborted"){if(d(e))throw h(t)}function p(e){return(0,a.pC)(e)?"aborted"in e?e:e.signal:e}function d(e){const t=p(e);return(0,a.pC)(t)&&t.aborted}function m(e){if(b(e))throw e}function y(e){if(!b(e))throw e}function v(e,t){const n=p(e);if(!(0,a.Wi)(n)){if(!n.aborted)return(0,s.IH)(n,"abort",(()=>t()));t()}}function g(e,t){const n=p(e);if(!(0,a.Wi)(n))return f(n),(0,s.IH)(n,"abort",(()=>t(h())))}function w(e,t){const n=p(t);return(0,a.Wi)(n)?e:new Promise(((n,r)=>{let i=v(t,(()=>r(h())));const l=()=>i=(0,a.hw)(i);e.then(l,l),e.then(n,r)}))}function b(e){return e&&"AbortError"===e.name}function _(e){return e.catch((e=>{if(!b(e))throw e}))}function $(){let e=null;const t=new Promise(((t,n)=>{e={promise:void 0,resolve:t,reject:n}}));return e.promise=t,e}function x(e){if(!e)return;if("function"!=typeof e.forEach){const t=Object.keys(e);return x(t.map((t=>e[t]))).then((e=>{const n={};return t.forEach(((t,r)=>n[t]=e[r])),n}))}const t=e;return u((e=>{const n=[];let r=t.length;0===r&&e(n),t.forEach((t=>{const i={promise:t||Promise.resolve(t)};n.push(i),i.promise.then((e=>{i.value=e})).catch((e=>{i.error=e})).then((()=>{--r,0===r&&e(n)}))}))}))}function O(e){return x(e).then((e=>e.filter((e=>!!e.value)).map((e=>e.value))))}function I(e){return Promise.reject(e)}function C(e){return Promise.resolve(e)}function T(e,t,n){const r=new AbortController;return v(n,(()=>r.abort())),new Promise(((n,i)=>{let l=setTimeout((()=>{l=0,n(t)}),e);v(r,(()=>{l&&(clearTimeout(l),i(h()))}))}))}function A(e){return e&&"function"==typeof e.then}function q(e){return P(e)?e:Promise.resolve(e)}function P(e){return e&&"object"==typeof e&&"then"in e&&"function"==typeof e.then}function U(e,t=-1){let n,r,i,l,o=null;const s=(...c)=>{if(n){r=c,l&&l.reject(h()),l=$();const e=(0,a.j0)(l.promise);if(o){const e=o;o=null,e.abort()}return e}if(i=l||$(),l=null,t>0){const r=new AbortController;n=q(e(...c,r.signal));const i=n;T(t).then((()=>{n===i&&(l?r.abort():o=r)}))}else n=1,n=q(e(...c));const u=()=>{const e=r;r=i=n=o=null,null!=e&&s(...e)},f=n,p=i;return f.then(u,u),f.then(p.resolve,p.reject),(0,a.j0)(p.promise)};return s}function j(){let e,t;const n=new Promise(((n,r)=>{e=n,t=r})),r=t=>{e(t)};return r.resolve=t=>e(t),r.reject=e=>t(e),r.timeout=(e,t)=>i.setTimeout((()=>r.reject(t)),e),r.promise=n,r}function L(e){let t=new AbortController;const n=e(t.signal);let r={promise:n,finished:!1,abort:()=>{t&&(t.abort(),t=null)}};const i=()=>{r&&(r.finished=!0,r=null),t=null};return n.then(i,i),r}},17452:(e,t,n)=>{n.d(t,{R9:()=>g,qg:()=>T,tD:()=>U,ZN:()=>ce,fl:()=>ue,AX:()=>_,Gd:()=>w,Ie:()=>oe,sJ:()=>Y,AH:()=>M,vt:()=>ie,oh:()=>E,P$:()=>J,Ml:()=>he,ed:()=>j,b7:()=>C,D6:()=>D,tm:()=>L,YP:()=>F,jc:()=>B,HK:()=>W,$U:()=>V,oC:()=>K,kl:()=>Z,v_:()=>H,hF:()=>k,_l:()=>G,PF:()=>z,Fv:()=>N,B7:()=>I,u0:()=>x,Yd:()=>re,Hu:()=>ae,Qj:()=>le,hO:()=>ee,mN:()=>$});var r=n(68773),i=n(20102),l=(n(16358),n(92604)),o=n(70586);const s=l.Z.getLogger("esri.core.urlUtils"),a=r.Z.request,c="esri/config: esriConfig.request.proxyUrl is not set.",u=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,h=/^\s*http:/i,f=/^\s*https:/i,p=/^\s*file:/i,d=/:\d+$/,m=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i,y=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),v=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");class g{constructor(e=""){this.uri=e,this.scheme=null,this.authority=null,this.path=null,this.query=null,this.fragment=null,this.user=null,this.password=null,this.host=null,this.port=null;let t=(0,o.j0)(this.uri.match(y));this.scheme=t[2]||(t[1]?"":null),this.authority=t[4]||(t[3]?"":null),this.path=t[5],this.query=t[7]||(t[6]?"":null),this.fragment=t[9]||(t[8]?"":null),null!=this.authority&&(t=(0,o.j0)(this.authority.match(v)),this.user=t[3]||null,this.password=t[4]||null,this.host=t[6]||t[7],this.port=t[9]||null)}toString(){return this.uri}}const w=new g(r.Z.applicationUrl),b={},_=(()=>{const e=(0,o.j0)(w.path),t=e.substring(0,e.lastIndexOf(e.split("/")[e.split("/").length-1]));return`${w.scheme}://${w.host}${null!=w.port?`:${w.port}`:""}${t}`})();function $(e){const t={path:null,query:null},n=new g(e),r=e.indexOf("?");return null===n.query?t.path=e:(t.path=e.substring(0,r),t.query=x(n.query)),n.fragment&&(t.hash=n.fragment,null===n.query&&(t.path=t.path.substring(0,t.path.length-(n.fragment.length+1)))),t}function x(e){const t=e.split("&"),n={};for(const e of t){if(!e)continue;const t=e.indexOf("=");let r,i;t<0?(r=decodeURIComponent(e),i=""):(r=decodeURIComponent(e.slice(0,t)),i=decodeURIComponent(e.slice(t+1)));let l=n[r];"string"==typeof l&&(l=n[r]=[l]),Array.isArray(l)?l.push(i):n[r]=i}return n}function O(e){return e&&"object"==typeof e&&"toJSON"in e&&"function"==typeof e.toJSON}function I(e,t){return e?t&&"function"==typeof t?Object.keys(e).map((n=>encodeURIComponent(n)+"="+encodeURIComponent(t(n,e[n])))).join("&"):Object.keys(e).map((n=>{const r=e[n];if(null==r)return"";const i=encodeURIComponent(n)+"=",l=t&&t[n];return l?i+encodeURIComponent(l(r)):Array.isArray(r)?r.map((e=>O(e)?i+encodeURIComponent(JSON.stringify(e)):i+encodeURIComponent(e))).join("&"):O(r)?i+encodeURIComponent(JSON.stringify(r)):i+encodeURIComponent(r)})).filter((e=>e)).join("&"):""}function C(e=!1){let t,n=a.proxyUrl;if("string"==typeof e){t=V(e);const r=j(e);r&&(n=r.proxyUrl)}else t=!!e;if(!n)throw s.warn(c),new i.Z("urlutils:proxy-not-set",c);return t&&te()&&(n=ee(n)),$(n)}function T(e){const t=j(e);let n,r;if(t){const e=q(t.proxyUrl);n=e.path,r=e.query?x(e.query):null}if(n){const t=$(e);e=n+"?"+t.path;const i=I({...r,...t.query});i&&(e=`${e}?${i}`)}return e}const A={path:"",query:""};function q(e){const t=e.indexOf("?");return-1!==t?(A.path=e.slice(0,t),A.query=e.slice(t+1)):(A.path=e,A.query=null),A}function P(e){return(e=ne(e=function(e){return e&&"/"===e[e.length-1]?e:`${e}/`}(e=q(e).path),!0)).toLowerCase()}function U(e){const t={proxyUrl:e.proxyUrl,urlPrefix:P(e.urlPrefix)},n=a.proxyRules,r=t.urlPrefix;let i=n.length;for(let e=0;e<n.length;e++){const t=n[e].urlPrefix;if(0===r.indexOf(t)){if(r.length===t.length)return-1;i=e;break}0===t.indexOf(r)&&(i=e+1)}return n.splice(i,0,t),i}function j(e){const t=a.proxyRules,n=P(e);for(let e=0;e<t.length;e++)if(0===n.indexOf(t[e].urlPrefix))return t[e]}function L(e,t){return e=S(e),t=S(t),ne(e)===ne(t)}function S(e){const t=(e=N(e)).indexOf("/sharing");return t>0?e.substring(0,t):e.replace(/\/+$/,"")}function E(e){const t=t=>null==t||t instanceof RegExp&&t.test(e)||"string"==typeof t&&e.startsWith(t),n=a.interceptors;if(n)for(const e of n)if(Array.isArray(e.urls)){if(e.urls.some(t))return e}else if(t(e.urls))return e;return null}function D(e,t,n=!1){const r=se(e),i=se(t);return!(!n&&r.scheme!==i.scheme)&&null!=r.host&&null!=i.host&&r.host.toLowerCase()===i.host.toLowerCase()&&r.port===i.port}function Z(e){if("string"==typeof e){if(!F(e))return!0;e=se(e)}if(D(e,w))return!0;const t=a.trustedServers||[];for(let n=0;n<t.length;n++){const r=R(t[n]);for(let t=0;t<r.length;t++)if(D(e,r[t]))return!0}return!1}function R(e){return b[e]||(X(e)||K(e)?b[e]=[new g(k(e))]:b[e]=[new g(`http://${e}`),new g(`https://${e}`)]),b[e]}function k(e,t=_,n){return K(e)?n&&n.preserveProtocolRelative?e:"http"===w.scheme&&w.authority===J(e).slice(2)?`http:${e}`:`https:${e}`:X(e)?e:(0,o.j0)(H("/"===e[0]?function(e){const t=e.indexOf("//"),n=e.indexOf("/",t+2);return-1===n?e:e.slice(0,n)}(t):t,e))}function z(e,t=_,n){if(!F(e))return e;const r=N(e),i=r.toLowerCase(),l=N(t).toLowerCase().replace(/\/+$/,""),o=n?N(n).toLowerCase().replace(/\/+$/,""):null;if(o&&0!==l.indexOf(o))return e;const s=(e,t,n)=>-1===(n=e.indexOf(t,n))?e.length:n;let a=s(i,"/",i.indexOf("//")+2),c=-1;for(;i.slice(0,a+1)===l.slice(0,a)+"/"&&(c=a+1,a!==i.length);)a=s(i,"/",a+1);if(-1===c)return e;if(o&&c<o.length)return e;e=r.slice(c);const u=l.slice(c-1).replace(/[^/]+/g,"").length;if(u>0)for(let t=0;t<u;t++)e=`../${e}`;else e=`./${e}`;return e}function N(e){return function(e){const t=a.httpsDomains;if(!function(e){return h.test(e)||"http"===w.scheme&&K(e)}(e))return e;const n=e.indexOf("/",7);let r;if(r=-1===n?e:e.slice(0,n),r=r.toLowerCase().slice(7),d.test(r)){if(!r.endsWith(":80"))return e;r=r.slice(0,-3),e=e.replace(":80","")}return"http"===w.scheme&&r===w.authority&&!m.test(e)||(te()&&r===w.authority||t&&t.some((e=>r===e||r.endsWith(`.${e}`)))||te()&&!j(e))&&(e=ee(e)),e}(e=function(e){return e.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")}(e=function(e){if(/^https?:\/\//i.test(e)){const t=q(e);e=(e=t.path.replace(/\/{2,}/g,"/")).replace("/","//"),t.query&&(e+=`?${t.query}`)}return e}(e=k(e=e.trim()))))}function H(...e){const t=e.filter(o.pC);if(!t||!t.length)return;const n=[];if(F(t[0])){const e=t[0],r=e.indexOf("//");-1!==r&&(n.push(e.slice(0,r+1)),function(e){return p.test(e)}(t[0])&&(n[0]+="/"),t[0]=e.slice(r+2))}else"/"===t[0][0]&&n.push("");const r=t.reduce(((e,t)=>t?e.concat(t.split("/")):e),[]);for(let e=0;e<r.length;e++){const t=r[e];".."===t&&n.length>0&&".."!==n[n.length-1]?n.pop():(!t&&e===r.length-1||t&&("."!==t||0===n.length))&&n.push(t)}return n.join("/")}function J(e,t=!1){if(B(e)||W(e))return null;let n=e.indexOf("://");if(-1===n&&K(e))n=2;else{if(-1===n)return null;n+=3}const r=e.indexOf("/",n);return-1!==r&&(e=e.slice(0,r)),t&&(e=ne(e,!0)),e}function F(e){return K(e)||X(e)}function B(e){return null!=e&&"blob:"===e.slice(0,5)}function W(e){return"data:"===e.slice(0,5)}function M(e){const t=Y(e);if(!t||!t.isBase64)return null;const n=atob(t.data),r=new Uint8Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);return r.buffer}const Q=/^data:(.*?)(;base64)?,(.*)$/;function Y(e){const t=e.match(Q);if(!t)return null;const[,n,r,i]=t;return{mediaType:n,isBase64:!!r,data:i}}function G(e){return e.isBase64?`data:${e.mediaType};base64,${e.data}`:`data:${e.mediaType},${e.data}`}function K(e){return null!=e&&void 0!==e&&"/"===e[0]&&"/"===e[1]}function X(e){return u.test(e)}function V(e){return f.test(e)||"https"===w.scheme&&K(e)}function ee(e){return K(e)?`https:${e}`:e.replace(h,"https:")}function te(){return"https"===w.scheme}function ne(e,t=!1){return K(e)?e.slice(2):(e=e.replace(u,""),t&&e.length>1&&"/"===e[0]&&"/"===e[1]&&(e=e.slice(2)),e)}function re(e){let t=0;if(F(e)){const n=e.indexOf("//");-1!==n&&(t=n+2)}const n=e.lastIndexOf("/");return n<t?e:e.slice(0,n+1)}function ie(e,t){if(!e)return"";const n=$(e).path.replace(/\/+$/,""),r=n.substring(n.lastIndexOf("/")+1);if(null==t||!t.length)return r;const i=new RegExp(`.(${t.join("|")})$`,"ig");return r.replace(i,"")}function le(e){return e.replace(/\/+$/,"")}function oe(e,t,n){if(!(t&&n&&e&&F(e)))return e;const r=e.indexOf("//"),i=e.indexOf("/",r+2),l=e.indexOf(":",r+2),o=Math.min(i<0?e.length:i,l<0?e.length:l);return e.slice(r+2,o).toLowerCase()!==t.toLowerCase()?e:`${e.slice(0,r+2)}${n}${e.slice(o)}`}function se(e){return"string"==typeof e?new g(k(e)):(e.scheme||(e.scheme=w.scheme),e)}function ae(e,t){const n=$(e),r=Object.keys(n.query||{});return r.length>0&&t&&t.warn("removeQueryParameters()",`Url query parameters are not supported, the following parameters have been removed: ${r.join(", ")}.`),n.path}function ce(e,t,n){const r=$(e),i=r.query||{};return i[t]=String(n),`${r.path}?${I(i)}`}function ue(e,t){const n=$(e),r=n.query||{};for(const e in t)r[e]=t[e];const i=I(r);return i?`${n.path}?${i}`:n.path}function he(e){if((0,o.Wi)(e))return null;const t=e.match(fe);return t?t[1]:null}const fe=/.*?\.([^\/]*)$/},40330:(e,t,n)=>{n.d(t,{Dp:()=>c,id:()=>s,qh:()=>a,i8:()=>l,Nv:()=>o});var r=n(80442),i=n(17452);const l="4.22",o={async request(e,t){var r;const{default:l}=await n.e(3172).then(n.bind(n,3172)),o=e.options,s=o.responseType;o.signal=null==t?void 0:t.signal,o.responseType="native"===s||"native-request-init"===s?"native-request-init":["blob","json","text"].includes(s)&&null!=(r=(0,i.oh)(e.url))&&r.after?s:"array-buffer";const a=await l(e.url,o),c={data:a.data,ssl:a.ssl};switch(a.requestOptions.responseType){case"native-request-init":return delete c.data.signal,c;case"blob":c.data=await c.data.arrayBuffer();break;case"json":c.data=(new TextEncoder).encode(JSON.stringify(c.data)).buffer;break;case"text":c.data=(new TextEncoder).encode(c.data).buffer}return{result:c,transferList:[c.data]}}};let s;function a(e){s=e}function c(e){const t=s&&s.findCredential(e);return t&&t.token?(0,i.ZN)(e,"token",t.token):e}(0,r.Z)("host-webworker")||((0,r.Z)("edge")||(0,r.Z)("trident"))&&console.warn("Deprecated browser - see http://esriurl.com/oldbrowser")},16859:(e,t,n)=>{n.d(t,{I:()=>b});var r=n(43697),i=n(40330),l=n(3172),o=n(66643),s=n(20102),a=n(92604),c=n(70586),u=n(95330),h=n(17452),f=n(5600),p=(n(67676),n(80442),n(75215),n(71715)),d=n(52011),m=n(30556),y=n(65587),v=n(15235),g=n(86082);const w=a.Z.getLogger("esri.layers.mixins.PortalLayer"),b=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0}destroy(){var e;null==(e=this.portalItem)||e.destroy(),this.portalItem=null}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,n){if(t.itemId)return new v.default({id:t.itemId,portal:n&&n.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const r=await n.e(8062).then(n.bind(n,18062));return(0,u.k_)(t),await r.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData},t)}catch(e){throw(0,u.D_)(e)||w.warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this.fetchUserHasEditingPrivileges(e).catch((e=>((0,u.r9)(e),!0))))}async fetchUserHasEditingPrivileges(e){const t=this.url?null==i.id?void 0:i.id.findCredential(this.url):null;if(!t)return!0;const n=_.credential===t?_.user:await this.fetchEditingUser(e);return _.credential=t,_.user=n,(0,c.Wi)(n)||null==n.privileges||n.privileges.includes("features:user:edit")}async fetchEditingUser(e){var t,n;const r=null==(t=this.portalItem)||null==(n=t.portal)?void 0:n.user;if(r)return r;const s=i.id.findServerInfo(this.url);if(null==s||!s.owningSystemUrl)return null;const a=`${s.owningSystemUrl}/sharing/rest`,u=y.Z.getDefault();if(u&&u.loaded&&(0,h.Fv)(u.restUrl)===(0,h.Fv)(a))return u.user;const f=`${a}/community/self`,p=(0,c.pC)(e)?e.signal:null,d=await(0,o.q6)((0,l.default)(f,{authMode:"no-prompt",query:{f:"json"},signal:p}));return d.ok?g.default.fromJSON(d.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const n=t&&t.portal,r=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||y.Z.getDefault());return n&&r&&!(0,h.tm)(r.restUrl,n.restUrl)?(t.messages&&t.messages.push(new s.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save the scene, set the layer.portalItem to null or save the scene to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,f.Cb)({type:v.default})],t.prototype,"portalItem",null),(0,r._)([(0,p.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,m.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,f.Cb)()],t.prototype,"resourceReferences",void 0),(0,r._)([(0,f.Cb)({readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),t=(0,r._)([(0,d.j)("esri.layers.mixins.PortalLayer")],t),t},_={credential:null,user:null}},56608:(e,t,n)=>{n.d(t,{y:()=>O});var r,i=n(43697),l=n(3172),o=n(15923),s=n(20102),a=n(61247),c=n(92604),u=n(13867),h=n(44553),f=n(95330),p=n(90584),d=n(17452),m=n(43050),y=n(5600),v=n(67676),g=(n(80442),n(90578)),w=n(52011),b=n(22974);class _{constructor(){this.location={left:0,top:0,width:0,height:0},this._allAvailability="unknown",this.byteSize=40}getAvailability(e,t){if("unknown"!==this._allAvailability)return this._allAvailability;const n=(e-this.location.top)*this.location.width+(t-this.location.left),r=n%8,i=n>>3,l=this._tileAvailabilityBitSet;return i<0||i>l.length?"unknown":l[i]&1<<r?"available":"unavailable"}_updateFromData(e){const t=this.location.width,n=this.location.height;let r=!0,i=!0;const l=Math.ceil(t*n/8),o=new Uint8Array(l);let s=0;for(let t=0;t<e.length;t++){const n=t%8;e[t]?(i=!1,o[s]|=1<<n):r=!1,7===n&&++s}i?this._allAvailability="unavailable":r?this._allAvailability="available":(this._allAvailability="unknown",this._tileAvailabilityBitSet=o,this.byteSize+=o.length)}static fromDefinition(e,t){const n=e.service.request||l.default,{row:r,col:i,width:o,height:a}=e,c={query:{f:"json"}};return t=t?{...c,...t}:c,n(function(e){let t;if("vector-tile"===e.service.type)t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;else{const n=e.service.tileServers;t=`${n&&n.length?n[e.row%n.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}const n=e.service.query;return n&&(t=`${t}?${n}`),t}(e),t).then((e=>e.data)).catch((e=>{if(e&&e.details&&422===e.details.httpStatus)return{location:{top:r,left:i,width:o,height:a},valid:!0,data:(0,v.a9)(o*a,0)};throw e})).then((e=>{if(e.location&&(e.location.top!==r||e.location.left!==i||e.location.width!==o||e.location.height!==a))throw new s.Z("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:r,left:i,width:o,height:a}});return _.fromJSON(e)}))}static fromJSON(e){_.validateJSON(e);const t=new _;return t.location=Object.freeze((0,b.d9)(e.location)),t._updateFromData(e.data),Object.freeze(t)}static validateJSON(e){if(!e||!e.location)throw new s.Z("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new s.Z("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new s.Z("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new s.Z("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new s.Z("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}}function $(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}const x=c.Z.getLogger("esri.layers.support.TilemapCache");let O=r=class extends o.Z{constructor(e){super(e),this._handles=new a.Z,this._pendingTilemapRequests={},this._availableLevels={},this.levels=5,this.cacheByteSize=2097152,this.request=l.default,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new u.Z(this.cacheByteSize),this._handles.add([this.watch(["layer.parsedUrl","layer.tileServers?"],(()=>this._initializeTilemapDefinition())),(0,m.S1)(this,"layer.tileInfo.lods",(e=>this._initializeAvailableLevels(e)),!0)]),this._initializeTilemapDefinition()}destroy(){this._handles&&(this._handles.destroy(),this._handles=null)}castLevels(e){return e<=2?(x.error("Minimum levels for Tilemap is 3, but got ",e),3):e}get size(){return 1<<this.levels}fetchTilemap(e,t,n,r){if(!this._availableLevels[e])return Promise.reject(new s.Z("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const i=this._tmpTilemapDefinition,l=this._tilemapFromCache(e,t,n,i);if(l)return Promise.resolve(l);const o=r&&r.signal;return r={...r,signal:null},new Promise(((e,t)=>{(0,f.fu)(o,(()=>t((0,f.zE)())));const n=$(i);let l=this._pendingTilemapRequests[n];if(!l){l=_.fromDefinition(i,r).then((e=>(this._tilemapCache.put(n,e,e.byteSize),e)));const e=()=>delete this._pendingTilemapRequests[n];this._pendingTilemapRequests[n]=l,l.then(e,e)}l.then(e,t)}))}getAvailability(e,t,n){if(!this._availableLevels[e])return"unavailable";const r=this._tilemapFromCache(e,t,n,this._tmpTilemapDefinition);return r?r.getAvailability(t,n):"unknown"}getAvailabilityUpsample(e,t,n,r){r.level=e,r.row=t,r.col=n;const i=this.layer.tileInfo;for(i.updateTileInfo(r);;){const e=this.getAvailability(r.level,r.row,r.col);if("unavailable"!==e)return e;if(!i.upsampleTile(r))return"unavailable"}}fetchAvailability(e,t,n,r){return this._availableLevels[e]?this.fetchTilemap(e,t,n,r).catch((e=>e)).then((r=>{if(r instanceof _){const i=r.getAvailability(t,n);return"unavailable"===i?Promise.reject(new s.Z("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:n})):i}if((0,f.D_)(r))throw r;return"unknown"})):Promise.reject(new s.Z("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`))}fetchAvailabilityUpsample(e,t,n,r,i){r.level=e,r.row=t,r.col=n;const l=this.layer.tileInfo;l.updateTileInfo(r);const o=this.fetchAvailability(e,t,n,i).catch((e=>{if((0,f.D_)(e))throw e;if(l.upsampleTile(r))return this.fetchAvailabilityUpsample(r.level,r.row,r.col,r);throw e}));return this._fetchAvailabilityUpsamplePrefetch(r.id,e,t,n,i,o),o}async _fetchAvailabilityUpsamplePrefetch(e,t,n,i,l,o){if(!this._prefetchingEnabled)return;const s=`prefetch-${e}`;if(this._handles.has(s))return;const a=new AbortController;o.then((()=>a.abort()),(()=>a.abort()));let c=!1;const u={remove(){c||(c=!0,a.abort())}};if(this._handles.add(u,s),await(0,p.MU)(10,a.signal).catch((()=>{})),c||(c=!0,this._handles.remove(s)),(0,f.Hc)(a))return;const h={id:e,level:t,row:n,col:i},d={...l,signal:a.signal},m=this.layer.tileInfo;for(let e=0;r._prefetches.length<r._maxPrefetch&&m.upsampleTile(h);++e){const e=this.fetchAvailability(h.level,h.row,h.col,d);r._prefetches.push(e);const t=()=>{r._prefetches.removeUnordered(e)};e.then(t,t)}}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const e=this.layer.parsedUrl,t=e.query;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:t?(0,d.B7)(t):null,tileServers:this.layer.tileServers,request:this.request,type:this.layer.type},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,n,r){r.level=e,r.row=t-t%this.size,r.col=n-n%this.size;const i=$(r);return this._tilemapCache.get(i)}_initializeAvailableLevels(e){this._availableLevels={},e&&e.forEach((e=>this._availableLevels[e.level]=!0))}get test(){const e=this;return{get prefetchingEnabled(){return e._prefetchingEnabled},set prefetchingEnabled(t){e._prefetchingEnabled=t},hasTilemap:(t,n,r)=>!!e._tilemapFromCache(t,n,r,e._tmpTilemapDefinition)}}};O._maxPrefetch=4,O._prefetches=new h.Z({initialSize:r._maxPrefetch}),(0,i._)([(0,y.Cb)({constructOnly:!0,type:Number})],O.prototype,"levels",void 0),(0,i._)([(0,g.p)("levels")],O.prototype,"castLevels",null),(0,i._)([(0,y.Cb)({readOnly:!0,type:Number})],O.prototype,"size",null),(0,i._)([(0,y.Cb)({constructOnly:!0,type:Number})],O.prototype,"cacheByteSize",void 0),(0,i._)([(0,y.Cb)({constructOnly:!0})],O.prototype,"layer",void 0),(0,i._)([(0,y.Cb)({constructOnly:!0})],O.prototype,"request",void 0),O=r=(0,i._)([(0,w.j)("esri.layers.support.TilemapCache")],O)},45322:(e,t,n)=>{n.d(t,{d:()=>l,h:()=>i});var r=n(11145);const i={type:r.Z,json:{origins:{service:{read:{source:["tileInfo","minScale","maxScale","minLOD","maxLOD"],reader:l}}}}};function l(e,t,n,i){if(!e)return null;const{minScale:l,maxScale:o,minLOD:s,maxLOD:a}=t;if(null!=s&&null!=a)return i&&i.ignoreMinMaxLOD?r.Z.fromJSON(e):r.Z.fromJSON({...e,lods:e.lods.filter((({level:e})=>null!=e&&e>=s&&e<=a))});if(0!==l&&0!==o){const t=e=>Math.round(1e4*e)/1e4,n=l?t(l):1/0,i=o?t(o):-1/0;return r.Z.fromJSON({...e,lods:e.lods.filter((e=>{const r=t(e.scale);return r<=n&&r>=i}))})}return r.Z.fromJSON(e)}}}]);
|