@arcgis/core 4.28.0-next.20230720 → 4.28.0-next.20230721
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/Color.js +1 -1
- package/analysis/AreaMeasurementAnalysis.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/featureSetUtils.js +1 -1
- package/arcade/featureset/actions/Top.js +1 -1
- package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
- package/arcade/featureset/support/FeatureSet.js +1 -1
- package/arcade/featureset/support/FeatureSetIterator.js +1 -1
- package/arcade/functions/convertdirection.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/arcade/functions/geomasync.js +1 -1
- package/arcade/functions/geomsync.js +1 -1
- package/arcade/lib/comment-handler.js +1 -1
- package/arcade/lib/parser.js +1 -1
- package/arcade/lib/scanner.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{75c28da8d0b02d612d69.js → 040b3fc9c9c0736dd893.js} +1 -1
- package/assets/esri/core/workers/chunks/0652f6a8d5221e978033.js +1 -0
- package/assets/esri/core/workers/chunks/{c13b332afdb3f6be1ec9.js → 092fda62b6f62c2e4869.js} +1 -1
- package/assets/esri/core/workers/chunks/{57e0ad037188bd2997e7.js → 0af18a96cbd4e2d35436.js} +1 -1
- package/assets/esri/core/workers/chunks/0b5eeec0f66c87a46a0c.js +1 -0
- package/assets/esri/core/workers/chunks/{68e568b67b6fb34393db.js → 0cad2b991d0d0fd07846.js} +1 -1
- package/assets/esri/core/workers/chunks/0dccbc6c2559fdc0c2ad.js +1 -0
- package/assets/esri/core/workers/chunks/256a82f6f6e1405fbcc6.js +1 -0
- package/assets/esri/core/workers/chunks/{bb9213899049e1db90da.js → 2c57c9bd71637c5bed8a.js} +1 -1
- package/assets/esri/core/workers/chunks/2cdbabcbfe32286ec78d.js +1 -0
- package/assets/esri/core/workers/chunks/{2b1c83453a862e01954b.js → 2d9d80b2d0042a9c09fb.js} +1 -1
- package/assets/esri/core/workers/chunks/2f9aec2238ff6cb99e09.js +1 -0
- package/assets/esri/core/workers/chunks/{7dbd3e6406fb3e3a1a8f.js → 3cf748c025f3936c1cb2.js} +1 -1
- package/assets/esri/core/workers/chunks/4481d1103363434f16da.js +1 -0
- package/assets/esri/core/workers/chunks/5ae325e6a795c72eac6c.js +1 -0
- package/assets/esri/core/workers/chunks/5e4dde2886a1027b4b96.js +1 -0
- package/assets/esri/core/workers/chunks/730eb7e5f617fdab4f10.js +1 -0
- package/assets/esri/core/workers/chunks/{5a2e6bed9431cf4f42b1.js → 740dc67038f554431f1b.js} +1 -1
- package/assets/esri/core/workers/chunks/{09178454bda15bb7929a.js → 7fbdfd1527582c52f9b6.js} +1 -1
- package/assets/esri/core/workers/chunks/{1c026947505a9ff94a53.js → 807742f38885fa90b4fe.js} +1 -1
- package/assets/esri/core/workers/chunks/82dfbc175b52c7a10475.js +1 -0
- package/assets/esri/core/workers/chunks/870a05451e074b58f19a.js +1 -0
- package/assets/esri/core/workers/chunks/8c5a8c1dfb086069bb06.js +1 -0
- package/assets/esri/core/workers/chunks/99a5a434e0bad48c7a5c.js +1 -0
- package/assets/esri/core/workers/chunks/9a5916c66dad91d01d5b.js +1 -0
- package/assets/esri/core/workers/chunks/9c133fd8c1fbd0295b86.js +1 -0
- package/assets/esri/core/workers/chunks/9cddb504079d396779ea.js +1 -0
- package/assets/esri/core/workers/chunks/a3a1d4f32e518e97d071.js +1 -0
- package/assets/esri/core/workers/chunks/{9548aa449fe3a300c015.js → a4fa40dc77e116c954ac.js} +1 -1
- package/assets/esri/core/workers/chunks/a54ec9929a7db879d5db.js +1 -0
- package/assets/esri/core/workers/chunks/afc5b84693757fda2bc8.js +1 -0
- package/assets/esri/core/workers/chunks/{591b5c277cfd3a4101a4.js → b08f2a4aa94087c6c367.js} +1 -1
- package/assets/esri/core/workers/chunks/c0e12f6a7bb2360e4c21.js +1 -0
- package/assets/esri/core/workers/chunks/c8e656cd470a17f538e9.js +1 -0
- package/assets/esri/core/workers/chunks/d0e203405f95e14b1399.js +1 -0
- package/assets/esri/core/workers/chunks/{ec72f492f24e67e008ae.js → d8e58dc14d3495f0830c.js} +1 -1
- package/assets/esri/core/workers/chunks/ddc393a012588f799f42.js +1 -0
- package/assets/esri/core/workers/chunks/de3baa85b1639c25458d.js +1 -0
- package/assets/esri/core/workers/chunks/e66cea26064ba8353af0.js +1 -0
- package/assets/esri/core/workers/chunks/ea478f2f4a19463e13fd.js +1 -0
- package/assets/esri/core/workers/chunks/eba197e45507f56f3ed0.js +1 -0
- package/assets/esri/core/workers/chunks/ebd006fcd568a7731115.js +1 -0
- package/assets/esri/core/workers/chunks/ef9a9a7d66d818720e20.js +1 -0
- package/assets/esri/core/workers/chunks/f3b458f55236566c940b.js +1 -0
- package/assets/esri/core/workers/chunks/fd0a91b9e0216cc269c3.js +1 -0
- package/assets/esri/core/workers/chunks/{a4fe220a912b1f428e49.js → fdd6403a8390d629392b.js} +1 -1
- package/assets/esri/themes/base/widgets/_Directions.scss +13 -7
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/array.js +1 -1
- package/core/Collection.js +1 -1
- package/core/accessorSupport/decorators/subclass.js +1 -1
- package/core/accessorSupport/ensureType.js +1 -1
- package/core/accessorSupport/get.js +1 -1
- package/core/accessorSupport/tracking.js +1 -1
- package/core/accessorSupport/utils.js +1 -1
- package/core/libs/rbush/PooledRBush.js +1 -1
- package/core/urlUtils.js +1 -1
- package/geometry/GeometryCursor.js +1 -1
- package/geometry/support/TileClipper.js +1 -1
- package/geometry/support/geodesicUtils.js +1 -1
- package/interfaces.d.ts +7 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/VectorTileLayer.js +1 -1
- package/layers/VoxelLayer.js +1 -1
- package/layers/WCSLayer.js +1 -1
- package/layers/effects/EffectView.js +1 -1
- package/layers/graphics/sources/geojson/geojson.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
- package/layers/mixins/ArcGISCachedService.js +1 -1
- package/layers/support/ElevationQuery.js +1 -1
- package/layers/support/MultidimensionalSubset.js +1 -1
- package/layers/support/TileInfo.js +1 -1
- package/layers/support/TileInfoTilemapCache.js +1 -1
- package/layers/support/TilemapCache.js +1 -1
- package/layers/support/rasterDatasets/multidimensionalUtils.js +1 -1
- package/layers/support/rasterDatasets/pamParser.js +1 -1
- package/layers/support/rasterDatasets/wcsCoverageParser.js +1 -1
- package/layers/support/rasterFormats/Raw.js +1 -1
- package/layers/support/rasterFormats/TiffDecoder.js +1 -1
- package/layers/support/rasterFunctions/ExtractBandFunction.js +1 -1
- package/layers/support/rasterFunctions/colormaps.js +1 -1
- package/layers/support/rasterFunctions/pixelUtils.js +1 -1
- package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/layers/voxel/VoxelDimension.js +1 -1
- package/layers/voxel/VoxelTransferFunctionStyle.js +1 -1
- package/layers/voxel/VoxelVolume.js +1 -1
- package/package.json +1 -1
- package/renderers/support/RasterSymbolizer.js +1 -1
- package/renderers/support/colorRampUtils.js +1 -1
- package/renderers/visualVariables/support/visualVariableUtils.js +1 -1
- package/rest/query/operations/pbfDehydratedFeatureSet.js +1 -1
- package/rest/query/operations/pbfJSONFeatureSet.js +1 -1
- package/rest/support/generateRendererUtils.js +1 -1
- package/smartMapping/raster/renderers/classBreaks.js +1 -1
- package/smartMapping/renderers/color.js +1 -1
- package/smartMapping/renderers/support/utils.js +1 -1
- package/smartMapping/renderers/type.js +1 -1
- package/smartMapping/renderers/univariateColorSize.js +1 -1
- package/smartMapping/support/adapters/support/utils.js +1 -1
- package/statistics/utils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
- package/symbols/cim/GeometryWalker.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/cim/effects/EffectArrow.js +1 -1
- package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
- package/symbols/support/symbolUtils.js +1 -1
- package/views/2d/constraints/ZoomConstraint.js +1 -1
- package/views/2d/engine/flow/dataUtils.js +1 -1
- package/views/2d/engine/flow/utils.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
- package/views/2d/engine/vectorTiles/expression/expression.js +1 -1
- package/views/2d/engine/vectorTiles/style/VectorTileSource.js +1 -1
- package/views/2d/engine/vectorTiles/tileInfoUtils.js +1 -1
- package/views/2d/engine/webgl/TurboLine.js +1 -1
- package/views/2d/engine/webgl/mesh/MeshData.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
- package/views/2d/interactive/editingTools/ControlPointsTransformTool.js +1 -1
- package/views/2d/interactive/editingTools/draw/DrawGraphicTool2D.js +1 -1
- package/views/2d/layers/BaseLayerView2D.js +1 -1
- package/views/2d/layers/BaseLayerViewGL2D.js +1 -1
- package/views/2d/layers/BitmapTileLayerView2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/VectorTileLayerView2D.js +1 -1
- package/views/2d/layers/WMTSLayerView2D.js +1 -1
- package/views/2d/layers/features/support/rendererUtils.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/layers/support/vectorTileDebugUtils.js +5 -0
- package/views/2d/tiling/TileInfoView.js +1 -1
- package/views/2d/tiling/TileInfoViewPOT.js +1 -1
- package/views/2d/tiling/TileQueue.js +1 -1
- package/views/2d/tiling.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.js +1 -1
- package/views/3d/interactive/editingTools/moveGraphic/GraphicMoveTool.js +1 -1
- package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
- package/views/3d/layers/TiledLayerView3D.js +1 -1
- package/views/3d/layers/VectorTileLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/layers/support/featureReference.js +1 -1
- package/views/3d/support/LaserLineRenderer.js +1 -1
- package/views/3d/terrain/Overlay.js +1 -1
- package/views/3d/terrain/OverlayFramebufferObject.js +1 -1
- package/views/3d/terrain/OverlayRenderTarget.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TileCompositor.js +1 -1
- package/views/3d/terrain/TileRenderer.js +1 -1
- package/views/3d/terrain/TilingScheme.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentData.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/interfaces.js +1 -1
- package/views/3d/webgl-engine/effects/ScreenSpaceGeometry.js +1 -1
- package/views/3d/webgl-engine/effects/SmaaRenderPass.js +1 -1
- package/views/3d/webgl-engine/lib/CompositingHelper.js +1 -1
- package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
- package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/WebGLLayer.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/parts/requireUtils.js +1 -1
- package/views/MapView.js +1 -1
- package/views/animation/pointToPoint/Path.js +1 -1
- package/views/draw/DrawOperation.js +1 -1
- package/views/draw/support/Reshape.js +1 -1
- package/views/draw/support/createUtils.js +1 -1
- package/views/interactive/SegmentLabels.js +1 -1
- package/views/interactive/editGeometry/EditGeometry.js +1 -1
- package/views/interactive/editGeometry/EditGeometryOperations.js +1 -1
- package/views/interactive/editGeometry/operations/UndoGroup.js +1 -1
- package/views/layers/GroupLayerView.js +1 -1
- package/views/webgl/ProgramCache.js +1 -1
- package/webscene/spec-certification/api.js +1 -1
- package/webscene/spec-certification/spec.js +1 -1
- package/webscene/spec-certification/utils.js +1 -1
- package/widgets/BuildingExplorer/BuildingNumericFilterViewModel.js +1 -1
- package/widgets/BuildingExplorer/BuildingPhase.js +1 -1
- package/widgets/BuildingExplorer/support/validation.js +1 -1
- package/widgets/Directions/support/resources.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/FieldInput.js +1 -1
- package/widgets/FeatureForm/FormExpressionsManager.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/Histogram/HistogramViewModel.js +1 -1
- package/widgets/HistogramRangeSlider/HistogramRangeSliderViewModel.js +1 -1
- package/widgets/Legend/styles/Card.js +1 -1
- package/widgets/Legend/styles/support/univariateUtils.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Legend/support/colorRampUtils.js +1 -1
- package/widgets/Legend/support/sizeRampUtils.js +1 -1
- package/widgets/Legend/support/utils.js +1 -1
- package/widgets/Popup.js +1 -1
- package/widgets/ScaleRangeSlider/ScaleRangeSliderViewModel.js +1 -1
- package/widgets/ScaleRangeSlider/ScaleRanges.js +1 -1
- package/widgets/ValuePicker/ValuePickerSlider.js +1 -1
- package/widgets/smartMapping/ClassedSizeSlider.js +1 -1
- package/widgets/smartMapping/ColorSizeSlider.js +1 -1
- package/widgets/smartMapping/HeatmapSlider/HeatmapSliderViewModel.js +1 -1
- package/widgets/smartMapping/SizeSlider.js +1 -1
- package/widgets/smartMapping/SmartMappingPrimaryHandleSliderViewModel.js +1 -1
- package/widgets/smartMapping/SmartMappingSliderViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/0210f4c2e1f3ed13041b.js +0 -1
- package/assets/esri/core/workers/chunks/07bb40162d97d098bc19.js +0 -1
- package/assets/esri/core/workers/chunks/0a18317566c1fcb68422.js +0 -1
- package/assets/esri/core/workers/chunks/0de65e03db8c611af9fb.js +0 -1
- package/assets/esri/core/workers/chunks/1a60d23a92bcf91dbb22.js +0 -1
- package/assets/esri/core/workers/chunks/205a0b34b698d5329854.js +0 -1
- package/assets/esri/core/workers/chunks/25211d5904ee9d5f4a9d.js +0 -1
- package/assets/esri/core/workers/chunks/26b12d1ea713c1e07701.js +0 -1
- package/assets/esri/core/workers/chunks/2bfa7ee324c32a56b0d3.js +0 -1
- package/assets/esri/core/workers/chunks/4510a17839405146130b.js +0 -1
- package/assets/esri/core/workers/chunks/524156c3f5383c2dd0e3.js +0 -1
- package/assets/esri/core/workers/chunks/59666ecb7c2c1f5a13b2.js +0 -1
- package/assets/esri/core/workers/chunks/5c005c9514354c77ec27.js +0 -1
- package/assets/esri/core/workers/chunks/620ec5c75561183d3d73.js +0 -1
- package/assets/esri/core/workers/chunks/68512670816f59c0e6a5.js +0 -1
- package/assets/esri/core/workers/chunks/6c7374ebc18b46b3480a.js +0 -1
- package/assets/esri/core/workers/chunks/75ba2af92da232067adb.js +0 -1
- package/assets/esri/core/workers/chunks/7c1f0598a016516dcec3.js +0 -1
- package/assets/esri/core/workers/chunks/8dcec8d1b670d2b7ea2b.js +0 -1
- package/assets/esri/core/workers/chunks/8e07dfb6fc2673b640cb.js +0 -1
- package/assets/esri/core/workers/chunks/9050b167355588b7003d.js +0 -1
- package/assets/esri/core/workers/chunks/9230d68799f0b0b9ef36.js +0 -1
- package/assets/esri/core/workers/chunks/af4083f2aad5f5d49dde.js +0 -1
- package/assets/esri/core/workers/chunks/b0a57718a0765d1c8df0.js +0 -1
- package/assets/esri/core/workers/chunks/b431b81a7bf45dd527da.js +0 -1
- package/assets/esri/core/workers/chunks/bda311ad48efdb265939.js +0 -1
- package/assets/esri/core/workers/chunks/d5cce09fbe16cbb8fee4.js +0 -1
- package/assets/esri/core/workers/chunks/da547c3cabe4a89c3ce6.js +0 -1
- package/assets/esri/core/workers/chunks/dd295fa57b45b7ec4ec5.js +0 -1
- package/assets/esri/core/workers/chunks/f553b464e969d45bf451.js +0 -1
- package/assets/esri/core/workers/chunks/f5865294983eb160de8c.js +0 -1
- package/assets/esri/core/workers/chunks/fdb7b1fbdb6fe091ad83.js +0 -1
- package/views/2d/tiling/PagedTileQueue.js +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1596],{92835:(e,t,i)=>{i.d(t,{Z:()=>g});var s,r=i(43697),n=i(96674),o=i(35463),a=i(5600),l=(i(75215),i(67676),i(80442),i(71715)),h=i(52011),u=i(30556);let d=s=class extends n.wq{static get allTime(){return c}static get empty(){return m}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new s({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=null!=this.start?this.start.getTime():this.start,i=null!=this.end?this.end.getTime():this.end,s=null!=e.start?e.start.getTime():e.start,r=null!=e.end?e.end.getTime():e.end;return t===s&&i===r}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();let t=this.start;t&&(t=(0,o.JE)(t,e));let i=this.end;if(i){const t=(0,o.JE)(i,e);i=i.getTime()===t.getTime()?t:(0,o.Nm)(t,1,e)}return new s({start:t,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return s.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,r=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let o,a;if(r>=t&&r<=i?o=r:t>=r&&t<=n&&(o=t),i>=r&&i<=n?a=i:n>=t&&n<=i&&(a=n),null!=o&&null!=a&&!isNaN(o)&&!isNaN(a)){const e=new s;return e.start=o===-1/0?null:new Date(o),e.end=a===1/0?null:new Date(a),e}return s.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const i=new s,{start:r,end:n}=this;return null!=r&&(i.start=(0,o.Nm)(r,e,t)),null!=n&&(i.end=(0,o.Nm)(n,e,t)),i}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return c.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new s({start:t,end:i})}};(0,r._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,r._)([(0,l.r)("end")],d.prototype,"readEnd",null),(0,r._)([(0,u.c)("end")],d.prototype,"writeEnd",null),(0,r._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,r._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,r._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,r._)([(0,l.r)("start")],d.prototype,"readStart",null),(0,r._)([(0,u.c)("start")],d.prototype,"writeStart",null),d=s=(0,r._)([(0,h.j)("esri.TimeExtent")],d);const c=new d,m=new d({start:void 0,end:void 0}),g=d},13867:(e,t,i)=>{i.d(t,{z:()=>r});var s=i(69801);class r{constructor(e,t){this._storage=new s.WJ,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},69801:(e,t,i)=>{i.d(t,{WJ:()=>a,Xq:()=>o});var s,r,n=i(44553);(r=s||(s={}))[r.ALL=0]="ALL",r[r.SOME=1]="SOME";class o{constructor(e,t,i){this.name=e,this._storage=t,this.id=l+++":",this.size=0,this.maxSize=0,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),i&&(this._storage.registerRemoveFunc(this.id,i),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get sizeAll(){return this._storage.size}resetHitRate(){this._hit=this._miss=0}put(e,t,i,s=0){this._storage.put(this,e,t,i,s)}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}peek(e){return this._storage.peek(this,e)}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}updateSize(e,t,i){this._storage.updateSize(this,e,t,i)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new n.Z,this._users=new n.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,0),this._checkSizeLimits()}put(e,t,i,r,n){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==i&&this._notifyRemove(t,o.entry,s.ALL)),r>this._maxSize)return void this._notifyRemove(t,i,s.ALL);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!r||r<0)return void console.warn("Refusing to cache entry with invalid size "+r);const a=1+Math.max(n,-3)- -3;this._db.set(t,{entry:i,size:r,lifetime:a,lives:a}),this._size+=r,e.size+=r,this._checkSizeLimits()}updateSize(e,t,i,r){t=e.id+t;const n=this._db.get(t);if(n&&n.entry===i){for(this._size-=n.size,e.size-=n.size;r>this._maxSize;){const e=this._notifyRemove(t,i,s.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);r=e}n.size=r,this._size+=r,e.size+=r,this._checkSizeLimits()}}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach(((e,s)=>{const r=e.lifetime;i[r]=(i[r]||0)+e.size,this._users.forAll((i=>{const{id:r,name:n}=i;if(s.startsWith(r)){const i=t[n]||0;t[n]=i+e.size}}))}));const s={};this._users.forAll((e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const r=t[i]||0;t[i]=r,s[i]=Math.round(100*e.hitRate)+"%"}else s[i]="0%"}));const r=Object.keys(t);r.sort(((e,i)=>t[i]-t[e])),r.forEach((i=>e[i]=Math.round(t[i]/2**20)+"MB / "+s[i]));for(let t=i.length-1;t>=0;--t){const s=i[t];s&&(e["Priority "+(t+-3-1)]=Math.round(s/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,s.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,s.ALL))),this._users.forEach((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i){let s;return this._removeFuncs.some((r=>{if(e.startsWith(r[0])){const e=r[1](t,i);return"number"==typeof e&&(s=e),!0}return!1})),s}_checkSizeLimits(){if(this._size>this._maxSize)for(const[e,t]of this._db)if(this._purgeItem(e,t),this._size<=.9*this.maxSize)return;this._users.forEach((e=>{if(e.maxSize>0&&e.size>e.maxSize)for(const[t,i]of this._db)if(t.startsWith(e.id)&&(this._purgeItem(t,i,e),e.size<=.9*e.maxSize))return}))}_purgeItem(e,t,i=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const r=this._notifyRemove(e,t.entry,s.SOME);null!=r&&r>0&&(this._size+=r,i&&(i.size+=r),t.lives=t.lifetime,t.size=r,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let l=0},17445:(e,t,i)=>{i.d(t,{N1:()=>c,YP:()=>l,Z_:()=>p,gx:()=>h,nn:()=>y,on:()=>d,tX:()=>_}),i(66643),i(46791);var s=i(91460),r=i(50758),n=i(70586),o=i(95330),a=i(26258);function l(e,t,i={}){return u(e,t,i,m)}function h(e,t,i={}){return u(e,t,i,g)}function u(e,t,i={},s){let r=null;const o=i.once?(e,i)=>{s(e)&&((0,n.hw)(r),t(e,i))}:(e,i)=>{s(e)&&t(e,i)};if(r=(0,a.aQ)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return r}function d(e,t,i,o={}){let a=null,h=null,u=null;function d(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function c(e){o.once&&o.once&&(0,n.hw)(u),i(e)}const m=l(e,((e,i)=>{d(),(0,s.vT)(e)&&(a=e,h=(0,s.on)(e,t,c),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return u=(0,r.kB)((()=>{m.remove(),d()})),u}function c(e,t){return function(e,t,i){if((0,o.Hc)(i))return Promise.reject((0,o.zE)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,n.hw)(a)}return new Promise(((s,n)=>{a=(0,r.AL)([(0,o.fu)(i,(()=>{l(),n((0,o.zE)())})),u(e,(e=>{l(),s(e)}),{sync:!1,once:!0},t??m)])}))}(e,g,t)}function m(e){return!0}function g(e){return!!e}i(87538);const p={sync:!0},y={initial:!0},_={sync:!0,initial:!0}},35463:(e,t,i)=>{i.d(t,{JE:()=>o,Nm:()=>n,rJ:()=>a}),i(80442);const s={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},r={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function n(e,t,i){const s=new Date(e.getTime());if(t&&i){const e=r[i],{getter:n,setter:o,multiplier:a}=e;if("months"===i){const e=function(e,t){const i=new Date(e,t+1,1);return i.setDate(0),i.getDate()}(s.getFullYear(),s.getMonth()+t);s.getDate()>e&&s.setDate(e)}s[o](s[n]()+t*a)}return s}function o(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function a(e,t,i){return 0===e?0:e*s[t]/s[i]}},79235:(e,t,i)=>{i.d(t,{Z:()=>v});var s,r=i(43697),n=i(67676),o=i(35454),a=i(96674),l=i(67900),h=i(20941),u=i(5600),d=(i(75215),i(80442),i(71715)),c=i(52011),m=i(30556);const g=(0,o.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),p=g.jsonValues.slice();(0,n.e$)(p,"orthometric");const y=(0,o.w)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let _=s=class extends a.wq{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,i){return g.write(e,t,i)}readHeightModel(e,t,i){return g.read(e)||(i&&i.messages&&i.messages.push(function(e,t){return new h.Z("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return y.read(e)||(i&&i.messages&&i.messages.push(f(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,l.$C)(e)||y.read(e)||(i&&i.messages&&i.messages.push(f(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new s({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const i=(0,l.cM)(t);return new s({heightModel:e.heightModel,heightUnit:i,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new s;return t.read(e,{origin:"web-scene"}),t}};function f(e,t){return new h.Z("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,r._)([(0,u.Cb)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:p,default:"ellipsoidal"}}}})],_.prototype,"heightModel",void 0),(0,r._)([(0,m.c)("web-scene","heightModel")],_.prototype,"writeHeightModel",null),(0,r._)([(0,d.r)(["web-scene","service"],"heightModel")],_.prototype,"readHeightModel",null),(0,r._)([(0,u.Cb)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:y.jsonValues,write:y.write}}}})],_.prototype,"heightUnit",void 0),(0,r._)([(0,d.r)("web-scene","heightUnit")],_.prototype,"readHeightUnit",null),(0,r._)([(0,d.r)("service","heightUnit")],_.prototype,"readHeightUnitService",null),(0,r._)([(0,u.Cb)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],_.prototype,"vertCRS",void 0),(0,r._)([(0,d.r)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],_.prototype,"readVertCRS",null),_=s=(0,r._)([(0,c.j)("esri.geometry.HeightModelInfo")],_);const v=_},90344:(e,t,i)=>{i.d(t,{LJ:()=>T,Xr:()=>_,Ze:()=>b,cZ:()=>h,i$:()=>M,o8:()=>D,p6:()=>S});var s=i(35454),r=i(70171),n=i(17126);const o={year:void 0,month:void 0,day:void 0,weekday:void 0},a={hour:void 0,minute:void 0,second:void 0},l={timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone},h={timeZone:"Etc/UTC"},u={year:"numeric",month:"numeric",day:"numeric"},d={year:"numeric",month:"long",day:"numeric"},c={year:"numeric",month:"short",day:"numeric"},m={year:"numeric",month:"long",weekday:"long",day:"numeric"},g={hour:"numeric",minute:"numeric"},p={...g,second:"numeric"},y={"short-date":u,"short-date-short-time":{...u,...g},"short-date-short-time-24":{...u,...g,hour12:!1},"short-date-long-time":{...u,...p},"short-date-long-time-24":{...u,...p,hour12:!1},"short-date-le":u,"short-date-le-short-time":{...u,...g},"short-date-le-short-time-24":{...u,...g,hour12:!1},"short-date-le-long-time":{...u,...p},"short-date-le-long-time-24":{...u,...p,hour12:!1},"long-month-day-year":d,"long-month-day-year-short-time":{...d,...g},"long-month-day-year-short-time-24":{...d,...g,hour12:!1},"long-month-day-year-long-time":{...d,...p},"long-month-day-year-long-time-24":{...d,...p,hour12:!1},"day-short-month-year":c,"day-short-month-year-short-time":{...c,...g},"day-short-month-year-short-time-24":{...c,...g,hour12:!1},"day-short-month-year-long-time":{...c,...p},"day-short-month-year-long-time-24":{...c,...p,hour12:!1},"long-date":m,"long-date-short-time":{...m,...g},"long-date-short-time-24":{...m,...g,hour12:!1},"long-date-long-time":{...m,...p},"long-date-long-time-24":{...m,...p,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":g,"long-time":p},_=(0,s.w)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),f={ar:"ar-u-nu-latn-ca-gregory"};let v=new WeakMap,w=y["short-date-short-time"];function b(e){return y[e]}function S(e,t){return function(e){const t=e||w;let i=v.get(t);if(!i){const e=(0,r.Kd)(),s=f[e]||e;i=new Intl.DateTimeFormat(s,t),v.set(t,i)}return i}(t).format(e)}function D(e,t=y["short-date"]){return S(new Date(e),{...t,...h,...a})}function T(e,t=y["short-time"]){return S(new Date(`1970-01-01T${e}Z`),{...t,...h,...o})}function M(e,t=y["short-date-short-time"]){const i=n.ou.fromISO(e,{setZone:!0}),s=(0,r.Kd)(),o=f[s]??s;return i.toLocaleString({...l,...t},{locale:o})}(0,r.Ze)((()=>{v=new WeakMap,w=y["short-date-short-time"]}))},18848:(e,t,i)=>{i.d(t,{sh:()=>a,uf:()=>l});var s=i(70171);const r={ar:"ar-u-nu-latn"};let n=new WeakMap,o={};function a(e={}){const t={};return null!=e.digitSeparator&&(t.useGrouping=e.digitSeparator),null!=e.places&&(t.minimumFractionDigits=t.maximumFractionDigits=e.places),t}function l(e,t){return Object.is(e,-0)&&(e=0),function(e){const t=e||o;if(!n.has(t)){const i=(0,s.Kd)(),o=r[(0,s.Kd)()]||i;n.set(t,new Intl.NumberFormat(o,e))}return n.get(t)}(t).format(e)}(0,s.Ze)((()=>{n=new WeakMap,o={}}))},65665:(e,t,i)=>{i.r(t),i.d(t,{default:()=>k});var s=i(43697),r=i(3172),n=i(20102),o=i(70586),a=i(16453),l=i(95330),h=i(17452),u=i(5600),d=(i(75215),i(67676)),c=(i(80442),i(71715)),m=i(52011),g=i(79235),p=i(87085),y=i(46486),_=i(17287),f=i(38009),v=i(16859),w=i(21506);class b{constructor(e,t,i,s){this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,"pixelData"in e?(this.values=e.pixelData,this.width=e.width,this.height=e.height,this.noDataValue=e.noDataValue):(this.values=e,this.width=t,this.height=i,this.noDataValue=s)}get hasNoDataValues(){if(null==this._hasNoDataValues){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}_ensureBounds(){if(null!=this._minValue)return;const{noDataValue:e,values:t}=this;let i=1/0,s=-1/0,r=!0;for(const n of t)n===e?this._hasNoDataValues=!0:(i=n<i?n:i,s=n>s?n:s,r=!1);r?(this._minValue=0,this._maxValue=0):(this._minValue=i,this._maxValue=s>-3e38?s:0)}}var S=i(50758),D=i(92604),T=i(56569);class M{constructor(e,t,i,s,r={}){this._mainMethod=t,this._transferLists=i,this._listeners=[],this._promise=(0,T.bA)(e,{...r,schedule:s}).then((e=>{if(void 0===this._thread){this._thread=e,this._promise=null,r.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()})),this._promise.catch((t=>D.Z.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`)))}on(e,t){const i={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(i),this._connectListener(i),(0,S.kB)((()=>{i.removed=!0,(0,d.Od)(this._listeners,i),this._thread&&null!=i.threadHandle&&i.threadHandle.remove()}))}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t){return this.invokeMethod(this._mainMethod,e,t)}invokeMethod(e,t,i){if(this._thread){const s=this._transferLists[e],r=s?s(t):[];return this._thread.invoke(e,t,{transferList:r,signal:i})}return this._promise?this._promise.then((()=>((0,l.k_)(i),this.invokeMethod(e,t,i)))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then((()=>{})):this._promise?this._promise.then((()=>this.broadcast(e,t))):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then((t=>{e.removed||(e.threadHandle=t)}))}}class z extends M{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,i){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},i):Promise.resolve(null)}release(){--this.ref<=0&&(L.forEach(((e,t)=>{e===this&&L.delete(t)})),this.destroy())}}const L=new Map;let x=class extends((0,y.Z)((0,_.Y)((0,f.q)((0,v.I)((0,a.R)(p.Z)))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=L.get(e);return t||(null!=e?(t=new z((t=>e.immediate.schedule(t))),L.set(e,t)):(t=new z,L.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,o.RY)(this._lercDecoder)}readCapabilities(e,t){const i=t.capabilities&&t.capabilities.split(",").map((e=>e.toLowerCase().trim()));return i?{operations:{supportsTileMap:i.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}readVersion(e,t){let i=t.currentVersion;return i||(i=9.3),i}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new n.Z("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(l.r9).then((()=>this._fetchImageService(t)))),Promise.resolve(this)}fetchTile(e,t,i,s){const n=null!=(s=s||{signal:null}).signal?s.signal:s.signal=(new AbortController).signal,o={responseType:"array-buffer",signal:n},a={noDataValue:s.noDataValue,returnFileInfo:!0};return this.load().then((()=>this._fetchTileAvailability(e,t,i,s))).then((()=>(0,r.Z)(this.getTileUrl(e,t,i),o))).then((e=>this._lercDecoder.decode(e.data,a,n))).then((e=>new b(e)))}getTileUrl(e,t,i){const s=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,r=(0,h.B7)({...this.parsedUrl.query,blankTile:!s&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${i}${r?"?"+r:""}`}async queryElevation(e,t){const{ElevationQuery:s}=await i.e(5642).then(i.bind(i,55642));return(0,l.k_)(t),(new s).query(this,e,t)}async createElevationSampler(e,t){const{ElevationQuery:s}=await i.e(5642).then(i.bind(i,55642));return(0,l.k_)(t),(new s).createSampler(this,e,t)}_fetchTileAvailability(e,t,i,s){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,i,s):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},i=await(0,r.Z)(this.parsedUrl.path,t);i.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=i.data,this.read(i.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[C]}};(0,s._)([(0,u.Cb)({readOnly:!0})],x.prototype,"capabilities",void 0),(0,s._)([(0,c.r)("service","capabilities",["capabilities"])],x.prototype,"readCapabilities",null),(0,s._)([(0,u.Cb)({json:{read:{source:"copyrightText"}}})],x.prototype,"copyright",void 0),(0,s._)([(0,u.Cb)({readOnly:!0,type:g.Z})],x.prototype,"heightModelInfo",void 0),(0,s._)([(0,u.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],x.prototype,"path",void 0),(0,s._)([(0,u.Cb)({type:["show","hide"]})],x.prototype,"listMode",void 0),(0,s._)([(0,u.Cb)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],x.prototype,"minScale",void 0),(0,s._)([(0,u.Cb)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],x.prototype,"maxScale",void 0),(0,s._)([(0,u.Cb)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],x.prototype,"opacity",void 0),(0,s._)([(0,u.Cb)({type:["ArcGISTiledElevationServiceLayer"]})],x.prototype,"operationalLayerType",void 0),(0,s._)([(0,u.Cb)()],x.prototype,"sourceJSON",void 0),(0,s._)([(0,u.Cb)({json:{read:!1},value:"elevation",readOnly:!0})],x.prototype,"type",void 0),(0,s._)([(0,u.Cb)(w.HQ)],x.prototype,"url",void 0),(0,s._)([(0,u.Cb)()],x.prototype,"version",void 0),(0,s._)([(0,c.r)("version",["currentVersion"])],x.prototype,"readVersion",null),x=(0,s._)([(0,m.j)("esri.layers.ElevationLayer")],x);const C=Symbol("default-fetch-tile");x.prototype.fetchTile[C]=!0;const k=x},46486:(e,t,i)=>{i.d(t,{Z:()=>d});var s=i(43697),r=(i(66577),i(5600)),n=(i(75215),i(67676),i(80442),i(71715)),o=i(52011),a=i(11145),l=i(42238),h=i(28589),u=i(82971);const d=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}destroy(){this.tilemapCache?.destroy?.()}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,i){const s=t.capabilities?.includes("Tilemap");let{minLOD:r,maxLOD:n,minScale:o,maxScale:u}=t;if(null==r&&null==n&&0!==o&&0!==u){const e=e=>Math.round(1e4*e)/1e4;o=e(o||t.tileInfo.lods[0].scale),u=e(u||t.tileInfo.lods.at(-1).scale);for(const i of t.tileInfo.lods){const t=e(i.scale);r=t>=o?i.level:r,n=t>=u?i.level:n}}if(s)return new h.y({layer:this,minLOD:r,maxLOD:n});if(t.tileInfo){const e=new a.Z;return e.read(t.tileInfo,i),new l.Z(e,r,n)}return null}};return(0,s._)([(0,r.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,s._)([(0,r.Cb)()],t.prototype,"minScale",void 0),(0,s._)([(0,n.r)("service","minScale")],t.prototype,"readMinScale",null),(0,s._)([(0,r.Cb)()],t.prototype,"maxScale",void 0),(0,s._)([(0,n.r)("service","maxScale")],t.prototype,"readMaxScale",null),(0,s._)([(0,r.Cb)({type:u.Z})],t.prototype,"spatialReference",void 0),(0,s._)([(0,r.Cb)({readOnly:!0})],t.prototype,"supportsBlankTile",null),(0,s._)([(0,r.Cb)({type:a.Z})],t.prototype,"tileInfo",void 0),(0,s._)([(0,r.Cb)()],t.prototype,"tilemapCache",void 0),(0,s._)([(0,n.r)("service","tilemapCache",["capabilities","tileInfo"])],t.prototype,"readTilemapCache",null),(0,s._)([(0,r.Cb)()],t.prototype,"version",void 0),t=(0,s._)([(0,o.j)("esri.layers.mixins.ArcGISCachedService")],t),t}},42238:(e,t,i)=>{i.d(t,{Z:()=>n});var s=i(20102),r=i(95330);class n{constructor(e,t=0,i=e.lods.at(-1).level){this.tileInfo=e,this.minLOD=t,this.maxLOD=i,e.lodAt(t)||(this.minLOD=e.lods[0].level),e.lodAt(i)||(this.maxLOD=e.lods.at(-1).level)}get effectiveMinLOD(){return this.minLOD??this.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.tileInfo.lods.at(-1).level}getAvailability(e,t,i){const s=this.tileInfo?.lodAt(e);return!s||e<this.minLOD||e>this.maxLOD?"unavailable":s.cols&&s.rows?i>=s.cols[0]&&i<=s.cols[1]&&t>=s.rows[0]&&t<=s.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,i,n){await(0,r.Yn)(n);const o=this.getAvailability(e,t,i);if("unavailable"===o)throw new s.Z("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i});return o}async fetchAvailabilityUpsample(e,t,i,s,n){await(0,r.Yn)(n),s.level=e,s.row=t,s.col=i;const o=this.tileInfo;return o.updateTileInfo(s),this.fetchAvailability(e,t,i,n).catch((e=>{if((0,r.D_)(e))throw e;if(o.upsampleTile(s))return this.fetchAvailabilityUpsample(s.level,s.row,s.col,s,n);throw e}))}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1596],{92835:(e,t,i)=>{i.d(t,{Z:()=>g});var s,r=i(43697),n=i(96674),o=i(35463),a=i(5600),l=(i(75215),i(67676),i(80442),i(71715)),h=i(52011),u=i(30556);let d=s=class extends n.wq{static get allTime(){return c}static get empty(){return m}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new s({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=null!=this.start?this.start.getTime():this.start,i=null!=this.end?this.end.getTime():this.end,s=null!=e.start?e.start.getTime():e.start,r=null!=e.end?e.end.getTime():e.end;return t===s&&i===r}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();let t=this.start;t&&(t=(0,o.JE)(t,e));let i=this.end;if(i){const t=(0,o.JE)(i,e);i=i.getTime()===t.getTime()?t:(0,o.Nm)(t,1,e)}return new s({start:t,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return s.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,r=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let o,a;if(r>=t&&r<=i?o=r:t>=r&&t<=n&&(o=t),i>=r&&i<=n?a=i:n>=t&&n<=i&&(a=n),null!=o&&null!=a&&!isNaN(o)&&!isNaN(a)){const e=new s;return e.start=o===-1/0?null:new Date(o),e.end=a===1/0?null:new Date(a),e}return s.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const i=new s,{start:r,end:n}=this;return null!=r&&(i.start=(0,o.Nm)(r,e,t)),null!=n&&(i.end=(0,o.Nm)(n,e,t)),i}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return c.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new s({start:t,end:i})}};(0,r._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,r._)([(0,l.r)("end")],d.prototype,"readEnd",null),(0,r._)([(0,u.c)("end")],d.prototype,"writeEnd",null),(0,r._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,r._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,r._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,r._)([(0,l.r)("start")],d.prototype,"readStart",null),(0,r._)([(0,u.c)("start")],d.prototype,"writeStart",null),d=s=(0,r._)([(0,h.j)("esri.TimeExtent")],d);const c=new d,m=new d({start:void 0,end:void 0}),g=d},13867:(e,t,i)=>{i.d(t,{z:()=>r});var s=i(69801);class r{constructor(e,t){this._storage=new s.WJ,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},69801:(e,t,i)=>{i.d(t,{WJ:()=>a,Xq:()=>o});var s,r,n=i(44553);(r=s||(s={}))[r.ALL=0]="ALL",r[r.SOME=1]="SOME";class o{constructor(e,t,i){this.name=e,this._storage=t,this.id=l+++":",this.size=0,this.maxSize=0,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),i&&(this._storage.registerRemoveFunc(this.id,i),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get sizeAll(){return this._storage.size}resetHitRate(){this._hit=this._miss=0}put(e,t,i,s=0){this._storage.put(this,e,t,i,s)}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}peek(e){return this._storage.peek(this,e)}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}updateSize(e,t,i){this._storage.updateSize(this,e,t,i)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new n.Z,this._users=new n.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,0),this._checkSizeLimits()}put(e,t,i,r,n){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==i&&this._notifyRemove(t,o.entry,s.ALL)),r>this._maxSize)return void this._notifyRemove(t,i,s.ALL);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!r||r<0)return void console.warn("Refusing to cache entry with invalid size "+r);const a=1+Math.max(n,-3)- -3;this._db.set(t,{entry:i,size:r,lifetime:a,lives:a}),this._size+=r,e.size+=r,this._checkSizeLimits()}updateSize(e,t,i,r){t=e.id+t;const n=this._db.get(t);if(n&&n.entry===i){for(this._size-=n.size,e.size-=n.size;r>this._maxSize;){const e=this._notifyRemove(t,i,s.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);r=e}n.size=r,this._size+=r,e.size+=r,this._checkSizeLimits()}}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach(((e,s)=>{const r=e.lifetime;i[r]=(i[r]||0)+e.size,this._users.forAll((i=>{const{id:r,name:n}=i;if(s.startsWith(r)){const i=t[n]||0;t[n]=i+e.size}}))}));const s={};this._users.forAll((e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const r=t[i]||0;t[i]=r,s[i]=Math.round(100*e.hitRate)+"%"}else s[i]="0%"}));const r=Object.keys(t);r.sort(((e,i)=>t[i]-t[e])),r.forEach((i=>e[i]=Math.round(t[i]/2**20)+"MB / "+s[i]));for(let t=i.length-1;t>=0;--t){const s=i[t];s&&(e["Priority "+(t+-3-1)]=Math.round(s/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,s.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,s.ALL))),this._users.forEach((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i){let s;return this._removeFuncs.some((r=>{if(e.startsWith(r[0])){const e=r[1](t,i);return"number"==typeof e&&(s=e),!0}return!1})),s}_checkSizeLimits(){if(this._size>this._maxSize)for(const[e,t]of this._db)if(this._purgeItem(e,t),this._size<=.9*this.maxSize)return;this._users.forEach((e=>{if(e.maxSize>0&&e.size>e.maxSize)for(const[t,i]of this._db)if(t.startsWith(e.id)&&(this._purgeItem(t,i,e),e.size<=.9*e.maxSize))return}))}_purgeItem(e,t,i=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const r=this._notifyRemove(e,t.entry,s.SOME);null!=r&&r>0&&(this._size+=r,i&&(i.size+=r),t.lives=t.lifetime,t.size=r,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let l=0},17445:(e,t,i)=>{i.d(t,{N1:()=>c,YP:()=>l,Z_:()=>p,gx:()=>h,nn:()=>y,on:()=>d,tX:()=>_}),i(66643),i(46791);var s=i(91460),r=i(50758),n=i(70586),o=i(95330),a=i(26258);function l(e,t,i={}){return u(e,t,i,m)}function h(e,t,i={}){return u(e,t,i,g)}function u(e,t,i={},s){let r=null;const o=i.once?(e,i)=>{s(e)&&((0,n.hw)(r),t(e,i))}:(e,i)=>{s(e)&&t(e,i)};if(r=(0,a.aQ)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return r}function d(e,t,i,o={}){let a=null,h=null,u=null;function d(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function c(e){o.once&&o.once&&(0,n.hw)(u),i(e)}const m=l(e,((e,i)=>{d(),(0,s.vT)(e)&&(a=e,h=(0,s.on)(e,t,c),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return u=(0,r.kB)((()=>{m.remove(),d()})),u}function c(e,t){return function(e,t,i){if((0,o.Hc)(i))return Promise.reject((0,o.zE)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,n.hw)(a)}return new Promise(((s,n)=>{a=(0,r.AL)([(0,o.fu)(i,(()=>{l(),n((0,o.zE)())})),u(e,(e=>{l(),s(e)}),{sync:!1,once:!0},t??m)])}))}(e,g,t)}function m(e){return!0}function g(e){return!!e}i(87538);const p={sync:!0},y={initial:!0},_={sync:!0,initial:!0}},35463:(e,t,i)=>{i.d(t,{JE:()=>o,Nm:()=>n,rJ:()=>a}),i(80442);const s={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},r={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function n(e,t,i){const s=new Date(e.getTime());if(t&&i){const e=r[i],{getter:n,setter:o,multiplier:a}=e;if("months"===i){const e=function(e,t){const i=new Date(e,t+1,1);return i.setDate(0),i.getDate()}(s.getFullYear(),s.getMonth()+t);s.getDate()>e&&s.setDate(e)}s[o](s[n]()+t*a)}return s}function o(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function a(e,t,i){return 0===e?0:e*s[t]/s[i]}},79235:(e,t,i)=>{i.d(t,{Z:()=>v});var s,r=i(43697),n=i(67676),o=i(35454),a=i(96674),l=i(67900),h=i(20941),u=i(5600),d=(i(75215),i(80442),i(71715)),c=i(52011),m=i(30556);const g=(0,o.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),p=g.jsonValues.slice();(0,n.e$)(p,"orthometric");const y=(0,o.w)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let _=s=class extends a.wq{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,i){return g.write(e,t,i)}readHeightModel(e,t,i){return g.read(e)||(i&&i.messages&&i.messages.push(function(e,t){return new h.Z("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return y.read(e)||(i&&i.messages&&i.messages.push(f(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,l.$C)(e)||y.read(e)||(i&&i.messages&&i.messages.push(f(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new s({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const i=(0,l.cM)(t);return new s({heightModel:e.heightModel,heightUnit:i,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new s;return t.read(e,{origin:"web-scene"}),t}};function f(e,t){return new h.Z("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,r._)([(0,u.Cb)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:p,default:"ellipsoidal"}}}})],_.prototype,"heightModel",void 0),(0,r._)([(0,m.c)("web-scene","heightModel")],_.prototype,"writeHeightModel",null),(0,r._)([(0,d.r)(["web-scene","service"],"heightModel")],_.prototype,"readHeightModel",null),(0,r._)([(0,u.Cb)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:y.jsonValues,write:y.write}}}})],_.prototype,"heightUnit",void 0),(0,r._)([(0,d.r)("web-scene","heightUnit")],_.prototype,"readHeightUnit",null),(0,r._)([(0,d.r)("service","heightUnit")],_.prototype,"readHeightUnitService",null),(0,r._)([(0,u.Cb)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],_.prototype,"vertCRS",void 0),(0,r._)([(0,d.r)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],_.prototype,"readVertCRS",null),_=s=(0,r._)([(0,c.j)("esri.geometry.HeightModelInfo")],_);const v=_},90344:(e,t,i)=>{i.d(t,{LJ:()=>T,Xr:()=>_,Ze:()=>b,cZ:()=>h,i$:()=>M,o8:()=>D,p6:()=>S});var s=i(35454),r=i(70171),n=i(17126);const o={year:void 0,month:void 0,day:void 0,weekday:void 0},a={hour:void 0,minute:void 0,second:void 0},l={timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone},h={timeZone:"Etc/UTC"},u={year:"numeric",month:"numeric",day:"numeric"},d={year:"numeric",month:"long",day:"numeric"},c={year:"numeric",month:"short",day:"numeric"},m={year:"numeric",month:"long",weekday:"long",day:"numeric"},g={hour:"numeric",minute:"numeric"},p={...g,second:"numeric"},y={"short-date":u,"short-date-short-time":{...u,...g},"short-date-short-time-24":{...u,...g,hour12:!1},"short-date-long-time":{...u,...p},"short-date-long-time-24":{...u,...p,hour12:!1},"short-date-le":u,"short-date-le-short-time":{...u,...g},"short-date-le-short-time-24":{...u,...g,hour12:!1},"short-date-le-long-time":{...u,...p},"short-date-le-long-time-24":{...u,...p,hour12:!1},"long-month-day-year":d,"long-month-day-year-short-time":{...d,...g},"long-month-day-year-short-time-24":{...d,...g,hour12:!1},"long-month-day-year-long-time":{...d,...p},"long-month-day-year-long-time-24":{...d,...p,hour12:!1},"day-short-month-year":c,"day-short-month-year-short-time":{...c,...g},"day-short-month-year-short-time-24":{...c,...g,hour12:!1},"day-short-month-year-long-time":{...c,...p},"day-short-month-year-long-time-24":{...c,...p,hour12:!1},"long-date":m,"long-date-short-time":{...m,...g},"long-date-short-time-24":{...m,...g,hour12:!1},"long-date-long-time":{...m,...p},"long-date-long-time-24":{...m,...p,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":g,"long-time":p},_=(0,s.w)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),f={ar:"ar-u-nu-latn-ca-gregory"};let v=new WeakMap,w=y["short-date-short-time"];function b(e){return y[e]}function S(e,t){return function(e){const t=e||w;let i=v.get(t);if(!i){const e=(0,r.Kd)(),s=f[e]||e;i=new Intl.DateTimeFormat(s,t),v.set(t,i)}return i}(t).format(e)}function D(e,t=y["short-date"]){return S(new Date(e),{...t,...h,...a})}function T(e,t=y["short-time"]){return S(new Date(`1970-01-01T${e}Z`),{...t,...h,...o})}function M(e,t=y["short-date-short-time"]){const i=n.ou.fromISO(e,{setZone:!0}),s=(0,r.Kd)(),o=f[s]??s;return i.toLocaleString({...l,...t},{locale:o})}(0,r.Ze)((()=>{v=new WeakMap,w=y["short-date-short-time"]}))},18848:(e,t,i)=>{i.d(t,{sh:()=>a,uf:()=>l});var s=i(70171);const r={ar:"ar-u-nu-latn"};let n=new WeakMap,o={};function a(e={}){const t={};return null!=e.digitSeparator&&(t.useGrouping=e.digitSeparator),null!=e.places&&(t.minimumFractionDigits=t.maximumFractionDigits=e.places),t}function l(e,t){return Object.is(e,-0)&&(e=0),function(e){const t=e||o;if(!n.has(t)){const i=(0,s.Kd)(),o=r[(0,s.Kd)()]||i;n.set(t,new Intl.NumberFormat(o,e))}return n.get(t)}(t).format(e)}(0,s.Ze)((()=>{n=new WeakMap,o={}}))},65665:(e,t,i)=>{i.r(t),i.d(t,{default:()=>k});var s=i(43697),r=i(3172),n=i(20102),o=i(70586),a=i(16453),l=i(95330),h=i(17452),u=i(5600),d=(i(75215),i(67676)),c=(i(80442),i(71715)),m=i(52011),g=i(79235),p=i(87085),y=i(46486),_=i(17287),f=i(38009),v=i(16859),w=i(21506);class b{constructor(e,t,i,s){this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,"pixelData"in e?(this.values=e.pixelData,this.width=e.width,this.height=e.height,this.noDataValue=e.noDataValue):(this.values=e,this.width=t,this.height=i,this.noDataValue=s)}get hasNoDataValues(){if(null==this._hasNoDataValues){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}_ensureBounds(){if(null!=this._minValue)return;const{noDataValue:e,values:t}=this;let i=1/0,s=-1/0,r=!0;for(const n of t)n===e?this._hasNoDataValues=!0:(i=n<i?n:i,s=n>s?n:s,r=!1);r?(this._minValue=0,this._maxValue=0):(this._minValue=i,this._maxValue=s>-3e38?s:0)}}var S=i(50758),D=i(92604),T=i(56569);class M{constructor(e,t,i,s,r={}){this._mainMethod=t,this._transferLists=i,this._listeners=[],this._promise=(0,T.bA)(e,{...r,schedule:s}).then((e=>{if(void 0===this._thread){this._thread=e,this._promise=null,r.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()})),this._promise.catch((t=>D.Z.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`)))}on(e,t){const i={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(i),this._connectListener(i),(0,S.kB)((()=>{i.removed=!0,(0,d.Od)(this._listeners,i),this._thread&&null!=i.threadHandle&&i.threadHandle.remove()}))}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t){return this.invokeMethod(this._mainMethod,e,t)}invokeMethod(e,t,i){if(this._thread){const s=this._transferLists[e],r=s?s(t):[];return this._thread.invoke(e,t,{transferList:r,signal:i})}return this._promise?this._promise.then((()=>((0,l.k_)(i),this.invokeMethod(e,t,i)))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then((()=>{})):this._promise?this._promise.then((()=>this.broadcast(e,t))):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then((t=>{e.removed||(e.threadHandle=t)}))}}class z extends M{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,i){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},i):Promise.resolve(null)}release(){--this.ref<=0&&(L.forEach(((e,t)=>{e===this&&L.delete(t)})),this.destroy())}}const L=new Map;let x=class extends((0,y.Z)((0,_.Y)((0,f.q)((0,v.I)((0,a.R)(p.Z)))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=L.get(e);return t||(null!=e?(t=new z((t=>e.immediate.schedule(t))),L.set(e,t)):(t=new z,L.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,o.RY)(this._lercDecoder)}readCapabilities(e,t){const i=t.capabilities&&t.capabilities.split(",").map((e=>e.toLowerCase().trim()));return i?{operations:{supportsTileMap:i.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}readVersion(e,t){let i=t.currentVersion;return i||(i=9.3),i}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new n.Z("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(l.r9).then((()=>this._fetchImageService(t)))),Promise.resolve(this)}fetchTile(e,t,i,s){const n=null!=(s=s||{signal:null}).signal?s.signal:s.signal=(new AbortController).signal,o={responseType:"array-buffer",signal:n},a={noDataValue:s.noDataValue,returnFileInfo:!0};return this.load().then((()=>this._fetchTileAvailability(e,t,i,s))).then((()=>(0,r.Z)(this.getTileUrl(e,t,i),o))).then((e=>this._lercDecoder.decode(e.data,a,n))).then((e=>new b(e)))}getTileUrl(e,t,i){const s=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,r=(0,h.B7)({...this.parsedUrl.query,blankTile:!s&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${i}${r?"?"+r:""}`}async queryElevation(e,t){const{ElevationQuery:s}=await i.e(5642).then(i.bind(i,55642));return(0,l.k_)(t),(new s).query(this,e,t)}async createElevationSampler(e,t){const{ElevationQuery:s}=await i.e(5642).then(i.bind(i,55642));return(0,l.k_)(t),(new s).createSampler(this,e,t)}_fetchTileAvailability(e,t,i,s){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,i,s):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},i=await(0,r.Z)(this.parsedUrl.path,t);i.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=i.data,this.read(i.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[C]}};(0,s._)([(0,u.Cb)({readOnly:!0})],x.prototype,"capabilities",void 0),(0,s._)([(0,c.r)("service","capabilities",["capabilities"])],x.prototype,"readCapabilities",null),(0,s._)([(0,u.Cb)({json:{read:{source:"copyrightText"}}})],x.prototype,"copyright",void 0),(0,s._)([(0,u.Cb)({readOnly:!0,type:g.Z})],x.prototype,"heightModelInfo",void 0),(0,s._)([(0,u.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],x.prototype,"path",void 0),(0,s._)([(0,u.Cb)({type:["show","hide"]})],x.prototype,"listMode",void 0),(0,s._)([(0,u.Cb)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],x.prototype,"minScale",void 0),(0,s._)([(0,u.Cb)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],x.prototype,"maxScale",void 0),(0,s._)([(0,u.Cb)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],x.prototype,"opacity",void 0),(0,s._)([(0,u.Cb)({type:["ArcGISTiledElevationServiceLayer"]})],x.prototype,"operationalLayerType",void 0),(0,s._)([(0,u.Cb)()],x.prototype,"sourceJSON",void 0),(0,s._)([(0,u.Cb)({json:{read:!1},value:"elevation",readOnly:!0})],x.prototype,"type",void 0),(0,s._)([(0,u.Cb)(w.HQ)],x.prototype,"url",void 0),(0,s._)([(0,u.Cb)()],x.prototype,"version",void 0),(0,s._)([(0,c.r)("version",["currentVersion"])],x.prototype,"readVersion",null),x=(0,s._)([(0,m.j)("esri.layers.ElevationLayer")],x);const C=Symbol("default-fetch-tile");x.prototype.fetchTile[C]=!0;const k=x},46486:(e,t,i)=>{i.d(t,{Z:()=>d});var s=i(43697),r=(i(66577),i(5600)),n=(i(75215),i(67676),i(80442),i(71715)),o=i(52011),a=i(11145),l=i(42238),h=i(28589),u=i(82971);const d=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}destroy(){this.tilemapCache?.destroy?.()}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,i){const s=t.capabilities?.includes("Tilemap");let{minLOD:r,maxLOD:n,minScale:o,maxScale:u}=t;if(null==r&&null==n&&0!==o&&0!==u){const e=e=>Math.round(1e4*e)/1e4;o=e(o||t.tileInfo.lods[0].scale),u=e(u||t.tileInfo.lods[t.tileInfo.lods.length-1].scale);for(const i of t.tileInfo.lods){const t=e(i.scale);r=t>=o?i.level:r,n=t>=u?i.level:n}}if(s)return new h.y({layer:this,minLOD:r,maxLOD:n});if(t.tileInfo){const e=new a.Z;return e.read(t.tileInfo,i),new l.Z(e,r,n)}return null}};return(0,s._)([(0,r.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,s._)([(0,r.Cb)()],t.prototype,"minScale",void 0),(0,s._)([(0,n.r)("service","minScale")],t.prototype,"readMinScale",null),(0,s._)([(0,r.Cb)()],t.prototype,"maxScale",void 0),(0,s._)([(0,n.r)("service","maxScale")],t.prototype,"readMaxScale",null),(0,s._)([(0,r.Cb)({type:u.Z})],t.prototype,"spatialReference",void 0),(0,s._)([(0,r.Cb)({readOnly:!0})],t.prototype,"supportsBlankTile",null),(0,s._)([(0,r.Cb)({type:a.Z})],t.prototype,"tileInfo",void 0),(0,s._)([(0,r.Cb)()],t.prototype,"tilemapCache",void 0),(0,s._)([(0,n.r)("service","tilemapCache",["capabilities","tileInfo"])],t.prototype,"readTilemapCache",null),(0,s._)([(0,r.Cb)()],t.prototype,"version",void 0),t=(0,s._)([(0,o.j)("esri.layers.mixins.ArcGISCachedService")],t),t}},42238:(e,t,i)=>{i.d(t,{Z:()=>n});var s=i(20102),r=i(95330);class n{constructor(e,t=0,i=e.lods[e.lods.length-1].level){this.tileInfo=e,this.minLOD=t,this.maxLOD=i,e.lodAt(t)||(this.minLOD=e.lods[0].level),e.lodAt(i)||(this.maxLOD=e.lods[e.lods.length-1].level)}get effectiveMinLOD(){return this.minLOD??this.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}getAvailability(e,t,i){const s=this.tileInfo?.lodAt(e);return!s||e<this.minLOD||e>this.maxLOD?"unavailable":s.cols&&s.rows?i>=s.cols[0]&&i<=s.cols[1]&&t>=s.rows[0]&&t<=s.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,i,n){await(0,r.Yn)(n);const o=this.getAvailability(e,t,i);if("unavailable"===o)throw new s.Z("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i});return o}async fetchAvailabilityUpsample(e,t,i,s,n){await(0,r.Yn)(n),s.level=e,s.row=t,s.col=i;const o=this.tileInfo;return o.updateTileInfo(s),this.fetchAvailability(e,t,i,n).catch((e=>{if((0,r.D_)(e))throw e;if(o.upsampleTile(s))return this.fetchAvailabilityUpsample(s.level,s.row,s.col,s,n);throw e}))}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2220],{22862:(e,t,n)=>{n.d(t,{Hg:()=>y,V7:()=>c,uD:()=>h});var r=n(92036),i=n(46791),o=n(1153);const s=["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"];function a(e){return e instanceof r.Z}function l(e){return e instanceof i.Z?Object.keys(e.items):a(e)?(0,o.vw)(e).keys():e?Object.keys(e):[]}function p(e,t){return e instanceof i.Z?e.items[t]:e[t]}function d(e){return e?e.declaredClass:null}function u(e,t){const n=e.diff;if(n&&"function"==typeof n)return n(e,t);const r=l(e),i=l(t);if(0===r.length&&0===i.length)return;if(!r.length||!i.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 o=i.filter((e=>!r.includes(e))),h=r.filter((e=>!i.includes(e))),c=r.filter((n=>i.includes(n)&&p(e,n)!==p(t,n))).concat(o,h).sort(),y=d(e);if(y&&s.includes(y)&&c.length)return{type:"complete",oldValue:e,newValue:t};let f;const m=a(e)&&a(t);for(const r of c){const i=p(e,r),o=p(t,r);let s;if((m||"function"!=typeof i&&"function"!=typeof o)&&i!==o&&(null!=i||null!=o)){if(n&&n[r]&&"function"==typeof n[r])s=n[r]?.(i,o);else if(i instanceof Date&&o instanceof Date){if(i.getTime()===o.getTime())continue;s={type:"complete",oldValue:i,newValue:o}}else s="object"==typeof i&&"object"==typeof o&&d(i)===d(o)?u(i,o):{type:"complete",oldValue:i,newValue:o};null!=s&&(null!=f?f.diff[r]=s:f={type:"partial",diff:{[r]:s}})}}return f}function h(e,t){if(null==e)return!1;const n=t.split(".");let r=e;for(const e of n){if("complete"===r.type)return!0;if("partial"!==r.type)return!1;{const t=r.diff[e];if(!t)return!1;r=t}}return!0}function c(e,t){for(const n of t)if(h(e,n))return!0;return!1}function y(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&d(e)!==d(t)?{type:"complete",oldValue:e,newValue:t}:u(e,t)}},24133:(e,t,n)=>{n.d(t,{Q:()=>s});var r=n(67676),i=n(44553),o=n(88764);class s{constructor(e=9,t){this._compareMinX=d,this._compareMinY=u,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),w.prune(),b.prune(),x.prune(),C.prune()}all(e){this._all(this._data,e)}search(e,t){let n=this._data;const r=this._toBBox;if(g(e,n))for(w.clear();n;){for(let i=0,o=n.children.length;i<o;i++){const o=n.children[i],s=n.leaf?r(o):o;g(e,s)&&(n.leaf?t(o):m(e,s)?this._all(o,t):w.push(o))}n=w.pop()}}collides(e){let t=this._data;const n=this._toBBox;if(!g(e,t))return!1;for(w.clear();t;){for(let r=0,i=t.children.length;r<i;r++){const i=t.children[r],o=t.leaf?n(i):i;if(g(e,o)){if(t.leaf||m(e,o))return!0;w.push(i)}}t=w.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new I([]),this}remove(e){if(!e)return this;let t,n=this._data,i=null,o=0,s=!1;const a=this._toBBox(e);for(x.clear(),C.clear();n||x.length>0;){if(n||(n=x.pop(),i=x.data[x.length-1],o=C.pop()??0,s=!0),n.leaf&&(t=(0,r.cq)(n.children,e,n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),x.push(n),this._condense(x),this;s||n.leaf||!m(n,a)?i?(o++,n=i.children[o],s=!1):n=null:(x.push(n),C.push(o),o=0,i=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_all(e,t){let n=e;for(b.clear();n;){if(!0===n.leaf)for(const e of n.children)t(e);else b.pushArray(n.children);n=b.pop()??null}}_build(e,t,n,r){const i=n-t+1;let o=this._maxEntries;if(i<=o){const r=new I(e.slice(t,n+1));return a(r,this._toBBox),r}r||(r=Math.ceil(Math.log(i)/Math.log(o)),o=Math.ceil(i/o**(r-1)));const s=new M([]);s.height=r;const l=Math.ceil(i/o),p=l*Math.ceil(Math.sqrt(o));_(e,t,n,p,this._compareMinX);for(let i=t;i<=n;i+=p){const t=Math.min(i+p-1,n);_(e,i,t,l,this._compareMinY);for(let n=i;n<=t;n+=l){const i=Math.min(n+l-1,t);s.children.push(this._build(e,n,i,r-1))}}return a(s,this._toBBox),s}_chooseSubtree(e,t,n,r){for(;r.push(t),!0!==t.leaf&&r.length-1!==n;){let n,r=1/0,i=1/0;for(let o=0,s=t.children.length;o<s;o++){const s=t.children[o],a=h(s),l=y(e,s)-a;l<i?(i=l,r=a<r?a:r,n=s):l===i&&a<r&&(r=a,n=s)}t=n||t.children[0]}return t}_insert(e,t,n){const r=this._toBBox,i=n?e:r(e);x.clear();const o=this._chooseSubtree(i,this._data,t,x);for(o.children.push(e),p(o,i);t>=0&&x.data[t].children.length>this._maxEntries;)this._split(x,t),t--;this._adjustParentBBoxes(i,x,t)}_split(e,t){const n=e.data[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);const o=this._chooseSplitIndex(n,i,r);if(!o)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const s=n.children.splice(o,n.children.length-o),l=n.leaf?new I(s):new M(s);l.height=n.height,a(n,this._toBBox),a(l,this._toBBox),t?e.data[t-1].children.push(l):this._splitRoot(n,l)}_splitRoot(e,t){this._data=new M([e,t]),this._data.height=e.height+1,a(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let r,i,o;r=i=1/0;for(let s=t;s<=n-t;s++){const t=l(e,0,s,this._toBBox),a=l(e,s,n,this._toBBox),p=f(t,a),d=h(t)+h(a);p<r?(r=p,o=s,i=d<i?d:i):p===r&&d<i&&(i=d,o=s)}return o}_chooseSplitAxis(e,t,n){const r=e.leaf?this._compareMinX:d,i=e.leaf?this._compareMinY:u;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,i)&&e.children.sort(r)}_allDistMargin(e,t,n,r){e.children.sort(r);const i=this._toBBox,o=l(e,0,t,i),s=l(e,n-t,n,i);let a=c(o)+c(s);for(let r=t;r<n-t;r++){const t=e.children[r];p(o,e.leaf?i(t):t),a+=c(o)}for(let r=n-t-1;r>=t;r--){const t=e.children[r];p(s,e.leaf?i(t):t),a+=c(s)}return a}_adjustParentBBoxes(e,t,n){for(let r=n;r>=0;r--)p(t.data[r],e)}_condense(e){for(let t=e.length-1;t>=0;t--){const n=e.data[t];if(0===n.children.length)if(t>0){const i=e.data[t-1],o=i.children;o.splice((0,r.cq)(o,n,o.length,i.indexHint),1)}else this.clear();else a(n,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){l(e,0,e.children.length,t,e)}function l(e,t,n,r,i){i||(i=new I([])),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let o,s=t;s<n;s++)o=e.children[s],p(i,e.leaf?r(o):o);return i}function p(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function u(e,t){return e.minY-t.minY}function h(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function c(e){return e.maxX-e.minX+(e.maxY-e.minY)}function y(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function f(e,t){const n=Math.max(e.minX,t.minX),r=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,i-n)*Math.max(0,o-r)}function m(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function g(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function _(e,t,n,r,i){const s=[t,n];for(;s.length;){const t=s.pop(),n=s.pop();if(t-n<=r)continue;const a=n+Math.ceil((t-n)/r/2)*r;(0,o.q)(e,a,n,t,i),s.push(n,a,a,t)}}const w=new i.Z,b=new i.Z,x=new i.Z,C=new i.Z({deallocator:void 0});class E{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class T extends E{constructor(){super(...arguments),this.height=1,this.indexHint=new r.SO}}class I extends T{constructor(e){super(),this.children=e,this.leaf=!0}}class M extends T{constructor(e){super(),this.children=e,this.leaf=!1}}},84864:(e,t,n)=>{n.d(t,{bU:()=>d,fC:()=>c,tp:()=>h,v7:()=>u});const r=new Float64Array(2),i=new Float64Array(2),o="0123456789bcdefghjkmnpqrstuvwxyz";function s(e){return o[e]}function a(e){return(e[0]+e[1])/2}function l(e,t,n){return e[0]=t,e[1]=n,e}function p(e,t){const n=t>a(e);return function(e,t){const n=a(e),r=t,i=!t;e[0]=i*e[0]+r*n,e[1]=i*n+r*e[1]}(e,n),n}function d(e,t){let n=-90,r=90,i=-180,o=180;for(let s=0;s<t;s++){const t=Math.ceil((s+1)/2),a=Math.floor((s+1)/2),l=1-s%2,p=30-(3*t+2*a),d=30-(2*t+3*a),u=3*l+2*(1-l),h=2*l+3*(1-l),c=3*l+7*(1-l)<<d,y=(7*l+3*(1-l)<<p&e.geohashX)>>p,f=(c&e.geohashY)>>d;for(let e=u-1;e>=0;e--){const t=(i+o)/2,n=y&1<<e?1:0;i=(1-n)*i+n*t,o=(1-n)*t+n*o}for(let e=h-1;e>=0;e--){const t=(n+r)/2,i=f&1<<e?1:0;n=(1-i)*n+i*t,r=(1-i)*t+i*r}}return[i,n,o,r]}function u(e,t,n,r){r%2&&(r+=1);let i=0,o=0,s=-90,a=90,l=-180,p=180;for(let e=0;e<r/2;e++){for(let t=0;t<5;t++){const r=(l+p)/2,o=n>r?1:0;i|=o<<29-(t+5*e),l=(1-o)*l+o*r,p=(1-o)*r+o*p}for(let n=0;n<5;n++){const r=(s+a)/2,i=t>r?1:0;o|=i<<29-(n+5*e),s=(1-i)*s+i*r,a=(1-i)*r+i*a}}e.geohashX=i,e.geohashY=o}function h(e,t,n,r,i){i%2&&(i+=1);let o=0,s=0,a=-90,l=90,p=-180,d=180;for(let e=0;e<i/2;e++){for(let t=0;t<5;t++){const n=(p+d)/2,i=r>n?1:0;o|=i<<29-(t+5*e),p=(1-i)*p+i*n,d=(1-i)*n+i*d}for(let t=0;t<5;t++){const r=(a+l)/2,i=n>r?1:0;s|=i<<29-(t+5*e),a=(1-i)*a+i*r,l=(1-i)*r+i*l}}e[2*t]=o,e[2*t+1]=s}function c(e,t,n){let o="";const a=l(r,-90,90),d=l(i,-180,180);for(let r=0;r<n;r++){let n=0;r%2?(n|=p(a,e)<<4,n|=p(d,t)<<3,n|=p(a,e)<<2,n|=p(d,t)<<1,n|=p(a,e)<<0):(n|=p(d,t)<<4,n|=p(a,e)<<3,n|=p(d,t)<<2,n|=p(a,e)<<1,n|=p(d,t)<<0),o+=s(n)}return o}},16306:(e,t,n)=>{n.d(t,{aX:()=>C});var r=n(68773),i=n(20102),o=n(92604),s=n(38913),a=n(58901),l=n(73913),p=n(8744),d=n(40488),u=(n(66577),n(3172)),h=n(33955),c=n(11282),y=n(17452);async function f(e,t,n){const r="string"==typeof e?(0,y.mN)(e):e,i=t[0].spatialReference,o=(0,h.Ji)(t[0]),s={...n,query:{...r.query,f:"json",sr:i.wkid??JSON.stringify(i),geometries:JSON.stringify((l=t,{geometryType:(0,h.Ji)(l[0]),geometries:l.map((e=>e.toJSON()))}))}},{data:a}=await(0,u.Z)(r.path+"/simplify",s);var l;return function(e,t,n){const r=(0,h.q9)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=n,t}))}(a.geometries,o,i)}const m=o.Z.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function _(e){return"polyline"===e[0].type}function w(e,t,n){if(t){const t=function(e,t){if(!(e instanceof a.Z||e instanceof s.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw m.error(e),new i.Z(e)}const n=(0,l.x3)(e),r=[];for(const e of n){const n=[];r.push(n),n.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const i=e[r][0],o=e[r][1],s=e[r+1][0],a=e[r+1][1],l=Math.sqrt((s-i)*(s-i)+(a-o)*(a-o)),p=(a-o)/l,d=(s-i)/l,u=l/t;if(u>1){for(let e=1;e<=u-1;e++){const r=e*t,s=d*r+i,a=p*r+o;n.push([s,a])}const e=(l+Math.floor(u-1)*t)/2,r=d*e+i,s=p*e+o;n.push([r,s])}n.push([s,a])}}return function(e){return"polygon"===e.type}(e)?new s.Z({rings:r,spatialReference:e.spatialReference}):new a.Z({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,d.Sx)(t,!0)}return n&&(e=(0,l.Sy)(e,n)),e}function b(e,t,n){if(Array.isArray(e)){const r=e[0];if(r>t){const n=(0,l.XZ)(r,t);e[0]=r+n*(-2*t)}else if(r<n){const t=(0,l.XZ)(r,n);e[0]=r+t*(-2*n)}}else{const r=e.x;if(r>t){const n=(0,l.XZ)(r,t);e=e.clone().offset(n*(-2*t),0)}else if(r<n){const t=(0,l.XZ)(r,n);e=e.clone().offset(t*(-2*n),0)}}return e}function x(e,t){let n=-1;for(let r=0;r<t.cutIndexes.length;r++){const i=t.cutIndexes[r],o=t.geometries[r],s=(0,l.x3)(o);for(let e=0;e<s.length;e++){const t=s[e];t.some((n=>{if(n[0]<180)return!0;{let n=0;for(let e=0;e<t.length;e++){const r=t[e][0];n=r>n?r:n}n=Number(n.toFixed(9));const r=-360*(0,l.XZ)(n,180);for(let n=0;n<t.length;n++){const t=o.getPoint(e,n);o.setPoint(e,n,t.clone().offset(r,0))}return!0}}))}if(i===n){if(g(e))for(const t of(0,l.x3)(o))e[i]=e[i].addRing(t);else if(_(e))for(const t of(0,l.x3)(o))e[i]=e[i].addPath(t)}else n=i,e[i]=o}return e}async function C(e,t,n){if(!Array.isArray(e))return C([e],t);t&&"string"!=typeof t&&m.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const i="string"==typeof t?t:t?.url??r.default.geometryServiceUrl;let o,y,g,_,E,T,I,M,v=0;const k=[],S=[];for(const t of e)if(null!=t)if(o||(o=t.spatialReference,y=(0,p.C5)(o),g=o.isWebMercator,T=g?102100:4326,_=l.UZ[T].maxX,E=l.UZ[T].minX,I=l.UZ[T].plus180Line,M=l.UZ[T].minus180Line),y)if("mesh"===t.type)S.push(t);else if("point"===t.type)S.push(b(t.clone(),_,E));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>b(e,_,E))),S.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,y);S.push(e.rings?new s.Z(e):e)}else if(t.extent){const e=t.extent,n=(0,l.XZ)(e.xmin,E)*(2*_);let r=0===n?t.clone():(0,l.Sy)(t.clone(),n);e.offset(n,0),e.intersects(I)&&e.xmax!==_?(v=e.xmax>v?e.xmax:v,r=w(r,g),k.push(r),S.push("cut")):e.intersects(M)&&e.xmin!==E?(v=e.xmax*(2*_)>v?e.xmax*(2*_):v,r=w(r,g,360),k.push(r),S.push("cut")):S.push(r)}else S.push(t.clone());else S.push(t);else S.push(t);let L=(0,l.XZ)(v,_),D=-90;const R=L,G=new a.Z;for(;L>0;){const e=360*L-180;G.addPath([[e,D],[e,-1*D]]),D*=-1,L--}if(k.length>0&&R>0){const t=x(k,await async function(e,t,n,r){const i=(0,c.en)(e),o=t[0].spatialReference,s={...r,query:{...i.query,f:"json",sr:JSON.stringify(o),target:JSON.stringify({geometryType:(0,h.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(n)}},a=await(0,u.Z)(i.path+"/cut",s),{cutIndexes:l,geometries:p=[]}=a.data;return{cutIndexes:l,geometries:p.map((e=>{const t=(0,h.im)(e);return t.spatialReference=o,t}))}}(i,k,G,n)),r=[],o=[];for(let n=0;n<S.length;n++){const i=S[n];if("cut"!==i)o.push(i);else{const i=t.shift(),s=e[n];null!=s&&"polygon"===s.type&&s.rings&&s.rings.length>1&&i.rings.length>=s.rings.length?(r.push(i),o.push("simplify")):o.push(g?(0,d.$)(i):i)}}if(!r.length)return o;const s=await f(i,r,n),a=[];for(let e=0;e<o.length;e++){const t=o[e];"simplify"!==t?a.push(t):a.push(g?(0,d.$)(s.shift()):s.shift())}return a}const N=[];for(let e=0;e<S.length;e++){const t=S[e];if("cut"!==t)N.push(t);else{const e=k.shift();N.push(!0===g?(0,d.$)(e):e)}}return N}},73913:(e,t,n)=>{n.d(t,{Sy:()=>l,UZ:()=>s,XZ:()=>a,x3:()=>p});var r=n(58901),i=n(82971),o=n(33955);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.Z.WebMercator}),minus180Line:new r.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.Z({paths:[[[180,-180],[180,180]]],spatialReference:i.Z.WGS84}),minus180Line:new r.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:i.Z.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const n=p(e);for(const e of n)for(const n of e)n[0]+=t;return e}function p(e){return(0,o.oU)(e)?e.rings:e.paths}},28552:(e,t,n)=>{n.r(t),n.d(t,{default:()=>nn});var r=n(43697),i=(n(66577),n(46791)),o=n(20102),s=n(92604),a=n(95330),l=n(5600),p=(n(75215),n(67676),n(80442)),d=n(52011),u=n(84864),h=n(87085),c=n(98732),y=n(5428),f=n(92036),m=n(42033),g=n(38913),_=n(44547),w=n(8744),b=n(70272),x=n(33955);class C{constructor(){this._featureLookup=new Map}static getInstance(){return C.instance||(C.instance=new C),C.instance}static resetInstance(){C.instance&&(C.instance=null)}deleteFromStore(e){e.forEach((e=>{this._featureLookup.delete(e)}))}readFromStoreByList(e){const t=[];return e.forEach((e=>{const n=this.readFromStoreById(e);n&&t.push(n)})),t}readFromStoreById(e){return this._featureLookup.get(e)??null}writeToStore(e,t,n){const r=[];return e.forEach((e=>{if(!e||!e.id)return;e.properties||(e.properties=[]);let i,o=null;if(n&&e.properties[n]&&(o=(0,c.GH)(e.properties[n])),"originId"in e&&"destinationId"in e&&(e.properties.ESRI__ORIGIN_ID=e.originId,e.properties.ESRI__DESTINATION_ID=e.destinationId),e.properties[t]=e.id,e.id&&this._featureLookup.has(e.id)&&this._featureLookup.get(e.id).attributes){const r=this._featureLookup.get(e.id),s=JSON.parse(JSON.stringify(Object.assign(r.attributes,e.properties)));n&&e.properties[n]&&(s[n]=(0,x.im)(e.properties[n])),i=new b.u_(o?JSON.parse(JSON.stringify(o)):r?.geometry?JSON.parse(JSON.stringify(r.geometry)):null,s,null,e.properties[t])}else i=new b.u_(o?JSON.parse(JSON.stringify(o)):null,e.properties,null,e.properties[t]);this._featureLookup.set(e.id,i),r.push(i)})),r}}var E=n(40330),T=n(3172);let I=class extends f.Z{constructor(e){super(e),this.resultRows=[]}};(0,r._)([(0,l.Cb)()],I.prototype,"resultRows",void 0),I=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.GraphQueryResult")],I);const M=I;let v=class extends f.Z{constructor(e){super(e),this.resultRowsStream=new ReadableStream}};(0,r._)([(0,l.Cb)()],v.prototype,"resultRowsStream",void 0),v=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.GraphQueryResult")],v);const k=v;var S=n(96674),L=n(82971);let D=class extends S.wq{constructor(e){super(e),this.name=null,this.unique=null,this.ascending=null,this.description=null,this.fieldNames=null}};(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],D.prototype,"name",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],D.prototype,"unique",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],D.prototype,"ascending",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],D.prototype,"description",void 0),(0,r._)([(0,l.Cb)({type:[String],json:{write:!0}})],D.prototype,"fieldNames",void 0),D=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.FieldIndex")],D);const R=D;let G=class extends S.wq{constructor(e){super(e),this.name=null,this.alias=null,this.fieldType=null,this.geometryType=null,this.hasM=null,this.hasZ=null,this.nullable=null,this.editable=null,this.required=null,this.defaultVisibility=null,this.systemMaintained=null,this.role=null,this.defaultValue=null}};(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],G.prototype,"name",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],G.prototype,"alias",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],G.prototype,"fieldType",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],G.prototype,"geometryType",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],G.prototype,"hasM",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],G.prototype,"hasZ",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],G.prototype,"nullable",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],G.prototype,"editable",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],G.prototype,"required",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],G.prototype,"defaultVisibility",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],G.prototype,"systemMaintained",void 0),(0,r._)([(0,l.Cb)()],G.prototype,"role",void 0),(0,r._)([(0,l.Cb)({type:Object,json:{type:String,write:{writer:(e,t)=>{t.defaultValue=null!=e?e.toString():null}}}})],G.prototype,"defaultValue",void 0),G=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.GraphProperty")],G);const N=G;let j=class extends S.wq{constructor(e){super(e),this.name=null,this.alias=null,this.role=null,this.strict=null,this.properties=null,this.fieldIndexes=null}};(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],j.prototype,"name",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],j.prototype,"alias",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],j.prototype,"role",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],j.prototype,"strict",void 0),(0,r._)([(0,l.Cb)({type:[N],json:{write:!0}})],j.prototype,"properties",void 0),(0,r._)([(0,l.Cb)({type:[R],json:{write:!0}})],j.prototype,"fieldIndexes",void 0),j=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.GraphObjectType")],j);const Z=j;let O=class extends Z{constructor(e){super(e)}};O=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.EntityType")],O);const F=O;let P=class extends Z{constructor(e){super(e),this.endPoints=[]}};(0,r._)([(0,l.Cb)()],P.prototype,"endPoints",void 0),P=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.RelationshipType")],P);const A=P;let B=class extends S.wq{constructor(e){super(e),this.timestamp=null,this.spatialReference=null,this.strict=null,this.objectIdField=null,this.globalIdField=null,this.arcgisManaged=null,this.identifierInfo=null,this.searchIndexes=null,this.entityTypes=null,this.relationshipTypes=null}};(0,r._)([(0,l.Cb)({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.timestamp=e?.getTime()}}}})],B.prototype,"timestamp",void 0),(0,r._)([(0,l.Cb)({type:L.Z,json:{write:!0}})],B.prototype,"spatialReference",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],B.prototype,"strict",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],B.prototype,"objectIdField",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],B.prototype,"globalIdField",void 0),(0,r._)([(0,l.Cb)()],B.prototype,"arcgisManaged",void 0),(0,r._)([(0,l.Cb)()],B.prototype,"identifierInfo",void 0),(0,r._)([(0,l.Cb)()],B.prototype,"searchIndexes",void 0),(0,r._)([(0,l.Cb)({type:[F],json:{write:!0}})],B.prototype,"entityTypes",void 0),(0,r._)([(0,l.Cb)({type:[A],json:{write:!0}})],B.prototype,"relationshipTypes",void 0),B=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.DataModel")],B);const z=B;let q=class extends S.wq{constructor(e){super(e),this.capabilities=[],this.supportsSearch=!1,this.supportedQueryFormats=[],this.allowGeometryUpdates=!1,this.searchMaxRecordCount=null,this.serviceCapabilities=null,this.maxRecordCount=null,this.description="",this.copyrightText="",this.units="",this.spatialReference=null,this.currentVersion=null,this.dateFieldsTimeReference=null,this.serviceItemId="",this.supportsDocuments=!1,this.dataEditingNotSupported=!1,this.schemaEditingNotSupported=!1}};(0,r._)([(0,l.Cb)({type:[String],json:{write:!0}})],q.prototype,"capabilities",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],q.prototype,"supportsSearch",void 0),(0,r._)([(0,l.Cb)({type:[String],json:{write:!0}})],q.prototype,"supportedQueryFormats",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],q.prototype,"allowGeometryUpdates",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],q.prototype,"searchMaxRecordCount",void 0),(0,r._)([(0,l.Cb)({type:Object,json:{write:!0}})],q.prototype,"serviceCapabilities",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],q.prototype,"maxRecordCount",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],q.prototype,"description",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],q.prototype,"copyrightText",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],q.prototype,"units",void 0),(0,r._)([(0,l.Cb)({type:Object,json:{write:!0}})],q.prototype,"spatialReference",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],q.prototype,"currentVersion",void 0),(0,r._)([(0,l.Cb)({type:Object,json:{write:!0}})],q.prototype,"dateFieldsTimeReference",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],q.prototype,"serviceItemId",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],q.prototype,"supportsDocuments",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],q.prototype,"dataEditingNotSupported",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],q.prototype,"schemaEditingNotSupported",void 0),q=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.ServiceDefinition")],q);const Y=q;let U=class extends S.wq{constructor(e){super(e),this.dataModel=null,this.serviceDefinition=null}};(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],U.prototype,"url",void 0),(0,r._)([(0,l.Cb)({type:z,json:{write:!0}})],U.prototype,"dataModel",void 0),(0,r._)([(0,l.Cb)({type:Y,json:{write:!0}})],U.prototype,"serviceDefinition",void 0),U=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.KnowledgeGraph")],U);const Q=U;var X=n(99880);const H="esri/rest/knowledgeGraph/wasmInterface/";let J,$=null;async function V(){const e=$??J;if(e)return e;const t=(0,p.Z)("wasm-simd");return J=async function(e){if(e){const{default:e}=await n.e(5389).then(n.bind(n,35389)).then((e=>e.a));return e({locateFile:e=>(0,X.V)(H+e)})}const{default:t}=await n.e(9931).then(n.bind(n,39931)).then((e=>e.a));return t({locateFile:e=>(0,X.V)(H+e)})}(t),J}var W=n(65091),K=n(94139),ee=n(58901),te=n(9361);function ne(e,t){const n=new t.ArrayValue;return n.deleteLater(),e.forEach((e=>{n.add_value(oe(e,t))})),n}function re(e,t){const n=new t.ObjectValue;n.deleteLater();for(const[r,i]of Object.entries(e))n.set_key_value(r,oe(i,t));return n}function ie(e,t){if(e instanceof W.Z)return function(e,t){const n=new t.GeometryValue;n.deleteLater(),n.geometry_type=n.geometry_type=t.esriGeometryType.esriGeometryMultipoint,n.has_z=e.hasZ,n.has_m=e.hasM;const r=[],i=[];i[0]=e.points.length;let o=0;return e.points.forEach((e=>{e.forEach((e=>{r[o]=e,o++}))})),n.coords=new Float64Array(r),n.lengths=new Uint32Array(i),n}(e,t);if(e instanceof K.Z)return function(e,t){const n=new t.GeometryValue;n.deleteLater(),n.geometry_type=t.esriGeometryType.esriGeometryPoint,n.has_z=e.hasZ,n.has_m=e.hasM;const r=[],i=[];i[0]=1,r[0]=e.x,r[1]=e.y;let o=2;return e.hasZ&&(r[o]=e.z,o++),e.hasM&&(r[o]=e.m,o++),n.coords=new Float64Array(r),n.lengths=new Uint32Array(i),n}(e,t);if(e instanceof ee.Z||e instanceof g.Z)return function(e,t){const n=new t.GeometryValue;n.deleteLater(),n.has_z=e.hasZ,n.has_m=e.hasM;const r=[],i=[];let o=[];e instanceof ee.Z?(n.geometry_type=t.esriGeometryType.esriGeometryPolyline,o=e.paths):e instanceof g.Z&&(n.geometry_type=t.esriGeometryType.esriGeometryPolygon,o=e.rings);let s=0,a=0;return o.forEach((e=>{let t=0;e.forEach((e=>{t++,e.forEach((e=>{r[a]=e,a++}))})),i[s]=t,s++})),n.coords=new Float64Array(r),n.lengths=new Uint32Array(i),n}(e,t);throw new o.Z("knowledge-graph:unsupported-geometry","Only Point, Multipoint, Polyline, and Polygon geometry are supported by ArcGIS Knowledge",{geometry:e})}function oe(e,t){if(null==e)return"";if("object"!=typeof e)return e;if(e instanceof Date)return e;if(e instanceof te.Z)return ie(e,t);if(Array.isArray(e)){const n=new t.ArrayValue;return n.deleteLater(),e.forEach((e=>{n.add_value(oe(e,t))})),n}return re(e,t)}let se=class extends S.wq{constructor(e){super(e),this.properties=null}};(0,r._)([(0,l.Cb)({json:{write:!0}})],se.prototype,"properties",void 0),se=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.GraphObject")],se);const ae=se;let le=class extends ae{constructor(e){super(e),this.typeName=null,this.id=null}};(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],le.prototype,"typeName",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],le.prototype,"id",void 0),le=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.GraphNamedObject")],le);const pe=le;let de=class extends pe{constructor(e){super(e),this.layoutGeometry=null}};(0,r._)([(0,l.Cb)({type:K.Z,json:{write:!0}})],de.prototype,"layoutGeometry",void 0),de=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.Entity")],de);const ue=de;let he=class extends pe{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],he.prototype,"originId",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],he.prototype,"destinationId",void 0),(0,r._)([(0,l.Cb)({type:ee.Z,json:{write:!0}})],he.prototype,"layoutGeometry",void 0),he=(0,r._)([(0,d.j)("esri.rest.Relationship.Relationship")],he);const ce=he;function ye(e,t){if(!e.typeName)throw new o.Z("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits");if(e instanceof ue){const n=new t.EntityValue;n.deleteLater(),n.type_name=e.typeName;for(const[r,i]of Object.entries(e.properties))n.set_key_value(r,fe(i,t));return e.id&&n.set_id(e.id),n}if(e instanceof ce){const n=new t.RelationshipValue;n.deleteLater(),n.type_name=e.typeName;for(const[r,i]of Object.entries(e.properties))n.set_key_value(r,fe(i,t));return e.id&&n.set_id(e.id),e.originId&&e.destinationId&&n.set_related_entity_ids(e.originId,e.destinationId),n}throw new o.Z("knowledge-graph:applyEdits-encoding-failure","Could not determine the type of a named graph object passed to the encoder")}function fe(e,t){return null==e?"":"object"!=typeof e||e instanceof Date?e:e instanceof te.Z?ie(e,t):""}let me=class extends f.Z{constructor(e){super(e),this.name=null,this.supportedCategory=null,this.analyzers=[],this.searchProperties=new Map}};(0,r._)([(0,l.Cb)()],me.prototype,"name",void 0),(0,r._)([(0,l.Cb)()],me.prototype,"supportedCategory",void 0),(0,r._)([(0,l.Cb)()],me.prototype,"analyzers",void 0),(0,r._)([(0,l.Cb)()],me.prototype,"searchProperties",void 0),me=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.SearchIndex")],me);const ge=me;var _e,we,be,xe,Ce,Ee,Te;function Ie(e){return e.deleteLater(),new F(ve(e))}function Me(e){return e.deleteLater(),new R({name:e.name,unique:e.unique,ascending:e.ascending,description:e.description,fieldNames:De(e.fields)})}function ve(e){return{name:e.name,alias:e.alias,role:_e[e.role.value]?_e[e.role.value]:null,strict:e.strict,properties:Re(e.properties),fieldIndexes:Ge(e.field_indexes)}}function ke(e){return e.deleteLater(),new N({alias:e.alias,name:e.name,fieldType:we[e.field_type.value]?we[e.field_type.value]:null,geometryType:be[e.geometry_type.value]?be[e.geometry_type.value]:null,hasM:e.has_m,hasZ:e.has_z,nullable:e.nullable,editable:e.editable,required:e.required,defaultVisibility:e.default_visibility,systemMaintained:e.system_maintained,role:Ee[e.role.value],defaultValue:e.default_value})}function Se(e){e.deleteLater();const t=ve(e),n=[];for(let t=0;t<e.end_points.size();t++){const r=e.end_points.get(t);n.push({originEntityType:r.origin_entity_type,destinationEntityType:r.dest_entity_type})}return new A(Object.assign({endPoints:n},t))}function Le(e){const t=[];for(let n=0;n<e.size();n++)t.push(Ie(e.get(n)));return t}function De(e){const t=[];for(let n=0;n<e.size();n++)t.push(e.get(n));return t}function Re(e){const t=[];for(let n=0;n<e.size();n++)t.push(ke(e.get(n)));return t}function Ge(e){const t=[];for(let n=0;n<e.size();n++)t.push(Me(e.get(n)));return t}function Ne(e){const t=[];for(let n=0;n<e.size();n++)t.push(Se(e.get(n)));return t}function je(e){const t=[];for(let n=0;n<e.size();n++){const n=new ge,r=e.get(0);n.name=r.name,n.supportedCategory=Ce[r.supported_category.value];const i=r.analyzers.size();for(let e=0;e<i;e++)n.analyzers.push({name:r.analyzers.get(e).name});for(let e=0;e<r.search_properties.keys().size();e++){const t=r.search_properties.keys().get(e),i=r.search_properties.get(t),o=[];for(let e=0;e<i.property_names.size();e++)o.push(i.property_names.get(e));n.searchProperties.set(t,{propertyNames:o})}t.push(n)}return t}!function(e){e[e.Regular=0]="Regular",e[e.Provenance=1]="Provenance",e[e.Document=2]="Document"}(_e||(_e={})),function(e){e[e.esriFieldTypeSmallInteger=0]="esriFieldTypeSmallInteger",e[e.esriFieldTypeInteger=1]="esriFieldTypeInteger",e[e.esriFieldTypeSingle=2]="esriFieldTypeSingle",e[e.esriFieldTypeDouble=3]="esriFieldTypeDouble",e[e.esriFieldTypeString=4]="esriFieldTypeString",e[e.esriFieldTypeDate=5]="esriFieldTypeDate",e[e.esriFieldTypeOID=6]="esriFieldTypeOID",e[e.esriFieldTypeGeometry=7]="esriFieldTypeGeometry",e[e.esriFieldTypeBlob=8]="esriFieldTypeBlob",e[e.esriFieldTypeRaster=9]="esriFieldTypeRaster",e[e.esriFieldTypeGUID=10]="esriFieldTypeGUID",e[e.esriFieldTypeGlobalID=11]="esriFieldTypeGlobalID",e[e.esriFieldTypeXML=12]="esriFieldTypeXML",e[e.esriFieldTypeBigInteger=13]="esriFieldTypeBigInteger"}(we||(we={})),function(e){e[e.esriGeometryNull=0]="esriGeometryNull",e[e.esriGeometryPoint=1]="esriGeometryPoint",e[e.esriGeometryMultipoint=2]="esriGeometryMultipoint",e[e.esriGeometryPolyline=3]="esriGeometryPolyline",e[e.esriGeometryPolygon=4]="esriGeometryPolygon",e[e.esriGeometryEnvelope=5]="esriGeometryEnvelope",e[e.esriGeometryAny=6]="esriGeometryAny",e[e.esriGeometryMultiPatch=7]="esriGeometryMultiPatch"}(be||(be={})),function(e){e[e.esriMethodHintUNSPECIFIED=0]="esriMethodHintUNSPECIFIED",e[e.esriUUIDESRI=1]="esriUUIDESRI",e[e.esriUUIDRFC4122=2]="esriUUIDRFC4122"}(xe||(xe={})),function(e){e[e.esriTypeUNSPECIFIED=0]="esriTypeUNSPECIFIED",e[e.esriTypeEntity=1]="esriTypeEntity",e[e.esriTypeRelationship=2]="esriTypeRelationship",e[e.esriTypeBoth=4]="esriTypeBoth"}(Ce||(Ce={})),function(e){e[e.esriGraphPropertyUNSPECIFIED=0]="esriGraphPropertyUNSPECIFIED",e[e.esriGraphPropertyRegular=1]="esriGraphPropertyRegular",e[e.esriGraphPropertyDocumentName=2]="esriGraphPropertyDocumentName",e[e.esriGraphPropertyDocumentTitle=3]="esriGraphPropertyDocumentTitle",e[e.esriGraphPropertyDocumentUrl=4]="esriGraphPropertyDocumentUrl",e[e.esriGraphPropertyDocumentText=5]="esriGraphPropertyDocumentText",e[e.esriGraphPropertyDocumentKeywords=6]="esriGraphPropertyDocumentKeywords",e[e.esriGraphPropertyDocumentContentType=7]="esriGraphPropertyDocumentContentType",e[e.esriGraphPropertyDocumentMetadata=8]="esriGraphPropertyDocumentMetadata",e[e.esriGraphPropertyDocumentFileExtension=9]="esriGraphPropertyDocumentFileExtension"}(Ee||(Ee={})),function(e){e[e.esriIdentifierInfoTypeUNSPECIFIED=0]="esriIdentifierInfoTypeUNSPECIFIED",e[e.esriIdentifierInfoTypeDatabaseNative=1]="esriIdentifierInfoTypeDatabaseNative",e[e.esriIdentifierInfoTypeUniformProperty=2]="esriIdentifierInfoTypeUniformProperty"}(Te||(Te={}));let Ze=class extends ae{constructor(e){super(e)}};Ze=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.ObjectValue")],Ze);const Oe=Ze;let Fe=class extends S.wq{constructor(e){super(e),this.path=null}};(0,r._)([(0,l.Cb)({type:[ae],json:{write:!0}})],Fe.prototype,"path",void 0),Fe=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.Path")],Fe);const Pe=Fe;var Ae,Be,ze;function qe(e){const t={},n=Ye(e,t),r=e.lengths,i=e.coords;let s="";if(e.geometry_type.value===Ae.ESRI_GEOMETRY_POLYGON)s="rings";else{if(e.geometry_type.value!==Ae.ESRI_GEOMETRY_POLYLINE)throw new o.Z("KnowledgeGraph:illegal-geometry-type","Illegal Geometry type for multipath conversion");s="paths"}t[s]=[];let a=0;return r.forEach((e=>{const r=[];for(let t=0;t<e;t++){const e=[];for(let t=0;t<n;t++)e[t]=i[a],a++;r.push(e)}t[s].push(r)})),t}function Ye(e,t){let n=2;return e.has_z?(t.hasZ=e.has_z,n++):t.hasZ=!1,e.has_m?(t.hasM=e.has_m,n++):t.hasM=!1,n}!function(e){e[e.ESRI_GEOMETRY_NULL=0]="ESRI_GEOMETRY_NULL",e[e.ESRI_GEOMETRY_POINT=1]="ESRI_GEOMETRY_POINT",e[e.ESRI_GEOMETRY_MULTIPOINT=2]="ESRI_GEOMETRY_MULTIPOINT",e[e.ESRI_GEOMETRY_POLYLINE=3]="ESRI_GEOMETRY_POLYLINE",e[e.ESRI_GEOMETRY_POLYGON=4]="ESRI_GEOMETRY_POLYGON",e[e.ESRI_GEOMETRY_ENVELOPE=5]="ESRI_GEOMETRY_ENVELOPE",e[e.ESRI_GEOMETRY_ANY=6]="ESRI_GEOMETRY_ANY",e[e.ESRI_GEOMETRY_MULTI_PATCH=7]="ESRI_GEOMETRY_MULTI_PATCH"}(Ae||(Ae={})),function(e){e[e.OBJECT=0]="OBJECT",e[e.ENTITY=1]="ENTITY",e[e.RELATIONSHIP=2]="RELATIONSHIP",e[e.PATH=3]="PATH",e[e.ARRAY=4]="ARRAY"}(Be||(Be={})),function(e){e[e.view=0]="view",e[e.edit=1]="edit"}(ze||(ze={}));const Ue=s.Z.getLogger("esri.rest.knowledgeGraph.WasmToQueryResponseObjConstructors"),Qe={decodedWasmObjToQueryResponseObj:(e,t)=>{if(null==e)return null;if("object"!=typeof e)return e;if("getDate"in e)return e;if("geometry_type"in e)switch(e.geometry_type.value){case null:return null;case Ae.ESRI_GEOMETRY_POINT:return function(e){const t={};let n=2;Ye(e,t);const r=e.coords;return t.x=r[0],t.y=r[1],e.has_z&&(t.z=r[n],n++),e.has_m&&(t.m=r[n]),new K.Z(t)}(e);case Ae.ESRI_GEOMETRY_MULTIPOINT:return function(e){const t={},n=Ye(e,t),r=e.lengths,i=e.coords,o=r[0];t.points=[];let s=0;for(let e=0;e<o;e++){const e=[];for(let t=0;t<n;t++)e[t]=i[s],s++;t.points.push(e)}return new W.Z(t)}(e);case Ae.ESRI_GEOMETRY_POLYLINE:return n=e,new ee.Z(qe(n));case Ae.ESRI_GEOMETRY_POLYGON:return function(e){return new g.Z(qe(e))}(e);case Ae.ESRI_GEOMETRY_ENVELOPE:case Ae.ESRI_GEOMETRY_MULTI_PATCH:return Ue.warnOnce("Envelope and Multipatch are not supported on knowledge entities, but one of those geometry types was detected. Result interpreted as null"),null;case Ae.ESRI_GEOMETRY_NULL:case Ae.ESRI_GEOMETRY_ANY:default:return Ue.warnOnce("Unknown or blank geometry type returned - Result interpreted as null"),null}else{if(!("object_value_type"in e))return Ue.warnOnce("A decoded value came back of a type that is not supported. Result interpreted as null"),null;switch(e.object_value_type.value){case Be.OBJECT:return function(e,t){return new Oe(Je(e,t))}(e,t);case Be.ENTITY:return He(e,t);case Be.RELATIONSHIP:return $e(e,t);case Be.PATH:return function(e,t){const n=e.entity_count(),r=e.relationship_count(),i=[];for(let o=0;o<n;o++)i.push(He(e.get_entity_at(o),t)),o<r&&i.push($e(e.get_relationship_at(o),t));return new Pe({path:i})}(e,t);case Be.ARRAY:return function(e,t){const n=[],r=e.count();for(let i=0;i<r;i++){const r=e.get_value_at(i);n.push(Xe(r,t))}return n}(e,t);default:return Ue.warnOnce("Unknown graph object type detected! Result interpreted as null"),null}}var n}};function Xe(e,t){return Qe.decodedWasmObjToQueryResponseObj(e,t)}function He(e,t){const n=e.type_name,r=Je(e,t),i=e.get_id();return new ue(Object.assign({typeName:n,id:i},r))}function Je(e,t){const n={},r=e.key_count();for(let i=0;i<r;i++)n[e.get_key_at(i)]=Xe(e.get_value_at(i),t);return{properties:n}}function $e(e,t){const n=e.type_name,r=Je(e,t);return new ce(Object.assign({typeName:n,id:e.get_id(),originId:e.get_origin_entity_id(),destinationId:e.get_destination_entity_id()},r))}let Ve=class extends f.Z{constructor(e){super(e),this.hasError=null,this.error=null,this.editResults=[]}};(0,r._)([(0,l.Cb)()],Ve.prototype,"hasError",void 0),(0,r._)([(0,l.Cb)()],Ve.prototype,"error",void 0),(0,r._)([(0,l.Cb)()],Ve.prototype,"editResults",void 0),Ve=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.GraphApplyEdits")],Ve);const We=Ve,Ke={fetchKnowledgeGraph:async e=>{const t=new Q({url:e}),n=[];return n.push(tt(t)),n.push(async function(e){return Ke.refreshServiceDefinition(e)}(t)),await Promise.all(n),t},refreshDataModel:async e=>{e.dataModel=await pt(e)},refreshServiceDefinition:async e=>{const t=(await(0,T.Z)(e.url,{query:{f:"json"}})).data;return t.capabilities=t?.capabilities?.split(","),t.supportedQueryFormats=t?.supportedQueryFormats?.split(","),e.serviceDefinition=new Y(t),e.serviceDefinition},executeQueryStreaming:async(e,t,n)=>{const r=`${e.url}/graph/query`;await rt(e);const i=await st(r,n);i.data.body=await async function(e,t){const n=await V(),r=new n.GraphQueryRequestEncoder;if(r.deleteLater(),r.output_spatial_reference=n.SpatialReferenceUtil.WGS84(),r.open_cypher_query=e.openCypherQuery,e.bindParameters)for(const[t,i]of Object.entries(e.bindParameters))ot(t,i,r,n);if(e.bindGeometryQuantizationParameters)!function(e,t){t.input_quantization_parameters={xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.bindGeometryQuantizationParameters,r);else{if(t.dataModel||await tt(t),4326!==t.dataModel?.spatialReference?.wkid)throw new o.Z("knowledge-graph:SR-quantization-mismatch","If the DataModel indicates a coordinate system other than WGS84, inputQuantizationParameters must be provided to the query encoder");r.input_quantization_parameters=n.InputQuantizationUtil.WGS84_lossless()}e.outputQuantizationParameters&&function(e,t,n){if(!e.extent)throw new o.Z("knowledge-graph:illegal-output-quantization","The Output quantization provided to the encoder had an illegal value as part of its extent",e.extent);if(!e.quantizeMode)throw new o.Z("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal mode setting",e.quantizeMode);if(!e.tolerance)throw new o.Z("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal tolerance setting",e.quantizeMode);t.output_quantization_parameters={extent:{xmax:e.extent.xmax,ymax:e.extent.ymax,xmin:e.extent.xmin,ymin:e.extent.ymin},quantize_mode:n.esriQuantizeMode[e.quantizeMode],tolerance:e.tolerance}}(e.outputQuantizationParameters,r,n);try{r.encode()}catch(e){throw new o.Z("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{error:e})}const i=r.get_encoding_result();if(0!==i.error.error_code)throw new o.Z("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{errorCode:i.error.error_code,errorMessage:i.error.error_message});return i.get_byte_buffer()}(t,e);const s=await nt(i.data.url,i.data);if(e.dataModel)return new k({resultRowsStream:await lt(s,e.dataModel)});throw new o.Z("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},executeApplyEdits:async(e,t,n)=>{if(e.serviceDefinition?.dataEditingNotSupported)throw new o.Z("knowledge-graph:data-editing-not-supported","The Knowledge Graph Service definition indicated that data editing is not supported");const r=`${e.url}/graph/applyEdits`;await rt(e);const i=await st(r,n);return i.data.body=await async function(e,t){if(t.dataModel||await tt(t),!t.dataModel)throw new o.Z("knowledge-graph:data-model-undefined","Encoding could not proceed because a data model was not provided and it could not be determined from the service");const n=await V(),r=!!e.options?.cascadeDelete,i=new n.GraphApplyEditsEncoder(n.SpatialReferenceUtil.WGS84(),e.options?.inputQuantizationParameters?function(e){return{xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.options?.inputQuantizationParameters):n.InputQuantizationUtil.WGS84_lossless());i.deleteLater(),i.cascade_delete=r;try{let t;e.entityAdds?.forEach((e=>{t=i.add_entity(ye(e,n)),it(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")})),e.relationshipAdds?.forEach((e=>{if(!e.originId||!e.destinationId)throw new o.Z("knowledge-graph:relationship-origin-destination-missing","When adding a new relationship, you must provide both an origin and destination id on the appropriate class property");t=i.add_relationship(ye(e,n)),it(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")})),e.entityUpdates?.forEach((e=>{if(!e.id)throw new o.Z("knowledge-graph:entity-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=i.update_entity(ye(e,n)),it(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")})),e.relationshipUpdates?.forEach((e=>{if(!e.id)throw new o.Z("knowledge-graph:relationship-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=i.update_relationship(ye(e,n)),it(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")})),e.entityDeletes?.forEach((e=>{if(!e.typeName)throw new o.Z("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=i.make_delete_helper(e.typeName,!0);t.deleteLater(),e.ids?.forEach((e=>{t.delete_by_id(e)}))})),e.relationshipDeletes?.forEach((e=>{if(!e.typeName)throw new o.Z("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=i.make_delete_helper(e.typeName,!1);e.ids?.forEach((e=>{t.delete_by_id(e)}))})),i.encode()}catch(e){throw new o.Z("knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed",{error:e})}const s=i.get_encoding_result();return it(s.error,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed"),s.get_byte_buffer()}(t,e),async function(e){const t=e.headers.get("content-type");if(t?.includes("application/x-protobuf")){const t=await e.arrayBuffer(),n=new((await V()).GraphApplyEditsDecoder);return n.deleteLater(),n.decode(new Uint8Array(t)),function(e){const t=new We;t.hasError=e.has_error(),t.hasError&&(t.error={errorCode:e.error.error_code,errorMessage:e.error.error_message});const n=e.get_edit_results_count();for(let r=0;r<n;r++){const n=e.get_edit_results_at(r),i=e.get_edit_results_type_name_at(r),o=[],s=[],a=[],l=n.get_add_results_count(),p=n.get_update_results_count(),d=n.get_delete_results_count();for(let e=0;e<l;e++){const t=n.get_add_result_at(e);o.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}for(let e=0;e<p;e++){const t=n.get_update_result_at(e);s.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}for(let e=0;e<d;e++){const t=n.get_delete_result_at(e);a.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}t.editResults.push({typeName:i,adds:o,updates:s,deletes:a})}return t}(n)}throw new o.Z("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:t,data:e.text()})}(await nt(i.data.url,i.data))},executeQuery:async(e,t,n)=>{const r=`${e.url}/graph/query`,i=await(0,T.Z)(r,{responseType:"array-buffer",query:{f:"pbf",openCypherQuery:t.openCypherQuery,...n?.query},signal:n?.signal,timeout:n?.timeout}),s=i.getHeader?.("content-type"),a=i.data;if(s?.includes("application/x-protobuf")){const t=new((await V()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel)return new M({resultRows:at(t,a,e.dataModel)});throw new o.Z("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new o.Z("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:s,data:i.data})},executeSearch:async(e,t,n)=>{const r=t.typeCategoryFilter,i=`${e.url}/graph/search`,s=await(0,T.Z)(i,{responseType:"array-buffer",query:{f:"pbf",searchQuery:`"${t.searchQuery}"`,typeCategoryFilter:r,...n?.query},signal:n?.signal,timeout:n?.timeout}),a=s.getHeader?.("content-type"),l=s.data;if(a?.includes("application/x-protobuf")){const t=new((await V()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel)return new M({resultRows:at(t,l,e.dataModel)});throw new o.Z("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new o.Z("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:a,data:s.data})},executeSearchStreaming:async(e,t,n)=>{const r=`${e.url}/graph/search`;await rt(e);const i=await st(r,n);i.data.body=await async function(e){const t=await V(),n=new t.GraphSearchRequestEncoder;if(n.deleteLater(),n.search_query=e.searchQuery,n.type_category_filter=t.esriNamedTypeCategory[e.typeCategoryFilter],!0===e.returnSearchContext&&(n.return_search_context=e.returnSearchContext),null!=e.start&&e.start>0&&(n.start_index=e.start),null!=e.num&&(n.max_num_results=e.num),null!=e.idsFilter&&Array.isArray(e.idsFilter)&&e.idsFilter.length>0)try{n.set_ids_filter(ne(e.idsFilter,t))}catch(e){throw new o.Z("knowledge-graph:ids-format-error","Attempting to set ids filter failed. This is usually caused by an incorrectly formatted UUID string",{error:e})}e.namedTypesFilter?.forEach((e=>{n.add_named_type_filter(e)}));try{n.encode()}catch(e){throw new o.Z("knowledge-graph:search-encoding-failed","Attempting to encode the search failed",{error:e})}const r=n.get_encoding_result();if(0!==r.error.error_code)throw new o.Z("knowledge-graph:search-encoding-failed","Attempting to get encoding result from the query failed",{errorCode:r.error.error_code,errorMessage:r.error.error_message});return r.get_byte_buffer()}(t);const s=await nt(i.data.url,i.data);if(e.dataModel)return new k({resultRowsStream:await lt(s,e.dataModel)});throw new o.Z("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},_fetchWrapper:async(e,t)=>fetch(e,t)};async function et(e,t,n){return Ke.executeQueryStreaming(e,t,n)}async function tt(e){return Ke.refreshDataModel(e)}async function nt(e,t){return Ke._fetchWrapper(e,t)}async function rt(e){const t=E.id?.findCredential(e.url);t||(e.dataModel?await pt(e):await tt(e))}function it(e,t,n){if(0!==e.error_code)throw new o.Z(t,n,{errorCode:e.error_code,errorMessage:e.error_message})}function ot(e,t,n,r){null==t?n.set_param_key_value(e,""):"object"!=typeof t||t instanceof Date?n.set_param_key_value(e,t):t instanceof te.Z?n.set_param_key_value(e,ie(t,r)):t instanceof Array?n.set_param_key_value(e,ne(t,r)):n.set_param_key_value(e,re(t,r))}async function st(e,t){return(0,T.Z)(e,{responseType:"native-request-init",method:"post",query:{f:"pbf",...t?.query},body:"x",headers:{"Content-Type":"application/octet-stream"},signal:t?.signal,timeout:t?.timeout})}function at(e,t,n){e.push_buffer(new Uint8Array(t));const r=[];let i=0;for(;e.next_row();){i||(i=e.get_header_keys().size());const t=new Array(i);for(let r=0;r<i;r++){const i=e.get_value(r);t[r]=Xe(i,n)}r.push(t)}if(e.has_error())throw new o.Z("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded",{errorCode:e.error.error_code,errorMessage:e.error.error_message});return r}async function lt(e,t){const n=e.headers.get("content-type");if(e.headers.get("content-length")&&s.Z.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("Found `Content-Length` header when expecting a streaming HTTP response! Please investigate whether all intermediate HTTP proxies and/or load balancers are configured such that they don't forcefully buffer the entire response before returning it to the client. A valid HTTP streaming response should use Chunked Transfer Encoding and not have a Content Length defined."),n?.includes("application/x-protobuf")){const n=e.body?.getReader(),r=new((await V()).GraphQueryDecoder);return r.deleteLater(),new ReadableStream({async start(e){try{return function i(){return n?.read().then((({done:s,value:a})=>{if(s){let t;if(r.has_error()&&(t=new o.Z("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded",{errorCode:r.error.error_code,errorMessage:r.error.error_message})),n.releaseLock(),t)throw e.error(t),t;return void e.close()}const l=at(r,a,t);return l.length>0&&e.enqueue(l),i()}))}()}catch(t){n?.releaseLock(),e.error(new o.Z("knowledge-graph:stream-decoding-error","The server returned a valid response, but there was an error decoding the response stream",{error:t})),e.close()}}})}throw new o.Z("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:e.text()})}async function pt(e){const t=`${e.url}/dataModel/queryDataModel`,n=await(0,T.Z)(t,{responseType:"array-buffer",query:{f:"pbf"}}),r=n.getHeader?.("content-type"),i=n.data;if(r?.includes("application/x-protobuf")){const e=(await V()).decode_data_model_from_protocol_buffer(new Uint8Array(i));if(!e)throw new o.Z("knowledge-graph:data-model-decode-failure","The server responded to the data model query, but the response failed to be decoded. This typically occurs when the Knowledge JS API (4.26 or later) is used with an unsupported backend (11.0 or earlier)");return function(e){return e.deleteLater(),new z({timestamp:e.timestamp,spatialReference:new L.Z(e.spatial_reference),strict:e.strict,objectIdField:e.objectid_property,globalIdField:e.globalid_property,arcgisManaged:e.arcgis_managed,identifierInfo:{identifierMappingInfo:{identifierInfoType:Te[e.identifier_info?.identifier_mapping_info?.identifier_info_type?.value],databaseNativeIdentifier:e.identifier_info?.identifier_mapping_info?.database_native_identifier,uniformPropertyIdentifier:{identifierPropertyName:e.identifier_info?.identifier_mapping_info?.uniform_property_identifier?.identifier_property_name}},identifierGenerationInfo:{uuidMethodHint:xe[e.identifier_info?.identifier_generation_info?.uuid_method_hint?.value]}},searchIndexes:je(e.search_indexes),entityTypes:Le(e.entity_types),relationshipTypes:Ne(e.relationship_types)})}(e)}throw new o.Z("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:r,data:n.data})}let dt=class extends f.Z{constructor(e){super(e),this.openCypherQuery=""}};(0,r._)([(0,l.Cb)()],dt.prototype,"openCypherQuery",void 0),dt=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.GraphQuery")],dt);const ut=dt;let ht=class extends ut{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null}};(0,r._)([(0,l.Cb)()],ht.prototype,"bindParameters",void 0),(0,r._)([(0,l.Cb)()],ht.prototype,"bindGeometryQuantizationParameters",void 0),(0,r._)([(0,l.Cb)()],ht.prototype,"outputQuantizationParameters",void 0),ht=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.GraphQueryStreaming")],ht);const ct=ht;var yt=n(14165),ft=n(6570);const mt="ESRI__ID",gt="ESRI__ORIGIN_ID",_t="ESRI__DESTINATION_ID",wt="ESRI__LAYOUT_GEOMETRY",bt=12,xt=s.Z.getLogger("esri.rest.knowledgeGraph.knowledgeGraphLayer.KnowledgeGraphLayerDataManager");let Ct=class extends f.Z{constructor(e){super(e),this.inclusionModeDefinition={generateAllSublayers:!0,namedTypeDefinitions:new Map},this.entityTypeNames=new Set,this.relationshipTypeNames=new Set,this.geographicLookup=new Map,this.sublayerCaches=new Map,this._processingCacheUpdatesLookup=new Map,this._memberIdTypeLookup=new Map;const t=new Map;e.knowledgeGraph.dataModel.entityTypes?.forEach((n=>{n.name&&(t.set(n.name,"entity"),this._processingCacheUpdatesLookup.set(n.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.entityTypeNames.add(n.name),n.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(n.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.knowledgeGraph.dataModel.relationshipTypes?.forEach((n=>{n.name&&(t.set(n.name,"relationship"),this._processingCacheUpdatesLookup.set(n.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.relationshipTypeNames.add(n.name),n.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(n.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((n,r)=>{if("entity"===t.get(r))this.entityTypeNames.add(r);else{if("relationship"!==t.get(r))return xt.warn(`A named type, ${r}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(r);this.relationshipTypeNames.add(r)}const i=new Map;n.members?.forEach((e=>{this._memberIdTypeLookup.set(e.id,r);const t=this.getById(e.id);t&&i.set(e.id,t)})),this.sublayerCaches.set(r,i)}))}addToLayerInclusionSet(e){e.forEach((({typeName:e,id:t})=>{if(!this.inclusionModeDefinition)throw new o.Z("knowledge-graph:layer-data-manager","You cannot add to a layer's exclusion list if it was not created with an exclusion list originally");if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){const n=this.inclusionModeDefinition.namedTypeDefinitions.get(e);n.members||(n.members=new Map),n.members.set(t,{id:t}),this._memberIdTypeLookup.set(t,e)}}else{const n=new Map;n.set(t,{id:t}),this.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:n}),this._memberIdTypeLookup.set(t,e)}}))}getById(e){return C.getInstance().readFromStoreById(e)}async getData(e,t,n){if(t.objectType.name&&this.inclusionModeDefinition?.namedTypeDefinitions&&this.inclusionModeDefinition.namedTypeDefinitions.size>0&&!this.inclusionModeDefinition.namedTypeDefinitions.has(t.objectType.name))return[];let r;if(r=e||new yt.Z({where:"1=1",outFields:["*"]}),"link-chart"===t.parentCompositeLayer.type){const e=t.parentCompositeLayer,n=this._processingCacheUpdatesLookup.get(t.objectType.name??""),i=r.outFields,o=r.geometry;let s="",a="";o&&o.extent&&(s=(0,u.fC)(o.extent.ymin,o.extent.xmin,bt),a=(0,u.fC)(o.extent.ymax,o.extent.xmax,bt)),i&&1===i.length&&i[0]===mt&&"1=1"===r.where||await Promise.all(n??[]);const l=this.sublayerCaches.has(t.objectType.name??"")?Array.from(this.sublayerCaches.get(t.objectType.name)?.values()):[],p=[];return l.forEach((n=>{if(n.geometry=e.linkChartDiagramLookup.get(n.attributes[t.objectIdField]),n.attributes[wt]=n.geometry,s&&a){const r=e.linkChartGeohashLookup.get(n.attributes[t.objectIdField]);r?r>=s&&r<=a&&p.push(n):p.push(n)}else p.push(n)})),p}return this.retrieveDataFromService(r,t,n)}async getConnectedRecordIds(e){const t=[],n=[],r=new Map;return e.forEach((e=>{if(this._memberIdTypeLookup.has(e)){const t=this._memberIdTypeLookup.get(e);if(!this.entityTypeNames.has(t))return;r.has(t)?r.get(t)?.push(e):r.set(t,[e])}})),r.forEach(((e,r)=>{const i=`MATCH (n:${r})-[r]-(m) WHERE id(n) IN $ids RETURN id(r), type(r), id(m), labels(m)[0]`,o=new Promise((n=>{(async()=>{const n=(await et(this.knowledgeGraph,new ct({openCypherQuery:i,bindParameters:{ids:e}}))).resultRowsStream.getReader();try{for(;;){const{done:e,value:r}=await n.read();if(e)break;for(let e=0;e<r.length;e++){const n=r[e];t.push({id:n[0],typeName:n[1]}),t.push({id:n[2],typeName:n[3]})}}}catch(e){if("AbortError"!==e.name)throw e;xt.info("Request aborted as expected")}})().then((()=>{n()}))}));n.push(o)})),await Promise.all(n),t}async refreshCacheContent(e,t,n,r=!0){const i=C.getInstance(),s=[],a=new Map,l=new Map;this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&l.set(e.name,e)})),this.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&l.set(e.name,e)})),e||this.inclusionModeDefinition?e?e.forEach((e=>{if(this._memberIdTypeLookup.has(e)){const t=this._memberIdTypeLookup.get(e);a.has(t)?a.get(t)?.push(e):a.set(t,[e])}})):this.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{e.useAllData?a.set(t,null):e.members&&e.members.forEach((e=>{a.has(t)&&null!==a.get(t)?a.get(t)?.push(e.id):a.set(t,[e.id])}))})):(this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&a.set(e.name,null)})),this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&a.set(e.name,null)})));for(const[e,p]of a){const a=new Promise((s=>{(async()=>{const s=new Set,a=[];let d,u="",h=!1;if(t||l.get(e)?.properties?.forEach((e=>{e.name&&s.add(e.name)})),n&&this.geographicLookup.has(e)){const t=this.geographicLookup.get(e)?.name;t&&s.add(t)}if(this.entityTypeNames.has(e))u=`MATCH (n:${e}) ${p?"WHERE id(n) IN $ids ":""}return ID(n)`,s.forEach((e=>{u+=`, n.${e}`,a.push(e)}));else{if(!this.relationshipTypeNames.has(e))throw new o.Z("knowledge-graph:layer-data-manager",`The graph type of ${e} could not be determined. Was this type set in the KG data model and inclusion definition?`);h=!0,u=`MATCH ()-[n:${e}]->() ${p?"WHERE id(n) IN $ids ":""}return ID(n), id(startNode(n)), id(endNode(n))`,s.forEach((e=>{u+=`, n.${e}`,a.push(e)}))}d=new ct(p?{openCypherQuery:u,bindParameters:{ids:p}}:{openCypherQuery:u});const c=(await et(this.knowledgeGraph,d)).resultRowsStream.getReader();for(;;){const{done:t,value:n}=await c.read();if(t)break;const o=[];for(let e=0;e<n.length;e++){const t=n[e];let r=0,i=0;const s={properties:{}};for(s.id=t[r],r++,i++,h&&(s.originId=t[r],r++,i++,s.destinationId=t[r],r++,i++);r<t.length;r++)s.properties[a[r-i]]=t[r];o.push(s)}const s=i.writeToStore(o,mt,this.geographicLookup.get(e)?.name);this.sublayerCaches.has(e)||this.sublayerCaches.set(e,new Map),r&&!this.inclusionModeDefinition?.namedTypeDefinitions.has(e)&&this.inclusionModeDefinition?.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),r&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members&&(this.inclusionModeDefinition.namedTypeDefinitions.get(e).members=new Map);const l=this.sublayerCaches.get(e);s.forEach((t=>{l?.set(t.attributes[mt],t),r&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.has(t.attributes[mt])&&(this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.set(t.attributes[mt],{id:t.attributes[mt]}),this._memberIdTypeLookup.set(t.attributes[mt],e))}))}})().then((()=>{s(null)}))}));s.push(a),this._processingCacheUpdatesLookup.get(e)?.push(a)}await Promise.all(s)}removeFromLayer(e){const t=new Set;e.forEach((e=>{this._memberIdTypeLookup.get(e)&&t.add(this._memberIdTypeLookup.get(e)),this._memberIdTypeLookup.delete(e),this.inclusionModeDefinition?.namedTypeDefinitions.forEach((t=>{t.members?.has(e)&&t.members.delete(e)}))})),t.forEach((t=>{this.sublayerCaches.get(t)?.forEach(((n,r)=>{e.includes(r)&&this.sublayerCaches.get(t)?.delete(r)}))}))}async retrieveDataFromService(e,t,n){const r=C.getInstance(),i=new Set,s=[];let a,l="",p=[];const d="relationship"===t.graphType,u=this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData,h=t.parentCompositeLayer.sublayerIdsCache.get(t.objectType.name);let c=!u&&h?Array.from(h).sort():null;if(this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData)this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData&&null!=e.objectIds&&(c=e.objectIds);else if(null!=e.objectIds&&c&&c.length>0){const t=e.objectIds;e.objectIds=c.filter((e=>t.includes(e)))}else if(null!=e.objectIds)c=e.objectIds;else{if(this.inclusionModeDefinition?.namedTypeDefinitions.has(t.objectType.name)&&(!this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members||this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members?.size<1))return e.objectIds=[],[];e.objectIds=c}if(null!=e.outFields){const n=e.outFields;n.includes("*")?t.fields.forEach((e=>{i.add(e.name)})):n.forEach((e=>{e!==mt&&e!==t.geometryFieldName&&i.add(e)}))}if(null!=e.geometry){const n=e.geometry;let r;const p=t.parentCompositeLayer.dataManager.knowledgeGraph.serviceDefinition,u=p?.spatialReference,h=p?.serviceCapabilities?.geometryCapabilities;let c=h?.geometryMaxBoundingRectangleSizeX,y=h?.geometryMaxBoundingRectangleSizeY;if(n?.extent?.spatialReference&&!n.spatialReference?.isWGS84?(await(0,_.initializeProjection)(n.extent.spatialReference,w.Zn),r=(0,_.iV)(n.extent,w.Zn)):r=n.extent,c&&y&&u){if(4326!==u.wkid){const e=new ft.Z({spatialReference:u,xmax:c,ymax:y}),t=(0,_.iV)(e,w.Zn);c=t.xmax,y=t.ymax}if(r.xmax-r.xmin>c)throw new o.Z("knowledge-graph:layer-data-manager",`Extent x bounds should be within ${c}° latitude, limit exceeded`);if(r.ymax-r.ymin>y)throw new o.Z("knowledge-graph:layer-data-manager",`Extent y bounds should be within ${y}° longitude, limit exceeded`)}if(null!=e.where&&"1=1"!==e.where){const n=await(0,m.E)(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach((e=>{n.fieldNames.includes(e.name)&&i.add(e.name)}))}l=d?`Match ()-[n:${t.objectType.name}]->() WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n), id(startNode(r)), id(endNode(r))`:`Match (n:${t.objectType.name}) WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n)`,t.geometryFieldName&&i.add(t.geometryFieldName),i.forEach((e=>{l+=`, n.${e}`,s.push(e)})),a=new ct({openCypherQuery:l,bindParameters:{param_filter_geom:new g.Z({rings:[[[r.xmin,r.ymin],[r.xmin,r.ymax],[r.xmax,r.ymax],[r.xmax,r.ymin],[r.xmin,r.ymin]]]})}})}else{let n="";if(null!=e.where&&"1=1"!==e.where){const r=await(0,m.E)(e.where,t.fieldsIndex);t.fields.forEach((e=>{r.fieldNames.includes(e.name)&&i.add(e.name)}));const o=["column-reference","string","number","binary-expression"],s=["=","<","<=","<>",">",">=","AND","OR","LIKE"];let a=!1;const l=e=>{if("column-reference"===e.type)return`n.${e.column}`;if("string"===e.type)return`'${e.value}'`;if("number"===e.type)return`${e.value}`;if("binary-expression"===e.type&&o.includes(e.left.type)&&o.includes(e.right.type)&&s.includes(e.operator))return`${l(e.left)} ${e.operator} ${l(e.right)}`;if("binary-expression"===e.type&&"LIKE"===e.operator){let t="";if("function"===e.left.type&&"column-reference"===e.left.args.value[0].type)t+=`lower(n.${e.left.args.value[0].column})`;else{if("column-reference"!==e.left.type)return a=!0,"";t+=`lower(n.${e.left.column})`}if(t+=" CONTAINS (","string"!==e.right.type)return a=!0,"";{let n=e.right.value;"%"===n.charAt(0)&&(n=n.slice(1)),"%"===n.charAt(n.length-1)&&(n=n.slice(0,-1)),t+=`'${n.toLowerCase()}')`}return t}return a=!0,""};n=l(r.parseTree),a&&(n="")}let r="";r=d?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let o=!1;c&&(o=!0,r+=" WHERE ID(n) IN $ids"),n&&(r+=o?" AND":" WHERE",r+=` ${n}`),r+=" return ID(n)",d&&(r+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&i.add(t.geometryFieldName),i.forEach((e=>{r+=`, n.${e}`,s.push(e)})),a=new ct(c?{openCypherQuery:r,bindParameters:{ids:c}}:{openCypherQuery:r})}const y=(await et(t.parentCompositeLayer.dataManager.knowledgeGraph,a,n)).resultRowsStream.getReader();for(;;){const{done:e,value:n}=await y.read();if(e)break;const i=[];for(let e=0;e<n.length;e++){const t=n[e];let r=0,o=0;const a={properties:{}};for(a.id=t[r],r++,o++,d&&(a.originId=t[r],r++,o++,a.destinationId=t[r],r++,o++);r<t.length;r++)a.properties[s[r-o]]=t[r];i.push(a)}p=p.concat(r.writeToStore(i,mt,t.parentCompositeLayer.dataManager.geographicLookup.get(t.objectType.name)?.name))}return p}};(0,r._)([(0,l.Cb)()],Ct.prototype,"knowledgeGraph",void 0),(0,r._)([(0,l.Cb)()],Ct.prototype,"inclusionModeDefinition",void 0),(0,r._)([(0,l.Cb)()],Ct.prototype,"entityTypeNames",void 0),(0,r._)([(0,l.Cb)()],Ct.prototype,"relationshipTypeNames",void 0),(0,r._)([(0,l.Cb)()],Ct.prototype,"geographicLookup",void 0),(0,r._)([(0,l.Cb)()],Ct.prototype,"sublayerCaches",void 0),Ct=(0,r._)([(0,d.j)("esri.rest.knowledgeGraph.knowledgeGraphLayer.KnowledgeGraphLayerDataManager")],Ct);var Et=n(51773),Tt=(n(16050),n(12501),n(28756),n(92271),n(72529),n(5499),n(84382),n(81571),n(91423)),It=n(32400),Mt=(n(56569),n(57191)),vt=n(64106),kt=n(25278);const St=(0,n(53518).v)(),Lt=e=>{let t=class extends e{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,r._)([(0,l.Cb)(St.fields)],t.prototype,"fields",void 0),(0,r._)([(0,l.Cb)(St.fieldsIndex)],t.prototype,"fieldsIndex",void 0),t=(0,r._)([(0,d.j)("esri.layers.knowledgeGraphLayer.KnowledgeGraphSublayerBase")],t),t};var Dt=n(71612),Rt=n(6404),Gt=n(34760),Nt=n(72965),jt=n(1231),Zt=n(35671),Ot=n(74889),Ft=n(32163),Pt=n(728),At=n(86973);let Bt=class extends((0,Rt.M)(Lt((0,Dt.h)((0,Nt.M)((0,Gt.Q)(h.Z)))))){constructor(e){if(super(e),this.capabilities=(0,kt.MS)(!1,!1),this.definitionExpression="",this.displayField="",this.elevationInfo=null,this.geometryType=null,this.geometryFieldName=null,this.graphType=null,this.hasM=!1,this.hasZ=!1,this.labelsVisible=null,this.labelingInfo=null,this.objectIdField=mt,this.objectType=null,this.parentCompositeLayer=null,this.popupTemplate=null,this.source={openPorts:()=>this.load().then((()=>{const e=new MessageChannel;return new Pt.default(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const n=yt.Z.fromJSON(e);return this.queryFeaturesJSON(n,t)}}},(()=>null)),[e.port2]}))},this.type="knowledge-graph-sublayer","link-chart"===e.parentCompositeLayer.type)"relationship"===e.graphType?this.geometryType="polyline":this.geometryType="point",this.geometryFieldName=wt;else if(e.parentCompositeLayer.dataManager.geographicLookup.get(e.objectType.name)?.geometryType&&"esriGeometryNull"!==e.parentCompositeLayer.dataManager.geographicLookup.get(e.objectType.name)?.geometryType){const t=e.parentCompositeLayer.dataManager.geographicLookup.get(e.objectType.name);this.geometryFieldName=t?.name??null,this.geometryType=t?.geometryType?At.M.fromJSON(t.geometryType):null;const n=t?.name,r=n?e.objectType.properties?.[n]:null;r?(this.hasM=r.hasM??!1,this.hasZ=r.hasZ??!1):(this.hasM=!1,this.hasZ=!1)}else this.geometryType=null;e.objectType.properties?.forEach((e=>{let t=e.fieldType;"esriFieldTypeOID"===t&&(t="esriFieldTypeInteger"),this.fields.push(jt.Z.fromJSON({name:e.name,type:t,alias:e.alias,defaultValue:null,editable:e.editable,nullable:e.nullable}))})),this.fields.push(jt.Z.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1})),this._set("fields",[...this.fields]),e.parentCompositeLayer.dataManager.knowledgeGraph.dataModel?.spatialReference&&(this.spatialReference=e.parentCompositeLayer.dataManager.knowledgeGraph.dataModel.spatialReference),"link-chart"===e.parentCompositeLayer.type?"relationship"===e.graphType?this.renderer=(0,Tt.i)((0,kt.bU)(At.M.toJSON("polyline")).renderer):this.renderer=(0,Tt.i)((0,kt.bU)(At.M.toJSON("point")).renderer):this.renderer=(0,Tt.i)((0,kt.bU)(At.M.toJSON(this.geometryType)).renderer)}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){(0,Zt.YN)(e,this.fieldsIndex),this._set("renderer",e)}createPopupTemplate(e){return(0,Ft.eZ)(this,e)}createQuery(){return new yt.Z({where:"1=1",outFields:["*"]})}getField(e){for(let t=0;t<this.fields.length;t++)if(this.fields[t].name===e)return this.fields[t];throw new Error("Field not found")}getFieldDomain(e,t){return null}async queryFeatures(e,t){const{resolvedQuery:n,queryEngine:r}=await this._setupQueryObjects(e),i=Ot.Z.fromJSON(await r.executeQuery(n.toJSON(),t?.signal));return i.features.forEach((e=>{e.sourceLayer=this})),i}async queryFeaturesJSON(e,t){const{resolvedQuery:n,queryEngine:r}=await this._setupQueryObjects(e);return await r.executeQuery(n.toJSON(),t?.signal)}async queryFeatureCount(e,t){const{resolvedQuery:n,queryEngine:r}=await this._setupQueryObjects(e);return r.executeQueryForCount(n.toJSON(),t?.signal)}async queryExtent(e={},t){const n={...e,returnGeometry:!0},{resolvedQuery:r,queryEngine:i}=await this._setupQueryObjects(n),o=await i.executeQueryForExtent(r.toJSON(),t?.signal);let s;return s=null!=o.extent?.xmin&&null!=o.extent?.xmax&&null!=o.extent?.ymin&&null!=o.extent?.ymax?new ft.Z(o.extent):new ft.Z,{count:o.count,extent:s}}async queryObjectIds(e,t){const n=yt.Z.from(e);let r;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)r=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(n,this,t);r=this.loadQueryEngine(e)}return r.executeQueryForIds(n.toJSON(),t?.signal)}loadQueryEngine(e){const t=new Mt.Z({geometryType:At.M.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),n=new vt.q({fields:this.fields.map((e=>e.toJSON())),geometryType:At.M.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,objectIdField:this.objectIdField,spatialReference:this.spatialReference.toJSON(),timeInfo:null,featureStore:t});return n.featureStore.addMany(e),n}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new yt.Z({where:"1=1",outFields:[mt]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}async _setupQueryObjects(e,t){const n=yt.Z.from(e),r=n.geometry;let i;if(r&&!r.spatialReference?.isWGS84&&(await(0,_.initializeProjection)(r.spatialReference,w.Zn),n.geometry=(0,_.iV)(r instanceof g.Z||r instanceof ee.Z?r:r.extent,w.Zn)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)i=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(n,this,t);i=this.loadQueryEngine(e)}return{resolvedQuery:n,queryEngine:i}}};(0,r._)([(0,l.Cb)()],Bt.prototype,"capabilities",void 0),(0,r._)([(0,l.Cb)({readOnly:!0})],Bt.prototype,"defaultPopupTemplate",null),(0,r._)([(0,l.Cb)()],Bt.prototype,"definitionExpression",void 0),(0,r._)([(0,l.Cb)()],Bt.prototype,"displayField",void 0),(0,r._)([(0,l.Cb)()],Bt.prototype,"elevationInfo",void 0),(0,r._)([(0,l.Cb)()],Bt.prototype,"geometryType",void 0),(0,r._)([(0,l.Cb)()],Bt.prototype,"geometryFieldName",void 0),(0,r._)([(0,l.Cb)()],Bt.prototype,"graphType",void 0),(0,r._)([(0,l.Cb)()],Bt.prototype,"hasM",void 0),(0,r._)([(0,l.Cb)()],Bt.prototype,"hasZ",void 0),(0,r._)([(0,l.Cb)()],Bt.prototype,"labelsVisible",void 0),(0,r._)([(0,l.Cb)()],Bt.prototype,"labelingInfo",void 0),(0,r._)([(0,l.Cb)()],Bt.prototype,"objectIdField",void 0),(0,r._)([(0,l.Cb)()],Bt.prototype,"objectType",void 0),(0,r._)([(0,l.Cb)()],Bt.prototype,"parentCompositeLayer",void 0),(0,r._)([(0,l.Cb)({type:Et.Z,json:{name:"popupInfo",write:!0}})],Bt.prototype,"popupTemplate",void 0),(0,r._)([(0,l.Cb)({types:It.A,json:{write:{target:"layerDefinition.drawingInfo.renderer"}}})],Bt.prototype,"renderer",null),(0,r._)([(0,l.Cb)()],Bt.prototype,"source",void 0),(0,r._)([(0,l.Cb)({json:{read:!1}})],Bt.prototype,"type",void 0),Bt=(0,r._)([(0,d.j)("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],Bt);const zt=Bt;let qt,Yt=null;var Ut,Qt,Xt,Ht,Jt,$t,Vt,Wt,Kt;function en(e,t,n,r,i,o){const s=n.length,a=i.length,l=Float64Array.BYTES_PER_ELEMENT,p=Uint32Array.BYTES_PER_ELEMENT,d=Uint8Array.BYTES_PER_ELEMENT,u=15+s*(d+2*l)+a*(2*p),h=Yt._malloc(u);try{const d=h+16-h%16,u=d+s*l,c=u+s*l,y=c+a*p,f=y+a*p,m=()=>[Yt.HEAPF64.subarray(d>>3,(d>>3)+s),Yt.HEAPF64.subarray(u>>3,(u>>3)+s),Yt.HEAPU32.subarray(c>>2,(c>>2)+a),Yt.HEAPU32.subarray(y>>2,(y>>2)+a),Yt.HEAPU8.subarray(f,f+s)],[g,_,w,b,x]=m();g.set(n),_.set(r),w.set(i),b.set(o),x.set(t);const C=e(s,f,d,u,a,c,y),[E,T,I,M,v]=m();return n.set(E),r.set(T),i.set(I),o.set(M),t.set(v),C}finally{Yt._free(h)}}!function(e){e[e.None=0]="None",e[e.IsMovable=1]="IsMovable",e[e.IsGeographic=2]="IsGeographic",e[e.IsRoot=4]="IsRoot"}(Ut||(Ut={})),function(e){e.getMinIdealEdgeLength=function(){return Yt.getMinIdealEdgeLength()},e.apply=function(e,t,n,r,i,o=2,s=1,a=-1){return en(((e,t,n,r,i,l,p)=>Yt.applyForceDirectedLayout(e,t,n,r,i,l,p,o,s,a)),e,t,n,r,i)}}(Qt||(Qt={})),function(e){e.apply=function(e,t,n,r,i,o=2,s=1,a=-1){return en(((e,t,n,r,i,l,p)=>Yt.applyCommunityLayout(e,t,n,r,i,l,p,o,s,a)),e,t,n,r,i)}}(Xt||(Xt={})),function(e){e.apply=function(e,t,n,r,i){return en(Yt.applySimpleLayout,e,t,n,r,i)}}(Ht||(Ht={})),function(e){e.apply=function(e,t,n,r,i){return en(Yt.applyHierarchicalLayout,e,t,n,r,i)}}(Jt||(Jt={})),function(e){e.apply=function(e,t,n,r,i){return en(Yt.applyRadialTreeLayout,e,t,n,r,i)}}($t||($t={})),function(e){e.apply=function(e,t,n,r,i){return en(Yt.applySmartTreeLayout,e,t,n,r,i)}}(Vt||(Vt={})),function(e){e[e.Undirected=0]="Undirected",e[e.Directed=1]="Directed",e[e.Reversed=2]="Reversed"}(Wt||(Wt={})),function(e){e[e.ByCC_Raw=0]="ByCC_Raw",e[e.ByCC_NormalizeGlobally=1]="ByCC_NormalizeGlobally",e[e.ByCC_NormalizeByCC=2]="ByCC_NormalizeByCC"}(Kt||(Kt={}));let tn=class extends((0,Dt.h)((0,Nt.M)(h.Z))){constructor(e){if(super(e),this.dataPreloadedInLocalCache=!1,this.defaultLinkChartConfig=null,this._currentLinkChartConfig={layoutMode:"RADIAL_TREE",xScaleFactor:1,yScaleFactor:1},this._graphTypeLookup=new Map,this.knowledgeGraph=null,this.layers=new i.Z,this.linkChartDiagramLookup=new Map,this.linkChartExtent=new ft.Z({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7}),this.linkChartGeohashLookup=new Map,this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.sublayerIdsCache=new Map,this.tables=new i.Z,this.type="link-chart",this._originalInclusionList=e.inclusionModeDefinition,e.dataPreloadedInLocalCache&&!e.inclusionModeDefinition)throw new o.Z("knowledge-graph:linkchart-layer-constructor","If creating a link chart composite layer and configured that data is already loaded in the cache, you must specify an inclusion list so the Composite Layer knows what records belong to it")}normalizeCtorArgs(e){return{url:e.url,title:e.title,dataPreloadedInLocalCache:e.dataPreloadedInLocalCache,defaultLinkChartConfig:e.defaultLinkChartConfig}}_initializeLayerProperties(e){if(!this.title&&this.url){const e=this.url.split("/");this.title=e[e.length-2]}const t=new Set;let n=[],r=[];if(e.inclusionModeDefinition&&(!e.inclusionModeDefinition.namedTypeDefinitions||e.inclusionModeDefinition.namedTypeDefinitions.size<1))throw new o.Z("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined");e.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),e.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),e.inclusionModeDefinition?.generateAllSublayers?(n=e.knowledgeGraph.dataModel.entityTypes??[],r=e.knowledgeGraph.dataModel.relationshipTypes??[]):e.inclusionModeDefinition?.namedTypeDefinitions&&e.inclusionModeDefinition?.namedTypeDefinitions.size>0?e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((i,o)=>{if(!this._graphTypeLookup.get(o))return s.Z.getLogger(this).warn(`A named type, ${o}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(o);this._graphTypeLookup.get(o)instanceof A||"strictOrigin"in this._graphTypeLookup.get(o)?t.has(o)||(t.add(o),r.push(this._graphTypeLookup.get(o))):this._graphTypeLookup.get(o)instanceof F||"properties"in this._graphTypeLookup.get(o)?t.has(o)||(t.add(o),n.push(this._graphTypeLookup.get(o))):(s.Z.getLogger(this).warn(`A named type, ${o}, was in the inclusion list that wasn't properly modeled and will be removed`),e.inclusionModeDefinition?.namedTypeDefinitions.delete(o))})):(n=e.knowledgeGraph.dataModel.entityTypes??[],r=e.knowledgeGraph.dataModel.relationshipTypes??[]);const i=new Ct({knowledgeGraph:e.knowledgeGraph,inclusionModeDefinition:e.inclusionModeDefinition});this.knowledgeGraph=e.knowledgeGraph,this.memberEntityTypes=n,this.memberRelationshipTypes=r,this.dataManager=i}load(e){return this.addResolvingPromise(new Promise((t=>{(async function(e){return Ke.fetchKnowledgeGraph(e)})(this.url).then((n=>{if(this._initializeLayerProperties({knowledgeGraph:n,inclusionModeDefinition:this._originalInclusionList}),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.size||(this.dataManager.inclusionModeDefinition={generateAllSublayers:!1,namedTypeDefinitions:new Map},this.dataManager.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})})),this.dataManager.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})}))),this.dataPreloadedInLocalCache)this.loadLayerAssumingLocalCache(),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach((e=>{e.useAllData=!1,e.members?.forEach((e=>{let t;t=e.linkChartLocation instanceof y.Z?e.linkChartLocation:e.linkChartLocation?(0,c.GH)(e.linkChartLocation):null,this.linkChartDiagramLookup.set(e.id,t),t&&2===t.coords.length&&0===t.lengths.length?this.linkChartGeohashLookup.set(e.id,(0,u.fC)(t.coords[1],t.coords[0],bt)):this.linkChartGeohashLookup.set(e.id,"")})),this.addResolvingPromise(this._initializeDiagram().then((async()=>{this.layers.forEach((async e=>{await e.refreshCachedQueryEngine()})),this.tables.forEach((async e=>{await e.refreshCachedQueryEngine()}))})))}));else{const t="GEOGRAPHIC"===this.defaultLinkChartConfig?.layoutMode;this.addResolvingPromise(this.dataManager.refreshCacheContent(void 0,!1,t,!0).then((async()=>{(0,a.k_)(e);const t=[],n=[];this.loadLayerAssumingLocalCache(),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1,this.dataManager.inclusionModeDefinition.namedTypeDefinitions.forEach((e=>{e.useAllData=!1}))),await this._initializeDiagram(),this.layers.forEach((e=>{n.push(e.refreshCachedQueryEngine()),t.push(new Promise((t=>{e.on("layerview-create",(()=>{t(null)}))})))})),this.tables.forEach((e=>{n.push(e.refreshCachedQueryEngine())})),await Promise.all(n)})))}t(null)}))}))),Promise.resolve(this)}async addRecords(e){await this._handleNewRecords(e)}async expand(e){const t=await this.dataManager.getConnectedRecordIds(e),n=t.filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)));return await this._handleNewRecords(t),{records:n}}loadLayerAssumingLocalCache(){this.memberRelationshipTypes.forEach((e=>{const t=new zt({objectType:e,parentCompositeLayer:this,graphType:"relationship",title:e.name});t.geometryType?this.layers.push(t):this.tables.push(t),this.dataManager.sublayerCaches.has(e.name)||this.dataManager.sublayerCaches.set(e.name,new Map)})),this.memberEntityTypes.forEach((e=>{const t=new zt({objectType:e,parentCompositeLayer:this,graphType:"entity",title:e.name});t.geometryType?this.layers.push(t):this.tables.push(t),this.dataManager.sublayerCaches.has(e.name)||this.dataManager.sublayerCaches.set(e.name,new Map)})),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{const n=((e,t,n)=>(e.has(t)||e.set(t,new Set),e.get(t)))(this.sublayerIdsCache,t);e.members?.forEach((e=>{if(n.add(e.id),e.linkChartLocation)if(e.linkChartLocation instanceof y.Z)this.linkChartDiagramLookup.set(e.id,e.linkChartLocation),2===e.linkChartLocation.coords.length&&0===e.linkChartLocation.lengths.length?this.linkChartGeohashLookup.set(e.id,(0,u.fC)(e.linkChartLocation.coords[1],e.linkChartLocation.coords[0],bt)):this.linkChartGeohashLookup.set(e.id,"");else{const t=(0,c.GH)(e.linkChartLocation);this.linkChartDiagramLookup.set(e.id,e.linkChartLocation?t:null),"x"in e.linkChartLocation&&"y"in e.linkChartLocation?this.linkChartGeohashLookup.set(e.id,(0,u.fC)(e.linkChartLocation.x,e.linkChartLocation.y,bt)):this.linkChartGeohashLookup.set(e.id,"")}}))}))}async calculateLinkChartLayout(e="RADIAL_TREE",t){const r=[],i=[];this.dataManager.sublayerCaches.forEach(((e,t)=>{this.dataManager.entityTypeNames.has(t)?e.forEach((e=>{r.push({typeName:t,feature:e})})):this.dataManager.relationshipTypeNames.has(t)&&e.forEach((e=>{i.push({typeName:t,feature:e})}))})),this.linkChartDiagramLookup=new Map;const a=new Map,l=new Map,p=new Map,d=new Map,h=new Uint8Array(r.length),y=new Float64Array(r.length),f=new Float64Array(r.length),m=new Uint32Array(i.length),g=new Uint32Array(i.length),_=[],w=t?.xScaleFactor??1,b=t?.yScaleFactor??1,x=new ft.Z({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7});let C,E="FORCE_DIRECTED",T=0,I=0;switch(E="GEOGRAPHIC"===e?"FORCE_DIRECTED":e,E){case"FORCE_DIRECTED":C=Qt.apply;break;case"COMMUNITY":C=Xt.apply;break;case"HIERARCHICAL":C=Jt.apply;break;case"RADIAL_TREE":C=$t.apply;break;case"SMART_TREE":C=Vt.apply;break;default:C=Ht.apply}r.forEach((({typeName:n,feature:r})=>{if(t?.lockedNodeLocations?.has(r.attributes[mt])){"GEOGRAPHIC"===e&&this.dataManager.geographicLookup.has(n)?h[T]=Ut.IsGeographic:h[T]=Ut.None;const i=t.lockedNodeLocations.get(r.attributes[mt]);y[T]=i.x,f[T]=i.y}else if("GEOGRAPHIC"===e&&this.dataManager.geographicLookup.has(n)){h[T]=Ut.IsGeographic;let e=null;const t=r.attributes[this.dataManager.geographicLookup.get(n).name],i=this.dataManager.geographicLookup.get(n)?.geometryType;switch(i){case"esriGeometryPoint":y[T]=t?.x,f[T]=t?.y;break;case"esriGeometryPolygon":e=t?.centroid,null!=e?.x&&null!=e?.y?(y[T]=e.x,f[T]=e.y):h[T]=Ut.IsMovable;break;case"esriGeometryPolyline":case"esriGeometryMultipoint":e=t?.extent?.center,null!=e?.x&&null!=e?.y?(y[T]=e.x,f[T]=e.y):h[T]=Ut.IsMovable;break;default:h[T]=Ut.IsMovable}(null==y[T]||null==f[T]||Number.isNaN(y[T])||Number.isNaN(f[T]))&&(h[T]=Ut.IsMovable,y[T]=0,f[T]=0)}else h[T]=Ut.IsMovable,y[T]=0,f[T]=0;d.set(r.attributes[mt],T),_[T]={feature:r,typeName:n},T++}));let M=!1;if(i.forEach((e=>{const t=d.get(e.feature.attributes[gt]),n=d.get(e.feature.attributes[_t]);void 0!==t&&void 0!==n?(m[I]=t,g[I]=n,I++):(M=!0,this.linkChartDiagramLookup.set(e.feature.attributes[gt],null),this.linkChartGeohashLookup.set(e.feature.attributes[gt],null))})),M&&s.Z.getLogger(this).warn("A relationship is a member of this layer that has either origin or destination entity nodes that are not members. The diagram geometry will be set to null"),await(qt||(qt=n.e(6124).then(n.bind(n,36124)).then((e=>e.l)).then((({default:e})=>e({locateFile:e=>(0,X.V)(`esri/libs/linkchartlayout/${e}`)}))).then((e=>{!function(e){Yt=e}(e)})),qt)),!C(h,y,f,m,g))throw new o.Z("knowledge-graph:layout-failed","Attempting to arrange the records in the specified layout failed");for(let e=0;e<_.length;e++){if(h[e]===Ut.IsMovable&&(y[e]=y[e]*w,f[e]=f[e]*b),f[e]>84.9999&&(f[e]=84.9999),f[e]<-84.9999&&(f[e]=-84.9999),y[e]>179.9999&&(y[e]=179.9999),y[e]<-179.9999&&(y[e]=-179.9999),_[e].feature.attributes[wt]=new K.Z(y[e],f[e]),a.has(_[e].typeName)){const t=a.get(_[e].typeName);t?.set(_[e].feature.attributes[mt],_[e].feature)}else{const t=new Map;t.set(_[e].feature.attributes[mt],_[e].feature),a.set(_[e].typeName,t)}p.set(_[e].feature.attributes[mt],_[e].feature);const t=(0,c.GH)(_[e].feature.attributes[wt]);this.linkChartDiagramLookup.set(_[e].feature.attributes[mt],_[e].feature.attributes[wt]?t:null),this.linkChartGeohashLookup.set(_[e].feature.attributes[mt],(0,u.fC)(_[e].feature.attributes[wt].y,_[e].feature.attributes[wt].x,bt)),_[e].feature.attributes[wt].x<x.xmin&&(x.xmin=_[e].feature.attributes[wt].x),_[e].feature.attributes[wt].x>x.xmax&&(x.xmax=_[e].feature.attributes[wt].x),_[e].feature.attributes[wt].y<x.ymin&&(x.ymin=_[e].feature.attributes[wt].y),_[e].feature.attributes[wt].y>x.ymax&&(x.ymax=_[e].feature.attributes[wt].y)}return this.linkChartExtent.xmin=x.xmin,this.linkChartExtent.xmax=x.xmax,this.linkChartExtent.ymin=x.ymin,this.linkChartExtent.ymax=x.ymax,i.forEach((e=>{const t=_[d.get(e.feature.attributes[gt])]?.feature.attributes[wt],n=_[d.get(e.feature.attributes[_t])]?.feature.attributes[wt];if(!t||!n)return;const r=new ee.Z({paths:[[t.x,t.y],[n.x,n.y]]});if(e.feature.attributes[wt]=r,l.has(e.typeName)){const t=l.get(e.typeName);t?.set(e.feature.attributes[mt],e.feature)}else{const t=new Map;t.set(e.feature.attributes[mt],e.feature),l.set(e.typeName,t)}p.set(e.feature.attributes[mt],e.feature);const i=(0,c.GH)(e.feature.attributes[wt]);this.linkChartDiagramLookup.set(e.feature.attributes[mt],e.feature.attributes[wt]?i:null),this.linkChartGeohashLookup.set(e.feature.attributes[mt],"")})),this._currentLinkChartConfig={layoutMode:e,xScaleFactor:w,yScaleFactor:b},{nodes:a,links:l,idMap:p}}async applyNewLinkChartLayout(e="RADIAL_TREE",t){const n=[];await this.calculateLinkChartLayout(e,t),this.layers.forEach((e=>{n.push(e.refreshCachedQueryEngine())})),await Promise.all(n),this.layers.forEach((e=>{e.emit("refresh",{dataChanged:!0})}))}getCurrentNodeLocations(){const e=new Map;return this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((t=>{t?.members?.forEach((t=>{const n=t.linkChartLocation;let r;const i=t.id;n&&(r="x"in n?{x:n.x,y:n.y}:{x:n.coords[0],y:n.coords[1]},e.set(i,new K.Z({x:r.x,y:r.y})))}))})),e}async synchronizeInclusionListWithCache(){return new Promise((e=>{this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{if(e.useAllData=!1,e.members&&e.members.size>0){if(!this.dataManager.sublayerCaches.get(t))return;const n=Array.from(this.dataManager.sublayerCaches.get(t).keys());Array.from(e.members.keys()).filter((e=>!n.includes(e))).forEach((t=>{e.members?.delete(t)}))}})),e()}))}async refreshLinkChartCache(e){await this.dataManager.refreshCacheContent(e);const t=[];this.layers.forEach((e=>{t.push(e.refreshCachedQueryEngine())})),await Promise.all(t),this.layers.forEach((e=>{e.emit("refresh",{dataChanged:!0})}))}async _handleNewRecords(e){const t=[];this.dataManager.addToLayerInclusionSet(e);for(const n of e)this.sublayerIdsCache.has(n.typeName)||(this.sublayerIdsCache.set(n.typeName,new Set),t.push(n.typeName)),this.sublayerIdsCache.get(n.typeName).add(n.id);for(const e of t)if(this._graphTypeLookup.has(e)){const t=this._graphTypeLookup.get(e),n="endPoints"in t?"relationship":"entity",r=new zt({objectType:t,parentCompositeLayer:this,graphType:n,title:e});"entity"===n?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),r.geometryType?this.layers.push(r):this.tables.push(r),this.dataManager.sublayerCaches.set(e,new Map)}await this.dataManager.refreshCacheContent(e.map((e=>e.id))),await this.applyNewLinkChartLayout(this._currentLinkChartConfig.layoutMode,{xScaleFactor:this._currentLinkChartConfig.xScaleFactor,yScaleFactor:this._currentLinkChartConfig.xScaleFactor})}async _initializeDiagram(){this.defaultLinkChartConfig?this.defaultLinkChartConfig.doNotRecalculateLayout?(this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e=>{e?.members?.forEach((e=>{const t=e.linkChartLocation;let n;const r=e.id;if(!t)return;n="x"in t?{x:t.x,y:t.y}:{x:t.coords[0],y:t.coords[1]};const i=(0,c.GH)(n);this.linkChartDiagramLookup.set(r,i),this.linkChartGeohashLookup.set(r,(0,u.fC)(n.x,n.y,bt)),this.linkChartExtent.xmin>n.x&&(this.linkChartExtent.xmin=n.x),this.linkChartExtent.xmax<n.x&&(this.linkChartExtent.xmax=n.x),this.linkChartExtent.ymin>n.y&&(this.linkChartExtent.ymin=n.y),this.linkChartExtent.ymax<n.y&&(this.linkChartExtent.ymax=n.y)}))})),this.memberRelationshipTypes.forEach((e=>{e.name&&this.dataManager.sublayerCaches.get(e.name)?.forEach((e=>{const t=this.linkChartDiagramLookup.get(e.attributes[gt]),n=this.linkChartDiagramLookup.get(e.attributes[_t]);if(t&&n){const r=(0,c.GH)(new ee.Z({paths:[[t.coords[0],t.coords[1]],[n.coords[0],n.coords[1]]]}));this.linkChartDiagramLookup.set(e.attributes[mt],r)}else this.linkChartDiagramLookup.set(e.attributes[mt],null);this.linkChartGeohashLookup.set(e.attributes[mt],"")}))}))):await this.calculateLinkChartLayout(this.defaultLinkChartConfig.layoutMode,{xScaleFactor:this.defaultLinkChartConfig.xScaleFactor,yScaleFactor:this.defaultLinkChartConfig.yScaleFactor,lockedNodeLocations:this.getCurrentNodeLocations()}):await this.calculateLinkChartLayout("RADIAL_TREE",{lockedNodeLocations:this.getCurrentNodeLocations()})}};(0,r._)([(0,l.Cb)()],tn.prototype,"dataPreloadedInLocalCache",void 0),(0,r._)([(0,l.Cb)()],tn.prototype,"defaultLinkChartConfig",void 0),(0,r._)([(0,l.Cb)()],tn.prototype,"dataManager",void 0),(0,r._)([(0,l.Cb)()],tn.prototype,"knowledgeGraph",void 0),(0,r._)([(0,l.Cb)()],tn.prototype,"layers",void 0),(0,r._)([(0,l.Cb)()],tn.prototype,"linkChartDiagramLookup",void 0),(0,r._)([(0,l.Cb)()],tn.prototype,"linkChartExtent",void 0),(0,r._)([(0,l.Cb)()],tn.prototype,"linkChartGeohashLookup",void 0),(0,r._)([(0,l.Cb)()],tn.prototype,"memberEntityTypes",void 0),(0,r._)([(0,l.Cb)()],tn.prototype,"memberRelationshipTypes",void 0),(0,r._)([(0,l.Cb)()],tn.prototype,"sublayerIdsCache",void 0),(0,r._)([(0,l.Cb)()],tn.prototype,"tables",void 0),(0,r._)([(0,l.Cb)({json:{read:!1}})],tn.prototype,"type",void 0),tn=(0,r._)([(0,d.j)("esri.layers.LinkChartLayer")],tn);const nn=tn},37549:(e,t,n)=>{n.d(t,{H:()=>a});var r=n(80442),i=n(24133),o=n(24470);const s={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new i.Q(9,(0,r.Z)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((n,r)=>{e[t++]=r})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,o.cS)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,n){(function(e){s.minX=e[0],s.minY=e[1],s.maxX=e[2],s.maxY=e[3]})(t),e.search(s,n)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},57191:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(20102),i=n(32448),o=n(92604),s=n(60437),a=n(24470),l=n(98732),p=n(37549),d=n(29730),u=n(70272),h=n(5428);const c={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new u.u_(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>(null==e.centroid&&(e.centroid=(0,d.Y)(new h.Z,e.geometry,t.hasZ,t.hasM)),e.centroid)};var y=n(11490);const f=(0,s.Ue)();class m{constructor(e){this.geometryInfo=e,this._boundsStore=new p.H,this._featuresById=new Map,this._markedIds=new Set,this.events=new i.Z,this.featureAdapter=c}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,n,r,i]=this.fullBounds;return{xmin:t,ymin:n,xmax:r,ymax:i,spatialReference:(0,y.S2)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const n of e){const e=this._boundsStore.get(n.objectId);e&&t((0,s.JR)(f,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,n)=>{this._markedIds.has(n)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.Z("featurestore:invalid-feature","feature id is missing",{feature:e}));const n=this._featuresById.get(t);let i;if(this._markedIds.add(t),n?(e.displayId=n.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),null==e.geometry||!e.geometry.coords||!e.geometry.coords.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,l.$)(null!=i?i:(0,a.Ue)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e)}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},25278:(e,t,n)=>{n.d(t,{Dm:()=>d,Hq:()=>u,MS:()=>h,bU:()=>a});var r=n(80442),i=n(22974),o=n(61159),s=n(58333);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?s.I4:"esriGeometryPolyline"===e?s.ET:s.lF}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let p=1;function d(e,t){if((0,r.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let n=`this.${t} = null;`;for(const t in e)n+=`this${l.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const r=new Function(`\n return class AttributesClass$${p++} {\n constructor() {\n ${n};\n }\n }\n `)();return()=>new r}catch(n){return()=>({[t]:null,...e})}}function u(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,i.d9)(e)}}]}function h(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:o.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1}}}},21506:(e,t,n)=>{n.d(t,{qG:()=>b,PV:()=>f,id:()=>C,iR:()=>h,rn:()=>y,rT:()=>I,u1:()=>T,rO:()=>E,Oh:()=>_,bT:()=>w,C_:()=>u,Lx:()=>m,vg:()=>x,YI:()=>d,HQ:()=>c});var r=n(92835),i=n(6570),o=n(82971),s=n(25929),a=(n(67676),n(35463)),l=n(86787),p=n(65242);const d={type:Boolean,value:!0,json:{origins:{service:{read:!1,write:!1},"web-map":{read:!1,write:!1}},name:"screenSizePerspective",write:!0}},u={type:Boolean,value:!0,json:{name:"disablePopup",read:{reader:(e,t)=>!t.disablePopup},write:{enabled:!0,writer(e,t,n){t[n]=!e}}}},h={type:Boolean,value:!0,nonNullable:!0,json:{name:"showLabels",write:!0}},c={type:String,json:{origins:{"portal-item":{write:!1}},write:{isRequired:!0,ignoreOrigin:!0,writer:s.w}}},y={type:Boolean,value:!0,nonNullable:!0,json:{origins:{service:{read:{enabled:!1}}},name:"showLegend",write:!0}},f={value:null,type:l.Z,json:{origins:{service:{name:"elevationInfo",write:!0}},name:"layerDefinition.elevationInfo",write:!0}};function m(e){return{type:e,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}}}const g={write:!0,read:!0},_={type:Number,json:{origins:{"web-document":g,"portal-item":{write:!0}}}},w={..._,json:{..._.json,origins:{"web-document":{...g,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}}}},read:{source:["layerDefinition.drawingInfo.transparency","drawingInfo.transparency"],reader:(e,t,n)=>n&&"service"!==n.origin||!t.drawingInfo||void 0===t.drawingInfo.transparency?t.layerDefinition&&t.layerDefinition.drawingInfo&&void 0!==t.layerDefinition.drawingInfo.transparency?(0,p.b)(t.layerDefinition.drawingInfo.transparency):void 0:(0,p.b)(t.drawingInfo.transparency)}}},b={type:r.Z,readOnly:!0,get(){if(!this.layer?.timeInfo)return null;const{datesInUnknownTimezone:e,timeOffset:t,useViewTime:n}=this.layer,i=this.view?.timeExtent;let o=this.layer.timeExtent;e&&(o=function(e){if(!e)return e;const{start:t,end:n}=e;return new r.Z({start:null!=t?(0,a.Nm)(t,t.getTimezoneOffset(),"minutes"):t,end:null!=n?(0,a.Nm)(n,n.getTimezoneOffset(),"minutes"):n})}(o));let s=n?i&&o?i.intersection(o):i||o:o;if(!s||s.isEmpty||s.isAllTime)return s;t&&(s=s.offset(-t.value,t.unit)),e&&(s=function(e){if(!e)return e;const{start:t,end:n}=e;return new r.Z({start:null!=t?(0,a.Nm)(t,-t.getTimezoneOffset(),"minutes"):t,end:null!=n?(0,a.Nm)(n,-n.getTimezoneOffset(),"minutes"):n})}(s));const l=this._get("timeExtent");return s.equals(l)?l:s}},x={type:i.Z,readOnly:!0,json:{origins:{service:{read:{source:["fullExtent","spatialReference"],reader:(e,t)=>{const n=i.Z.fromJSON(e);return null!=t.spatialReference&&"object"==typeof t.spatialReference&&(n.spatialReference=o.Z.fromJSON(t.spatialReference)),n}}}},read:!1}},C={type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}}}},E={type:Number,json:{origins:{service:{write:{enabled:!1}}},read:{source:"layerDefinition.minScale"},write:{target:"layerDefinition.minScale"}}},T={type:Number,json:{origins:{service:{write:{enabled:!1}}},read:{source:"layerDefinition.maxScale"},write:{target:"layerDefinition.maxScale"}}},I={json:{write:{ignoreOrigin:!0},origins:{"web-map":{read:!1,write:!1}}}}},99282:(e,t,n)=>{n.d(t,{a:()=>o});var r=n(67900),i=n(68441);const o={unknown:1,inches:(0,r.En)(1,"meters","inches"),feet:(0,r.En)(1,"meters","feet"),"us-feet":(0,r.En)(1,"meters","us-feet"),yards:(0,r.En)(1,"meters","yards"),miles:(0,r.En)(1,"meters","miles"),"nautical-miles":(0,r.En)(1,"meters","nautical-miles"),millimeters:(0,r.En)(1,"meters","millimeters"),centimeters:(0,r.En)(1,"meters","centimeters"),decimeters:(0,r.En)(1,"meters","decimeters"),meters:(0,r.En)(1,"meters","meters"),kilometers:(0,r.En)(1,"meters","kilometers"),"decimal-degrees":1/(0,r.ty)(1,"meters",i.sv.radius)}},74889:(e,t,n)=>{n.d(t,{Z:()=>w});var r,i=n(43697),o=n(66577),s=n(38171),a=n(35454),l=n(96674),p=n(22974),d=n(5600),u=(n(75215),n(71715)),h=n(52011),c=n(30556),y=n(82971),f=n(33955),m=n(1231);const g=new a.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let _=r=class extends l.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const n=y.Z.fromJSON(t.spatialReference),r=[];for(let t=0;t<e.length;t++){const i=e[t],o=s.Z.fromJSON(i),a=i.geometry&&i.geometry.spatialReference;null==o.geometry||a||(o.geometry.spatialReference=n);const l=i.aggregateGeometries,p=o.aggregateGeometries;if(l&&null!=p)for(const e in p){const t=p[e],r=l[e],i=r?.spatialReference;null==t||i||(t.spatialReference=n)}r.push(o)}return r}writeGeometryType(e,t,n,r){if(e)return void g.write(e,t,n,r);const{features:i}=this;if(i)for(const e of i)if(e&&null!=e.geometry)return void g.write(e.geometry.type,t,n,r)}readQueryGeometry(e,t){if(!e)return null;const n=!!e.spatialReference,r=(0,f.im)(e);return r&&!n&&t.spatialReference&&(r.spatialReference=y.Z.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:n}=this;if(n)for(const e of n)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,p.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let n=0;n<t.features.length;n++){const r=t.features[n];if(r.geometry){const t=e&&e[n];r.geometry=t&&t.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,n],translate:[r,i]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-r)/t)),(e=>Math.round((i-e)/n)));for(let e=0,t=o.length;e<t;e++)s?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:n}=this;if(!n)return this;const{translate:[r,i],scale:[o,s]}=n;let a=null,l=null;if(this.hasZ&&null!=n?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=n;a=n=>n*t+e}if(this.hasM&&null!=n?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=n;l=n=>null==n?n:n*t+e}const p=this._getHydrationFunction(e,(e=>e*o+r),(e=>i-e*s),a,l);for(const{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}_quantizePoints(e,t,n){let r,i;const o=[];for(let s=0,a=e.length;s<a;s++){const a=e[s];if(s>0){const e=t(a[0]),s=n(a[1]);e===r&&s===i||(o.push([e-r,s-i]),r=e,i=s)}else r=t(a[0]),i=n(a[1]),o.push([r,i])}return o.length>0?o:null}_getQuantizationFunction(e,t,n){return"point"===e?e=>(e.x=t(e.x),e.y=n(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,f.oU)(e)?e.rings:e.paths,i=[];for(let e=0,o=r.length;e<o;e++){const o=r[e],s=this._quantizePoints(o,t,n);s&&i.push(s)}return i.length>0?((0,f.oU)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,n);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,n,r,i){return"point"===e?e=>{e.x=t(e.x),e.y=n(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,f.oU)(e)?e.rings:e.paths;let s,a;for(let e=0,r=o.length;e<r;e++){const r=o[e];for(let e=0,i=r.length;e<i;e++){const i=r[e];e>0?(s+=i[0],a+=i[1]):(s=i[0],a=i[1]),i[0]=t(s),i[1]=n(a)}}if(r&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=r(n[2]),n[3]=i(n[3])}}else if(r)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=r(n[2])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=i(n[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=n(e.ymin),e.xmax=t(e.xmax),e.ymax=n(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let s,a;for(let e=0,r=o.length;e<r;e++){const r=o[e];e>0?(s+=r[0],a+=r[1]):(s=r[0],a=r[1]),r[0]=t(s),r[1]=n(a)}if(r&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=r(t[2]),t[3]=i(t[3])}else if(r)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=r(t[2])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}}:null}};(0,i._)([(0,d.Cb)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),(0,i._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,d.Cb)({type:[s.Z],json:{write:!0}})],_.prototype,"features",void 0),(0,i._)([(0,u.r)("features")],_.prototype,"readFeatures",null),(0,i._)([(0,d.Cb)({type:[m.Z],json:{write:!0}})],_.prototype,"fields",void 0),(0,i._)([(0,d.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],_.prototype,"geometryType",void 0),(0,i._)([(0,c.c)("geometryType")],_.prototype,"writeGeometryType",null),(0,i._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasM",void 0),(0,i._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasZ",void 0),(0,i._)([(0,d.Cb)({types:o.qM,json:{write:!0}})],_.prototype,"queryGeometry",void 0),(0,i._)([(0,u.r)("queryGeometry")],_.prototype,"readQueryGeometry",null),(0,i._)([(0,d.Cb)({type:y.Z,json:{write:!0}})],_.prototype,"spatialReference",void 0),(0,i._)([(0,c.c)("spatialReference")],_.prototype,"writeSpatialReference",null),(0,i._)([(0,d.Cb)({json:{write:!0}})],_.prototype,"transform",void 0),_=r=(0,i._)([(0,h.j)("esri.rest.support.FeatureSet")],_),_.prototype.toJSON.isDefaultToJSON=!0;const w=_},11282:(e,t,n)=>{n.d(t,{cv:()=>a,en:()=>s,lA:()=>o}),n(68773),n(40330);var r=n(22974),i=n(17452);function o(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function s(e){return"string"==typeof e?(0,i.mN)(e):(0,r.d9)(e)}function a(e,t,n){const r={};for(const i in e){if("declaredClass"===i)continue;const o=e[i];if(null!=o&&"function"!=typeof o)if(Array.isArray(o)){r[i]=[];for(let e=0;e<o.length;e++)r[i][e]=a(o[e])}else if("object"==typeof o)if(o.toJSON){const e=o.toJSON(n&&n[i]);r[i]=t?e:JSON.stringify(e)}else r[i]=t?o:JSON.stringify(o);else r[i]=o}return r}n(71058)},86787:(e,t,n)=>{n.d(t,{Z:()=>b});var r,i=n(43697),o=n(35454),s=n(96674),a=n(70586),l=n(5600),p=(n(75215),n(67676),n(80442),n(71715)),d=n(52011),u=n(30556),h=n(35671);let c=r=class extends s.wq{constructor(e){super(e)}async collectRequiredFields(e,t){return(0,h.io)(e,t,this.expression)}clone(){return new r({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],c.prototype,"expression",void 0),(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],c.prototype,"title",void 0),c=r=(0,i._)([(0,d.j)("esri.layers.support.FeatureExpressionInfo")],c);const y=c;var f,m=n(12541);const g=(0,o.w)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),_=new o.X({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let w=f=class extends s.wq{constructor(e){super(e),this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,n,r){t[n]=e.write({},r),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}clone(){return new f({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,a._W)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,i._)([(0,l.Cb)({type:y,json:{write:!0}})],w.prototype,"featureExpressionInfo",void 0),(0,i._)([(0,p.r)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],w.prototype,"readFeatureExpressionInfo",null),(0,i._)([(0,u.c)("featureExpressionInfo",{featureExpressionInfo:{type:y},"featureExpression.value":{type:[0]}})],w.prototype,"writeFeatureExpressionInfo",null),(0,i._)([(0,l.Cb)({type:g.apiValues,nonNullable:!0,json:{type:g.jsonValues,read:g.read,write:{writer:g.write,isRequired:!0}}})],w.prototype,"mode",null),(0,i._)([(0,l.Cb)({type:Number,json:{write:!0}})],w.prototype,"offset",void 0),(0,i._)([(0,l.Cb)({type:m.f9,json:{type:String,read:_.read,write:_.write}})],w.prototype,"unit",null),w=f=(0,i._)([(0,d.j)("esri.layers.support.ElevationInfo")],w);const b=w},58333:(e,t,n)=>{n.d(t,{ET:()=>o,I4:()=>i,eG:()=>l,lF:()=>s,lj:()=>d,qP:()=>a,wW:()=>p});const r=[252,146,31,255],i={type:"esriSMS",style:"esriSMSCircle",size:6,color:r,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:r},s={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},p={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},d={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}},12541:(e,t,n)=>{n.d(t,{Z7:()=>i,f9:()=>o});var r=n(99282);function i(e){return 1/(r.a[e]||1)}const o=function(){const e=Object.keys(r.a);return e.sort(),e}()},65242:(e,t,n)=>{n.d(t,{a:()=>i,b:()=>o});var r=n(75215);function i(e){const t=(0,r.vU)(100*(1-e));return Math.max(0,Math.min(t,100))}function o(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8159],{84552:(e,t,r)=>{r.d(t,{Z:()=>d});var i=r(43697),n=r(2368),o=r(96674),s=r(35463),l=r(5600),a=(r(75215),r(67676),r(80442),r(36030)),u=r(52011),p=r(78981);let c=class extends((0,n.J)(o.wq)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,s.rJ)(this.value,this.unit,"milliseconds")}};(0,i._)([(0,a.J)(p.v,{nonNullable:!0})],c.prototype,"unit",void 0),(0,i._)([(0,l.Cb)({type:Number,json:{write:!0},nonNullable:!0})],c.prototype,"value",void 0),c=(0,i._)([(0,u.j)("esri.TimeInterval")],c);const d=c},22862:(e,t,r)=>{r.d(t,{Hg:()=>f,V7:()=>y,uD:()=>d});var i=r(92036),n=r(46791),o=r(1153);const s=["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"];function l(e){return e instanceof i.Z}function a(e){return e instanceof n.Z?Object.keys(e.items):l(e)?(0,o.vw)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof n.Z?e.items[t]:e[t]}function p(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=a(e),n=a(t);if(0===i.length&&0===n.length)return;if(!i.length||!n.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const o=n.filter((e=>!i.includes(e))),d=i.filter((e=>!n.includes(e))),y=i.filter((r=>n.includes(r)&&u(e,r)!==u(t,r))).concat(o,d).sort(),f=p(e);if(f&&s.includes(f)&&y.length)return{type:"complete",oldValue:e,newValue:t};let m;const h=l(e)&&l(t);for(const i of y){const n=u(e,i),o=u(t,i);let s;if((h||"function"!=typeof n&&"function"!=typeof o)&&n!==o&&(null!=n||null!=o)){if(r&&r[i]&&"function"==typeof r[i])s=r[i]?.(n,o);else if(n instanceof Date&&o instanceof Date){if(n.getTime()===o.getTime())continue;s={type:"complete",oldValue:n,newValue:o}}else s="object"==typeof n&&"object"==typeof o&&p(n)===p(o)?c(n,o):{type:"complete",oldValue:n,newValue:o};null!=s&&(null!=m?m.diff[i]=s:m={type:"partial",diff:{[i]:s}})}}return m}function d(e,t){if(null==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 y(e,t){for(const r of t)if(d(e,r))return!0;return!1}function f(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&p(e)!==p(t)?{type:"complete",oldValue:e,newValue:t}:c(e,t)}},88068:(e,t,r)=>{r.r(t),r.d(t,{default:()=>q});var i=r(43697),n=(r(66577),r(51773)),o=(r(16050),r(12501),r(28756),r(92271),r(72529),r(5499),r(84382),r(81571),r(91423),r(32400)),s=r(16453),l=r(5600),a=(r(75215),r(67676),r(80442),r(52011)),u=r(86973),p=r(87085),c=r(20102),d=r(83379),y=r(16467),f=r(74889),m=r(82971);let h=class extends d.Z{constructor(){super(...arguments),this.featureDefinition=null,this.type="ogc-feature"}load(e){return this.addResolvingPromise(this._loadOGCServices(this.layer,e)),this.when()}getSource(){const{featureDefinition:{collection:e,layerDefinition:t,spatialReference:r,supportedCrs:i},layer:{apiKey:n,customParameters:o,effectiveMaxRecordCount:s}}=this;return{type:"ogc-source",collection:e,layerDefinition:t,maxRecordCount:s,queryParameters:{apiKey:n,customParameters:o},spatialReference:r,supportedCrs:i}}queryExtent(e,t={}){return null}queryFeatureCount(e,t={}){return null}queryFeatures(e,t={}){return this.queryFeaturesJSON(e,t).then((e=>f.Z.fromJSON(e)))}queryFeaturesJSON(e,t={}){const r=this.getSource();return this.load(t).then((()=>(0,y.yN)(r,e,t)))}queryObjectIds(e,t={}){return null}serviceSupportsSpatialReference(e){return!(!e.isWGS84&&!e.isWebMercator&&!this.featureDefinition.supportedCrs[e.wkid])}_conformsToType(e,t){const r=new RegExp(`^${t}$`,"i");return e.conformsTo.some((e=>r.test(e)))??!1}_getCapabilities(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:t,maxRecordCountFactor:void 0,standardMaxRecordCount:void 0,supportsCacheHint:!1,supportsCentroid:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,tileMaxRecordCount:void 0},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1}}}_getMaxRecordCount(e){const t=e?.components?.parameters;return t?.limit?.schema?.maximum??t?.limitFeatures?.schema?.maximum}_getStorageSpatialReference(e){const t=e.storageCrs??y.$9,r=(0,y.d)(t);return null==r?m.Z.WGS84:new m.Z({wkid:r})}_getSupportedSpatialReferences(e,t){const r="#/crs",i=e.crs??[y.$9],n=i.includes(r)?i.filter((e=>e!==r)).concat(t.crs??[]):i,o=/^http:\/\/www\.opengis.net\/def\/crs\/epsg\/.*\/3785$/i;return n.filter((e=>!o.test(e)))}async _loadOGCServices(e,t){const r=null!=t?t.signal:null,{apiKey:i,collectionId:n,customParameters:o,fields:s,geometryType:l,hasZ:a,objectIdField:p,timeInfo:d,url:f}=e,m={fields:s?.map((e=>e.toJSON())),geometryType:u.P.toJSON(l),hasZ:a??!1,objectIdField:p,timeInfo:d?.toJSON()},h={apiKey:i,customParameters:o,signal:r},g=await(0,y.gp)(f,h),[w,b]=await Promise.all([(0,y.G4)(g,h),(0,y.j)(g,h)]);if(!this._conformsToType(w,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson"))throw new c.Z("ogc-feature-layer:no-geojson-support","Server does not support geojson");const v=b.collections.find((e=>e.id===n));if(!v)throw new c.Z("ogc-feature-layer:collection-not-found","Server does not contain the named collection");const S=this._conformsToType(w,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30")?await(0,y.eS)(g,h):null,C=await(0,y.w9)(v,m,h),_=this._getMaxRecordCount(S),x=this._getCapabilities(C.hasZ,_),I=this._getStorageSpatialReference(v).toJSON(),F=this._getSupportedSpatialReferences(v,b),T=new RegExp(`^${y.Lu}`,"i"),j={};for(const e of F){const t=(0,y.d)(e);null!=t&&(j[t]||(j[t]=e.replace(T,"")))}this.featureDefinition={capabilities:x,collection:v,layerDefinition:C,spatialReference:I,supportedCrs:j}}};(0,i._)([(0,l.Cb)()],h.prototype,"featureDefinition",void 0),(0,i._)([(0,l.Cb)({constructOnly:!0})],h.prototype,"layer",void 0),(0,i._)([(0,l.Cb)()],h.prototype,"type",void 0),h=(0,i._)([(0,a.j)("esri.layers.graphics.sources.OGCFeatureSource")],h);var g=r(54295),w=r(71612),b=r(17017),v=r(69637),S=r(6404),C=r(38009),_=r(68825),x=r(16859),I=r(34760),F=r(72965),T=r(28294),j=r(21506),R=r(16451),E=r(1231),P=r(53518),Z=r(35671),O=r(54306),D=r(30707),M=r(14165),N=r(32163),G=r(6570);const U=(0,P.v)();let k=class extends((0,g.V)((0,b.N)((0,S.M)((0,v.b)((0,w.h)((0,_.c)((0,T.n)((0,F.M)((0,C.q)((0,x.I)((0,I.Q)((0,s.R)(p.Z))))))))))))){constructor(e){super(e),this.capabilities=null,this.collectionId=null,this.copyright=null,this.definitionExpression=null,this.description=null,this.displayField=null,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.hasZ=void 0,this.labelingInfo=null,this.labelsVisible=!0,this.legendEnabled=!0,this.maxRecordCount=null,this.objectIdField=null,this.operationalLayerType="OGCFeatureLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new h({layer:this}),this.spatialReference=null,this.title=null,this.type="ogc-feature",this.typeIdField=null,this.types=null,this.url=null}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["OGCFeatureServer"]},e).then((()=>this._fetchService(e)))),this.when()}get defaultPopupTemplate(){return this.createPopupTemplate()}get effectiveMaxRecordCount(){return this.maxRecordCount??this.capabilities?.query.maxRecordCount??5e3}get isTable(){return this.loaded&&null==this.geometryType}set renderer(e){(0,Z.YN)(e,this.fieldsIndex),this._set("renderer",e)}on(e,t){return super.on(e,t)}createPopupTemplate(e){return(0,N.eZ)(this,e)}createQuery(){return new M.Z}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){let r,i=!1;const n=t?.feature?.attributes,o=this.typeIdField&&n?.[this.typeIdField];return null!=o&&this.types&&(i=this.types.some((t=>t.id==o&&(r=t.domains?.[e],"inherited"===r?.type&&(r=this._getLayerDomain(e)),!0)))),i||r||(r=this._getLayerDomain(e)),r}queryFeatures(e,t){return this.load().then((()=>this.source.queryFeatures(M.Z.from(e)||this.createQuery(),t))).then((e=>(e?.features?.forEach((e=>{e.layer=e.sourceLayer=this})),e)))}serviceSupportsSpatialReference(e){return this.source?.serviceSupportsSpatialReference(e)??!1}async _fetchService(e){await this.source.load(e),this.read(this.source.featureDefinition,{origin:"service"}),(0,Z.YN)(this.renderer,this.fieldsIndex),(0,Z.UF)(this.timeInfo,this.fieldsIndex)}_getLayerDomain(e){if(!this.fields)return null;for(const t of this.fields)if(t.name===e&&t.domain)return t.domain;return null}};(0,i._)([(0,l.Cb)({readOnly:!0,json:{origins:{service:{read:!0}}}})],k.prototype,"capabilities",void 0),(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],k.prototype,"collectionId",void 0),(0,i._)([(0,l.Cb)({type:String})],k.prototype,"copyright",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],k.prototype,"defaultPopupTemplate",null),(0,i._)([(0,l.Cb)({type:String})],k.prototype,"definitionExpression",void 0),(0,i._)([(0,l.Cb)({readOnly:!0,type:String,json:{origins:{service:{name:"collection.description"}}}})],k.prototype,"description",void 0),(0,i._)([(0,l.Cb)({type:String})],k.prototype,"displayField",void 0),(0,i._)([(0,l.Cb)({type:Number})],k.prototype,"effectiveMaxRecordCount",null),(0,i._)([(0,l.Cb)(j.PV)],k.prototype,"elevationInfo",void 0),(0,i._)([(0,l.Cb)({type:[E.Z],json:{origins:{service:{name:"layerDefinition.fields"}}}})],k.prototype,"fields",void 0),(0,i._)([(0,l.Cb)(U.fieldsIndex)],k.prototype,"fieldsIndex",void 0),(0,i._)([(0,l.Cb)({readOnly:!0,type:G.Z,json:{origins:{service:{name:"layerDefinition.extent"}}}})],k.prototype,"fullExtent",void 0),(0,i._)([(0,l.Cb)({type:u.M.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:u.M.read}}}}})],k.prototype,"geometryType",void 0),(0,i._)([(0,l.Cb)({type:Boolean,json:{origins:{service:{name:"layerDefinition.hasZ"}}}})],k.prototype,"hasZ",void 0),(0,i._)([(0,l.Cb)({type:Boolean,readOnly:!0})],k.prototype,"isTable",null),(0,i._)([(0,l.Cb)({type:[O.Z],json:{origins:{"web-document":{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:D.r},write:!0}}}})],k.prototype,"labelingInfo",void 0),(0,i._)([(0,l.Cb)(j.iR)],k.prototype,"labelsVisible",void 0),(0,i._)([(0,l.Cb)(j.rn)],k.prototype,"legendEnabled",void 0),(0,i._)([(0,l.Cb)({type:Number})],k.prototype,"maxRecordCount",void 0),(0,i._)([(0,l.Cb)({type:String,json:{origins:{service:{name:"layerDefinition.objectIdField"}}}})],k.prototype,"objectIdField",void 0),(0,i._)([(0,l.Cb)({type:["OGCFeatureLayer"]})],k.prototype,"operationalLayerType",void 0),(0,i._)([(0,l.Cb)(j.C_)],k.prototype,"popupEnabled",void 0),(0,i._)([(0,l.Cb)({type:n.Z,json:{name:"popupInfo",write:!0}})],k.prototype,"popupTemplate",void 0),(0,i._)([(0,l.Cb)({types:o.A,json:{origins:{service:{name:"layerDefinition.drawingInfo.renderer",write:!1},"web-scene":{types:o.o,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:!0}})],k.prototype,"renderer",null),(0,i._)([(0,l.Cb)(j.YI)],k.prototype,"screenSizePerspectiveEnabled",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],k.prototype,"source",void 0),(0,i._)([(0,l.Cb)({readOnly:!0,type:m.Z,json:{origins:{service:{read:!0}}}})],k.prototype,"spatialReference",void 0),(0,i._)([(0,l.Cb)({type:String,json:{write:{enabled:!0,ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"collection.title"}}}})],k.prototype,"title",void 0),(0,i._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],k.prototype,"type",void 0),(0,i._)([(0,l.Cb)({type:String,readOnly:!0})],k.prototype,"typeIdField",void 0),(0,i._)([(0,l.Cb)({type:[R.Z]})],k.prototype,"types",void 0),(0,i._)([(0,l.Cb)(j.HQ)],k.prototype,"url",void 0),k=(0,i._)([(0,a.j)("esri.layers.OGCFeatureLayer")],k);const q=k},61159:(e,t,r)=>{r.d(t,{g:()=>i});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},92722:(e,t,r)=>{r.d(t,{O3:()=>S,lG:()=>_,my:()=>C,q9:()=>a});var i=r(20102),n=r(70272),o=r(5428),s=r(35671);const l={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function a(e){return l[e]}function*u(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*p(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(const t of e.coordinates)yield*t;break;case"MultiPolygon":for(const t of e.coordinates)for(const e of t)yield*e}}function c(e){for(const t of e)if(t.length>2)return!0;return!1}function d(e){let t=0;for(let r=0;r<e.length;r++){const i=e[r],n=e[(r+1)%e.length];t+=i[0]*n[1]-n[0]*i[1]}return t<=0}function y(e){const t=e[0],r=e[e.length-1];return t[0]===r[0]&&t[1]===r[1]&&t[2]===r[2]||e.push(t),e}function f(e,t,r){switch(t.type){case"LineString":case"MultiPoint":return function(e,t,r){return g(e,t.coordinates,r),e}(e,t,r);case"MultiLineString":return function(e,t,r){for(const i of t.coordinates)g(e,i,r);return e}(e,t,r);case"MultiPolygon":return function(e,t,r){for(const i of t.coordinates){m(e,i[0],r);for(let t=1;t<i.length;t++)h(e,i[t],r)}return e}(e,t,r);case"Point":return function(e,t,r){return b(e,t.coordinates,r),e}(e,t,r);case"Polygon":return function(e,t,r){const i=t.coordinates;m(e,i[0],r);for(let t=1;t<i.length;t++)h(e,i[t],r);return e}(e,t,r)}}function m(e,t,r){const i=y(t);!function(e){return!d(e)}(i)?g(e,i,r):w(e,i,r)}function h(e,t,r){const i=y(t);!function(e){return d(e)}(i)?g(e,i,r):w(e,i,r)}function g(e,t,r){for(const i of t)b(e,i,r);e.lengths.push(t.length)}function w(e,t,r){for(let i=t.length-1;i>=0;i--)b(e,t[i],r);e.lengths.push(t.length)}function b(e,t,r){const[i,n,o]=t;e.coords.push(i,n),r.hasZ&&e.coords.push(o||0)}function v(e){switch(typeof e){case"string":return"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function S(e){if(!e)throw new i.Z("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new i.Z("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:t}=e;if(!t)return;const r="string"==typeof t?t:"name"===t.type?t.properties.name:"EPSG"===t.type?t.properties.code:null,n=new RegExp(".*(CRS84H?|4326)$","i");if(!r||!n.test(r))throw new i.Z("geojson-layer:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:t})}function C(e,t={}){const r=[],i=new Set,n=new Set;let o,l=!1,d=null,y=!1,{geometryType:f=null}=t,m=!1;for(const t of u(e)){const{geometry:e,properties:u,id:h}=t;if((!e||(f||(f=a(e.type)),a(e.type)===f))&&(l||(l=c(p(e))),y||(y=null!=h,y&&(o=typeof h,u&&(d=Object.keys(u).filter((e=>u[e]===h))))),u&&d&&y&&null!=h&&(d.length>1?d=d.filter((e=>u[e]===h)):1===d.length&&(d=u[d[0]]===h?d:[])),!m&&u)){let e=!0;for(const t in u){if(i.has(t))continue;const o=u[t];if(null==o){e=!1,n.add(t);continue}const l=v(o);if("unknown"===l){n.add(t);continue}n.delete(t),i.add(t);const a=(0,s.q6)(t);a&&r.push({name:a,alias:t,type:l})}m=e}}const h=(0,s.q6)(1===d?.length&&d[0]||null)??void 0;if(h)for(const e of r)if(e.name===h&&(0,s.H7)(e)){e.type="esriFieldTypeOID";break}return{fields:r,geometryType:f,hasZ:l,objectIdFieldName:h,objectIdFieldType:o,unknownFields:Array.from(n)}}function _(e,t){return Array.from(function*(e,t={}){const{geometryType:r,objectIdField:i}=t;for(const s of e){const{geometry:e,properties:l,id:u}=s;if(e&&a(e.type)!==r)continue;const p=l||{};let c;i&&(c=p[i],null==u||c||(p[i]=c=u));const d=new n.u_(e?f(new o.Z,e,t):null,p,null,c??void 0);yield d}}(u(e),t))}},25278:(e,t,r)=>{r.d(t,{Dm:()=>p,Hq:()=>c,MS:()=>d,bU:()=>l});var i=r(80442),n=r(22974),o=r(61159),s=r(58333);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?s.I4:"esriGeometryPolyline"===e?s.ET:s.lF}}}const a=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function p(e,t){if((0,i.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${a.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new i}catch(r){return()=>({[t]:null,...e})}}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.d9)(e)}}]}function d(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:o.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1}}}},54295:(e,t,r)=>{r.d(t,{V:()=>s});var i=r(43697),n=r(5600),o=(r(75215),r(67676),r(80442),r(52011));const s=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,n.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,o.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17017:(e,t,r)=>{r.d(t,{N:()=>s});var i=r(43697),n=r(5600),o=(r(75215),r(67676),r(80442),r(52011));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,n.Cb)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,o.j)("esri.layers.mixins.CustomParametersMixin")],t),t}},69637:(e,t,r)=>{r.d(t,{b:()=>T});var i,n=r(43697),o=r(5600),s=(r(75215),r(67676),r(80442),r(52011)),l=r(20102),a=r(96674),u=r(78286),p=r(67760),c=r(66577),d=r(92835),y=r(35454),f=r(22974),m=r(14165);const h=new y.X({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),g=new y.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let w=i=class extends a.wq{constructor(e){super(e),this.where=null,this.geometry=null,this.spatialRelationship="intersects",this.distance=void 0,this.objectIds=null,this.units=null,this.timeExtent=null}createQuery(e={}){const{where:t,geometry:r,spatialRelationship:i,timeExtent:n,objectIds:o,units:s,distance:l}=this;return new m.Z({geometry:(0,f.d9)(r),objectIds:(0,f.d9)(o),spatialRelationship:i,timeExtent:(0,f.d9)(n),where:t,units:s,distance:l,...e})}clone(){const{where:e,geometry:t,spatialRelationship:r,timeExtent:n,objectIds:o,units:s,distance:l}=this;return new i({geometry:(0,f.d9)(t),objectIds:(0,f.d9)(o),spatialRelationship:r,timeExtent:(0,f.d9)(n),where:e,units:s,distance:l})}};(0,n._)([(0,o.Cb)({type:String,json:{write:!0}})],w.prototype,"where",void 0),(0,n._)([(0,o.Cb)({types:c.qM,json:{write:!0}})],w.prototype,"geometry",void 0),(0,n._)([(0,o.Cb)({type:h.apiValues,json:{name:"spatialRel",read:{reader:h.read},write:{allowNull:!1,writer:h.write,overridePolicy(){return{enabled:null!=this.geometry}}}}})],w.prototype,"spatialRelationship",void 0),(0,n._)([(0,o.Cb)({type:Number,json:{write:{overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],w.prototype,"distance",void 0),(0,n._)([(0,o.Cb)({type:[Number],json:{write:!0}})],w.prototype,"objectIds",void 0),(0,n._)([(0,o.Cb)({type:g.apiValues,json:{read:g.read,write:{writer:g.write,overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],w.prototype,"units",void 0),(0,n._)([(0,o.Cb)({type:d.Z,json:{write:!0}})],w.prototype,"timeExtent",void 0),w=i=(0,n._)([(0,s.j)("esri.layers.support.FeatureFilter")],w);const b=w;var v;const S={read:{reader:p.ij},write:{writer:p.cW,overridePolicy(){return{allowNull:null!=this.excludedEffect,isRequired:null==this.excludedEffect}}}},C={read:{reader:p.ij},write:{writer:p.cW,overridePolicy(){return{allowNull:null!=this.includedEffect,isRequired:null==this.includedEffect}}}},_={name:"showExcludedLabels",default:!0};let x=v=class extends a.wq{constructor(e){super(e),this.filter=null,this.includedEffect=null,this.excludedEffect=null,this.excludedLabelsVisible=!1}write(e,t){const r=super.write(e,t);if(t?.origin){if(r.filter){const e=Object.keys(r.filter);if(e.length>1||"where"!==e[0])return t.messages?.push(new l.Z("web-document-write:unsupported-feature-effect","Invalid feature effect 'filter'. A filter can only contain a 'where' property",{layer:t.layer,effect:this})),null}if("showExcludedLabels"in r)return t.messages?.push(new l.Z("web-document-write:unsupported-feature-effect","Invalid value for property 'excludedLabelsVisible' which should always be 'true'",{layer:t.layer,effect:this})),null}return r}clone(){return new v({filter:null!=this.filter?this.filter.clone():null,includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})}};(0,n._)([(0,o.Cb)({type:b,json:{write:{allowNull:!0,writer(e,t,r,i){const n=e?.write({},i);n&&0!==Object.keys(n).length?(0,u.RB)(r,n,t):(0,u.RB)(r,null,t)}}}})],x.prototype,"filter",void 0),(0,n._)([(0,o.Cb)({json:{write:!0,origins:{"web-map":S,"portal-item":S}}})],x.prototype,"includedEffect",void 0),(0,n._)([(0,o.Cb)({json:{write:!0,origins:{"web-map":C,"portal-item":C}}})],x.prototype,"excludedEffect",void 0),(0,n._)([(0,o.Cb)({type:Boolean,json:{write:!0,name:"showExcludedLabels",origins:{"web-map":_,"portal-item":_}}})],x.prototype,"excludedLabelsVisible",void 0),x=v=(0,n._)([(0,s.j)("esri.layers.support.FeatureEffect")],x);const I=x,F={write:{allowNull:!0}},T=e=>{let t=class extends e{constructor(){super(...arguments),this.featureEffect=null}};return(0,n._)([(0,o.Cb)({type:I,json:{origins:{"web-map":F,"portal-item":F}}})],t.prototype,"featureEffect",void 0),t=(0,n._)([(0,s.j)("esri.layers.mixins.FeatureEffectLayer")],t),t}},68825:(e,t,r)=>{r.d(t,{c:()=>m});var i,n=r(43697),o=r(78286),s=r(5600),l=(r(75215),r(67676),r(80442),r(52011)),a=r(35454),u=r(96674);const p=new a.X({asc:"ascending",desc:"descending"});let c=i=class extends u.wq{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n._)([(0,s.Cb)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,n._)([(0,s.Cb)({type:String,json:{write:!0}})],c.prototype,"valueExpression",void 0),(0,n._)([(0,s.Cb)({type:p.apiValues,json:{read:p.read,write:p.write}})],c.prototype,"order",void 0),c=i=(0,n._)([(0,l.j)("esri.layers.support.OrderByInfo")],c);const d=c;function y(e,t,r){if(!e)return null;const i=e.find((e=>!!e.field));if(!i)return null;const n=new d;return n.read(i,r),[n]}function f(e,t,r,i){const n=e.find((e=>!!e.field));n&&(0,o.RB)(r,[n.toJSON()],t)}const m=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,n._)([(0,s.Cb)({type:[d],json:{origins:{"web-scene":{write:!1,read:!1}},read:{source:"layerDefinition.orderBy",reader:y},write:{target:"layerDefinition.orderBy",writer:f}}})],t.prototype,"orderBy",void 0),t=(0,n._)([(0,l.j)("esri.layers.mixins.OrderedLayer")],t),t}},16859:(e,t,r)=>{r.d(t,{I:()=>S});var i=r(43697),n=r(68773),o=r(40330),s=r(3172),l=r(66643),a=r(20102),u=r(92604),p=r(95330),c=r(17452),d=r(5600),y=(r(75215),r(67676),r(80442),r(71715)),f=r(52011),m=r(30556),h=r(84230),g=r(48522),w=r(15235),b=r(86082),v=r(14661);const S=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=null,this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new w.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:i}=await r.e(8062).then(r.bind(r,18062));return(0,p.k_)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,p.D_)(e)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,p.r9)(e),!0))))}async setUserPrivileges(e,t){if(!n.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,p.r9)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,v.Ss)(r);let n,s;if(i)n=r.portal.url;else try{n=await(0,h.oP)(this.url,t)}catch(e){(0,p.r9)(e)}if(!n||!(0,c.Zo)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;s=await(o.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.r9)(e)}if(!s)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(i?await r.reload():(r=new w.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return(0,v.Ss)(r)}catch(e){(0,p.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const r=C.credential===t?C.user:await this._fetchEditingUser(e);return C.credential=t,C.user=r,null==r||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=o.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=g.Z.getDefault();if(n&&n.loaded&&(0,c.Fv)(n.restUrl)===(0,c.Fv)(i))return n.user;const a=`${i}/community/self`,u=null!=e?e.signal:null,p=await(0,l.q6)((0,s.Z)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?b.Z.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,i=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||g.Z.getDefault());return r&&i&&!(0,c.tm)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,d.Cb)({type:w.default})],t.prototype,"portalItem",null),(0,i._)([(0,y.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,m.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,d.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,f.j)("esri.layers.mixins.PortalLayer")],t),t},C={credential:null,user:null}},28294:(e,t,r)=>{r.d(t,{n:()=>d});var i=r(43697),n=r(92835),o=r(84552),s=r(5600),l=(r(75215),r(67676),r(80442),r(71715)),a=r(52011),u=r(35671),p=r(76259),c=r(78981);const d=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const i=r.timeOffset,n=c.v.fromJSON(r.timeOffsetUnits);return i&&n?new o.Z({value:i,unit:n}):null}set timeInfo(e){(0,u.UF)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i._)([(0,s.Cb)({type:n.Z,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,i._)([(0,s.Cb)({type:o.Z})],t.prototype,"timeOffset",void 0),(0,i._)([(0,l.r)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,i._)([(0,s.Cb)({value:null,type:p.Z,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,i._)([(0,s.Cb)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,i._)([(0,a.j)("esri.layers.mixins.TemporalLayer")],t),t}},16467:(e,t,r)=>{r.d(t,{$9:()=>g,G4:()=>v,Lu:()=>h,WW:()=>I,d:()=>_,eS:()=>C,gp:()=>S,j:()=>b,w9:()=>w,yN:()=>x}),r(66577);var i=r(3172),n=r(20102),o=r(92604),s=r(8744),l=r(40488),a=r(98732),u=r(44876),p=r(92722),c=r(25278),d=r(99514),y=r(86719),f=r(82971);const m=o.Z.getLogger("esri.layers.graphics.sources.ogcfeature"),h="http://www.opengis.net/def/crs/",g=`${h}OGC/1.3/CRS84`;async function w(e,t,r={},o=5){const{links:s}=e,l=E(s,"items","application/geo+json")||E(s,"http://www.opengis.net/def/rel/ogc/1.0/items","application/geo+json");if(null==l)throw new n.Z("ogc-feature-layer:missing-items-page","Missing items url");const{data:a}=await(0,i.Z)(l.href,{signal:r.signal,query:{limit:o,...r.customParameters,token:r.apiKey},headers:{accept:"application/geo+json"}});await(0,p.O3)(a);const u=(0,p.my)(a,{geometryType:t.geometryType}),f=t.fields||u.fields||[],h=null!=t.hasZ?t.hasZ:u.hasZ,g=u.geometryType,w=t.objectIdField||u.objectIdFieldName||"OBJECTID";let b=t.timeInfo;const v=f.find((({name:e})=>e===w));if(v)v.editable=!1,v.nullable=!1;else{if(!u.objectIdFieldType)throw new n.Z("ogc-feature-layer:missing-feature-id","Collection geojson require a feature id as a unique identifier");f.unshift({name:w,alias:w,type:"number"===u.objectIdFieldType?"esriFieldTypeOID":"esriFieldTypeString",editable:!1,nullable:!1})}if(w!==u.objectIdFieldName){const e=f.find((({name:e})=>e===u.objectIdFieldName));e&&(e.type="esriFieldTypeInteger")}f===u.fields&&u.unknownFields.length>0&&m.warn({name:"ogc-feature-layer:unknown-field-types",message:"Some fields types couldn't be inferred from the features and were dropped",details:{unknownFields:u.unknownFields}});for(const e of f){if(null==e.name&&(e.name=e.alias),null==e.alias&&(e.alias=e.name),"esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type&&(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable),!e.name)throw new n.Z("ogc-feature-layer:invalid-field-name","field name is missing",{field:e});if(!y.v.jsonValues.includes(e.type))throw new n.Z("ogc-feature-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e})}if(b){const e=new d.Z(f);if(b.startTimeField){const t=e.get(b.startTimeField);t?(b.startTimeField=t.name,t.type="esriFieldTypeDate"):b.startTimeField=null}if(b.endTimeField){const t=e.get(b.endTimeField);t?(b.endTimeField=t.name,t.type="esriFieldTypeDate"):b.endTimeField=null}if(b.trackIdField){const t=e.get(b.trackIdField);t?b.trackIdField=t.name:(b.trackIdField=null,m.warn({name:"ogc-feature-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:b}}))}b.startTimeField||b.endTimeField||(m.warn({name:"ogc-feature-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing",details:{timeInfo:b}}),b=null)}return{drawingInfo:g?(0,c.bU)(g):null,extent:R(e),geometryType:g,fields:f,hasZ:!!h,objectIdField:w,timeInfo:b}}async function b(e,t={}){const{links:r}=e,o=E(r,"data","application/json")||E(r,"http://www.opengis.net/def/rel/ogc/1.0/data","application/json");if(null==o)throw new n.Z("ogc-feature-layer:missing-collections-page","Missing collections url");const{apiKey:s,customParameters:l,signal:a}=t,{data:u}=await(0,i.Z)(o.href,{signal:a,headers:{accept:"application/json"},query:{...l,token:s}});return u}async function v(e,t={}){const{links:r}=e,o=E(r,"conformance","application/json")||E(r,"http://www.opengis.net/def/rel/ogc/1.0/conformance","application/json");if(null==o)throw new n.Z("ogc-feature-layer:missing-conformance-page","Missing conformance url");const{apiKey:s,customParameters:l,signal:a}=t,{data:u}=await(0,i.Z)(o.href,{signal:a,headers:{accept:"application/json"},query:{...l,token:s}});return u}async function S(e,t={}){const{apiKey:r,customParameters:n,signal:o}=t,{data:s}=await(0,i.Z)(e,{signal:o,headers:{accept:"application/json"},query:{...n,token:r}});return s}async function C(e,t={}){const r="application/vnd.oai.openapi+json;version=3.0",n=E(e.links,"service-desc",r);if(null==n)return m.warn("ogc-feature-layer:missing-openapi-page","The OGC API-Features server does not have an OpenAPI page."),null;const{apiKey:o,customParameters:s,signal:l}=t,{data:a}=await(0,i.Z)(n.href,{signal:l,headers:{accept:r},query:{...s,token:o}});return a}function _(e){const t=/^http:\/\/www\.opengis.net\/def\/crs\/(?<authority>.*)\/(?<version>.*)\/(?<code>.*)$/i.exec(e),r=t?.groups;if(!r)return null;const{authority:i,code:n}=r;switch(i.toLowerCase()){case"ogc":switch(n.toLowerCase()){case"crs27":return f.Z.GCS_NAD_1927.wkid;case"crs83":return 4269;case"crs84":case"crs84h":return f.Z.WGS84.wkid;default:return null}case"esri":case"epsg":{const e=Number.parseInt(n,10);return Number.isNaN(e)?null:e}default:return null}}async function x(e,t,r){const i=await I(e,t,r);return(0,a.cn)(i)}async function I(e,t,r){const{collection:o,layerDefinition:c,maxRecordCount:d,queryParameters:{apiKey:y,customParameters:m},spatialReference:h,supportedCrs:g}=e,{links:w}=o,b=E(w,"items","application/geo+json")||E(w,"http://www.opengis.net/def/rel/ogc/1.0/items","application/geo+json");if(null==b)throw new n.Z("ogc-feature-layer:missing-items-page","Missing items url");const{geometry:v,num:S,start:C,timeExtent:_,where:x}=t;if(t.objectIds)throw new n.Z("ogc-feature-layer:query-by-objectids-not-supported","Queries with objectids are not supported");const I=f.Z.fromJSON(h),T=t.outSpatialReference??I,R=T.isWGS84?null:F(T,g),P=j(v,g),Z=function(e){if(null==e)return null;const{start:t,end:r}=e;return`${null!=t?t.toISOString():".."}/${null!=r?r.toISOString():".."}`}(_),O=null!=(N=x)&&N&&"1=1"!==N?N:null,D=S??(null!=C&&void 0!==C?10:d),{data:M}=await(0,i.Z)(b.href,{...r,query:{...m,...P,crs:R,datetime:Z,query:O,limit:D,startindex:C,token:y},headers:{accept:"application/geo+json"}});var N;let G=!1;M.links&&(G=!!M.links.find((e=>"next"===e.rel))),!G&&Number.isInteger(M.numberMatched)&&Number.isInteger(M.numberReturned)&&(G=M.numberReturned<M.numberMatched);const{fields:U,geometryType:k,hasZ:q,objectIdField:A}=c,L=(0,p.lG)(M,{geometryType:k,hasZ:q,objectIdField:A});if(!R&&T.isWebMercator)for(const e of L)if(null!=e.geometry&&null!=k){const t=(0,a.di)(e.geometry,k,q,!1);t.spatialReference=f.Z.WGS84,e.geometry=(0,a.GH)((0,l.iV)(t,T))}for(const e of L)e.objectId=e.attributes[A];const $=R||!R&&T.isWebMercator?T.toJSON():s.Zn,B=new u.Z;return B.exceededTransferLimit=G,B.features=L,B.fields=U,B.geometryType=k,B.hasZ=q,B.objectIdFieldName=A,B.spatialReference=$,B}function F(e,t){const{isWebMercator:r,wkid:i}=e;if(!i)return null;const n=r?t[3857]??t[102100]??t[102113]??t[900913]:t[e.wkid];return n?`${h}${n}`:null}function T(e){if(null==e)return"";const{xmin:t,ymin:r,xmax:i,ymax:n}=e;return`${t},${r},${i},${n}`}function j(e,t){if(!function(e){return null!=e&&"extent"===e.type}(e))return null;const{spatialReference:r}=e;if(!r||r.isWGS84)return{bbox:T(e)};const i=F(r,t);return null!=i?{bbox:T(e),"bbox-crs":i}:r.isWebMercator?{bbox:T((0,l.iV)(e,f.Z.WGS84))}:null}function R(e){const t=e.extent?.spatial;if(!t)return null;const r=t.bbox[0],i=4===r.length,n=r[0],o=r[1],s=i?void 0:r[2];return{xmin:n,ymin:o,xmax:i?r[2]:r[3],ymax:i?r[3]:r[4],zmin:s,zmax:i?void 0:r[5],spatialReference:f.Z.WGS84.toJSON()}}function E(e,t,r){return e.find((e=>e.rel===t&&e.type===r))||e.find((e=>e.rel===t&&!e.type))}},70082:(e,t,r)=>{r.d(t,{Z:()=>c});var i=r(43697),n=r(2368),o=r(35454),s=r(96674),l=r(5600),a=(r(75215),r(67676),r(80442),r(52011));const u=new o.X({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 p=class extends((0,n.J)(s.wq)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"name",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"description",void 0),(0,i._)([(0,l.Cb)({json:{read:u.read,write:u.write}})],p.prototype,"drawingTool",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"prototype",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"thumbnail",void 0),p=(0,i._)([(0,a.j)("esri.layers.support.FeatureTemplate")],p);const c=p},16451:(e,t,r)=>{r.d(t,{Z:()=>y});var i=r(43697),n=r(2368),o=r(96674),s=r(5600),l=(r(75215),r(67676),r(80442),r(71715)),a=r(52011),u=r(30556),p=r(72729),c=r(70082);let d=class extends((0,n.J)(o.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,p.im)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,s.Cb)({json:{write:!0}})],d.prototype,"id",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],d.prototype,"name",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],d.prototype,"domains",void 0),(0,i._)([(0,l.r)("domains")],d.prototype,"readDomains",null),(0,i._)([(0,u.c)("domains")],d.prototype,"writeDomains",null),(0,i._)([(0,s.Cb)({type:[c.Z],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,i._)([(0,a.j)("esri.layers.support.FeatureType")],d);const y=d},76259:(e,t,r)=>{r.d(t,{Z:()=>m});var i=r(43697),n=r(92835),o=r(84552),s=r(2368),l=r(96674),a=r(5600),u=(r(75215),r(67676),r(80442),r(71715)),p=r(52011),c=r(30556),d=r(80216);function y(e,t){return o.Z.fromJSON({value:e,unit:t})}let f=class extends((0,s.J)(l.wq)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeReference=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const r=new Date(t.timeExtent[0]),i=new Date(t.timeExtent[1]);return new n.Z({start:r,end:i})}writeFullTimeExtent(e,t){e&&null!=e.start&&null!=e.end?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?y(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?y(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i._)([(0,a.Cb)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],f.prototype,"cumulative",void 0),(0,i._)([(0,a.Cb)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],f.prototype,"endField",void 0),(0,i._)([(0,a.Cb)({type:n.Z,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"fullTimeExtent",void 0),(0,i._)([(0,u.r)("fullTimeExtent",["timeExtent"])],f.prototype,"readFullTimeExtent",null),(0,i._)([(0,c.c)("fullTimeExtent")],f.prototype,"writeFullTimeExtent",null),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"hasLiveData",void 0),(0,i._)([(0,a.Cb)({type:o.Z,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"interval",void 0),(0,i._)([(0,u.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],f.prototype,"readInterval",null),(0,i._)([(0,c.c)("interval")],f.prototype,"writeInterval",null),(0,i._)([(0,a.Cb)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],f.prototype,"startField",void 0),(0,i._)([(0,a.Cb)({type:d.Z,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"timeReference",void 0),(0,i._)([(0,a.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"trackIdField",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],f.prototype,"useTime",void 0),f=(0,i._)([(0,p.j)("esri.layers.support.TimeInfo")],f);const m=f},30707:(e,t,r)=>{r.d(t,{a:()=>c,r:()=>u});var i=r(20102),n=r(22974),o=r(92604),s=r(54306);const l=o.Z.getLogger("esri.layers.support.labelingInfo"),a=/\[([^\[\]]+)\]/gi;function u(e,t,r){return e?e.map((e=>{const i=new s.Z;if(i.read(e,r),i.labelExpression){const e=t.fields||t.layerDefinition&&t.layerDefinition.fields||this.fields;i.labelExpression=i.labelExpression.replaceAll(a,((t,r)=>`[${function(e,t){if(!t)return e;const r=e.toLowerCase();for(let e=0;e<t.length;e++){const i=t[e].name;if(i.toLowerCase()===r)return i}return e}(r,e)}]`))}return i})):null}const p={esriGeometryPoint:["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along"],esriGeometryMultipoint:null};function c(e,t){const r=(0,n.d9)(e);return r.some((e=>function(e,t){const r=e.labelPlacement,n=p[t];if(!e.symbol)return l.warn("No ILabelClass symbol specified."),!0;if(!n)return l.error(new i.Z("labeling:unsupported-geometry-type",`Unable to create labels for layer, geometry type '${t}' is not supported`)),!0;if(!n.includes(r)){const i=n[0];r&&l.warn(`Found invalid label placement type ${r} for ${t}. Defaulting to ${i}`),e.labelPlacement=i}return!1}(e,t)))?[]:r}},78981:(e,t,r)=>{r.d(t,{v:()=>i});const i=(0,r(35454).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},74889:(e,t,r)=>{r.d(t,{Z:()=>b});var i,n=r(43697),o=r(66577),s=r(38171),l=r(35454),a=r(96674),u=r(22974),p=r(5600),c=(r(75215),r(71715)),d=r(52011),y=r(30556),f=r(82971),m=r(33955),h=r(1231);const g=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=i=class extends a.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=f.Z.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const n=e[t],o=s.Z.fromJSON(n),l=n.geometry&&n.geometry.spatialReference;null==o.geometry||l||(o.geometry.spatialReference=r);const a=n.aggregateGeometries,u=o.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],i=a[e],n=i?.spatialReference;null==t||n||(t.spatialReference=r)}i.push(o)}return i}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(e&&null!=e.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,m.im)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=f.Z.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,u.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e&&e[r];i.geometry=t&&t.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((n-e)/r)));for(let e=0,t=o.length;e<t;e++)s?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,n],scale:[o,s]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*o+i),(e=>n-e*s),l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,n;const o=[];for(let s=0,l=e.length;s<l;s++){const l=e[s];if(s>0){const e=t(l[0]),s=r(l[1]);e===i&&s===n||(o.push([e-i,s-n]),i=e,n=s)}else i=t(l[0]),n=r(l[1]),o.push([i,n])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,m.oU)(e)?e.rings:e.paths,n=[];for(let e=0,o=i.length;e<o;e++){const o=i[e],s=this._quantizePoints(o,t,r);s&&n.push(s)}return n.length>0?((0,m.oU)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,m.oU)(e)?e.rings:e.paths;let s,l;for(let e=0,i=o.length;e<i;e++){const i=o[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(s+=n[0],l+=n[1]):(s=n[0],l=n[1]),n[0]=t(s),n[1]=r(l)}}if(i&&n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let s,l;for(let e=0,i=o.length;e<i;e++){const i=o[e];e>0?(s+=i[0],l+=i[1]):(s=i[0],l=i[1]),i[0]=t(s),i[1]=r(l)}if(i&&n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2])}}:null}};(0,n._)([(0,p.Cb)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,n._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,n._)([(0,p.Cb)({type:[s.Z],json:{write:!0}})],w.prototype,"features",void 0),(0,n._)([(0,c.r)("features")],w.prototype,"readFeatures",null),(0,n._)([(0,p.Cb)({type:[h.Z],json:{write:!0}})],w.prototype,"fields",void 0),(0,n._)([(0,p.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],w.prototype,"geometryType",void 0),(0,n._)([(0,y.c)("geometryType")],w.prototype,"writeGeometryType",null),(0,n._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,n._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,n._)([(0,p.Cb)({types:o.qM,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,n._)([(0,c.r)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,n._)([(0,p.Cb)({type:f.Z,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,n._)([(0,y.c)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,n._)([(0,p.Cb)({json:{write:!0}})],w.prototype,"transform",void 0),w=i=(0,n._)([(0,d.j)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0;const b=w},58333:(e,t,r)=>{r.d(t,{ET:()=>o,I4:()=>n,eG:()=>a,lF:()=>s,lj:()=>p,qP:()=>l,wW:()=>u});const i=[252,146,31,255],n={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},s={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},a={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},p={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
|