@arcgis/core 4.32.0-next.20250129 → 4.32.0-next.20250130
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/applications/Components/SelectionOperation.d.ts +1 -2
- package/applications/Components/SketchTooltipControls.d.ts +1 -2
- package/applications/Components/basemapUtils.d.ts +1 -2
- package/applications/Components/drawUtils.d.ts +1 -2
- package/applications/Components/fontUtils.d.ts +1 -2
- package/applications/Components/getDefaultUnits.d.ts +1 -2
- package/applications/Components/gfxUtils.d.ts +1 -2
- package/applications/Components/layerOriginUtils.d.ts +4 -2
- package/applications/Components/layersEffectsJsonUtils.d.ts +1 -2
- package/applications/Components/previewSymbol2D.d.ts +1 -2
- package/applications/Components/reactiveUtils.d.ts +1 -2
- package/applications/Components/styleUtils.d.ts +1 -2
- package/applications/Components/svgUtils.d.ts +3 -2
- package/applications/Components/webStyleSymbolUtils.d.ts +1 -2
- package/applications/Excalibur/videoViewUtils.d.ts +1 -2
- package/applications/ExperienceBuilder/sketchUtils.d.ts +3 -2
- package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +2 -2
- package/applications/KnowledgeStudio/layerInternalAccessUtils.d.ts +3 -2
- package/applications/KnowledgeStudio/resourceSerializationUtils.d.ts +4 -2
- package/applications/MapViewer/mediaUtils.d.ts +2 -2
- package/applications/MapViewer/templateUtils.d.ts +4 -2
- package/applications/SceneViewer/colorUtils.d.ts +1 -2
- package/applications/SceneViewer/devEnvironmentUtils.d.ts +3 -2
- package/applications/SceneViewer/layerUtils.d.ts +2 -2
- package/applications/SceneViewer/sceneViewerUtils.d.ts +15 -2
- package/applications/SceneViewer/symbolUtils.d.ts +1 -2
- package/applications/Urban/meshUtils.d.ts +1 -2
- package/applications/WebEditor/sketchUtils.d.ts +2 -2
- package/arcade.d.ts +2 -2
- package/assets/components/assets/icon/hammerCoin16.json +1 -0
- package/assets/components/assets/icon/hammerCoin24.json +1 -0
- package/assets/components/assets/icon/hammerCoin32.json +1 -0
- package/assets/components/assets/icon/hammerLock16.json +1 -0
- package/assets/components/assets/icon/hammerLock24.json +1 -0
- package/assets/components/assets/icon/hammerLock32.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{474c4f4c3b8649a807d9.js → 07c5f3fc475c57f5a7a7.js} +1 -1
- package/assets/esri/core/workers/chunks/{41f7287832d407f13ce5.js → 09b77f82c22530b44daa.js} +1 -1
- package/assets/esri/core/workers/chunks/0ebdf0d1fd2034b24519.js +972 -0
- package/assets/esri/core/workers/chunks/149bad940feb0764b350.js +1 -0
- package/assets/esri/core/workers/chunks/1891c9aa162c5df1d27c.js +1 -0
- package/assets/esri/core/workers/chunks/22e11a8abc70b6571a2b.js +1 -0
- package/assets/esri/core/workers/chunks/{6eb829a7959df2269b0e.js → 24c94f97a76646d415ae.js} +1 -1
- package/assets/esri/core/workers/chunks/25c8cc30faade043c8dc.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/2ff63a71213f618377d6.js +1 -0
- package/assets/esri/core/workers/chunks/308ec51ff4a66f7fcb0d.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/380d37ceb8cf52bad190.js +1 -0
- package/assets/esri/core/workers/chunks/{1e17b693f2d974c3de2d.js → 3ec51b75d1a86dad6cb1.js} +1 -1
- package/assets/esri/core/workers/chunks/4263eee3247aaf4e64bf.js +1 -0
- package/assets/esri/core/workers/chunks/{b6440ddc595ba2ba8f8e.js → 448ee44c7f594e5b2551.js} +1 -1
- package/assets/esri/core/workers/chunks/476205ee4414ed80666a.js +1 -0
- package/assets/esri/core/workers/chunks/4b56c0c109e10d7409b8.js +1 -0
- package/assets/esri/core/workers/chunks/{1e1306527fb38c5894eb.js → 5a536de1ecae424bad05.js} +1 -1
- package/assets/esri/core/workers/chunks/{b65dcdf5818ee04aa7e0.js → 5adeb979f178944b9ce5.js} +1 -1
- package/assets/esri/core/workers/chunks/{f09c95c3d79205ee5a84.js → 5e9bf6d0db82526b8a8c.js} +5 -5
- package/assets/esri/core/workers/chunks/{e7913ec1b4f9da490ba3.js → 69ab4b780f7223cfd7dd.js} +1 -1
- package/assets/esri/core/workers/chunks/{429d19f4b59d9d265c2c.js → 6e25742ceedea7fb1b97.js} +1 -1
- package/assets/esri/core/workers/chunks/6e8905f20101c1f4509d.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{a6e96d0d9ac3224c8f00.js → 6ef2514a6b7bbfb8e37d.js} +1 -1
- package/assets/esri/core/workers/chunks/72cf9192292e5c85c6df.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{a591906154e12eb4fa43.js → 7810579a5a780933cdc9.js} +1 -1
- package/assets/esri/core/workers/chunks/{fa0d968733d581bc2e4d.js → 7d120f8b01fe719eb257.js} +1 -1
- package/assets/esri/core/workers/chunks/83edac97a52b26ead1ea.js +314 -0
- package/assets/esri/core/workers/chunks/{d81fea1d36e7c2fbdffd.js → 881ddbdeb40336208e90.js} +1 -1
- package/assets/esri/core/workers/chunks/{ec9d5af8887854e821c8.js → 88cbaa91c495d86f4bb0.js} +1 -1
- package/assets/esri/core/workers/chunks/{09a897c342a45ef9125c.js → 9011704b258ecbfb6d9b.js} +2 -2
- package/assets/esri/core/workers/chunks/{09a897c342a45ef9125c.js.LICENSE.txt → 9011704b258ecbfb6d9b.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/97310e6eec87eeaf58f0.js +1 -0
- package/assets/esri/core/workers/chunks/b21b152fa15896577242.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{4253b2802abb84afc428.js → b68bddd0c4ca91493543.js} +1 -1
- package/assets/esri/core/workers/chunks/bf9bc52a3c559108c19a.js +2 -0
- package/assets/esri/core/workers/chunks/{9b687465cc3863e14b29.js.LICENSE.txt → bf9bc52a3c559108c19a.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/c249ad935f54d3b49ae3.js +1 -0
- package/assets/esri/core/workers/chunks/d1678945cf6a58f76863.js +1 -0
- package/assets/esri/core/workers/chunks/{9ed1691eab19dfb1cf04.js → d1718ad93e3271b0525e.js} +1 -1
- package/assets/esri/core/workers/chunks/d599ba865da87b487b1b.js +1 -0
- package/assets/esri/core/workers/chunks/dd46ec81cebe1a0a7b9c.js +1 -0
- package/assets/esri/core/workers/chunks/debfb75a94b66b58cbbc.js +1 -0
- package/assets/esri/core/workers/chunks/{c6135d2548d4a31298eb.js → e0de91eacf3a3b7eda55.js} +4 -4
- package/assets/esri/core/workers/chunks/e444ec05a8a1dfbd21a8.js +1 -0
- package/assets/esri/core/workers/chunks/{b84c28fe94b3cd7b480d.js → e4651d577d297386268e.js} +1 -1
- package/assets/esri/core/workers/chunks/f8367c21fa91435c7c53.js +1 -0
- package/assets/esri/themes/base/_Ui.scss +6 -0
- package/assets/esri/themes/base/_mixins.scss +0 -7
- package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +0 -4
- package/assets/esri/themes/base/widgets/_Bookmarks.scss +0 -4
- package/assets/esri/themes/base/widgets/_CatalogLayerList.scss +0 -4
- package/assets/esri/themes/base/widgets/_Features.scss +0 -4
- package/assets/esri/themes/base/widgets/_LayerList.scss +0 -4
- package/assets/esri/themes/base/widgets/_TableList.scss +0 -4
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_en.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ar.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_bg.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_bs.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ca.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_cs.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_da.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_de.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_el.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_es.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_et.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_fi.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_fr.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_he.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_hr.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_hu.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_id.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_it.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ja.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ko.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_lt.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_lv.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_nl.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_no.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pl.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pt-BR.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pt-PT.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ro.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ru.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sk.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sl.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sr.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sv.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_th.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_tr.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_uk.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_vi.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-CN.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-HK.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-TW.json +1 -1
- package/chunks/AtmosphereCompositing.glsl.js +2 -2
- package/chunks/BlendLayers.glsl.js +1 -1
- package/chunks/BlendWeights.glsl.js +1 -1
- package/chunks/BloomBlur.glsl.js +23 -23
- package/chunks/BloomComposition.glsl.js +3 -3
- package/chunks/BloomDepthAdjust.glsl.js +2 -2
- package/chunks/Blur.glsl.js +1 -1
- package/chunks/ChapmanAtmosphere.glsl.js +2 -2
- package/chunks/CheckerBoard.glsl.js +2 -2
- package/chunks/Clouds.glsl.js +14 -14
- package/chunks/CloudsComposition.glsl.js +1 -1
- package/chunks/ColorMaterial.glsl.js +1 -1
- package/chunks/ComponentShader.glsl.js +4 -4
- package/chunks/Compositing.glsl.js +2 -2
- package/chunks/DefaultMaterial.glsl.js +16 -15
- package/chunks/EdgeDetect.glsl.js +2 -2
- package/chunks/EdgeShader.glsl.js +2 -2
- package/chunks/FocusAreaColor.glsl.js +2 -2
- package/chunks/FocusAreaMask.glsl.js +1 -1
- package/chunks/Fog.glsl.js +3 -3
- package/chunks/HUDCompositing.glsl.js +1 -1
- package/chunks/HUDMaterial.glsl.js +24 -24
- package/chunks/Haze.glsl.js +3 -3
- package/chunks/HazeCompositing.glsl.js +2 -2
- package/chunks/Heatmap.glsl.js +1 -1
- package/chunks/HeatmapDensity.glsl.js +5 -5
- package/chunks/HighlightApply.glsl.js +2 -2
- package/chunks/HighlightDownsample.glsl.js +2 -2
- package/chunks/HighlightToSingle.glsl.js +2 -2
- package/chunks/ImageMaterial.glsl.js +4 -4
- package/chunks/LaserlinePath.glsl.js +1 -1
- package/chunks/Laserlines.glsl.js +1 -1
- package/chunks/LineCallout.glsl.js +1 -1
- package/chunks/LineMarker.glsl.js +8 -8
- package/chunks/Magnifier.glsl.js +4 -4
- package/chunks/MeasurementArrow.glsl.js +2 -2
- package/chunks/NativeLine.glsl.js +4 -4
- package/chunks/NoiseTextureAtlas.glsl.js +34 -34
- package/chunks/OITBlend.glsl.js +3 -3
- package/chunks/OverlayCompositing.glsl.js +1 -1
- package/chunks/Path.glsl.js +9 -9
- package/chunks/Pattern.glsl.js +3 -3
- package/chunks/PointRenderer.glsl.js +1 -1
- package/chunks/Precipitation.glsl.js +1 -1
- package/chunks/RasterColorizer.glsl.js +9 -9
- package/chunks/RealisticTree.glsl.js +3 -3
- package/chunks/RibbonLine.glsl.js +32 -32
- package/chunks/SSAO.glsl.js +2 -2
- package/chunks/SSAOBlur.glsl.js +1 -1
- package/chunks/ShadedColorMaterial.glsl.js +3 -3
- package/chunks/ShadowCastAccumulate.glsl.js +2 -2
- package/chunks/ShadowCastVisualize.glsl.js +4 -4
- package/chunks/ShadowHighlight.glsl.js +2 -2
- package/chunks/SimpleAtmosphere.glsl.js +8 -8
- package/chunks/SingleHighlightApply.glsl.js +1 -1
- package/chunks/SingleHighlightBlur.glsl.js +6 -7
- package/chunks/SlicePlaneMaterial.glsl.js +2 -2
- package/chunks/Stars.glsl.js +2 -2
- package/chunks/Terrain.glsl.js +2 -2
- package/chunks/TextureOnly.glsl.js +2 -2
- package/chunks/Viewshed.glsl.js +2 -2
- package/chunks/WaterSurface.glsl.js +7 -7
- package/core/accessorSupport/decorators.d.ts +4 -2
- package/core/jsonMap.js +1 -1
- package/core/lang.d.ts +1 -2
- package/core/libs/gl-matrix-2/factories/vec2f64.js +1 -1
- package/core/promiseUtils.d.ts +5 -2
- package/core/quantity.d.ts +3 -2
- package/core/reactiveUtils.d.ts +5 -2
- package/core/scheduling.d.ts +2 -2
- package/core/sql.d.ts +1 -2
- package/core/units.d.ts +9 -2
- package/core/urlUtils.d.ts +5 -2
- package/core/workers.d.ts +1 -2
- package/editing/templateUtils.js +1 -1
- package/form/elements/inputs.d.ts +11 -2
- package/form/elements.d.ts +7 -2
- package/geometry/coordinateFormatter.d.ts +11 -2
- package/geometry/geometryEngine.d.ts +37 -2
- package/geometry/geometryEngineAsync.d.ts +37 -2
- package/geometry/operators/affineTransformOperator.d.ts +3 -2
- package/geometry/operators/alphaShapeOperator.d.ts +3 -2
- package/geometry/operators/areaOperator.d.ts +2 -2
- package/geometry/operators/autoCompleteOperator.d.ts +2 -2
- package/geometry/operators/boundaryOperator.d.ts +3 -2
- package/geometry/operators/bufferOperator.d.ts +3 -2
- package/geometry/operators/centroidOperator.d.ts +2 -2
- package/geometry/operators/clipOperator.d.ts +3 -2
- package/geometry/operators/containsOperator.d.ts +3 -2
- package/geometry/operators/convexHullOperator.d.ts +4 -2
- package/geometry/operators/crossesOperator.d.ts +3 -2
- package/geometry/operators/cutOperator.d.ts +2 -2
- package/geometry/operators/densifyOperator.d.ts +3 -2
- package/geometry/operators/differenceOperator.d.ts +3 -2
- package/geometry/operators/disjointOperator.d.ts +3 -2
- package/geometry/operators/distanceOperator.d.ts +2 -2
- package/geometry/operators/equalsOperator.d.ts +3 -2
- package/geometry/operators/extendOperator.d.ts +2 -2
- package/geometry/operators/generalizeOperator.d.ts +3 -2
- package/geometry/operators/geodesicBufferOperator.d.ts +5 -2
- package/geometry/operators/geodesicProximityOperator.d.ts +6 -2
- package/geometry/operators/geodeticAreaOperator.d.ts +4 -2
- package/geometry/operators/geodeticDensifyOperator.d.ts +5 -2
- package/geometry/operators/geodeticDistanceOperator.d.ts +4 -2
- package/geometry/operators/geodeticLengthOperator.d.ts +4 -2
- package/geometry/operators/graphicBufferOperator.d.ts +2 -2
- package/geometry/operators/integrateOperator.d.ts +2 -2
- package/geometry/operators/intersectionOperator.d.ts +4 -2
- package/geometry/operators/intersectsOperator.d.ts +3 -2
- package/geometry/operators/isNearOperator.d.ts +2 -2
- package/geometry/operators/labelPointOperator.d.ts +3 -2
- package/geometry/operators/lengthOperator.d.ts +2 -2
- package/geometry/operators/linesToPolygonsOperator.d.ts +2 -2
- package/geometry/operators/locateBetweenOperator.d.ts +2 -2
- package/geometry/operators/minimumBoundingCircleOperator.d.ts +3 -2
- package/geometry/operators/multiPartToSinglePartOperator.d.ts +2 -2
- package/geometry/operators/offsetOperator.d.ts +3 -2
- package/geometry/operators/overlapsOperator.d.ts +3 -2
- package/geometry/operators/polygonOverlayOperator.d.ts +2 -2
- package/geometry/operators/polygonSlicerOperator.d.ts +4 -2
- package/geometry/operators/projectOperator.d.ts +5 -2
- package/geometry/operators/proximityOperator.d.ts +4 -2
- package/geometry/operators/relateOperator.d.ts +4 -2
- package/geometry/operators/reshapeOperator.d.ts +2 -2
- package/geometry/operators/shapePreservingProjectOperator.d.ts +5 -2
- package/geometry/operators/simplifyOperator.d.ts +4 -2
- package/geometry/operators/support/geographicTransformationUtils.d.ts +4 -2
- package/geometry/operators/symmetricDifferenceOperator.d.ts +3 -2
- package/geometry/operators/touchesOperator.d.ts +3 -2
- package/geometry/operators/unionOperator.d.ts +3 -2
- package/geometry/operators/withinOperator.d.ts +3 -2
- package/geometry/projection.d.ts +5 -2
- package/geometry/support/geodesicUtils.d.ts +5 -2
- package/geometry/support/jsonUtils.d.ts +2 -2
- package/geometry/support/meshUtils.d.ts +6 -2
- package/geometry/support/normalizeUtils.d.ts +2 -2
- package/geometry/support/webMercatorUtils.d.ts +6 -2
- package/geometry.d.ts +7 -2
- package/interfaces.d.ts +48 -64
- package/intl.d.ts +16 -2
- package/kernel.d.ts +2 -2
- package/layers/LinkChartLayer.js +1 -1
- package/layers/catalog/catalogUtils.d.ts +2 -2
- package/layers/graphics/OptimizedGeometry.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
- package/layers/knowledgeGraph/cypherUtils.d.ts +1 -2
- package/layers/knowledgeGraph/layerUtils.js +1 -1
- package/layers/knowledgeGraph/supportUtils.d.ts +4 -2
- package/layers/mixins/APIKeyMixin.d.ts +1 -1
- package/layers/mixins/ArcGISCachedService.d.ts +1 -1
- package/layers/mixins/ArcGISImageService.d.ts +1 -1
- package/layers/mixins/ArcGISMapService.d.ts +1 -1
- package/layers/mixins/BlendLayer.d.ts +1 -1
- package/layers/mixins/CustomParametersMixin.d.ts +1 -1
- package/layers/mixins/DisplayFilteredLayer.d.ts +1 -1
- package/layers/mixins/FeatureEffectLayer.d.ts +1 -1
- package/layers/mixins/FeatureLayerBase.d.ts +1 -1
- package/layers/mixins/FeatureReductionLayer.d.ts +1 -1
- package/layers/mixins/ImageryTileMixin.d.ts +1 -1
- package/layers/mixins/OperationalLayer.d.ts +1 -1
- package/layers/mixins/OrderedLayer.d.ts +1 -1
- package/layers/mixins/PortalLayer.d.ts +1 -1
- package/layers/mixins/PublishableLayer.d.ts +1 -1
- package/layers/mixins/RasterPresetRendererMixin.d.ts +1 -1
- package/layers/mixins/RefreshableLayer.d.ts +1 -1
- package/layers/mixins/ScaleRangeLayer.d.ts +1 -1
- package/layers/mixins/SceneService.d.ts +1 -1
- package/layers/mixins/SublayersOwner.d.ts +1 -1
- package/layers/mixins/TemporalLayer.d.ts +1 -1
- package/layers/mixins/TemporalSceneLayer.d.ts +1 -1
- package/layers/ogc/wcsUtils.d.ts +1 -2
- package/layers/ogc/wfsUtils.d.ts +2 -2
- package/layers/orientedImagery/transformations/imageToWorld.d.ts +1 -2
- package/layers/orientedImagery/transformations/worldToImage.d.ts +1 -2
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/arcadeUtils.d.ts +1 -2
- package/layers/support/csvUtils.d.ts +1 -2
- package/layers/support/fieldUtils.d.ts +8 -2
- package/layers/support/rasterFunctionConstants.d.ts +15 -2
- package/layers/support/rasterFunctionUtils.d.ts +105 -2
- package/libs/linkchartlayout/LinkChartLayout.js +1 -1
- package/package.json +2 -2
- package/pointCloudRenderers.d.ts +5 -2
- package/popup/content.d.ts +9 -2
- package/rasterRenderers.d.ts +7 -2
- package/renderers/mixins/VisualVariablesMixin.d.ts +1 -1
- package/renderers/support/jsonUtils.d.ts +1 -2
- package/renderers/support/utils.d.ts +2 -2
- package/renderers.d.ts +9 -2
- package/rest/closestFacility.d.ts +1 -2
- package/rest/featureService/utils.d.ts +1 -2
- package/rest/find.d.ts +1 -2
- package/rest/geometryService.d.ts +21 -2
- package/rest/geoprocessor.d.ts +2 -2
- package/rest/identify.d.ts +1 -2
- package/rest/imageService.d.ts +19 -2
- package/rest/knowledgeGraphService.d.ts +11 -2
- package/rest/locator.d.ts +4 -2
- package/rest/networkService.d.ts +1 -2
- package/rest/networks/queryAssociations.d.ts +1 -2
- package/rest/networks/synthesizeAssociationGeometries.d.ts +1 -2
- package/rest/networks/trace.d.ts +1 -2
- package/rest/places.d.ts +3 -2
- package/rest/print.d.ts +2 -2
- package/rest/query.d.ts +11 -2
- package/rest/route.d.ts +1 -2
- package/rest/serviceArea.d.ts +1 -2
- package/rest/symbolService.d.ts +1 -2
- package/smartMapping/labels/bins.d.ts +1 -2
- package/smartMapping/labels/clusters.d.ts +1 -2
- package/smartMapping/popup/clusters.d.ts +1 -2
- package/smartMapping/popup/templates.d.ts +1 -2
- package/smartMapping/raster/renderers/classBreaks.d.ts +1 -2
- package/smartMapping/raster/renderers/colormap.d.ts +1 -2
- package/smartMapping/raster/renderers/flow.d.ts +1 -2
- package/smartMapping/raster/renderers/rgb.d.ts +1 -2
- package/smartMapping/raster/renderers/shadedRelief.d.ts +1 -2
- package/smartMapping/raster/renderers/stretch.d.ts +1 -2
- package/smartMapping/raster/renderers/uniqueValue.d.ts +1 -2
- package/smartMapping/raster/renderers/vectorField.d.ts +1 -2
- package/smartMapping/raster/support/colorRamps.d.ts +5 -2
- package/smartMapping/raster/support/utils.d.ts +2 -2
- package/smartMapping/renderers/color.d.ts +6 -2
- package/smartMapping/renderers/dotDensity.d.ts +1 -2
- package/smartMapping/renderers/dotDensity.js +1 -1
- package/smartMapping/renderers/heatmap.d.ts +2 -2
- package/smartMapping/renderers/heatmap.js +1 -1
- package/smartMapping/renderers/location.d.ts +1 -2
- package/smartMapping/renderers/opacity.d.ts +1 -2
- package/smartMapping/renderers/pieChart.d.ts +2 -2
- package/smartMapping/renderers/predominance.d.ts +1 -2
- package/smartMapping/renderers/relationship.d.ts +2 -2
- package/smartMapping/renderers/size.d.ts +5 -2
- package/smartMapping/renderers/support/rendererUtils.d.ts +1 -2
- package/smartMapping/renderers/type.d.ts +2 -2
- package/smartMapping/renderers/univariateColorSize.d.ts +2 -2
- package/smartMapping/statistics/heatmapStatistics.js +1 -1
- package/smartMapping/statistics/summaryStatisticsForAttributes.js +1 -1
- package/smartMapping/statistics/support/ageUtils.d.ts +1 -2
- package/smartMapping/statistics/support/predominanceUtils.d.ts +1 -2
- package/smartMapping/support/adapters/support/layerUtils.js +1 -1
- package/smartMapping/support/adapters/support/utils.js +1 -1
- package/smartMapping/symbology/color.d.ts +7 -2
- package/smartMapping/symbology/dotDensity.d.ts +4 -2
- package/smartMapping/symbology/flow.d.ts +5 -2
- package/smartMapping/symbology/heatmap.d.ts +5 -2
- package/smartMapping/symbology/location.d.ts +3 -2
- package/smartMapping/symbology/pieChart.d.ts +5 -2
- package/smartMapping/symbology/predominance.d.ts +5 -2
- package/smartMapping/symbology/relationship.d.ts +5 -2
- package/smartMapping/symbology/size.d.ts +3 -2
- package/smartMapping/symbology/support/colorRamps.d.ts +4 -2
- package/smartMapping/symbology/type.d.ts +5 -2
- package/support/LayersMixin.d.ts +1 -1
- package/support/TablesMixin.d.ts +1 -1
- package/support/featureFlags.js +1 -1
- package/support/popupUtils.d.ts +4 -2
- package/support/revision.js +1 -1
- package/support/timeUtils.d.ts +3 -2
- package/symbols/support/cimConversionUtils.d.ts +1 -2
- package/symbols/support/cimSymbolUtils.d.ts +6 -2
- package/symbols/support/jsonUtils.d.ts +1 -2
- package/symbols/support/symbolUtils.d.ts +7 -2
- package/symbols.d.ts +29 -2
- package/tables/elements.d.ts +5 -2
- package/unionTypes.d.ts +12 -2
- package/versionManagement/utils.d.ts +2 -2
- package/versionManagement/versionAdapters/utils.d.ts +2 -2
- package/views/2d/engine/webgl/shaderGraph/GraphShaderModule.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphContext.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPointShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPolygonShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BitmapShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BlendShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GridShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/HeatmapResolveShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OverlayShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TestShader.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
- package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
- package/views/2d/layers/features/sources/strategies/AFetchLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/DrillDownTileLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/PagedTileLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/SnapshotLoadStrategy.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderIndirect.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
- package/views/3d/environment/ChapmanApproximation.glsl.js +3 -3
- package/views/3d/environment/ChapmanAtmosphere.glsl.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.js +1 -1
- package/views/3d/environment/ChapmanRaymarching.glsl.js +4 -4
- package/views/3d/environment/Clouds.glsl.js +1 -1
- package/views/3d/environment/CloudsComposition.glsl.js +1 -1
- package/views/3d/environment/CloudsComposition.js +1 -1
- package/views/3d/environment/EnvironmentRenderer.js +1 -1
- package/views/3d/environment/Fog.glsl.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/environment/LocalAtmosphere.js +1 -1
- package/views/3d/environment/MarsAtmosphere.js +1 -1
- package/views/3d/environment/NoiseTextureAtlas.glsl.js +1 -1
- package/views/3d/environment/Precipitation.glsl.js +1 -1
- package/views/3d/environment/Precipitation.js +1 -1
- package/views/3d/environment/PrecipitationTechnique.js +1 -1
- package/views/3d/environment/SimpleAtmosphere.glsl.js +1 -1
- package/views/3d/interactive/visualElements/LaserlineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
- package/views/3d/layers/SceneLayerWorker.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Labeler.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/graphics/pipeline/Tile.js +1 -1
- package/views/3d/layers/graphics/pipeline/Tile3DManager.js +1 -1
- package/views/3d/layers/graphics/pipeline/featureData/FeatureData.js +1 -1
- package/views/3d/layers/graphics/pipeline/featureData/FeatureDataStore.js +1 -1
- package/views/3d/layers/graphics/pipeline/featureSet/PBFPointFeatureSetView.js +1 -1
- package/views/3d/layers/graphics/pipeline/featureSet/TiledFeatureStore.js +1 -1
- package/views/3d/layers/graphics/pipeline/fetching/Tile3DFetcher.js +1 -1
- package/views/3d/layers/graphics/pipeline/rendering/FeaturePipelineRenderManager.js +1 -1
- package/views/3d/layers/graphics/wosrLoader.js +1 -1
- package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
- package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
- package/views/3d/support/PBFDecoder.js +1 -1
- package/views/3d/support/engineContent/sdfPrimitives.js +1 -1
- package/views/3d/webgl/RenderNode.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js +10 -10
- package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/shader/DecodeSymbolColor.glsl.js +2 -2
- package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
- package/views/3d/webgl-engine/core/material/MaterialBase.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/HighlightCellGridScreenSpacePass.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/HighlightReadBitmap.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/Laserline.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/NormalFromDepth.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/ScreenSizeScaling.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +9 -9
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PositionAttribute.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexTangent.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexTextureCoordinates.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/hud/AlignPixel.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/hud/HUDOcclusionPass.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/hud/HUDVisibility.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/raster/Colormap.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/raster/Common.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/raster/Projection.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/raster/RasterColorizer.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/AnalyticalSkyModel.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeFragmentNormals.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeMaterialColor.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/FoamRendering.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/MultipassGeometryTest.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js +7 -7
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/TextureTransformUV.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterDistortion.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/BackgroundGrid.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/BlendLayers.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/BlendModes.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/CameraSpace.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/DoublePrecision.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/IsNaN.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/util/LocalFromScreenSpace.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/util/MixExternalColor.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/RgbaFloat16Encoding.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/RgbaFloatEncoding.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/ScreenSizePerspective.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/TextureAtlasLookup.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/TextureOnly.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/BooleanBindUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/BooleanPassUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Float2DrawUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Float3DrawUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Float4BindUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Float4DrawUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Float4sPassUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/FloatDrawUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/FloatsPassUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Integer2BindUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Integer2PassUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/IntegerBindUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/IntegerDrawUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/IntegerPassUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Matrix3DrawUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Matrix3PassUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Matrix4DrawUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Matrix4PassUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Matrix4sDrawUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Matrix4sPassUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Texture2DDrawUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/TextureCubeBindUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/glsl.js +5 -0
- package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/effects/OpaqueEnvironment.js +1 -1
- package/views/3d/webgl-engine/effects/TransparentEnvironment.js +1 -1
- package/views/3d/webgl-engine/effects/bloom/BloomBlur.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/bloom/BloomComposition.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/bloom/BloomDepthAdjust.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +5 -0
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +5 -0
- package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
- package/views/3d/webgl-engine/effects/haze/Haze.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
- package/views/3d/webgl-engine/effects/haze/HazeCompositing.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightPassParameters.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserlineTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAAPassParameters.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAOParameters.js +1 -1
- package/views/3d/webgl-engine/effects/stars/Stars.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
- package/views/3d/webgl-engine/effects/stars/StarsTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlend.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/GLTextureMaterial.js +1 -1
- package/views/3d/webgl-engine/lib/Material.js +1 -1
- package/views/3d/webgl-engine/lib/Program.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/TextureCompressionWorker.js +1 -1
- package/views/3d/webgl-engine/lib/TextureCompressionWorkerHandle.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/internal/WaterTextureRepository.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/AtmosphereCompositing.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/BlendWeights.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/Blur.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoard.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/Compositing.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/EdgeDetect.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/FocusAreaColor.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/FocusAreaMask.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDCompositing.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/Heatmap.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/HeatmapDensity.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/HeatmapTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HighlightApply.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/HighlightDownsample.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/HighlightToSingle.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LaserlinePath.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/Laserlines.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCallout.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/Magnifier.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/MeasurementArrow.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js +7 -7
- package/views/3d/webgl-engine/shaders/OverlayCompositing.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/Path.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/PointRenderer.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/SSAO.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/SSAOBlur.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulate.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastVisualize.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowHighlight.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/SingleHighlightApply.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/SingleHighlightBlur.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/SlicePlaneMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/SlicePlaneMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/SphereIntersect.glsl.js +2 -2
- package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ToneMapping.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/Viewshed.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/AdjustProjectedPosition.glsl.js +2 -2
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/DiscardNonSilhouetteEdges.glsl.js +4 -4
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/DistanceFalloff.glsl.js +2 -2
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeShader.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineAmplitude.glsl.js +3 -3
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineOffset.glsl.js +7 -7
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/UnpackAttributes.glsl.js +7 -7
- package/views/3d/webgl.d.ts +3 -2
- package/views/BreakpointsOwner.d.ts +1 -1
- package/views/DOMContainer.d.ts +1 -1
- package/views/FocusAreas.js +1 -1
- package/views/PopupView.d.ts +1 -1
- package/views/support/colorUtils.d.ts +2 -2
- package/views/webgl/NoParameters.js +5 -0
- package/views/webgl/ShaderBuilder.js +5 -0
- package/views/webgl/Texture.js +1 -1
- package/views/webgl/Uniform.js +5 -0
- package/views/webgl/testAppleAmdDrawArrays.js +1 -1
- package/widgets/Attachments/AttachmentsViewModel.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflowData.js +1 -1
- package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
- package/widgets/FeatureForm/UtilityNetworkAssociationInput.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/Print.js +1 -1
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/widgets/smartMapping/support/utils.d.ts +3 -2
- package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
- package/widgets/support/widget.d.ts +8 -2
- package/assets/esri/core/workers/chunks/1557446aa4525705a5b2.js +0 -1
- package/assets/esri/core/workers/chunks/2cf8677005dd2127f5eb.js +0 -1
- package/assets/esri/core/workers/chunks/31b9faaa539fdc639a0a.js +0 -1
- package/assets/esri/core/workers/chunks/349f31a1fb489fbfe60d.js +0 -1
- package/assets/esri/core/workers/chunks/34b31091e172e910d750.js +0 -1
- package/assets/esri/core/workers/chunks/4020c753fcbbb9f1c731.js +0 -1
- package/assets/esri/core/workers/chunks/48a1b63291c62bc78a41.js +0 -1
- package/assets/esri/core/workers/chunks/48e6f5571042aaffe543.js +0 -314
- package/assets/esri/core/workers/chunks/5bb175106aee21025bc2.js +0 -1
- package/assets/esri/core/workers/chunks/5c57aa9fdc4e1bab61ac.js +0 -1
- package/assets/esri/core/workers/chunks/7719fe672ea74cdc87be.js +0 -1
- package/assets/esri/core/workers/chunks/7ae1f26ded268099f429.js +0 -1
- package/assets/esri/core/workers/chunks/99c0b133c97abf4c2eec.js +0 -1
- package/assets/esri/core/workers/chunks/9a30ad773c22bde61c64.js +0 -1
- package/assets/esri/core/workers/chunks/9b687465cc3863e14b29.js +0 -2
- package/assets/esri/core/workers/chunks/b5ee6c203f536bdb6708.js +0 -1
- package/assets/esri/core/workers/chunks/c12bdf6fd7f631e3f79e.js +0 -971
- package/assets/esri/core/workers/chunks/c58f559eb68035ebe3da.js +0 -1
- package/assets/esri/core/workers/chunks/d2403fc8f4c723301144.js +0 -1
- package/views/2d/engine/webgl/shaderGraph/ShaderBuilder2D.js +0 -5
- package/views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js +0 -5
- package/views/3d/webgl-engine/core/shaderModules/Uniform.js +0 -5
- package/views/3d/webgl-engine/core/shaderModules/interfaces.js +0 -5
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaRenderNode.js +0 -5
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaRenderNodeColorEffects.js +0 -5
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaRenderNodeGeometryMasking.js +0 -5
- /package/views/{3d/webgl-engine/core/shaderTechnique → webgl}/BindType.js +0 -0
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{fromValues as o}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{IsNaN as r}from"../../../core/shaderLibrary/util/IsNaN.glsl.js";import{Float2BindUniform as e}from"../../../core/shaderModules/Float2BindUniform.js";import{glsl as a}from"../../../core/shaderModules/
|
|
5
|
+
import{fromValues as o}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{IsNaN as r}from"../../../core/shaderLibrary/util/IsNaN.glsl.js";import{Float2BindUniform as e}from"../../../core/shaderModules/Float2BindUniform.js";import{glsl as a}from"../../../core/shaderModules/glsl.js";import{Matrix3PassUniform as s}from"../../../core/shaderModules/Matrix3PassUniform.js";import{Matrix4BindUniform as t}from"../../../core/shaderModules/Matrix4BindUniform.js";import{Matrix4PassUniform as l}from"../../../core/shaderModules/Matrix4PassUniform.js";const i=o(.5,-4e-4);function c(o,c){const m=o.vertex;m.include(r),m.constants.add("depthBias","vec2",i),m.uniforms.add(new e("inverseViewport",(o=>o.inverseViewport))),c.legacy?(m.uniforms.add(new t("proj",(o=>o.camera.projectionMatrix))),m.code.add(a`vec2 calculateProjectedBiasXY(vec4 projPos, vec3 globalNormal) {
|
|
6
6
|
float offsetXY = depthBias.x;
|
|
7
7
|
vec4 projNormal = proj * localView * vec4(globalNormal, 0.0);
|
|
8
8
|
return offsetXY * projPos.w * 2.0 * inverseViewport * normalize(projNormal.xyz).xy;
|
|
9
|
-
}`)):(m.uniforms.add(new s("transformNormalViewFromGlobal",(o=>o.transformNormalViewFromGlobal)),new
|
|
9
|
+
}`)):(m.uniforms.add(new s("transformNormalViewFromGlobal",(o=>o.transformNormalViewFromGlobal)),new l("transformProjFromView",(o=>o.transformProjFromView))),m.code.add(a`vec2 calculateProjectedBiasXY(vec4 projPos, vec3 globalNormal) {
|
|
10
10
|
float offsetXY = depthBias.x;
|
|
11
11
|
vec4 projNormal = transformProjFromView * vec4(transformNormalViewFromGlobal * globalNormal, 0.0);
|
|
12
12
|
return offsetXY * projPos.w * 2.0 * inverseViewport * normalize(projNormal.xyz).xy;
|
package/views/3d/webgl-engine/shaders/sources/edgeRenderer/DiscardNonSilhouetteEdges.glsl.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{glsl as e}from"../../../core/shaderModules/
|
|
5
|
+
import{glsl as e}from"../../../core/shaderModules/glsl.js";function o(o,l){const r=o.vertex;l.silhouette?(r.code.add(e`bool isSilhouetteEdge(vec3 viewDir, vec3 normalA, vec3 normalB) {
|
|
6
6
|
float faceAVisible = dot(viewDir, normalA);
|
|
7
7
|
float faceBVisible = dot(viewDir, normalB);
|
|
8
8
|
return faceAVisible * faceBVisible < 0.0;
|
|
9
|
-
}`),
|
|
9
|
+
}`),l.legacy?r.code.add(e`bool discardNonSilhouetteEdges(vec3 viewPos, vec3 worldPos, ComponentData data) {
|
|
10
10
|
vec3 viewNormalA = _modelToViewNormal(data.normal);
|
|
11
11
|
vec3 viewNormalB = _modelToViewNormal(data.normal2);
|
|
12
12
|
vec3 viewDir = -viewPos;
|
|
@@ -15,7 +15,7 @@ return false;
|
|
|
15
15
|
}
|
|
16
16
|
gl_Position = vec4(10.0, 10.0, 10.0, 1.0);
|
|
17
17
|
return true;
|
|
18
|
-
}`):
|
|
18
|
+
}`):r.code.add(e`bool discardNonSilhouetteEdges(vec3 viewPos, vec3 worldPos, ComponentData data) {
|
|
19
19
|
vec3 worldNormalA = _modelToWorldNormal(data.normal);
|
|
20
20
|
vec3 worldNormalB = _modelToWorldNormal(data.normal2);
|
|
21
21
|
vec3 viewDir = -worldPos;
|
|
@@ -24,6 +24,6 @@ return false;
|
|
|
24
24
|
}
|
|
25
25
|
gl_Position = vec4(10.0, 10.0, 10.0, 1.0);
|
|
26
26
|
return true;
|
|
27
|
-
}`)):
|
|
27
|
+
}`)):r.code.add(e`bool discardNonSilhouetteEdges(vec3 viewPos, vec3 worldPos, ComponentData data) {
|
|
28
28
|
return false;
|
|
29
29
|
}`)}export{o as DiscardNonSilhouetteEdges};
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{FloatPassUniform as
|
|
5
|
+
import{FloatPassUniform as o}from"../../../core/shaderModules/FloatPassUniform.js";import{glsl as a}from"../../../core/shaderModules/glsl.js";function e(e){const t=e.vertex;t.uniforms.add(new o("distanceFalloffFactor",(o=>o.distanceFalloffFactor))),t.code.add(a`float distanceBasedPerspectiveFactor(float distance) {
|
|
6
6
|
return clamp(sqrt(distanceFalloffFactor / distance), 0.0, 1.0);
|
|
7
|
-
}`)}export{
|
|
7
|
+
}`)}export{e as DistanceFalloff};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../../../../../core/libs/gl-matrix-2/math/vec2.js";import"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../../../core/shaderLibrary/Slice.glsl.js";import"../../../core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import"../../../core/shaderModules/Float2BindUniform.js";import"../../../core/shaderModules/Float4BindUniform.js";import"../../../core/shaderModules/FloatBindUniform.js";import"../../../core/shaderModules/
|
|
5
|
+
import"../../../../../../core/libs/gl-matrix-2/math/vec2.js";import"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../../../core/shaderLibrary/Slice.glsl.js";import"../../../core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import"../../../core/shaderModules/Float2BindUniform.js";import"../../../core/shaderModules/Float4BindUniform.js";import"../../../core/shaderModules/FloatBindUniform.js";import"../../../core/shaderModules/glsl.js";import"../../../lib/VertexAttribute.js";import"./AdjustProjectedPosition.glsl.js";import"./DiscardNonSilhouetteEdges.glsl.js";import"./DistanceFalloff.glsl.js";import"./EdgeUtil.glsl.js";import"./LineAmplitude.glsl.js";import"./LineOffset.glsl.js";import"./UnpackAttributes.glsl.js";import"../../../../../webgl/ShaderBuilder.js";import"../../../../../webgl/Uniform.js";export{b as build}from"../../../../../../chunks/EdgeShader.glsl.js";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{maxElevationOffset as o}from"../../../collections/Component/Material/shader/ComponentData.glsl.js";import{NormalAttribute as e}from"../../../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{DoublePrecision as r}from"../../../core/shaderLibrary/util/DoublePrecision.glsl.js";import{RgbaFloatEncoding as t}from"../../../core/shaderLibrary/util/RgbaFloatEncoding.glsl.js";import{Float3DrawUniform as a}from"../../../core/shaderModules/Float3DrawUniform.js";import{Float3PassUniform as l}from"../../../core/shaderModules/Float3PassUniform.js";import{glsl as n}from"../../../core/shaderModules/
|
|
5
|
+
import{maxElevationOffset as o}from"../../../collections/Component/Material/shader/ComponentData.glsl.js";import{NormalAttribute as e}from"../../../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{DoublePrecision as r}from"../../../core/shaderLibrary/util/DoublePrecision.glsl.js";import{RgbaFloatEncoding as t}from"../../../core/shaderLibrary/util/RgbaFloatEncoding.glsl.js";import{Float3DrawUniform as a}from"../../../core/shaderModules/Float3DrawUniform.js";import{Float3PassUniform as l}from"../../../core/shaderModules/Float3PassUniform.js";import{glsl as n}from"../../../core/shaderModules/glsl.js";import{Matrix3DrawUniform as d}from"../../../core/shaderModules/Matrix3DrawUniform.js";import{Matrix3PassUniform as m}from"../../../core/shaderModules/Matrix3PassUniform.js";import{Matrix4BindUniform as i}from"../../../core/shaderModules/Matrix4BindUniform.js";import{Texture2DDrawUniform as s}from"../../../core/shaderModules/Texture2DDrawUniform.js";import{VertexAttribute as c}from"../../../lib/VertexAttribute.js";function f(f,v){const u=f.vertex;u.include(t),f.include(e,v);const{silhouette:x,legacy:p,spherical:w}=v;u.uniforms.add(new s("componentDataTex",(o=>o.componentDataTexture))),f.attributes.add(c.COMPONENTINDEX,"float");const M=0,F=1,T=2,h=3,P=8,V=128;u.constants.add("lineWidthFractionFactor","float",8),u.constants.add("extensionLengthOffset","float",128),u.code.add(n`
|
|
6
6
|
vec2 _componentTextureCoords(float componentIndex, float fieldOffset) {
|
|
7
7
|
float fieldIndex = ${n.float(h)} * componentIndex + fieldOffset;
|
|
8
8
|
float texSize = float(textureSize(componentDataTex, 0).x);
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{neverReached as e}from"../../../../../../core/compilerUtils.js";import{FloatDrawUniform as t}from"../../../core/shaderModules/FloatDrawUniform.js";import{glsl as r}from"../../../core/shaderModules/
|
|
5
|
+
import{neverReached as e}from"../../../../../../core/compilerUtils.js";import{FloatDrawUniform as t}from"../../../core/shaderModules/FloatDrawUniform.js";import{glsl as r}from"../../../core/shaderModules/glsl.js";import{EdgeType as s}from"./EdgeUtil.glsl.js";import{UnpackAttributes as a}from"./UnpackAttributes.glsl.js";function d(d,i){const o=d.vertex;switch(d.include(a,i),i.type){case s.Solid:o.code.add(r`float calculateLineAmplitude(UnpackedAttributes unpackedAttributes) {
|
|
6
6
|
return 0.0;
|
|
7
|
-
}`);break;case s.Sketch:o.uniforms.add(new t("strokesAmplitude",(e=>e.strokesTexture.amplitude)))
|
|
7
|
+
}`);break;case s.Sketch:o.uniforms.add(new t("strokesAmplitude",(e=>e.strokesTexture.amplitude))).code.add(r`float calculateLineAmplitude(UnpackedAttributes unpackedAttributes) {
|
|
8
8
|
return strokesAmplitude;
|
|
9
|
-
}`);break;case s.Mixed:o.uniforms.add(new t("strokesAmplitude",(e=>e.strokesTexture.amplitude)))
|
|
9
|
+
}`);break;case s.Mixed:o.uniforms.add(new t("strokesAmplitude",(e=>e.strokesTexture.amplitude))).code.add(r`float calculateLineAmplitude(UnpackedAttributes unpackedAttributes) {
|
|
10
10
|
float type = unpackedAttributes.type;
|
|
11
11
|
if (type <= 0.0) {
|
|
12
12
|
return strokesAmplitude;
|
|
@@ -2,37 +2,37 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{neverReached as e}from"../../../../../../core/compilerUtils.js";import{RgbaFloatEncoding as t}from"../../../core/shaderLibrary/util/RgbaFloatEncoding.glsl.js";import{FloatDrawUniform as r}from"../../../core/shaderModules/FloatDrawUniform.js";import{
|
|
5
|
+
import{neverReached as e}from"../../../../../../core/compilerUtils.js";import{RgbaFloatEncoding as t}from"../../../core/shaderLibrary/util/RgbaFloatEncoding.glsl.js";import{FloatDrawUniform as r}from"../../../core/shaderModules/FloatDrawUniform.js";import{glsl as a}from"../../../core/shaderModules/glsl.js";import{Texture2DDrawUniform as s}from"../../../core/shaderModules/Texture2DDrawUniform.js";import{usesSketchLogic as o,EdgeType as l}from"./EdgeUtil.glsl.js";import{UnpackAttributes as u}from"./UnpackAttributes.glsl.js";import{NoParameters as c}from"../../../../../webgl/NoParameters.js";class i extends c{}function n(c,i){c.include(u,i);const{vertex:n,fragment:d}=c;switch(o(i.type)&&(c.varyings.add("vStrokeUV","vec2"),n.uniforms.add(new s("strokesTexture",(e=>e.strokesTexture.texture)),new r("strokesLog2Resolution",(e=>Math.log2(e.strokesTexture.resolution))),new r("strokeVariants",(e=>e.strokesTexture.variants))).code.add(a`void calculateStyleOutputsSketch(float lineLength, UnpackedAttributes unpackedAttributes) {
|
|
6
6
|
vec2 sidenessNorm = unpackedAttributes.sidenessNorm;
|
|
7
7
|
float lineIndex = clamp(ceil(log2(lineLength)), 0.0, strokesLog2Resolution);
|
|
8
8
|
vStrokeUV = vec2(exp2(lineIndex) * sidenessNorm.y, lineIndex * strokeVariants + variantStroke + 0.5) / vec2(textureSize(strokesTexture, 0));
|
|
9
9
|
vStrokeUV.x += variantOffset;
|
|
10
|
-
}`),
|
|
10
|
+
}`),c.fragment.include(t),d.uniforms.add(new s("strokesTexture",(e=>e.strokesTexture.texture)),new r("strokesNormalizationScale",(e=>e.strokesTexture.normalizationScale))).code.add(a`float calculateLineOffsetSketch() {
|
|
11
11
|
float offsetNorm = rgbaTofloat(texture(strokesTexture, vStrokeUV));
|
|
12
12
|
return (offsetNorm - 0.5) * strokesNormalizationScale;
|
|
13
13
|
}
|
|
14
14
|
float calculateLinePressureSketch() {
|
|
15
15
|
return rgbaTofloat(texture(strokesTexture, vStrokeUV + vec2(0.0, 0.5)));
|
|
16
|
-
}`)),i.type){case l.Solid:n.code.add(
|
|
16
|
+
}`)),i.type){case l.Solid:n.code.add(a`void calculateStyleOutputs(UnpackedAttributes unpackedAttributes) {}`),d.code.add(a`float calculateLineOffset() {
|
|
17
17
|
return 0.0;
|
|
18
18
|
}
|
|
19
19
|
float calculateLinePressure() {
|
|
20
20
|
return 1.0;
|
|
21
|
-
}`);break;case l.Sketch:n.code.add(
|
|
21
|
+
}`);break;case l.Sketch:n.code.add(a`void calculateStyleOutputs(UnpackedAttributes unpackedAttributes)
|
|
22
22
|
{
|
|
23
23
|
calculateStyleOutputsSketch(vLineLengthPixels, unpackedAttributes);
|
|
24
|
-
}`),d.code.add(
|
|
24
|
+
}`),d.code.add(a`float calculateLineOffset() {
|
|
25
25
|
return calculateLineOffsetSketch();
|
|
26
26
|
}
|
|
27
27
|
float calculateLinePressure() {
|
|
28
28
|
return calculateLinePressureSketch();
|
|
29
|
-
}`);break;case l.Mixed:
|
|
29
|
+
}`);break;case l.Mixed:c.varyings.add("vType","float"),n.code.add(a`void calculateStyleOutputs(UnpackedAttributes unpackedAttributes)
|
|
30
30
|
{
|
|
31
31
|
vType = unpackedAttributes.type;
|
|
32
32
|
if (unpackedAttributes.type <= 0.0) {
|
|
33
33
|
calculateStyleOutputsSketch(vLineLengthPixels, unpackedAttributes);
|
|
34
34
|
}
|
|
35
|
-
}`),d.code.add(
|
|
35
|
+
}`),d.code.add(a`float calculateLineOffset() {
|
|
36
36
|
if (vType <= 0.0) {
|
|
37
37
|
return calculateLineOffsetSketch();
|
|
38
38
|
}
|
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{glsl as e,If as t}from"../../../core/shaderModules/
|
|
5
|
+
import{glsl as e,If as t}from"../../../core/shaderModules/glsl.js";import{VertexAttribute as n}from"../../../lib/VertexAttribute.js";import{EdgeType as s}from"./EdgeUtil.glsl.js";function i(i,o){const d=o.type===s.Mixed,r=o.type===s.Solid;i.attributes.add(n.SIDENESS,"vec2"),i.vertex.code.add(e`
|
|
6
6
|
struct UnpackedAttributes {
|
|
7
7
|
vec2 sideness;
|
|
8
8
|
vec2 sidenessNorm;
|
|
9
9
|
float lineWidthPixels;
|
|
10
10
|
float extensionLengthPixels;
|
|
11
|
-
${t(
|
|
11
|
+
${t(d,"float type;")}
|
|
12
12
|
};
|
|
13
|
-
`)
|
|
13
|
+
`).code.add(e`
|
|
14
14
|
UnpackedAttributes unpackAttributes(ComponentData component) {
|
|
15
15
|
vec2 sidenessNorm = sideness;
|
|
16
16
|
vec2 sideness = sidenessNorm * 2.0 - 1.0;
|
|
17
17
|
float extensionLengthPixels = component.extensionLength;
|
|
18
18
|
float lineWidth = component.lineWidth;
|
|
19
|
-
${t(
|
|
20
|
-
${t(!
|
|
21
|
-
${t(
|
|
22
|
-
return UnpackedAttributes(sideness, sidenessNorm, lineWidth, extensionLengthPixels ${t(
|
|
19
|
+
${t(d,"if (component.type <= 0.0) {")}
|
|
20
|
+
${t(!r,"extensionLengthPixels *= variantExtension * 2.0 - 1.0;")}
|
|
21
|
+
${t(d,"}")}
|
|
22
|
+
return UnpackedAttributes(sideness, sidenessNorm, lineWidth, extensionLengthPixels ${t(d,", component.type")});
|
|
23
23
|
}
|
|
24
24
|
`)}export{i as UnpackAttributes};
|
package/views/3d/webgl.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import "../../interfaces";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
export
|
|
3
|
+
export const fromRenderCoordinates: __esri.webgl["fromRenderCoordinates"];
|
|
4
|
+
export const renderCoordinateTransformAt: __esri.webgl["renderCoordinateTransformAt"];
|
|
5
|
+
export const toRenderCoordinates: __esri.webgl["toRenderCoordinates"];
|
package/views/DOMContainer.d.ts
CHANGED
package/views/FocusAreas.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.32/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import o from"../core/Accessor.js";import r from"../core/Collection.js";import{destroyMaybe as
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import o from"../core/Accessor.js";import r from"../core/Collection.js";import{destroyMaybe as s}from"../core/maybe.js";import{watch as t,syncAndInitial as i}from"../core/reactiveUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as a}from"../core/accessorSupport/decorators/subclass.js";import{e as c}from"../chunks/earcut.js";import{create as m}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{n as d}from"../chunks/vec32.js";import{create as p}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import l from"../geometry/Point.js";import{computeTranslationToOriginAndRotation as h}from"../geometry/projection/computeTranslationToOriginAndRotation.js";import{newDoubleArray as u}from"../geometry/support/DoubleArray.js";import{newIndexArray as f}from"../geometry/support/Indices.js";import{t as g}from"../chunks/vec3.js";import{ViewingMode as y}from"./ViewingMode.js";import{ElevationContext as v}from"./3d/layers/graphics/ElevationContext.js";import{extrudePolygon as j}from"./3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js";import{computeCentroid as _}from"./3d/layers/graphics/graphicUtils.js";import{geometryToRenderInfo as w}from"./3d/support/renderInfoUtils/polygon.js";import{FocusAreaColorNode as A}from"./3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js";import{FocusAreaGeometry as b,FocusAreaMaskNode as R}from"./3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js";const N=0,k=5e6,x=.42,C=.32;function G(e,o){if(e){if("bright"===o){const o=(e[0]+e[1]+e[2])/3;return[o*C+(1-C),o*C+(1-C),o*C+(1-C),e[3]*C]}return"dark"===o?[e[0]*x,e[1]*x,e[2]*x,e[3]*x]:e}}let F=class extends o{constructor(e){super(e),this.style="dark",this.geometries=new Array,this._areas=new r,this._elevationContext=new v}initialize(){this.addHandles([t((()=>this.style),(()=>this._updateRenderNodes()),i)])}get activePolygons(){const e=new r;for(const o of this.areas)if(o.enabled)for(const r of o.geometries)e.push(r);return e}add(e){this.areas.add(e),this._updateFocusAreaGeometries()}addMany(e){this.areas.addMany(e),this._updateFocusAreaGeometries()}remove(e){this.areas.remove(e),this._updateFocusAreaGeometries()}removeMany(e){this.areas.removeMany(e),this._updateFocusAreaGeometries()}removeAll(){this.areas.removeAll(),this._updateFocusAreaGeometries()}containsGeometry(e){let o=!0;const r=new l(e);return o=this.areas.some((e=>!!e.enabled&&(!!e?.geometries.length&&e.geometries.some((e=>e.contains(r)))))),o}get areas(){return this._areas}_updateFocusAreaGeometries(){this._extrudePolygons(),this._updateRenderNodes()}_extrudePolygons(){if(!this.view.renderCoordsHelper)return;this.geometries.length=0;const e=k-N,o=p(),r=this.view.renderCoordsHelper.viewingMode===y.Global,s=m(),t=m();r||this.view.renderCoordsHelper.worldUpAtPosition([0,0,0],o);for(const i of this.areas)if(i.enabled)for(const n of i.geometries){const a=_(n);if(null==a)continue;h(n.spatialReference,[a.x,a.y,0],s,this.view.renderCoordsHelper.spatialReference);const m=d(P,[s[12]-N*o[0],s[13]-N*o[1],s[14]-N*o[2]]);t[12]=-s[12],t[13]=-s[13],t[14]=-s[14];const p=w(n,this.view.elevationProvider,this.view.renderCoordsHelper,this._elevationContext),{polygons:l,mapPositions:y,position:v}=p;for(const n of l){const a=n.count,d=c(n.mapPositions,n.holeIndices,3);if(0===d.length)continue;const p=d.length,l=6*a,h=f(l+p),_=f(p),w=u(3*l),A=u(3*l),R=u(3*l),k=u(l);j(v,y,d,n,w,R,A,k,h,_,e,o,r),g(w,w,t);const x=new b(w,_,h,e,[s[12]+N*m[0],s[13]+N*m[1],s[14]+N*m[2]],i.outline?.color);this.geometries.push(x)}}this._maskRenderNode?.updateGeometries()}_updateRenderNodes(){this.view._stage&&("none"===this.style||0===this.geometries.length?(this._maskRenderNode=s(this._maskRenderNode),this._colorRenderNode=s(this._colorRenderNode)):(this._maskRenderNode??=new R({focusAreas:this}),this._colorRenderNode??=new A({focusAreas:this})))}};e([n()],F.prototype,"activePolygons",null),e([n()],F.prototype,"style",void 0),e([n()],F.prototype,"geometries",void 0),e([n({constructOnly:!0})],F.prototype,"view",void 0),e([n()],F.prototype,"_areas",void 0),F=e([a("esri.views.FocusAreas")],F);const P=p();export{F as FocusAreas,G as focusAreaHUDColor};
|
package/views/PopupView.d.ts
CHANGED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import e from"../../core/Error.js";import"../../core/has.js";import t from"../../core/Logger.js";import{BindType as r}from"./BindType.js";const n=()=>t.getLogger("esri.views.3d.webgl-engine.core.shaderModules.shaderBuilder");class s{constructor(){this._includedModules=new Map}include(e,t){this._includedModules.has(e)?this._includedModules.get(e):(this._includedModules.set(e,t),e(this.builder,t))}}class i extends s{constructor(){super(...arguments),this.vertex=new c,this.fragment=new c,this.attributes=new h,this.varyings=new m,this.extensions=new _,this.outputs=new d}get fragmentUniforms(){return this.fragment.uniforms.entries}get builder(){return this}generate(e,t=!1){const r=this.extensions.generateSource(e),n=this.attributes.generateSource(e),s=this.varyings.generateSource(e),i="vertex"===e?this.vertex:this.fragment,o=i.uniforms.generateSource(),a=i.code.generateSource(),u=i.main.generateSource(t),c="vertex"===e?f:g,h=i.constants.generateSource(),m=this.outputs.generateSource(e);return`#version 300 es\n${r.join("\n")}\n${c}\n${h.join("\n")}\n${o.join("\n")}\n${n.join("\n")}\n${s.join("\n")}\n${m.join("\n")}\n${a.join("\n")}\n${u.join("\n")}`}generateBind(e){const t=new Map;this.vertex.uniforms.entries.forEach((e=>{const n=e.bind[r.Bind];n&&t.set(e.name,n)})),this.fragment.uniforms.entries.forEach((e=>{const n=e.bind[r.Bind];n&&t.set(e.name,n)}));const n=Array.from(t.values()),s=n.length;return t=>{for(let r=0;r<s;++r)n[r](e,t)}}generateBindPass(e){const t=new Map;this.vertex.uniforms.entries.forEach((e=>{const n=e.bind[r.Pass];n&&t.set(e.name,n)})),this.fragment.uniforms.entries.forEach((e=>{const n=e.bind[r.Pass];n&&t.set(e.name,n)}));const n=Array.from(t.values()),s=n.length;return(t,r)=>{for(let i=0;i<s;++i)n[i](e,t,r)}}generateBindDraw(e){const t=new Map;this.vertex.uniforms.entries.forEach((e=>{const n=e.bind[r.Draw];n&&t.set(e.name,n)})),this.fragment.uniforms.entries.forEach((e=>{const n=e.bind[r.Draw];n&&t.set(e.name,n)}));const n=Array.from(t.values()),s=n.length;return(t,r,i)=>{for(let o=0;o<s;++o)n[o](e,i,t,r)}}}class o{constructor(e){this._stage=e,this._entries=new Map}add(...e){for(const t of e)this._add(t);return this._stage}get(e){return this._entries.get(e)}_add(t){if(null!=t){if(this._entries.has(t.name)&&!this._entries.get(t.name).equals(t))throw new e(`Duplicate uniform name ${t.name} for different uniform type`);this._entries.set(t.name,t)}else n().error(`Trying to add null Uniform from ${(new Error).stack}.`)}generateSource(){return Array.from(this._entries.values()).map((e=>null!=e.arraySize?`uniform ${e.type} ${e.name}[${e.arraySize}];`:`uniform ${e.type} ${e.name};`))}get entries(){return Array.from(this._entries.values())}}class a{constructor(e){this._stage=e,this._bodies=new Array}add(e){return this._bodies.push(e),this._stage}generateSource(t){if(this._bodies.length>0)return[`void main() {\n ${this._bodies.join("\n")||""} \n}`];if(t)throw new e("Shader does not contain main function body.");return[]}}class u{constructor(e){this._stage=e,this._entries=new Array}add(e){return this._entries.push(e),this._stage}generateSource(){return this._entries}}class c extends s{constructor(){super(...arguments),this.uniforms=new o(this),this.main=new a(this),this.code=new u(this),this.constants=new l(this)}get builder(){return this}}class h{constructor(){this._entries=new Array}add(e,t){this._entries.push([e,t])}generateSource(e){return"fragment"===e?[]:this._entries.map((e=>`in ${e[1]} ${e[0]};`))}}class m{constructor(){this._entries=new Map}add(e,t){this._entries.has(e)?n().warn(`Ignoring duplicate varying ${t} ${e}`):this._entries.set(e,t)}generateSource(e){const t=new Array;return this._entries.forEach(((r,n)=>t.push("vertex"===e?`out ${r} ${n};`:`in ${r} ${n};`))),t}}class _{constructor(){this._entries=new Set}add(e){this._entries.add(e)}generateSource(e){const t="vertex"===e?_.ALLOWLIST_VERTEX:_.ALLOWLIST_FRAGMENT;return Array.from(this._entries).filter((e=>t.includes(e))).map((e=>`#extension ${e} : enable`))}}_.ALLOWLIST_FRAGMENT=["GL_EXT_shader_texture_lod","GL_OES_standard_derivatives"],_.ALLOWLIST_VERTEX=[];class d{constructor(){this._entries=new Map}add(e,t,r=0){const s=this._entries.get(r);s?.name!==e||s?.type!==t?this._entries.set(r,{name:e,type:t}):n().warn(`Fragment shader output location ${r} occupied`)}generateSource(e){if("vertex"===e)return[];0===this._entries.size&&this._entries.set(0,{name:d.DEFAULT_NAME,type:d.DEFAULT_TYPE});const t=new Array;return this._entries.forEach(((e,r)=>t.push(`layout(location = ${r}) out ${e.type} ${e.name};`))),t}}d.DEFAULT_TYPE="vec4",d.DEFAULT_NAME="fragColor";class l{constructor(e){this._stage=e,this._entries=new Set}add(e,t,r){let n="ERROR_CONSTRUCTOR_STRING";switch(t){case"float":n=l._numberToFloatStr(r);break;case"int":n=l._numberToIntStr(r);break;case"bool":n=r.toString();break;case"vec2":n=`vec2(${l._numberToFloatStr(r[0])}, ${l._numberToFloatStr(r[1])})`;break;case"vec3":n=`vec3(${l._numberToFloatStr(r[0])}, ${l._numberToFloatStr(r[1])}, ${l._numberToFloatStr(r[2])})`;break;case"vec4":n=`vec4(${l._numberToFloatStr(r[0])}, ${l._numberToFloatStr(r[1])}, ${l._numberToFloatStr(r[2])}, ${l._numberToFloatStr(r[3])})`;break;case"ivec2":n=`ivec2(${l._numberToIntStr(r[0])}, ${l._numberToIntStr(r[1])})`;break;case"ivec3":n=`ivec3(${l._numberToIntStr(r[0])}, ${l._numberToIntStr(r[1])}, ${l._numberToIntStr(r[2])})`;break;case"ivec4":n=`ivec4(${l._numberToIntStr(r[0])}, ${l._numberToIntStr(r[1])}, ${l._numberToIntStr(r[2])}, ${l._numberToIntStr(r[3])})`;break;case"mat2":case"mat3":case"mat4":n=`${t}(${Array.prototype.map.call(r,(e=>l._numberToFloatStr(e))).join(", ")})`}return this._entries.add(`const ${t} ${e} = ${n};`),this._stage}static _numberToIntStr(e){return e.toFixed(0)}static _numberToFloatStr(e){return Number.isInteger(e)?e.toFixed(1):e.toString()}generateSource(){return Array.from(this._entries)}}const g="#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n precision highp int;\n precision highp sampler2D;\n#else\n precision mediump float;\n precision mediump int;\n precision mediump sampler2D;\n#endif",f="precision highp float;\nprecision highp sampler2D;";export{u as Code,s as Includes,a as Main,i as ShaderBuilder,c as Stage,o as Uniforms};
|
package/views/webgl/Texture.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.32/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../../core/Error.js";import"../../core/has.js";import e from"../../core/Logger.js";import{abortMaybe as i}from"../../core/maybe.js";import{isAbortError as r}from"../../core/promiseUtils.js";import{signal as s}from"../../core/signal.js";import{getTextureCompressionWorker as o,isCompressible as a}from"../support/TextureCompressionHelper.js";import{checkWebGLError as n}from"./checkWebGLError.js";import{TextureType as l,ResourceType as p,CompressedTextureFormat as m,TextureSamplingMode as h}from"./enums.js";import{GLObjectType as _}from"./GLObjectType.js";import{estimateMemory as d}from"./TextureDescriptor.js";import{isCompressedData as c,deriveInternalFormat as u,isTexImageSource as g,getDimensions as T,is3DTarget as x,validateTexture as E,isCompressedFormat as M,calcMipmapLevels as A,isSizedPixelFormat as f}from"./textureUtils.js";import{ValidatedTextureDescriptor as I}from"./ValidatedTextureDescriptor.js";const w=null,b=()=>e.getLogger("esri/views/webgl/Texture");let D=class e{constructor(e,i=null,r=null){if(this.type=_.Texture,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._wasImmutablyAllocated=!1,this._compressionAbortController=s(null),"context"in e)this._descriptor=e,r=i;else{const r=I.validate(e,i);if(!r)throw new t("Texture descriptor invalid");this._descriptor=r}this._descriptor.target===l.TEXTURE_CUBE_MAP?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return d(this._descriptor)}get cachedMemory(){return this.usedMemory}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty}get isCompressing(){return null!==this._compressionAbortController.value}dispose(){this.abortCompression(),this._glName&&this._descriptor.context.instanceCounter.decrement(p.Texture,this),this._descriptor.context.gl&&this._glName&&(this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null)}release(){this.dispose()}resize(e,i){const r=this._descriptor;if(r.width!==e||r.height!==i){if(this._wasImmutablyAllocated)throw new t("Immutable textures can't be resized!");r.width=e,r.height=i,this._descriptor.target===l.TEXTURE_CUBE_MAP?this._setDataCubeMap(null):this.setData(null)}}enableCompression(t){this._descriptor.shouldCompress=t}setData(t){return this.abortCompression(),!c(t)&&this._descriptor.internalFormat&&this._descriptor.internalFormat in m&&(this._descriptor.internalFormat=void 0),this._setData(t),o()&&!c(t)&&a(t)&&this._descriptor.shouldCompress&&this.compressOnWorker(t),this.isCompressing}updateData(i,r,s,o,a,n,l=0){n||b().error("An attempt to use uninitialized data!"),this._glName||b().error("An attempt to update uninitialized texture!");const p=this._descriptor;p.internalFormat=u(p);const{context:m,pixelFormat:h,dataType:_,target:d,isImmutable:x}=p;if(x&&!this._wasImmutablyAllocated)throw new t("Cannot update immutable texture before allocation!");const E=m.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES,!0);(r<0||s<0||r+o>p.width||s+a>p.height)&&b().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:M}=m;if(l&&(o&&a||b().warn("Must pass width and height if `UNPACK_SKIP_ROWS` is used"),M.pixelStorei(M.UNPACK_SKIP_ROWS,l)),g(n)){const{width:t,height:e}=T(n);t===o&&e===a||b().warn("The size of the data does not match the provided dimensions"),M.texSubImage2D(d,i,r,s,o,a,h,_,n)}else c(n)?M.compressedTexSubImage2D(d,i,r,s,o,a,p.internalFormat,n.levels[i]):M.texSubImage2D(d,i,r,s,o,a,h,_,n);l&&M.pixelStorei(M.UNPACK_SKIP_ROWS,0),m.bindTexture(E,e.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(i,r,s,o,a,n,l,p){p||b().error("An attempt to use uninitialized data!"),this._glName||b().error("An attempt to update an uninitialized texture!");const m=this._descriptor;m.internalFormat=u(m);const{context:h,pixelFormat:_,dataType:d,isImmutable:g,target:T}=m;if(g&&!this._wasImmutablyAllocated)throw new t("Cannot update immutable texture before allocation!");x(T)||b().warn("Attempting to set 3D texture data on a non-3D texture");const E=h.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);h.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),(r<0||s<0||o<0||r+a>m.width||s+n>m.height||o+l>m.depth)&&b().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:M}=h;if(c(p))p=p.levels[i],M.compressedTexSubImage3D(T,i,r,s,o,a,n,l,m.internalFormat,p);else{const t=p;M.texSubImage3D(T,i,r,s,o,a,n,l,_,d,t)}h.bindTexture(E,e.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const i=this._descriptor;if(!i.hasMipmap){if(this._wasImmutablyAllocated)throw new t("Cannot add mipmaps to immutable texture after allocation");i.hasMipmap=!0,this._samplingModeDirty=!0,E(i)}i.samplingMode===h.LINEAR?(this._samplingModeDirty=!0,i.samplingMode=h.LINEAR_MIPMAP_NEAREST):i.samplingMode===h.NEAREST&&(this._samplingModeDirty=!0,i.samplingMode=h.NEAREST_MIPMAP_NEAREST);const r=this._descriptor.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(i.target),this._descriptor.context.bindTexture(r,e.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){const e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new t("Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,E(e)}e.samplingMode===h.LINEAR_MIPMAP_NEAREST?(this._samplingModeDirty=!0,e.samplingMode=h.LINEAR):e.samplingMode===h.NEAREST_MIPMAP_NEAREST&&(this._samplingModeDirty=!0,e.samplingMode=h.NEAREST)}setSamplingMode(t){t!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=t,this._samplingModeDirty=!0)}setWrapMode(t){t!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=t,E(this._descriptor),this._wrapModeDirty=!0)}applyChanges(){this._samplingModeDirty&&(this._applySamplingMode(),this._samplingModeDirty=!1),this._wrapModeDirty&&(this._applyWrapMode(),this._wrapModeDirty=!1)}abortCompression(){this.isCompressing&&(this._compressionAbortController.value=i(this._compressionAbortController.value))}_setData(i,r){const s=this._descriptor,o=s.context?.gl;if(!o)return;n(o),this._glName||(this._glName=o.createTexture(),this._glName&&s.context.instanceCounter.increment(p.Texture,this)),E(s);const a=s.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);s.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._configurePixelStorage(),n(o);const l=r??s.target,m=x(l);if(g(i))this._setDataFromTexImageSource(i,l);else{const{width:e,height:r,depth:a}=s;if(null==e||null==r)throw new t("Width and height must be specified!");if(m&&null==a)throw new t("Depth must be specified!");if(s.internalFormat=u(s),s.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(l,s.internalFormat,s.hasMipmap,e,r,a),c(i)){if(!M(s.internalFormat))throw new t("Attempting to use compressed data with an uncompressed format!");this._setDataFromCompressedSource(i,s.internalFormat,l)}else this._texImage(l,0,s.internalFormat,e,r,a,i),n(o),s.hasMipmap&&this.generateMipmap()}this._applySamplingMode(),this._applyWrapMode(),this._applyAnisotropicFilteringParameters(),n(o),s.context.bindTexture(a,e.TEXTURE_UNIT_FOR_UPDATES)}_setDataCubeMap(t=null){for(let e=l.TEXTURE_CUBE_MAP_POSITIVE_X;e<=l.TEXTURE_CUBE_MAP_NEGATIVE_Z;e++)this._setData(t,e)}_configurePixelStorage(){const t=this._descriptor.context.gl,{unpackAlignment:e,flipped:i,preMultiplyAlpha:r}=this._descriptor;t.pixelStorei(t.UNPACK_ALIGNMENT,e),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,i?1:0),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r?1:0)}_setDataFromTexImageSource(t,e){const{gl:i}=this._descriptor.context,r=this._descriptor;r.internalFormat=u(r);const s=x(e),{width:o,height:a,depth:l}=T(t);r.width&&r.height,r.width||(r.width=o),r.height||(r.height=a),s&&r.depth,s&&(r.depth=l),r.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(e,r.internalFormat,r.hasMipmap,o,a,l),this._texImage(e,0,r.internalFormat,o,a,l,t),n(i),r.hasMipmap&&(this.generateMipmap(),n(i))}_setDataFromCompressedSource(t,e,i){const r=this._descriptor,{width:s,height:o,depth:a}=r,n=t.levels,l=A(i,s,o,a),p=Math.min(l,n.length)-1;this._descriptor.context.gl.texParameteri(r.target,r.context.gl.TEXTURE_MAX_LEVEL,p),this._forEachMipmapLevel(((t,r,s,o)=>{const a=n[Math.min(t,n.length-1)];this._compressedTexImage(i,t,e,r,s,o,a)}),p)}_texStorage(e,i,r,s,o,a){const{gl:n}=this._descriptor.context;if(!f(i))throw new t("Immutable textures must have a sized internal format");if(!this._descriptor.isImmutable)return;const l=r?A(e,s,o,a):1;if(x(e)){if(null==a)throw new t("Missing depth dimension for 3D texture upload");n.texStorage3D(e,l,i,s,o,a)}else n.texStorage2D(e,l,i,s,o);this._wasImmutablyAllocated=!0}_texImage(e,i,r,s,o,a,n){const l=this._descriptor.context.gl,p=x(e),{isImmutable:m,pixelFormat:h,dataType:_}=this._descriptor;if(m){if(null!=n){const r=n;if(p){if(null==a)throw new t("Missing depth dimension for 3D texture upload");l.texSubImage3D(e,i,0,0,0,s,o,a,h,_,r)}else l.texSubImage2D(e,i,0,0,s,o,h,_,r)}}else{const m=n;if(p){if(null==a)throw new t("Missing depth dimension for 3D texture upload");l.texImage3D(e,i,r,s,o,a,0,h,_,m)}else l.texImage2D(e,i,r,s,o,0,h,_,m)}}_compressedTexImage(e,i,r,s,o,a,n){const l=this._descriptor.context.gl,p=x(e);if(this._descriptor.isImmutable){if(null!=n)if(p){if(null==a)throw new t("Missing depth dimension for 3D texture upload");l.compressedTexSubImage3D(e,i,0,0,0,s,o,a,r,n)}else l.compressedTexSubImage2D(e,i,0,0,s,o,r,n)}else if(p){if(null==a)throw new t("Missing depth dimension for 3D texture upload");l.compressedTexImage3D(e,i,r,s,o,a,0,n)}else l.compressedTexImage2D(e,i,r,s,o,0,n)}async compressOnWorker(t){const e=this._descriptor.context?.gl.getExtension("WEBGL_compressed_texture_etc"),i=this._descriptor.context?.gl.getExtension("WEBGL_compressed_texture_s3tc"),s=o();if(s&&(e||i)){const o=new AbortController;this._compressionAbortController.value=o;const a={data:await createImageBitmap(t),flipped:this.descriptor.flipped,width:t.width,height:t.height,hasMipmap:this._descriptor.hasMipmap,hasETC:!!e,hasS3TC:!!i,buffer:[new ArrayBuffer(0)]};s.invoke(a,this._compressionAbortController.value.signal).then((t=>{t&&this.isCompressing&&this.glName&&(this._descriptor.internalFormat=t.internalFormat,this._setData(t.compressedTexture)),o===this._compressionAbortController.value&&(this._compressionAbortController.value=null)})).catch((t=>{r(t)||o!==this._compressionAbortController.value||(this._compressionAbortController.value=null)}))}}_forEachMipmapLevel(e,i=1/0){let{width:r,height:s,depth:o,hasMipmap:a,target:n}=this._descriptor;const p=n===l.TEXTURE_3D;if(null==r||null==s||p&&null==o)throw new t("Missing texture dimensions for mipmap calculation");for(let t=0;e(t,r,s,o),a&&(1!==r||1!==s||p&&1!==o)&&!(t>=i);++t)r=Math.max(1,r>>1),s=Math.max(1,s>>1),p&&(o=Math.max(1,o>>1))}_applySamplingMode(){const t=this._descriptor,e=t.context?.gl;let i=t.samplingMode,r=t.samplingMode;i===h.LINEAR_MIPMAP_NEAREST||i===h.LINEAR_MIPMAP_LINEAR?(i=h.LINEAR,t.hasMipmap||(r=h.LINEAR)):i!==h.NEAREST_MIPMAP_NEAREST&&i!==h.NEAREST_MIPMAP_LINEAR||(i=h.NEAREST,t.hasMipmap||(r=h.NEAREST)),e.texParameteri(t.target,e.TEXTURE_MAG_FILTER,i),e.texParameteri(t.target,e.TEXTURE_MIN_FILTER,r)}_applyWrapMode(){const t=this._descriptor,e=t.context?.gl;"number"==typeof t.wrapMode?(e.texParameteri(t.target,e.TEXTURE_WRAP_S,t.wrapMode),e.texParameteri(t.target,e.TEXTURE_WRAP_T,t.wrapMode)):(e.texParameteri(t.target,e.TEXTURE_WRAP_S,t.wrapMode.s),e.texParameteri(t.target,e.TEXTURE_WRAP_T,t.wrapMode.t))}_applyAnisotropicFilteringParameters(){const t=this._descriptor,e=t.context.capabilities.textureFilterAnisotropic;if(!e)return;t.context.gl.texParameterf(t.target,e.TEXTURE_MAX_ANISOTROPY,t.maxAnisotropy??1)}};D.TEXTURE_UNIT_FOR_UPDATES=0;export{D as Texture,w as tracer};
|
|
5
|
+
import t from"../../core/Error.js";import"../../core/has.js";import e from"../../core/Logger.js";import{abortMaybe as i}from"../../core/maybe.js";import{isAbortError as r}from"../../core/promiseUtils.js";import{signal as s}from"../../core/signal.js";import{getTextureCompressionWorker as o,isCompressible as a}from"../support/TextureCompressionHelper.js";import{checkWebGLError as n}from"./checkWebGLError.js";import{TextureType as l,ResourceType as p,CompressedTextureFormat as m,TextureSamplingMode as h}from"./enums.js";import{GLObjectType as _}from"./GLObjectType.js";import{estimateMemory as d}from"./TextureDescriptor.js";import{isCompressedData as c,deriveInternalFormat as u,isTexImageSource as g,getDimensions as T,is3DTarget as x,validateTexture as E,isCompressedFormat as M,calcMipmapLevels as A,isSizedPixelFormat as f}from"./textureUtils.js";import{ValidatedTextureDescriptor as I}from"./ValidatedTextureDescriptor.js";const w=null,D=()=>e.getLogger("esri/views/webgl/Texture");let R=class e{constructor(e,i=null,r=null){if(this.type=_.Texture,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._wasImmutablyAllocated=!1,this._compressionAbortController=s(null),"context"in e)this._descriptor=e,r=i;else{const r=I.validate(e,i);if(!r)throw new t("Texture descriptor invalid");this._descriptor=r}this._descriptor.target===l.TEXTURE_CUBE_MAP?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return d(this._descriptor)}get cachedMemory(){return this.usedMemory}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty}get isCompressing(){return null!==this._compressionAbortController.value}dispose(){this.abortCompression(),this._glName&&this._descriptor.context.instanceCounter.decrement(p.Texture,this),this._descriptor.context.gl&&this._glName&&(this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null)}release(){this.dispose()}resize(e,i){const r=this._descriptor;if(r.width!==e||r.height!==i){if(this._wasImmutablyAllocated)throw new t("Immutable textures can't be resized!");r.width=e,r.height=i,this._descriptor.target===l.TEXTURE_CUBE_MAP?this._setDataCubeMap(null):this.setData(null)}}enableCompression(t){this._descriptor.shouldCompress=t}setData(t){return this.abortCompression(),!c(t)&&this._descriptor.internalFormat&&this._descriptor.internalFormat in m&&(this._descriptor.internalFormat=void 0),this._setData(t),o()&&!c(t)&&a(t)&&this._descriptor.shouldCompress&&this.compressOnWorker(t),this.isCompressing}updateData(i,r,s,o,a,n,l=0){n||D().error("An attempt to use uninitialized data!"),this._glName||D().error("An attempt to update uninitialized texture!");const p=this._descriptor;p.internalFormat=u(p);const{context:m,pixelFormat:h,dataType:_,target:d,isImmutable:x}=p;if(x&&!this._wasImmutablyAllocated)throw new t("Cannot update immutable texture before allocation!");const E=m.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES,!0);(r<0||s<0||r+o>p.width||s+a>p.height)&&D().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:M}=m;if(l&&(o&&a||D().warn("Must pass width and height if `UNPACK_SKIP_ROWS` is used"),M.pixelStorei(M.UNPACK_SKIP_ROWS,l)),g(n)){const{width:t,height:e}=T(n);t===o&&e===a||D().warn("The size of the data does not match the provided dimensions"),M.texSubImage2D(d,i,r,s,o,a,h,_,n)}else c(n)?M.compressedTexSubImage2D(d,i,r,s,o,a,p.internalFormat,n.levels[i]):M.texSubImage2D(d,i,r,s,o,a,h,_,n);l&&M.pixelStorei(M.UNPACK_SKIP_ROWS,0),m.bindTexture(E,e.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(i,r,s,o,a,n,l,p){p||D().error("An attempt to use uninitialized data!"),this._glName||D().error("An attempt to update an uninitialized texture!");const m=this._descriptor;m.internalFormat=u(m);const{context:h,pixelFormat:_,dataType:d,isImmutable:g,target:T}=m;if(g&&!this._wasImmutablyAllocated)throw new t("Cannot update immutable texture before allocation!");x(T)||D().warn("Attempting to set 3D texture data on a non-3D texture");const E=h.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);h.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),(r<0||s<0||o<0||r+a>m.width||s+n>m.height||o+l>m.depth)&&D().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:M}=h;if(c(p))p=p.levels[i],M.compressedTexSubImage3D(T,i,r,s,o,a,n,l,m.internalFormat,p);else{const t=p;M.texSubImage3D(T,i,r,s,o,a,n,l,_,d,t)}h.bindTexture(E,e.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const i=this._descriptor;if(!i.hasMipmap){if(this._wasImmutablyAllocated)throw new t("Cannot add mipmaps to immutable texture after allocation");i.hasMipmap=!0,this._samplingModeDirty=!0,E(i)}i.samplingMode===h.LINEAR?(this._samplingModeDirty=!0,i.samplingMode=h.LINEAR_MIPMAP_NEAREST):i.samplingMode===h.NEAREST&&(this._samplingModeDirty=!0,i.samplingMode=h.NEAREST_MIPMAP_NEAREST);const r=this._descriptor.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(i.target),this._descriptor.context.bindTexture(r,e.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){const e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new t("Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,E(e)}e.samplingMode===h.LINEAR_MIPMAP_NEAREST?(this._samplingModeDirty=!0,e.samplingMode=h.LINEAR):e.samplingMode===h.NEAREST_MIPMAP_NEAREST&&(this._samplingModeDirty=!0,e.samplingMode=h.NEAREST)}setSamplingMode(t){t!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=t,this._samplingModeDirty=!0)}setWrapMode(t){t!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=t,E(this._descriptor),this._wrapModeDirty=!0)}applyChanges(){this._samplingModeDirty&&(this._applySamplingMode(),this._samplingModeDirty=!1),this._wrapModeDirty&&(this._applyWrapMode(),this._wrapModeDirty=!1)}abortCompression(){this.isCompressing&&(this._compressionAbortController.value=i(this._compressionAbortController.value))}_setData(i,r){const s=this._descriptor,o=s.context?.gl;if(!o)return;n(o),this._glName||(this._glName=o.createTexture(),this._glName&&s.context.instanceCounter.increment(p.Texture,this)),E(s);const a=s.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);s.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._configurePixelStorage(),n(o);const l=r??s.target,m=x(l);if(g(i))this._setDataFromTexImageSource(i,l);else{const{width:e,height:r,depth:a}=s;if(null==e||null==r)throw new t("Width and height must be specified!");if(m&&null==a)throw new t("Depth must be specified!");if(s.internalFormat=u(s),s.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(l,s.internalFormat,s.hasMipmap,e,r,a),c(i)){if(!M(s.internalFormat))throw new t("Attempting to use compressed data with an uncompressed format!");this._setDataFromCompressedSource(i,s.internalFormat,l)}else this._texImage(l,0,s.internalFormat,e,r,a,i),n(o),s.hasMipmap&&this.generateMipmap()}this._applySamplingMode(),this._applyWrapMode(),this._applyAnisotropicFilteringParameters(),n(o),s.context.bindTexture(a,e.TEXTURE_UNIT_FOR_UPDATES)}_setDataCubeMap(t=null){for(let e=l.TEXTURE_CUBE_MAP_POSITIVE_X;e<=l.TEXTURE_CUBE_MAP_NEGATIVE_Z;e++)this._setData(t,e)}_configurePixelStorage(){const t=this._descriptor.context.gl,{unpackAlignment:e,flipped:i,preMultiplyAlpha:r}=this._descriptor;t.pixelStorei(t.UNPACK_ALIGNMENT,e),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,i?1:0),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r?1:0)}_setDataFromTexImageSource(t,e){const{gl:i}=this._descriptor.context,r=this._descriptor;r.internalFormat=u(r);const s=x(e),{width:o,height:a,depth:l}=T(t);r.width&&r.height,r.width||(r.width=o),r.height||(r.height=a),s&&r.depth,s&&(r.depth=l),r.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(e,r.internalFormat,r.hasMipmap,o,a,l),this._texImage(e,0,r.internalFormat,o,a,l,t),n(i),r.hasMipmap&&(this.generateMipmap(),n(i))}_setDataFromCompressedSource(t,e,i){const r=this._descriptor,{width:s,height:o,depth:a}=r,n=t.levels,l=A(i,s,o,a),p=Math.min(l,n.length)-1;this._descriptor.context.gl.texParameteri(r.target,r.context.gl.TEXTURE_MAX_LEVEL,p),this._forEachMipmapLevel(((t,r,s,o)=>{const a=n[Math.min(t,n.length-1)];this._compressedTexImage(i,t,e,r,s,o,a)}),p)}_texStorage(e,i,r,s,o,a){const{gl:n}=this._descriptor.context;if(!f(i))throw new t("Immutable textures must have a sized internal format");if(!this._descriptor.isImmutable)return;const l=r?A(e,s,o,a):1;if(x(e)){if(null==a)throw new t("Missing depth dimension for 3D texture upload");n.texStorage3D(e,l,i,s,o,a)}else n.texStorage2D(e,l,i,s,o);this._wasImmutablyAllocated=!0}_texImage(e,i,r,s,o,a,n){const l=this._descriptor.context.gl,p=x(e),{isImmutable:m,pixelFormat:h,dataType:_}=this._descriptor;if(m){if(null!=n){const r=n;if(p){if(null==a)throw new t("Missing depth dimension for 3D texture upload");l.texSubImage3D(e,i,0,0,0,s,o,a,h,_,r)}else l.texSubImage2D(e,i,0,0,s,o,h,_,r)}}else{const m=n;if(p){if(null==a)throw new t("Missing depth dimension for 3D texture upload");l.texImage3D(e,i,r,s,o,a,0,h,_,m)}else l.texImage2D(e,i,r,s,o,0,h,_,m)}}_compressedTexImage(e,i,r,s,o,a,n){const l=this._descriptor.context.gl,p=x(e);if(this._descriptor.isImmutable){if(null!=n)if(p){if(null==a)throw new t("Missing depth dimension for 3D texture upload");l.compressedTexSubImage3D(e,i,0,0,0,s,o,a,r,n)}else l.compressedTexSubImage2D(e,i,0,0,s,o,r,n)}else if(p){if(null==a)throw new t("Missing depth dimension for 3D texture upload");l.compressedTexImage3D(e,i,r,s,o,a,0,n)}else l.compressedTexImage2D(e,i,r,s,o,0,n)}async compressOnWorker(t){const e=this._descriptor.context?.gl.getExtension("WEBGL_compressed_texture_etc"),i=this._descriptor.context?.gl.getExtension("WEBGL_compressed_texture_s3tc"),s=o();if(s&&(e||i)){const o=new AbortController;this._compressionAbortController.value=o;const a={data:await createImageBitmap(t),flipped:this.descriptor.flipped,width:t.width,height:t.height,hasMipmap:this._descriptor.hasMipmap,hasETC:!!e,hasS3TC:!!i};s.invoke(a,this._compressionAbortController.value.signal).then((t=>{t&&this.isCompressing&&this.glName&&(this._descriptor.internalFormat=t.internalFormat,this._setData(t.compressedTexture)),o===this._compressionAbortController.value&&(this._compressionAbortController.value=null)})).catch((t=>{r(t)||o!==this._compressionAbortController.value||(this._compressionAbortController.value=null)}))}}_forEachMipmapLevel(e,i=1/0){let{width:r,height:s,depth:o,hasMipmap:a,target:n}=this._descriptor;const p=n===l.TEXTURE_3D;if(null==r||null==s||p&&null==o)throw new t("Missing texture dimensions for mipmap calculation");for(let t=0;e(t,r,s,o),a&&(1!==r||1!==s||p&&1!==o)&&!(t>=i);++t)r=Math.max(1,r>>1),s=Math.max(1,s>>1),p&&(o=Math.max(1,o>>1))}_applySamplingMode(){const t=this._descriptor,e=t.context?.gl;let i=t.samplingMode,r=t.samplingMode;i===h.LINEAR_MIPMAP_NEAREST||i===h.LINEAR_MIPMAP_LINEAR?(i=h.LINEAR,t.hasMipmap||(r=h.LINEAR)):i!==h.NEAREST_MIPMAP_NEAREST&&i!==h.NEAREST_MIPMAP_LINEAR||(i=h.NEAREST,t.hasMipmap||(r=h.NEAREST)),e.texParameteri(t.target,e.TEXTURE_MAG_FILTER,i),e.texParameteri(t.target,e.TEXTURE_MIN_FILTER,r)}_applyWrapMode(){const t=this._descriptor,e=t.context?.gl;"number"==typeof t.wrapMode?(e.texParameteri(t.target,e.TEXTURE_WRAP_S,t.wrapMode),e.texParameteri(t.target,e.TEXTURE_WRAP_T,t.wrapMode)):(e.texParameteri(t.target,e.TEXTURE_WRAP_S,t.wrapMode.s),e.texParameteri(t.target,e.TEXTURE_WRAP_T,t.wrapMode.t))}_applyAnisotropicFilteringParameters(){const t=this._descriptor,e=t.context.capabilities.textureFilterAnisotropic;if(!e)return;t.context.gl.texParameterf(t.target,e.TEXTURE_MAX_ANISOTROPY,t.maxAnisotropy??1)}};R.TEXTURE_UNIT_FOR_UPDATES=0;export{R as Texture,w as tracer};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import"../../core/has.js";import{BindType as s}from"./BindType.js";class i{constructor(i,a,e,r,t=null){if(this.name=i,this.type=a,this.arraySize=t,this.bind={[s.Bind]:null,[s.Pass]:null,[s.Draw]:null},r)switch(e){case void 0:break;case s.Bind:this.bind[s.Bind]=r;break;case s.Pass:this.bind[s.Pass]=r;break;case s.Draw:this.bind[s.Draw]=r}}equals(s){return this.type===s.type&&this.name===s.name&&this.arraySize===s.arraySize}}export{i as Uniform};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import has from"../../core/has.js";import{glsl as e}from"../3d/webgl-engine/core/shaderModules/
|
|
5
|
+
import has from"../../core/has.js";import{glsl as e}from"../3d/webgl-engine/core/shaderModules/glsl.js";import{AppleAmdDriverHelper as r}from"./AppleAmdDriverHelper.js";import{BufferObject as t}from"./BufferObject.js";import{TextureWrapMode as o,TextureSamplingMode as n,Usage as i,BufferType as s,PrimitiveType as a,DataType as p,PixelFormat as l,PixelType as c}from"./enums.js";import{FramebufferObject as m}from"./FramebufferObject.js";import{TextureDescriptor as g}from"./TextureDescriptor.js";import{WebGLDriverTestModule as f}from"./WebGLDriverTestModule.js";class d extends f{constructor(e){super(),this._rctx=e,this._helperProgram=null,has("mac")&&has("chrome")&&(this._program=this._prepareProgram(),this._helperProgram=this._prepareHelperProgram())}dispose(){super.dispose(),this._helperProgram?.dispose(),this._helperProgram=null}_test(e){const r=this._rctx,f=r.getBoundFramebufferObject(),{x:d,y:h,width:u,height:_}=r.getViewport();r.resetState();const v=new g(1);v.wrapMode=o.CLAMP_TO_EDGE,v.samplingMode=n.NEAREST;const P=new m(r,v),w=t.createIndex(this._rctx,i.STATIC_DRAW,new Uint8Array([0]));r.bindFramebuffer(P),r.setViewport(0,0,1,1),r.useProgram(this._helperProgram),r.bindBuffer(w,s.ELEMENT_ARRAY_BUFFER),r.drawElements(a.POINTS,1,p.UNSIGNED_BYTE,0),r.useProgram(e),r.bindVAO(null),r.drawArrays(a.TRIANGLES,0,258);const x=new Uint8Array(4);return P.readPixels(0,0,1,1,l.RGBA,c.UNSIGNED_BYTE,x),r.setViewport(d,h,u,_),r.bindFramebuffer(f),P.dispose(),w.dispose(),255===x[0]}_prepareProgram(){const r=85,t=`#version 300 es\n precision highp float;\n\n out float triangleId;\n\n const vec3 triangleVertices[3] = vec3[3](vec3(-0.5, -0.5, 0.0), vec3(0.5, -0.5, 0.0), vec3(0.0, 0.5, 0.0));\n\n void main(void) {\n triangleId = floor(float(gl_VertexID)/3.0);\n\n vec3 position = triangleVertices[gl_VertexID % 3];\n float offset = triangleId / ${e.float(r)};\n position.z = 0.5 - offset;\n\n gl_Position = vec4(position, 1.0);\n }\n `,o=`#version 300 es\n precision highp float;\n\n in float triangleId;\n\n out vec4 fragColor;\n\n void main(void) {\n fragColor = triangleId == ${e.float(r)} ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);\n }\n `;return this._rctx.programCache.acquire(t,o,new Map([]))}_prepareHelperProgram(){const e=r.getShaderSources();return this._rctx.programCache.acquire(e.vertex,e.fragment,new Map([]))}}export{d as DrawArraysRequiresIndicesTypeReset};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../Graphic.js";import
|
|
5
|
+
import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../Graphic.js";import a from"../../core/Accessor.js";import i from"../../core/Collection.js";import n from"../../core/Error.js";import{watch as r,initial as s}from"../../core/reactiveUtils.js";import{property as c}from"../../core/accessorSupport/decorators/property.js";import{cast as o}from"../../core/accessorSupport/decorators/cast.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as h}from"../../core/accessorSupport/decorators/subclass.js";import d from"../../rest/query/support/AttachmentInfo.js";import l from"../../rest/support/AttachmentQuery.js";import{getSourceLayer as m}from"../Feature/support/featureUtils.js";const p={editing:!1,operations:{add:!0,update:!0,delete:!0}},u=i.ofType(d);let f=class extends a{constructor(t){super(t),this._getAttachmentsPromise=null,this._attachmentLayer=null,this.capabilities={...p},this.activeAttachmentInfo=null,this.activeFileInfo=null,this.attachmentInfos=new u,this.fileInfos=new i,this.graphic=null,this.mode="view",this.filesEnabled=!1,this.addHandles(r((()=>this.graphic),(()=>this._graphicChanged()),s))}destroy(){this._attachmentLayer=null,this.graphic=null}castCapabilities(t){return{...p,...t}}get state(){return this._getAttachmentsPromise?"loading":this.graphic?"ready":"disabled"}get supportsResizeAttachments(){const{graphic:t}=this;if(!t)return!1;const e=t.layer||t.sourceLayer;return e?.loaded&&"capabilities"in e&&e.capabilities&&"attachment"in e.capabilities&&e.capabilities.attachment&&"supportsResize"in e.capabilities.attachment&&e.capabilities.attachment.supportsResize||!1}async getAttachments(){const{_attachmentLayer:t,attachmentInfos:e}=this;if(!t||"function"!=typeof t.queryAttachments)throw new n("invalid-layer","getAttachments(): A valid layer is required.");const a=this._getObjectId();if("number"!=typeof a)throw new n("invalid-object-id","getAttachments(): Numeric object id is required");const i=new l({objectIds:[a],returnMetadata:!0}),r=[],s=t.queryAttachments(i).then((t=>t[a]||r)).catch((()=>r));this._getAttachmentsPromise=s,this.notifyChange("state");const c=await s;return e.destroyAll(),c.length&&e.addMany(c),this._getAttachmentsPromise=null,this.notifyChange("state"),c}async addAttachment(t,e=this.graphic){const{_attachmentLayer:a,attachmentInfos:i,capabilities:r}=this;if(!e)throw new n("invalid-graphic","addAttachment(): A valid graphic is required.",{graphic:e});if(!t)throw new n("invalid-attachment","addAttachment(): An attachment is required.",{attachment:t});if(!r.operations?.add)throw new n("invalid-capabilities","addAttachment(): add capabilities are required.");if(!a||"function"!=typeof a.addAttachment)throw new n("invalid-layer","addAttachment(): A valid layer is required.");const s=a.addAttachment(e,t).then((t=>this._queryAttachment(t.objectId,e))),c=await s;return i.add(c),c}async deleteAttachment(t){const{_attachmentLayer:e,attachmentInfos:a,graphic:i,capabilities:r}=this;if(!t)throw new n("invalid-attachment-info","deleteAttachment(): An attachmentInfo is required.",{attachmentInfo:t});if(!r.operations?.delete)throw new n("invalid-capabilities","deleteAttachment(): delete capabilities are required.");if(!e||"function"!=typeof e.deleteAttachments)throw new n("invalid-layer","deleteAttachment(): A valid layer is required.");if(!i)throw new n("invalid-graphic","deleteAttachment(): A graphic is required.");const s=e.deleteAttachments(i,[t.id]).then((()=>t)),c=await s;return a.remove(c),c.destroy(),c}async updateAttachment(t,e=this.activeAttachmentInfo){const{_attachmentLayer:a,attachmentInfos:i,graphic:r,capabilities:s}=this;if(!t)throw new n("invalid-attachment","updateAttachment(): An attachment is required.",{attachment:t});if(!e)throw new n("invalid-attachment-info","updateAttachment(): An attachmentInfo is required.",{attachmentInfo:e});if(!s.operations?.update)throw new n("invalid-capabilities","updateAttachment(): Update capabilities are required.");const c=i.indexOf(e);if(!a||"function"!=typeof a.updateAttachment)throw new n("invalid-layer","updateAttachment(): A valid layer is required.");if(!r)throw new n("invalid-graphic","updateAttachment(): A graphic is required.");const o=a.updateAttachment(r,e.id,t).then((t=>this._queryAttachment(t.objectId))),h=await o;return i.splice(c,1,h),h}async commitFiles(){return await Promise.all(this.fileInfos.items.map((t=>this.addAttachment(t.form)))),this.fileInfos.removeAll(),this.getAttachments()}addFile(t,e){if(!t||!e)return null;const a={file:t,form:e};return this.fileInfos.add(a),a}updateFile(t,e,a=this.activeFileInfo){if(!t||!e||!a)return null;const i=this.fileInfos.indexOf(a);return i>-1&&this.fileInfos.splice(i,1,{file:t,form:e}),this.fileInfos.items[i]}deleteFile(t){const e=this.fileInfos.find((e=>e.file===t));return e?(this.fileInfos.remove(e),e):null}async _queryAttachment(t,e){const{_attachmentLayer:a}=this;if(!t||!a?.queryAttachments)throw new n("invalid-attachment-id","Could not query attachment.");const i=this._getObjectId(e);if("number"!=typeof i)throw new n("invalid-object-id","getAttachments(): Numeric object id is required");const r=new l({objectIds:[i],attachmentsWhere:`AttachmentId=${t}`,returnMetadata:!0});return a.queryAttachments(r).then((t=>t[i][0]))}_getObjectId(t=this.graphic){return t?.getObjectId()??null}_graphicChanged(){this.graphic&&(this._setAttachmentLayer(),this.getAttachments().catch((()=>this.attachmentInfos.destroyAll())))}_setAttachmentLayer(){const{graphic:t}=this,e=m(t);this._attachmentLayer=e?"scene"===e.type&&null!=e.associatedLayer?e.associatedLayer:e:null}};t([c()],f.prototype,"capabilities",void 0),t([o("capabilities")],f.prototype,"castCapabilities",null),t([c()],f.prototype,"activeAttachmentInfo",void 0),t([c()],f.prototype,"activeFileInfo",void 0),t([c({readOnly:!0,type:u})],f.prototype,"attachmentInfos",void 0),t([c()],f.prototype,"fileInfos",void 0),t([c({type:e})],f.prototype,"graphic",void 0),t([c()],f.prototype,"mode",void 0),t([c({readOnly:!0})],f.prototype,"state",null),t([c()],f.prototype,"filesEnabled",void 0),t([c({readOnly:!0})],f.prototype,"supportsResizeAttachments",null),f=t([h("esri.widgets.Attachments.AttachmentsViewModel")],f);const y=f;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.32/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../chunks/tslib.es6.js";import{createTask as e}from"../../core/asyncUtils.js";import a from"../../core/Collection.js";import{deprecatedProperty as r}from"../../core/deprecate.js";import i from"../../core/Error.js";import s from"../../core/Evented.js";import{makeHandle as o}from"../../core/handleUtils.js";import n from"../../core/Logger.js";import{abortMaybe as l,removeMaybe as p,destroyMaybe as d}from"../../core/maybe.js";import{throwIfAborted as c,createResolver as u}from"../../core/promiseUtils.js";import{watch as h,on as w,when as f,whenOnce as m,syncAndInitial as y,initial as g,sync as k}from"../../core/reactiveUtils.js";import{property as v}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as _}from"../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as W}from"../../core/support/UpdatingHandles.js";import b from"../../layers/GraphicsLayer.js";import{isEditableLayer as F}from"../../layers/support/editableLayers.js";import{isFeatureLayer as I,getOwningPortalUrl as M}from"../../layers/support/layerUtils.js";import{parseKnownArcGISOnlineDomain as E}from"../../portal/support/urlUtils.js";import C from"../../views/interactive/sketch/SketchOptions.js";import{SnappingManager as V}from"../../views/interactive/snapping/SnappingManager.js";import O from"../../views/interactive/snapping/SnappingOptions.js";import U from"../Attachments/AttachmentsViewModel.js";import A from"./CreateFeaturesWorkflow.js";import T from"./UpdateWorkflow.js";import{whenEditorLayerView as L}from"./workflowUtils.js";import j from"./support/EditorItem.js";import S from"../FeatureTemplates/FeatureTemplatesViewModel.js";import P from"../Sketch/SketchViewModel.js";import H from"../Spinner/SpinnerViewModel.js";const R="esri.widgets.Editor.EditorViewModel",x=()=>n.getLogger(R),D=["create-features","update"];function G(t,e,a){x().error(new i(t,e,a))}function q(t,e){return t?.find((t=>t.layer===e))}let B=class extends s.EventedAccessor{constructor(t){super(t),this._sketchEventListenerHandle=null,this._sketchGraphicsLayer=new b({listMode:"hide",internal:!0}),this._snappingManager=null,this._updateItemsTask=null,this._updatingHandles=new W,this._featureTemplatesViewModelLocked=!1,this.activeWorkflow=null,this._activityQueue=new a,this.editorItems=new a,this.failures=[],this.hideTemplatesForInactiveLayers=!1,this.attachmentsViewModel=new U({capabilities:{editing:!0}}),this.featureTemplatesViewModel=new S({disabledItemFunction:({layer:t})=>this._itemIsSuspended(t)}),this.layerInfos=null,this.ownSketchViewModel=new P({layer:this._sketchGraphicsLayer}),this.sketchOptions=new C,this.snappingOptions=new O({attributeRulesEnabled:!0}),this.spinnerViewModel=new H,this.pageStack=[],this.showDiscardEditsPrompt=()=>Promise.resolve(!0),this._candidateCommitted=!1,this.back=async()=>{this.canGoBack&&(this.activeWorkflow?.hasPreviousStep?await this.activeWorkflow.back(this.showDiscardEditsPrompt):await this._cancelWorkflow({force:!this.hasPendingEdits}))},this.saveWorkflow=async()=>{const{featureFormViewModel:t}=this;if(t){if(t.submit(),!t.submittable||t.hasPendingSubtypeChoice)return;const e=t.getValues();if(t.validateContingencyConstraints(e,{includeIncompleteViolations:!0}).length>0)return}await(this.activeWorkflow?.save())},this.selectFeature=(t,e=!1)=>{const a=this.activeWorkflow;this._candidateCommitted||"update"!==a?.type||(a.data.rootFeature=t,e&&(a.next(),this._candidateCommitted=!0))}}initialize(){this.addHandles([h((()=>{const t=this.view,e=t?.map?.editableLayers,a=t?.allLayerViews,r=a?.filter((t=>!!e?.includes(t.layer)));return[e,r,this.layerInfos,this.allowedWorkflows]}),(()=>this._updateEditorItems()),y),h((()=>this.hideTemplatesForInactiveLayers),(()=>this.syncFeatureTemplates())),w((()=>this.activeWorkflow),"cancel",(()=>this.emit("workflow-cancel"))),w((()=>this.activeWorkflow),"commit",(()=>this.emit("workflow-commit"))),w((()=>this.activeWorkflow),"complete",(()=>{this.emit("workflow-commit"),this._set("activeWorkflow",null)})),f((()=>this.view?.map),(t=>t.add(this._sketchGraphicsLayer)),g),w((()=>this.editorItems),"change",(()=>this._afterEditorItemsChange())),h((()=>[this.canCreate,this.canUpdateVisible]),(()=>this._afterEditorItemsChange())),h((()=>this.page),((t,e)=>{const a=[...this.pageStack];if(-1===a.indexOf(t))a.push(t);else for(;a.length&&a.at(-1)!==t;)a.pop();this.pageStack=a}),y),f((()=>"awaiting-update-feature-candidate"===this.state),(()=>this._candidateCommitted=!1)),w((()=>this.featureTemplatesViewModel),"select",(async({item:t,oldItem:e})=>{const{activeWorkflow:a}=this;if(a){if("update"===a.type&&"awaiting-feature-creation-info"===a.activeWorkflow?.stepId)return;try{await this.cancelWorkflow({force:!this.hasPendingEdits})}catch{return void this.featureTemplatesViewModel.select(e,{emit:!1})}}if(!t)return;const r={layer:t.layer,template:t.template};if(t.supportsUpload)return this.featureTemplatesViewModel.select(e,{emit:!1}),this.startCreateFeaturesWorkflow(r);this.startCreateFeaturesWorkflowAtFeatureCreation(r)})),w((()=>this.view),"key-down",(t=>{"Escape"===t.key&&this.activeWorkflow?.keyboardCancellationEnabled&&(t.stopPropagation(),this.back())})),w((()=>this.sketchViewModel),["create","delete","update"],(t=>{const{activeWorkflow:e}=this,a="update"===e?.type,r=a?e.activeWorkflow?.layer:e?.layer,i=a?e?.activeWorkflow?.parentLayer:void 0,s=`sketch-${t.type}`;this.emit(s,{type:s,detail:t,layer:r,parentLayer:i})}),k),h((()=>this.view),(t=>{if(this._snappingManager=d(this._snappingManager),!t)return;const e=this.snappingOptions;this._snappingManager=new V({view:t,options:e}),this.ownSketchViewModel.snappingManager=this._snappingManager}),y),h((()=>this.snappingOptions),(t=>{this._snappingManager&&(this._snappingManager.options=t)}),y)])}destroy(){this._cancelWorkflow({warnIfNoWorkflow:!1}).then((()=>{this.view?.map?.remove(this._sketchGraphicsLayer),this.view=null})),this._updateItemsTask=l(this._updateItemsTask),this._updatingHandles.destroy(),this._sketchEventListenerHandle=p(this._sketchEventListenerHandle)}get allowedWorkflows(){return this._get("allowedWorkflows")}set allowedWorkflows(t){r(n.getLogger(this),"allowedWorkflows",{replacement:"Editor.visibleElements",version:"4.29",warnOnce:!0}),t&&0!==t.length||(t=[...D]),this._set("allowedWorkflows",t)}get canCreate(){return this.editorItems.some((t=>t.supportsCreateFeaturesWorkflow))}get canCreateVisible(){return!!this.featureTemplatesLayers.length}get canUpdate(){return this.editorItems.some((t=>t.supportsUpdateWorkflow))}get canUpdateVisible(){return this.editorItems.some((t=>t.supportsUpdateWorkflow&&t.visible))}get featureTemplatesLayers(){const t=new a;for(const e of this.editorItems){const a=e.supportsCreateFeaturesWorkflow&&!e.isTable,r=this.hideTemplatesForInactiveLayers&&!e.visible;a&&!r&&t.push(e.layer)}return t}get editableItems(){return r(n.getLogger(this),"editableItems",{replacement:"editorItems",version:"4.29",warnOnce:!0}),this.editorItems.map((t=>{const{capabilities:e,disabled:a,hasInvalidFormTemplate:r,layer:i}=t,s=[],o=e.create,n=e.update,l=e.delete;return o.enabled&&s.push("create"),n.enabled&&s.push("update"),l.enabled&&s.push("delete"),{layer:i,supports:s,suspended:a,attributeUpdatesEnabled:n.attributes,geometryUpdatesEnabled:n.geometry,attachmentsOnCreateEnabled:o.attachments.enabled,attachmentsOnUpdateEnabled:n.attachments.enabled,hasInvalidFormTemplate:r,hasAttachments:e.attachments.enabled}}))}get featureFormViewModel(){const{activeWorkflow:t}=this;return"update"===t?.type?t.activeFeatureFormViewModel:"create-features"===t?.type?t.featureFormViewModel:null}get labelOptions(){return this.sketchOptions.labels}set labelOptions(t){this.sketchOptions.labels=t}get sketchViewModel(){const{activeWorkflow:t}=this;return"update"===t?.type?t.activeSketchViewModel:"create-features"===t?.type?t.sketchViewModel:this.ownSketchViewModel}get state(){if(!this.view?.ready)return"disabled";const t=this.attachmentsViewModel.mode;if("add"===t)return"adding-attachment";if("edit"===t)return"editing-attachment";const{activeWorkflow:e}=this;return e?.stepId?"update"===e.type&&e.activeWorkflow?.stepId?e.activeWorkflow.stepId:e.stepId:"ready"}get syncing(){return this._activityQueue.length>0}get updating(){return this._updatingHandles.updating||!0===this.activeWorkflow?.updating}get tooltipOptions(){return this.sketchOptions.tooltips}set tooltipOptions(t){this.sketchOptions.tooltips=t}get valueOptions(){return this.sketchOptions.values}set valueOptions(t){this.sketchOptions.values=t}set view(t){this.ownSketchViewModel.view=t,this.spinnerViewModel.view=t,this._set("view",t)}get page(){const{activeWorkflow:t,state:e}=this;if("update"===t?.type&&null!=t?.activeWorkflow?.featureFormViewModel.associatedLayer)return"viewing-associated-features";if("update"===t?.type&&null!=t?.activeWorkflow?.featureFormViewModel.associationId)return"viewing-associated-layers";if("update"===t?.type&&"awaiting-feature-to-update"===t.stepId)return"ready";if("create-features"===t?.type&&0===t.numPendingFeatures){const e=t.data.upload;if(e)return"default"===e.state?"ready":"creating-features-upload-details"}return e??"disabled"}get featureFormDisabled(){const{activeWorkflow:t}=this;return"update"===t?.type&&!1===t.activeEditorItem?.capabilities.update.attributes}get featureFormHasAssociation(){return!!this.featureFormViewModel?.activeAssociation}get canGoBack(){return null!=this.activeWorkflow&&!this.syncing}get shouldShowDeleteButton(){const{activeWorkflow:t}=this;return!!t&&"update"===t.type&&!!t.activeEditorItem?.capabilities.delete.enabled}get hasPendingEdits(){return this.activeWorkflow?.hasPendingEdits??!1}get snappingManager(){return this._snappingManager}async startCreateFeaturesWorkflowAtFeatureTypeSelection(){return this.startCreateFeaturesWorkflow()}async startCreateFeaturesWorkflowAtFeatureCreation(t){return this.startCreateFeaturesWorkflow(t,"creating-features")}async startCreateFeaturesWorkflow(t,e="awaiting-feature-creation-info"){if(await m((()=>!this.updating)),!this.canCreate)throw new i("editing:unsupported-workflow","Creating features is unsupported or disabled.");const a=this._createUpdatingResolver();try{await this._cancelWorkflow();const a=this._createCreateFeaturesWorkflow(t,e);this._set("activeWorkflow",a),await a.start()}catch(r){this._logErrorAndCancelWorkflow(r)}finally{a.resolve()}}async startCreateFeaturesWorkflowAtFeatureEdit(t){await m((()=>!this.updating));const e=this._createUpdatingResolver();try{const{initialFeature:e}=t,a=e.sourceLayer=e.layer,r=a?this.findEditorItemForLayer(a):void 0;if(!r?.supportsCreateFeaturesWorkflow)throw new i("editing:unsupported-workflow","Creating features is unsupported or disabled for this layer.");await this._cancelWorkflow();const s=this._createCreateFeaturesWorkflow({initialFeature:e,layer:r.layer,maxFeatures:1},"creating-features");this._set("activeWorkflow",s),await s.start()}catch(a){this._logErrorAndCancelWorkflow(a)}finally{e.resolve()}}async startUpdateWorkflowAtFeatureSelection(){if(await m((()=>!this.updating)),!this.canUpdate)return void G("editing:unsupported-workflow","Update workflow is unsupported or disabled.");const t=this._createUpdatingResolver();try{await this._cancelWorkflow();const t=this._createUpdateWorkflow();this._set("activeWorkflow",t),await t.start()}catch(e){this._logErrorAndCancelWorkflow(e)}finally{t.resolve()}}async startUpdateWorkflowAtMultipleFeatureSelection(t){if(await m((()=>!this.updating)),!this.canUpdate)return void G("editing:unsupported-workflow","Update workflow is unsupported or disabled.");const e=this._createUpdatingResolver();try{await this._cancelWorkflow();const e=this._createUpdateWorkflow("awaiting-update-feature-candidate");e.data.candidates=t,this._set("activeWorkflow",e),await e.start()}catch(a){this._logErrorAndCancelWorkflow(a)}finally{e.resolve()}}async startUpdateWorkflowAtFeatureEdit(t){if(await m((()=>!this.updating)),!this.canUpdate)return void G("editing:unsupported-workflow","Update workflow is unsupported or disabled.");const e=this._createUpdatingResolver();try{await this._cancelWorkflow();const e=this._createUpdateWorkflow("editing-existing-feature");e.data.rootFeature=t,this._set("activeWorkflow",e),await e.start()}catch(a){this._logErrorAndCancelWorkflow(a)}finally{e.resolve()}}async deleteFeatureFromWorkflow(){const{activeWorkflow:t}=this;t&&"update"===t.type?await t.deleteActiveFeature():G("editing:unsupported-workflow","Deleting requires an active update workflow.")}async cancelWorkflow(t){return this._cancelWorkflow({warnIfNoWorkflow:!0,...t})}findEditorItemForLayer(t){return this.editorItems.find((e=>e.layer===t))}itemHasInvalidFormTemplate(t){return null!=t&&!0===this.findEditorItemForLayer(t.layer)?.hasInvalidFormTemplate}syncFeatureTemplates(){this._featureTemplatesViewModelLocked||(this.featureTemplatesViewModel.layers=this.featureTemplatesLayers.toArray())}async toggleUpdateWorkflow(){this.canUpdate&&(this.hasPendingEdits&&!await this.showDiscardEditsPrompt()||(this.activeWorkflow&&"awaiting-feature-to-update"===this.state?await this.cancelWorkflow({force:!0}):await this.startUpdateWorkflowAtFeatureSelection()))}lockFeatureTemplatesViewModel(){return this._featureTemplatesViewModelLocked=!0,o((()=>{this._featureTemplatesViewModelLocked=!1,this.syncFeatureTemplates()}))}async _getEditorItemCandidates(t){const{view:e}=this;if(!e?.map)return[];const{map:a}=e,r=a.editableLayers.toArray()??[],i=a.allTables.toArray().filter(I)??[];return await Promise.allSettled([...r.map((t=>"subtype-group"===t.type?t.loadAll():Promise.resolve())),...i.map((t=>t.load()))]),c(t),[...r.reverse(),...i.reverse()].filter((t=>F(t)&&("mesh"!==t.geometryType||"3d"===e.type))).flatMap((t=>"subtype-group"===t.type?t.sublayers.toArray():t))}_drainEditorItems(){this.editorItems.drain((t=>t.destroy()))}async _updateEditorItems(){l(this._updateItemsTask);const{view:t}=this,a=e((async e=>{if(!t?.map||!t?.allLayerViews)return;const a=await this._getEditorItemCandidates(e);if(!a.length)return void this._drainEditorItems();const r=[],i=[],s=[],{layerInfos:o}=this;for(const l of a){const e=q(o,l),a=await L(t,l).catch((()=>null));(e?r:a?i:s).push(new j({layer:l,layerInfo:e,layerView:a}))}o?.length&&r.sort(((t,e)=>o.findIndex((({layer:e})=>e===t.layer))-o.findIndex((({layer:t})=>t===e.layer))));const n=[...r,...i,...s];e.aborted||(this._drainEditorItems(),this.editorItems.addMany(n))}));this._updatingHandles.addPromise(a.promise),this._updateItemsTask=a}_afterEditorItemsChange(){const{activeWorkflow:t}=this;if(this.syncFeatureTemplates(),!t)return;const{stepId:e}=t;"create-features"!==t.type?"update"===t.type&&("awaiting-feature-to-update"===e&&!this.canUpdateVisible||"awaiting-update-feature-candidate"===e&&!t.hasUpdatableCandidates)&&this._cancelWorkflow():"awaiting-feature-creation-info"!==e||this.canCreate||this._cancelWorkflow()}async _cancelWorkflow(t){const e=this.activeWorkflow;if(!e)return void(t?.warnIfNoWorkflow&&G("editing:no-active-workflow","There is no active workflow to cancel."));if(!t||!1!==t.force)return this.emit("workflow-cancel"),this._set("activeWorkflow",null),void await e.cancel(t);await e.cancel(t),this._set("activeWorkflow",null)}_createCreateFeaturesWorkflow(t,e){return A.create({viewModel:this,creationInfo:t,sketchOptions:this.sketchOptions,snappingManager:this._snappingManager,startAt:e,applyEditsCallback:(t,e,a)=>this._applyEdits(t,e,a),addAttachmentsCallback:(t,e)=>this._addAttachments(t,e)})}_createUpdateWorkflow(t){return T.create({viewModel:this,sketchOptions:this.sketchOptions,snappingManager:this._snappingManager,startAt:t,applyEditsCallback:(t,e,a)=>this._applyEdits(t,e,a),addAttachmentsCallback:(t,e)=>this._addAttachments(t,e)})}_addAttachments(t,e){const a=e.map((e=>this._addAttachment(t,e.feature,e.attachment)))??[];return Promise.all(a)}async _addAttachment(t,e,a){let r=null;if(!("addAttachment"in t)||null==t.capabilities?.attachment)throw new i("editor:attachments-not-supported","Adding attachments is not supported for this layer type");return await this._queueOperation((async()=>(r=await(t.addAttachment?.(e,a).catch((t=>{throw t?.error||t})))??null,r))),r}async _applyEdits(t,e,a){let r=null;const i=t.url?await M(t.url):null,s={returnServiceEditsOption:(!i||!E(i))&&!RegExp("/hosted/","i").test(t.url)?"original-and-current-features":void 0,...a};return await this._queueOperation((async()=>{const{view:a}=this;if(!a)return null;const i=await L(a,t).catch((()=>null));return r=await t.applyEdits(e,s),i&&await m((()=>!i.updating)),r})),r}_queueOperation(t){this._activityQueue.push(t);const e=(t,e)=>{const a=e.indexOf(t);a>-1&&e.splice(a,1)};return t().then((t=>{if(null!=t&&"error"in t&&null!=t.error)throw t.error;if(null!=t&&"addFeatureResults"in t){const{addFeatureResults:e,deleteFeatureResults:a,updateFeatureResults:r}=t,i=e.find((t=>!!t.error))||r.find((t=>!!t.error))||a.find((t=>!!t.error));if(i)throw i.error}return t})).catch((a=>{G("editing:operation-error","An error occurred.",{error:a});const r={error:a,retry:()=>(e(r,this.failures),this._queueOperation(t)),cancel:()=>{e(r,this.failures)}};this._set("failures",[...this.failures,r])})).then((()=>{e(t,this._activityQueue)}))}_createUpdatingResolver(){const t=u();return this._updatingHandles.addPromise(t.promise),t}_logErrorAndCancelWorkflow(t){const{name:e,message:a,details:r}=t;G(e??"editing:workflow-start-failed",a??void 0,r??t),this._cancelWorkflow({force:!0})}_itemIsSuspended(t){const e=this.findEditorItemForLayer(t);return null!=e&&(!e.visible||e.disabled)}};t([v()],B.prototype,"_snappingManager",void 0),t([v({readOnly:!0})],B.prototype,"activeWorkflow",void 0),t([v({readOnly:!0})],B.prototype,"_activityQueue",void 0),t([v({value:[...D]})],B.prototype,"allowedWorkflows",null),t([v({readOnly:!0})],B.prototype,"canCreate",null),t([v()],B.prototype,"canCreateVisible",null),t([v({readOnly:!0})],B.prototype,"canUpdate",null),t([v()],B.prototype,"canUpdateVisible",null),t([v()],B.prototype,"featureTemplatesLayers",null),t([v()],B.prototype,"editableItems",null),t([v()],B.prototype,"editorItems",void 0),t([v({readOnly:!0})],B.prototype,"failures",void 0),t([v()],B.prototype,"hideTemplatesForInactiveLayers",void 0),t([v({type:U})],B.prototype,"attachmentsViewModel",void 0),t([v()],B.prototype,"featureFormViewModel",null),t([v({type:S})],B.prototype,"featureTemplatesViewModel",void 0),t([v()],B.prototype,"labelOptions",null),t([v()],B.prototype,"layerInfos",void 0),t([v()],B.prototype,"ownSketchViewModel",void 0),t([v()],B.prototype,"sketchOptions",void 0),t([v()],B.prototype,"sketchViewModel",null),t([v({type:O,nonNullable:!0})],B.prototype,"snappingOptions",void 0),t([v()],B.prototype,"spinnerViewModel",void 0),t([v()],B.prototype,"state",null),t([v({readOnly:!0})],B.prototype,"syncing",null),t([v()],B.prototype,"updating",null),t([v()],B.prototype,"tooltipOptions",null),t([v()],B.prototype,"valueOptions",null),t([v()],B.prototype,"view",null),t([v()],B.prototype,"pageStack",void 0),t([v()],B.prototype,"showDiscardEditsPrompt",void 0),t([v()],B.prototype,"_candidateCommitted",void 0),t([v()],B.prototype,"page",null),t([v()],B.prototype,"featureFormDisabled",null),t([v()],B.prototype,"featureFormHasAssociation",null),t([v()],B.prototype,"canGoBack",null),t([v()],B.prototype,"shouldShowDeleteButton",null),t([v()],B.prototype,"hasPendingEdits",null),t([v()],B.prototype,"snappingManager",null),B=t([_(R)],B);const Q=B;export{Q as default};
|
|
5
|
+
import{_ as t}from"../../chunks/tslib.es6.js";import{createTask as e}from"../../core/asyncUtils.js";import a from"../../core/Collection.js";import i from"../../core/Error.js";import r from"../../core/Evented.js";import{makeHandle as s}from"../../core/handleUtils.js";import o from"../../core/Logger.js";import{abortMaybe as n,removeMaybe as l,destroyMaybe as p}from"../../core/maybe.js";import{throwIfAborted as d,createResolver as c}from"../../core/promiseUtils.js";import{watch as u,on as h,when as w,whenOnce as f,syncAndInitial as m,initial as y,sync as k}from"../../core/reactiveUtils.js";import{property as g}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as v}from"../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as _}from"../../core/support/UpdatingHandles.js";import W from"../../layers/GraphicsLayer.js";import{isEditableLayer as F}from"../../layers/support/editableLayers.js";import{isFeatureLayer as E,getOwningPortalUrl as I}from"../../layers/support/layerUtils.js";import{parseKnownArcGISOnlineDomain as M}from"../../portal/support/urlUtils.js";import b from"../../views/interactive/sketch/SketchOptions.js";import{SnappingManager as C}from"../../views/interactive/snapping/SnappingManager.js";import V from"../../views/interactive/snapping/SnappingOptions.js";import A from"../Attachments/AttachmentsViewModel.js";import U from"./CreateFeaturesWorkflow.js";import O from"./UpdateWorkflow.js";import{whenEditorLayerView as T}from"./workflowUtils.js";import L from"./support/EditorItem.js";import S from"../FeatureTemplates/FeatureTemplatesViewModel.js";import j from"../Sketch/SketchViewModel.js";import P from"../Spinner/SpinnerViewModel.js";const R="esri.widgets.Editor.EditorViewModel",H=()=>o.getLogger(R);function x(t,e,a){H().error(new i(t,e,a))}function D(t,e){return t?.find((t=>t.layer===e))}let G=class extends r.EventedAccessor{constructor(t){super(t),this._sketchEventListenerHandle=null,this._sketchGraphicsLayer=new W({listMode:"hide",internal:!0}),this._snappingManager=null,this._updateItemsTask=null,this._updatingHandles=new _,this._featureTemplatesViewModelLocked=!1,this.activeWorkflow=null,this._activityQueue=new a,this.editorItems=new a,this.failures=[],this.hideTemplatesForInactiveLayers=!1,this.attachmentsViewModel=new A({capabilities:{editing:!0}}),this.featureTemplatesViewModel=new S({disabledItemFunction:({layer:t})=>this._itemIsSuspended(t)}),this.layerInfos=null,this.ownSketchViewModel=new j({layer:this._sketchGraphicsLayer}),this.sketchOptions=new b,this.snappingOptions=new V({attributeRulesEnabled:!0}),this.spinnerViewModel=new P,this.pageStack=[],this.showDiscardEditsPrompt=()=>Promise.resolve(!0),this._candidateCommitted=!1,this.back=async()=>{this.canGoBack&&(this.activeWorkflow?.hasPreviousStep?await this.activeWorkflow.back(this.showDiscardEditsPrompt):await this._cancelWorkflow({force:!this.hasPendingEdits}))},this.saveWorkflow=async()=>{const{featureFormViewModel:t}=this;if(t){if(t.submit(),!t.submittable||t.hasPendingSubtypeChoice)return;const e=t.getValues();if(t.validateContingencyConstraints(e,{includeIncompleteViolations:!0}).length>0)return}await(this.activeWorkflow?.save())},this.selectFeature=(t,e=!1)=>{const a=this.activeWorkflow;this._candidateCommitted||"update"!==a?.type||(a.data.rootFeature=t,e&&(a.next(),this._candidateCommitted=!0))}}initialize(){this.addHandles([u((()=>{const t=this.view,e=t?.map?.editableLayers,a=t?.allLayerViews,i=a?.filter((t=>!!e?.includes(t.layer)));return[e,i,this.layerInfos]}),(()=>this._updateEditorItems()),m),u((()=>this.hideTemplatesForInactiveLayers),(()=>this.syncFeatureTemplates())),h((()=>this.activeWorkflow),"cancel",(()=>this.emit("workflow-cancel"))),h((()=>this.activeWorkflow),"commit",(()=>this.emit("workflow-commit"))),h((()=>this.activeWorkflow),"complete",(()=>{this.emit("workflow-commit"),this._set("activeWorkflow",null)})),w((()=>this.view?.map),(t=>t.add(this._sketchGraphicsLayer)),y),h((()=>this.editorItems),"change",(()=>this._afterEditorItemsChange())),u((()=>[this.canCreate,this.canUpdateVisible]),(()=>this._afterEditorItemsChange())),u((()=>this.page),((t,e)=>{const a=[...this.pageStack];if(-1===a.indexOf(t))a.push(t);else for(;a.length&&a.at(-1)!==t;)a.pop();this.pageStack=a}),m),w((()=>"awaiting-update-feature-candidate"===this.state),(()=>this._candidateCommitted=!1)),h((()=>this.featureTemplatesViewModel),"select",(async({item:t,oldItem:e})=>{const{activeWorkflow:a}=this;if(a){if("update"===a.type&&"awaiting-feature-creation-info"===a.activeWorkflow?.stepId)return;try{await this.cancelWorkflow({force:!this.hasPendingEdits})}catch{return void this.featureTemplatesViewModel.select(e,{emit:!1})}}if(!t)return;const i={layer:t.layer,template:t.template};if(t.supportsUpload)return this.featureTemplatesViewModel.select(e,{emit:!1}),this.startCreateFeaturesWorkflow(i);this.startCreateFeaturesWorkflowAtFeatureCreation(i)})),h((()=>this.view),"key-down",(t=>{"Escape"===t.key&&this.activeWorkflow?.keyboardCancellationEnabled&&(t.stopPropagation(),this.back())})),h((()=>this.sketchViewModel),["create","delete","update"],(t=>{const{activeWorkflow:e}=this,a="update"===e?.type,i=a?e.activeWorkflow?.layer:e?.layer,r=a?e?.activeWorkflow?.parentLayer:void 0,s=`sketch-${t.type}`;this.emit(s,{type:s,detail:t,layer:i,parentLayer:r})}),k),u((()=>this.view),(t=>{if(this._snappingManager=p(this._snappingManager),!t)return;const e=this.snappingOptions;this._snappingManager=new C({view:t,options:e}),this.ownSketchViewModel.snappingManager=this._snappingManager}),m),u((()=>this.snappingOptions),(t=>{this._snappingManager&&(this._snappingManager.options=t)}),m)])}destroy(){this._cancelWorkflow({warnIfNoWorkflow:!1}).then((()=>{this.view?.map?.remove(this._sketchGraphicsLayer),this.view=null})),this._updateItemsTask=n(this._updateItemsTask),this._updatingHandles.destroy(),this._sketchEventListenerHandle=l(this._sketchEventListenerHandle)}get canCreate(){return this.editorItems.some((t=>t.supportsCreateFeaturesWorkflow))}get canCreateVisible(){return!!this.featureTemplatesLayers.length}get canUpdate(){return this.editorItems.some((t=>t.supportsUpdateWorkflow))}get canUpdateVisible(){return this.editorItems.some((t=>t.supportsUpdateWorkflow&&t.visible))}get featureTemplatesLayers(){const t=new a;for(const e of this.editorItems){const a=e.supportsCreateFeaturesWorkflow&&!e.isTable,i=this.hideTemplatesForInactiveLayers&&!e.visible;a&&!i&&t.push(e.layer)}return t}get featureFormViewModel(){const{activeWorkflow:t}=this;return"update"===t?.type?t.activeFeatureFormViewModel:"create-features"===t?.type?t.featureFormViewModel:null}get labelOptions(){return this.sketchOptions.labels}set labelOptions(t){this.sketchOptions.labels=t}get sketchViewModel(){const{activeWorkflow:t}=this;return"update"===t?.type?t.activeSketchViewModel:"create-features"===t?.type?t.sketchViewModel:this.ownSketchViewModel}get state(){if(!this.view?.ready)return"disabled";const t=this.attachmentsViewModel.mode;if("add"===t)return"adding-attachment";if("edit"===t)return"editing-attachment";const{activeWorkflow:e}=this;return e?.stepId?"update"===e.type&&e.activeWorkflow?.stepId?e.activeWorkflow.stepId:e.stepId:"ready"}get syncing(){return this._activityQueue.length>0}get updating(){return this._updatingHandles.updating||!0===this.activeWorkflow?.updating}get tooltipOptions(){return this.sketchOptions.tooltips}set tooltipOptions(t){this.sketchOptions.tooltips=t}get valueOptions(){return this.sketchOptions.values}set valueOptions(t){this.sketchOptions.values=t}set view(t){this.ownSketchViewModel.view=t,this.spinnerViewModel.view=t,this._set("view",t)}get page(){const{activeWorkflow:t,state:e}=this;if("update"===t?.type&&null!=t?.activeWorkflow?.featureFormViewModel.associatedLayer)return"viewing-associated-features";if("update"===t?.type&&null!=t?.activeWorkflow?.featureFormViewModel.associationId)return"viewing-associated-layers";if("update"===t?.type&&"awaiting-feature-to-update"===t.stepId)return"ready";if("create-features"===t?.type&&0===t.numPendingFeatures){const e=t.data.upload;if(e)return"default"===e.state?"ready":"creating-features-upload-details"}return e??"disabled"}get featureFormDisabled(){const{activeWorkflow:t}=this;return"update"===t?.type&&!1===t.activeEditorItem?.capabilities.update.attributes}get featureFormHasAssociation(){return!!this.featureFormViewModel?.activeAssociation}get canGoBack(){return null!=this.activeWorkflow&&!this.syncing}get shouldShowDeleteButton(){const{activeWorkflow:t}=this;return!!t&&"update"===t.type&&!!t.activeEditorItem?.capabilities.delete.enabled}get hasPendingEdits(){return this.activeWorkflow?.hasPendingEdits??!1}get snappingManager(){return this._snappingManager}async startCreateFeaturesWorkflowAtFeatureTypeSelection(){return this.startCreateFeaturesWorkflow()}async startCreateFeaturesWorkflowAtFeatureCreation(t){return this.startCreateFeaturesWorkflow(t,"creating-features")}async startCreateFeaturesWorkflow(t,e="awaiting-feature-creation-info"){if(await f((()=>!this.updating)),!this.canCreate)throw new i("editing:unsupported-workflow","Creating features is unsupported or disabled.");const a=this._createUpdatingResolver();try{await this._cancelWorkflow();const a=this._createCreateFeaturesWorkflow(t,e);this._set("activeWorkflow",a),await a.start()}catch(r){this._logErrorAndCancelWorkflow(r)}finally{a.resolve()}}async startCreateFeaturesWorkflowAtFeatureEdit(t){await f((()=>!this.updating));const e=this._createUpdatingResolver();try{const{initialFeature:e}=t,a=e.sourceLayer=e.layer,r=a?this.findEditorItemForLayer(a):void 0;if(!r?.supportsCreateFeaturesWorkflow)throw new i("editing:unsupported-workflow","Creating features is unsupported or disabled for this layer.");await this._cancelWorkflow();const s=this._createCreateFeaturesWorkflow({initialFeature:e,layer:r.layer,maxFeatures:1},"creating-features");this._set("activeWorkflow",s),await s.start()}catch(a){this._logErrorAndCancelWorkflow(a)}finally{e.resolve()}}async startUpdateWorkflowAtFeatureSelection(){if(await f((()=>!this.updating)),!this.canUpdate)return void x("editing:unsupported-workflow","Update workflow is unsupported or disabled.");const t=this._createUpdatingResolver();try{await this._cancelWorkflow();const t=this._createUpdateWorkflow();this._set("activeWorkflow",t),await t.start()}catch(e){this._logErrorAndCancelWorkflow(e)}finally{t.resolve()}}async startUpdateWorkflowAtMultipleFeatureSelection(t){if(await f((()=>!this.updating)),!this.canUpdate)return void x("editing:unsupported-workflow","Update workflow is unsupported or disabled.");const e=this._createUpdatingResolver();try{await this._cancelWorkflow();const e=this._createUpdateWorkflow("awaiting-update-feature-candidate");e.data.candidates=t,this._set("activeWorkflow",e),await e.start()}catch(a){this._logErrorAndCancelWorkflow(a)}finally{e.resolve()}}async startUpdateWorkflowAtFeatureEdit(t){if(await f((()=>!this.updating)),!this.canUpdate)return void x("editing:unsupported-workflow","Update workflow is unsupported or disabled.");const e=this._createUpdatingResolver();try{await this._cancelWorkflow();const e=this._createUpdateWorkflow("editing-existing-feature");e.data.rootFeature=t,this._set("activeWorkflow",e),await e.start()}catch(a){this._logErrorAndCancelWorkflow(a)}finally{e.resolve()}}async deleteFeatureFromWorkflow(){const{activeWorkflow:t}=this;t&&"update"===t.type?await t.deleteActiveFeature():x("editing:unsupported-workflow","Deleting a feature requires an active update workflow.")}async deleteAssociationFromWorkflow(){const{activeWorkflow:t}=this;t&&"update"===t.type?await t.deleteActiveAssociation():x("editing:unsupported-workflow","Deleting an association requires an active update workflow.")}async cancelWorkflow(t){return this._cancelWorkflow({warnIfNoWorkflow:!0,...t})}findEditorItemForLayer(t){return this.editorItems.find((e=>e.layer===t))}itemHasInvalidFormTemplate(t){return null!=t&&!0===this.findEditorItemForLayer(t.layer)?.hasInvalidFormTemplate}syncFeatureTemplates(){this._featureTemplatesViewModelLocked||(this.featureTemplatesViewModel.layers=this.featureTemplatesLayers.toArray())}async toggleUpdateWorkflow(){this.canUpdate&&(this.hasPendingEdits&&!await this.showDiscardEditsPrompt()||(this.activeWorkflow&&"awaiting-feature-to-update"===this.state?await this.cancelWorkflow({force:!0}):await this.startUpdateWorkflowAtFeatureSelection()))}lockFeatureTemplatesViewModel(){return this._featureTemplatesViewModelLocked=!0,s((()=>{this._featureTemplatesViewModelLocked=!1,this.syncFeatureTemplates()}))}async _getEditorItemCandidates(t){const{view:e}=this;if(!e?.map)return[];const{map:a}=e,i=a.editableLayers.toArray()??[],r=a.allTables.toArray().filter(E)??[];return await Promise.allSettled([...i.map((t=>"subtype-group"===t.type?t.loadAll():Promise.resolve())),...r.map((t=>t.load()))]),d(t),[...i.reverse(),...r.reverse()].filter((t=>F(t)&&("mesh"!==t.geometryType||"3d"===e.type))).flatMap((t=>"subtype-group"===t.type?t.sublayers.toArray():t))}_drainEditorItems(){this.editorItems.drain((t=>t.destroy()))}async _updateEditorItems(){n(this._updateItemsTask);const{view:t}=this,a=e((async e=>{if(!t?.map||!t?.allLayerViews)return;const a=await this._getEditorItemCandidates(e);if(!a.length)return void this._drainEditorItems();const i=[],r=[],s=[],{layerInfos:o}=this;for(const l of a){const e=D(o,l),a=await T(t,l).catch((()=>null));(e?i:a?r:s).push(new L({layer:l,layerInfo:e,layerView:a}))}o?.length&&i.sort(((t,e)=>o.findIndex((({layer:e})=>e===t.layer))-o.findIndex((({layer:t})=>t===e.layer))));const n=[...i,...r,...s];e.aborted||(this._drainEditorItems(),this.editorItems.addMany(n))}));this._updatingHandles.addPromise(a.promise),this._updateItemsTask=a}_afterEditorItemsChange(){const{activeWorkflow:t}=this;if(this.syncFeatureTemplates(),!t)return;const{stepId:e}=t;"create-features"!==t.type?"update"===t.type&&("awaiting-feature-to-update"===e&&!this.canUpdateVisible||"awaiting-update-feature-candidate"===e&&!t.hasUpdatableCandidates)&&this._cancelWorkflow():"awaiting-feature-creation-info"!==e||this.canCreate||this._cancelWorkflow()}async _cancelWorkflow(t){const e=this.activeWorkflow;if(!e)return void(t?.warnIfNoWorkflow&&x("editing:no-active-workflow","There is no active workflow to cancel."));if(!t||!1!==t.force)return this.emit("workflow-cancel"),this._set("activeWorkflow",null),void await e.cancel(t);await e.cancel(t),this._set("activeWorkflow",null)}_createCreateFeaturesWorkflow(t,e){return U.create({viewModel:this,creationInfo:t,sketchOptions:this.sketchOptions,snappingManager:this._snappingManager,startAt:e,applyEditsCallback:(t,e,a)=>this._applyEdits(t,e,a),addAttachmentsCallback:(t,e)=>this._addAttachments(t,e)})}_createUpdateWorkflow(t){return O.create({viewModel:this,sketchOptions:this.sketchOptions,snappingManager:this._snappingManager,startAt:t,applyEditsCallback:(t,e,a)=>this._applyEdits(t,e,a),applyEditsAssociationCallback:(t,e,a)=>this._applyEditsAssociation(t,e,a),addAttachmentsCallback:(t,e)=>this._addAttachments(t,e)})}_addAttachments(t,e){const a=e.map((e=>this._addAttachment(t,e.feature,e.attachment)))??[];return Promise.all(a)}async _addAttachment(t,e,a){let r=null;if(!("addAttachment"in t)||null==t.capabilities?.attachment)throw new i("editor:attachments-not-supported","Adding attachments is not supported for this layer type");return await this._queueOperation((async()=>(r=await(t.addAttachment?.(e,a).catch((t=>{throw t?.error||t})))??null,r))),r}async _applyEdits(t,e,a){let i=null;const r=t.url?await I(t.url):null,s={returnServiceEditsOption:(!r||!M(r))&&!RegExp("/hosted/","i").test(t.url)?"original-and-current-features":void 0,...a};return await this._queueOperation((async()=>{const{view:a}=this;if(!a)return null;const r=await T(a,t).catch((()=>null));return i=await t.applyEdits(e,s),r&&await f((()=>!r.updating)),i})),i}async _applyEditsAssociation(t,e,a){let i=null;const r={globalIdUsed:!0,...a};return await this._queueOperation((async()=>i=await t.applyEdits(e,r))),i}_queueOperation(t){this._activityQueue.push(t);const e=(t,e)=>{const a=e.indexOf(t);a>-1&&e.splice(a,1)};return t().then((t=>(Array.isArray(t)?t.forEach((t=>this._handleEditsResultError(t))):this._handleEditsResultError(t),t))).catch((a=>{x("editing:operation-error","An error occurred.",{error:a});const i={error:a,retry:()=>(e(i,this.failures),this._queueOperation(t)),cancel:()=>{e(i,this.failures)}};this._set("failures",[...this.failures,i])})).then((()=>{e(t,this._activityQueue)}))}_handleEditsResultError(t){if(null!=t&&"error"in t&&null!=t.error)throw t.error;if(null!=t&&"addFeatureResults"in t){const{addFeatureResults:e,deleteFeatureResults:a,updateFeatureResults:i}=t,r=e.find((t=>!!t.error))||i.find((t=>!!t.error))||a.find((t=>!!t.error));if(r)throw r.error}}_createUpdatingResolver(){const t=c();return this._updatingHandles.addPromise(t.promise),t}_logErrorAndCancelWorkflow(t){const{name:e,message:a,details:i}=t;x(e??"editing:workflow-start-failed",a??void 0,i??t),this._cancelWorkflow({force:!0})}_itemIsSuspended(t){const e=this.findEditorItemForLayer(t);return null!=e&&(!e.visible||e.disabled)}};t([g()],G.prototype,"_snappingManager",void 0),t([g({readOnly:!0})],G.prototype,"activeWorkflow",void 0),t([g({readOnly:!0})],G.prototype,"_activityQueue",void 0),t([g({readOnly:!0})],G.prototype,"canCreate",null),t([g()],G.prototype,"canCreateVisible",null),t([g({readOnly:!0})],G.prototype,"canUpdate",null),t([g()],G.prototype,"canUpdateVisible",null),t([g()],G.prototype,"featureTemplatesLayers",null),t([g()],G.prototype,"editorItems",void 0),t([g({readOnly:!0})],G.prototype,"failures",void 0),t([g()],G.prototype,"hideTemplatesForInactiveLayers",void 0),t([g({type:A})],G.prototype,"attachmentsViewModel",void 0),t([g()],G.prototype,"featureFormViewModel",null),t([g({type:S})],G.prototype,"featureTemplatesViewModel",void 0),t([g()],G.prototype,"labelOptions",null),t([g()],G.prototype,"layerInfos",void 0),t([g()],G.prototype,"ownSketchViewModel",void 0),t([g()],G.prototype,"sketchOptions",void 0),t([g()],G.prototype,"sketchViewModel",null),t([g({type:V,nonNullable:!0})],G.prototype,"snappingOptions",void 0),t([g()],G.prototype,"spinnerViewModel",void 0),t([g()],G.prototype,"state",null),t([g({readOnly:!0})],G.prototype,"syncing",null),t([g()],G.prototype,"updating",null),t([g()],G.prototype,"tooltipOptions",null),t([g()],G.prototype,"valueOptions",null),t([g()],G.prototype,"view",null),t([g()],G.prototype,"pageStack",void 0),t([g()],G.prototype,"showDiscardEditsPrompt",void 0),t([g()],G.prototype,"_candidateCommitted",void 0),t([g()],G.prototype,"page",null),t([g()],G.prototype,"featureFormDisabled",null),t([g()],G.prototype,"featureFormHasAssociation",null),t([g()],G.prototype,"canGoBack",null),t([g()],G.prototype,"shouldShowDeleteButton",null),t([g()],G.prototype,"hasPendingEdits",null),t([g()],G.prototype,"snappingManager",null),G=t([v(R)],G);const q=G;export{q as default};
|