@arcgis/core 4.24.0-next.20220508 → 4.24.0-next.20220511
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/AggregateGraphic.js +1 -1
- package/analysis/Analysis.js +1 -1
- package/analysis/DimensioningAnalysis.js +1 -1
- package/analysis/LengthDimension.d.ts +4 -0
- package/analysis/LengthDimension.js +5 -0
- package/analysis/dimensionUtils.js +5 -0
- package/arcade/Dictionary.js +1 -1
- package/arcade/Feature.js +1 -1
- package/arcade/arcade.js +1 -1
- package/arcade/arcadeAsyncRuntime.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/credentials.js +1 -1
- package/arcade/featureSetCollection.js +1 -1
- package/arcade/featureSetUtils.js +1 -1
- package/arcade/featureset/actions/Adapted.js +1 -1
- package/arcade/featureset/actions/AttributeFilter.js +1 -1
- package/arcade/featureset/actions/GroupBy.js +1 -1
- package/arcade/featureset/actions/OrderBy.js +1 -1
- package/arcade/featureset/actions/SpatialFilter.js +1 -1
- package/arcade/featureset/actions/Top.js +1 -1
- package/arcade/featureset/sources/Empty.js +1 -1
- package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
- package/arcade/featureset/sources/FeatureLayerMemory.js +1 -1
- package/arcade/featureset/sources/FeatureLayerRelated.js +1 -1
- package/arcade/featureset/support/FeatureSet.js +1 -1
- package/arcade/featureset/support/FeatureSetIterator.js +1 -1
- package/arcade/featureset/support/shared.js +1 -1
- package/arcade/featureset/support/stats.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/arcade/functions/featuresetgeom.js +1 -1
- package/arcade/functions/featuresetstats.js +1 -1
- package/arcade/functions/featuresetstring.js +1 -1
- package/arcade/functions/geomasync.js +1 -1
- package/arcade/languageUtils.js +1 -1
- package/arcade/request.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0564f1cfa3d17ff1aad3.js +1 -0
- package/assets/esri/core/workers/chunks/0806d5d706a864542bfb.js +1 -0
- package/assets/esri/core/workers/chunks/0a6977144ea1abf96fbf.js +1 -0
- package/assets/esri/core/workers/chunks/13387f56acbc3291561a.js +1 -0
- package/assets/esri/core/workers/chunks/16c4e0a32d50d4db984d.js +1 -0
- package/assets/esri/core/workers/chunks/{076d1b1101b59af0d389.js → 1c010202b4c7e1d15f23.js} +1 -1
- package/assets/esri/core/workers/chunks/26827ec144676e6385f8.js +1 -0
- package/assets/esri/core/workers/chunks/287c484fd40eee643f3a.js +1 -0
- package/assets/esri/core/workers/chunks/5210f0b42dba27945226.js +1 -0
- package/assets/esri/core/workers/chunks/{db6c5b3b4efe8d804f9c.js → 52478ee2d2a1354b6900.js} +1 -1
- package/assets/esri/core/workers/chunks/5759af97f96f24c40105.js +1 -0
- package/assets/esri/core/workers/chunks/{b85218d44c6094b7e5e6.js → 6d7e2a23a0a5dd9ded1d.js} +1 -1
- package/assets/esri/core/workers/chunks/70b6356357e7640c4e8b.js +1 -0
- package/assets/esri/core/workers/chunks/7574316b3af61c389e8f.js +1 -0
- package/assets/esri/core/workers/chunks/7bc828fbdd54c0b28aac.js +1 -0
- package/assets/esri/core/workers/chunks/7e5c22b5a32ac74b1b6e.js +1 -0
- package/assets/esri/core/workers/chunks/8102bb78fe96e6197e4e.js +1 -0
- package/assets/esri/core/workers/chunks/88384e7cafbfd2348598.js +1 -0
- package/assets/esri/core/workers/chunks/9d7533aaeac3b8d145c4.js +1 -0
- package/assets/esri/core/workers/chunks/{1eecae5227318f491263.js → 9f4d892abf55e8625bc9.js} +3 -3
- package/assets/esri/core/workers/chunks/{98607a0da63626cc4614.js → a054a52712a118c6d505.js} +1 -1
- package/assets/esri/core/workers/chunks/{69a20e4d9e28c3e599fc.js → a3bb600bfcb0282622f1.js} +1 -1
- package/assets/esri/core/workers/chunks/aa49841b14c6e6df2a07.js +1 -0
- package/assets/esri/core/workers/chunks/b089058b64db3912478f.js +1 -0
- package/assets/esri/core/workers/chunks/b28539c5a6bedb71b038.js +1 -0
- package/assets/esri/core/workers/chunks/b4f171db73355c6f766e.js +1 -0
- package/assets/esri/core/workers/chunks/b7572b0921b23aef8b9d.js +1 -0
- package/assets/esri/core/workers/chunks/b758f3c419edc2306784.js +1 -0
- package/assets/esri/core/workers/chunks/c3e7290fb128d4fefd44.js +1 -0
- package/assets/esri/core/workers/chunks/c51c9b5da855f84b9a48.js +1 -0
- package/assets/esri/core/workers/chunks/c66ac36da6392b6bf331.js +1 -0
- package/assets/esri/core/workers/chunks/d16b328d32a6ddc2fdb9.js +1 -0
- package/assets/esri/core/workers/chunks/d94c5f36d52cf71f0bb9.js +1 -0
- package/assets/esri/core/workers/chunks/db937849b2c1af87b481.js +1 -0
- package/assets/esri/core/workers/chunks/{66cd99e91dad60c5274c.js → dc3ed59f450283d97a19.js} +1 -1
- package/assets/esri/core/workers/chunks/dcd0653191cd4a1ccaae.js +2 -0
- package/assets/esri/core/workers/chunks/{31df729c17470245288c.js.LICENSE.txt → dcd0653191cd4a1ccaae.js.LICENSE.txt} +2 -2
- package/assets/esri/core/workers/chunks/e4fdd1eaf987977d0a51.js +1 -0
- package/assets/esri/core/workers/chunks/e51f0e71f2a55af604d3.js +1 -0
- package/assets/esri/core/workers/chunks/eb3855d3753d6b8334bd.js +1 -0
- package/assets/esri/core/workers/chunks/{7c290763920f52a1f504.js → eeed138930a4a805691d.js} +1 -1
- package/assets/esri/core/workers/chunks/f435dc615fdc8917f6ca.js +1 -0
- package/assets/esri/core/workers/chunks/{d5c5b9f7f5401f36a3a5.js → f7f3dde4c8f9c687cc1e.js} +1 -1
- package/assets/esri/core/workers/chunks/fc6beaf9466ea3898549.js +1 -0
- package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
- package/assets/esri/themes/base/widgets/_Tooltip.scss +1 -0
- package/assets/esri/themes/base/widgets/_Weather.scss +1 -2
- 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/BlendLayers.glsl.js +6 -6
- package/chunks/arcade.js +1 -1
- package/chunks/array.js +1 -1
- package/chunks/languageUtils.js +1 -1
- package/config.js +1 -1
- package/core/sql/StandardizedFunctions.js +1 -1
- package/geohash/GeohashTree.js +1 -1
- package/geometry/support/contains.js +1 -1
- package/geometry/support/heightModelInfoUtils.js +1 -1
- package/geometry/support/intersects.js +1 -1
- package/geometry/support/intersectsBase.js +1 -1
- package/geometry/support/normalizeUtilsCommon.js +1 -1
- package/geometry/support/spatialReferenceUtils.js +1 -1
- package/interfaces.d.ts +685 -37
- package/layers/MediaLayer.d.ts +4 -0
- package/layers/MediaLayer.js +5 -0
- package/layers/VoxelLayer.js +1 -1
- package/layers/VoxelWasmPerSceneView.js +5 -0
- package/layers/graphics/OptimizedGeometry.js +1 -1
- package/layers/graphics/data/BoundsStore.js +1 -1
- package/layers/support/CornersGeoreference.d.ts +4 -0
- package/layers/support/CornersGeoreference.js +5 -0
- package/layers/support/ExtentAndRotationGeoreference.d.ts +4 -0
- package/layers/support/ExtentAndRotationGeoreference.js +5 -0
- package/layers/support/FeatureReduction.js +1 -1
- package/layers/support/FeatureReductionBinning.js +5 -0
- package/layers/support/GeoreferenceBase.js +5 -0
- package/layers/support/ImageElement.d.ts +4 -0
- package/layers/support/ImageElement.js +5 -0
- package/layers/support/LocalMediaElementSource.d.ts +4 -0
- package/layers/support/LocalMediaElementSource.js +5 -0
- package/layers/support/MediaElementBase.d.ts +4 -0
- package/layers/support/MediaElementBase.js +5 -0
- package/layers/support/RouteStopSymbols.d.ts +4 -0
- package/layers/support/RouteSymbols.d.ts +4 -0
- package/layers/support/VoxelFormat.d.ts +4 -0
- package/layers/support/VoxelStyle.d.ts +4 -0
- package/layers/support/VoxelVariable.d.ts +4 -0
- package/layers/support/VoxelVolume.d.ts +4 -0
- package/layers/support/VoxelVolumeStyle.d.ts +4 -0
- package/layers/support/arcgisLayerUrl.js +1 -1
- package/layers/support/featureReductionUtils.js +1 -1
- package/layers/support/fieldUtils.js +1 -1
- package/layers/support/rasterFormats/Lerc.js +1 -1
- package/package.json +3 -3
- package/request.js +1 -1
- package/support/requestUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/Font.js +1 -1
- package/symbols/support/textUtils.js +1 -1
- package/views/2d/engine/brushes.js +1 -1
- package/views/2d/engine/webgl/FeatureTile.js +1 -1
- package/views/2d/engine/webgl/Overlay.js +5 -0
- package/views/2d/engine/webgl/OverlayContainer.js +5 -0
- package/views/2d/engine/webgl/brushes/BrushOverlay.js +5 -0
- package/views/2d/engine/webgl/collisions/CollisionEngine.js +1 -1
- package/views/2d/engine/webgl/shaders/OverlayPrograms.js +5 -0
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layerViewModuleImportUtils.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/MapImageLayerView2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +5 -0
- package/views/2d/layers/StreamLayerView2D.js +1 -1
- package/views/2d/layers/WMTSLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureStore2D.js +1 -1
- package/views/2d/layers/features/Pipeline.js +1 -1
- package/views/2d/layers/features/Store2D.js +1 -1
- package/views/2d/layers/features/controllers/FeatureController2D.js +1 -1
- package/views/2d/layers/features/processors/SymbolProcessor.js +1 -1
- package/views/2d/layers/features/schemaUtils.js +1 -1
- package/views/2d/layers/features/sources/GeoEventSource.js +1 -1
- package/views/2d/layers/features/support/AttributeStore.js +1 -1
- package/views/2d/layers/features/support/BinStore.js +5 -0
- package/views/2d/layers/features/support/ClusterStore.js +1 -1
- package/views/2d/layers/features/tileRenderers/support/WGLFeatureView.js +1 -1
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/2d/layers/support/clusterUtils.js +1 -1
- package/views/2d/magnifier/MagnifierView2D.js +1 -1
- package/views/2d/navigation/actions/Pinch.js +1 -1
- package/views/2d/viewpointUtils.js +1 -1
- package/views/3d/analysis/AnalysisView3D.js +1 -1
- package/views/3d/analysis/Dimensioning/DimensioningTool.js +5 -0
- package/views/3d/analysis/Dimensioning/DimensioningVisualization.js +1 -1
- package/views/3d/analysis/Dimensioning/LengthDimensionSubTool.js +5 -0
- package/views/3d/analysis/Dimensioning/{LinearDimensionVisualization.js → LengthDimensionVisualization.js} +1 -1
- package/views/3d/analysis/Dimensioning/settings.js +5 -0
- package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/interactive/SegmentLabels3D.js +5 -0
- package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
- package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
- package/views/3d/interactive/editingTools/reshapeGraphic/GraphicReshapeTool.js +1 -1
- package/views/3d/interactive/editingTools/reshapeGraphic/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/GraphicTransformTool.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateObjectSymbol3DAdapter.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
- package/views/3d/interactive/visualElements/LabelVisualElement.js +1 -1
- package/views/3d/layerViewModuleImportUtils.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/MediaLayerView3D.js +5 -0
- package/views/3d/layers/VoxelLayerView3D.js +1 -1
- package/views/3d/layers/i3s/IDBCache.js +1 -1
- package/views/3d/state/controllers/RotateController.js +1 -1
- package/views/3d/state/controllers/local/PinchAndPanController.js +1 -1
- package/views/3d/state/controllers/local/ZoomController.js +1 -1
- package/views/3d/state/controllers/local/ZoomStepController.js +1 -1
- package/views/3d/support/ResourceController.js +1 -1
- package/views/3d/support/sunUtils.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/TileCompositor.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/BlendLayers.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/materials/WaterGLMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
- package/views/DOMContainer.js +1 -1
- package/views/GroundView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/ToolViewManager.js +1 -1
- package/views/View.js +1 -1
- package/views/draw/DrawOperation.js +1 -1
- package/views/draw/support/Reshape.js +1 -1
- package/views/interactive/GraphicManipulator.js +1 -1
- package/views/interactive/InteractiveToolBase.js +1 -1
- package/views/interactive/SegmentLabels.js +5 -0
- package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
- package/views/interactive/snapping/LineSnapper.js +1 -1
- package/views/interactive/snapping/ParallelLineSnapper.js +1 -1
- package/views/interactive/snapping/RightAngleSnapper.js +1 -1
- package/views/interactive/snapping/RightAngleTriangleSnapper.js +1 -1
- package/views/interactive/snapping/SnappingAlgorithm.js +1 -1
- package/views/interactive/snapping/SnappingManager.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
- package/views/interactive/snapping/snappingUtils.js +1 -1
- package/views/interactive/support/viewUtils.js +5 -0
- package/views/interactive/tooltip/DrawPointTooltipInfo.js +5 -0
- package/views/interactive/tooltip/DrawPolygonTooltipInfo.js +5 -0
- package/views/interactive/tooltip/DrawPolylineTooltipInfo.js +5 -0
- package/views/interactive/tooltip/Tooltip.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawPolygon.js +1 -1
- package/views/interactive/tooltip/support/measurements.js +5 -0
- package/views/layers/FeatureLayerView.js +1 -1
- package/views/layers/GroupLayerView.js +1 -1
- package/views/overlay/TextOverlayItem.js +1 -1
- package/views/support/Scheduler.js +1 -1
- package/views/support/screenUtils.js +1 -1
- package/webscene/Slide.js +1 -1
- package/widgets/Attribution/AttributionViewModel.js +1 -1
- package/widgets/Bookmarks.js +1 -1
- package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/ElevationProfile/support/chartUtils.js +1 -1
- package/widgets/ElevationProfile.js +1 -1
- package/widgets/Feature/FeatureAttachments.js +1 -1
- package/widgets/Feature/FeatureContent/FeatureContentViewModel.js +1 -1
- package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
- package/widgets/Feature/FeatureExpression.js +1 -1
- package/widgets/Feature/FeatureFields.js +1 -1
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/Feature.js +1 -1
- package/widgets/FeatureForm/InputFieldGroup.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/FieldColumn.js +1 -1
- package/widgets/FeatureTable/Grid/Column.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +11 -11
- package/widgets/FeatureTable/Grid/support/ButtonMenu.js +1 -1
- package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
- package/widgets/FeatureTemplates/TemplateItem.js +1 -1
- package/widgets/FeatureTemplates.js +1 -1
- package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
- package/widgets/FloorFilter.js +1 -1
- package/widgets/HistogramRangeSlider.js +1 -1
- package/widgets/LayerList/LayerListViewModel.js +1 -1
- package/widgets/LayerList/ListItem.js +1 -1
- package/widgets/LayerList/ListItemPanel.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/Legend/LegendViewModel.js +1 -1
- package/widgets/Legend/styles/Card.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Legend.js +1 -1
- package/widgets/LineOfSight/LineOfSightViewModel.js +1 -1
- package/widgets/Measurement.js +1 -1
- package/widgets/NavigationToggle/NavigationToggleViewModel.js +1 -1
- package/widgets/Popup/PopupViewModel.js +1 -1
- package/widgets/Popup.js +1 -1
- package/widgets/Print/FileLink.js +1 -1
- package/widgets/Print.js +1 -1
- package/widgets/ScaleBar.js +1 -1
- package/widgets/ScaleRangeSlider/ScaleRangeSliderViewModel.js +1 -1
- package/widgets/ScaleRangeSlider.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/widgets/Search.js +1 -1
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/TableList/ListItem.js +1 -1
- package/widgets/Weather/LabeledSlider.js +1 -1
- package/widgets/Weather/VisibleElements.js +5 -0
- package/widgets/Weather/css.js +1 -1
- package/widgets/Weather.js +1 -1
- package/widgets/support/AnalysisViewModel.js +1 -1
- package/widgets/support/InteractiveAnalysisViewModel.js +1 -1
- package/analysis/LinearDimension.d.ts +0 -4
- package/analysis/LinearDimension.js +0 -5
- package/assets/esri/core/workers/chunks/0018053ac16a09feba70.js +0 -1
- package/assets/esri/core/workers/chunks/042938ca73f0b9e5a7e2.js +0 -1
- package/assets/esri/core/workers/chunks/048645611caa28dca7cd.js +0 -1
- package/assets/esri/core/workers/chunks/0b72d123386dc4ec7538.js +0 -1
- package/assets/esri/core/workers/chunks/13b04d5bf348ab5054c2.js +0 -1
- package/assets/esri/core/workers/chunks/215007e7c44811d90777.js +0 -1
- package/assets/esri/core/workers/chunks/31df729c17470245288c.js +0 -2
- package/assets/esri/core/workers/chunks/36272141b3c33cb19026.js +0 -1
- package/assets/esri/core/workers/chunks/36c8e8de9c3f67d32572.js +0 -1
- package/assets/esri/core/workers/chunks/37c428489c59df4b597b.js +0 -1
- package/assets/esri/core/workers/chunks/493169fd978fd543ef3b.js +0 -1
- package/assets/esri/core/workers/chunks/4f378ad6f4299183df85.js +0 -1
- package/assets/esri/core/workers/chunks/58e4c6ce1580427e7b55.js +0 -1
- package/assets/esri/core/workers/chunks/6c5441da675a8af35be2.js +0 -1
- package/assets/esri/core/workers/chunks/6ea16f6a0df946de480b.js +0 -1
- package/assets/esri/core/workers/chunks/7dfd70f4fa1096e56641.js +0 -1
- package/assets/esri/core/workers/chunks/88193e61072d7bf957f5.js +0 -1
- package/assets/esri/core/workers/chunks/8ccbde593c86c872e525.js +0 -1
- package/assets/esri/core/workers/chunks/9c6be39f1f21ab8b1c2d.js +0 -1
- package/assets/esri/core/workers/chunks/a73795cce722ba15b3da.js +0 -1
- package/assets/esri/core/workers/chunks/a8ed1a938dc164b401d9.js +0 -1
- package/assets/esri/core/workers/chunks/a9a73bc4875a5aeaf1b9.js +0 -1
- package/assets/esri/core/workers/chunks/adcc5bce6c0971c1b592.js +0 -1
- package/assets/esri/core/workers/chunks/afddfe620e6539991e6b.js +0 -1
- package/assets/esri/core/workers/chunks/b340c9bdabdb37995c8f.js +0 -1
- package/assets/esri/core/workers/chunks/b4c23630d6c85f7b59c0.js +0 -1
- package/assets/esri/core/workers/chunks/c180c40838246985479d.js +0 -1
- package/assets/esri/core/workers/chunks/caed2365bd296fcc8a75.js +0 -1
- package/assets/esri/core/workers/chunks/d85b5b73a151c6fbb658.js +0 -1
- package/assets/esri/core/workers/chunks/da6261673c3e1537b6a6.js +0 -1
- package/assets/esri/core/workers/chunks/dafe120243db6648a4ab.js +0 -1
- package/assets/esri/core/workers/chunks/ec6d138e8183e193f977.js +0 -1
- package/assets/esri/core/workers/chunks/ed4519ac9533a4d340f1.js +0 -1
- package/assets/esri/core/workers/chunks/f206300eef4560611728.js +0 -1
- package/assets/esri/core/workers/chunks/f55cbaf5a1d6ee6ac171.js +0 -1
- package/layers/GeoreferencedImageLayer.d.ts +0 -4
- package/layers/GeoreferencedImageLayer.js +0 -5
- package/layers/VoxelWasmManager.js +0 -5
- package/layers/VoxelWasmPerScene.js +0 -5
- package/views/3d/interactive/measurementTools/support/viewUtils.js +0 -5
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{
|
|
5
|
+
import{isSome as e}from"../core/maybe.js";import{LayerBlendMode as o}from"../views/3d/webgl-engine/core/shaderLibrary/output/BlendOptions.js";import{BlendModes as r}from"../views/3d/webgl-engine/core/shaderLibrary/util/BlendModes.glsl.js";import{Float2PassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{FloatPassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as a}from"../views/3d/webgl-engine/core/shaderModules/interfaces.js";import{ShaderBuilder as d}from"../views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js";import{Texture2DPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{VertexAttribute as n}from"../views/3d/webgl-engine/lib/VertexAttribute.js";function l(l){const f=new d,c=l.blendMode===o.Normal;return f.attributes.add(n.POSITION,"vec2"),f.attributes.add(n.UV0,"vec2"),f.vertex.uniforms.add(new i("scale",(e=>e.scale))),f.vertex.uniforms.add(new t("offset",(e=>e.offset))),f.varyings.add("uv","vec2"),f.vertex.code.add(a`void main(void) {
|
|
6
6
|
gl_Position = vec4(position, 0.0, 1.0);
|
|
7
7
|
uv = uv0 * scale + offset;
|
|
8
|
-
}`),
|
|
8
|
+
}`),f.fragment.uniforms.add(new s("tex",(e=>e.texture))),f.fragment.uniforms.add(new i("opacity",(e=>e.opacity))),c||(f.fragment.uniforms.add(new s("fboColor",(e=>e.fboTexture))),f.fragment.uniforms.add(new i("tileSize",(o=>e(o.fboTexture)?o.fboTexture.descriptor.width:1)))),f.fragment.include(r,l),f.fragment.code.add(a`
|
|
9
9
|
void main() {
|
|
10
10
|
vec4 colorLayer = texture2D(tex, uv);
|
|
11
|
-
${
|
|
12
|
-
${
|
|
13
|
-
vec4 fboTex = texture2D(fboColor,
|
|
11
|
+
${c?a`gl_FragColor = vec4(colorLayer.xyz, 1.0) * colorLayer.a * opacity;`:""}
|
|
12
|
+
${c?"":a`
|
|
13
|
+
vec4 fboTex = texture2D(fboColor, (gl_FragCoord.xy + vec2(0.5, 0.5)) / tileSize);
|
|
14
14
|
vec3 Cb = fboTex.a == 0.0 ? fboTex.rgb : vec3(fboTex.rgb / fboTex.a);
|
|
15
15
|
gl_FragColor = applyBlendMode(colorLayer.rgb, colorLayer.a * opacity, Cb, fboTex.a);
|
|
16
16
|
`}
|
|
17
17
|
}
|
|
18
|
-
`),
|
|
18
|
+
`),f}const f=Object.freeze(Object.defineProperty({__proto__:null,build:l},Symbol.toStringTag,{value:"Module"}));export{f as B,l as b};
|
package/chunks/arcade.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{compileScript as e,extend as t,enableAsyncSupport as r}from"../arcade/arcadeCompiler.js";import{extend as n,executeScript as s,referencesMember as i,referencesFunction as
|
|
5
|
+
import{compileScript as e,extend as t,enableAsyncSupport as r}from"../arcade/arcadeCompiler.js";import{extend as n,executeScript as s,referencesMember as i,referencesFunction as a}from"../arcade/arcadeRuntime.js";import{parseScript as c,validateScript as u,scriptCheck as o,extractFieldLiterals as l,extractExpectedFieldLiterals as f}from"../arcade/parser.js";import{findScriptDependencies as p,findFunctionCalls as m}from"../arcade/treeAnalysis.js";import d from"../core/has.js";const y=["feature","angle","bearing","centroid","envelopeintersects","extent","geometry","isselfintersecting","ringisclockwise"];function S(){return!0}const b=S();let x=!1,A=!1,g=null,j=[];function h(t,r){if(!0===r.useAsync||!0===t.isAsync)return w(t,r);if(d("esri-csp-restrictions")){return function(e){return s(t,e)}}return e(t,r)}function w(t,r){if(null===g)throw new Error("Async Arcade must be enabled for this script");if(d("esri-csp-restrictions")||!1===b){return function(e){return g.executeScript(t,e)}}return e(t,r,!0)}function F(e){n(e),t(e,"sync"),null===g?j.push(e):(t(e,"async"),g.extend(e))}function E(e,t=[]){return c(e,t)}function v(e,t,r=""){return u(e,t,r)}function G(e,t,r,n=""){return o(e,t,r,n)}function k(e,t,r=[]){return I(c(e,r),t)}function I(e,t){if(!0===t.useAsync||!0===e.isAsync){if(null===g)throw new Error("Async Arcade must be enabled for this script");return g.executeScript(e,t)}return s(e,t)}function L(e,t){return i(e,t)}function P(e,t){return a(e,t)}function U(e,t=!1){return l(e)}function _(e){return f(e)}function C(e,t=[]){return void 0===e.usesGeometry&&p(e,t),!0===e.usesGeometry}let M=null;function z(){return M||(M=O(),M)}async function O(){const[e,t]=await Promise.all([import("../geometry/geometryEngine.js"),import("../arcade/functions/geomsync.js")]);return A=!0,t.setGeometryEngine(e),!0}let R=null;function T(){return null!==R||(R=q()),R}async function q(){await r(),g=await import("../arcade/arcadeAsyncRuntime.js");for(const e of j)g.extend(e),t(e,"async");return j=null,!0}function D(){return x}function B(){return!!g}function H(){return A}let J=null;function K(){return J||(J=N(),J)}async function N(){await T();const[e,r,n,s,i]=await Promise.all([import("../arcade/featureSetUtils.js"),import("../arcade/functions/featuresetbase.js"),import("../arcade/functions/featuresetgeom.js"),import("../arcade/functions/featuresetstats.js"),import("../arcade/functions/featuresetstring.js")]);return Z=e,g.extend([r,n,s,i]),t([r,n,s,i],"async"),x=!0,!0}function Q(e,t=[]){return void 0===e.usesFeatureSet&&p(e,t),!0===e.usesFeatureSet}function V(e,t=[]){return void 0===e.isAsync&&p(e,t),!0===e.isAsync}function W(e,t){if(t){for(const r of t)if(L(e,r))return!0;return!1}return!1}async function X(e,t,r=[],n=!1){const s="string"==typeof e?E(e):e,i=[];return s&&(!1===H()&&(C(s)||n)&&i.push(z()),!1===B()&&(!0===s.isAsync||t)&&i.push(T()),!1===D()&&(Q(s)||W(s,r))&&i.push(K())),!i.length||(await Promise.all(i),!0)}function Y(e){if(C(e))return!0;const t=m(e);let r=!1;for(let n=0;n<t.length;n++)if(y.includes(t[n])){r=!0;break}return r}let Z=null;function $(){return Z}const ee=Object.freeze(Object.defineProperty({__proto__:null,compileScript:h,extend:F,parseScript:E,validateScript:v,scriptCheck:G,parseAndExecuteScript:k,executeScript:I,referencesMember:L,referencesFunction:P,extractFieldLiterals:U,extractExpectedFieldLiterals:_,scriptUsesGeometryEngine:C,enableGeometrySupport:z,enableGeometrySupportImpl:O,enableAsyncSupport:T,enableAsyncSupportImpl:q,isFeatureSetSupportEnabled:D,isAsyncEnabled:B,isGeometryEnabled:H,enableFeatureSetSupport:K,enableFeatureSetSupportImpl:N,scriptUsesFeatureSet:Q,scriptIsAsync:V,loadScriptDependencies:X,scriptTouchesGeometry:Y,featureSetUtils:$},Symbol.toStringTag,{value:"Module"}));export{V as A,_ as a,z as b,h as c,K as d,I as e,$ as f,C as g,ee as h,F as i,G as j,k,X as l,P as m,U as n,O as o,E as p,T as q,L as r,Y as s,q as t,D as u,v,B as w,H as x,N as y,Q as z};
|
package/chunks/array.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import n from"../arcade/FunctionWrapper.js";import r from"../arcade/ImmutableArray.js";import{p as t,t as e,B as o,C as
|
|
5
|
+
import n from"../arcade/FunctionWrapper.js";import r from"../arcade/ImmutableArray.js";import{p as t,t as e,B as o,C as i,b as a,a as u,v as c,e as s,i as f,N as l,S as d}from"./languageUtils.js";import{isPromiseLike as h}from"../core/promiseUtils.js";function w(w){function m(r,t){if(t instanceof n)return w.arcadeCustomFunctionHandler(t);if(t instanceof l)return(...n)=>t.fn(r,{preparsed:!0,arguments:n});if(t instanceof d)return(...n)=>{if(n.length!==t.paramCount)throw new Error("Invalid parameters");return t.fn(...n)};throw new Error("Invalid Parameter")}function g(n){if(n instanceof r)return n.toArray();if(u(n))return n;throw new Error("Invalid Parameter")}w.functions.array=function(n,r){return w.standardFunction(n,r,(function(n,r,a){t(a,1,2);const u=e(a[0]);if(isNaN(u)||!1===o(u))throw new Error("Invalid Parameter");const c=i(a[1],null),s=new Array(u);return s.fill(c),s}))},w.functions.front=function(n,r){return w.standardFunction(n,r,(function(n,r,e){if(t(e,1,1),a(e[0])){if(e[0].length()<=0)throw new Error("Array is empty");return e[0].get(0)}if(u(e[0])){if(e[0].length<=0)throw new Error("Array is empty");return e[0][0]}throw new Error("Invalid Parameter")}))},w.functions.back=function(n,r){return w.standardFunction(n,r,(function(n,r,e){if(t(e,1,1),a(e[0])){if(e[0].length()<=0)throw new Error("Array is empty");return e[0].get(e[0].length()-1)}if(u(e[0])){if(e[0].length<=0)throw new Error("Array is empty");return e[0][e[0].length-1]}throw new Error("Invalid Parameter")}))},w.functions.push=function(n,r){return w.standardFunction(n,r,(function(n,r,e){if(t(e,1,2),u(e[0]))return e[0][e[0].length]=e[1],e[0].length;throw new Error("Invalid Parameter")}))},w.functions.pop=function(n,r){return w.standardFunction(n,r,(function(n,r,e){if(t(e,1,1),u(e[0])){if(e[0].length<=0)throw new Error("Array is empty");const n=e[0][e[0].length-1];return e[0].length=e[0].length-1,n}throw new Error("Invalid Parameter")}))},w.functions.erase=function(n,r){return w.standardFunction(n,r,(function(n,r,i){if(t(i,2,2),u(i[0])){let n=e(i[1]);if(isNaN(n)||!1===o(n))throw new Error("Invalid Parameter");const r=i[0];if(r.length<=0)throw new Error("Array is empty");if(n<0&&(n=r.length+n),n<0)throw new Error("Element not found");if(n>=r.length)throw new Error("Index is greater than array");return r.splice(n,1),c}throw new Error("Invalid Parameter")}))},w.functions.insert=function(n,r){return w.standardFunction(n,r,(function(n,r,i){if(t(i,3,3),u(i[0])){const n=e(i[1]);if(isNaN(n)||!1===o(n))throw new Error("Invalid Parameter");const r=i[2],t=i[0];if(n>t.length)throw new Error("Index is greater than array");if(n<0&&n<-1*t.length)throw new Error("Index is greater than array");return n===t.length?(t[n]=r,c):(t.splice(n,0,r),c)}throw new Error("Invalid Parameter")}))},w.functions.resize=function(n,r){return w.standardFunction(n,r,(function(n,r,a){if(t(a,2,3),u(a[0])){const n=e(a[1]);if(isNaN(n)||!1===o(n))throw new Error("Invalid Parameter");if(n<0)throw new Error("Size cannot be negative");const r=i(a[2],null),t=a[0];if(t.length>=n)return t.length=n,c;const u=t.length;t.length=n;for(let e=u;e<t.length;e++)t[e]=r;return c}throw new Error("Invalid Parameter")}))},w.functions.includes=function(n,r){return w.standardFunction(n,r,(function(n,r,e){if(t(e,2,2),u(e[0])){const n=e[1];return e[0].findIndex((r=>s(r,n)))>-1}if(a(e[0])){const n=e[1];return e[0].toArray().findIndex((r=>s(r,n)))>-1}throw new Error("Invalid Parameter")}))},w.functions.slice=function(n,r){return w.standardFunction(n,r,(function(n,r,c){if(t(c,1,3),u(c[0])){const n=e(i(c[1],0)),r=e(i(c[2],c[0].length));if(isNaN(n)||!1===o(n))throw new Error("Invalid Parameter");if(isNaN(r)||!1===o(r))throw new Error("Invalid Parameter");return c[0].slice(n,r)}if(a(c[0])){const n=c[0],r=e(i(c[1],0)),t=e(i(c[2],n.length()));if(isNaN(r)||!1===o(r))throw new Error("Invalid Parameter");if(isNaN(t)||!1===o(t))throw new Error("Invalid Parameter");return n.toArray().slice(r,t)}throw new Error("Invalid Parameter")}))},w.functions.splice=function(n,r){return w.standardFunction(n,r,(function(n,r,t){const e=[];for(let o=0;o<t.length;o++)u(t[o])?e.push(...t[o]):a(t[o])?e.push(...t[o].toArray()):e.push(t[o]);return e}))},"sync"===w.mode&&(w.functions.any=function(n,r){return w.standardFunction(n,r,(function(r,e,o){t(o,2,2);const i=m(n,o[1]),a=g(o[0]);for(const n of a){const r=i(n);if(f(r)&&!0===r)return!0}return!1}))},w.functions.all=function(n,r){return w.standardFunction(n,r,(function(r,e,o){t(o,2,2);const i=m(n,o[1]),a=g(o[0]);for(const n of a){if(!0!==i(n))return!1}return!0}))},w.functions.none=function(n,r){return w.standardFunction(n,r,(function(r,e,o){t(o,2,2);const i=m(n,o[1]),a=g(o[0]);for(const n of a){if(!0===i(n))return!1}return!0}))},w.functions.reduce=function(n,r){return w.standardFunction(n,r,(function(r,e,o){t(o,2,3);const i=m(n,o[1]),a=g(o[0]);return 2===o.length?0===a.length?null:a.reduce(((n,r)=>{const t=i(n,r);return n=void 0!==t&&t!==c?t:null})):a.reduce(((n,r)=>{const t=i(n,r);return n=void 0!==t&&t!==c?t:null}),o[2])}))},w.functions.map=function(n,r){return w.standardFunction(n,r,(function(r,e,o){t(o,2,2);const i=m(n,o[1]),a=g(o[0]),u=[];for(const n of a){const r=i(n);void 0!==r&&r!==c?u.push(r):u.push(null)}return u}))},w.functions.filter=function(n,r){return w.standardFunction(n,r,(function(r,e,o){t(o,2,2);const i=m(n,o[1]),a=g(o[0]),u=[];for(const n of a){!0===i(n)&&u.push(n)}return u}))}),"async"===w.mode&&(w.functions.any=function(n,r){return w.standardFunctionAsync(n,r,(async function(r,e,o){t(o,2,2);const i=m(n,o[1]),a=g(o[0]);for(const n of a){const r=await i(n);let t=null;if(t=h(t)?await r:r,f(t)&&!0===t)return!0}return!1}))},w.functions.all=function(n,r){return w.standardFunctionAsync(n,r,(async function(r,e,o){t(o,2,2);const i=m(n,o[1]),a=g(o[0]);for(const n of a){const r=await i(n);let t=null;if(t=h(t)?await r:r,!0!==t)return!1}return!0}))},w.functions.none=function(n,r){return w.standardFunctionAsync(n,r,(async function(r,e,o){t(o,2,2);const i=m(n,o[1]),a=g(o[0]);for(const n of a){const r=await i(n);let t=null;if(t=h(t)?await r:r,!0===t)return!1}return!0}))},w.functions.filter=function(n,r){return w.standardFunctionAsync(n,r,(async function(r,e,o){t(o,2,2);const i=m(n,o[1]),a=g(o[0]),u=[];for(const n of a){const r=await i(n);let t=null;t=h(t)?await r:r,!0===t&&u.push(n)}return u}))},w.functions.reduce=function(n,r){return w.standardFunctionAsync(n,r,(function(r,e,o){t(o,2,3);const a=m(n,o[1]),u=g(o[0]);let s=null;if(o.length>2){const n=i(o[2],null);s=u.reduce((async(n,r)=>{let t=await n;return void 0!==t&&t!==c||(t=null),a(t,r)}),Promise.resolve(n))}else{if(0===u.length)return null;s=u.reduce((async(n,r,t)=>{if(t<=1)return a(n,r);let e=await n;return void 0!==e&&e!==c||(e=null),a(e,r)}))}return s.then((n=>void 0!==n&&n!==c?n:null))}))},w.functions.map=function(n,r){return w.standardFunctionAsync(n,r,(async function(r,e,o){t(o,2,2);const i=m(n,o[1]),a=g(o[0]),u=[];for(const n of a){const r=await i(n);let t=null;t=h(t)?await r:r,void 0!==t&&t!==c?u.push(t):u.push(null)}return u}))})}const m=Object.freeze(Object.defineProperty({__proto__:null,registerFunctions:w},Symbol.toStringTag,{value:"Module"}));export{m as A,w as r};
|
package/chunks/languageUtils.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../arcade/FunctionWrapper.js";import t from"../arcade/ImmutableArray.js";import n from"../arcade/ImmutablePathArray.js";import r from"../arcade/ImmutablePointArray.js";import{create as i,resolve as a,all as o}from"../core/promiseUtils.js";import s from"../geometry/Extent.js";import u from"../geometry/Geometry.js";import l from"../geometry/Multipoint.js";import f from"../geometry/Point.js";import c from"../geometry/Polygon.js";import m from"../geometry/Polyline.js";import{DateTime as d}from"luxon";import{isNone as p}from"../core/maybe.js";import{format as y,parse as g}from"../core/number.js";import{isClockwise as h}from"../geometry/support/coordsUtils.js";import{getLocale as S}from"../intl/locale.js";import{esriFieldToJson as x,layerGeometryEsriRestConstants as b}from"../arcade/featureset/support/shared.js";class T{constructor(e){this.value=e}}class N{constructor(e){this.value=e}}class k{constructor(e){this.fn=e}}class D{constructor(e,t){this.paramCount=t,this.fn=e}}const M=k,j=N,A=T,R=D,F={type:"VOID"},v={type:"BREAK"},C={type:"CONTINUE"};function I(e,t,n){return""===t||null==t||t===n||t===n?e:e=e.split(t).join(n)}function _(t){return t instanceof k||t instanceof e||t instanceof D}function w(e){return!!Z(e)||(!!Y(e)||(!!H(e)||(!!L(e)||(null===e||(e===F||"number"==typeof e)))))}function O(e,t){return void 0===e?t:e}function Z(e){return"string"==typeof e||e instanceof String}function L(e){return"boolean"==typeof e}function Y(e){return"number"==typeof e}function J(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}function E(e){return e instanceof Array}function P(e){return"esri.arcade.Feature"===e?.arcadeDeclaredClass}function z(e){return!0===(e&&e.declaredRootClass&&"esri.arcade.featureset.support.FeatureSet"===e.declaredRootClass)}function G(e){return!0===(e&&e.declaredRootClass&&"esri.arcade.featureSetCollection"===e.declaredRootClass)}function V(e){return e instanceof t}function H(e){return e instanceof Date}function U(e,t,n){if(e.length<t||e.length>n)throw new Error("Function called with wrong number of Parameters")}function q(e){return e<0?-Math.round(-e):Math.round(e)}function $(){let e=Date.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:3&n|8).toString(16)}))}function B(e,t){return!1===isNaN(e)?null==t||""===t?e.toString():(t=I(t,"‰",""),t=I(t,"¤",""),y(e,{pattern:t})):e.toString()}function W(e,t){const n=d.fromJSDate(e);return null==t||""===t?n.toISO({suppressMilliseconds:!0}):n.toFormat(Q(t),{locale:S(),numberingSystem:"latn"})}function Q(e){e=e.replace(/LTS|LT|LL?L?L?|l{1,4}/g,"[$&]");let t="";const n=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;for(const r of e.match(n))switch(r){case"D":t+="d";break;case"DD":t+="dd";break;case"DDD":t+="o";break;case"d":t+="c";break;case"ddd":t+="ccc";break;case"dddd":t+="cccc";break;case"M":t+="L";break;case"MM":t+="LL";break;case"MMM":t+="LLL";break;case"MMMM":t+="LLLL";break;case"YY":t+="yy";break;case"Y":case"YYYY":t+="yyyy";break;case"Q":t+="q";break;case"Z":t+="ZZ";break;case"ZZ":t+="ZZZ";break;case"S":t+="'S'";break;case"SS":t+="'SS'";break;case"SSS":t+="u";break;case"A":case"a":t+="a";break;case"m":case"mm":case"h":case"hh":case"H":case"HH":case"s":case"ss":case"X":case"x":t+=r;break;default:r.length>=2&&"["===r.slice(0,1)&&"]"===r.slice(-1)?t+=`'${r.slice(1,-1)}'`:t+=`'${r}'`}return t}function X(e,t,n){switch(n){case">":return e>t;case"<":return e<t;case">=":return e>=t;case"<=":return e<=t}return!1}function K(e,t,n){if(null===e){if(null===t||t===F)return X(null,null,n);if(Y(t))return X(0,t,n);if(Z(t))return X(0,ae(t),n);if(L(t))return X(0,ae(t),n);if(H(t))return X(0,t.getTime(),n)}if(e===F){if(null===t||t===F)return X(null,null,n);if(Y(t))return X(0,t,n);if(Z(t))return X(0,ae(t),n);if(L(t))return X(0,ae(t),n);if(H(t))return X(0,t.getTime(),n)}else if(Y(e)){if(Y(t))return X(e,t,n);if(L(t))return X(e,ae(t),n);if(null===t||t===F)return X(e,0,n);if(Z(t))return X(e,ae(t),n);if(H(t))return X(e,t.getTime(),n)}else if(Z(e)){if(Z(t))return X(te(e),te(t),n);if(H(t))return X(ae(e),t.getTime(),n);if(Y(t))return X(ae(e),t,n);if(null===t||t===F)return X(ae(e),0,n);if(L(t))return X(ae(e),ae(t),n)}else if(H(e)){if(H(t))return X(e,t,n);if(null===t||t===F)return X(e.getTime(),0,n);if(Y(t))return X(e.getTime(),t,n);if(L(t))return X(e.getTime(),ae(t),n);if(Z(t))return X(e.getTime(),ae(t),n)}else if(L(e)){if(L(t))return X(e,t,n);if(Y(t))return X(ae(e),ae(t),n);if(H(t))return X(ae(e),t.getTime(),n);if(null===t||t===F)return X(ae(e),0,n);if(Z(t))return X(ae(e),ae(t),n)}return!!ee(e,t)&&("<="===n||">="===n)}function ee(e,t){if(e===t)return!0;if(null===e&&t===F||null===t&&e===F)return!0;if(H(e)&&H(t))return e.getTime()===t.getTime();if(e instanceof n)return e.equalityTest(t);if(e instanceof r)return e.equalityTest(t);if(e instanceof f&&t instanceof f){const n=e.cache._arcadeCacheId,r=t.cache._arcadeCacheId;if(null!=n)return n===r}if(void 0!==e&&void 0!==t&&null!==e&&null!==t&&"object"==typeof e&&"object"==typeof t){if(e._arcadeCacheId===t._arcadeCacheId&&void 0!==e._arcadeCacheId&&null!==e._arcadeCacheId)return!0;if(e._underlyingGraphic===t._underlyingGraphic&&void 0!==e._underlyingGraphic&&null!==e._underlyingGraphic)return!0}return!1}function te(e,n){if(Z(e))return e;if(null===e)return"";if(Y(e))return B(e,n);if(L(e))return e.toString();if(H(e))return W(e,n);if(e instanceof u)return JSON.stringify(e.toJSON());if(E(e)){const t=[];for(let n=0;n<e.length;n++)t[n]=ie(e[n]);return"["+t.join(",")+"]"}if(e instanceof t){const t=[];for(let n=0;n<e.length();n++)t[n]=ie(e.get(n));return"["+t.join(",")+"]"}return null!==e&&"object"==typeof e&&void 0!==e.castToText?e.castToText():_(e)?"object, Function":""}function ne(e){const n=[];if(!1===E(e))return null;if(e instanceof t){for(let t=0;t<e.length();t++)n[t]=ae(e.get(t));return n}for(let t=0;t<e.length;t++)n[t]=ae(e[t]);return n}function re(e,n){if(Z(e))return e;if(null===e)return"";if(Y(e))return B(e,n);if(L(e))return e.toString();if(H(e))return W(e,n);if(e instanceof u)return e instanceof s?'{"xmin":'+e.xmin.toString()+',"ymin":'+e.ymin.toString()+","+(e.hasZ?'"zmin":'+e.zmin.toString()+",":"")+(e.hasM?'"mmin":'+e.mmin.toString()+",":"")+'"xmax":'+e.xmax.toString()+',"ymax":'+e.ymax.toString()+","+(e.hasZ?'"zmax":'+e.zmax.toString()+",":"")+(e.hasM?'"mmax":'+e.mmax.toString()+",":"")+'"spatialReference":'+ge(e.spatialReference)+"}":ge(e.toJSON(),((e,t)=>e.key===t.key?0:"spatialReference"===e.key?1:"spatialReference"===t.key||e.key<t.key?-1:e.key>t.key?1:0));if(E(e)){const t=[];for(let n=0;n<e.length;n++)t[n]=ie(e[n]);return"["+t.join(",")+"]"}if(e instanceof t){const t=[];for(let n=0;n<e.length();n++)t[n]=ie(e.get(n));return"["+t.join(",")+"]"}return null!==e&&"object"==typeof e&&void 0!==e.castToText?e.castToText():_(e)?"object, Function":""}function ie(e){if(null===e)return"null";if(L(e)||Y(e)||Z(e))return JSON.stringify(e);if(e instanceof u)return re(e);if(e instanceof t)return re(e);if(e instanceof Array)return re(e);if(e instanceof Date)return JSON.stringify(W(e,""));if(null!==e&&"object"==typeof e){if(void 0!==e.castToText)return e.castToText()}else if(e===F)return"null";return"null"}function ae(e,t){return Y(e)?e:null===e||""===e?0:H(e)?NaN:L(e)?e?1:0:E(e)||""===e||void 0===e?NaN:void 0!==t&&Z(e)?(t=I(t,"‰",""),t=I(t,"¤",""),g(e,{pattern:t})):e===F?0:Number(e)}function oe(e){if(H(e))return e;if(Z(e)){const t=ue(e);if(t)return t.toJSDate()}return null}function se(e){return H(e)?d.fromJSDate(e):Z(e)?ue(e):null}function ue(e){const t=/ (\d\d)/;let n=d.fromISO(e);return n.isValid||t.test(e)&&(e=e.replace(t,"T$1"),n=d.fromISO(e),n.isValid)?n:null}function le(e){return L(e)?e:Z(e)?"true"===(e=e.toLowerCase()):!!Y(e)&&(0!==e&&!isNaN(e))}function fe(e,t){return p(e)?null:(null!==e.spatialReference&&void 0!==e.spatialReference||(e.spatialReference=t),e)}function ce(e){if(null===e)return null;if(e instanceof f)return"NaN"===e.x||null===e.x||isNaN(e.x)?null:e;if(e instanceof c){if(0===e.rings.length)return null;for(const t of e.rings)if(t.length>0)return e;return null}if(e instanceof m){if(0===e.paths.length)return null;for(const t of e.paths)if(t.length>0)return e;return null}return e instanceof l?0===e.points.length?null:e:e instanceof s?"NaN"===e.xmin||null===e.xmin||isNaN(e.xmin)?null:e:null}function me(e,t){if(!e)return t;if(!e.domain)return t;let n=null;if("string"===e.field.type||"esriFieldTypeString"===e.field.type)t=te(t);else{if(null==t)return null;if(""===t)return t;t=ae(t)}for(let r=0;r<e.domain.codedValues.length;r++){const i=e.domain.codedValues[r];i.code===t&&(n=i)}return null===n?t:n.name}function de(e,t){if(!e)return t;if(!e.domain)return t;let n=null;t=te(t);for(let r=0;r<e.domain.codedValues.length;r++){const i=e.domain.codedValues[r];i.name===t&&(n=i)}return null===n?t:n.code}function pe(e,t,n=null,r=null){if(!t)return null;if(!t.fields)return null;let i,a,o=null;for(let s=0;s<t.fields.length;s++){const n=t.fields[s];n.name.toLowerCase()===e.toString().toLowerCase()&&(o=n)}if(null===o)throw new Error("Field not found");return null===r&&n&&t.typeIdField&&(r=n.hasField(t.typeIdField)?n.field(t.typeIdField):null),null!=r&&t.types.some((function(e){return e.id===r&&(i=e.domains&&e.domains[o.name],i&&"inherited"===i.type&&(i=ye(o.name,t),a=!0),!0)})),a||i||(i=ye(e,t)),{field:o,domain:i}}function ye(e,t){let n;return t.fields.some((function(t){return t.name.toLowerCase()===e.toLowerCase()&&(n=t.domain),!!n})),n}function ge(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});const n="boolean"==typeof t.cycles&&t.cycles,r=t.cmp&&(i=t.cmp,function(e){return function(t,n){const r={key:t,value:e[t]},a={key:n,value:e[n]};return i(r,a)}});var i;const a=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0===t)return;if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);let i,o;if(Array.isArray(t)){for(o="[",i=0;i<t.length;i++)i&&(o+=","),o+=e(t[i])||"null";return o+"]"}if(null===t)return"null";if(a.includes(t)){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}const s=a.push(t)-1,u=Object.keys(t).sort(r&&r(t));for(o="",i=0;i<u.length;i++){const n=u[i],r=e(t[n]);r&&(o&&(o+=","),o+=JSON.stringify(n)+":"+r)}return a.splice(s,1),"{"+o+"}"}(e)}function he(e){if(null===e)return null;const t=[];for(const n of e)n&&n.arcadeDeclaredClass&&"esri.arcade.Feature"===n.arcadeDeclaredClass?t.push(n.geometry()):t.push(n);return t}function Se(e,t){if(!(t instanceof f))throw new Error("Invalid Argument");e.push(t.hasZ?t.hasM?[t.x,t.y,t.z,t.m]:[t.x,t.y,t.z]:[t.x,t.y])}function xe(e,t){if(E(e)||V(e)){let n=!1,i=!1,a=[],o=t;if(E(e)){for(const t of e)Se(a,t);a.length>0&&(o=e[0].spatialReference,n=e[0].hasZ,i=e[0].hasM)}else if(e instanceof r)a=e._elements,a.length>0&&(n=e._hasZ,i=e._hasM,o=e.get(0).spatialReference);else{if(!V(e))throw new Error("Invalid Argument");for(const t of e.toArray())Se(a,t);a.length>0&&(o=e.get(0).spatialReference,n=!0===e.get(0).hasZ,i=!0===e.get(0).hasM)}if(0===a.length)return null;return!1===h(a,i,n)&&(a=a.slice(0).reverse()),new c({rings:[a],spatialReference:o,hasZ:n,hasM:i})}return e}function be(e,t){if(E(e)||V(e)){let n=!1,i=!1,a=[],o=t;if(E(e)){for(const t of e)Se(a,t);a.length>0&&(o=e[0].spatialReference,n=!0===e[0].hasZ,i=!0===e[0].hasM)}else if(e instanceof r)a=e._elements,a.length>0&&(n=e._hasZ,i=e._hasM,o=e.get(0).spatialReference);else if(V(e)){for(const t of e.toArray())Se(a,t);a.length>0&&(o=e.get(0).spatialReference,n=!0===e.get(0).hasZ,i=!0===e.get(0).hasM)}return 0===a.length?null:new m({paths:[a],spatialReference:o,hasZ:n,hasM:i})}return e}function Te(e,t){if(E(e)||V(e)){let n=!1,i=!1,a=[],o=t;if(E(e)){for(const t of e)Se(a,t);a.length>0&&(o=e[0].spatialReference,n=!0===e[0].hasZ,i=!0===e[0].hasM)}else if(e instanceof r)a=e._elements,a.length>0&&(n=e._hasZ,i=e._hasM,o=e.get(0).spatialReference);else if(V(e)){for(const t of e.toArray())Se(a,t);a.length>0&&(o=e.get(0).spatialReference,n=!0===e.get(0).hasZ,i=!0===e.get(0).hasM)}return 0===a.length?null:new l({points:a,spatialReference:o,hasZ:n,hasM:i})}return e}function Ne(e,n=!1){const r=[];if(null===e)return r;if(!0===E(e)){for(let t=0;t<e.length;t++){const i=te(e[t]);""===i&&!0!==n||r.push(i)}return r}if(e instanceof t){for(let t=0;t<e.length();t++){const i=te(e.get(t));""===i&&!0!==n||r.push(i)}return r}if(w(e)){const t=te(e);return""===t&&!0!==n||r.push(t),r}return[]}let ke=0;function De(e){return ke++,ke%100==0?(ke=0,i((t=>{setTimeout((()=>{t(e)}),0)}))):e}function Me(e,t,n){switch(n){case"&":return e&t;case"|":return e|t;case"^":return e^t;case"<<":return e<<t;case">>":return e>>t;case">>>":return e>>>t}}function je(e,n=null){return null==e?null:L(e)||Y(e)||Z(e)?e:e instanceof u?!0===n?.keepGeometryType?e:e.toJSON():e instanceof t?e.toArray().map((e=>je(e,n))):e instanceof Array?e.map((e=>je(e,n))):e instanceof Date?e:null!==e&&"object"==typeof e&&void 0!==e.castAsJson?e.castAsJson(n):null}function Ae(e,t,n,r,i){return Re(e,t,n).then((e=>{i[r]=e}))}function Re(e,n=null,r=null){if(e instanceof t&&(e=e.toArray()),null==e)return a(null);if(w(e)||e instanceof u||e instanceof Date)return a(je(e,r));if(e instanceof Array){const t=[],i=[];for(const a of e)null===a||w(a)||a instanceof u||a instanceof Date?i.push(je(a,r)):(i.push(null),t.push(Ae(a,n,r,i.length-1,i)));return t.length>0?o(t).then((()=>i)):a(i)}return null!==e&&"object"==typeof e&&void 0!==e.castAsJsonAsync?e.castAsJsonAsync(n,r):a(null)}function Fe(e,t,n){const r=e.fullSchema();if(null===r)return null;if(!r.fields)return null;return pe(t,r,e,n)}function ve(e){const t=e.fullSchema();return null===t?null:t.fields&&t.typeIdField?{subtypeField:t.typeIdField,subtypes:t.types?t.types.map((e=>({name:e.name,code:e.id}))):[]}:null}function Ce(e,t,n,r){const i=e.fullSchema();if(null===i)return null;if(!i.fields)return null;const a=pe(t,i,e,r);if(void 0===n)try{n=e.field(t)}catch(o){return null}return me(a,n)}function Ie(e,t,n,r){const i=e.fullSchema();if(null===i)return null;if(!i.fields)return null;if(void 0===n){try{n=e.field(t)}catch(a){return null}return n}return de(pe(t,i,e,r),n)}function _e(e){const t=e.fullSchema();if(null===t)return null;if(!t.fields)return null;const n=[];for(const r of t.fields)n.push(x(r));return{objectIdField:t.objectIdField,globalIdField:t.globalIdField,geometryType:void 0===b[t.geometryType]?"":b[t.geometryType],fields:n}}const we=Object.freeze(Object.defineProperty({__proto__:null,ReturnResultE:T,ImplicitResultE:N,NativeFunctionE:k,SizzleFunctionE:D,NativeFunction:M,ImplicitResult:j,ReturnResult:A,SizzleFunction:R,voidOperation:F,breakResult:v,continueResult:C,multiReplace:I,isFunctionParameter:_,isSimpleType:w,defaultUndefined:O,isString:Z,isBoolean:L,isNumber:Y,isInteger:J,isArray:E,isFeature:P,isFeatureSet:z,isFeatureSetCollection:G,isImmutableArray:V,isDate:H,pcCheck:U,absRound:q,generateUUID:$,formatNumber:B,formatDate:W,standardiseDateFormat:Q,greaterThanLessThan:K,equalityTest:ee,toString:te,toNumberArray:ne,toStringExplicit:re,toNumber:ae,toDate:oe,toDateTime:se,toBoolean:le,fixSpatialReference:fe,fixNullGeometry:ce,getDomainValue:me,getDomainCode:de,getDomain:pe,stableStringify:ge,autoCastFeatureToGeometry:he,autoCastArrayOfPointsToPolygon:xe,autoCastArrayOfPointsToPolyline:be,autoCastArrayOfPointsToMultiPoint:Te,toStringArray:Ne,tick:De,binaryOperator:Me,castAsJson:je,castAsJsonAsync:Re,featureFullDomain:Fe,featureSubtypes:ve,featureDomainValueLookup:Ce,featureDomainCodeLookup:Ie,featureSchema:_e},Symbol.toStringTag,{value:"Module"}));export{de as $,oe as A,J as B,O as C,Q as D,se as E,q as F,ce as G,he as H,j as I,be as J,xe as K,Te as L,I as M,M as N,$ as O,_e as P,ve as Q,A as R,R as S,Fe as T,Ce as U,Ie as V,ne as W,De as X,Ne as Y,pe as Z,me as _,E as a,T as a0,N as a1,k as a2,D as a3,B as a4,W as a5,ge as a6,V as b,_ as c,te as d,ee as e,Z as f,K as g,Me as h,L as i,Y as j,P as k,we as l,v as m,C as n,H as o,U as p,z as q,G as r,fe as s,ae as t,re as u,F as v,je as w,Re as x,w as y,le as z};
|
|
5
|
+
import e from"../arcade/FunctionWrapper.js";import t from"../arcade/ImmutableArray.js";import n from"../arcade/ImmutablePathArray.js";import r from"../arcade/ImmutablePointArray.js";import i from"../geometry/Extent.js";import a from"../geometry/Geometry.js";import o from"../geometry/Multipoint.js";import s from"../geometry/Point.js";import u from"../geometry/Polygon.js";import l from"../geometry/Polyline.js";import{DateTime as f}from"luxon";import{isNone as c}from"../core/maybe.js";import{format as m,parse as d}from"../core/number.js";import{isClockwise as y}from"../geometry/support/coordsUtils.js";import{getLocale as p}from"../intl/locale.js";import{esriFieldToJson as g,layerGeometryEsriRestConstants as h}from"../arcade/featureset/support/shared.js";class S{constructor(e){this.value=e}}class x{constructor(e){this.value=e}}class b{constructor(e){this.fn=e}}class T{constructor(e,t){this.paramCount=t,this.fn=e}}const N=b,k=x,D=S,M=T,j={type:"VOID"},A={type:"BREAK"},R={type:"CONTINUE"};function F(e,t,n){return""===t||null==t||t===n||t===n?e:e=e.split(t).join(n)}function v(t){return t instanceof b||t instanceof e||t instanceof T}function C(e){return!!w(e)||(!!O(e)||(!!z(e)||(!!_(e)||(null===e||(e===j||"number"==typeof e)))))}function I(e,t){return void 0===e?t:e}function w(e){return"string"==typeof e||e instanceof String}function _(e){return"boolean"==typeof e}function O(e){return"number"==typeof e}function Z(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}function L(e){return e instanceof Array}function Y(e){return"esri.arcade.Feature"===e?.arcadeDeclaredClass}function J(e){return!0===(e&&e.declaredRootClass&&"esri.arcade.featureset.support.FeatureSet"===e.declaredRootClass)}function P(e){return!0===(e&&e.declaredRootClass&&"esri.arcade.featureSetCollection"===e.declaredRootClass)}function E(e){return e instanceof t}function z(e){return e instanceof Date}function G(e,t,n){if(e.length<t||e.length>n)throw new Error("Function called with wrong number of Parameters")}function V(e){return e<0?-Math.round(-e):Math.round(e)}function H(){let e=Date.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:3&n|8).toString(16)}))}function U(e,t){return!1===isNaN(e)?null==t||""===t?e.toString():(t=F(t,"‰",""),t=F(t,"¤",""),m(e,{pattern:t})):e.toString()}function q(e,t){const n=f.fromJSDate(e);return null==t||""===t?n.toISO({suppressMilliseconds:!0}):n.toFormat($(t),{locale:p(),numberingSystem:"latn"})}function $(e){e=e.replace(/LTS|LT|LL?L?L?|l{1,4}/g,"[$&]");let t="";const n=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;for(const r of e.match(n))switch(r){case"D":t+="d";break;case"DD":t+="dd";break;case"DDD":t+="o";break;case"d":t+="c";break;case"ddd":t+="ccc";break;case"dddd":t+="cccc";break;case"M":t+="L";break;case"MM":t+="LL";break;case"MMM":t+="LLL";break;case"MMMM":t+="LLLL";break;case"YY":t+="yy";break;case"Y":case"YYYY":t+="yyyy";break;case"Q":t+="q";break;case"Z":t+="ZZ";break;case"ZZ":t+="ZZZ";break;case"S":t+="'S'";break;case"SS":t+="'SS'";break;case"SSS":t+="u";break;case"A":case"a":t+="a";break;case"m":case"mm":case"h":case"hh":case"H":case"HH":case"s":case"ss":case"X":case"x":t+=r;break;default:r.length>=2&&"["===r.slice(0,1)&&"]"===r.slice(-1)?t+=`'${r.slice(1,-1)}'`:t+=`'${r}'`}return t}function B(e,t,n){switch(n){case">":return e>t;case"<":return e<t;case">=":return e>=t;case"<=":return e<=t}return!1}function W(e,t,n){if(null===e){if(null===t||t===j)return B(null,null,n);if(O(t))return B(0,t,n);if(w(t))return B(0,ne(t),n);if(_(t))return B(0,ne(t),n);if(z(t))return B(0,t.getTime(),n)}if(e===j){if(null===t||t===j)return B(null,null,n);if(O(t))return B(0,t,n);if(w(t))return B(0,ne(t),n);if(_(t))return B(0,ne(t),n);if(z(t))return B(0,t.getTime(),n)}else if(O(e)){if(O(t))return B(e,t,n);if(_(t))return B(e,ne(t),n);if(null===t||t===j)return B(e,0,n);if(w(t))return B(e,ne(t),n);if(z(t))return B(e,t.getTime(),n)}else if(w(e)){if(w(t))return B(X(e),X(t),n);if(z(t))return B(ne(e),t.getTime(),n);if(O(t))return B(ne(e),t,n);if(null===t||t===j)return B(ne(e),0,n);if(_(t))return B(ne(e),ne(t),n)}else if(z(e)){if(z(t))return B(e,t,n);if(null===t||t===j)return B(e.getTime(),0,n);if(O(t))return B(e.getTime(),t,n);if(_(t))return B(e.getTime(),ne(t),n);if(w(t))return B(e.getTime(),ne(t),n)}else if(_(e)){if(_(t))return B(e,t,n);if(O(t))return B(ne(e),ne(t),n);if(z(t))return B(ne(e),t.getTime(),n);if(null===t||t===j)return B(ne(e),0,n);if(w(t))return B(ne(e),ne(t),n)}return!!Q(e,t)&&("<="===n||">="===n)}function Q(e,t){if(e===t)return!0;if(null===e&&t===j||null===t&&e===j)return!0;if(z(e)&&z(t))return e.getTime()===t.getTime();if(e instanceof n)return e.equalityTest(t);if(e instanceof r)return e.equalityTest(t);if(e instanceof s&&t instanceof s){const n=e.cache._arcadeCacheId,r=t.cache._arcadeCacheId;if(null!=n)return n===r}if(void 0!==e&&void 0!==t&&null!==e&&null!==t&&"object"==typeof e&&"object"==typeof t){if(e._arcadeCacheId===t._arcadeCacheId&&void 0!==e._arcadeCacheId&&null!==e._arcadeCacheId)return!0;if(e._underlyingGraphic===t._underlyingGraphic&&void 0!==e._underlyingGraphic&&null!==e._underlyingGraphic)return!0}return!1}function X(e,n){if(w(e))return e;if(null===e)return"";if(O(e))return U(e,n);if(_(e))return e.toString();if(z(e))return q(e,n);if(e instanceof a)return JSON.stringify(e.toJSON());if(L(e)){const t=[];for(let n=0;n<e.length;n++)t[n]=te(e[n]);return"["+t.join(",")+"]"}if(e instanceof t){const t=[];for(let n=0;n<e.length();n++)t[n]=te(e.get(n));return"["+t.join(",")+"]"}return null!==e&&"object"==typeof e&&void 0!==e.castToText?e.castToText():v(e)?"object, Function":""}function K(e){const n=[];if(!1===L(e))return null;if(e instanceof t){for(let t=0;t<e.length();t++)n[t]=ne(e.get(t));return n}for(let t=0;t<e.length;t++)n[t]=ne(e[t]);return n}function ee(e,n){if(w(e))return e;if(null===e)return"";if(O(e))return U(e,n);if(_(e))return e.toString();if(z(e))return q(e,n);if(e instanceof a)return e instanceof i?'{"xmin":'+e.xmin.toString()+',"ymin":'+e.ymin.toString()+","+(e.hasZ?'"zmin":'+e.zmin.toString()+",":"")+(e.hasM?'"mmin":'+e.mmin.toString()+",":"")+'"xmax":'+e.xmax.toString()+',"ymax":'+e.ymax.toString()+","+(e.hasZ?'"zmax":'+e.zmax.toString()+",":"")+(e.hasM?'"mmax":'+e.mmax.toString()+",":"")+'"spatialReference":'+de(e.spatialReference)+"}":de(e.toJSON(),((e,t)=>e.key===t.key?0:"spatialReference"===e.key?1:"spatialReference"===t.key||e.key<t.key?-1:e.key>t.key?1:0));if(L(e)){const t=[];for(let n=0;n<e.length;n++)t[n]=te(e[n]);return"["+t.join(",")+"]"}if(e instanceof t){const t=[];for(let n=0;n<e.length();n++)t[n]=te(e.get(n));return"["+t.join(",")+"]"}return null!==e&&"object"==typeof e&&void 0!==e.castToText?e.castToText():v(e)?"object, Function":""}function te(e){if(null===e)return"null";if(_(e)||O(e)||w(e))return JSON.stringify(e);if(e instanceof a)return ee(e);if(e instanceof t)return ee(e);if(e instanceof Array)return ee(e);if(e instanceof Date)return JSON.stringify(q(e,""));if(null!==e&&"object"==typeof e){if(void 0!==e.castToText)return e.castToText()}else if(e===j)return"null";return"null"}function ne(e,t){return O(e)?e:null===e||""===e?0:z(e)?NaN:_(e)?e?1:0:L(e)||""===e||void 0===e?NaN:void 0!==t&&w(e)?(t=F(t,"‰",""),t=F(t,"¤",""),d(e,{pattern:t})):e===j?0:Number(e)}function re(e){if(z(e))return e;if(w(e)){const t=ae(e);if(t)return t.toJSDate()}return null}function ie(e){return z(e)?f.fromJSDate(e):w(e)?ae(e):null}function ae(e){const t=/ (\d\d)/;let n=f.fromISO(e);return n.isValid||t.test(e)&&(e=e.replace(t,"T$1"),n=f.fromISO(e),n.isValid)?n:null}function oe(e){return _(e)?e:w(e)?"true"===(e=e.toLowerCase()):!!O(e)&&(0!==e&&!isNaN(e))}function se(e,t){return c(e)?null:(null!==e.spatialReference&&void 0!==e.spatialReference||(e.spatialReference=t),e)}function ue(e){if(null===e)return null;if(e instanceof s)return"NaN"===e.x||null===e.x||isNaN(e.x)?null:e;if(e instanceof u){if(0===e.rings.length)return null;for(const t of e.rings)if(t.length>0)return e;return null}if(e instanceof l){if(0===e.paths.length)return null;for(const t of e.paths)if(t.length>0)return e;return null}return e instanceof o?0===e.points.length?null:e:e instanceof i?"NaN"===e.xmin||null===e.xmin||isNaN(e.xmin)?null:e:null}function le(e,t){if(!e)return t;if(!e.domain)return t;let n=null;if("string"===e.field.type||"esriFieldTypeString"===e.field.type)t=X(t);else{if(null==t)return null;if(""===t)return t;t=ne(t)}for(let r=0;r<e.domain.codedValues.length;r++){const i=e.domain.codedValues[r];i.code===t&&(n=i)}return null===n?t:n.name}function fe(e,t){if(!e)return t;if(!e.domain)return t;let n=null;t=X(t);for(let r=0;r<e.domain.codedValues.length;r++){const i=e.domain.codedValues[r];i.name===t&&(n=i)}return null===n?t:n.code}function ce(e,t,n=null,r=null){if(!t)return null;if(!t.fields)return null;let i,a,o=null;for(let s=0;s<t.fields.length;s++){const n=t.fields[s];n.name.toLowerCase()===e.toString().toLowerCase()&&(o=n)}if(null===o)throw new Error("Field not found");return null===r&&n&&t.typeIdField&&(r=n.hasField(t.typeIdField)?n.field(t.typeIdField):null),null!=r&&t.types.some((function(e){return e.id===r&&(i=e.domains&&e.domains[o.name],i&&"inherited"===i.type&&(i=me(o.name,t),a=!0),!0)})),a||i||(i=me(e,t)),{field:o,domain:i}}function me(e,t){let n;return t.fields.some((function(t){return t.name.toLowerCase()===e.toLowerCase()&&(n=t.domain),!!n})),n}function de(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});const n="boolean"==typeof t.cycles&&t.cycles,r=t.cmp&&(i=t.cmp,function(e){return function(t,n){const r={key:t,value:e[t]},a={key:n,value:e[n]};return i(r,a)}});var i;const a=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0===t)return;if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);let i,o;if(Array.isArray(t)){for(o="[",i=0;i<t.length;i++)i&&(o+=","),o+=e(t[i])||"null";return o+"]"}if(null===t)return"null";if(a.includes(t)){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}const s=a.push(t)-1,u=Object.keys(t).sort(r&&r(t));for(o="",i=0;i<u.length;i++){const n=u[i],r=e(t[n]);r&&(o&&(o+=","),o+=JSON.stringify(n)+":"+r)}return a.splice(s,1),"{"+o+"}"}(e)}function ye(e){if(null===e)return null;const t=[];for(const n of e)n&&n.arcadeDeclaredClass&&"esri.arcade.Feature"===n.arcadeDeclaredClass?t.push(n.geometry()):t.push(n);return t}function pe(e,t){if(!(t instanceof s))throw new Error("Invalid Argument");e.push(t.hasZ?t.hasM?[t.x,t.y,t.z,t.m]:[t.x,t.y,t.z]:[t.x,t.y])}function ge(e,t){if(L(e)||E(e)){let n=!1,i=!1,a=[],o=t;if(L(e)){for(const t of e)pe(a,t);a.length>0&&(o=e[0].spatialReference,n=e[0].hasZ,i=e[0].hasM)}else if(e instanceof r)a=e._elements,a.length>0&&(n=e._hasZ,i=e._hasM,o=e.get(0).spatialReference);else{if(!E(e))throw new Error("Invalid Argument");for(const t of e.toArray())pe(a,t);a.length>0&&(o=e.get(0).spatialReference,n=!0===e.get(0).hasZ,i=!0===e.get(0).hasM)}if(0===a.length)return null;return!1===y(a,i,n)&&(a=a.slice(0).reverse()),new u({rings:[a],spatialReference:o,hasZ:n,hasM:i})}return e}function he(e,t){if(L(e)||E(e)){let n=!1,i=!1,a=[],o=t;if(L(e)){for(const t of e)pe(a,t);a.length>0&&(o=e[0].spatialReference,n=!0===e[0].hasZ,i=!0===e[0].hasM)}else if(e instanceof r)a=e._elements,a.length>0&&(n=e._hasZ,i=e._hasM,o=e.get(0).spatialReference);else if(E(e)){for(const t of e.toArray())pe(a,t);a.length>0&&(o=e.get(0).spatialReference,n=!0===e.get(0).hasZ,i=!0===e.get(0).hasM)}return 0===a.length?null:new l({paths:[a],spatialReference:o,hasZ:n,hasM:i})}return e}function Se(e,t){if(L(e)||E(e)){let n=!1,i=!1,a=[],s=t;if(L(e)){for(const t of e)pe(a,t);a.length>0&&(s=e[0].spatialReference,n=!0===e[0].hasZ,i=!0===e[0].hasM)}else if(e instanceof r)a=e._elements,a.length>0&&(n=e._hasZ,i=e._hasM,s=e.get(0).spatialReference);else if(E(e)){for(const t of e.toArray())pe(a,t);a.length>0&&(s=e.get(0).spatialReference,n=!0===e.get(0).hasZ,i=!0===e.get(0).hasM)}return 0===a.length?null:new o({points:a,spatialReference:s,hasZ:n,hasM:i})}return e}function xe(e,n=!1){const r=[];if(null===e)return r;if(!0===L(e)){for(let t=0;t<e.length;t++){const i=X(e[t]);""===i&&!0!==n||r.push(i)}return r}if(e instanceof t){for(let t=0;t<e.length();t++){const i=X(e.get(t));""===i&&!0!==n||r.push(i)}return r}if(C(e)){const t=X(e);return""===t&&!0!==n||r.push(t),r}return[]}let be=0;function Te(e){return be++,be%100==0?(be=0,new Promise((t=>{setTimeout((()=>{t(e)}),0)}))):e}function Ne(e,t,n){switch(n){case"&":return e&t;case"|":return e|t;case"^":return e^t;case"<<":return e<<t;case">>":return e>>t;case">>>":return e>>>t}}function ke(e,n=null){return null==e?null:_(e)||O(e)||w(e)?e:e instanceof a?!0===n?.keepGeometryType?e:e.toJSON():e instanceof t?e.toArray().map((e=>ke(e,n))):e instanceof Array?e.map((e=>ke(e,n))):e instanceof Date?e:null!==e&&"object"==typeof e&&void 0!==e.castAsJson?e.castAsJson(n):null}async function De(e,t,n,r,i){const a=await Me(e,t,n);i[r]=a}async function Me(e,n=null,r=null){if(e instanceof t&&(e=e.toArray()),null==e)return null;if(C(e)||e instanceof a||e instanceof Date)return ke(e,r);if(e instanceof Array){const t=[],i=[];for(const o of e)null===o||C(o)||o instanceof a||o instanceof Date?i.push(ke(o,r)):(i.push(null),t.push(De(o,n,r,i.length-1,i)));return t.length>0&&await Promise.all(t),i}return null!==e&&"object"==typeof e&&void 0!==e.castAsJsonAsync?e.castAsJsonAsync(n,r):null}function je(e,t,n){const r=e.fullSchema();if(null===r)return null;if(!r.fields)return null;return ce(t,r,e,n)}function Ae(e){const t=e.fullSchema();return null===t?null:t.fields&&t.typeIdField?{subtypeField:t.typeIdField,subtypes:t.types?t.types.map((e=>({name:e.name,code:e.id}))):[]}:null}function Re(e,t,n,r){const i=e.fullSchema();if(null===i)return null;if(!i.fields)return null;const a=ce(t,i,e,r);if(void 0===n)try{n=e.field(t)}catch(o){return null}return le(a,n)}function Fe(e,t,n,r){const i=e.fullSchema();if(null===i)return null;if(!i.fields)return null;if(void 0===n){try{n=e.field(t)}catch(a){return null}return n}return fe(ce(t,i,e,r),n)}function ve(e){const t=e.fullSchema();if(null===t)return null;if(!t.fields)return null;const n=[];for(const r of t.fields)n.push(g(r));return{objectIdField:t.objectIdField,globalIdField:t.globalIdField,geometryType:void 0===h[t.geometryType]?"":h[t.geometryType],fields:n}}const Ce=Object.freeze(Object.defineProperty({__proto__:null,ReturnResultE:S,ImplicitResultE:x,NativeFunctionE:b,SizzleFunctionE:T,NativeFunction:N,ImplicitResult:k,ReturnResult:D,SizzleFunction:M,voidOperation:j,breakResult:A,continueResult:R,multiReplace:F,isFunctionParameter:v,isSimpleType:C,defaultUndefined:I,isString:w,isBoolean:_,isNumber:O,isInteger:Z,isArray:L,isFeature:Y,isFeatureSet:J,isFeatureSetCollection:P,isImmutableArray:E,isDate:z,pcCheck:G,absRound:V,generateUUID:H,formatNumber:U,formatDate:q,standardiseDateFormat:$,greaterThanLessThan:W,equalityTest:Q,toString:X,toNumberArray:K,toStringExplicit:ee,toNumber:ne,toDate:re,toDateTime:ie,toBoolean:oe,fixSpatialReference:se,fixNullGeometry:ue,getDomainValue:le,getDomainCode:fe,getDomain:ce,stableStringify:de,autoCastFeatureToGeometry:ye,autoCastArrayOfPointsToPolygon:ge,autoCastArrayOfPointsToPolyline:he,autoCastArrayOfPointsToMultiPoint:Se,toStringArray:xe,tick:Te,binaryOperator:Ne,castAsJson:ke,castAsJsonAsync:Me,featureFullDomain:je,featureSubtypes:Ae,featureDomainValueLookup:Re,featureDomainCodeLookup:Fe,featureSchema:ve},Symbol.toStringTag,{value:"Module"}));export{fe as $,re as A,Z as B,I as C,$ as D,ie as E,V as F,ue as G,ye as H,k as I,he as J,ge as K,Se as L,F as M,N,H as O,ve as P,Ae as Q,D as R,M as S,je as T,Re as U,Fe as V,K as W,Te as X,xe as Y,ce as Z,le as _,L as a,S as a0,x as a1,b as a2,T as a3,U as a4,q as a5,de as a6,E as b,v as c,X as d,Q as e,w as f,W as g,Ne as h,_ as i,O as j,Y as k,Ce as l,A as m,R as n,z as o,G as p,J as q,P as r,se as s,ne as t,ee as u,j as v,ke as w,Me as x,C as y,oe as z};
|
package/config.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"./core/has.js";import{deepMerge as e}from"./core/object.js";import{buildDate as r}from"./support/revision.js";const s={apiKey:void 0,applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",portalUrl:"https://www.arcgis.com",routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:6e4,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){const e="4.24.0";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}-next.${r}/assets`}s.baseUrl&&console.warn("[esri.config]","baseUrl has been replaced by assetsPath"),Object.defineProperty(s,"baseUrl",{set(){console.warn("[esri.config]","baseUrl has been replaced by assetsPath")}}),s.request.corsEnabledServers=[],s.request.corsEnabledServers.push=function(){return console.warn("[esri.config]","request.corsEnabledServers is not supported and will be removed in a future release. See http://esriurl.com/cors8664"),0};export{s as default};
|
|
5
|
+
import"./core/has.js";import{deepMerge as e}from"./core/object.js";import{buildDate as r}from"./support/revision.js";const s={apiKey:void 0,applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",portalUrl:"https://www.arcgis.com",routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:6e4,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){const e="4.24.0";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}-next.${r}/assets`}s.baseUrl&&console.warn("[esri.config]","baseUrl has been replaced by assetsPath"),Object.defineProperty(s,"baseUrl",{set(){console.warn("[esri.config]","baseUrl has been replaced by assetsPath")}}),s.request.corsEnabledServers=[],s.request.corsEnabledServers.push=function(){return console.warn("[esri.config]","request.corsEnabledServers is not supported and will be removed in a future release. See http://esriurl.com/cors8664"),0};export{s as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{escapeRegExpString as a}from"../string.js";class e{constructor(){this.op="+",this.day=0,this.second=0,this.hour=0,this.month=0,this.year=0,this.minute=0}static _fixDefaults(a){if(null!==a.precision||null!==a.secondary)throw new Error("Primary and Secondary SqlInterval qualifiers not supported")}static createFromMilliseconds(a){const
|
|
5
|
+
import{escapeRegExpString as a}from"../string.js";class e{constructor(){this.op="+",this.day=0,this.second=0,this.hour=0,this.month=0,this.year=0,this.minute=0}static _fixDefaults(a){if(null!==a.precision||null!==a.secondary)throw new Error("Primary and Secondary SqlInterval qualifiers not supported")}static createFromMilliseconds(a){const r=new e;return r.second=a/1e3,r}static createFromValueAndQualifer(a,r,t){let n=null;const l=new e;if(l.op="-"===t?"-":"+","interval-period"===r.type){e._fixDefaults(r);const t=new RegExp("^[0-9]{1,}$");if("year"===r.period||"month"===r.period)throw new Error("Year-Month Intervals not supported");if(!t.test(a))throw new Error("Illegal Interval");l[r.period]=parseFloat(a)}else{if(e._fixDefaults(r.start),e._fixDefaults(r.end),"year"===r.start.period||"month"===r.start.period)throw new Error("Year-Month Intervals not supported");if("year"===r.end.period||"month"===r.end.period)throw new Error("Year-Month Intervals not supported");switch(r.start.period){case"day":switch(r.end.period){case"hour":if(n=new RegExp("^[0-9]{1,} [0-9]{1,}$"),!n.test(a))throw new Error("Illegal Interval");l[r.start.period]=parseFloat(a.split(" ")[0]),l[r.end.period]=parseFloat(a.split(" ")[1]);break;case"minute":if(n=new RegExp("^[0-9]{1,} [0-9]{1,2}:[0-9]{1,}$"),!n.test(a))throw new Error("Illegal Interval");{l[r.start.period]=parseFloat(a.split(" ")[0]);const e=a.split(" ")[1].split(":");l.hour=parseFloat(e[0]),l.minute=parseFloat(e[1])}break;case"second":if(n=new RegExp("^[0-9]{1,} [0-9]{1,2}:[0-9]{1,2}:[0-9]{1,}([.]{1}[0-9]{1,}){0,1}$"),!n.test(a))throw new Error("Illegal Interval");{l[r.start.period]=parseFloat(a.split(" ")[0]);const e=a.split(" ")[1].split(":");l.hour=parseFloat(e[0]),l.minute=parseFloat(e[1]),l.second=parseFloat(e[2])}break;default:throw new Error("Invalid Interval.")}break;case"hour":switch(r.end.period){case"minute":if(n=new RegExp("^[0-9]{1,}:[0-9]{1,}$"),!n.test(a))throw new Error("Illegal Interval");l.hour=parseFloat(a.split(":")[0]),l.minute=parseFloat(a.split(":")[1]);break;case"second":if(n=new RegExp("^[0-9]{1,}:[0-9]{1,2}:[0-9]{1,}([.]{1}[0-9]{1,}){0,1}$"),!n.test(a))throw new Error("Illegal Interval");{const e=a.split(":");l.hour=parseFloat(e[0]),l.minute=parseFloat(e[1]),l.second=parseFloat(e[2])}break;default:throw new Error("Invalid Interval.")}break;case"minute":if("second"!==r.end.period)throw new Error("Invalid Interval.");if(n=new RegExp("^[0-9]{1,}:[0-9]{1,}([.]{1}[0-9]{1,}){0,1}$"),!n.test(a))throw new Error("Illegal Interval");{const e=a.split(":");l.minute=parseFloat(e[0]),l.second=parseFloat(e[1])}break;default:throw new Error("Invalid Interval.")}}return l}valueInMilliseconds(){return("-"===this.op?-1:1)*(1e3*this.second+60*this.minute*1e3+60*this.hour*60*1e3+24*this.day*60*60*1e3+this.month*(365/12)*24*60*60*1e3+365*this.year*24*60*60*1e3)}}function r(a,e){const r=n[a.toLowerCase()];if(null==r)throw new Error("Function Not Recognised");if(e.length<r.minParams||e.length>r.maxParams)throw new Error(`Invalid Parameter count for call to ${a.toUpperCase()}`);return r.evaluate(e)}function t(a,e){const r=n[a.toLowerCase()];return null!=r&&e>=r.minParams&&e<=r.maxParams}const n={extract:{minParams:2,maxParams:2,evaluate:([a,e])=>{if(null==e)return null;if(e instanceof Date)switch(a.toUpperCase()){case"SECOND":return e.getSeconds();case"MINUTE":return e.getMinutes();case"HOUR":return e.getHours();case"DAY":return e.getDate();case"MONTH":return e.getMonth()+1;case"YEAR":return e.getFullYear()}throw new Error("Invalid Parameter for call to EXTRACT")}},substring:{minParams:2,maxParams:3,evaluate:a=>{if(2===a.length){const[e,r]=a;return null==e||null==r?null:e.toString().substring(r-1)}if(3===a.length){const[e,r,t]=a;return null==e||null==r||null==t?null:t<=0?"":e.toString().substring(r-1,r+t-1)}}},position:{minParams:2,maxParams:2,evaluate:([a,e])=>null==a||null==e?null:e.indexOf(a)+1},trim:{minParams:2,maxParams:3,evaluate:e=>{const r=3===e.length,t=r?e[1]:" ",n=r?e[2]:e[1];if(null==t||null==n)return null;const l=`(${a(t)})`;switch(e[0]){case"BOTH":return n.replace(new RegExp(`^${l}*|${l}*$`,"g"),"");case"LEADING":return n.replace(new RegExp(`^${l}*`,"g"),"");case"TRAILING":return n.replace(new RegExp(`${l}*$`,"g"),"")}throw new Error("Invalid Parameter for call to TRIM")}},abs:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.abs(a[0])},ceiling:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.ceil(a[0])},floor:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.floor(a[0])},log:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.log(a[0])},log10:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.log(a[0])*Math.LOG10E},sin:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.sin(a[0])},cos:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.cos(a[0])},tan:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.tan(a[0])},asin:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.asin(a[0])},acos:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.acos(a[0])},atan:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.atan(a[0])},sign:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:a[0]>0?1:a[1]<0?-1:0},power:{minParams:2,maxParams:2,evaluate:a=>null==a[0]||null==a[1]?null:a[0]**a[1]},mod:{minParams:2,maxParams:2,evaluate:a=>null==a[0]||null==a[1]?null:a[0]%a[1]},round:{minParams:1,maxParams:2,evaluate:a=>{const e=a[0],r=2===a.length?10**a[1]:1;return null==e?null:Math.round(e*r)/r}},truncate:{minParams:1,maxParams:2,evaluate:a=>null==a[0]?null:1===a.length?parseInt(a[0].toFixed(0),10):parseFloat(a[0].toFixed(a[1]))},char_length:{minParams:1,maxParams:1,evaluate:a=>"string"==typeof a[0]||a[0]instanceof String?a[0].length:0},concat:{minParams:1,maxParams:1/0,evaluate:a=>{let e="";for(let r=0;r<a.length;r++){if(null==a[r])return null;e+=a[r].toString()}return e}},lower:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:a[0].toString().toLowerCase()},upper:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:a[0].toString().toUpperCase()}};export{e as SqlInterval,r as evaluateFunction,t as isStandardized};
|
package/geohash/GeohashTree.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../core/CircularArray.js";import{isSome as s,mapOr as e}from"../core/maybe.js";import{decodeGeohashXY as i}from"./geohashUtils.js";import{FeatureSetReaderJSON as o}from"../views/2d/layers/features/support/FeatureSetReaderJSON.js";class n{constructor(s=[],e,i=8096){this._nodes=0,this._root=new a(0,0,0),this._statisticFields=s,this._pool=i?new t(8096):null,this._serviceInfo=e}_acquire(t,e,i){this._nodes++;let o=null;return s(this._pool)&&(o=this._pool.dequeue()),s(o)?o.realloc(t,e,i):new a(t,e,i)}_release(t){this._nodes--,s(this._pool)&&this._pool.enqueue(t)}get count(){return this._root.count}get size(){return this._nodes}get poolSize(){return e(this._pool,0,(t=>t.size))}get depth(){let t=0;return this._forEachNode((s=>t=Math.max(t,s.depth))),t}dropLevels(t){this._forEachNode((s=>{if(s.depth>=t)for(let t=0;t<s.children.length;t++){const e=s.children[t];s.children[t]=null,e&&this._release(e)}}))}clear(){this.dropLevels(0)}insert(t,s,e=0){const i=o.fromOptimizedFeatures([t],this._serviceInfo).getCursor();i.next();const n=i.readGeometry();if(!n)return;const[a,l]=n.coords,r=t.geohashX,h=t.geohashY;this.insertCursor(i,t.displayId,a,l,r,h,s,e)}insertCursor(t,s,e,i,o,n,a,l=0){let r=this._root,h=0,c=0,d=0;for(;null!==r;){if(r.depth>=l&&(r.count+=1,r.xTotal+=e,r.yTotal+=i,r.xGeohashTotal+=o,r.yGeohashTotal+=n,r.displayId=s,this._updateStatisticsCursor(t,r,1)),h>=a)return void r.add(s);const u=Math.ceil((h+1)/2),f=Math.floor((h+1)/2),x=1-h%2,m=30-(3*u+2*f),p=30-(2*u+3*f),y=(o&7*x+3*(1-x)<<m)>>m,_=(n&3*x+7*(1-x)<<p)>>p,g=y+_*(8*x+4*(1-x));c=c<<3*x+2*(1-x)|y,d=d<<2*x+3*(1-x)|_,null==r.children[g]&&(r.children[g]=this._acquire(c,d,h+1)),h+=1,r=r.children[g]}}remove(t,s){const e=o.fromOptimizedFeatures([t],this._serviceInfo).getCursor();e.next();const i=e.readGeometry();if(!i)return;const[n,a]=i.coords,l=t.geohashX,r=t.geohashY;this.removeCursor(e,n,a,l,r,s)}removeCursor(t,s,e,i,o,n){let a=this._root,l=0;for(;null!==a;){if(a.count-=1,a.xTotal-=s,a.yTotal-=e,a.xGeohashTotal-=i,a.yGeohashTotal-=o,this._updateStatisticsCursor(t,a,-1),l>=n)return void a.remove(t.getDisplayId());const r=Math.ceil((l+1)/2),h=Math.floor((l+1)/2),c=1-l%2,d=30-(3*r+2*h),u=30-(2*r+3*h),f=((i&7*c+3*(1-c)<<d)>>d)+((o&3*c+7*(1-c)<<u)>>u)*(8*c+4*(1-c)),x=a.children[f];1===x.count&&(this._release(x),a.children[f]=null),l+=1,a=x}}find(t,s,e){return this._root.find(t,s,e,0,0,0)}findSingleOccupancyNode(t,s,e,i,o){let n=this._root;for(;null!==n;){const a=n.depth,l=n.xNode,r=n.yNode,h=1-a%2,c=n.xGeohashTotal/n.count,d=n.yGeohashTotal/n.count;if(1===n.count&&t<c&&c<=e&&s<d&&d<=i)return n;if(a>=o){n=n.next;continue}const u=Math.ceil((a+1)/2),f=Math.floor((a+1)/2),x=30-(3*u+2*f),m=30-(2*u+3*f),p=~((1<<x)-1),y=~((1<<m)-1),_=(t&p)>>x,g=(s&y)>>m,N=(e&p)>>x,T=(i&y)>>m,M=l<<3*h+2*(1-h),v=r<<2*h+3*(1-h),C=M+8*h+4*(1-h),S=v+4*h+8*(1-h),b=Math.max(M,_),I=Math.max(v,g),k=Math.min(C,N),F=Math.min(S,T);let G=null,z=null;for(let t=I;t<=F;t++)for(let s=b;s<=k;s++){const e=s-M+(t-v)*(8*h+4*(1-h)),i=n.children[e];i&&(G||(G=i,G.next=n.next),z&&(z.next=i),z=i,i.next=n.next)}n=G||n.next}return null}getRegionDisplayIds(t,s,e,i,o){let n=this._root;const a=[];for(;null!==n;){const l=n.depth,r=n.xNode,h=n.yNode;if(l>=o){const o=n.xGeohashTotal/n.count,l=n.yGeohashTotal/n.count;t<=o&&o<=e&&s<=l&&l<=i&&n.displayIds.forEach((t=>a.push(t))),n=n.next;continue}const c=Math.ceil((l+1)/2),d=Math.floor((l+1)/2),u=1-l%2,f=30-(3*c+2*d),x=30-(2*c+3*d),m=~((1<<f)-1),p=~((1<<x)-1),y=(t&m)>>f,_=(s&p)>>x,g=(e&m)>>f,N=(i&p)>>x,T=r<<3*u+2*(1-u),M=h<<2*u+3*(1-u),v=T+8*u+4*(1-u),C=M+4*u+8*(1-u),S=Math.max(T,y),b=Math.max(M,_),I=Math.min(v,g),k=Math.min(C,N);let F=null,G=null;for(let t=b;t<=k;t++)for(let s=S;s<=I;s++){const e=s-T+(t-M)*(8*u+4*(1-u)),i=n.children[e];i&&(F||(F=i,F.next=n.next),G&&(G.next=i),G=i,i.next=n.next)}n=F||n.next}return a}getRegionStatistics(t,s,e,i,o){let n=this._root,a=0,l=0,r=0;const h={};let c=0;for(;null!==n;){const d=n.depth,u=n.xNode,f=n.yNode;if(d>=o){const o=n.xGeohashTotal/n.count,d=n.yGeohashTotal/n.count;t<o&&o<=e&&s<d&&d<=i&&(a+=n.count,l+=n.xTotal,r+=n.yTotal,1===n.count&&(c=n.displayId),this._aggregateStatistics(h,n.statistics)),n=n.next;continue}const x=Math.ceil((d+1)/2),m=Math.floor((d+1)/2),p=1-d%2,y=30-(3*x+2*m),_=30-(2*x+3*m),g=~((1<<y)-1),N=~((1<<_)-1),T=(t&g)>>y,M=(s&N)>>_,v=(e&g)>>y,C=(i&N)>>_,S=u<<3*p+2*(1-p),b=f<<2*p+3*(1-p),I=S+8*p+4*(1-p),k=b+4*p+8*(1-p),F=Math.max(S,T),G=Math.max(b,M),z=Math.min(I,v),w=Math.min(k,C);let A=null,j=null;for(let o=G;o<=w;o++)for(let d=F;d<=z;d++){const u=d-S+(o-b)*(8*p+4*(1-p)),f=n.children[u];if(f){if(o!==G&&o!==w&&d!==F&&d!==z){const o=f.xGeohashTotal/f.count,n=f.yGeohashTotal/f.count;t<o&&o<=e&&s<n&&n<=i&&(a+=f.count,l+=f.xTotal,r+=f.yTotal,1===f.count&&(c=f.displayId),this._aggregateStatistics(h,f.statistics));continue}A||(A=f,A.next=n.next),j&&(j.next=f),j=f,f.next=n.next}}n=A||n.next}return{count:a,attributes:this._normalizeStatistics(h,a),xTotal:l,yTotal:r,referenceId:c}}_forEachNode(t){let s=this._root;for(;null!==s;){const e=this._linkChildren(s)||s.next;t(s),s=e}}_linkChildren(t){let s=null,e=null;for(let i=0;i<=t.children.length;i++){const o=t.children[i];o&&(s||(s=o,s.next=t.next),e&&(e.next=o),e=o,o.next=t.next)}return s}_updateStatisticsCursor(t,s,e){for(const i of this._statisticFields){const o=i.name,n=i.inField?t.readAttribute(i.inField):t.getComputedNumericAtIndex(i.inFieldIndex);switch(i.statisticType){case"norm":{s.statistics[o]||(s.statistics[o]={});const a=i.inNormalizationField,l=t.readAttribute(a),r=s.statistics[o].onStatisticField||0,h=s.statistics[o].onStatisticNormalizationField||0;null==n||isNaN(n)||null==l||0===l||isNaN(l)||(s.statistics[o].onStatisticField=r+e*n,s.statistics[o].onStatisticNormalizationField=h+e*l);break}case"sum":case"avg":{s.statistics[o]||(s.statistics[o]={value:0,nanCount:0});const t=s.statistics[o].value,i=s.statistics[o].nanCount;null==n||isNaN(n)?s.statistics[o].nanCount=i+e:s.statistics[o].value=t+e*n;break}case"avg_angle":{s.statistics[o]||(s.statistics[o]={x:0,y:0,nanCount:0});const t=s.statistics[o].x,i=s.statistics[o].y,a=s.statistics[o].nanCount,l=Math.PI/180;null==n||isNaN(n)?s.statistics[o].nanCount=a+e:(s.statistics[o].x=t+e*Math.cos(n*l),s.statistics[o].y=i+e*Math.sin(n*l));break}case"mode":{s.statistics[o]||(s.statistics[o]={});const t=s.statistics[o][n]||0;s.statistics[o][n]=t+e;break}}}}_aggregateStatistics(t,s){for(const e of this._statisticFields){const i=e.name;switch(e.statisticType){case"sum":case"avg":case"avg_angle":case"mode":case"norm":t[i]||(t[i]={});for(const e in s[i]){const o=t[i][e]||0;t[i][e]=o+s[i][e]}}}}_normalizeStatistics(t,s){const e={};for(const i of this._statisticFields){const o=i.name;switch(i.statisticType){case"norm":{const i=t[o];if(s&&null==i.onStatisticNormalizationField)break;if(s&&i.onStatisticNormalizationField){e[o]=i.onStatisticField/i.onStatisticNormalizationField;break}e[o]=0;break}case"sum":{if(!s)break;const{value:i,nanCount:n}=t[o];if(!(s-n))break;e[o]=i;break}case"avg":{if(!s)break;const{value:i,nanCount:n}=t[o];if(!(s-n))break;e[o]=i/(s-n);break}case"avg_angle":{if(!s)break;const{x:i,y:n,nanCount:a}=t[o];if(!(s-a))break;const l=i/(s-a),r=n/(s-a),h=180/Math.PI,c=Math.atan2(r,l)*h;e[o]=c;break}case"mode":{const s=t[o];let i=0,n=null;for(const t in s){const e=s[t];e>i&&(i=e,n=t)}e[o]="null"===n?null:n;break}}}return e}}class a{constructor(t,s,e){this.count=0,this.xTotal=0,this.yTotal=0,this.statistics={},this.displayId=0,this.displayIds=new Set,this.next=null,this.depth=0,this.xNode=0,this.yNode=0,this.xGeohashTotal=0,this.yGeohashTotal=0,this.children=new Array(32);for(let i=0;i<this.children.length;i++)this.children[i]=null;this.xNode=t,this.yNode=s,this.depth=e}realloc(t,s,e){for(let i=0;i<this.children.length;i++)this.children[i]=null;return this.xNode=t,this.yNode=s,this.depth=e,this.next=null,this.xGeohashTotal=0,this.yGeohashTotal=0,this.xTotal=0,this.yTotal=0,this.count=0,this.statistics={},this.displayIds.clear(),this}add(t){this.displayIds.add(t)}remove(t){this.displayIds.delete(t)}getLngLatBounds(){const t=this.depth,s=Math.ceil(t/2),e=Math.floor(t/2),o=30-(3*s+2*e),n=30-(2*s+3*e),a=this.xNode<<o,l=this.yNode<<n;return i({geohashX:a,geohashY:l},this.depth)}find(t,s,e,i,o,n){if(i>=e)return this;const a=1-i%2,l=3*a+2*(1-a),r=2*a+3*(1-a),h=30-o-l,c=30-n-r,d=((t&7*a+3*(1-a)<<h)>>h)+((s&3*a+7*(1-a)<<c)>>c)*(8*a+4*(1-a)),u=this.children[d];return null==u?null:u.find(t,s,e,i+1,o+l,n+r)}}export{n as GeohashTree};
|
|
5
|
+
import t from"../core/CircularArray.js";import{isSome as e,mapOr as s}from"../core/maybe.js";import{decodeGeohashXY as i}from"./geohashUtils.js";import o from"../geometry/SpatialReference.js";import{lngLatToXY as n}from"../geometry/support/webMercatorUtils.js";import{quantizeX as a,quantizeY as r}from"../layers/graphics/featureConversionUtils.js";import l from"../layers/graphics/OptimizedGeometry.js";import{project as h}from"../layers/graphics/data/projectionSupport.js";import{FeatureSetReaderJSON as c}from"../views/2d/layers/features/support/FeatureSetReaderJSON.js";class d{constructor(e=[],s,i=8096){this.onRelease=t=>{},this._nodes=0,this._root=new u(this,0,0,0),this._statisticFields=e,this._pool=i?new t(8096):null,this._serviceInfo=s}destroy(){this.clear()}_acquire(t,s,i){this._nodes++;let o=null;return e(this._pool)&&(o=this._pool.dequeue()),e(o)?o.realloc(t,s,i):o=new u(this,t,s,i),o}_release(t){this.onRelease(t),this._nodes--,e(this._pool)&&this._pool.enqueue(t)}get count(){return this._root.count}get size(){return this._nodes}get poolSize(){return s(this._pool,0,(t=>t.size))}get depth(){let t=0;return this._forEachNode((e=>t=Math.max(t,e.depth))),t}dropLevels(t){this._forEachNode((e=>{if(e.depth>=t)for(let t=0;t<e.children.length;t++){const s=e.children[t];s&&this._release(s)}})),this._forEachNode((e=>{if(e.depth>=t)for(let t=0;t<e.children.length;t++)e.children[t]=null}))}clear(){this._forEachNode((t=>this._release(t))),this._root=new u(this,0,0,0)}insert(t,e,s=0){const i=c.fromOptimizedFeatures([t],this._serviceInfo).getCursor();i.next();const o=i.readGeometry();if(!o)return;const[n,a]=o.coords,r=t.geohashX,l=t.geohashY;this.insertCursor(i,t.displayId,n,a,r,l,e,s)}insertCursor(t,e,s,i,o,n,a,r=0){let l=this._root,h=0,c=0,d=0;for(;null!==l;){if(l.depth>=r&&(l.count+=1,l.xTotal+=s,l.yTotal+=i,l.xGeohashTotal+=o,l.yGeohashTotal+=n,l.referenceId=e,this._updateStatisticsCursor(t,l,1)),h>=a)return void l.add(e);const u=Math.ceil((h+1)/2),f=Math.floor((h+1)/2),x=1-h%2,m=30-(3*u+2*f),p=30-(2*u+3*f),g=(o&7*x+3*(1-x)<<m)>>m,y=(n&3*x+7*(1-x)<<p)>>p,_=g+y*(8*x+4*(1-x));c=c<<3*x+2*(1-x)|g,d=d<<2*x+3*(1-x)|y,null==l.children[_]&&(l.children[_]=this._acquire(c,d,h+1)),h+=1,l=l.children[_]}}remove(t,e){const s=c.fromOptimizedFeatures([t],this._serviceInfo).getCursor();s.next();const i=s.readGeometry();if(!i)return;const[o,n]=i.coords,a=t.geohashX,r=t.geohashY;this.removeCursor(s,o,n,a,r,e)}removeCursor(t,e,s,i,o,n){let a=this._root,r=0;for(;null!==a;){if(a.count-=1,a.xTotal-=e,a.yTotal-=s,a.xGeohashTotal-=i,a.yGeohashTotal-=o,this._updateStatisticsCursor(t,a,-1),r>=n)return void a.remove(t.getDisplayId());const l=Math.ceil((r+1)/2),h=Math.floor((r+1)/2),c=1-r%2,d=30-(3*l+2*h),u=30-(2*l+3*h),f=((i&7*c+3*(1-c)<<d)>>d)+((o&3*c+7*(1-c)<<u)>>u)*(8*c+4*(1-c)),x=a.children[f];1===x.count&&(this._release(x),a.children[f]=null),r+=1,a=x}}find(t,e,s){return this._root.find(t,e,s,0,0,0)}findIf(t){let e=null;return this._forEachNode((s=>{t(s)&&(e=s)})),e}findAllIf(t){const e=[];return this._forEachNode((s=>{t(s)&&e.push(s)})),e}findSingleOccupancyNode(t,e,s,i,o){let n=this._root;for(;null!==n;){const a=n.depth,r=n.xNode,l=n.yNode,h=1-a%2,c=n.xGeohashTotal/n.count,d=n.yGeohashTotal/n.count;if(1===n.count&&t<c&&c<=s&&e<d&&d<=i)return n;if(a>=o){n=n.next;continue}const u=Math.ceil((a+1)/2),f=Math.floor((a+1)/2),x=30-(3*u+2*f),m=30-(2*u+3*f),p=~((1<<x)-1),g=~((1<<m)-1),y=(t&p)>>x,_=(e&g)>>m,N=(s&p)>>x,M=(i&g)>>m,T=r<<3*h+2*(1-h),S=l<<2*h+3*(1-h),I=T+8*h+4*(1-h),b=S+4*h+8*(1-h),v=Math.max(T,y),C=Math.max(S,_),G=Math.min(I,N),k=Math.min(b,M);let F=null,z=null;for(let t=C;t<=k;t++)for(let e=v;e<=G;e++){const s=e-T+(t-S)*(8*h+4*(1-h)),i=n.children[s];i&&(F||(F=i,F.next=n.next),z&&(z.next=i),z=i,i.next=n.next)}n=F||n.next}return null}getRegionDisplayIds(t,e,s,i,o){let n=this._root;const a=[];for(;null!==n;){const r=n.depth,l=n.xNode,h=n.yNode;if(r>=o){const o=n.xGeohashTotal/n.count,r=n.yGeohashTotal/n.count;t<=o&&o<=s&&e<=r&&r<=i&&n.displayIds.forEach((t=>a.push(t))),n=n.next;continue}const c=Math.ceil((r+1)/2),d=Math.floor((r+1)/2),u=1-r%2,f=30-(3*c+2*d),x=30-(2*c+3*d),m=~((1<<f)-1),p=~((1<<x)-1),g=(t&m)>>f,y=(e&p)>>x,_=(s&m)>>f,N=(i&p)>>x,M=l<<3*u+2*(1-u),T=h<<2*u+3*(1-u),S=M+8*u+4*(1-u),I=T+4*u+8*(1-u),b=Math.max(M,g),v=Math.max(T,y),C=Math.min(S,_),G=Math.min(I,N);let k=null,F=null;for(let t=v;t<=G;t++)for(let e=b;e<=C;e++){const s=e-M+(t-T)*(8*u+4*(1-u)),i=n.children[s];i&&(k||(k=i,k.next=n.next),F&&(F.next=i),F=i,i.next=n.next)}n=k||n.next}return a}getRegionStatistics(t,e,s,i,o){let n=this._root,a=0,r=0,l=0;const h={};let c=0;for(;null!==n;){const d=n.depth,u=n.xNode,f=n.yNode;if(d>=o){const o=n.xGeohashTotal/n.count,d=n.yGeohashTotal/n.count;t<o&&o<=s&&e<d&&d<=i&&(a+=n.count,r+=n.xTotal,l+=n.yTotal,1===n.count&&(c=n.referenceId),this._aggregateStatistics(h,n.statistics)),n=n.next;continue}const x=Math.ceil((d+1)/2),m=Math.floor((d+1)/2),p=1-d%2,g=30-(3*x+2*m),y=30-(2*x+3*m),_=~((1<<g)-1),N=~((1<<y)-1),M=(t&_)>>g,T=(e&N)>>y,S=(s&_)>>g,I=(i&N)>>y,b=u<<3*p+2*(1-p),v=f<<2*p+3*(1-p),C=b+8*p+4*(1-p),G=v+4*p+8*(1-p),k=Math.max(b,M),F=Math.max(v,T),z=Math.min(C,S),w=Math.min(G,I);let j=null,E=null;for(let o=F;o<=w;o++)for(let d=k;d<=z;d++){const u=d-b+(o-v)*(8*p+4*(1-p)),f=n.children[u];if(f){if(o!==F&&o!==w&&d!==k&&d!==z){const o=f.xGeohashTotal/f.count,d=f.yGeohashTotal/f.count;t<o&&o<=s&&e<d&&d<=i&&(a+=f.count,r+=f.xTotal,l+=f.yTotal,1===n.count&&(c=n.referenceId),this._aggregateStatistics(h,f.statistics));continue}j||(j=f,j.next=n.next),E&&(E.next=f),E=f,f.next=n.next}}n=j||n.next}return{count:a,attributes:this.normalizeStatistics(h,a),xTotal:r,yTotal:l,referenceId:c}}getBins(t,e,s,i,o){const n=[];let a=this._root;for(;null!==a;){const r=a.depth,l=a.xNode,h=a.yNode;if(r>=o){n.push(a),a=a.next;continue}const c=Math.ceil((r+1)/2),d=Math.floor((r+1)/2),u=1-r%2,f=30-(3*c+2*d),x=30-(2*c+3*d),m=~((1<<f)-1),p=~((1<<x)-1),g=(t&m)>>f,y=(e&p)>>x,_=(s&m)>>f,N=(i&p)>>x,M=l<<3*u+2*(1-u),T=h<<2*u+3*(1-u),S=M+8*u+4*(1-u),I=T+4*u+8*(1-u),b=Math.max(M,g),v=Math.max(T,y),C=Math.min(S,_),G=Math.min(I,N);let k=null,F=null;for(let t=v;t<=G;t++)for(let e=b;e<=C;e++){const s=e-M+(t-T)*(8*u+4*(1-u)),i=a.children[s];i&&(k||(k=i,k.next=a.next),F&&(F.next=i),F=i,i.next=a.next)}a=k||a.next}return n}_forEachNode(t){let e=this._root;for(;null!==e;){const s=this._linkChildren(e)||e.next;t(e),e=s}}_linkChildren(t){let e=null,s=null;for(let i=0;i<=t.children.length;i++){const o=t.children[i];o&&(e||(e=o,e.next=t.next),s&&(s.next=o),s=o,o.next=t.next)}return e}_updateStatisticsCursor(t,e,s){for(const i of this._statisticFields){const o=i.name,n=i.inField?t.readAttribute(i.inField):t.getComputedNumericAtIndex(i.inFieldIndex);switch(i.statisticType){case"norm":{e.statistics[o]||(e.statistics[o]={});const a=i.inNormalizationField,r=t.readAttribute(a),l=e.statistics[o].onStatisticField||0,h=e.statistics[o].onStatisticNormalizationField||0;null==n||isNaN(n)||null==r||0===r||isNaN(r)||(e.statistics[o].onStatisticField=l+s*n,e.statistics[o].onStatisticNormalizationField=h+s*r);break}case"sum":case"avg":{e.statistics[o]||(e.statistics[o]={value:0,nanCount:0});const t=e.statistics[o].value,i=e.statistics[o].nanCount;null==n||isNaN(n)?e.statistics[o].nanCount=i+s:e.statistics[o].value=t+s*n;break}case"avg_angle":{e.statistics[o]||(e.statistics[o]={x:0,y:0,nanCount:0});const t=e.statistics[o].x,i=e.statistics[o].y,a=e.statistics[o].nanCount,r=Math.PI/180;null==n||isNaN(n)?e.statistics[o].nanCount=a+s:(e.statistics[o].x=t+s*Math.cos(n*r),e.statistics[o].y=i+s*Math.sin(n*r));break}case"mode":{e.statistics[o]||(e.statistics[o]={});const t=e.statistics[o][n]||0;e.statistics[o][n]=t+s;break}}}}_aggregateStatistics(t,e){for(const s of this._statisticFields){const i=s.name;switch(s.statisticType){case"sum":case"avg":case"avg_angle":case"mode":case"norm":t[i]||(t[i]={});for(const s in e[i]){const o=t[i][s]||0;t[i][s]=o+e[i][s]}}}}normalizeStatistics(t,e){const s={};for(const i of this._statisticFields){const o=i.name;switch(i.statisticType){case"norm":{const i=t[o];if(e&&null==i.onStatisticNormalizationField)break;if(e&&i.onStatisticNormalizationField){s[o]=i.onStatisticField/i.onStatisticNormalizationField;break}s[o]=0;break}case"sum":{if(!e)break;const{value:i,nanCount:n}=t[o];if(!(e-n))break;s[o]=i;break}case"avg":{if(!e)break;const{value:i,nanCount:n}=t[o];if(!(e-n))break;s[o]=i/(e-n);break}case"avg_angle":{if(!e)break;const{x:i,y:n,nanCount:a}=t[o];if(!(e-a))break;const r=i/(e-a),l=n/(e-a),h=180/Math.PI,c=Math.atan2(l,r)*h;s[o]=c;break}case"mode":{const e=t[o];let i=0,n=null;for(const t in e){const s=e[t];s>i&&(i=s,n=t)}s[o]="null"===n?null:n;break}}}return s}}class u{constructor(t,e,s,i){this.count=0,this.xTotal=0,this.yTotal=0,this.statistics={},this.displayId=0,this.referenceId=0,this.displayIds=new Set,this.next=null,this.depth=0,this.xNode=0,this.yNode=0,this.xGeohashTotal=0,this.yGeohashTotal=0,this._tree=t,this.children=new Array(32);for(let o=0;o<this.children.length;o++)this.children[o]=null;this.xNode=e,this.yNode=s,this.depth=i}realloc(t,e,s){for(let i=0;i<this.children.length;i++)this.children[i]=null;return this.xNode=t,this.yNode=e,this.depth=s,this.next=null,this.xGeohashTotal=0,this.yGeohashTotal=0,this.displayId=0,this.referenceId=0,this.xTotal=0,this.yTotal=0,this.count=0,this.statistics={},this.displayIds.clear(),this}get id(){return`${this.xNode}.${this.yNode}`}add(t){this.displayIds.add(t)}remove(t){this.displayIds.delete(t)}getAttributes(){const t=this._tree.normalizeStatistics(this.statistics,this.count);return t.aggregateId=this.id,t.aggregateCount=this.count,t}getGeometry(t,s){const i=this.getLngLatBounds();let c,d;if(t.isWebMercator)c=n(i[0],i[1]),d=n(i[2],i[3]);else{const e=h({x:i[0],y:i[1]},o.WGS84,t),s=h({x:i[2],y:i[3]},o.WGS84,t);c=[e.x,e.y],d=[s.x,s.y]}const u=[0,0,0,0];return u[0]=e(s)?a(s,c[0]):c[0],u[1]=e(s)?r(s,c[1]):c[1],u[2]=e(s)?a(s,d[0]):d[0],u[3]=e(s)?r(s,d[1]):d[1],l.fromRect(u)}getLngLatBounds(){const t=this.depth,e=Math.ceil(t/2),s=Math.floor(t/2),o=30-(3*e+2*s),n=30-(2*e+3*s),a=this.xNode<<o,r=this.yNode<<n;return i({geohashX:a,geohashY:r},this.depth)}find(t,e,s,i,o,n){if(i>=s)return this;const a=1-i%2,r=3*a+2*(1-a),l=2*a+3*(1-a),h=30-o-r,c=30-n-l,d=((t&7*a+3*(1-a)<<h)>>h)+((e&3*a+7*(1-a)<<c)>>c)*(8*a+4*(1-a)),u=this.children[d];return null==u?null:u.find(t,e,s,i+1,o+r,n+l)}}export{u as GeohashNode,d as GeohashTree};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{isSome as n}from"../../core/maybe.js";const t=[0,0];function r(t,r){return!!n(r)&&f(t,r.x,r.y,r.z)}function i(n,t){if(!t.points||t.points.length)return!1;for(const r of t.points)if(!u(n,r))return!1;return!0}function o(n,t){const{xmin:r,ymin:i,zmin:o,xmax:u,ymax:e,zmax:c}=t;return n.hasZ&&t.hasZ?f(n,r,i,o)&&f(n,r,e,o)&&f(n,u,e,o)&&f(n,u,i,o)&&f(n,r,i,c)&&f(n,r,e,c)&&f(n,u,e,c)&&f(n,u,i,c):f(n,r,i)&&f(n,r,e)&&f(n,u,e)&&f(n,u,i)}function u(n,t){return f(n,t[0],t[1])}function e(n,t){return f(n,t[0],t[1],t[2])}function f(n,t,r,i){return t>=n.xmin&&t<=n.xmax&&r>=n.ymin&&r<=n.ymax&&(null==i||!n.hasZ||i>=n.zmin&&i<=n.zmax)}function c(n,r){return t[1]=r.y,t[0]=r.x,m(n,t)}function m(n,t){return s(n.rings,t)}function s(n,t){if(!n)return!1;if(x(n))return a(!1,n,t);let r=!1;for(let i=0,o=n.length;i<o;i++)r=a(r,n[i],t);return r}function x(n){return!Array.isArray(n[0][0])}function a(n,t,r){const[i,o]=r;let u=n,e=0;for(let f=0,c=t.length;f<c;f++){e++,e===c&&(e=0);const[n,r]=t[f],[m,s]=t[e];(r<o&&s>=o||s<o&&r>=o)&&n+(o-r)/(s-r)*(m-n)<i&&(u=!u)}return u}export{u as extentContainsCoords2D,e as extentContainsCoords3D,o as extentContainsExtent,i as extentContainsMultipoint,r as extentContainsPoint,f as extentContainsXYZ,m as polygonContainsCoords,c as polygonContainsPoint};
|
|
5
|
+
import{isSome as n}from"../../core/maybe.js";const t=[0,0];function r(t,r){return!!n(r)&&f(t,r.x,r.y,r.z)}function i(n,t){if(!t.points||t.points.length)return!1;for(const r of t.points)if(!u(n,r))return!1;return!0}function o(n,t){const{xmin:r,ymin:i,zmin:o,xmax:u,ymax:e,zmax:c}=t;return n.hasZ&&t.hasZ?f(n,r,i,o)&&f(n,r,e,o)&&f(n,u,e,o)&&f(n,u,i,o)&&f(n,r,i,c)&&f(n,r,e,c)&&f(n,u,e,c)&&f(n,u,i,c):f(n,r,i)&&f(n,r,e)&&f(n,u,e)&&f(n,u,i)}function u(n,t){return f(n,t[0],t[1])}function e(n,t){return f(n,t[0],t[1],t[2])}function f(n,t,r,i){return t>=n.xmin&&t<=n.xmax&&r>=n.ymin&&r<=n.ymax&&(null==i||!n.hasZ||i>=n.zmin&&i<=n.zmax)}function c(n,r){return t[1]=r.y,t[0]=r.x,m(n,t)}function m(n,t){return s(n.rings,t)}function s(n,t){if(!n)return!1;if(x(n))return a(!1,n,t);let r=!1;for(let i=0,o=n.length;i<o;i++)r=a(r,n[i],t);return r}function x(n){return!Array.isArray(n[0][0])}function a(n,t,r){const[i,o]=r;let u=n,e=0;for(let f=0,c=t.length;f<c;f++){e++,e===c&&(e=0);const[n,r]=t[f],[m,s]=t[e];(r<o&&s>=o||s<o&&r>=o)&&n+(o-r)/(s-r)*(m-n)<i&&(u=!u)}return u}export{u as extentContainsCoords2D,e as extentContainsCoords3D,o as extentContainsExtent,i as extentContainsMultipoint,r as extentContainsPoint,f as extentContainsXYZ,m as polygonContainsCoords,c as polygonContainsPoint,s as ringsContainsCoords};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../core/has.js";import e from"../../core/Error.js";import{isSome as t}from"../../core/maybe.js";import n from"../HeightModelInfo.js";import{parse as i}from"../../layers/support/arcgisLayerUrl.js";function r(t,i){if(!t)return null;if(!c(t))return new e("webscene:unsupported-height-model-info","The vertical coordinate system of the scene is not supported",{heightModelInfo:t});const r=t.heightUnit,o=n.deriveUnitFromSR(t,i).heightUnit;return r!==o?new e("webscene:incompatible-height-unit",`The vertical units of the scene (${r}) must match the horizontal units of the scene (${o})`,{verticalUnit:r,horizontalUnit:o}):null}function o(t,i,r){const o=h(t),c=i,u=a(o,c,r);if(o){const i=n.deriveUnitFromSR(o,t.spatialReference).heightUnit;if(!r&&i!==o.heightUnit){const t=new e("layerview:unmatched-height-unit",`The vertical units of the layer must match the horizontal units (${i})`,{horizontalUnit:i});return new e("layerview:unsupported-height-model-info","The vertical coordinate system of the layer is not supported",{heightModelInfo:o,error:t})}}if(!l(t)||u===s.Unsupported)return new e("layerview:unsupported-height-model-info","The vertical coordinate system of the layer is not supported",{heightModelInfo:o});switch(u){case s.Units:{const t=o.heightUnit||"unknown",n=c.heightUnit||"unknown",i=new e("layerview:incompatible-height-unit",`The vertical units of the layer (${t}) must match the vertical units of the scene (${n})`,{layerUnit:t,sceneUnit:n});return new e("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:o,sceneHeightModelInfo:c,error:i})}case s.HeightModel:{const t=o.heightModel||"unknown",n=c.heightModel||"unknown",i=new e("layerview:incompatible-height-model",`The height model of the layer (${t}) must match the height model of the scene (${n})`,{layerHeightModel:t,sceneHeightModel:n});return new e("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:o,sceneHeightModelInfo:c,error:i})}case s.CRS:{const t=o.vertCRS||"unknown",n=c.vertCRS||"unknown",i=new e("layerview:incompatible-vertical-datum",`The vertical datum of the layer (${t}) must match the vertical datum of the scene (${n})`,{layerDatum:t,sceneDatum:n});return new e("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:o,sceneHeightModelInfo:c,error:i})}}return null}function a(e,t,n){if(!c(e)||!c(t))return s.Unsupported;if(null==e||null==t)return s.Ok;if(!n&&e.heightUnit!==t.heightUnit)return s.Units;if(e.heightModel!==t.heightModel)return s.HeightModel;switch(e.heightModel){case"gravity-related-height":return s.Ok;case"ellipsoidal":return e.vertCRS===t.vertCRS?s.Ok:s.CRS;default:return s.Unsupported}}var s;function c(e){return null==e||null!=e.heightModel&&null!=e.heightUnit}function l(e){return"heightModelInfo"in e&&null!=e.heightModelInfo||null!=e.spatialReference||!
|
|
5
|
+
import"../../core/has.js";import e from"../../core/Error.js";import{isSome as t}from"../../core/maybe.js";import n from"../HeightModelInfo.js";import{parse as i}from"../../layers/support/arcgisLayerUrl.js";function r(t,i){if(!t)return null;if(!c(t))return new e("webscene:unsupported-height-model-info","The vertical coordinate system of the scene is not supported",{heightModelInfo:t});const r=t.heightUnit,o=n.deriveUnitFromSR(t,i).heightUnit;return r!==o?new e("webscene:incompatible-height-unit",`The vertical units of the scene (${r}) must match the horizontal units of the scene (${o})`,{verticalUnit:r,horizontalUnit:o}):null}function o(t,i,r){const o=h(t),c=i,u=a(o,c,r);if(o){const i=n.deriveUnitFromSR(o,t.spatialReference).heightUnit;if(!r&&i!==o.heightUnit){const t=new e("layerview:unmatched-height-unit",`The vertical units of the layer must match the horizontal units (${i})`,{horizontalUnit:i});return new e("layerview:unsupported-height-model-info","The vertical coordinate system of the layer is not supported",{heightModelInfo:o,error:t})}}if(!l(t)||u===s.Unsupported)return new e("layerview:unsupported-height-model-info","The vertical coordinate system of the layer is not supported",{heightModelInfo:o});switch(u){case s.Units:{const t=o.heightUnit||"unknown",n=c.heightUnit||"unknown",i=new e("layerview:incompatible-height-unit",`The vertical units of the layer (${t}) must match the vertical units of the scene (${n})`,{layerUnit:t,sceneUnit:n});return new e("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:o,sceneHeightModelInfo:c,error:i})}case s.HeightModel:{const t=o.heightModel||"unknown",n=c.heightModel||"unknown",i=new e("layerview:incompatible-height-model",`The height model of the layer (${t}) must match the height model of the scene (${n})`,{layerHeightModel:t,sceneHeightModel:n});return new e("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:o,sceneHeightModelInfo:c,error:i})}case s.CRS:{const t=o.vertCRS||"unknown",n=c.vertCRS||"unknown",i=new e("layerview:incompatible-vertical-datum",`The vertical datum of the layer (${t}) must match the vertical datum of the scene (${n})`,{layerDatum:t,sceneDatum:n});return new e("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:o,sceneHeightModelInfo:c,error:i})}}return null}function a(e,t,n){if(!c(e)||!c(t))return s.Unsupported;if(null==e||null==t)return s.Ok;if(!n&&e.heightUnit!==t.heightUnit)return s.Units;if(e.heightModel!==t.heightModel)return s.HeightModel;switch(e.heightModel){case"gravity-related-height":return s.Ok;case"ellipsoidal":return e.vertCRS===t.vertCRS?s.Ok:s.CRS;default:return s.Unsupported}}var s;function c(e){return null==e||null!=e.heightModel&&null!=e.heightUnit}function l(e){return"heightModelInfo"in e&&null!=e.heightModelInfo||null!=e.spatialReference||!f(e)}function h(e){const r=e.url&&i(e.url);return!(null==(e.spatialReference&&e.spatialReference.vcsWkid)&&t(r)&&"ImageServer"===r.serverType)&&u(e)&&e.heightModelInfo?e.heightModelInfo:f(e)?n.deriveUnitFromSR(m,e.spatialReference):null}function u(e){return"heightModelInfo"in e}function d(e){if("unknown"===e.type||!("capabilities"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"subtype-group":case"ogc-feature":case"wfs":return!0;default:return!1}}function f(e){return d(e)?!!(e.capabilities&&e.capabilities.data&&e.capabilities.data.supportsZ):p(e)}function g(e){return null!=e.layers||p(e)||d(e)||u(e)}function p(e){switch(e.type){case"building-scene":case"elevation":case"integrated-mesh":case"point-cloud":case"scene":case"voxel":return!0;case"analysis":case"base-dynamic":case"base-elevation":case"base-tile":case"bing-maps":case"csv":case"geojson":case"feature":case"subtype-group":case"geo-rss":case"graphics":case"group":case"imagery":case"imagery-tile":case"kml":case"map-image":case"map-notes":case"media":case"ogc-feature":case"open-street-map":case"route":case"stream":case"tile":case"unknown":case"unsupported":case"vector-tile":case"wcs":case"web-tile":case"wfs":case"wms":case"wmts":case null:return!1}return!1}!function(e){e[e.Ok=0]="Ok",e[e.Units=1]="Units",e[e.HeightModel=2]="HeightModel",e[e.CRS=3]="CRS",e[e.Unsupported=4]="Unsupported"}(s||(s={}));const m=new n({heightModel:"gravity-related-height"});export{h as deriveHeightModelInfoFromLayer,o as rejectLayerError,g as supportsHeightModelInfo,r as validateWebSceneError};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{extentIntersectsExtent as e,getFeatureExtentIntersector as t}from"./intersectsBase.js";export{extentIntersectsExtent,extentIntersectsMultipoint,extentIntersectsPoint,extentIntersectsPolygon,extentIntersectsPolyline,getFeatureExtentIntersector,isSelfIntersecting,segmentIntersects}from"./intersectsBase.js";function n(n){return"mesh"===n?e:t(n)}export{n as getExtentIntersector};
|
|
5
|
+
import{extentIntersectsExtent as e,getFeatureExtentIntersector as t}from"./intersectsBase.js";export{extentIntersectsExtent,extentIntersectsMultipoint,extentIntersectsPoint,extentIntersectsPolygon,extentIntersectsPolyline,extentIntersectsRings,getFeatureExtentIntersector,isSelfIntersecting,segmentIntersects}from"./intersectsBase.js";function n(n){return"mesh"===n?e:t(n)}export{n as getExtentIntersector};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{extentContainsPoint as n,
|
|
5
|
+
import{extentContainsPoint as n,ringsContainsCoords as t,extentContainsCoords2D as e,extentContainsCoords3D as r}from"./contains.js";function i(t,e){return n(t,e)}function o(n,t){const e=n.hasZ&&t.hasZ;let r,i,o;if(n.xmin<=t.xmin){if(r=t.xmin,n.xmax<r)return!1}else if(r=n.xmin,t.xmax<r)return!1;if(n.ymin<=t.ymin){if(i=t.ymin,n.ymax<i)return!1}else if(i=n.ymin,t.ymax<i)return!1;if(e&&t.hasZ)if(n.zmin<=t.zmin){if(o=t.zmin,n.zmax<o)return!1}else if(o=n.zmin,t.zmax<o)return!1;return!0}function f(n,t){const{points:i,hasZ:o}=t,f=o?r:e;for(const e of i)if(f(n,e))return!0;return!1}const s=[0,0],u=[0,0],c=[0,0],m=[0,0],l=[s,u,c,m],a=[[c,s],[s,u],[u,m],[m,c]];function x(n,t){return y(n,t.rings)}function y(n,r){s[0]=n.xmin,s[1]=n.ymax,u[0]=n.xmax,u[1]=n.ymax,c[0]=n.xmin,c[1]=n.ymin,m[0]=n.xmax,m[1]=n.ymin;for(const e of l)if(t(r,e))return!0;for(const t of r){if(!t.length)continue;let r=t[0];if(e(n,r))return!0;for(let i=1;i<t.length;i++){const o=t[i];if(e(n,o)||z(r,o,a))return!0;r=o}}return!1}function h(n,t){s[0]=n.xmin,s[1]=n.ymax,u[0]=n.xmax,u[1]=n.ymax,c[0]=n.xmin,c[1]=n.ymin,m[0]=n.xmax,m[1]=n.ymin;const r=t.paths;for(const i of r){if(!r.length)continue;let t=i[0];if(e(n,t))return!0;for(let r=1;r<i.length;r++){const o=i[r];if(e(n,o)||z(t,o,a))return!0;t=o}}return!1}const g=[0,0];function p(n){for(let t=0;t<n.length;t++){const e=n[t];for(let i=0;i<e.length-1;i++){const r=e[i],o=e[i+1];for(let e=t+1;e<n.length;e++)for(let t=0;t<n[e].length-1;t++){const i=n[e][t],f=n[e][t+1];if(G(r,o,i,f,g)&&!(g[0]===r[0]&&g[1]===r[1]||g[0]===i[0]&&g[1]===i[1]||g[0]===o[0]&&g[1]===o[1]||g[0]===f[0]&&g[1]===f[1]))return!0}}const r=e.length;if(!(r<=4))for(let n=0;n<r-3;n++){let t=r-1;0===n&&(t=r-2);const i=e[n],o=e[n+1];for(let r=n+2;r<t;r++){const n=e[r],t=e[r+1];if(G(i,o,n,t,g)&&!(g[0]===i[0]&&g[1]===i[1]||g[0]===n[0]&&g[1]===n[1]||g[0]===o[0]&&g[1]===o[1]||g[0]===t[0]&&g[1]===t[1]))return!0}}}return!1}function z(n,t,e){for(let r=0;r<e.length;r++)if(G(n,t,e[r][0],e[r][1]))return!0;return!1}function G(n,t,e,r,i){const[o,f]=n,[s,u]=t,[c,m]=e,[l,a]=r,x=l-c,y=o-c,h=s-o,g=a-m,p=f-m,z=u-f,G=g*h-x*z;if(0===G)return!1;const Z=(x*p-g*y)/G,P=(h*p-z*y)/G;return Z>=0&&Z<=1&&P>=0&&P<=1&&(i&&(i[0]=o+Z*(s-o),i[1]=f+Z*(u-f)),!0)}function Z(n){switch(n){case"esriGeometryEnvelope":case"extent":return o;case"esriGeometryMultipoint":case"multipoint":return f;case"esriGeometryPoint":case"point":return i;case"esriGeometryPolygon":case"polygon":return x;case"esriGeometryPolyline":case"polyline":return h}}export{o as extentIntersectsExtent,f as extentIntersectsMultipoint,i as extentIntersectsPoint,x as extentIntersectsPolygon,h as extentIntersectsPolyline,y as extentIntersectsRings,Z as getFeatureExtentIntersector,p as isSelfIntersecting,G as segmentIntersects};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../Polyline.js";import n from"../SpatialReference.js";import{isPolygon as t}from"./jsonUtils.js";const
|
|
5
|
+
import e from"../Polyline.js";import n from"../SpatialReference.js";import{isPolygon as t}from"./jsonUtils.js";import{isWebMercator as r}from"./spatialReferenceUtils.js";const i={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new e({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.WebMercator}),minus180Line:new e({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new e({paths:[[[180,-180],[180,180]]],spatialReference:n.WGS84}),minus180Line:new e({paths:[[[-180,-180],[-180,180]]],spatialReference:n.WGS84})}};function s(e,n){return Math.ceil((e-n)/(2*n))}function o(e,n){const t=a(e);for(const r of t)for(const e of r)e[0]+=n;return e}function a(e){return t(e)?e.rings:e.paths}function c(e){const n=r(e)?102100:4326;return[i[n].minX,i[n].maxX]}export{i as cutParams,a as getGeometryParts,c as getSpatialReferenceMinMaxX,s as offsetMagnitude,o as updatePolyGeometry};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{isSome as e,isNone as r}from"../../core/maybe.js";import{replace as i}from"../../core/string.js";import{SupportedGCSWkids as n}from"./SupportedGCSWkids.js";import a from"./WKIDUnitConversion.js";const t={102113:!0,102100:!0,3857:!0,3785:!0},_={102113:!0,102100:!0,3857:!0,3785:!0,4326:!0},l='PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]',M=[-20037508.342788905,20037508.342788905],S=[-20037508.342787,20037508.342787],d={102113:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:M,origin:S,dx:1e-5},102100:{wkTemplate:l,valid:M,origin:S,dx:1e-5},3785:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:M,origin:S,dx:1e-5},3857:{wkTemplate:l,valid:M,origin:S,dx:1e-5},4326:{wkTemplate:'GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",{Central_Meridian}],UNIT["Degree",0.0174532925199433]]',altTemplate:'PROJCS["WGS_1984_Plate_Carree",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Plate_Carree"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],UNIT["Degrees",111319.491]]',valid:[-180,180],origin:[-180,90],dx:1e-5},104971:{wkTemplate:'GEOGCS["Mars_2000_(Sphere)",DATUM["Mars_2000_(Sphere)",SPHEROID["Mars_2000_(Sphere)",3396190.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]',valid:[-180,180],origin:[-180,90],dx:1e-5},104905:{wkTemplate:'GEOGCS["GCS_Mars_2000",DATUM["D_Mars_2000",SPHEROID["Mars_2000_IAU_IAG",3396190.0,169.8944472236118]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]',valid:[-180,180],origin:[-180,90],dx:1e-5}};function E(e,i){return!r(e)&&!r(i)&&(e===i||(null!=e.wkid||null!=i.wkid?e.wkid===i.wkid||k(e)&&k(i)||null!=i.latestWkid&&e.wkid===i.latestWkid||null!=e.latestWkid&&i.wkid===e.latestWkid:!(!e.wkt||!i.wkt)&&e.wkt.toUpperCase()===i.wkt.toUpperCase()))}function R(e){return I(e)&&e.wkid
|
|
5
|
+
import{isSome as e,isNone as r}from"../../core/maybe.js";import{replace as i}from"../../core/string.js";import{SupportedGCSWkids as n}from"./SupportedGCSWkids.js";import a from"./WKIDUnitConversion.js";const t={102113:!0,102100:!0,3857:!0,3785:!0},_={102113:!0,102100:!0,3857:!0,3785:!0,4326:!0},l='PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]',M=[-20037508.342788905,20037508.342788905],S=[-20037508.342787,20037508.342787],d={102113:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:M,origin:S,dx:1e-5},102100:{wkTemplate:l,valid:M,origin:S,dx:1e-5},3785:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:M,origin:S,dx:1e-5},3857:{wkTemplate:l,valid:M,origin:S,dx:1e-5},4326:{wkTemplate:'GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",{Central_Meridian}],UNIT["Degree",0.0174532925199433]]',altTemplate:'PROJCS["WGS_1984_Plate_Carree",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Plate_Carree"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],UNIT["Degrees",111319.491]]',valid:[-180,180],origin:[-180,90],dx:1e-5},104971:{wkTemplate:'GEOGCS["Mars_2000_(Sphere)",DATUM["Mars_2000_(Sphere)",SPHEROID["Mars_2000_(Sphere)",3396190.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]',valid:[-180,180],origin:[-180,90],dx:1e-5},104905:{wkTemplate:'GEOGCS["GCS_Mars_2000",DATUM["D_Mars_2000",SPHEROID["Mars_2000_IAU_IAG",3396190.0,169.8944472236118]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]',valid:[-180,180],origin:[-180,90],dx:1e-5}};function E(e,i){return!r(e)&&!r(i)&&(e===i||(null!=e.wkid||null!=i.wkid?e.wkid===i.wkid||k(e)&&k(i)||null!=i.latestWkid&&e.wkid===i.latestWkid||null!=e.latestWkid&&i.wkid===e.latestWkid:!(!e.wkt||!i.wkt)&&e.wkt.toUpperCase()===i.wkt.toUpperCase()))}function R(e){return I(e)&&e.wkid&&d[e.wkid]||null}function o(e){return!!I(e)&&(e.wkid?null==a[e.wkid]:!!e.wkt&&!!/^\s*GEOGCS/i.test(e.wkt))}function A(e){return!(P(e)||s(e))}function G(e){return I(e)&&4326===e.wkid}function u(e){return I(e)&&e.wkid===n.CGCS2000}function k(e){return I(e)&&null!=e.wkid&&!0===t[e.wkid]}function T(e){return I(e)&&32662===e.wkid}function w(e){return e===n.GCSMARS2000||e===n.GCSMARS2000_SPHERE}function P(e){return I(e)&&null!=e.wkid&&w(e.wkid)}function C(e){return e===n.GCSMOON2000}function s(e){return I(e)&&null!=e.wkid&&C(e.wkid)}function p(e){return I(e)&&null!=e.wkid&&!0===_[e.wkid]}function I(r){return e(r)&&(null!=r.wkid&&r.wkid>=2e3||null!=r.wkt)}const c={wkid:4326,wkt:i(d[4326].wkTemplate,{Central_Meridian:"0.0"})},D={wkid:102100,latestWkid:3857},O={wkid:32662};export{O as PlateCarree,c as WGS84,D as WebMercator,E as equals,R as getInfo,u as isCGCS2000,A as isEarth,o as isGeographic,P as isMars,s as isMoon,T as isPlateCarree,I as isValid,G as isWGS84,w as isWKIDFromMars,C as isWKIDFromMoon,k as isWebMercator,p as isWrappable};
|