@arcgis/core 4.34.0-next.65 → 4.34.0-next.67
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/Graphic.js +1 -1
- package/WebDocument2D.js +1 -1
- package/applications/SceneViewer/sceneViewerUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0814676e4bac81f96140.js +1 -0
- package/assets/esri/core/workers/chunks/{6ab435423acb0ed0b1c7.js → 09dbb3e200ef8d514eb3.js} +2 -2
- package/assets/esri/core/workers/chunks/0b71100fa1e7ca706dbb.js +1 -0
- package/assets/esri/core/workers/chunks/0c4f07eb3f3dd5cd2c6c.js +1 -0
- package/assets/esri/core/workers/chunks/{3167230555c63f943485.js → 0cbd5335cc92f5891bcf.js} +1 -1
- package/assets/esri/core/workers/chunks/{79933271a76a1756584f.js → 12d30c2367652e2c688b.js} +1 -1
- package/assets/esri/core/workers/chunks/144bfd64daf103a06734.js +1 -0
- package/assets/esri/core/workers/chunks/{0b53bc76d38e85902748.js → 170ec7fb070c63230c81.js} +1 -1
- package/assets/esri/core/workers/chunks/18c7b1e1fbf7eb6c3c33.js +1 -0
- package/assets/esri/core/workers/chunks/1ada9e6cdd6792e3847a.js +1 -0
- package/assets/esri/core/workers/chunks/1e86df439c564fe752e3.js +1 -0
- package/assets/esri/core/workers/chunks/{4459c8e495a37d4c4eb8.js → 25118304c9a914194e90.js} +1 -1
- package/assets/esri/core/workers/chunks/{426232091caf8608e5f1.js → 26b791291689434dde09.js} +1 -1
- package/assets/esri/core/workers/chunks/3212a476184be25d17f8.js +1 -0
- package/assets/esri/core/workers/chunks/{d823277612f971a9c2f0.js → 3245663da75e168bf85c.js} +1 -1
- package/assets/esri/core/workers/chunks/37d7c249114994a7dfac.js +1 -0
- package/assets/esri/core/workers/chunks/{e72aee3f857aa473822c.js → 39d69afc9da9db0c75ab.js} +1 -1
- package/assets/esri/core/workers/chunks/4102ed32b8dbdc32cb3b.js +1 -0
- package/assets/esri/core/workers/chunks/{7c3a1958990de095d3a1.js → 48316d91c06928f69f61.js} +1 -1
- package/assets/esri/core/workers/chunks/{dbcef57073075e9cfdfe.js → 489fa17e60f25d5f33ae.js} +1 -1
- package/assets/esri/core/workers/chunks/{19e5e011f929b6b940fe.js → 4bc091770bab38874848.js} +1 -1
- package/assets/esri/core/workers/chunks/4f0f6653b8e92c633d14.js +1 -0
- package/assets/esri/core/workers/chunks/{09f0c9f0b6aa58ae3c52.js → 4f22e5a7f81883e8e5b6.js} +1 -1
- package/assets/esri/core/workers/chunks/5185c63fecc5f493e142.js +1 -0
- package/assets/esri/core/workers/chunks/{6fff219dfaa86167c326.js → 5303d77a3ab1b7ddeef3.js} +1 -1
- package/assets/esri/core/workers/chunks/548818df658b607a364e.js +1 -0
- package/assets/esri/core/workers/chunks/{22ec2b0a853911692dc8.js → 5993427325d1add18ed9.js} +1 -1
- package/assets/esri/core/workers/chunks/{657b01a6df8dc46c5209.js → 5b84eba4a28e25b6d5c0.js} +1 -1
- package/assets/esri/core/workers/chunks/5c053d197935c65792ce.js +1 -0
- package/assets/esri/core/workers/chunks/{497214e9e82b936fc94e.js → 5ed381a268855bcad072.js} +1 -1
- package/assets/esri/core/workers/chunks/{33718ea851645d9078d1.js → 605acf18cbeb89e4f29f.js} +1 -1
- package/assets/esri/core/workers/chunks/66cb5b294d7f251c2cc8.js +1 -0
- package/assets/esri/core/workers/chunks/6a5b5b80917a5375b9f6.js +1 -0
- package/assets/esri/core/workers/chunks/{4d7fcec769369c576847.js → 6e59ba2afd444eb4be18.js} +1 -1
- package/assets/esri/core/workers/chunks/{a700f57af6856cb5313c.js → 70dc7ec6474f0801bc04.js} +1 -1
- package/assets/esri/core/workers/chunks/7e95896ac41c7e2ca26a.js +1 -0
- package/assets/esri/core/workers/chunks/80b0c88a76bd523a406a.js +1 -0
- package/assets/esri/core/workers/chunks/{5d12862042b6bf9f9d54.js → 82cb5defb0593e3017ff.js} +1 -1
- package/assets/esri/core/workers/chunks/837830e1cf712d4243a5.js +1 -0
- package/assets/esri/core/workers/chunks/87fb5d755860057da164.js +1 -0
- package/assets/esri/core/workers/chunks/{a29fb90226bd08157bd1.js → 8a104b35708a492bd614.js} +1 -1
- package/assets/esri/core/workers/chunks/{5cb238318a24b70d5ac3.js → 8bc8caa384b24af12411.js} +1 -1
- package/assets/esri/core/workers/chunks/8e2558b14be70b273ce4.js +1 -0
- package/assets/esri/core/workers/chunks/{8e40c409a9b0a2a768a9.js → 8f02349602b072186a1f.js} +1 -1
- package/assets/esri/core/workers/chunks/{fa0f94318173db2034de.js → 90491262b6d6a126c32f.js} +1 -1
- package/assets/esri/core/workers/chunks/99f133a152afb4f1b067.js +1 -0
- package/assets/esri/core/workers/chunks/9eb1bfcb9b05f2a36748.js +1 -0
- package/assets/esri/core/workers/chunks/{0a36df6fdab95785d1ce.js → a2963ffc9a8c90822d2d.js} +1 -1
- package/assets/esri/core/workers/chunks/{8e3c09c3524654830b14.js → a634764dec5404f4a1d7.js} +1 -1
- package/assets/esri/core/workers/chunks/a895da7fd64ebad3d5a4.js +1 -0
- package/assets/esri/core/workers/chunks/aa970a547c60c43d6c7f.js +1 -0
- package/assets/esri/core/workers/chunks/ab727ed4417b7dd94ce9.js +1 -0
- package/assets/esri/core/workers/chunks/{d1e8220dcae1d01d3c35.js → ad3ebd4f05cc673140f3.js} +1 -1
- package/assets/esri/core/workers/chunks/{9f93513037a6e87433c4.js → adfb018f510e19a520fb.js} +1 -1
- package/assets/esri/core/workers/chunks/{a1bd4eecca1e3272bffb.js → aff553c3d6544e20f188.js} +1 -1
- package/assets/esri/core/workers/chunks/b052d3ef5493eedb44a5.js +1 -0
- package/assets/esri/core/workers/chunks/b335e96f6bcac6d2f0ee.js +1 -0
- package/assets/esri/core/workers/chunks/b482132638f3b351724c.js +1 -0
- package/assets/esri/core/workers/chunks/{e1b25b1ce3bd4f0f2cda.js → bc5fa33afec5354601a1.js} +1 -1
- package/assets/esri/core/workers/chunks/{dd1d9913b33d4e48baff.js → c35dad3d5ceaac6ad5a4.js} +1 -1
- package/assets/esri/core/workers/chunks/{e1b573840ec1f7c3afd3.js → c4b2678dd46fa1e22f7e.js} +1 -1
- package/assets/esri/core/workers/chunks/{bc931865a77fc48871d3.js → c94c797864a85342b105.js} +1 -1
- package/assets/esri/core/workers/chunks/{e97250ae8da4bd0d6bc9.js → cad03967e132a28512c2.js} +1 -1
- package/assets/esri/core/workers/chunks/{904c116c6b093e0e970c.js → d1b361b8adf1c719a10a.js} +1 -1
- package/assets/esri/core/workers/chunks/{c7a386ac90e58eb71935.js → da1a5537e2f2ca6cc247.js} +1 -1
- package/assets/esri/core/workers/chunks/dd447dfc50ee7f511b84.js +1 -0
- package/assets/esri/core/workers/chunks/e0fe6bb51ecc9b2faf69.js +1 -0
- package/assets/esri/core/workers/chunks/{0f9813e7d4e2b47b2c39.js → e47acdb1fbf797342716.js} +1 -1
- package/assets/esri/core/workers/chunks/e4e224983c3ee24fc51d.js +1 -0
- package/assets/esri/core/workers/chunks/{a16b471c3706ee37f9b6.js → e6f2ac738df16fb5e13a.js} +1 -1
- package/assets/esri/core/workers/chunks/ed1272e7681e561d843f.js +1 -0
- package/assets/esri/core/workers/chunks/ee391a41144855fc625d.js +1 -0
- package/assets/esri/core/workers/chunks/efea3e82cec476d486e0.js +1 -0
- package/assets/esri/core/workers/chunks/f054557e23978e174686.js +1 -0
- package/assets/esri/core/workers/chunks/{ff2614d96ca5228e9685.js → f4d4c1f13522f20b00d1.js} +1 -1
- package/assets/esri/core/workers/chunks/{897f9775f06ddbf6486f.js → f9385d7fb5ff20f7b252.js} +1 -1
- package/assets/esri/core/workers/chunks/{b30de4936caa654d7817.js → fac020b6886ff2d75015.js} +1 -1
- package/assets/esri/core/workers/chunks/fe353a53968827bcd9cc.js +1 -0
- package/chunks/GlowComposition.glsl.js +3 -3
- package/chunks/RibbonLine.glsl.js +2 -2
- package/config.js +1 -1
- package/core/AsyncUpdate.js +1 -1
- package/core/mapCollectionUtils.js +1 -1
- package/editing/sharedTemplates/executor/builders/pointAtPolygonCentroid.js +1 -1
- package/geometry/Polygon.js +1 -1
- package/geometry/support/centroid.js +1 -1
- package/geometry/support/geometryUtils.js +1 -1
- package/graphic/AggregateGraphicOrigin.js +1 -1
- package/graphic/BuildingGraphicOrigin.js +1 -1
- package/graphic/CSVGraphicOrigin.js +1 -1
- package/graphic/CatalogGraphicOrigin.js +1 -1
- package/graphic/FeatureGraphicOrigin.js +1 -1
- package/graphic/GeoJSONGraphicOrigin.js +1 -1
- package/graphic/GeoRSSGraphicOrigin.js +1 -1
- package/graphic/ImageryGraphicOrigin.js +1 -1
- package/graphic/ImageryTileGraphicOrigin.js +1 -1
- package/graphic/KMLGraphicOrigin.js +1 -1
- package/graphic/KnowledgeGraphGraphicOrigin.js +1 -1
- package/graphic/LinkChartGraphicOrigin.js +1 -1
- package/graphic/MapImageGraphicOrigin.js +1 -1
- package/graphic/MapNotesGraphicOrigin.js +1 -1
- package/graphic/OGCFeatureGraphicOrigin.js +1 -1
- package/graphic/OrientedImageryGraphicOrigin.js +1 -1
- package/graphic/ParquetGraphicOrigin.js +1 -1
- package/graphic/PointCloudGraphicOrigin.js +1 -1
- package/graphic/SceneGraphicOrigin.js +1 -1
- package/graphic/StreamGraphicOrigin.js +1 -1
- package/graphic/SubtypeGroupGraphicOrigin.js +1 -1
- package/graphic/TileGraphicOrigin.js +1 -1
- package/graphic/TrackGraphicOrigin.js +1 -1
- package/graphic/VectorTileGraphicOrigin.js +1 -1
- package/graphic/VoxelGraphicOrigin.js +1 -1
- package/graphic/WCSGraphicOrigin.js +1 -1
- package/graphic/WFSGraphicOrigin.js +1 -1
- package/graphic/getIdFieldsProvider.js +5 -0
- package/graphic/getSliceableContainer.js +5 -0
- package/graphic/graphicOrigins.d.ts +0 -2
- package/graphic/graphicOrigins.js +1 -1
- package/interfaces.d.ts +172 -244
- package/kernel.js +1 -1
- package/layers/GaussianSplatLayer.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/IntegratedMeshLayer.js +1 -1
- package/layers/Layer.js +1 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/MapImageLayer.js +1 -1
- package/layers/OrientedImageryLayer.js +1 -1
- package/layers/VoxelLayer.js +1 -1
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/ImageryTileMixin.js +1 -1
- package/layers/mixins/OperationalLayer.js +1 -1
- package/layers/mixins/TemporalLayer.js +1 -1
- package/layers/mixins/TemporalSceneLayer.js +1 -1
- package/layers/mixins/operationalLayers.js +1 -1
- package/layers/orientedImagery/core/coverageUtils.js +1 -1
- package/layers/support/FeatureFilter.js +1 -1
- package/layers/support/TimeInfo.js +1 -1
- package/layers/support/TrackInfo.js +1 -1
- package/layers/support/layersCreator.js +1 -1
- package/layers/support/rasterDatasets/multidimensionalUtils.js +1 -1
- package/package.json +2 -2
- package/portal/schemas/definitions.js +1 -1
- package/portal/support/portalLayers.js +1 -1
- package/rest/support/AttributeBinsQuery.js +1 -1
- package/rest/support/IdentifyParameters.js +1 -1
- package/rest/support/ImageGPSInfoParameters.js +1 -1
- package/rest/support/ImageHistogramParameters.js +1 -1
- package/rest/support/ImageIdentifyParameters.js +1 -1
- package/rest/support/ImageParameters.js +1 -1
- package/rest/support/ImageSampleParameters.js +1 -1
- package/rest/support/Query.js +1 -1
- package/rest/support/TopFeaturesQuery.js +1 -1
- package/smartMapping/support/adapters/FeatureLayerBinningAdapter.js +1 -1
- package/support/revision.js +1 -1
- package/support/timeUtils.js +1 -1
- package/symbols/support/previewCIMSymbol.js +1 -1
- package/symbols/support/previewSymbol2D.js +1 -1
- package/symbols/support/renderUtils.js +1 -1
- package/symbols/support/svgUtils.js +1 -1
- package/symbols/support/symbolUtils.js +1 -1
- package/symbols/support/utils.js +1 -1
- package/time/TimeExtent.js +1 -1
- package/time/TimeInterval.js +1 -1
- package/views/2d/analysis/ElevationProfile/ElevationProfileInputVisualization2D.js +5 -0
- package/views/2d/analysis/ElevationProfile/ElevationProfileLineVisualization2D.js +5 -0
- package/views/2d/analysis/ElevationProfile/ElevationProfileVisualization2D.js +5 -0
- package/views/2d/analysis/ElevationProfileAnalysisView2D.js +1 -1
- package/views/2d/engine/webgl/Painter.js +1 -1
- package/views/2d/engine/webgl/effects/FeatureEffect.js +1 -1
- package/views/2d/engine/webgl/effects/post-processing/EffectManager.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TestTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TextureStatisticsTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/bloom/BloomTechnique.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/blur/BlurTechnique.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/colorize/ColorizeTechnique.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/drop-shadow/DropShadowTechnique.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/FillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/grid/GridTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/LineTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/magnifier/MagnifierTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/opacity/OpacityTechnique.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/overlay/OverlayTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BlitShader.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BloomShader.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BlurShader.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ColorizeShader.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/DropShadowShader.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/PostProcessingShader.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/videoScreenRenderer/VideoScreenTechnique.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/RenderState.js +1 -1
- package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileInputVisualization3D.js +5 -0
- package/views/3d/analysis/ElevationProfile/ElevationProfileLineVisualization3D.js +5 -0
- package/views/3d/analysis/ElevationProfile/ElevationProfileVisualization3D.js +5 -0
- package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +5 -0
- package/views/3d/analysis/VolumeMeasurement/volumeMeasurementGeometryUtils.js +5 -0
- package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/graphics/QueryEngine.js +1 -1
- package/views/3d/layers/graphics/graphicUtils.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +1 -1
- package/views/3d/layers/i3s/Intersector.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/layers/support/FeatureVisibilityFilter.js +1 -1
- package/views/3d/layers/support/SublayerPopupHighlightHelper3D.js +1 -1
- package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
- package/views/3d/support/hitTest.js +1 -1
- package/views/3d/support/viewpointUtils.js +1 -1
- package/views/3d/terrain/Intersector.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +4 -4
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaColor.glsl.js +5 -0
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMask.glsl.js +5 -0
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaOutlineItem.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowComposition.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowPresets.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedBuffer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/PerBufferData.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +5 -0
- package/views/VideoView.js +1 -1
- package/views/View.js +1 -1
- package/views/View2D.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileController.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileGenerationError.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileHoveredPointVisualization.js +5 -0
- package/views/analysis/ElevationProfile/ElevationProfileHoveredPointsVisualization.js +5 -0
- package/views/analysis/ElevationProfile/ElevationProfileResult.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
- package/views/analysis/ElevationProfile/constants.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileInputVisualizationUtils.js +5 -0
- package/views/draw/support/createUtils.js +1 -1
- package/views/layers/support/MapServiceLayerViewHelper.js +1 -1
- package/webdoc/support/timeProperties.js +1 -1
- package/webdoc/widgets/TimeSlider.js +1 -1
- package/webmap/InitialViewProperties.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/Legend/styles/card/CardView.js +1 -1
- package/widgets/Legend/styles/card/ColorRamp.js +1 -1
- package/widgets/Legend/styles/card/LegendElement.js +1 -1
- package/widgets/Legend/styles/card/UnivariateAboveAndBelowRamp.js +1 -1
- package/widgets/Legend/styles/card/UnivariateColorSizeRamp.js +1 -1
- package/widgets/Legend/styles/classic/ClassicView.js +1 -1
- package/widgets/Legend/styles/classic/LegendElement.js +1 -1
- package/widgets/Legend/styles/classic/UnivariateAboveAndBelowRamp.js +1 -1
- package/widgets/Legend/styles/classic/UnivariateColorSizeRamp.js +1 -1
- package/widgets/Legend/styles/support/relationshipUtils.js +1 -1
- package/widgets/Legend/styles/support/univariateUtils.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
- package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
- package/widgets/TimeSlider.js +1 -1
- package/widgets/UtilityNetworkTrace/support/GraphicHandler.js +1 -1
- package/TimeExtent.d.ts +0 -4
- package/TimeExtent.js +0 -5
- package/TimeInterval.d.ts +0 -4
- package/TimeInterval.js +0 -5
- package/assets/esri/core/workers/chunks/0264905da9fa56166538.js +0 -1
- package/assets/esri/core/workers/chunks/070b29cba896f46537f9.js +0 -1
- package/assets/esri/core/workers/chunks/0b01c87db77246632ad9.js +0 -1
- package/assets/esri/core/workers/chunks/0cb2f7172190babb4139.js +0 -1
- package/assets/esri/core/workers/chunks/0cdf6b51f2a63f348530.js +0 -1
- package/assets/esri/core/workers/chunks/0d82cc6905b105b3568a.js +0 -1
- package/assets/esri/core/workers/chunks/0e28cb5d8d89ae29cdd0.js +0 -1
- package/assets/esri/core/workers/chunks/1143313f2f6f34deaad7.js +0 -1
- package/assets/esri/core/workers/chunks/14c6461ffd36319e1d74.js +0 -1
- package/assets/esri/core/workers/chunks/2394ac65d64e50399d76.js +0 -1
- package/assets/esri/core/workers/chunks/47febd4de836a33b51b1.js +0 -1
- package/assets/esri/core/workers/chunks/487afbf352d12c745430.js +0 -1
- package/assets/esri/core/workers/chunks/56b4dcd04c844eaacd60.js +0 -1
- package/assets/esri/core/workers/chunks/5d65987f2c1b5c56a799.js +0 -1
- package/assets/esri/core/workers/chunks/77e27f318b5863dd0f5c.js +0 -1
- package/assets/esri/core/workers/chunks/7b7f5028a488bb9c10f4.js +0 -1
- package/assets/esri/core/workers/chunks/808cfed7022e3846d5b2.js +0 -1
- package/assets/esri/core/workers/chunks/8bd5a0ff7dcf1067bf53.js +0 -1
- package/assets/esri/core/workers/chunks/99b20eef2893047fac10.js +0 -1
- package/assets/esri/core/workers/chunks/9f4e23bae621ff3ecea3.js +0 -1
- package/assets/esri/core/workers/chunks/a596d6ccb6103e594031.js +0 -1
- package/assets/esri/core/workers/chunks/a5e6359fadbd699b1c8e.js +0 -1
- package/assets/esri/core/workers/chunks/a7f3cdd9a249ef4572ce.js +0 -1
- package/assets/esri/core/workers/chunks/a80d769b0ed025f0df64.js +0 -1
- package/assets/esri/core/workers/chunks/af83dddddbfe25194527.js +0 -1
- package/assets/esri/core/workers/chunks/b057e6d593c1607cae61.js +0 -1
- package/assets/esri/core/workers/chunks/b1f1a26e7a2ef5b783ee.js +0 -1
- package/assets/esri/core/workers/chunks/b605dfdfed8ff8eda4f3.js +0 -1
- package/assets/esri/core/workers/chunks/c337c1a2dbc452780dd7.js +0 -1
- package/assets/esri/core/workers/chunks/c601bbdafdee5074b04f.js +0 -1
- package/assets/esri/core/workers/chunks/c696615cae5daefa2d98.js +0 -1
- package/assets/esri/core/workers/chunks/c8694a27e2cf28b010e8.js +0 -1
- package/assets/esri/core/workers/chunks/e6457ac25c0829ee039c.js +0 -1
- package/assets/esri/core/workers/chunks/eadac757f74470b89a36.js +0 -1
- package/assets/esri/core/workers/chunks/f4167fc895d4009df1c7.js +0 -1
- package/assets/esri/core/workers/chunks/f76774781865cb1411b0.js +0 -1
- package/assets/esri/core/workers/chunks/fd04df45cdcc6ff52554.js +0 -1
- package/chunks/TimeExtent.js +0 -5
- package/chunks/TimeInterval.js +0 -5
- package/graphic/IntegratedMesh3DTilesGraphicOrigin.d.ts +0 -4
- package/graphic/IntegratedMesh3DTilesGraphicOrigin.js +0 -5
- package/graphic/IntegratedMeshGraphicOrigin.d.ts +0 -4
- package/graphic/IntegratedMeshGraphicOrigin.js +0 -5
- package/graphic/isIntegratedMesh3DTilesGraphicOrigin.js +0 -5
- package/graphic/isIntegratedMeshGraphicOrigin.js +0 -5
- package/views/2d/engine/webgl/effects/post-processing/Bloom.js +0 -5
- package/views/2d/engine/webgl/effects/post-processing/Blur.js +0 -5
- package/views/2d/engine/webgl/effects/post-processing/Colorize.js +0 -5
- package/views/2d/engine/webgl/effects/post-processing/DropShadow.js +0 -5
- package/views/2d/engine/webgl/effects/post-processing/Opacity.js +0 -5
- package/views/3d/analysis/ElevationProfile/ElevationProfileHoveredPointVisualization.js +0 -5
- package/views/3d/analysis/ElevationProfile/ElevationProfileHoveredPointsVisualization.js +0 -5
- package/views/3d/analysis/ElevationProfile/ElevationProfileInputVisualization.js +0 -5
- package/views/3d/analysis/ElevationProfile/ElevationProfileLineVisualization.js +0 -5
- package/views/3d/analysis/ElevationProfile/ElevationProfileVisualization.js +0 -5
- package/views/3d/webgl-engine/shaders/FocusAreaColor.glsl.js +0 -5
- package/views/3d/webgl-engine/shaders/FocusAreaMask.glsl.js +0 -5
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../core/Error.js";import{findAssociatedFeatureService as a}from"../../layers/support/associatedFeatureServiceUtils.js";import{getLayerModuleType as r}from"../../layers/support/fetchService.js";import{LayerLoadContext as t}from"../../layers/support/LayerLoadContext.js";import{sceneServiceLayerTypeToClassName as s,applyPreferredHostToPortalItem as
|
|
5
|
+
import e from"../../core/Error.js";import{findAssociatedFeatureService as a}from"../../layers/support/associatedFeatureServiceUtils.js";import{getLayerModuleType as r}from"../../layers/support/fetchService.js";import{LayerLoadContext as t}from"../../layers/support/LayerLoadContext.js";import{sceneServiceLayerTypeToClassName as s,applyPreferredHostToPortalItem as n,getPreferredHost as c}from"../../layers/support/layerUtils.js";import{layerLookupMap as o}from"../../layers/support/lazyLayerLoader.js";import i from"../PortalItem.js";import{getFirstLayerOrTable as u,getNumLayersAndTables as l,preprocessFSItemData as y,getLayerOrTable as m,layerTypeToLayerModuleType as f,populateSceneServiceItemData as p}from"./loadUtils.js";import{hasTypeKeyword as d}from"./portalItemUtils.js";async function L(e){let{portalItem:a}=e;!a||a instanceof i||(a=new i(a));const r=await w(a);return new(0,r.constructor)({portalItem:a,...r.properties})}async function w(e){await e.load();const a=new t;return N(await S(e,a))}async function S(a,r){switch(a.type){case"3DTiles Service":return a.typeKeywords.includes("3DObject")?F():a.typeKeywords.includes("GaussianSplat")?b():P();case"CSV":return K();case"Feature Collection":return M(a);case"Feature Service":return h(a,r);case"Feed":return J();case"GeoJson":return G();case"Group Layer":return k();case"Image Service":return g(a,r);case"KML":return V();case"Knowledge Graph Layer":return W();case"Map Service":return v(a,r);case"Media Layer":return $();case"Scene Service":return I(a,r);case"Stream Service":return j();case"Video Service":return T(a,r);case"Vector Tile Service":return C();case"WCS":return U();case"WFS":return D();case"WMS":return O();case"WMTS":return x();default:throw new e("portal:unknown-item-type","Unknown item type '${type}'",{type:a.type})}}async function N(e){const a=e.className,r=o[a];return{constructor:await r(),properties:e.properties}}async function v(e,a){return await A(e,a)?{className:"TileLayer"}:{className:"MapImageLayer"}}async function h(e,a){const r=await E(e,a);if("object"==typeof r){const{sourceJSON:e,className:a}=r,t={sourceJSON:e};return null!=r.id&&(t.layerId=r.id),{className:a||"FeatureLayer",properties:t}}return{className:"GroupLayer"}}async function I(e,r){const t=await E(e,r,async()=>{try{if(!e.url)return[];const{serverUrl:t}=await a(e.url,{sceneLayerItem:e}),s=await r.fetchServiceMetadata(t);return s?.tables??[]}catch{return[]}});if("object"==typeof t){const a={};let n;if(null!=t.id?(a.layerId=t.id,n=`${e.url}/layers/${t.id}`):n=e.url,e.typeKeywords?.length)for(const r of Object.keys(s))if(e.typeKeywords.includes(r))return{className:s[r]};const c=await r.fetchServiceMetadata(n,{customParameters:await r.fetchCustomParameters(e,e=>u(e)?.customParameters)});return{className:s[c?.layerType]||"SceneLayer",properties:a}}if(!1===t){const a=await r.fetchServiceMetadata(e.url);if("Voxel"===a?.layerType)return{className:"VoxelLayer"}}return{className:"GroupLayer"}}async function M(e){await e.load();const a=d(e,"Map Notes"),r=d(e,"Markup");if(a||r)return{className:"MapNotesLayer"};if(d(e,"Route Layer"))return{className:"RouteLayer"};const t=await e.fetchData();return 1===l(t)?{className:"FeatureLayer"}:{className:"GroupLayer"}}async function g(e,a){await e.load();const r=e.typeKeywords?.map(e=>e.toLowerCase())??[];if(r.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(r.includes("tiled imagery"))return{className:"ImageryTileLayer"};const t=await a.fetchItemData(e),s=t?.layerType;if("ArcGISTiledImageServiceLayer"===s)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===s)return{className:"ImageryLayer"};const n=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)}),c=n.cacheType?.toLowerCase(),o=n.capabilities?.toLowerCase().includes("tilesonly"),i=n.tileInfo?.format?.toLowerCase()??"",u=null==c&&["jpg","jpeg","png","png8","png24","png32","mixed"].includes(i);return"map"===c||u||o?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}function j(){return{className:"StreamLayer"}}async function T(e,a){return"object"==typeof await E(e,a)?{className:"VideoLayer"}:{className:"GroupLayer"}}function C(){return{className:"VectorTileLayer"}}function G(){return{className:"GeoJSONLayer"}}function P(){return{className:"IntegratedMesh3DTilesLayer"}}function b(){return{className:"GaussianSplatLayer"}}function F(){return{className:"UnsupportedLayer"}}function K(){return{className:"CSVLayer"}}function V(){return{className:"KMLLayer"}}function W(){return{className:"KnowledgeGraphLayer"}}function U(){return{className:"WCSLayer"}}function D(){return{className:"WFSLayer"}}function O(){return{className:"WMSLayer"}}function x(){return{className:"WMTSLayer"}}function J(){return{className:"StreamLayer"}}function k(){return{className:"GroupLayer"}}function $(){return{className:"MediaLayer"}}async function A(e,a){const{tileInfo:r}=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)});return r}async function E(e,a,t){const{url:s,type:o}=e,i="Feature Service"===o;if(!s)return{};if(/\/\d+$/.test(s)){if(i){const t=await a.fetchServiceMetadata(s,{customParameters:await a.fetchCustomParameters(e,e=>u(e)?.customParameters)});return n(e,c()),{id:t.id,className:r(t.type),sourceJSON:t}}return{}}if("Video Service"===o){const e=await a.fetchServiceMetadata(s);return!((e.layers?.length??0)>1)&&{}}await e.load();let d=await a.fetchItemData(e);if(i){const{data:r,preferredHost:t}=await y(d,s,a);n(e,t);const c=R(r);if("object"==typeof c){const e=m(r,c.id);c.className=f(e?.layerType)}return c}"Scene Service"===o&&(d=await p(e,d,a));if(l(d)>0)return R(d);const L=await a.fetchServiceMetadata(s);return t&&(L.tables=await t()),R(L)}function R(e){return 1===l(e)&&{id:u(e)?.id}}export{L as fromItem,S as selectLayerClassPath};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{ClonableMixin as t}from"../../core/Clonable.js";import{JSONMap as o}from"../../core/jsonMap.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import i from"../../core/Logger.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import{ensureType as n}from"../../core/accessorSupport/ensureType.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{enumeration as a}from"../../core/accessorSupport/decorators/enumeration.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import
|
|
5
|
+
import{__decorate as e}from"tslib";import{ClonableMixin as t}from"../../core/Clonable.js";import{JSONMap as o}from"../../core/jsonMap.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import i from"../../core/Logger.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import{ensureType as n}from"../../core/accessorSupport/ensureType.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{enumeration as a}from"../../core/accessorSupport/decorators/enumeration.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import m from"../../geometry/SpatialReference.js";import{fromJSON as l}from"../../geometry/support/jsonUtils.js";import{geometryTypes as u}from"../../geometry/support/typeUtils.js";import{unitsKebabDict as d}from"../../layers/graphics/data/queryUtils.js";import c from"./AutoIntervalBinParameters.js";import y from"./BinParametersBase.js";import j from"./DateBinParameters.js";import f from"./FixedBoundariesBinParameters.js";import h from"./FixedIntervalBinParameters.js";import{spatialRelKebabDict as v}from"./spatialRelationships.js";import w from"./StatisticDefinition.js";import S from"../../time/TimeExtent.js";import{isTimeZoneValid as g}from"../../time/timeZoneUtils.js";const b=new o({asc:"ascending",desc:"descending"}),B={base:y,key:"type",typeMap:{"auto-interval":c,date:j,"fixed-boundaries":f,"fixed-interval":h}};let R=class extends(t(r)){constructor(e){super(e),this.binParameters=null,this.binOrder="ascending",this.cacheHint=void 0,this.datumTransformation=null,this.defaultSpatialReference=null,this.distance=void 0,this.geometry=null,this.lowerBoundaryAlias=null,this.outSpatialReference=null,this.outStatistics=null,this.returnDistinctValues=null,this.spatialRelationship="intersects",this.timeExtent=null,this.upperBoundaryAlias=null,this.units=null,this.where="1=1"}set outTimeZone(e){this._set("outTimeZone",e),e&&!g(e)&&i.getLogger(this).warn("#outTimeZone",`the parsed value '${e}' may not be a valid IANA time zone`)}};e([s({types:B,json:{name:"bin",write:!0}})],R.prototype,"binParameters",void 0),e([a(b)],R.prototype,"binOrder",void 0),e([s({type:Boolean,json:{write:!0}})],R.prototype,"cacheHint",void 0),e([s({json:{write:!0}})],R.prototype,"datumTransformation",void 0),e([s({type:m,json:{name:"defaultSR",write:!0}})],R.prototype,"defaultSpatialReference",void 0),e([s({type:Number,json:{write:{overridePolicy:e=>({enabled:e>0})}}})],R.prototype,"distance",void 0),e([s({types:u,json:{read:l,write:!0}})],R.prototype,"geometry",void 0),e([s({type:String,json:{write:!0}})],R.prototype,"lowerBoundaryAlias",void 0),e([s({type:m,json:{name:"outSR",write:!0}})],R.prototype,"outSpatialReference",void 0),e([s({type:[w],json:{write:{enabled:!0,overridePolicy(){return{enabled:null!=this.outStatistics&&this.outStatistics.length>0}}}}})],R.prototype,"outStatistics",void 0),e([s({value:null,json:{name:"outTimeReference",read:{reader:e=>e.ianaTimeZone},write:{writer:(e,t,o)=>{e&&(t[o]={ianaTimeZone:e})}}}})],R.prototype,"outTimeZone",null),e([s({type:Boolean,json:{write:!0}})],R.prototype,"returnDistinctValues",void 0),e([a(v,{name:"spatialRel"})],R.prototype,"spatialRelationship",void 0),e([s({type:S,json:{write:!0}})],R.prototype,"timeExtent",void 0),e([s({type:String,json:{write:!0}})],R.prototype,"upperBoundaryAlias",void 0),e([s({type:String,json:{read:d.read,write:{writer:d.write,overridePolicy(e){return{enabled:null!=e&&null!=this.distance}}}}})],R.prototype,"units",void 0),e([s({type:String,json:{write:!0}})],R.prototype,"where",void 0),R=e([p("esri.rest.support.AttributeBinsQuery")],R),R.from=n(R);export{R 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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import e from"../../core/Collection.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import{ensureClass as i}from"../../core/accessorSupport/ensureType.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import{writer as s}from"../../core/accessorSupport/decorators/writer.js";import n from"../../geometry/Extent.js";import l from"../../geometry/SpatialReference.js";import{fromJSON as m}from"../../geometry/support/jsonUtils.js";import{geometryTypes as y}from"../../geometry/support/typeUtils.js";import
|
|
5
|
+
import{__decorate as t}from"tslib";import e from"../../core/Collection.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import{ensureClass as i}from"../../core/accessorSupport/ensureType.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import{writer as s}from"../../core/accessorSupport/decorators/writer.js";import n from"../../geometry/Extent.js";import l from"../../geometry/SpatialReference.js";import{fromJSON as m}from"../../geometry/support/jsonUtils.js";import{geometryTypes as y}from"../../geometry/support/typeUtils.js";import a from"../../time/TimeExtent.js";var u;let d=u=class extends o{static from(t){return i(u,t)}constructor(t){super(t),this.dpi=96,this.floors=null,this.gdbVersion=null,this.geometry=null,this.geometryPrecision=null,this.height=400,this.historicMoment=null,this.layerIds=null,this.layerOption="top",this.mapExtent=null,this.maxAllowableOffset=null,this.returnFieldName=!0,this.returnGeometry=!1,this.returnM=!1,this.returnUnformattedValues=!0,this.returnZ=!1,this.spatialReference=null,this.sublayers=null,this.timeExtent=null,this.tolerance=null,this.width=400}writeHistoricMoment(t,e){e.historicMoment=t&&t.getTime()}};t([r({type:Number,json:{write:!0}})],d.prototype,"dpi",void 0),t([r()],d.prototype,"floors",void 0),t([r({type:String,json:{write:!0}})],d.prototype,"gdbVersion",void 0),t([r({types:y,json:{read:m,write:!0}})],d.prototype,"geometry",void 0),t([r({type:Number,json:{write:!0}})],d.prototype,"geometryPrecision",void 0),t([r({type:Number,json:{write:!0}})],d.prototype,"height",void 0),t([r({type:Date})],d.prototype,"historicMoment",void 0),t([s("historicMoment")],d.prototype,"writeHistoricMoment",null),t([r({type:[Number],json:{write:!0}})],d.prototype,"layerIds",void 0),t([r({type:["top","visible","all","popup"],json:{write:!0}})],d.prototype,"layerOption",void 0),t([r({type:n,json:{write:!0}})],d.prototype,"mapExtent",void 0),t([r({type:Number,json:{write:!0}})],d.prototype,"maxAllowableOffset",void 0),t([r({type:Boolean,json:{write:!0}})],d.prototype,"returnFieldName",void 0),t([r({type:Boolean,json:{write:!0}})],d.prototype,"returnGeometry",void 0),t([r({type:Boolean,json:{write:!0}})],d.prototype,"returnM",void 0),t([r({type:Boolean,json:{write:!0}})],d.prototype,"returnUnformattedValues",void 0),t([r({type:Boolean,json:{write:!0}})],d.prototype,"returnZ",void 0),t([r({type:l,json:{write:!0}})],d.prototype,"spatialReference",void 0),t([r({type:e})],d.prototype,"sublayers",void 0),t([r({type:a,json:{write:!0}})],d.prototype,"timeExtent",void 0),t([r({type:Number,json:{write:!0}})],d.prototype,"tolerance",void 0),t([r({type:Number,json:{write:!0}})],d.prototype,"width",void 0),d=u=t([p("esri.rest.support.IdentifyParameters")],d);const c=d;export{c 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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as o}from"tslib";import{ClonableMixin as t}from"../../core/Clonable.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{enumeration as s}from"../../core/accessorSupport/decorators/enumeration.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import{writer as i}from"../../core/accessorSupport/decorators/writer.js";import{getJsonType as m,fromJSON as a}from"../../geometry/support/jsonUtils.js";import{geometryTypes as n}from"../../geometry/support/typeUtils.js";import{spatialRelKebabDict as
|
|
5
|
+
import{__decorate as o}from"tslib";import{ClonableMixin as t}from"../../core/Clonable.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{enumeration as s}from"../../core/accessorSupport/decorators/enumeration.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import{writer as i}from"../../core/accessorSupport/decorators/writer.js";import{getJsonType as m,fromJSON as a}from"../../geometry/support/jsonUtils.js";import{geometryTypes as n}from"../../geometry/support/typeUtils.js";import{spatialRelKebabDict as l}from"./spatialRelationships.js";import c from"../../time/TimeExtent.js";let y=class extends(t(r)){constructor(o){super(o),this.geometry=null,this.objectIds=null,this.spatialRelationship="intersects",this.timeExtent=null,this.where=null}writeGeometry(o,t,r){null!=o&&(t.geometryType=m(o),t[r]=JSON.stringify(o.toJSON()))}};o([e({types:n,json:{read:a,write:!0}})],y.prototype,"geometry",void 0),o([i("geometry")],y.prototype,"writeGeometry",null),o([e({json:{write:!0}})],y.prototype,"objectIds",void 0),o([s(l,{ignoreUnknown:!1,name:"spatialRel"})],y.prototype,"spatialRelationship",void 0),o([e({type:c,json:{name:"time",write:!0}})],y.prototype,"timeExtent",void 0),o([e({type:String,json:{write:!0}})],y.prototype,"where",void 0),y=o([p("esri.rest.support.ImageGPSInfoParameters")],y);export{y 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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{JSONSupport as
|
|
5
|
+
import{__decorate as t}from"tslib";import{JSONSupport as e}from"../../core/JSONSupport.js";import{clone as r}from"../../core/lang.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{writer as i}from"../../core/accessorSupport/decorators/writer.js";import p from"../../geometry/Point.js";import{getJsonType as m,fromJSON as n}from"../../geometry/support/jsonUtils.js";import{geometryTypes as a}from"../../geometry/support/typeUtils.js";import l from"../../layers/support/MosaicRule.js";import u from"../../layers/support/RasterFunction.js";import c from"../../time/TimeExtent.js";var y;let j=y=class extends e{constructor(t){super(t),this.geometry=null,this.mosaicRule=null,this.rasterFunction=null,this.pixelSize=null,this.raster=void 0,this.timeExtent=null}writeGeometry(t,e,r){null!=t&&(e.geometryType=m(t),e[r]=t.toJSON())}clone(){return new y(r({geometry:this.geometry,mosaicRule:this.mosaicRule,rasterFunction:this.rasterFunction,pixelSize:this.pixelSize,raster:this.raster,timeExtent:this.timeExtent}))}};t([o({types:a,json:{read:n}})],j.prototype,"geometry",void 0),t([i("geometry")],j.prototype,"writeGeometry",null),t([o({type:l,json:{write:!0}})],j.prototype,"mosaicRule",void 0),t([o({type:u,json:{write:!0,name:"renderingRule"}})],j.prototype,"rasterFunction",void 0),t([o({type:p,json:{write:!0}})],j.prototype,"pixelSize",void 0),t([o({json:{write:!0}})],j.prototype,"raster",void 0),t([o({type:c,json:{read:{source:"time"},write:{target:"time"}}})],j.prototype,"timeExtent",void 0),j=y=t([s("esri.rest.support.ImageHistogramParameters")],j);export{j 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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{JSONSupport as e}from"../../core/JSONSupport.js";import{clone as r}from"../../core/lang.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{writer as s}from"../../core/accessorSupport/decorators/writer.js";import n from"../../geometry/Point.js";import{getJsonType as l}from"../../geometry/support/jsonUtils.js";import{geometryTypes as u}from"../../geometry/support/typeUtils.js";import p from"../../layers/support/MosaicRule.js";import a from"../../layers/support/RasterFunction.js";import
|
|
5
|
+
import{__decorate as t}from"tslib";import{JSONSupport as e}from"../../core/JSONSupport.js";import{clone as r}from"../../core/lang.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{writer as s}from"../../core/accessorSupport/decorators/writer.js";import n from"../../geometry/Point.js";import{getJsonType as l}from"../../geometry/support/jsonUtils.js";import{geometryTypes as u}from"../../geometry/support/typeUtils.js";import p from"../../layers/support/MosaicRule.js";import a from"../../layers/support/RasterFunction.js";import m from"../../time/TimeExtent.js";var c;let y=c=class extends e{constructor(t){super(t),this.geometry=null,this.rasterFunctions=null,this.pixelSize=null,this.returnGeometry=!0,this.returnCatalogItems=!0,this.returnPixelValues=!0,this.maxItemCount=null,this.timeExtent=null,this.raster=void 0,this.viewId=void 0,this.processAsMultidimensional=!1}writeGeometry(t,e,r){null!=t&&(e.geometryType=l(t),e[r]=JSON.stringify(t.toJSON()))}set mosaicRule(t){let e=t;e?.mosaicMethod&&(e=p.fromJSON({...e.toJSON(),mosaicMethod:e.mosaicMethod,mosaicOperation:e.mosaicOperation})),this._set("mosaicRule",e)}writeMosaicRule(t,e,r){null!=t&&(e[r]=JSON.stringify(t.toJSON()))}set rasterFunction(t){let e=t;e?.rasterFunction&&(e=a.fromJSON({...e.toJSON(),rasterFunction:e.rasterFunction,rasterFunctionArguments:e.rasterFunctionArguments})),this._set("rasterFunction",e)}writeRasterFunction(t,e,r){null!=t&&(e[r]=JSON.stringify(t.toJSON())),t.rasterFunctionDefinition&&(e[r]=JSON.stringify(t.rasterFunctionDefinition))}writeRasterFunctions(t,e,r){null!=t&&(e[r]=JSON.stringify(t.map(t=>t.rasterFunctionDefinition||t.toJSON())))}writePixelSize(t,e,r){null!=t&&(e[r]=JSON.stringify(t))}writeTimeExtent(t,e,r){if(null!=t){const o=null!=t.start?t.start.getTime():null,i=null!=t.end?t.end.getTime():null;e[r]=null!=o?null!=i?`${o},${i}`:`${o}`:null}}clone(){return new c(r({geometry:this.geometry,mosaicRule:this.mosaicRule,rasterFunction:this.rasterFunction,rasterFunctions:this.rasterFunctions,pixelSize:this.pixelSize,returnGeometry:this.returnGeometry,returnCatalogItems:this.returnCatalogItems,returnPixelValues:this.returnPixelValues,maxItemCount:this.maxItemCount,processAsMultidimensional:this.processAsMultidimensional,raster:this.raster,viewId:this.viewId,timeExtent:this.timeExtent}))}};t([o({types:u,json:{write:!0}})],y.prototype,"geometry",void 0),t([s("geometry")],y.prototype,"writeGeometry",null),t([o({type:p,json:{write:!0}})],y.prototype,"mosaicRule",null),t([s("mosaicRule")],y.prototype,"writeMosaicRule",null),t([o({type:a,json:{write:!0,name:"renderingRule"}})],y.prototype,"rasterFunction",null),t([s("rasterFunction")],y.prototype,"writeRasterFunction",null),t([o({type:[a],json:{write:!0,name:"renderingRules"}})],y.prototype,"rasterFunctions",void 0),t([s("rasterFunctions")],y.prototype,"writeRasterFunctions",null),t([o({type:n,json:{write:!0}})],y.prototype,"pixelSize",void 0),t([s("pixelSize")],y.prototype,"writePixelSize",null),t([o({type:Boolean,json:{write:!0}})],y.prototype,"returnGeometry",void 0),t([o({type:Boolean,json:{write:!0}})],y.prototype,"returnCatalogItems",void 0),t([o({type:Boolean,json:{write:!0}})],y.prototype,"returnPixelValues",void 0),t([o({type:Number,json:{write:!0}})],y.prototype,"maxItemCount",void 0),t([o({type:m,json:{write:{target:"time"}}})],y.prototype,"timeExtent",void 0),t([s("timeExtent")],y.prototype,"writeTimeExtent",null),t([o({json:{write:!0}})],y.prototype,"raster",void 0),t([o({json:{write:!0}})],y.prototype,"viewId",void 0),t([o({type:Boolean,json:{write:!0}})],y.prototype,"processAsMultidimensional",void 0),y=c=t([i("esri.rest.support.ImageIdentifyParameters")],y);export{y 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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import e from"../../core/Accessor.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import r from"../../geometry/Extent.js";import s from"../../geometry/SpatialReference.js";import{srToRESTValue as p}from"../../geometry/support/spatialReferenceUtils.js";import l from"../../layers/support/LayerTimeOptions.js";import{serializeTimeOptions as n,serializeLayerDefinitions as a}from"../../layers/support/layerUtils.js";import
|
|
5
|
+
import{__decorate as t}from"tslib";import e from"../../core/Accessor.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import r from"../../geometry/Extent.js";import s from"../../geometry/SpatialReference.js";import{srToRESTValue as p}from"../../geometry/support/spatialReferenceUtils.js";import l from"../../layers/support/LayerTimeOptions.js";import{serializeTimeOptions as n,serializeLayerDefinitions as a}from"../../layers/support/layerUtils.js";import m from"../../time/TimeExtent.js";let y=class extends e{constructor(t){super(t),this.extent=null,this.width=null,this.height=null,this.dpi=null,this.format=null,this.imageSpatialReference=null,this.layerDefinitions=[],this.layerOption=null,this.layerIds=null,this.transparent=!0,this.timeExtent=null,this.layerTimeOptions=null}toJSON(){let t,e=this.extent;if(e=e&&e.clone()._normalize(!0),this.timeExtent){const e=this.timeExtent.toJSON(),{start:i,end:o}=e;null==i&&null==o||(t=i===o?""+i:`${i??"null"},${o??"null"}`)}const i=this.layerOption,o=p(e?.spatialReference),r=this.imageSpatialReference,s={dpi:this.dpi,format:this.format,transparent:this.transparent,size:null!==this.width&&null!==this.height?this.width+","+this.height:null,bbox:e?e.xmin+","+e.ymin+","+e.xmax+","+e.ymax:null,bboxSR:o,layers:i?i+":"+(this.layerIds??[]).join(","):null,layerDefs:a(this.layerDefinitions),layerTimeOptions:n(this.layerTimeOptions??[]),imageSR:r?p(r):o,time:t},l={};return Object.keys(s).filter(t=>null!=s[t]).forEach(t=>l[t]=s[t]),l}};t([i({type:r})],y.prototype,"extent",void 0),t([i()],y.prototype,"width",void 0),t([i()],y.prototype,"height",void 0),t([i()],y.prototype,"dpi",void 0),t([i()],y.prototype,"format",void 0),t([i({type:s})],y.prototype,"imageSpatialReference",void 0),t([i()],y.prototype,"layerDefinitions",void 0),t([i()],y.prototype,"layerOption",void 0),t([i()],y.prototype,"layerIds",void 0),t([i()],y.prototype,"transparent",void 0),t([i({type:m})],y.prototype,"timeExtent",void 0),t([i({type:[l]})],y.prototype,"layerTimeOptions",void 0),y=t([o("esri.rest.support.ImageParameters")],y);const h=y;export{h 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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{JSONSupport as e}from"../../core/JSONSupport.js";import{clone as o}from"../../core/lang.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{writer as i}from"../../core/accessorSupport/decorators/writer.js";import p from"../../geometry/Multipoint.js";import l from"../../geometry/Point.js";import{getJsonType as n,fromJSON as
|
|
5
|
+
import{__decorate as t}from"tslib";import{JSONSupport as e}from"../../core/JSONSupport.js";import{clone as o}from"../../core/lang.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{writer as i}from"../../core/accessorSupport/decorators/writer.js";import p from"../../geometry/Multipoint.js";import l from"../../geometry/Point.js";import{getJsonType as n,fromJSON as m}from"../../geometry/support/jsonUtils.js";import{geometryTypes as a}from"../../geometry/support/typeUtils.js";import u from"../../layers/support/MosaicRule.js";import{interpolationKebab as y}from"../../layers/support/rasterEnums.js";import c from"../../time/TimeExtent.js";var d;let h=d=class extends e{constructor(){super(...arguments),this.geometry=null,this.interpolation="nearest",this.mosaicRule=null,this.outFields=null,this.pixelSize=null,this.raster=void 0,this.returnFirstValueOnly=!0,this.sampleDistance=null,this.sampleCount=null,this.sliceId=null,this.timeExtent=null}writeGeometry(t,e,o){null!=t&&(e.geometryType=n(t),e[o]=t.toJSON())}set locations(t){if(t?.length){const e=new p({spatialReference:t[0].spatialReference,points:t.map(({x:t,y:e})=>[t,e])});this._set("locations",t),this.geometry=e}}clone(){return new d(o({geometry:this.geometry,locations:this.locations,interpolation:this.interpolation,mosaicRule:this.mosaicRule,outFields:this.outFields,raster:this.raster,returnFirstValueOnly:this.returnFirstValueOnly,sampleDistance:this.sampleDistance,sampleCount:this.sampleCount,sliceId:this.sliceId,pixelSize:this.pixelSize,timeExtent:this.timeExtent}))}};t([r({types:a,json:{read:m}})],h.prototype,"geometry",void 0),t([i("geometry")],h.prototype,"writeGeometry",null),t([r({type:[l]})],h.prototype,"locations",null),t([r({type:String,json:{type:y.jsonValues,read:y.read,write:y.write}})],h.prototype,"interpolation",void 0),t([r({type:u,json:{write:!0}})],h.prototype,"mosaicRule",void 0),t([r({type:[String],json:{write:!0}})],h.prototype,"outFields",void 0),t([r({type:l,json:{write:!0}})],h.prototype,"pixelSize",void 0),t([r({type:String,json:{write:!0}})],h.prototype,"raster",void 0),t([r({type:Boolean,json:{write:!0}})],h.prototype,"returnFirstValueOnly",void 0),t([r({type:Number,json:{write:!0}})],h.prototype,"sampleDistance",void 0),t([r({type:Number,json:{write:!0}})],h.prototype,"sampleCount",void 0),t([r({type:Number,json:{write:!0}})],h.prototype,"sliceId",void 0),t([r({type:c,json:{read:{source:"time"},write:{target:"time"}}})],h.prototype,"timeExtent",void 0),h=d=t([s("esri.rest.support.ImageSampleParameters")],h);export{h as default};
|
package/rest/support/Query.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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{JSONMap as e}from"../../core/jsonMap.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import{clone as o}from"../../core/lang.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import{cast as s}from"../../core/accessorSupport/decorators/cast.js";import{enumeration as n}from"../../core/accessorSupport/decorators/enumeration.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{writer as l}from"../../core/accessorSupport/decorators/writer.js";import{ensureClass as p}from"../../core/accessorSupport/ensureType.js";import u from"../../geometry/Point.js";import m from"../../geometry/SpatialReference.js";import{fromJSON as c}from"../../geometry/support/jsonUtils.js";import{geometryTypes as d}from"../../geometry/support/typeUtils.js";import{DataLayerSource as y}from"../../layers/support/source/DataLayerSource.js";import h from"./FullTextSearch.js";import f from"./QuantizationParameters.js";import{spatialRelKebabDict as j}from"./spatialRelationships.js";import v from"./StatisticDefinition.js";import
|
|
5
|
+
import{__decorate as t}from"tslib";import{JSONMap as e}from"../../core/jsonMap.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import{clone as o}from"../../core/lang.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import{cast as s}from"../../core/accessorSupport/decorators/cast.js";import{enumeration as n}from"../../core/accessorSupport/decorators/enumeration.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{writer as l}from"../../core/accessorSupport/decorators/writer.js";import{ensureClass as p}from"../../core/accessorSupport/ensureType.js";import u from"../../geometry/Point.js";import m from"../../geometry/SpatialReference.js";import{fromJSON as c}from"../../geometry/support/jsonUtils.js";import{geometryTypes as d}from"../../geometry/support/typeUtils.js";import{DataLayerSource as y}from"../../layers/support/source/DataLayerSource.js";import h from"./FullTextSearch.js";import f from"./QuantizationParameters.js";import{spatialRelKebabDict as j}from"./spatialRelationships.js";import v from"./StatisticDefinition.js";import w from"../../time/TimeExtent.js";var S;const g=new e({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let R=class extends r{static{S=this}static from(t){return p(S,t)}constructor(t){super(t),this.aggregateIds=null,this.cacheHint=void 0,this.compactGeometryEnabled=!1,this.datumTransformation=null,this.defaultSpatialReferenceEnabled=!1,this.distance=void 0,this.dynamicDataSource=void 0,this.formatOf3DObjects=null,this.fullText=null,this.gdbVersion=null,this.geometry=null,this.geometryPrecision=void 0,this.groupByFieldsForStatistics=null,this.having=null,this.historicMoment=null,this.maxAllowableOffset=void 0,this.maxRecordCountFactor=1,this.multipatchOption=null,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.outStatistics=null,this.parameterValues=null,this.pixelSize=null,this.quantizationParameters=null,this.rangeValues=null,this.relationParameter=null,this.resultType=null,this.returnCentroid=!1,this.returnDistinctValues=!1,this.returnExceededLimitFeatures=!0,this.returnGeometry=!1,this.returnQueryGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.returnTrueCurves=void 0,this.sourceSpatialReference=null,this.spatialRelationship="intersects",this.start=void 0,this.sqlFormat=null,this.text=null,this.timeExtent=null,this.timeReferenceUnknownClient=!1,this.units=null,this.where=null}castDatumTransformation(t){return"number"==typeof t||"object"==typeof t?t:null}writeHistoricMoment(t,e){e.historicMoment=t&&t.getTime()}writeParameterValues(t,e){if(t){const r={};for(const e in t){const o=t[e];Array.isArray(o)?r[e]=o.map(t=>t instanceof Date?t.getTime():t):o instanceof Date?r[e]=o.getTime():r[e]=o}e.parameterValues=r}}writeStart(t,e){e.resultOffset=this.start,e.resultRecordCount=this.num||10,e.where="1=1"}writeWhere(t,e){e.where=t||"1=1"}clone(){return new S(o({aggregateIds:this.aggregateIds,cacheHint:this.cacheHint,compactGeometryEnabled:this.compactGeometryEnabled,datumTransformation:this.datumTransformation,defaultSpatialReferenceEnabled:this.defaultSpatialReferenceEnabled,distance:this.distance,fullText:this.fullText,formatOf3DObjects:this.formatOf3DObjects,gdbVersion:this.gdbVersion,geometry:this.geometry,geometryPrecision:this.geometryPrecision,groupByFieldsForStatistics:this.groupByFieldsForStatistics,having:this.having,historicMoment:null!=this.historicMoment?new Date(this.historicMoment):null,maxAllowableOffset:this.maxAllowableOffset,maxRecordCountFactor:this.maxRecordCountFactor,multipatchOption:this.multipatchOption,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,outStatistics:this.outStatistics,parameterValues:this.parameterValues,pixelSize:this.pixelSize,quantizationParameters:this.quantizationParameters,rangeValues:this.rangeValues,relationParameter:this.relationParameter,resultType:this.resultType,returnDistinctValues:this.returnDistinctValues,returnGeometry:this.returnGeometry,returnCentroid:this.returnCentroid,returnExceededLimitFeatures:this.returnExceededLimitFeatures,returnQueryGeometry:this.returnQueryGeometry,returnM:this.returnM,returnZ:this.returnZ,returnTrueCurves:this.returnTrueCurves,dynamicDataSource:this.dynamicDataSource,sourceSpatialReference:this.sourceSpatialReference,spatialRelationship:this.spatialRelationship,start:this.start,sqlFormat:this.sqlFormat,text:this.text,timeExtent:this.timeExtent,timeReferenceUnknownClient:this.timeReferenceUnknownClient,units:this.units,where:this.where}))}static{this.MAX_MAX_RECORD_COUNT_FACTOR=5}};t([i({json:{write:!0}})],R.prototype,"aggregateIds",void 0),t([i({type:Boolean,json:{write:!0}})],R.prototype,"cacheHint",void 0),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"compactGeometryEnabled",void 0),t([i({json:{write:!0}})],R.prototype,"datumTransformation",void 0),t([s("datumTransformation")],R.prototype,"castDatumTransformation",null),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"defaultSpatialReferenceEnabled",void 0),t([i({type:Number,json:{write:!0}})],R.prototype,"distance",void 0),t([i({type:y,json:{write:!0}})],R.prototype,"dynamicDataSource",void 0),t([i({type:String,json:{write:!0}})],R.prototype,"formatOf3DObjects",void 0),t([i({type:[h],json:{write:{enabled:!0,overridePolicy(){return{enabled:null!=this.fullText&&this.fullText.length>0}}}}})],R.prototype,"fullText",void 0),t([i({type:String,json:{write:!0}})],R.prototype,"gdbVersion",void 0),t([i({types:d,json:{read:c,write:!0}})],R.prototype,"geometry",void 0),t([i({type:Number,json:{write:!0}})],R.prototype,"geometryPrecision",void 0),t([i({type:[String],json:{write:!0}})],R.prototype,"groupByFieldsForStatistics",void 0),t([i({type:String,json:{write:!0}})],R.prototype,"having",void 0),t([i({type:Date})],R.prototype,"historicMoment",void 0),t([l("historicMoment")],R.prototype,"writeHistoricMoment",null),t([i({type:Number,json:{write:!0}})],R.prototype,"maxAllowableOffset",void 0),t([i({type:Number,cast:t=>t<1?1:t>R.MAX_MAX_RECORD_COUNT_FACTOR?R.MAX_MAX_RECORD_COUNT_FACTOR:t,json:{write:{overridePolicy:t=>({enabled:t>1})}}})],R.prototype,"maxRecordCountFactor",void 0),t([i({type:["xyFootprint"],json:{write:!0}})],R.prototype,"multipatchOption",void 0),t([i({type:Number,json:{read:{source:"resultRecordCount"}}})],R.prototype,"num",void 0),t([i({json:{write:!0}})],R.prototype,"objectIds",void 0),t([i({type:[String],json:{write:!0}})],R.prototype,"orderByFields",void 0),t([i({type:[String],json:{write:!0}})],R.prototype,"outFields",void 0),t([i({type:m,json:{name:"outSR",write:!0}})],R.prototype,"outSpatialReference",void 0),t([i({type:[v],json:{write:{enabled:!0,overridePolicy(){return{enabled:null!=this.outStatistics&&this.outStatistics.length>0}}}}})],R.prototype,"outStatistics",void 0),t([i({json:{write:!0}})],R.prototype,"parameterValues",void 0),t([l("parameterValues")],R.prototype,"writeParameterValues",null),t([i({type:u,json:{write:!0}})],R.prototype,"pixelSize",void 0),t([i({type:f,json:{write:!0}})],R.prototype,"quantizationParameters",void 0),t([i({type:[Object],json:{write:!0}})],R.prototype,"rangeValues",void 0),t([i({type:String,json:{read:{source:"relationParam"},write:{target:"relationParam",overridePolicy(){return{enabled:"relation"===this.spatialRelationship}}}}})],R.prototype,"relationParameter",void 0),t([i({type:String,json:{write:!0}})],R.prototype,"resultType",void 0),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"returnCentroid",void 0),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"returnDistinctValues",void 0),t([i({type:Boolean,json:{default:!0,write:!0}})],R.prototype,"returnExceededLimitFeatures",void 0),t([i({type:Boolean,json:{write:!0}})],R.prototype,"returnGeometry",void 0),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"returnQueryGeometry",void 0),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"returnM",void 0),t([i({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],R.prototype,"returnZ",void 0),t([i({type:Boolean,json:{write:!0}})],R.prototype,"returnTrueCurves",void 0),t([i({type:m,json:{write:!0}})],R.prototype,"sourceSpatialReference",void 0),t([n(j,{ignoreUnknown:!1,name:"spatialRel"})],R.prototype,"spatialRelationship",void 0),t([i({type:Number,json:{read:{source:"resultOffset"}}})],R.prototype,"start",void 0),t([l("start"),l("num")],R.prototype,"writeStart",null),t([i({type:String,json:{write:!0}})],R.prototype,"sqlFormat",void 0),t([i({type:String,json:{write:!0}})],R.prototype,"text",void 0),t([i({type:w,json:{write:!0}})],R.prototype,"timeExtent",void 0),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"timeReferenceUnknownClient",void 0),t([n(g,{ignoreUnknown:!1}),i({json:{write:{overridePolicy(t){return{enabled:!!t&&null!=this.distance}}}}})],R.prototype,"units",void 0),t([i({type:String,json:{write:{overridePolicy(t){return{enabled:null!=t||null!=this.start&&this.start>0}}}}})],R.prototype,"where",void 0),t([l("where")],R.prototype,"writeWhere",null),R=S=t([a("esri.rest.support.Query")],R);export{R 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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{JSONMap as e}from"../../core/jsonMap.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import{clone as i}from"../../core/lang.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import{ensureType as s}from"../../core/accessorSupport/ensureType.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";import{writer as p}from"../../core/accessorSupport/decorators/writer.js";import l from"../../geometry/SpatialReference.js";import{fromJSON as a}from"../../geometry/support/jsonUtils.js";import{geometryTypes as u}from"../../geometry/support/typeUtils.js";import
|
|
5
|
+
import{__decorate as t}from"tslib";import{JSONMap as e}from"../../core/jsonMap.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import{clone as i}from"../../core/lang.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import{ensureType as s}from"../../core/accessorSupport/ensureType.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";import{writer as p}from"../../core/accessorSupport/decorators/writer.js";import l from"../../geometry/SpatialReference.js";import{fromJSON as a}from"../../geometry/support/jsonUtils.js";import{geometryTypes as u}from"../../geometry/support/typeUtils.js";import d from"./TopFilter.js";import c from"../../time/TimeExtent.js";var y;const m=new e({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),h=new e({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let j=class extends r{static{y=this}constructor(t){super(t),this.cacheHint=void 0,this.distance=void 0,this.geometry=null,this.geometryPrecision=void 0,this.maxAllowableOffset=void 0,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.resultType=null,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.start=void 0,this.spatialRelationship="intersects",this.timeExtent=null,this.topFilter=void 0,this.units=null,this.where="1=1"}writeStart(t,e){e.resultOffset=this.start,e.resultRecordCount=this.num||10}clone(){return new y(i({cacheHint:this.cacheHint,distance:this.distance,geometry:this.geometry,geometryPrecision:this.geometryPrecision,maxAllowableOffset:this.maxAllowableOffset,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,resultType:this.resultType,returnGeometry:this.returnGeometry,returnZ:this.returnZ,returnM:this.returnM,start:this.start,spatialRelationship:this.spatialRelationship,timeExtent:this.timeExtent,topFilter:this.topFilter,units:this.units,where:this.where}))}};t([o({type:Boolean,json:{write:!0}})],j.prototype,"cacheHint",void 0),t([o({type:Number,json:{write:{overridePolicy:t=>({enabled:t>0})}}})],j.prototype,"distance",void 0),t([o({types:u,json:{read:a,write:!0}})],j.prototype,"geometry",void 0),t([o({type:Number,json:{write:!0}})],j.prototype,"geometryPrecision",void 0),t([o({type:Number,json:{write:!0}})],j.prototype,"maxAllowableOffset",void 0),t([o({type:Number,json:{read:{source:"resultRecordCount"}}})],j.prototype,"num",void 0),t([o({json:{write:!0}})],j.prototype,"objectIds",void 0),t([o({type:[String],json:{write:!0}})],j.prototype,"orderByFields",void 0),t([o({type:[String],json:{write:!0}})],j.prototype,"outFields",void 0),t([o({type:l,json:{read:{source:"outSR"},write:{target:"outSR"}}})],j.prototype,"outSpatialReference",void 0),t([o({type:String,json:{write:!0}})],j.prototype,"resultType",void 0),t([o({json:{write:!0}})],j.prototype,"returnGeometry",void 0),t([o({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],j.prototype,"returnM",void 0),t([o({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],j.prototype,"returnZ",void 0),t([o({type:Number,json:{read:{source:"resultOffset"}}})],j.prototype,"start",void 0),t([p("start"),p("num")],j.prototype,"writeStart",null),t([o({type:String,json:{read:{source:"spatialRel",reader:m.read},write:{target:"spatialRel",writer:m.write}}})],j.prototype,"spatialRelationship",void 0),t([o({type:c,json:{write:!0}})],j.prototype,"timeExtent",void 0),t([o({type:d,json:{write:!0}})],j.prototype,"topFilter",void 0),t([o({type:String,json:{read:h.read,write:{writer:h.write,overridePolicy(t){return{enabled:null!=t&&null!=this.distance}}}}})],j.prototype,"units",void 0),t([o({type:String,json:{write:!0}})],j.prototype,"where",void 0),j=y=t([n("esri.rest.support.TopFeaturesQuery")],j),j.from=s(j);export{j 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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{pickRandom as t}from"../../../core/arrayUtils.js";import a from"../../../core/Error.js";import{assertIsSome as r}from"../../../core/maybe.js";import{throwIfAborted as i}from"../../../core/promiseUtils.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{kebabDict as n}from"../../../layers/support/fieldType.js";import{isTimeOnlyField as l}from"../../../layers/support/fieldUtils.js";import{getArcadeForPredominantCategory as u}from"../../statistics/support/predominanceUtils.js";import{summaryStatistics as m,uniqueValues as p,histogram as g,classBreaks as y}from"../../statistics/support/statsWorker.js";import{mergeWhereClauses as d}from"../../statistics/support/utils.js";import{WorkerClient as c}from"../../statistics/support/WorkerClient.js";import{getFieldsList as f,fieldDelimiter as h,isAnyDateField as w}from"../utils.js";import F from"./FeatureLayerAdapter.js";import{getMissingFieldsForBinning as S,updateQueryWithFeatureFilter as v,getFeatureReductionFields as q,getViewInfoParams as V,getDomainsForFields as z,getPredominantCategoriesFromUVInfos as N}from"./support/utils.js";let T=class extends F{constructor(){super(...arguments),this.adapterName="feature-layer-binning-adapter"}async _getNormalizationTotalFromMemory(e,t,r){const{featuresJSON:i,graphics:s,layerView:o,query:n}=t,l={include:["sum"]},u=(!i&&!s&&o&&"queryAggregateSummaryStatistics"in o?await o.queryAggregateSummaryStatistics(n,{field:e,outStatisticTypes:l},{signal:r}):i?await this.workerClient.summaryStatistics({field:e},i):await m({attribute:{field:e,outStatisticTypes:l},features:s})).sum;if(null==u)throw new a(`${this.adapterName}:invalid`,"invalid normalizationTotal");return u}async _processStatsFromMemoryParams(e){const{features:t,filter:i}=e;if(t?.length)return this._getFilteredFeatures(t,i);const{view:s,field:o,field2:n,field3:l,normalizationField:u,valueExpression:m,returnGeometry:p,layerViewFunc:g,signal:y}=e;let d=null,c=null,h=null,w=null,F=null;if(s)try{if(d=await s.whenLayerView(this.layer),r(d),c=null!=g&&g in d&&"function"==typeof d[g],c){await this._waitForLayerViewUpdate(d);const e=await f({field:o,field2:n,field3:l,normalizationField:u,valueExpression:m});S(this,e).length?c=!1:(h="createAggregateQuery"in d?d.createAggregateQuery():null,h?(h.outFields=e,h.returnGeometry=!1,v(h,i)):c=!1),d.suspended&&(c=!1)}}catch{c=!1}if(!c&&(F=q(this.layer).map(e=>e.toJSON()),w=await this._fetchFeaturesForStats({field:o,field2:n,field3:l,valueExpression:m,normalizationField:u,returnGeometry:p,filter:i,view:s,signal:y},"json"),!w?.length))throw new a(`${this.adapterName}:insufficient-data`,"No features are available to calculate statistics");return{layerView:d,query:h,featuresJSON:w,fieldInfos:F}}async _summaryStatsFromMemory(e,t){const{view:a,field:r,valueExpression:i,normalizationType:s,signal:o}=e,l={field:r,valueExpression:i,normalizationType:s,normalizationField:e.normalizationField,normalizationTotal:e.normalizationTotal,minValue:e.minValue,maxValue:e.maxValue,outStatisticTypes:e.outStatisticTypes},{featuresJSON:u,graphics:p,layerView:g,query:y,fieldInfos:d}=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryAggregateSummaryStatistics"});return i&&a&&(u||p)&&(l.fieldType=t?.type?n.toJSON(t.type):null,l.viewInfoParams=V(a),l.timeZone=a.timeZone,l.fieldInfos=d),"percent-of-total"===s&&null==e.normalizationTotal&&(l.normalizationTotal=await this._getNormalizationTotalFromMemory(r,{featuresJSON:u,graphics:p,layerView:g,query:y},o)),!u&&!p&&g&&"queryAggregateSummaryStatistics"in g?g.queryAggregateSummaryStatistics(y,l,{signal:o}):u?this.workerClient.summaryStatistics(l,u):m({attribute:l,features:p})}async _uvFromMemory(e,t){const{view:a,field:r,valueExpression:i,returnAllCodedValues:s,signal:o}=e,{featuresJSON:n,graphics:l,layerView:u,query:m,fieldInfos:g}=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryAggregateUniqueValues"}),y={field:r,field2:e.field2,field3:e.field3,fieldDelimiter:h,valueExpression:i,domains:t,returnAllCodedValues:s};return i&&a&&(n||l)&&(y.viewInfoParams=V(a),y.timeZone=a.timeZone,y.fieldInfos=g),!n&&!l&&u&&"queryAggregateUniqueValues"in u?u.queryAggregateUniqueValues(m,y,{signal:o}):n?this.workerClient.uniqueValues(y,n):p({attribute:y,features:l})}async _histogramFromMemory(e){const{view:t,field:a,valueExpression:r,signal:i}=e,{featuresJSON:s,graphics:o,layerView:n,query:l,fieldInfos:u}=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryAggregateHistogram"}),m={field:a,valueExpression:r,normalizationType:e.normalizationType,normalizationField:e.normalizationField,normalizationTotal:e.normalizationTotal,minValue:e.minValue,maxValue:e.maxValue,standardDeviationInterval:e.standardDeviationInterval,classificationMethod:e.classificationMethod,numBins:e.numBins};return r&&t&&(s||o)&&(m.viewInfoParams=V(t),m.timeZone=t.timeZone,m.fieldInfos=u),"percent-of-total"===e.normalizationType&&null==e.normalizationTotal&&(m.normalizationTotal=await this._getNormalizationTotalFromMemory(a,{featuresJSON:s,graphics:o,layerView:n,query:l},i)),!s&&!o&&n&&"queryAggregateHistogram"in n?n.queryAggregateHistogram(l,m,{signal:i}):s?this.workerClient.histogram(m,s):g({attribute:m,features:o})}async _classBreaksFromMemory(e){const{view:t,field:a,valueExpression:r,signal:i}=e,{featuresJSON:s,graphics:o,layerView:n,query:l,fieldInfos:u}=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryAggregateClassBreaks"}),m={field:a,valueExpression:r,normalizationType:e.normalizationType,normalizationField:e.normalizationField,normalizationTotal:e.normalizationTotal,minValue:e.minValue,maxValue:e.maxValue,standardDeviationInterval:e.standardDeviationInterval,classificationMethod:e.classificationMethod,numClasses:e.numClasses};return r&&t&&(s||o)&&(m.viewInfoParams=V(t),m.timeZone=t.timeZone,m.fieldInfos=u),"percent-of-total"===e.normalizationType&&null==e.normalizationTotal&&(m.normalizationTotal=await this._getNormalizationTotalFromMemory(a,{featuresJSON:s,graphics:o,layerView:n,query:l},i)),!s&&!o&&n&&"queryAggregateClassBreaks"in n?n.queryAggregateClassBreaks(l,m,{signal:i}):s?this.workerClient.classBreaks(m,s):y({attribute:m,features:o})}getField(e=""){const t=q(this.layer);return t?.find(t=>t.name.toLowerCase()===e?.toLowerCase())}getFieldUsageInfo(e){return this.getField(e)?{supportsLabelingInfo:!0,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:!1,supportsStatistics:!0}:null}getFieldDomain(e,t){return null}async summaryStatistics(e){const{field:t}=e,r=t?this.getField(t):null,i=w(r)||l(r),s=e.sqlExpression&&!e.valueExpression&&!t;if(i||s)throw new a(`${this.adapterName}:not-supported`,"Date field and sqlExpression are not supported");return this._summaryStatsFromMemory(e,r)}async uniqueValues(e){const t=await z(e,this);return this._uvFromMemory(e,t)}async histogram(e){const{field:t}=e,r=t?this.getField(t):null,i=w(r)||l(r),s=e.sqlExpression&&!e.valueExpression&&!t;if(i||s)throw new a(`${this.adapterName}:not-supported`,"Date field and sqlExpression are not supported");return this._histogramFromMemory(e)}async classBreaks(e){return(!1!==e.analyzeData?this._classBreaksFromMemory(e):this._classBreaksFromInterpolation(e)).catch(()=>(i(e.signal),this._classBreaksFromMemory(e)))}async queryFeatureCount(e){const t=await(e.view?.whenLayerView(this.layer));if(!t||!("queryAggregateCount"in t)||!t.queryAggregateCount)throw new a(`${this.adapterName}:not-supported`,"LayerView is not supported.");await this._waitForLayerViewUpdate(t);const r=t.createAggregateQuery();return r.where=d(r.where,e.whereClause),v(r,e.filter),t.queryAggregateCount(r,{signal:e.signal})}generateRenderer(e,t){throw new a(`${this.adapterName}:not-supported`,"'generateRenderer' is not supported.")}heatmapStatistics(e){throw new a(`${this.adapterName}:not-supported`,"'heatmapStatistics' is not supported.")}async predominantCategories(e){const{fields:t,view:a,signal:r}=e,i=u(t),s=await this._uvFromMemory({valueExpression:i,view:a,signal:r});return N(s.uniqueValueInfos,t)}async getSampleFeatures(e,r){const{view:i,sampleSize:s,requiredFields:o,returnGeometry:n,filter:l,signal:u}=e;if(!i)throw new a(`${this.adapterName}:not-supported`,"'view' is required to get sample features for binning.");if("3d"===i.type)throw new a(`${this.adapterName}:not-supported`,"3d 'view' is not supported to get sample features for binning.");const m=await i.whenLayerView(this.layer);if(!("queryAggregateJSON"in m&&m.queryAggregateJSON&&"queryAggregates"in m&&m.queryAggregates))throw new a(`${this.adapterName}:not-supported`,"LayerView is not supported.");await this._waitForLayerViewUpdate(m);if(S(this,o).length)throw new a(`${this.adapterName}:insufficient-data`,"Layer does not have required fields");const p=1,g="json"===r,y=m.createAggregateQuery();y.outSpatialReference=i?.spatialReference,y.returnGeometry=!!n,y.outFields=o,v(y,l);const{features:d}=g?await m.queryAggregateJSON(y,{signal:u}):await m.queryAggregates(y,{signal:u});return d.length&&null!=s&&s>0&&s<=d.length?t(d,s,p):d}load(e){const t=this.layer.load(e).then(async t=>{this.geometryType="polygon",this.objectIdField=null,this.supportsSQLExpression=!1,this._hasLocalSource=!1,this.hasQueryEngine=!0,this.minScale=t.minScale,this.maxScale=t.maxScale,this.fullExtent=t.fullExtent;const r="featureReduction"in t?t.featureReduction:null;if("binning"!==r?.type&&"cluster"!==r?.type)throw new a(`${this.adapterName}:invalid-parameters`,`Feature reduction type ${r?.type} is not supported`);this.workerClient=c.getInstance(),await this.workerClient.open(e.signal)});return this.addResolvingPromise(t),Promise.resolve(this)}};e([s({readOnly:!0})],T.prototype,"adapterName",void 0),T=e([o("esri.smartMapping.support.adapters.FeatureLayerBinningAdapter")],T);const x=T;export{x as default};
|
|
5
|
+
import{__decorate as e}from"tslib";import{pickRandom as t}from"../../../core/arrayUtils.js";import a from"../../../core/Error.js";import{assertIsSome as r}from"../../../core/maybe.js";import{throwIfAborted as i}from"../../../core/promiseUtils.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{kebabDict as n}from"../../../layers/support/fieldType.js";import{isTimeOnlyField as l}from"../../../layers/support/fieldUtils.js";import{getArcadeForPredominantCategory as u}from"../../statistics/support/predominanceUtils.js";import{summaryStatistics as m,uniqueValues as p,histogram as y,classBreaks as g}from"../../statistics/support/statsWorker.js";import{mergeWhereClauses as d}from"../../statistics/support/utils.js";import{WorkerClient as c}from"../../statistics/support/WorkerClient.js";import{getFieldsList as f,fieldDelimiter as h,isAnyDateField as w}from"../utils.js";import F from"./FeatureLayerAdapter.js";import{getMissingFieldsForBinning as S,updateQueryWithFeatureFilter as v,getFeatureReductionFields as q,getViewInfoParams as V,getDomainsForFields as z,getPredominantCategoriesFromUVInfos as N}from"./support/utils.js";let T=class extends F{constructor(){super(...arguments),this.adapterName="feature-layer-binning-adapter"}async _getNormalizationTotalFromMemory(e,t,r){const{featuresJSON:i,graphics:s,layerView:o,query:n}=t,l={include:["sum"]},u=(!i&&!s&&o&&"queryAggregateSummaryStatistics"in o?await o.queryAggregateSummaryStatistics(n,{field:e,outStatisticTypes:l},{signal:r}):i?await this.workerClient.summaryStatistics({field:e},i):await m({attribute:{field:e,outStatisticTypes:l},features:s})).sum;if(null==u)throw new a(`${this.adapterName}:invalid`,"invalid normalizationTotal");return u}async _processStatsFromMemoryParams(e){const{features:t,filter:i}=e;if(t?.length)return this._getFilteredFeatures(t,i);const{view:s,field:o,field2:n,field3:l,normalizationField:u,valueExpression:m,returnGeometry:p,layerViewFunc:y,signal:g}=e;let d=null,c=null,h=null,w=null,F=null;if(s)try{if(d=await s.whenLayerView(this.layer),r(d),c=null!=y&&y in d&&"function"==typeof d[y],c){await this._waitForLayerViewUpdate(d);const e=await f({field:o,field2:n,field3:l,normalizationField:u,valueExpression:m});S(this,e).length?c=!1:(h="createAggregateQuery"in d?d.createAggregateQuery():null,h?(h.outFields=e,h.returnGeometry=!1,v(h,i)):c=!1),d.suspended&&(c=!1)}}catch{c=!1}if(!c&&(F=q(this.layer).map(e=>e.toJSON()),w=await this._fetchFeaturesForStats({field:o,field2:n,field3:l,valueExpression:m,normalizationField:u,returnGeometry:p,filter:i,view:s,signal:g},"json"),!w?.length))throw new a(`${this.adapterName}:insufficient-data`,"No features are available to calculate statistics");return{layerView:d,query:h,featuresJSON:w,fieldInfos:F}}async _summaryStatsFromMemory(e,t){const{view:a,field:r,valueExpression:i,normalizationType:s,signal:o}=e,l={field:r,valueExpression:i,normalizationType:s,normalizationField:e.normalizationField,normalizationTotal:e.normalizationTotal,minValue:e.minValue,maxValue:e.maxValue,outStatisticTypes:e.outStatisticTypes},{featuresJSON:u,graphics:p,layerView:y,query:g,fieldInfos:d}=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryAggregateSummaryStatistics"});return i&&a&&(u||p)&&(l.fieldType=t?.type?n.toJSON(t.type):null,l.viewInfoParams=V(a),l.timeZone=a.timeZone,l.fieldInfos=d),"percent-of-total"===s&&null==e.normalizationTotal&&(l.normalizationTotal=await this._getNormalizationTotalFromMemory(r,{featuresJSON:u,graphics:p,layerView:y,query:g},o)),!u&&!p&&y&&"queryAggregateSummaryStatistics"in y?y.queryAggregateSummaryStatistics(g,l,{signal:o}):u?this.workerClient.summaryStatistics(l,u):m({attribute:l,features:p})}async _uvFromMemory(e,t){const{view:a,field:r,valueExpression:i,returnAllCodedValues:s,signal:o}=e,{featuresJSON:n,graphics:l,layerView:u,query:m,fieldInfos:y}=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryAggregateUniqueValues"}),g={field:r,field2:e.field2,field3:e.field3,fieldDelimiter:h,valueExpression:i,domains:t,returnAllCodedValues:s};return i&&a&&(n||l)&&(g.viewInfoParams=V(a),g.timeZone=a.timeZone,g.fieldInfos=y),!n&&!l&&u&&"queryAggregateUniqueValues"in u?u.queryAggregateUniqueValues(m,g,{signal:o}):n?this.workerClient.uniqueValues(g,n):p({attribute:g,features:l})}async _histogramFromMemory(e){const{view:t,field:a,valueExpression:r,signal:i}=e,{featuresJSON:s,graphics:o,layerView:n,query:l,fieldInfos:u}=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryAggregateHistogram"}),m={field:a,valueExpression:r,normalizationType:e.normalizationType,normalizationField:e.normalizationField,normalizationTotal:e.normalizationTotal,minValue:e.minValue,maxValue:e.maxValue,standardDeviationInterval:e.standardDeviationInterval,classificationMethod:e.classificationMethod,numBins:e.numBins};return r&&t&&(s||o)&&(m.viewInfoParams=V(t),m.timeZone=t.timeZone,m.fieldInfos=u),"percent-of-total"===e.normalizationType&&null==e.normalizationTotal&&(m.normalizationTotal=await this._getNormalizationTotalFromMemory(a,{featuresJSON:s,graphics:o,layerView:n,query:l},i)),!s&&!o&&n&&"queryAggregateHistogram"in n?n.queryAggregateHistogram(l,m,{signal:i}):s?this.workerClient.histogram(m,s):y({attribute:m,features:o})}async _classBreaksFromMemory(e){const{view:t,field:a,valueExpression:r,signal:i}=e,{featuresJSON:s,graphics:o,layerView:n,query:l,fieldInfos:u}=await this._processStatsFromMemoryParams({...e,layerViewFunc:"queryAggregateClassBreaks"}),m={field:a,valueExpression:r,normalizationType:e.normalizationType,normalizationField:e.normalizationField,normalizationTotal:e.normalizationTotal,minValue:e.minValue,maxValue:e.maxValue,standardDeviationInterval:e.standardDeviationInterval,classificationMethod:e.classificationMethod,numClasses:e.numClasses};return r&&t&&(s||o)&&(m.viewInfoParams=V(t),m.timeZone=t.timeZone,m.fieldInfos=u),"percent-of-total"===e.normalizationType&&null==e.normalizationTotal&&(m.normalizationTotal=await this._getNormalizationTotalFromMemory(a,{featuresJSON:s,graphics:o,layerView:n,query:l},i)),!s&&!o&&n&&"queryAggregateClassBreaks"in n?n.queryAggregateClassBreaks(l,m,{signal:i}):s?this.workerClient.classBreaks(m,s):g({attribute:m,features:o})}getField(e=""){const t=q(this.layer);return t?.find(t=>t.name.toLowerCase()===e?.toLowerCase())}getFieldUsageInfo(e){return this.getField(e)?{supportsLabelingInfo:!0,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:!1,supportsStatistics:!0}:null}getFieldDomain(e,t){return null}async summaryStatistics(e){const{field:t}=e,r=t?this.getField(t):null,i=w(r)||l(r),s=e.sqlExpression&&!e.valueExpression&&!t;if(i||s)throw new a(`${this.adapterName}:not-supported`,"Date field and sqlExpression are not supported");return this._summaryStatsFromMemory(e,r)}async uniqueValues(e){const t=await z(e,this);return this._uvFromMemory(e,t)}async histogram(e){const{field:t}=e,r=t?this.getField(t):null,i=w(r)||l(r),s=e.sqlExpression&&!e.valueExpression&&!t;if(i||s)throw new a(`${this.adapterName}:not-supported`,"Date field and sqlExpression are not supported");return this._histogramFromMemory(e)}async classBreaks(e){return(!1!==e.analyzeData?this._classBreaksFromMemory(e):this._classBreaksFromInterpolation(e)).catch(()=>(i(e.signal),this._classBreaksFromMemory(e)))}async queryFeatureCount(e){const t=await(e.view?.whenLayerView(this.layer));if(!t||!("queryAggregateCount"in t)||!t.queryAggregateCount)throw new a(`${this.adapterName}:not-supported`,"LayerView is not supported.");await this._waitForLayerViewUpdate(t);const r=t.createAggregateQuery();return r.where=d(r.where,e.whereClause),v(r,e.filter),t.queryAggregateCount(r,{signal:e.signal})}generateRenderer(e,t){throw new a(`${this.adapterName}:not-supported`,"'generateRenderer' is not supported.")}heatmapStatistics(e){throw new a(`${this.adapterName}:not-supported`,"'heatmapStatistics' is not supported.")}async predominantCategories(e){const{fields:t,view:a,signal:r}=e,i=u(t),s=await this._uvFromMemory({valueExpression:i,view:a,signal:r});return N(s.uniqueValueInfos,t)}async getSampleFeatures(e,r){const{view:i,sampleSize:s,requiredFields:o,returnGeometry:n,filter:l,signal:u}=e;if(!i)throw new a(`${this.adapterName}:not-supported`,"'view' is required to get sample features for binning.");if("3d"===i.type)throw new a(`${this.adapterName}:not-supported`,"3d 'view' is not supported to get sample features for binning.");const m=await i.whenLayerView(this.layer);if(!("queryAggregateJSON"in m&&m.queryAggregateJSON&&"queryAggregates"in m&&m.queryAggregates))throw new a(`${this.adapterName}:not-supported`,"LayerView is not supported.");await this._waitForLayerViewUpdate(m);if(S(this,o).length)throw new a(`${this.adapterName}:insufficient-data`,"Layer does not have required fields");const p=1,y="json"===r,g=m.createAggregateQuery();g.outSpatialReference=i?.spatialReference,g.returnGeometry=!!n,g.outFields=o,v(g,l);const{features:d}=y?await m.queryAggregateJSON(g,{signal:u}):await m.queryAggregates(g,{signal:u});return d.length&&null!=s&&s>0&&s<=d.length?t(d,s,p):d}load(e){const t=this.layer.load(e).then(async t=>{const r="featureReduction"in t?t.featureReduction:null;if("binning"!==r?.type&&"cluster"!==r?.type)throw new a(`${this.adapterName}:invalid-parameters`,`Feature reduction type ${r?.type} is not supported`);this.geometryType="cluster"===r?.type?"point":"polygon",this.objectIdField=null,this.supportsSQLExpression=!1,this._hasLocalSource=!1,this.hasQueryEngine=!0,this.minScale=t.minScale,this.maxScale=t.maxScale,this.fullExtent=t.fullExtent,this.workerClient=c.getInstance(),await this.workerClient.open(e.signal)});return this.addResolvingPromise(t),Promise.resolve(this)}};e([s({readOnly:!0})],T.prototype,"adapterName",void 0),T=e([o("esri.smartMapping.support.adapters.FeatureLayerBinningAdapter")],T);const x=T;export{x as default};
|
package/support/revision.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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
const
|
|
5
|
+
const e="20250826",f="10c0f118e0e96375ffc983aa84d21ee9bb040fde";export{e as buildDate,f as commitHash};
|
package/support/timeUtils.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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{isSome as t}from"../core/arrayUtils.js";import{clone as e}from"../core/lang.js";import{offsetDate as n}from"../core/timeUtils.js";import
|
|
5
|
+
import{isSome as t}from"../core/arrayUtils.js";import{clone as e}from"../core/lang.js";import{offsetDate as n}from"../core/timeUtils.js";import i from"../time/TimeExtent.js";import{isWebMap as r}from"../webmap/utils.js";import{isWebScene as l}from"../webscene/utils.js";function s(t){return void 0!==t.timeInfo}async function u(t,e){return t.widgets?.timeSlider?.fullTimeExtent??a(t.allLayers,e)}function o(t){const e=t.numThumbs??2,n=t.currentTimeExtent;if(n){const{start:t,end:i}=n;return null!=t&&null!=i&&t.getTime()===i.getTime()?"instant":2===e?"time-window":null==t||0===t.getTime()?"cumulative-from-start":"cumulative-from-end"}return 2===e?"time-window":"cumulative-from-start"}function m(t){const{numStops:n,stopInterval:i,stops:r}=t;return r?{dates:e(r)}:i?{interval:i.clone()}:{count:n??5}}async function a(e,n){if(0===e.length)return i.allTime;await Promise.all(e.map(t=>t.load({signal:n})));const r=e.filter(s),l=e.filter(t=>!s(t)&&null!=t.visibilityTimeExtent);if(0===r.length&&0===l.length)return i.allTime;const u=[],o=[];for(const t of r)"feature"!==t?.type&&"map-image"!==t?.type||!t.timeInfo?.hasLiveData?o.push(t):u.push(t);const m=t=>null==t||t.isAllTime,a=[...o.map(t=>{const e=t.timeInfo?.fullTimeExtent,{visibilityTimeExtent:n}=t;return e?.intersection(n)??n}),...l.map(t=>t.visibilityTimeExtent)];if(a.some(m))return i.allTime;const f=u.map(async t=>{const e=(await t.fetchRecomputedExtents({signal:n}))?.timeExtent??t.timeInfo?.fullTimeExtent,{visibilityTimeExtent:i}=t;return e?.intersection(i)??i}),c=(await Promise.allSettled(f)).map(t=>"fulfilled"===t.status?t.value:null);if(c.some(m))return i.allTime;const d=[...c,...a].filter(t);if(0===d.length)return i.allTime;return d.reduce((t,e)=>t.union(e))}function f(t,e){const n=t.currentTimeExtent;if(!n)return null;const{start:r,end:l}=n,s=r??l??null;switch(e){case"time-window":return new i({start:r,end:l});case"cumulative-from-start":return new i({start:null,end:s});case"cumulative-from-end":return new i({start:s,end:null});case"instant":return new i({start:s,end:s})}}async function c(t,e){if(!r(t)&&!l(t))return null;await t.load({signal:e});const n=t?.widgets?.timeSlider;if(!n)return null;const i=await u(t,e),s=n.loop,a=o(n);return{fullTimeExtent:i,loop:s,mode:a,playRate:n.stopDelay??2e3,stops:m(n),timeExtent:f(n,a)}}function d(t){if(!t)return t;const{start:e,end:r}=t;return new i({start:null!=e?n(e,-e.getTimezoneOffset(),"minutes"):e,end:null!=r?n(r,-r.getTimezoneOffset(),"minutes"):r})}function p(t){if(!t)return t;const{start:e,end:r}=t;return new i({start:null!=e?n(e,e.getTimezoneOffset(),"minutes"):e,end:null!=r?n(r,r.getTimezoneOffset(),"minutes"):r})}export{a as getTimeExtentFromLayers,c as getTimeSliderSettingsFromWebDocument,p as toLocalTimeExtent,d as toUTCTimeExtent};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{pt2px as e,px2pt as t}from"../../core/screenUtils.js";import{CIMSymbolHelper as i}from"../cim/CIMSymbolHelper.js";import{CIMSymbolRasterizer as o}from"../cim/CIMSymbolRasterizer.js";import{OverrideHelper as l}from"../cim/OverrideHelper.js";import{mapCIMSymbolToGeometryType as
|
|
5
|
+
import{pt2px as e,px2pt as t}from"../../core/screenUtils.js";import{CIMSymbolHelper as i}from"../cim/CIMSymbolHelper.js";import{CIMSymbolRasterizer as o}from"../cim/CIMSymbolRasterizer.js";import{OverrideHelper as l}from"../cim/OverrideHelper.js";import{mapCIMSymbolToGeometryType as r}from"../cim/utils.js";import{renderSymbol as n}from"./renderUtils.js";const a=new o(null),s=t(22),m=t(120),h=t(50),c=1;async function y(e,t,i){const o=t?.size;let l=null!=o&&"object"==typeof o&&"width"in o?o.width:o,r=null!=o&&"object"==typeof o&&"height"in o?o.height:o;if(!l||!r)if("esriGeometryPolygon"===i)l=r=t.maxSize?Math.min(t.maxSize,s):s;else{const o=await g(e,t,i);o&&(l=o.width,r=o.height),"esriGeometryPolyline"===i&&(l=t.maxSize?Math.min(t.maxSize,h):h),l=null!=l&&isFinite(l)?Math.min(l,m):s,r=null!=r&&isFinite(r)?Math.max(Math.min(r,m),c):s}return"legend"===t.style&&"esriGeometryPolyline"===i&&(l=h),{width:l,height:r}}async function g(e,t={},o){const n=t.cimOptions||t;o??=n.geometryType||r(e?.data?.symbol);const{feature:s,fieldMap:m,viewParams:h}=n,c=await l.resolveSymbolOverrides(e.data,s,null,m,o,null,h);if(!c)return null;(e=e.clone()).data={type:"CIMSymbolReference",symbol:c},e.data.primitiveOverrides=void 0;const y=[];return i.fetchResources(c,a.resourceManager,y),i.fetchFonts(c,a.resourceManager,y),y.length>0&&await Promise.all(y),i.getEnvelope(c,null,a.resourceManager)}async function u(i,o={}){const{node:l,opacity:s,symbolConfig:m}=o,h=null!=m&&"object"==typeof m&&"isSquareFill"in m&&m.isSquareFill,c=o.cimOptions||o,g=c.geometryType||r(i?.data?.symbol),u=await y(i,o,g),{feature:d,fieldMap:f}=c,p=o?.geometry||h||"esriGeometryPolygon"!==g?"preview":"legend";let w=u;const b=u;if(o?.geometry&&("esriGeometryPolygon"===g||"esriGeometryPolyline"===g)){const i=200;if(e(u.width)<i||e(u.height)<i){const e=u.width>u.height?t(i)*u.height/u.width:t(i);w={width:u.width>u.height?t(i):t(i)*u.width/u.height,height:e}}}const M=await a.rasterizeCIMSymbolAsync(i,d,w,p,f,g,null,c.viewParams,c.allowScalingUp,o?.geometry?.toJSON());if(!M)return null;const{width:S,height:v}=M,j=document.createElement("canvas");j.width=S,j.height=v;j.getContext("2d").putImageData(M,0,0);const P=e(b.width),x=e(b.height),z=new Image(P,x);z.src=j.toDataURL(),z.ariaLabel=o.ariaLabel??null,z.alt=o.ariaLabel??"",null!=s&&(z.style.opacity=`${s}`);let C=z;if(o.cssEffectFilter){const e={shape:{type:"image",x:0,y:0,width:P,height:x,src:z.src},fill:null,stroke:null,offset:[0,0]};C=n([[e]],[P,x],o)}return l&&C&&l.appendChild(C),C}export{g as getCIMSymbolPreviewSize,u as previewCIMSymbol};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../../Color.js";import{getColorLuminance as e}from"../../core/colorUtils.js";import o from"../../core/Error.js";import{loadFont as i}from"../../core/fontUtils.js";import{pt2px as n}from"../../core/screenUtils.js";import{quantizePolygon as
|
|
5
|
+
import t from"../../Color.js";import{getColorLuminance as e}from"../../core/colorUtils.js";import o from"../../core/Error.js";import{loadFont as i}from"../../core/fontUtils.js";import{pt2px as n}from"../../core/screenUtils.js";import{quantizePolygon as l,quantizePolyline as a}from"../../geometry/support/quantizationUtils.js";import{getFill as s,getStroke as r,getDashArray as h,getPatternUrlWithColor as c}from"./gfxUtils.js";import{shapes as m,adjustColorBrightness as p}from"./previewUtils.js";import{renderSymbol as u}from"./renderUtils.js";import{backgroundPadding as d}from"./textUtils.js";const f="picture-fill",g="picture-marker",y="simple-fill",w="simple-line",x="simple-marker",b="text",v="Aa",M=22,S=120,k=80,z=50,L=225,C=document.createElement("canvas");function $(t,e,o){if("polygon"===t.type){const i=t.extent,n=0===i.width?1:i.width,a=0===i.height?1:i.height;t=l({originPosition:"upperLeft",scale:[n/e,a/o],translate:[i.xmin,i.ymax]},{},t);let s="";for(let e=0;e<t.rings.length;e++){const o=t.rings[e];for(let t=0;t<o.length;t++){const e=o[t][0],i=o[t][1];let n="";0===t?(n=`M${e.toString()} ${i.toString()}`,""!==s&&(n=` ${n}`),s+=n):t===o.length-1?(n=`l${e.toString()} ${i.toString()} Z`,""!==s&&(n=` ${n}`),s+=n):(n=`l${e.toString()} ${i.toString()}`,""!==s&&(n=` ${n}`),s+=n)}}return s}if("polyline"===t.type){const i=t.extent,n=0===i.width?1:i.width,l=0===i.height?1:i.height;t=a({originPosition:"upperLeft",scale:[n/e,l/o],translate:[i.xmin,i.ymax]},{},t);let s="";for(let e=0;e<t.paths.length;e++){const o=t.paths[e];for(let t=0;t<o.length;t++){const e=o[t][0],i=o[t][1];let n="";0===t?(n=`M${e.toString()} ${i.toString()}`,""!==s&&(n=` ${n}`),s+=n):(n=`l${e.toString()} ${i.toString()}`,""!==s&&(n=` ${n}`),s+=n)}}return s}return""}function j(t,e){const o=C.getContext("2d"),i=[];e&&(e.weight&&i.push(e.weight),e.size&&i.push(e.size+"px"),e.family&&i.push(e.family)),o.font=i.join(" ");const{width:n,actualBoundingBoxLeft:l,actualBoundingBoxRight:a,actualBoundingBoxAscent:s,actualBoundingBoxDescent:r}=o.measureText(t);return{width:Math.ceil(Math.max(n,l+a)),height:Math.ceil(s+r),x:Math.floor(l),y:Math.floor((s-r)/2)}}function B(t){const e=t?.size;return{width:null!=e&&"object"==typeof e&&"width"in e?n(e.width):null,height:null!=e&&"object"==typeof e&&"height"in e?n(e.height):null}}async function E(t,e){const o=e.fill,i=t.color;if("pattern"===o?.type&&i&&t.type!==f){const t=await c(o.src,i.toCss(!0));o.src=t,e.fill=o}}async function P(t,e,o,n){if(!("font"in t)||!t.font||"text"!==e.shape.type)return;try{await i(t.font)}catch{}const{width:l,height:a}=B(n);if(!/[\uE600-\uE6FF]/.test(e.shape.text)){const{width:i,height:s,x:r,y:h}=j(e.shape.text,{weight:e.font?.weight,size:e.font?.size,family:e.font?.family});o[0]=l??i,o[1]=a??s,e.shape.x=r,e.shape.y=h;let c="angle"in t?t.angle:null;if(null!=n?.rotation&&(c=(c??0)+n.rotation),c){const t=c*(Math.PI/180),e=Math.abs(Math.sin(t)),i=Math.abs(Math.cos(t));o[1]=o[0]*e+o[1]*i}}}function U(t,e,o,i,l){if(null!=t.haloColor&&null!=t.haloSize){l.masking??=o.map(()=>[]);const a=n(t.haloSize);i[0]+=a,i[1]+=a,o.unshift([{...e,fill:null,stroke:{color:t.haloColor,width:2*a,join:"round",cap:"round"}}]),l.masking.unshift([{shape:{type:"rect",x:0,y:0,width:i[0]+2*d,height:i[1]+2*d},fill:[255,255,255],stroke:null},{...e,fill:[0,0,0,0],stroke:null}])}null==t.backgroundColor&&null==t.borderLineColor||(i[0]+=2*d,i[1]+=2*d,o.unshift([{shape:{type:"rect",x:0,y:0,width:i[0],height:i[1]},fill:t.backgroundColor,stroke:{color:t.borderLineColor,width:n(t.borderLineSize)}}]),l.masking?.unshift([]))}function F(t,e){return t>e?"dark":"light"}function A(t,e){const o="number"==typeof e?.size?e?.size:null,i=null!=o?n(o):null,l=null!=e?.maxSize?n(e.maxSize):null;let a="angle"in t?t.angle:null;null!=e?.rotation&&(a=(a??0)+e.rotation);const c=s(t);let p=r(t);"dark"!==D(t,245)||e?.ignoreWhiteSymbols||(p={width:.75,...p,color:"#bdc3c7"});let u=null;const d={shape:null,fill:c,stroke:p,offset:[0,0]};p?.width&&(p.width=Math.min(p.width,k));const L=p?.width||0;let C=null!=e?.size&&(null==e?.scale||e?.scale),E=0,P=0,U=!1;switch(t.type){case x:{const o=t.style,{width:s,height:r}=B(e);let h=s===r&&null!=s?s:null!=i?i:Math.min(n(t.size),l||S);if(!0===e?.useMarkerSymbolSize&&null!==s&&null!==r){const e=Math.min(n(t.size),l||S);h=e>s&&e>r?Math.min(s,r):e}switch(E=h,P=h,o){case"circle":d.shape={type:"circle",cx:0,cy:0,r:.5*h},C||(E+=L,P+=L);break;case"cross":d.shape={type:"path",path:[{command:"M",values:[0,.5*P]},{command:"L",values:[E,.5*P]},{command:"M",values:[.5*E,0]},{command:"L",values:[.5*E,P]}]};break;case"diamond":d.shape={type:"path",path:[{command:"M",values:[0,.5*P]},{command:"L",values:[.5*E,0]},{command:"L",values:[E,.5*P]},{command:"L",values:[.5*E,P]},{command:"Z",values:[]}]},C||(E+=L,P+=L);break;case"square":d.shape={type:"path",path:[{command:"M",values:[0,0]},{command:"L",values:[E,0]},{command:"L",values:[E,P]},{command:"L",values:[0,P]},{command:"Z",values:[]}]},C||(E+=L,P+=L),a&&(U=!0);break;case"triangle":d.shape={type:"path",path:[{command:"M",values:[.5*E,0]},{command:"L",values:[E,P]},{command:"L",values:[0,P]},{command:"Z",values:[]}]},C||(E+=L,P+=L),a&&(U=!0);break;case"x":d.shape={type:"path",path:[{command:"M",values:[0,0]},{command:"L",values:[E,P]},{command:"M",values:[E,0]},{command:"L",values:[0,P]}]},a&&(U=!0);break;case"path":d.shape={type:"path",path:t.path||""},C||(E+=L,P+=L),a&&(U=!0),C=!0}break}case w:{const{width:t,height:o}=B(e),n=h(p).reduce((t,e)=>t+e,0),l=n&&Math.ceil(z/n),a=o??i??L,s=t??(n*l||z);if(C=!0,"polyline"===e?.geometry?.type&&e?.geometry?.extent){E=s,P=o??E;const t=1e3,i=.15*t;u=[E,P],P=u[0]>u[1]?t*u[1]/u[0]:t,E=u[0]>u[1]?t:t*u[0]/u[1],p?.width&&(p.width=p.width*t/(u[1]>u[0]?u[1]:u[0]),p.width>i&&(p.width=i)),d.shape={type:"path",path:$(e.geometry,E,P)}}else E=null!=e?.maxSize?Math.min(s,e.maxSize):s,P=a,p&&(p.width=a),d.shape={type:"path",path:[{command:"M",values:[a/2,P/2]},{command:"L",values:[E-a/2,P/2]}]};break}case f:case y:{const t="object"==typeof e?.symbolConfig&&!!e?.symbolConfig?.isSquareFill,{width:o,height:n}=B(e);E=!t&&o!==n||null==o?null!=i?i:M:o,P=!t&&o!==n||null==n?E:n,C||(E+=L,P+=L),C=!0,e?.geometry?.extent&&"polygon"===e?.geometry?.type?(u=[E,P],P=u[0]>u[1]?1e3*u[1]/u[0]:1e3,E=u[0]>u[1]?1e3:1e3*u[0]/u[1],d.shape={type:"path",path:$(e.geometry,E,P)}):d.shape=t?{type:"path",path:[{command:"M",values:[0,0]},{command:"L",values:[E,0]},{command:"L",values:[E,P]},{command:"L",values:[0,P]},{command:"L",values:[0,0]},{command:"Z",values:[]}]}:m.fill[0];break}case g:{const o=Math.min(n(t.width),l||S),s=Math.min(n(t.height),l||S),{width:r,height:h}=B(e),c=r===h&&null!=r?r:null!=i?i:Math.max(o,s),m=t.width/t.height;E=m<=1?Math.ceil(c*m):c,P=m<=1?c:Math.ceil(c/m),d.shape={type:"image",x:-Math.round(E/2),y:-Math.round(P/2),width:E,height:P,src:t.url||""},a&&(U=!0);break}case b:{const o=t,a=e?.overrideText||o.text||v,s=o.font,{width:r,height:h}=B(e),c=null!=h?h:null!=i?i:Math.min(n(s.size),l||S),{width:m,height:p}=j(a,{weight:s.weight,size:c,family:s.family}),u=/[\uE600-\uE6FF]/.test(a);E=r??(u?c:m),P=u?c:p;let f=.5*(u?c:p);u&&(f+=5),d.shape={type:"text",text:a,x:o.xoffset||0,y:o.yoffset||f,align:"middle",alignBaseline:o.verticalAlignment,decoration:s&&s.decoration,rotated:o.rotated,kerning:o.kerning},d.font=s&&{size:c,style:s.style,decoration:s.decoration,weight:s.weight,family:s.family};break}}return{shapeDescriptor:d,size:[E,P],outputSize:u,renderOptions:{node:e?.node,scale:C,opacity:e?.opacity,rotations:[a],useRotationSize:U,cssEffectFilter:e?.cssEffectFilter,ariaLabel:e?.ariaLabel,clipBloomEffect:e?.clipBloomEffect}}}async function Z(t,e){const{shapeDescriptor:i,size:n,renderOptions:l,outputSize:a}=A(t,e);if(!i.shape)throw new o("symbolPreview: renderPreviewHTML2D","symbol not supported.");await E(t,i),await P(t,i,n,e);const s=[[i]];if("object"==typeof e?.symbolConfig&&e?.symbolConfig?.applyColorModulation){const t=.6*n[0];s.unshift([{...i,offset:[-t,0],fill:p(i.fill,-.3)}]),s.push([{...i,offset:[t,0],fill:p(i.fill,.3)}]),n[0]+=2*t,l.scale=!1}"text"===t.type&&U(t,i,s,n,l);const r=u(s,n,l);if(a&&r){const t="img"===r.nodeName.toLowerCase()?r:r.firstChild;"svg"===t.nodeName.toLowerCase()&&t.setAttribute("viewBox",`0 0 ${n[0].toString()} ${n[1].toString()}`),t.setAttribute("width",a[0].toString()),t.setAttribute("height",a[1].toString()),a.length>2&&(t.style.setProperty("padding-left",a[2]?.toString()+"px"),t.style.setProperty("padding-right",a[2]?.toString()+"px"),t.style.setProperty("padding-top",a[3]?.toString()+"px"),t.style.setProperty("padding-bottom",a[3]?.toString()+"px"),t.style.setProperty("box-sizing","border-box"))}return r}function D(o,i=L){const n=s(o),l=r(o),a=!n||"type"in n?null:new t(n),h=l?.color?new t(l?.color):null,c=a?F(e(a),i):null,m=h?F(e(h),i):null;return m?c?c===m?c:i>=L?"light":"dark":m:c}export{D as getContrastingBackgroundTheme,A as getRenderSymbolParameters,Z as previewSymbol2D};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{id as t}from"../../kernel.js";import e from"../../request.js";import{toHSV as i,toRGB as r}from"../../core/colorUtils.js";import n from"../../core/Error.js";import has from"../../core/has.js";import"../../libs/maquette/projection.js";import{createProjector as o}from"../../libs/maquette/projector.js";import{renderSVG as a}from"./svgUtils.js";
|
|
5
|
+
import{id as t}from"../../kernel.js";import e from"../../request.js";import{toHSV as i,toRGB as r}from"../../core/colorUtils.js";import n from"../../core/Error.js";import has from"../../core/has.js";import"../../libs/maquette/projection.js";import{createProjector as o}from"../../libs/maquette/projector.js";import{renderSVG as a}from"./svgUtils.js";const c=o();function s(t,e){c.append(t,e),c.detach(e)}function l(t,e,i){const r=Math.ceil(e[0]),n=Math.ceil(e[1]);if(!t.some(t=>!!t.length))return null;const o=i?.node||document.createElement("div");null!=i.opacity&&(o.style.opacity=i.opacity.toString()),null!=i.cssEffectFilter&&(o.style.filter=i.cssEffectFilter);return s(o,()=>a(t,r,n,i)),o}function h(t,e){t=Math.ceil(t),e=Math.ceil(e);const i=document.createElement("canvas");i.width=t,i.height=e,i.style.width=t+"px",i.style.height=e+"px";const r=i.getContext("2d");return r.clearRect(0,0,t,e),r}function m(t,i,r){return t?e(t,{responseType:"image"}).then(t=>{const e=t.data,n=e.width,o=e.height,a=n/o;let c=i;if(r){const t=Math.max(n,o);c=Math.min(c,t)}return{image:e,width:a<=1?Math.ceil(c*a):c,height:a<=1?c:Math.ceil(c/a)}}):Promise.reject(new n("renderUtils: imageDataSize","href not provided."))}function g(t,e){return!(!t||"ignore"===e)&&("multiply"!==e||255!==t.r||255!==t.g||255!==t.b||1!==t.a)}function u(t,e,n,o,a){switch(a){case"multiply":t[e]*=n[0],t[e+1]*=n[1],t[e+2]*=n[2],t[e+3]*=n[3];break;default:{const a=i({r:t[e],g:t[e+1],b:t[e+2]});a.h=o.h,a.s=o.s,a.v=a.v/100*o.v;const c=r(a);t[e]=c.r,t[e+1]=c.g,t[e+2]=c.b,t[e+3]*=n[3];break}}}function d(e,r,n,o,a){return m(e,r,a).then(a=>{const c=a.width??r,s=a.height??r;if(a.image&&g(n,o)){let t=a.image.width,r=a.image.height;has("edge")&&/\.svg$/i.test(e)&&(t-=1,r-=1);const l=h(c,s);l.drawImage(a.image,0,0,t,r,0,0,c,s);const m=l.getImageData(0,0,c,s),g=[n.r/255,n.g/255,n.b/255,n.a],d=i(n);for(let e=0;e<m.data.length;e+=4)u(m.data,e,g,d,o);l.putImageData(m,0,0),e=l.canvas.toDataURL("image/png")}else{const i=t?.findCredential(e);if(i?.token){const t=e.includes("?")?"&":"?";e=`${e}${t}token=${i.token}`}}return{url:e,width:c,height:s}}).catch(()=>({url:e,width:r,height:r}))}export{s as renderOnce,l as renderSymbol,d as tintImageWithColor};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../../Color.js";import has from"../../core/has.js";import{assertIsSome as e}from"../../core/maybe.js";import{create as i}from"../../core/libs/gl-matrix-2/factories/mat2df32.js";import{multiply as r,scale as n,identity as o,translate as a,rotate as s}from"../../core/libs/gl-matrix-2/math/mat2d.js";import{getDashArray as l}from"./gfxUtils.js";import{nextBloomId as h,nextPatternId as f,nextLinearGradientId as c}from"./svgGlobalState.js";import"../../widgets/support/widgetUtils.js";import{tsx as u}from"../../widgets/support/jsxFactory.js";const d="http://www.w3.org/2000/svg",y=has("android"),p=has("chrome")||y&&y>=4?"auto":"optimizeLegibility",g={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7,z:0},m=/([A-DF-Za-df-z])|([-+]?\d*\.?\d+(?:[eE][-+]?\d+)?)/g;let x={},w={};const k=Math.PI;function b(t,e){const i=t*(k/180);return Math.abs(e*Math.sin(i))+Math.abs(e*Math.cos(i))}function j(t){return t.map(t=>`${t.command} ${t.values.join(" ")}`).join(" ").trim()}function M(t,i,r,n,o){if(t){if("circle"===t.type)return u("circle",{cx:t.cx,cy:t.cy,fill:i,"fill-rule":"evenodd",r:t.r,stroke:r.color,"stroke-dasharray":r.dashArray,"stroke-dashoffset":r.dashOffset,"stroke-linecap":r.cap,"stroke-linejoin":r.join,"stroke-miterlimit":"4","stroke-width":r.width});if("ellipse"===t.type)return u("ellipse",{cx:t.cx,cy:t.cy,fill:i,"fill-rule":"evenodd",rx:t.rx,ry:t.ry,stroke:r.color,"stroke-dasharray":r.dashArray,"stroke-linecap":r.cap,"stroke-linejoin":r.join,"stroke-miterlimit":"4","stroke-width":r.width});if("rect"===t.type)return u("rect",{fill:i,"fill-rule":"evenodd",height:t.height,stroke:r.color,"stroke-dasharray":r.dashArray,"stroke-linecap":r.cap,"stroke-linejoin":r.join,"stroke-miterlimit":"4","stroke-width":r.width,width:t.width,x:t.x,y:t.y});if("image"===t.type)return u("image",{alt:o||"image",height:t.height,href:t.src,preserveAspectRatio:"none",width:t.width,x:t.x,y:t.y});if("path"===t.type){const e="string"!=typeof t.path?j(t.path):t.path;return u("path",{d:e,fill:i,"fill-rule":"evenodd",stroke:r.color,"stroke-dasharray":r.dashArray,"stroke-linecap":r.cap,"stroke-linejoin":r.join,"stroke-miterlimit":"4","stroke-width":r.width})}if("text"===t.type)return e(n),u("text",{"dominant-baseline":n.dominantBaseline,fill:i,"fill-rule":"evenodd","font-family":n.font.family,"font-size":n.font.size,"font-style":n.font.style,"font-variant":n.font.variant,"font-weight":n.font.weight,kerning:n.kerning,rotate:n.rotate,stroke:r.color,"stroke-dasharray":r.dashArray,"stroke-linecap":r.cap,"stroke-linejoin":r.join,"stroke-miterlimit":"4","stroke-width":r.width,"text-anchor":n.align,"text-decoration":n.decoration,"text-rendering":p,x:t.x,y:t.y},t.text)}return null}function v(e){if(!e)return{fill:"none",pattern:null,linearGradient:null};if(!("type"in e))return{fill:new t(e).toString(),pattern:null,linearGradient:null};if("pattern"===e.type){const t=`patternId-${f()}`;return{fill:`url(#${t})`,pattern:{id:t,x:e.x,y:e.y,width:e.width,height:e.height,image:{x:0,y:0,width:e.width,height:e.height,href:e.src}},linearGradient:null}}const i=`linearGradientId-${c()}`;return{fill:`url(#${i})`,pattern:null,linearGradient:{id:i,x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,stops:e.colors.map(e=>({offset:e.offset,color:e.color&&new t(e.color).toString()}))}}}function S(e){const i={color:"none",width:1,cap:"butt",join:"4",dashArray:"none",dashOffset:"0"};return e&&(null!=e.width&&(i.width=e.width),e.cap&&(i.cap=e.cap),e.join&&(i.join=e.join.toString()),e.color&&(i.color=new t(e.color).toString()),e.dashArray&&(i.dashArray=e.dashArray),e.dashoffset&&(i.dashOffset=e.dashoffset),e.style&&!e.dashArray&&(i.dashArray=l(e).join(",")||"none")),i}function $(t,i){const r={align:null,decoration:null,kerning:null,rotate:null,font:{style:null,variant:null,weight:null,size:null,family:null}};if(t){const n=t.alignBaseline,o="baseline"===n?"auto":"top"===n?"text-top":"bottom"===n?"hanging":n;r.align=t.align,r.dominantBaseline=o,r.decoration=t.decoration,r.kerning=t.kerning?"auto":"0",r.rotate=t.rotated?"90":"0",e(i),r.font.style=i.style||"normal",r.font.variant=i.variant||"normal",r.font.weight=i.weight||"normal",r.font.size=i.size&&i.size.toString()||"10pt",r.font.family=i.family||"serif"}return r}function A(t){const{pattern:e,linearGradient:i}=t;if(e)return u("pattern",{height:e.height,id:e.id,patternUnits:"userSpaceOnUse",width:e.width,x:e.x,y:e.y},u("image",{height:e.image.height,href:e.image.href,width:e.image.width,x:e.image.x,y:e.image.y}));if(i){const t=i.stops.map((t,e)=>u("stop",{key:`${e}-stop`,offset:t.offset,"stop-color":t.color}));return u("linearGradient",{gradientUnits:"userSpaceOnUse",id:i.id,x1:i.x1,x2:i.x2,y1:i.y1,y2:i.y2},t)}return null}function G(t,e){if(!t||0===t.length)return null;const i=[];for(const r of t){const{shape:t,fill:e,stroke:n,font:o}=r,a=v(e),s=S(n),l="text"===t.type?$(t,o):null,h=M(t,a.fill,s,l);h&&i.push(h)}return u("mask",{id:e,maskUnits:"userSpaceOnUse"},u("g",null,i))}function N(t,e,i){return a(t,o(t),[e,i])}function z(t,e,i,r,a){return n(t,o(t),[e,i]),t[4]=t[4]*e-r*e+r,t[5]=t[5]*i-a*i+a,t}function B(t,e,i,r){const n=e%360*Math.PI/180;s(t,o(t),n);const a=Math.cos(n),l=Math.sin(n),h=t[4],f=t[5];return t[4]=h*a-f*l+r*l-i*a+i,t[5]=f*a+h*l-i*l-r*a+r,t}function I(t,e){x&&"left"in x?(null!=x.left&&x.left>t&&(x.left=t),(null==x.right||x.right<t)&&(x.right=t),(null==x.top||x.top>e)&&(x.top=e),(null==x.bottom||x.bottom<e)&&(x.bottom=e)):x={left:t,bottom:e,right:t,top:e}}function U(t){const e=t.args,i=e.length;let r;switch(t.action){case"M":case"L":case"C":case"S":case"Q":case"T":for(r=0;r<i;r+=2)I(e[r],e[r+1]);w.x=e[i-2],w.y=e[i-1];break;case"H":for(r=0;r<i;++r)I(e[r],w.y);w.x=e[i-1];break;case"V":for(r=0;r<i;++r)I(w.x,e[r]);w.y=e[i-1];break;case"m":{let t=0;"x"in w||(I(w.x=e[0],w.y=e[1]),t=2);for(r=t;r<i;r+=2)I(w.x+=e[r],w.y+=e[r+1]);break}case"l":case"t":for(r=0;r<i;r+=2)I(w.x+=e[r],w.y+=e[r+1]);break;case"h":for(r=0;r<i;++r)I(w.x+=e[r],w.y);break;case"v":for(r=0;r<i;++r)I(w.x,w.y+=e[r]);break;case"c":for(r=0;r<i;r+=6)I(w.x+e[r],w.y+e[r+1]),I(w.x+e[r+2],w.y+e[r+3]),I(w.x+=e[r+4],w.y+=e[r+5]);break;case"s":case"q":for(r=0;r<i;r+=4)I(w.x+e[r],w.y+e[r+1]),I(w.x+=e[r+2],w.y+=e[r+3]);break;case"A":for(r=0;r<i;r+=7)I(e[r+5],e[r+6]);w.x=e[i-2],w.y=e[i-1];break;case"a":for(r=0;r<i;r+=7)I(w.x+=e[r+5],w.y+=e[r+6])}}function F(t,e,i){const r=g[t.toLowerCase()];let n;"number"==typeof r&&(r?e.length>=r&&(n={action:t,args:e.slice(0,e.length-e.length%r)},i.push(n),U(n)):(n={action:t,args:[]},i.push(n),U(n)))}function O(t){const e=("string"!=typeof t.path?j(t.path):t.path).match(m),i=[];if(x={},w={},!e)return null;let r="",n=[];const o=e.length;for(let s=0;s<o;++s){const t=e[s],o=parseFloat(t);isNaN(o)?(r&&F(r,n,i),n=[],r=t):n.push(o)}F(r,n,i);const a={x:0,y:0,width:0,height:0};return x&&"left"in x&&(a.x=x.left,a.y=x.top,a.width=x.right-x.left,a.height=x.bottom-x.top),a}function E(t){const e={x:0,y:0,width:0,height:0};if("circle"===t.type)e.x=t.cx-t.r,e.y=t.cy-t.r,e.width=2*t.r,e.height=2*t.r;else if("ellipse"===t.type)e.x=t.cx-t.rx,e.y=t.cy-t.ry,e.width=2*t.rx,e.height=2*t.ry;else if("image"===t.type||"rect"===t.type)e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height;else if("path"===t.type){const i=O(t);e.x=i.x,e.y=i.y,e.width=i.width,e.height=i.height}return e}function T(t){const e={x:0,y:0,width:0,height:0};let i=null,r=Number.NEGATIVE_INFINITY,n=Number.NEGATIVE_INFINITY;for(const o of t)i?(i.x=Math.min(i.x,o.x),i.y=Math.min(i.y,o.y),r=Math.max(r,o.x+o.width),n=Math.max(n,o.y+o.height)):(i=e,i.x=o.x,i.y=o.y,r=o.x+o.width,n=o.y+o.height);return i&&(i.width=r-i.x,i.height=n-i.y),i}function L(t,e,n,o,a,s,l,h,f){let c=(l&&s?b(s,e):e)/2,u=(l&&s?b(s,n):n)/2;if(f){const t=f[0],e=f[1];c=(l&&s?b(s,t):t)/2,u=(l&&s?b(s,e):e)/2}const d=t.width+o,y=t.height+o,p=i(),g=i();let m=!1;if(a&&0!==d&&0!==y){const t=e!==n?e/n:d/y,i=e>n?e:n;let o=1,a=1;isNaN(i)||(t>1?(o=i/d,a=i/t/y):(a=i/y,o=i*t/d)),r(g,g,z(p,o,a,c,u)),m=!0}const x=t.x+(d-o)/2,w=t.y+(y-o)/2;if(r(g,g,N(p,c-x,u-w)),!m&&(d>e||y>n)){const t=d/e>y/n,i=(t?e:n)/(t?d:y);r(g,g,z(p,i,i,x,w))}return h&&r(g,g,N(p,h[0],h[1])),s&&r(g,g,B(p,s,x,w)),`matrix(${g[0]},${g[1]},${g[2]},${g[3]},${g[4]},${g[5]})`}function R(t,e,i){const r=t?.effects.find(t=>"bloom"===t.type);if(!r)return null;const{strength:n,radius:o}=r,a=n>0?o:0,s=(n+a)*e,l=4*n+1;return u("filter",{filterUnits:"userSpaceOnUse",height:"300%",id:`bloom${i}`,width:"300%",x:"-100%",y:"-100%"},u("feMorphology",{in:"SourceGraphic",operator:"dilate",radius:(n+.5*a)*(5**(e/100)*(.4+e/100)),result:"dilate"}),u("feGaussianBlur",{in:"dilate",result:"blur",stdDeviation:s/25}),u("feGaussianBlur",{in:"blur",result:"intensityBlur",stdDeviation:s/50}),u("feComponentTransfer",{in:"SourceGraphic",result:"intensityBrightness"},u("feFuncR",{slope:l,type:"linear"}),u("feFuncG",{slope:l,type:"linear"}),u("feFuncB",{slope:l,type:"linear"})),u("feMerge",null,u("feMergeNode",{in:"intensityBlur"}),u("feMergeNode",{in:"intensityBrightness"}),u("feGaussianBlur",{stdDeviation:n/10})))}function V(t,i,r,n={}){const o=[],a=[],s=h(),l=R(n.effectView,i,s);let f=null;if(l){const t=n.effectView?.effects.find(t=>"bloom"===t.type),e=n.clipBloomEffect||!t.strength?0:(t.strength+t.radius/2)/3,o=i+i*e,a=r+r*e;f=[Math.max(o,10),Math.max(a,10)]}let c=i,y=r;if(n.useRotationSize)for(let e=0;e<t.length;e++){const t=n.rotations?.[e]??0;c=Math.max(b(t,i),c),y=Math.max(b(t,r),y)}for(let e=0;e<t.length;e++){const s=t[e],l=[],h=[];let d=0,p=0,g=0;for(const t of s){const{shape:e,fill:i,stroke:r,font:a,offset:s}=t;n.ignoreStrokeWidth||"text"===e.type||(d+=r?.width||0);const f=v(i),c=S(r),u="text"===e.type?$(e,a):null;o.push(A(f)),l.push(M(e,f.fill,c,u,n.ariaLabel)),h.push(E(e)),s&&(p+=s[0],g+=s[1])}const m=n.rotations?.[e]??0;n.useRotationSize&&(p+=(c-b(m,i))/2,g+=(y-b(m,r))/2);const x=L(T(h),i,r,d,n.scale??!1,m,n.useRotationSize??!1,[p,g],f);let w=null;if(n.masking){const t=`mask-${e}`,i=n.masking[e];o.push(G(i,t)),w=`url(#${t})`}a.push(w?u("g",{mask:w},u("g",{transform:x},l)):u("g",{transform:x},l))}l&&(e(f),c=f[0],y=f[1]);const p="display: block;";return u("svg",{"aria-label":n.ariaLabel,focusable:!1,height:y,role:"img",style:p,width:c,xmlns:d},l,u("defs",null,o),l?u("g",{filter:`url(#bloom${s})`},a):a)}export{T as computeBBox,v as generateFillAttributes,S as generateStrokeAttributes,$ as generateTextAttributes,E as getBoundingBox,L as getTransformMatrix,A as renderDef,V as renderSVG,M as renderShape};
|
|
5
|
+
import t from"../../Color.js";import has from"../../core/has.js";import{assertIsSome as e}from"../../core/maybe.js";import{pt2px as i,toPt as r}from"../../core/screenUtils.js";import{create as n}from"../../core/libs/gl-matrix-2/factories/mat2df32.js";import{multiply as o,scale as s,identity as a,translate as l,rotate as h}from"../../core/libs/gl-matrix-2/math/mat2d.js";import{getDashArray as c}from"./gfxUtils.js";import{nextBloomId as f,nextPatternId as u,nextLinearGradientId as d}from"./svgGlobalState.js";import"../../widgets/support/widgetUtils.js";import{tsx as y}from"../../widgets/support/jsxFactory.js";const p="http://www.w3.org/2000/svg",g=has("android"),m=has("chrome")||g&&g>=4?"auto":"optimizeLegibility",x={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7,z:0},w=/([A-DF-Za-df-z])|([-+]?\d*\.?\d+(?:[eE][-+]?\d+)?)/g;let k={},b={};const j=Math.PI;function M(t,e){const i=t*(j/180);return Math.abs(e*Math.sin(i))+Math.abs(e*Math.cos(i))}function v(t){return t.map(t=>`${t.command} ${t.values.join(" ")}`).join(" ").trim()}function S(t,i,r,n,o){if(t){if("circle"===t.type)return y("circle",{cx:t.cx,cy:t.cy,fill:i,"fill-rule":"evenodd",r:t.r,stroke:r.color,"stroke-dasharray":r.dashArray,"stroke-dashoffset":r.dashOffset,"stroke-linecap":r.cap,"stroke-linejoin":r.join,"stroke-miterlimit":"4","stroke-width":r.width});if("ellipse"===t.type)return y("ellipse",{cx:t.cx,cy:t.cy,fill:i,"fill-rule":"evenodd",rx:t.rx,ry:t.ry,stroke:r.color,"stroke-dasharray":r.dashArray,"stroke-linecap":r.cap,"stroke-linejoin":r.join,"stroke-miterlimit":"4","stroke-width":r.width});if("rect"===t.type)return y("rect",{fill:i,"fill-rule":"evenodd",height:t.height,stroke:r.color,"stroke-dasharray":r.dashArray,"stroke-linecap":r.cap,"stroke-linejoin":r.join,"stroke-miterlimit":"4","stroke-width":r.width,width:t.width,x:t.x,y:t.y});if("image"===t.type)return y("image",{alt:o||"image",height:t.height,href:t.src,preserveAspectRatio:"none",width:t.width,x:t.x,y:t.y});if("path"===t.type){const e="string"!=typeof t.path?v(t.path):t.path;return y("path",{d:e,fill:i,"fill-rule":"evenodd",stroke:r.color,"stroke-dasharray":r.dashArray,"stroke-linecap":r.cap,"stroke-linejoin":r.join,"stroke-miterlimit":"4","stroke-width":r.width})}if("text"===t.type)return e(n),y("text",{"dominant-baseline":n.dominantBaseline,fill:i,"fill-rule":"evenodd","font-family":n.font.family,"font-size":n.font.size,"font-style":n.font.style,"font-variant":n.font.variant,"font-weight":n.font.weight,kerning:n.kerning,rotate:n.rotate,stroke:r.color,"stroke-dasharray":r.dashArray,"stroke-linecap":r.cap,"stroke-linejoin":r.join,"stroke-miterlimit":"4","stroke-width":r.width,"text-anchor":n.align,"text-decoration":n.decoration,"text-rendering":m,x:t.x,y:t.y},t.text)}return null}function $(e){if(!e)return{fill:"none",pattern:null,linearGradient:null};if(!("type"in e))return{fill:new t(e).toString(),pattern:null,linearGradient:null};if("pattern"===e.type){const t=`patternId-${u()}`;return{fill:`url(#${t})`,pattern:{id:t,x:e.x,y:e.y,width:e.width,height:e.height,image:{x:0,y:0,width:e.width,height:e.height,href:e.src}},linearGradient:null}}const i=`linearGradientId-${d()}`;return{fill:`url(#${i})`,pattern:null,linearGradient:{id:i,x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,stops:e.colors.map(e=>({offset:e.offset,color:e.color&&new t(e.color).toString()}))}}}function A(e){const i={color:"none",width:1,cap:"butt",join:"4",dashArray:"none",dashOffset:"0"};return e&&(null!=e.width&&(i.width=e.width),e.cap&&(i.cap=e.cap),e.join&&(i.join=e.join.toString()),e.color&&(i.color=new t(e.color).toString()),e.dashArray&&(i.dashArray=e.dashArray),e.dashoffset&&(i.dashOffset=e.dashoffset),e.style&&!e.dashArray&&(i.dashArray=c(e).join(",")||"none")),i}function G(t,i){const r={align:null,decoration:null,kerning:null,rotate:null,font:{style:null,variant:null,weight:null,size:null,family:null}};if(t){const n=t.alignBaseline,o="baseline"===n?"auto":"top"===n?"text-top":"bottom"===n?"hanging":n;r.align=t.align,r.dominantBaseline=o,r.decoration=t.decoration,r.kerning=t.kerning?"auto":"0",r.rotate=t.rotated?"90":"0",e(i),r.font.style=i.style||"normal",r.font.variant=i.variant||"normal",r.font.weight=i.weight||"normal",r.font.size=i.size&&i.size.toString()||"10pt",r.font.family=i.family||"serif"}return r}function N(t){const{pattern:e,linearGradient:i}=t;if(e)return y("pattern",{height:e.height,id:e.id,patternUnits:"userSpaceOnUse",width:e.width,x:e.x,y:e.y},y("image",{height:e.image.height,href:e.image.href,width:e.image.width,x:e.image.x,y:e.image.y}));if(i){const t=i.stops.map((t,e)=>y("stop",{key:`${e}-stop`,offset:t.offset,"stop-color":t.color}));return y("linearGradient",{gradientUnits:"userSpaceOnUse",id:i.id,x1:i.x1,x2:i.x2,y1:i.y1,y2:i.y2},t)}return null}function z(t,e){if(!t||0===t.length)return null;const i=[];for(const r of t){const{shape:t,fill:e,stroke:n,font:o}=r,s=$(e),a=A(n),l="text"===t.type?G(t,o):null,h=S(t,s.fill,a,l);h&&i.push(h)}return y("mask",{id:e,maskUnits:"userSpaceOnUse"},y("g",null,i))}function B(t,e,i){return l(t,a(t),[e,i])}function I(t,e,i,r,n){return s(t,a(t),[e,i]),t[4]=t[4]*e-r*e+r,t[5]=t[5]*i-n*i+n,t}function U(t,e,i,r){const n=e%360*Math.PI/180;h(t,a(t),n);const o=Math.cos(n),s=Math.sin(n),l=t[4],c=t[5];return t[4]=l*o-c*s+r*s-i*o+i,t[5]=c*o+l*s-i*s-r*o+r,t}function F(t,e){k&&"left"in k?(null!=k.left&&k.left>t&&(k.left=t),(null==k.right||k.right<t)&&(k.right=t),(null==k.top||k.top>e)&&(k.top=e),(null==k.bottom||k.bottom<e)&&(k.bottom=e)):k={left:t,bottom:e,right:t,top:e}}function E(t){const e=t.args,i=e.length;let r;switch(t.action){case"M":case"L":case"C":case"S":case"Q":case"T":for(r=0;r<i;r+=2)F(e[r],e[r+1]);b.x=e[i-2],b.y=e[i-1];break;case"H":for(r=0;r<i;++r)F(e[r],b.y);b.x=e[i-1];break;case"V":for(r=0;r<i;++r)F(b.x,e[r]);b.y=e[i-1];break;case"m":{let t=0;"x"in b||(F(b.x=e[0],b.y=e[1]),t=2);for(r=t;r<i;r+=2)F(b.x+=e[r],b.y+=e[r+1]);break}case"l":case"t":for(r=0;r<i;r+=2)F(b.x+=e[r],b.y+=e[r+1]);break;case"h":for(r=0;r<i;++r)F(b.x+=e[r],b.y);break;case"v":for(r=0;r<i;++r)F(b.x,b.y+=e[r]);break;case"c":for(r=0;r<i;r+=6)F(b.x+e[r],b.y+e[r+1]),F(b.x+e[r+2],b.y+e[r+3]),F(b.x+=e[r+4],b.y+=e[r+5]);break;case"s":case"q":for(r=0;r<i;r+=4)F(b.x+e[r],b.y+e[r+1]),F(b.x+=e[r+2],b.y+=e[r+3]);break;case"A":for(r=0;r<i;r+=7)F(e[r+5],e[r+6]);b.x=e[i-2],b.y=e[i-1];break;case"a":for(r=0;r<i;r+=7)F(b.x+=e[r+5],b.y+=e[r+6])}}function O(t,e,i){const r=x[t.toLowerCase()];let n;"number"==typeof r&&(r?e.length>=r&&(n={action:t,args:e.slice(0,e.length-e.length%r)},i.push(n),E(n)):(n={action:t,args:[]},i.push(n),E(n)))}function T(t){const e=("string"!=typeof t.path?v(t.path):t.path).match(w),i=[];if(k={},b={},!e)return null;let r="",n=[];const o=e.length;for(let a=0;a<o;++a){const t=e[a],o=parseFloat(t);isNaN(o)?(r&&O(r,n,i),n=[],r=t):n.push(o)}O(r,n,i);const s={x:0,y:0,width:0,height:0};return k&&"left"in k&&(s.x=k.left,s.y=k.top,s.width=k.right-k.left,s.height=k.bottom-k.top),s}function L(t){const e={x:0,y:0,width:0,height:0};if("circle"===t.type)e.x=t.cx-t.r,e.y=t.cy-t.r,e.width=2*t.r,e.height=2*t.r;else if("ellipse"===t.type)e.x=t.cx-t.rx,e.y=t.cy-t.ry,e.width=2*t.rx,e.height=2*t.ry;else if("image"===t.type||"rect"===t.type)e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height;else if("path"===t.type){const i=T(t);e.x=i.x,e.y=i.y,e.width=i.width,e.height=i.height}return e}function R(t){const e={x:0,y:0,width:0,height:0};let i=null,r=Number.NEGATIVE_INFINITY,n=Number.NEGATIVE_INFINITY;for(const o of t)i?(i.x=Math.min(i.x,o.x),i.y=Math.min(i.y,o.y),r=Math.max(r,o.x+o.width),n=Math.max(n,o.y+o.height)):(i=e,i.x=o.x,i.y=o.y,r=o.x+o.width,n=o.y+o.height);return i&&(i.width=r-i.x,i.height=n-i.y),i}function C(t,e,i,r,s,a,l,h,c){let f=(l&&a?M(a,e):e)/2,u=(l&&a?M(a,i):i)/2;if(c){const t=c[0],e=c[1];f=(l&&a?M(a,t):t)/2,u=(l&&a?M(a,e):e)/2}const d=t.width+r,y=t.height+r,p=n(),g=n();let m=!1;if(s&&0!==d&&0!==y){const t=e!==i?e/i:d/y,r=e>i?e:i;let n=1,s=1;isNaN(r)||(t>1?(n=r/d,s=r/t/y):(s=r/y,n=r*t/d)),o(g,g,I(p,n,s,f,u)),m=!0}const x=t.x+(d-r)/2,w=t.y+(y-r)/2;if(o(g,g,B(p,f-x,u-w)),!m&&(d>e||y>i)){const t=d/e>y/i,r=(t?e:i)/(t?d:y);o(g,g,I(p,r,r,x,w))}return h&&o(g,g,B(p,h[0],h[1])),a&&o(g,g,U(p,a,x,w)),`matrix(${g[0]},${g[1]},${g[2]},${g[3]},${g[4]},${g[5]})`}function D(t){const e=t?.match(/bloom\(\s*([^\s]+)\s+([^\s]+)\s+([^\s]+)\s*\)/i);if(!e)return null;const[,n,o,s]=e;return{strength:Number(n),radius:i(r(o)),threshold:Number(s)}}function V(t,e,i){const r=D(t);if(!r)return null;const{strength:n,radius:o}=r,s=n>0?o:0,a=(n+s)*e,l=4*n+1;return y("filter",{filterUnits:"userSpaceOnUse",height:"300%",id:`bloom${i}`,width:"300%",x:"-100%",y:"-100%"},y("feMorphology",{in:"SourceGraphic",operator:"dilate",radius:(n+.5*s)*(5**(e/100)*(.4+e/100)),result:"dilate"}),y("feGaussianBlur",{in:"dilate",result:"blur",stdDeviation:a/25}),y("feGaussianBlur",{in:"blur",result:"intensityBlur",stdDeviation:a/50}),y("feComponentTransfer",{in:"SourceGraphic",result:"intensityBrightness"},y("feFuncR",{slope:l,type:"linear"}),y("feFuncG",{slope:l,type:"linear"}),y("feFuncB",{slope:l,type:"linear"})),y("feMerge",null,y("feMergeNode",{in:"intensityBlur"}),y("feMergeNode",{in:"intensityBrightness"}),y("feGaussianBlur",{stdDeviation:n/10})))}function q(t,i,r,n={}){const o=[],s=[],a=f(),l=V(n.cssEffectFilter,i,a);let h=null;if(l){const t=D(n.cssEffectFilter),e=n.clipBloomEffect||!t?.strength?0:(t.strength+t.radius/2)/3,o=i+i*e,s=r+r*e;h=[Math.max(o,10),Math.max(s,10)]}let c=i,u=r;if(n.useRotationSize)for(let e=0;e<t.length;e++){const t=n.rotations?.[e]??0;c=Math.max(M(t,i),c),u=Math.max(M(t,r),u)}for(let e=0;e<t.length;e++){const a=t[e],l=[],f=[];let d=0,p=0,g=0;for(const t of a){const{shape:e,fill:i,stroke:r,font:s,offset:a}=t;n.ignoreStrokeWidth||"text"===e.type||(d+=r?.width||0);const h=$(i),c=A(r),u="text"===e.type?G(e,s):null;o.push(N(h)),l.push(S(e,h.fill,c,u,n.ariaLabel)),f.push(L(e)),a&&(p+=a[0],g+=a[1])}const m=n.rotations?.[e]??0;n.useRotationSize&&(p+=(c-M(m,i))/2,g+=(u-M(m,r))/2);const x=C(R(f),i,r,d,n.scale??!1,m,n.useRotationSize??!1,[p,g],h);let w=null;if(n.masking){const t=`mask-${e}`,i=n.masking[e];o.push(z(i,t)),w=`url(#${t})`}s.push(w?y("g",{mask:w},y("g",{transform:x},l)):y("g",{transform:x},l))}l&&(e(h),c=h[0],u=h[1]);const d="display: block;";return y("svg",{"aria-label":n.ariaLabel,focusable:!1,height:u,role:"img",style:d,width:c,xmlns:p},l,y("defs",null,o),l?y("g",{filter:`url(#bloom${a})`},s):s)}export{R as computeBBox,$ as generateFillAttributes,A as generateStrokeAttributes,G as generateTextAttributes,L as getBoundingBox,C as getTransformMatrix,N as renderDef,q as renderSVG,S as renderShape};
|