@arcgis/core 4.33.0-next.20250417 → 4.33.0-next.20250418
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{afcb12bf54a5656f641e.js → 02176f84d6d57f1bc1c8.js} +2 -2
- package/assets/esri/core/workers/chunks/{afcb12bf54a5656f641e.js.LICENSE.txt → 02176f84d6d57f1bc1c8.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{2db5dd5638c93b0af102.js → 0a7cba60a5286ba621d4.js} +1 -1
- package/assets/esri/core/workers/chunks/0c6f2808c57ff820bfdd.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/244d2196bac5ef279436.js +1 -0
- package/assets/esri/core/workers/chunks/32f2e0c88046b39916cc.js +1 -0
- package/assets/esri/core/workers/chunks/38f9ede26098eb03ca2d.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{c616139a160eab9cd717.js → 4867a515ddbdab97cc61.js} +1 -1
- package/assets/esri/core/workers/chunks/5db336767959507c07e5.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/814d72abbfdd4552e4ec.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/93f792f5b94f3745b57d.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/ae13bd77a25ce8b54631.js +1 -0
- package/assets/esri/core/workers/chunks/c5d786166a5609b85276.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/d28e2c9bdf514236b011.js +1 -0
- package/assets/esri/core/workers/chunks/dbaa4b8d37aab40d7bd1.js.LICENSE.txt +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
- package/chunks/BloomComposition.glsl.js +25 -19
- package/chunks/ChapmanAtmosphere.glsl.js +1 -1
- package/chunks/Fog.glsl.js +3 -3
- package/chunks/Haze.glsl.js +1 -1
- package/interfaces.d.ts +89 -0
- package/layers/VideoLayer.js +1 -1
- package/layers/support/domainUtils.js +1 -1
- package/layers/support/fieldUtils.js +1 -1
- package/layers/support/labelingInfo.js +1 -1
- package/layers/support/serviceCapabilitiesUtils.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/layers/video/videoUtils.js +1 -1
- package/networks/UtilityNetwork.js +1 -1
- package/package.json +2 -2
- package/rest/featureService/FeatureService.js +1 -1
- package/rest/networks/support/NetworkElement.js +1 -1
- package/rest/networks/support/TelecomNetworkElement.js +5 -0
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/FeatureTile.js +1 -1
- package/views/2d/engine/webgl/collisions/LabelMetric.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/layers/VideoLayerView2D.js +1 -1
- package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
- package/views/3d/environment/ChapmanAtmosphereTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +8 -8
- package/views/3d/webgl-engine/effects/bloom/BloomComposition.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/bloom/BloomCompositionTechniqueConfiguration.js +5 -0
- package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
- package/views/3d/webgl-engine/effects/haze/HazeTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ToneMapping.glsl.js +20 -2
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageLocationWidget.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/ScaleRangeSlider/ScaleRangeSliderViewModel.js +1 -1
- package/widgets/Slider/SliderViewModel.js +1 -1
- package/widgets/Slider.js +1 -1
- package/widgets/support/Selector2D/SelectionOperation.js +1 -1
- package/assets/esri/core/workers/chunks/3b8eee013d7ca156ef2d.js +0 -1
- package/assets/esri/core/workers/chunks/3ee505f9ddb671dcfa52.js +0 -1
- package/assets/esri/core/workers/chunks/7f36cffc6ed984b7e467.js +0 -1
- package/assets/esri/core/workers/chunks/efb0f3ec2344adcb24f3.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"title":"Oriented imagery viewer","currentFootprint":"Current footprint","accuracy":"Accuracy","accuracyInformation":"Accuracy is calculated using the Orientation Accuracy property defined in the oriented imagery layer's service.","additionalFootprints":"Additional footprints","additionalCameraLocations":"Additional camera locations","groundArea":"Ground area","groundDistance":"Ground distance","imageAttributes":"Image attributes","imageEnhancement":"Image enhancement","imageGallery":"Image gallery","float":"Float","dock":"Dock","footprint":"Footprint","heightAboveGround":"Height above ground","groundLocation":"Ground location","noImageError":"No image available for the selected location.","onLoadMessage":"Select a location on map to view imagery.","imageLoadError":"Error occurred while loading the image.","measurementTools":"Image measurement tools","measurementTable":"Measurement table","mapImageConversionTool":"Map-image location tool","brightness":"Brightness","contrast":"Contrast","sharpness":"Sharpness","navigationTool":"Navigation tool","noLocalPort":"A value for local port is not provided. Local port is required to load local images.","noAttachment":"No image or attachment available for the selected location.","currentFootprintTooltip":"Toggle visibility of the displayed image's footprint.","additionalFootprintsTooltip":"Toggle visibility of all additional footprints containing the location of interest.","additionalCameraLocationsTooltip":"Toggle visibility of all additional camera locations of images containing the location of interest.","navigationTooltip":"Explore returned images in relation to the location of interest.","imageEnhancementTooltip":"Adjust image brightness, contrast, and sharpening.","imageGalleryTooltip":"Explore thumbnails of all images depicting the location of interest.","mapImageConversionTooltip":"Click on the image to see where that location is on the map, and vice versa.","newMeasurement":"New measurement","unsupportedPanoramicImageryError":"Viewer currently does not support visualizing {datasetFormat} 360-degree imagery.","showPopups":"Show pop-ups","startMeasurement":"Start measuring","overlayCameraLocations":"Overlay camera locations","overlayMapFeatures":"Overlay map features","imageOverlays":"Image overlays","invalidCameraHeadingWarningTitle":"Invalid CameraHeading","invalidCameraHeadingWarningDescription":"CameraHeading value is invalid for the selected image. All the oriented imagery viewer tools using CameraHeading value are disabled. Assign a valid value for the field in the attribute table to enable the tools.","createFeaturesFromImage":"Create features from image","value":"Value"}
|
|
1
|
+
{"title":"Oriented imagery viewer","currentFootprint":"Current footprint","accuracy":"Accuracy","accuracyInformation":"Accuracy is calculated using the Orientation Accuracy property defined in the oriented imagery layer's service.","additionalFootprints":"Additional footprints","additionalCameraLocations":"Additional camera locations","basemap":"Basemap","groundArea":"Ground area","groundDistance":"Ground distance","imageAttributes":"Image attributes","imageEnhancement":"Image enhancement","imageGallery":"Image gallery","float":"Float","dock":"Dock","footprint":"Footprint","heightAboveGround":"Height above ground","groundLocation":"Ground location","noImageError":"No image available for the selected location.","onLoadMessage":"Select a location on map to view imagery.","imageLoadError":"Error occurred while loading the image.","measurementTools":"Image measurement tools","measurementTable":"Measurement table","mapImageConversionTool":"Map-image location tool","brightness":"Brightness","contrast":"Contrast","sharpness":"Sharpness","navigationTool":"Navigation tool","noLocalPort":"A value for local port is not provided. Local port is required to load local images.","noAttachment":"No image or attachment available for the selected location.","currentFootprintTooltip":"Toggle visibility of the displayed image's footprint.","additionalFootprintsTooltip":"Toggle visibility of all additional footprints containing the location of interest.","additionalCameraLocationsTooltip":"Toggle visibility of all additional camera locations of images containing the location of interest.","navigationTooltip":"Explore returned images in relation to the location of interest.","imageEnhancementTooltip":"Adjust image brightness, contrast, and sharpening.","imageGalleryTooltip":"Explore thumbnails of all images depicting the location of interest.","mapImageConversionTooltip":"Click on the image to see where that location is on the map, and vice versa.","newMeasurement":"New measurement","unsupportedPanoramicImageryError":"Viewer currently does not support visualizing {datasetFormat} 360-degree imagery.","showPopups":"Show pop-ups","startMeasurement":"Start measuring","selectUnitSystem":"Select Unit System","overlayCameraLocations":"Overlay camera locations","overlayMapFeatures":"Overlay map features","imageOverlays":"Image overlays","invalidCameraHeadingWarningTitle":"Invalid CameraHeading","invalidCameraHeadingWarningDescription":"CameraHeading value is invalid for the selected image. All the oriented imagery viewer tools using CameraHeading value are disabled. Assign a valid value for the field in the attribute table to enable the tools.","createFeaturesFromImage":"Create features from image","value":"Value","xy":"XY","x":"X","y":"Y","z":"Z","type":"Type"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"title":"Oriented imagery viewer","currentFootprint":"Current footprint","accuracy":"Accuracy","accuracyInformation":"Accuracy is calculated using the Orientation Accuracy property defined in the oriented imagery layer's service.","additionalFootprints":"Additional footprints","additionalCameraLocations":"Additional camera locations","groundArea":"Ground area","groundDistance":"Ground distance","imageAttributes":"Image attributes","imageEnhancement":"Image enhancement","imageGallery":"Image gallery","float":"Float","dock":"Dock","footprint":"Footprint","heightAboveGround":"Height above ground","groundLocation":"Ground location","noImageError":"No image available for the selected location.","onLoadMessage":"Select a location on map to view imagery.","imageLoadError":"Error occurred while loading the image.","measurementTools":"Image measurement tools","measurementTable":"Measurement table","mapImageConversionTool":"Map-image location tool","brightness":"Brightness","contrast":"Contrast","sharpness":"Sharpness","navigationTool":"Navigation tool","noLocalPort":"A value for local port is not provided. Local port is required to load local images.","noAttachment":"No image or attachment available for the selected location.","currentFootprintTooltip":"Toggle visibility of the displayed image's footprint.","additionalFootprintsTooltip":"Toggle visibility of all additional footprints containing the location of interest.","additionalCameraLocationsTooltip":"Toggle visibility of all additional camera locations of images containing the location of interest.","navigationTooltip":"Explore returned images in relation to the location of interest.","imageEnhancementTooltip":"Adjust image brightness, contrast, and sharpening.","imageGalleryTooltip":"Explore thumbnails of all images depicting the location of interest.","mapImageConversionTooltip":"Click on the image to see where that location is on the map, and vice versa.","newMeasurement":"New measurement","unsupportedPanoramicImageryError":"Viewer currently does not support visualizing {datasetFormat} 360-degree imagery.","showPopups":"Show pop-ups","startMeasurement":"Start measuring","overlayCameraLocations":"Overlay camera locations","overlayMapFeatures":"Overlay map features","imageOverlays":"Image overlays","invalidCameraHeadingWarningTitle":"Invalid CameraHeading","invalidCameraHeadingWarningDescription":"CameraHeading value is invalid for the selected image. All the oriented imagery viewer tools using CameraHeading value are disabled. Assign a valid value for the field in the attribute table to enable the tools.","createFeaturesFromImage":"Create features from image","value":"Value"}
|
|
1
|
+
{"title":"Oriented imagery viewer","currentFootprint":"Current footprint","accuracy":"Accuracy","accuracyInformation":"Accuracy is calculated using the Orientation Accuracy property defined in the oriented imagery layer's service.","additionalFootprints":"Additional footprints","additionalCameraLocations":"Additional camera locations","basemap":"Basemap","groundArea":"Ground area","groundDistance":"Ground distance","imageAttributes":"Image attributes","imageEnhancement":"Image enhancement","imageGallery":"Image gallery","float":"Float","dock":"Dock","footprint":"Footprint","heightAboveGround":"Height above ground","groundLocation":"Ground location","noImageError":"No image available for the selected location.","onLoadMessage":"Select a location on map to view imagery.","imageLoadError":"Error occurred while loading the image.","measurementTools":"Image measurement tools","measurementTable":"Measurement table","mapImageConversionTool":"Map-image location tool","brightness":"Brightness","contrast":"Contrast","sharpness":"Sharpness","navigationTool":"Navigation tool","noLocalPort":"A value for local port is not provided. Local port is required to load local images.","noAttachment":"No image or attachment available for the selected location.","currentFootprintTooltip":"Toggle visibility of the displayed image's footprint.","additionalFootprintsTooltip":"Toggle visibility of all additional footprints containing the location of interest.","additionalCameraLocationsTooltip":"Toggle visibility of all additional camera locations of images containing the location of interest.","navigationTooltip":"Explore returned images in relation to the location of interest.","imageEnhancementTooltip":"Adjust image brightness, contrast, and sharpening.","imageGalleryTooltip":"Explore thumbnails of all images depicting the location of interest.","mapImageConversionTooltip":"Click on the image to see where that location is on the map, and vice versa.","newMeasurement":"New measurement","unsupportedPanoramicImageryError":"Viewer currently does not support visualizing {datasetFormat} 360-degree imagery.","showPopups":"Show pop-ups","startMeasurement":"Start measuring","selectUnitSystem":"Select Unit System","overlayCameraLocations":"Overlay camera locations","overlayMapFeatures":"Overlay map features","imageOverlays":"Image overlays","invalidCameraHeadingWarningTitle":"Invalid CameraHeading","invalidCameraHeadingWarningDescription":"CameraHeading value is invalid for the selected image. All the oriented imagery viewer tools using CameraHeading value are disabled. Assign a valid value for the field in the attribute table to enable the tools.","createFeaturesFromImage":"Create features from image","value":"Value","xy":"XY","x":"X","y":"Y","z":"Z","type":"Type"}
|
|
@@ -2,22 +2,28 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{ScreenSpacePass as o}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{Gamma as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{FloatPassUniform as l}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{FloatsPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/FloatsPassUniform.js";import{glsl as t}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{IntegerPassUniform as a}from"../views/3d/webgl-engine/core/shaderModules/IntegerPassUniform.js";import{Texture2DPassUniform as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
vec4
|
|
11
|
-
vec4
|
|
12
|
-
vec4
|
|
13
|
-
vec4
|
|
14
|
-
|
|
15
|
-
fragColor = lodFactors[0] * lod0;
|
|
16
|
-
fragColor += lodFactors[1] * lod1;
|
|
17
|
-
fragColor += lodFactors[2] * lod2;
|
|
18
|
-
fragColor += lodFactors[3] * lod3;
|
|
19
|
-
fragColor += lodFactors[4] * lod4;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
fragColor
|
|
23
|
-
|
|
5
|
+
import{ScreenSpacePass as o}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{Gamma as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{FloatPassUniform as l}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{FloatsPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/FloatsPassUniform.js";import{glsl as t}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{IntegerPassUniform as a}from"../views/3d/webgl-engine/core/shaderModules/IntegerPassUniform.js";import{Texture2DPassUniform as n}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{defaultExposure as d,lodFactorsPresets as i}from"../views/3d/webgl-engine/effects/bloom/BloomPresets.glsl.js";import{ToneMapping as m,ToneMappingFunction as u}from"../views/3d/webgl-engine/shaders/ToneMapping.glsl.js";import{NoParameters as c}from"../views/webgl/NoParameters.js";import{ShaderBuilder as g}from"../views/webgl/ShaderBuilder.js";class b extends c{constructor(o=d,e=i.sunny.far,r=i.sunny.near){super(),this.exposure=o,this.lodFactors=e,this.lodFactorsFront=r}}const f=new b;class p extends b{constructor(){super(...arguments),this.bloomLod=-1}}function w(d){const i=new g,c=i.fragment;i.include(o),i.include(r),c.include(e),c.include(m,d);const b=d.toneMapping;return c.uniforms.add(new n("colorTexture",(o=>o.color)),new n("bloomTexture0",(o=>o.bloomTexture0)),new n("bloomTexture1",(o=>o.bloomTexture1)),new n("bloomTexture2",(o=>o.bloomTexture2)),new n("bloomTexture3",(o=>o.bloomTexture3)),new n("bloomTexture4",(o=>o.bloomTexture4)),new l("exposure",(o=>o.exposure)),new a("bloomLod",(o=>o.bloomLod)),new s("lodFactors",(o=>o.lodFactors),5),new s("lodFactorsFront",(o=>o.lodFactorsFront),5)).main.add(t`
|
|
6
|
+
vec4 color = texture(colorTexture, uv);
|
|
7
|
+
color = vec4(linearizeGamma(color.rgb), color.a);
|
|
8
|
+
|
|
9
|
+
vec4 lod0 = texture(bloomTexture0, uv);
|
|
10
|
+
vec4 lod1 = texture(bloomTexture1, uv);
|
|
11
|
+
vec4 lod2 = texture(bloomTexture2, uv);
|
|
12
|
+
vec4 lod3 = texture(bloomTexture3, uv);
|
|
13
|
+
vec4 lod4 = texture(bloomTexture4, uv);
|
|
14
|
+
|
|
15
|
+
fragColor = lodFactors[0] * lod0;
|
|
16
|
+
fragColor += lodFactors[1] * lod1;
|
|
17
|
+
fragColor += lodFactors[2] * lod2;
|
|
18
|
+
fragColor += lodFactors[3] * lod3;
|
|
19
|
+
fragColor += lodFactors[4] * lod4;
|
|
20
|
+
|
|
21
|
+
// only for bloom editor lod debugging
|
|
22
|
+
fragColor = bloomLod == 0 ? lodFactors[0] * lod0 : bloomLod == 1 ? lodFactors[1] * lod1 : bloomLod == 2 ? lodFactors[2] * lod2 : bloomLod == 3 ? lodFactors[3] * lod3 : bloomLod == 4 ? lodFactors[4] * lod4 : fragColor;
|
|
23
|
+
|
|
24
|
+
// tonemapping is only applied to the emissive part since main color values are not in HDR.
|
|
25
|
+
fragColor = vec4(
|
|
26
|
+
${b===u.KronosNeutral?"tonemapKhronosNeutral(fragColor.rgb, exposure)":b===u.ACES?"tonemapACES(fragColor.rgb)":"tonemapSimpleExposure(fragColor.rgb, exposure)"}, fragColor.a);
|
|
27
|
+
fragColor += color;
|
|
28
|
+
fragColor = delinearizeGamma(fragColor);
|
|
29
|
+
`),i}const x=Object.freeze(Object.defineProperty({__proto__:null,BloomCompositionPassParameters:p,build:w,defaultCompositionParameters:f},Symbol.toStringTag,{value:"Module"}));export{p as B,x as a,w as b,f as d};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{ChapmanRaymarching as e}from"../views/3d/environment/ChapmanRaymarching.glsl.js";import{Gamma as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{addMainLightDirection as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{Float3PassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as o,If as n}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as l}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{ScreenSpacePassAtmosphere as s}from"../views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js";import{SphereIntersect as c}from"../views/3d/webgl-engine/shaders/SphereIntersect.glsl.js";import{ToneMapping as m}from"../views/3d/webgl-engine/shaders/ToneMapping.glsl.js";import{ShaderBuilder as d}from"../views/webgl/ShaderBuilder.js";function g(g){const h=new d;h.include(s);const{reduced:p}=g,{fragment:u}=h;return a(u),h.include(r),u.include(c),u.include(m),u.include(e,!1),u.uniforms.add(new t("backgroundColor",(e=>e.backgroundColor)),new i("innerFadeDistance",(e=>e.innerFadeDistance)),new i("altitudeFade",(e=>e.altitudeFade)),new l("depthTexture",(e=>e.mainDepth))).code.add(o`vec4 applyUndergroundAtmosphere(vec3 rayDir, vec3 lightDirection, vec4 fragColor) {
|
|
5
|
+
import{ChapmanRaymarching as e}from"../views/3d/environment/ChapmanRaymarching.glsl.js";import{Gamma as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{addMainLightDirection as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{Float3PassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as o,If as n}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as l}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{ScreenSpacePassAtmosphere as s}from"../views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js";import{SphereIntersect as c}from"../views/3d/webgl-engine/shaders/SphereIntersect.glsl.js";import{ToneMapping as m}from"../views/3d/webgl-engine/shaders/ToneMapping.glsl.js";import{ShaderBuilder as d}from"../views/webgl/ShaderBuilder.js";function g(g){const h=new d;h.include(s);const{reduced:p}=g,{fragment:u}=h;return a(u),h.include(r),u.include(c),u.include(m,g),u.include(e,!1),u.uniforms.add(new t("backgroundColor",(e=>e.backgroundColor)),new i("innerFadeDistance",(e=>e.innerFadeDistance)),new i("altitudeFade",(e=>e.altitudeFade)),new l("depthTexture",(e=>e.mainDepth))).code.add(o`vec4 applyUndergroundAtmosphere(vec3 rayDir, vec3 lightDirection, vec4 fragColor) {
|
|
6
6
|
float rayPlanetDistance = heightParameters[1] - radii[0] * radii[0];
|
|
7
7
|
vec2 rayPlanetIntersect = sphereIntersect(cameraPosition, rayDir, rayPlanetDistance);
|
|
8
8
|
if (!((rayPlanetIntersect.x <= rayPlanetIntersect.y) && rayPlanetIntersect.y > 0.0)) {
|
package/chunks/Fog.glsl.js
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{create as e}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{ReadDepth as r}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{Gamma as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{Float3BindUniform as a}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{Float3PassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as i}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as n}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{ScreenSpacePassAtmosphere as m}from"../views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js";import{SphereIntersect as l}from"../views/3d/webgl-engine/shaders/SphereIntersect.glsl.js";import{ToneMapping as d}from"../views/3d/webgl-engine/shaders/ToneMapping.glsl.js";import{NoParameters as
|
|
5
|
+
import{create as e}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{ReadDepth as r}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{Gamma as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{Float3BindUniform as a}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{Float3PassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as i}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as n}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{ScreenSpacePassAtmosphere as m}from"../views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js";import{SphereIntersect as l}from"../views/3d/webgl-engine/shaders/SphereIntersect.glsl.js";import{ToneMapping as d,ToneMappingFunction as g}from"../views/3d/webgl-engine/shaders/ToneMapping.glsl.js";import{NoParameters as p}from"../views/webgl/NoParameters.js";import{ShaderBuilder as c}from"../views/webgl/ShaderBuilder.js";class f extends p{constructor(){super(...arguments),this.color=e(),this.strength=4e-6,this.atmosphereC=1,this.amount=0}}function h(){const e=new c;e.include(m,{needUVs:!0,needEyeDirection:!0});const p=e.fragment;return p.uniforms.add(new s("atmosphereC",(e=>e.atmosphereC)),new a("cameraPosition",(e=>e.camera.eye)),new n("depthTexture",(e=>e.mainDepth)),new s("fogStrength",(e=>e.strength)),new s("fogAmount",(e=>e.amount)),new t("fogColor",(e=>e.color))),e.include(o),p.include(l),p.include(d,{toneMapping:g.ACES}),p.include(r),p.code.add(i`float getFogAmount(float dist, vec3 rayDir) {
|
|
6
6
|
if(dist == -1.0){
|
|
7
7
|
dist = 0.055 * sphereIntersect(cameraPosition, rayDir, atmosphereC).y;
|
|
8
8
|
}
|
|
9
9
|
return fogAmount * (1.0 - exp(-dist * fogStrength));
|
|
10
|
-
}`),
|
|
10
|
+
}`),p.main.add(i`vec3 rayDir = normalize(worldRay);
|
|
11
11
|
float terrainDepth = -1.0;
|
|
12
12
|
float depthSample = depthFromTexture(depthTexture, uv);
|
|
13
13
|
if(depthSample < 1.0 && depthSample > 0.0){
|
|
@@ -18,4 +18,4 @@ terrainDepth = max(0.0, length(cameraSpaceRay));
|
|
|
18
18
|
}
|
|
19
19
|
float fogAmount = getFogAmount(terrainDepth, rayDir);
|
|
20
20
|
vec4 fog = vec4(fogColor, 1.0) * fogAmount;
|
|
21
|
-
fragColor = delinearizeGamma(vec4(tonemapACES(fog.rgb), fog.a));`),e}const
|
|
21
|
+
fragColor = delinearizeGamma(vec4(tonemapACES(fog.rgb), fog.a));`),e}const u=Object.freeze(Object.defineProperty({__proto__:null,FogPassParameters:f,build:h},Symbol.toStringTag,{value:"Module"}));export{f as F,u as a,h as b};
|
package/chunks/Haze.glsl.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{ChapmanRaymarching as e}from"../views/3d/environment/ChapmanRaymarching.glsl.js";import{ReadDepth as r}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{Gamma as t}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{addMainLightDirection as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{FloatPassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as n,If as o}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as l}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{ScreenSpacePassAtmosphere as d}from"../views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js";import{SphereIntersect as s}from"../views/3d/webgl-engine/shaders/SphereIntersect.glsl.js";import{ToneMapping as p}from"../views/3d/webgl-engine/shaders/ToneMapping.glsl.js";import{ShaderBuilder as c}from"../views/webgl/ShaderBuilder.js";function h(h){const m=new c,{fragment:g}=m;m.include(d),a(g),m.include(t),g.include(r),g.include(s),g.include(p),g.include(e,!0),g.uniforms.add(new l("depthTexture",(e=>e.mainDepth)),new i("hazeStrength",(e=>e.hazeStrength)));const{reduced:u}=h;return u&&g.code.add(n`float getDepth(vec2 uv){
|
|
5
|
+
import{ChapmanRaymarching as e}from"../views/3d/environment/ChapmanRaymarching.glsl.js";import{ReadDepth as r}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{Gamma as t}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{addMainLightDirection as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{FloatPassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as n,If as o}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as l}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{ScreenSpacePassAtmosphere as d}from"../views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js";import{SphereIntersect as s}from"../views/3d/webgl-engine/shaders/SphereIntersect.glsl.js";import{ToneMapping as p}from"../views/3d/webgl-engine/shaders/ToneMapping.glsl.js";import{ShaderBuilder as c}from"../views/webgl/ShaderBuilder.js";function h(h){const m=new c,{fragment:g}=m;m.include(d),a(g),m.include(t),g.include(r),g.include(s),g.include(p,h),g.include(e,!0),g.uniforms.add(new l("depthTexture",(e=>e.mainDepth)),new i("hazeStrength",(e=>e.hazeStrength)));const{reduced:u}=h;return u&&g.code.add(n`float getDepth(vec2 uv){
|
|
6
6
|
return linearDepthFromTexture(depthTexture, uv);
|
|
7
7
|
}
|
|
8
8
|
float textureBilinear(vec2 uv) {
|
package/interfaces.d.ts
CHANGED
|
@@ -43891,6 +43891,14 @@ declare namespace __esri {
|
|
|
43891
43891
|
}
|
|
43892
43892
|
|
|
43893
43893
|
export class VideoLayer {
|
|
43894
|
+
/**
|
|
43895
|
+
* Indicates if the video layer is configured to start playback when ready.
|
|
43896
|
+
*
|
|
43897
|
+
* @default false
|
|
43898
|
+
*
|
|
43899
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html#autoplay Read more...}
|
|
43900
|
+
*/
|
|
43901
|
+
autoplay: boolean;
|
|
43894
43902
|
/**
|
|
43895
43903
|
* Blend modes are used to blend layers together to create an interesting effect in a layer, or even to produce what seems like a new layer.
|
|
43896
43904
|
*
|
|
@@ -43911,6 +43919,12 @@ declare namespace __esri {
|
|
|
43911
43919
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html#capabilities Read more...}
|
|
43912
43920
|
*/
|
|
43913
43921
|
readonly capabilities: VideoLayerCapabilities | nullish;
|
|
43922
|
+
/**
|
|
43923
|
+
* Defines the codecs on the media content of the video layer.
|
|
43924
|
+
*
|
|
43925
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html#codecs Read more...}
|
|
43926
|
+
*/
|
|
43927
|
+
readonly codecs: any | nullish;
|
|
43914
43928
|
/**
|
|
43915
43929
|
* The copyright information for the video layer.
|
|
43916
43930
|
*
|
|
@@ -43976,6 +43990,23 @@ declare namespace __esri {
|
|
|
43976
43990
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html#frameCount Read more...}
|
|
43977
43991
|
*/
|
|
43978
43992
|
readonly frameCount: number | nullish;
|
|
43993
|
+
/**
|
|
43994
|
+
* Provides filter functions that can be performed on the video frame to
|
|
43995
|
+
* achieve different visual effects.
|
|
43996
|
+
*
|
|
43997
|
+
* @default null
|
|
43998
|
+
*
|
|
43999
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html#frameEffect Read more...}
|
|
44000
|
+
*/
|
|
44001
|
+
frameEffect: any | nullish;
|
|
44002
|
+
/**
|
|
44003
|
+
* The opacity of the video frame draped on the map.
|
|
44004
|
+
*
|
|
44005
|
+
* @default 1
|
|
44006
|
+
*
|
|
44007
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html#frameOpacity Read more...}
|
|
44008
|
+
*/
|
|
44009
|
+
frameOpacity: number;
|
|
43979
44010
|
/**
|
|
43980
44011
|
* Indicates if the video layer should loop.
|
|
43981
44012
|
*
|
|
@@ -44081,6 +44112,12 @@ declare namespace __esri {
|
|
|
44081
44112
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html#url Read more...}
|
|
44082
44113
|
*/
|
|
44083
44114
|
url: string | nullish;
|
|
44115
|
+
/**
|
|
44116
|
+
* The video service version of this layer.
|
|
44117
|
+
*
|
|
44118
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html#version Read more...}
|
|
44119
|
+
*/
|
|
44120
|
+
readonly version: number | nullish;
|
|
44084
44121
|
/**
|
|
44085
44122
|
* The height of the video in pixels.
|
|
44086
44123
|
*
|
|
@@ -44127,6 +44164,15 @@ declare namespace __esri {
|
|
|
44127
44164
|
*/
|
|
44128
44165
|
get initialExtent(): Extent | nullish;
|
|
44129
44166
|
set initialExtent(value: ExtentProperties | nullish);
|
|
44167
|
+
/**
|
|
44168
|
+
* A {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleMarkerSymbol.html SimpleMarkerSymbol}, {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-CIMSymbol.html CIMSymbol}, or {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleMarkerSymbol.html SimpleMarkerSymbol} used for representing the point position geometry of the video sensor.
|
|
44169
|
+
*
|
|
44170
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html#sensorSymbol Read more...}
|
|
44171
|
+
*/
|
|
44172
|
+
get sensorSymbol(): SimpleMarkerSymbol | PictureMarkerSymbol | CIMSymbol;
|
|
44173
|
+
set sensorSymbol(value: | (SimpleMarkerSymbolProperties & { type: "simple-marker" })
|
|
44174
|
+
| (PictureMarkerSymbolProperties & { type: "picture-marker" })
|
|
44175
|
+
| (CIMSymbolProperties & { type: "cim" }));
|
|
44130
44176
|
/**
|
|
44131
44177
|
* The spatial reference of the video layer.
|
|
44132
44178
|
*
|
|
@@ -44136,6 +44182,15 @@ declare namespace __esri {
|
|
|
44136
44182
|
*/
|
|
44137
44183
|
get spatialReference(): SpatialReference;
|
|
44138
44184
|
set spatialReference(value: SpatialReferenceProperties);
|
|
44185
|
+
/**
|
|
44186
|
+
* The color set on telemetry display graphics for the video layer.
|
|
44187
|
+
*
|
|
44188
|
+
* @default new Color([255, 127, 0]);
|
|
44189
|
+
*
|
|
44190
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html#telemetryColor Read more...}
|
|
44191
|
+
*/
|
|
44192
|
+
get telemetryColor(): Color | nullish;
|
|
44193
|
+
set telemetryColor(value: ColorProperties | nullish);
|
|
44139
44194
|
/**
|
|
44140
44195
|
* The telemetry display for the video layer.
|
|
44141
44196
|
*
|
|
@@ -44174,6 +44229,12 @@ declare namespace __esri {
|
|
|
44174
44229
|
}
|
|
44175
44230
|
|
|
44176
44231
|
interface VideoLayerProperties extends LayerProperties, CustomParametersMixinProperties, ScaleRangeLayerProperties, BlendLayerProperties {
|
|
44232
|
+
/**
|
|
44233
|
+
* Indicates if the video layer is configured to start playback when ready.
|
|
44234
|
+
*
|
|
44235
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html#autoplay Read more...}
|
|
44236
|
+
*/
|
|
44237
|
+
autoplay?: boolean;
|
|
44177
44238
|
/**
|
|
44178
44239
|
* Blend modes are used to blend layers together to create an interesting effect in a layer, or even to produce what seems like a new layer.
|
|
44179
44240
|
*
|
|
@@ -44211,6 +44272,19 @@ declare namespace __esri {
|
|
|
44211
44272
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html#effect Read more...}
|
|
44212
44273
|
*/
|
|
44213
44274
|
effect?: Effect | nullish;
|
|
44275
|
+
/**
|
|
44276
|
+
* Provides filter functions that can be performed on the video frame to
|
|
44277
|
+
* achieve different visual effects.
|
|
44278
|
+
*
|
|
44279
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html#frameEffect Read more...}
|
|
44280
|
+
*/
|
|
44281
|
+
frameEffect?: any | nullish;
|
|
44282
|
+
/**
|
|
44283
|
+
* The opacity of the video frame draped on the map.
|
|
44284
|
+
*
|
|
44285
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html#frameOpacity Read more...}
|
|
44286
|
+
*/
|
|
44287
|
+
frameOpacity?: number;
|
|
44214
44288
|
/**
|
|
44215
44289
|
* The initial extent of the video layer.
|
|
44216
44290
|
*
|
|
@@ -44247,12 +44321,26 @@ declare namespace __esri {
|
|
|
44247
44321
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html#playbackRate Read more...}
|
|
44248
44322
|
*/
|
|
44249
44323
|
playbackRate?: number;
|
|
44324
|
+
/**
|
|
44325
|
+
* A {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleMarkerSymbol.html SimpleMarkerSymbol}, {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-CIMSymbol.html CIMSymbol}, or {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleMarkerSymbol.html SimpleMarkerSymbol} used for representing the point position geometry of the video sensor.
|
|
44326
|
+
*
|
|
44327
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html#sensorSymbol Read more...}
|
|
44328
|
+
*/
|
|
44329
|
+
sensorSymbol?: | (SimpleMarkerSymbolProperties & { type: "simple-marker" })
|
|
44330
|
+
| (PictureMarkerSymbolProperties & { type: "picture-marker" })
|
|
44331
|
+
| (CIMSymbolProperties & { type: "cim" });
|
|
44250
44332
|
/**
|
|
44251
44333
|
* The spatial reference of the video layer.
|
|
44252
44334
|
*
|
|
44253
44335
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html#spatialReference Read more...}
|
|
44254
44336
|
*/
|
|
44255
44337
|
spatialReference?: SpatialReferenceProperties;
|
|
44338
|
+
/**
|
|
44339
|
+
* The color set on telemetry display graphics for the video layer.
|
|
44340
|
+
*
|
|
44341
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html#telemetryColor Read more...}
|
|
44342
|
+
*/
|
|
44343
|
+
telemetryColor?: ColorProperties | nullish;
|
|
44256
44344
|
/**
|
|
44257
44345
|
* The telemetry display for the video layer.
|
|
44258
44346
|
*
|
|
@@ -44277,6 +44365,7 @@ declare namespace __esri {
|
|
|
44277
44365
|
supportsExportClip: boolean;
|
|
44278
44366
|
supportsExportFrameset: boolean;
|
|
44279
44367
|
supportsMensuration: boolean;
|
|
44368
|
+
supportsPreviews: boolean;
|
|
44280
44369
|
supportsUpdate: boolean;
|
|
44281
44370
|
}
|
|
44282
44371
|
|
package/layers/VideoLayer.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.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as
|
|
5
|
+
import{_ as t}from"../chunks/tslib.es6.js";import e from"../Color.js";import r from"../request.js";import o from"../core/Error.js";import{clamp as i}from"../core/mathUtils.js";import{MultiOriginJSONMixin as l}from"../core/MultiOriginJSONSupport.js";import{watch as s,whenOnce as n,initial as a}from"../core/reactiveUtils.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{reader as u}from"../core/accessorSupport/decorators/reader.js";import{subclass as y}from"../core/accessorSupport/decorators/subclass.js";import d from"../geometry/Extent.js";import c from"../geometry/Polyline.js";import m from"../geometry/SpatialReference.js";import h from"./Layer.js";import{BlendLayer as f}from"./mixins/BlendLayer.js";import{CustomParametersMixin as v}from"./mixins/CustomParametersMixin.js";import{ScaleRangeLayer as g}from"./mixins/ScaleRangeLayer.js";import{parse as O}from"./support/arcgisLayerUrl.js";import{url as j}from"./support/commonProperties.js";import S from"./support/PlaybackInfo.js";import{getVideoLayerCapabilities as b}from"./support/serviceCapabilitiesUtils.js";import T from"./support/TelemetryData.js";import C from"./support/TelemetryDisplay.js";import I from"./support/VideoFrame.js";import U from"./video/VideoController.js";import{getFrameHorizonPoints as x,getGroundControlPoints as w,getTelemetryData as N,getServiceLayersInfo as P,getSensorTrailPoints as E,readVideoTimeExtent as L}from"./video/videoUtils.js";import J from"../symbols/SimpleMarkerSymbol.js";let M=[];const R=new e([255,127,0]),k=new J({angle:0,color:R,outline:{color:[255,255,255],width:1.33},size:16,style:"circle"});let H=class extends(f(g(l(v(h))))){constructor(t){super(t),this.capabilities=null,this.codecs=null,this.connectionInfo=null,this.controller=new U,this.copyright=null,this.created=null,this.description=null,this.elevationSource=null,this.frame=null,this.frameCount=null,this.frameEffect=null,this.frameOpacity=1,this.fullExtent=null,this.initialExtent=null,this.layerId=null,this.playbackInfo=null,this.posterUrl=null,this.qualities=null,this.sensorSymbol=k,this.serviceItemId=null,this.sourceJSON=null,this.sourceQuality=null,this.sourceType=null,this.spatialReference=m.WGS84,this.start=0,this.telemetryDisplay=null,this.telemetryColor=R,this.title=null,this.type="video",this.url=null,this.version=null,this.videoLayersInfo=null,this.videoTimeExtent=null}initialize(){this.telemetryDisplay=new C({frame:!1,frameCenter:!1,frameOutline:!0,lineOfSight:!0,sensorLocation:!0,sensorTrail:!0}),this.addHandles([s((()=>this.metadata),(()=>{this.notifyChange("telemetry"),this.notifyChange("groundControlPoints"),this.notifyChange("frameHorizonPoints")})),s((()=>this.telemetry?.sensorLocation),(t=>this._setSensorTrail(t)),a)]),n((()=>"can-play"===this.state&&this.duration>0)).then((()=>{this.start>=0&&this.start<=this.duration&&this.setCurrentTime(this.start)}))}load(t){const e=null!=t?t.signal:null;return this.addResolvingPromise(this._fetchService(e)),Promise.resolve(this)}get autoplay(){return this.controller?.autoplay??!1}set autoplay(t){this.controller.autoplay=t}get buffered(){return this.controller.buffered}readCapabilitiesFromService(t,e){return b(e)}readConnectionInfo(t,e){const r=Object.values(e.connectionUrl);return r?.length&&(this.controller.playerUrl=r[0]),e.connectionUrl}get currentTime(){return this.controller.currentTime}get duration(){return this.controller.duration}get ended(){return this.controller.ended}get frameHorizonPoints(){return x(this.metadata)}get groundControlPoints(){return w(this.metadata)}get loop(){return this.controller.loop}set loop(t){this.controller.loop=t}get metadata(){return this.controller?.currentMetadata}get mimeType(){return this.controller?.mimeType}get muted(){return this.controller.muted}set muted(t){this.controller.muted=t}get playbackRate(){return this.controller.rate}set playbackRate(t){this.controller.rate=t}get playerUrl(){return this.controller.playerUrl}get playing(){return this.controller.playing}get state(){return this.controller.state}get telemetry(){return N(this.metadata)}get videoElement(){return this.controller?.element}get videoHeight(){return this.controller?.videoHeight}readLayerInfosFromService(t,e){return P(e)}get videoWidth(){return this.controller?.videoWidth}get waiting(){return this.controller.waiting}play(){this.controller.play()}pause(){this.controller.pause()}reset(){this.controller.reset()}setCurrentTime(t){if(this.duration<0)return;const e=i(t,0,this.duration);this.controller.setCurrentTime(e)}toGround(t,e){return this.controller?.sensorModel?.metadataSupportsTransforms?this.controller.sensorModel.transformImageToGeo(t,e):null}toVideo(t){if(!this.controller?.sensorModel?.metadataSupportsTransforms)return null;const e=this.controller.sensorModel.transformGeoToImage(t.x,t.y,t.z);return{x:e[0],y:e[1]}}async _fetchService(t){if(this.sourceJSON)return void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});const e=O(this.parsedUrl?.path);if(null==e)throw new o("arcgis-layers:url-mismatch","The url is not a valid arcgis resource");let i=null;const{data:l,ssl:s}=await r(e.url.path,{query:{f:"json",...this.parsedUrl.query,...this.customParameters},signal:t}),n=l;if(this.url=e.url.path,s&&(this.url=this.url.replace(/^http:/i,"https:")),!n?.currentVersion)return n.currentVersion="11.2",this.sourceJSON=n,void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});let a=e?.sublayer;if(null==a&&n.layers?.length&&(a=n.layers[0].id),null==a)throw new o("arcgis-layers:url-mismatch","The url is not a valid arcgis resource");this.url=`${e.url.path}/${a}`,i=await r(this.url,{query:{f:"json",...this.customParameters},signal:t});const p={...n,...i.data};this.sourceJSON=p,this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl})}_setSensorTrail(t){if(!t)return;const e=E(t,M);M=[...e];const r=M.map((t=>t.toArray())),o=new c({hasZ:t.hasZ,paths:[r]});this.telemetry.sensorTrail=o.clone()}};t([p()],H.prototype,"autoplay",null),t([p({readOnly:!0})],H.prototype,"buffered",null),t([p({readOnly:!0,json:{read:!1}})],H.prototype,"capabilities",void 0),t([u("service","capabilities",["supportsAppend","supportsCoverageQuery","supportsExportClip","supportsExportFrameset","supportsMensuration","supportsPreviews","supportsUpdate"])],H.prototype,"readCapabilitiesFromService",null),t([p({readOnly:!0})],H.prototype,"codecs",void 0),t([p({readOnly:!0})],H.prototype,"connectionInfo",void 0),t([u("connectionInfo",["connectionUrl"])],H.prototype,"readConnectionInfo",null),t([p()],H.prototype,"controller",void 0),t([p({type:String})],H.prototype,"copyright",void 0),t([p({readOnly:!0,type:Date})],H.prototype,"created",void 0),t([p({type:Number})],H.prototype,"currentTime",null),t([p({type:String})],H.prototype,"description",void 0),t([p({type:Number})],H.prototype,"duration",null),t([p({readOnly:!0})],H.prototype,"elevationSource",void 0),t([p({type:Boolean})],H.prototype,"ended",null),t([p({type:I})],H.prototype,"frame",void 0),t([p({readOnly:!0,type:Number})],H.prototype,"frameCount",void 0),t([p()],H.prototype,"frameEffect",void 0),t([p()],H.prototype,"frameOpacity",void 0),t([p({type:d})],H.prototype,"fullExtent",void 0),t([p({readOnly:!0})],H.prototype,"frameHorizonPoints",null),t([p({readOnly:!0})],H.prototype,"groundControlPoints",null),t([p({type:d})],H.prototype,"initialExtent",void 0),t([p({readOnly:!0,json:{read:{source:"id"}}})],H.prototype,"layerId",void 0),t([p({type:Boolean})],H.prototype,"loop",null),t([p({readOnly:!0})],H.prototype,"metadata",null),t([p({readOnly:!0})],H.prototype,"mimeType",null),t([p({type:Boolean})],H.prototype,"muted",null),t([p({type:S})],H.prototype,"playbackInfo",void 0),t([p({type:Number})],H.prototype,"playbackRate",null),t([p({type:String})],H.prototype,"playerUrl",null),t([p({readOnly:!0})],H.prototype,"playing",null),t([p({readOnly:!0,json:{read:{source:"poster"}}})],H.prototype,"posterUrl",void 0),t([p({readOnly:!0})],H.prototype,"qualities",void 0),t([p()],H.prototype,"sensorSymbol",void 0),t([p({readOnly:!0})],H.prototype,"serviceItemId",void 0),t([p()],H.prototype,"sourceJSON",void 0),t([p({readOnly:!0})],H.prototype,"sourceQuality",void 0),t([p({readOnly:!0,json:{name:"serviceType"}})],H.prototype,"sourceType",void 0),t([p()],H.prototype,"spatialReference",void 0),t([p()],H.prototype,"start",void 0),t([p({readOnly:!0,type:String})],H.prototype,"state",null),t([p({readOnly:!0,type:T})],H.prototype,"telemetry",null),t([p({type:C})],H.prototype,"telemetryDisplay",void 0),t([p({type:e})],H.prototype,"telemetryColor",void 0),t([p({readOnly:!1,json:{read:{source:"name"}}})],H.prototype,"title",void 0),t([p({readOnly:!0})],H.prototype,"type",void 0),t([p(j)],H.prototype,"url",void 0),t([p({readOnly:!0,type:Number,json:{read:{source:"currentVersion"}}})],H.prototype,"version",void 0),t([p({readOnly:!0})],H.prototype,"videoElement",null),t([p({readOnly:!0})],H.prototype,"videoHeight",null),t([p({readOnly:!0,json:{read:!1}})],H.prototype,"videoLayersInfo",void 0),t([u("service","videoLayersInfo",["id","name","poster","serviceType","type"])],H.prototype,"readLayerInfosFromService",null),t([p({readOnly:!0,nonNullable:!1,json:{read:{reader:L,source:"time"}}})],H.prototype,"videoTimeExtent",void 0),t([p({readOnly:!0})],H.prototype,"videoWidth",null),t([p({readOnly:!0})],H.prototype,"waiting",null),H=t([y("esri.layers.VideoLayer")],H);const V=H;export{V 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.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{union as e}from"../../core/SetUtils.js";import{dateOnlyToDateTime as n,timeOnlyToDateTime as i,timestampOffsetToDateTime as t}from"../../support/dateUtils.js";var r;!function(e){e.VALUE_OUT_OF_RANGE="domain-validation-error::value-out-of-range",e.INVALID_CODED_VALUE="domain-validation-error::invalid-coded-value"}(r||(r={}));const l=new Set(["integer","small-integer","big-integer","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeBigInteger"]);function u(e){return null!=e&&l.has(e.type)}function a(e){return null!=e&&("date-only"===e.type||"esriFieldTypeDateOnly"===e.type)}function o(e){return null!=e&&("timestamp-offset"===e.type||"esriFieldTypeTimestampOffset"===e.type)}function s(e){return null!=e&&("time-only"===e.type||"esriFieldTypeTimeOnly"===e.type)}const m=new Set([...["single","double"],...["esriFieldTypeSingle","esriFieldTypeDouble"]]),c=e(l,m);function d(e){return null!=e&&c.has(e.type)}function p(e){return null!=e&&("string"===e.type||"esriFieldTypeString"===e.type)}function y(e,n,i){const t=i??e?.domain;if(!t)return null;switch(t.type){case"range":{const{min:i,max:l}=f(e,t);if(null!=i&&+n<i||null!=l&&+n>l)return r.VALUE_OUT_OF_RANGE;break}case"coded-value":case"codedValue":if(null==t.codedValues||t.codedValues.every((e=>null==e||e.code!==n)))return r.INVALID_CODED_VALUE}return null}function f(e,n){const i=n??e?.domain;if(!i||"range"!==i.type)return;const t="range"in i?i.range[0]:i.minValue,r="range"in i?i.range[1]:i.maxValue,l=u(e);return a(e)||s(e)||o(e)?{...
|
|
5
|
+
import{union as e}from"../../core/SetUtils.js";import{dateOnlyToDateTime as n,timeOnlyToDateTime as i,timestampOffsetToDateTime as t}from"../../support/dateUtils.js";var r;!function(e){e.VALUE_OUT_OF_RANGE="domain-validation-error::value-out-of-range",e.INVALID_CODED_VALUE="domain-validation-error::invalid-coded-value"}(r||(r={}));const l=new Set(["integer","small-integer","long","big-integer","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeLong","esriFieldTypeBigInteger"]);function u(e){return null!=e&&l.has(e.type)}function a(e){return null!=e&&("date-only"===e.type||"esriFieldTypeDateOnly"===e.type)}function o(e){return null!=e&&("timestamp-offset"===e.type||"esriFieldTypeTimestampOffset"===e.type)}function s(e){return null!=e&&("time-only"===e.type||"esriFieldTypeTimeOnly"===e.type)}const m=new Set([...["single","double"],...["esriFieldTypeSingle","esriFieldTypeDouble"]]),c=e(l,m);function d(e){return null!=e&&c.has(e.type)}function p(e){return null!=e&&("string"===e.type||"esriFieldTypeString"===e.type)}function y(e,n,i){const t=i??e?.domain;if(!t)return null;switch(t.type){case"range":{const{min:i,max:l}=f(e,t);if(null!=i&&+n<i||null!=l&&+n>l)return r.VALUE_OUT_OF_RANGE;break}case"coded-value":case"codedValue":if(null==t.codedValues||t.codedValues.every((e=>null==e||e.code!==n)))return r.INVALID_CODED_VALUE}return null}function f(e,n){const i=n??e?.domain;if(!i||"range"!==i.type)return;const t="range"in i?i.range[0]:i.minValue,r="range"in i?i.range[1]:i.maxValue,l=u(e);return a(e)||s(e)||o(e)?{...F(e,r,t),isInteger:l}:{min:null!=t&&"number"==typeof t?t:null,max:null!=r&&"number"==typeof r?r:null,rawMin:t,rawMax:r,isInteger:l}}function g(e,n){switch(n.type){case"range":{const{min:i,max:t}=f(e,n);return a(e)||s(e)||o(e)?!!i&&!!t:"number"==typeof i&&Number.isFinite(i)&&"number"==typeof t&&Number.isFinite(t)}case"codedValue":case"coded-value":{const i=typeof n.codedValues[0].code;if("string"===i&&p(e)||"number"===i&&d(e))return!0}}return!1}function F(e,r,l){return a(e)?{min:n(l)?.toMillis(),max:n(r)?.toMillis(),rawMin:l,rawMax:r}:s(e)?{min:i(l)?.toMillis(),max:i(r)?.toMillis(),rawMin:l,rawMax:r}:o(e)?{min:t(l)?.toMillis(),max:t(r)?.toMillis(),rawMin:l,rawMax:r}:{max:null,min:null}}export{r as DomainValidationError,F as dateTimeFieldValuesToNumericRange,f as getDomainRange,g as isDomainValidForField,y as validateDomainValue};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../core/Error.js";import{getDeepValue as n,setDeepValue as i}from"../../core/object.js";import{union as t}from"../../core/SetUtils.js";import{parseWhereClause as r}from"../../core/sql.js";import{getDomainRange as l,DomainValidationError as o}from"./domainUtils.js";import{getFieldNameFromSimpleExpression as s}from"../../support/arcadeExpressionUtils.js";import{isStringOrNull as a,isString as u}from"../../support/guards.js";import{loadArcade as f}from"../../support/loadArcade.js";const c=/^([0-9_])/,d=/[^a-z0-9_\u0080-\uffff]+/gi;function p(e){if(null==e)return null;return e.trim().replaceAll(d,"_").replace(c,"F$1")||null}const m=["field","field2","field3","normalizationField","rotationInfo.field","proportionalSymbolInfo.field","proportionalSymbolInfo.normalizationField","colorInfo.field","colorInfo.normalizationField"],y=["field","normalizationField"];function g(e,n){if(null!=e&&null!=n)for(const i of Array.isArray(e)?e:[e])if(F(m,i,n),"visualVariables"in i&&i.visualVariables)for(const e of i.visualVariables)F(y,e,n)}function F(e,t,r){if(e)for(const l of e){const e=n(l,t),o=e&&"function"!=typeof e&&r.get(e);o&&i(l,o.name,t)}}function I(e,n){if(null!=e&&n?.fields?.length)if("startField"in e){const i=n.get(e.startField),t=n.get(e.endField);e.startField=i?.name??null,e.endField=t?.name??null}else{const i=n.get(e.startTimeField),t=n.get(e.endTimeField);e.startTimeField=i?.name??null,e.endTimeField=t?.name??null}}const b=new Set;function w(e,n){return e&&n?(b.clear(),x(b,e,n),Array.from(b).sort()):[]}function x(e,n,i){if(i)if(n?.fields?.length)if(i.includes("*"))for(const{name:t}of n.fields)e.add(t);else for(const t of i)T(e,n,t);else{if(i.includes("*"))return e.clear(),void e.add("*");for(const n of i)null!=n&&e.add(n)}}function T(e,n,i){if("string"==typeof i)if(n){const t=n.get(i);t&&e.add(t.name)}else e.add(i)}function h(e,n){return null==n||null==e?[]:n.includes("*")?(e.fields??[]).map((e=>e.name)):n}function E(e,n,i=1){if(!n||!e)return[];if(n.includes("*"))return["*"];const t=w(e,n);return t.length/e.fields.length>=i?["*"]:t}async function A(e,n,i){if(!i)return;let t;const r=s(i);if(r)t=[r];else{const{arcadeUtils:e}=await f();t=e.extractFieldNames(i,n?.fields?.map((e=>e.name)))}for(const l of t)T(e,n,l)}async function _(n,i,t){if(t&&"1=1"!==t){const l=await r(t,i);if(!l.isStandardized)throw new e("fieldUtils:collectFilterFields","Where clause is not standardized",{where:t});x(n,i,l.fieldNames)}}function v({displayField:e,fields:n}){return e||(n?.length?N(n,"name-or-title")||N(n,"unique-identifier")||N(n,"type-or-category")||S(n):null)}function S(e){for(const n of e){if(!n?.name)continue;const e=n.name.toLowerCase();if(e.includes("name")||e.includes("title"))return n.name}return null}function N(e,n){for(const i of e)if(i?.valueType&&i.valueType===n)return i.name;return null}async function $(e){if(!e)return[];const n=new Set;return await L(n,e),Array.from(n).sort()}async function L(e,n){if(!n)return;const i=n.elevationInfo?.featureExpressionInfo;return i?i.collectRequiredFields(e,n.fieldsIndex):void 0}function O(e,n,i){i.onStatisticExpression?A(e,n,i.onStatisticExpression.expression):e.add(i.onStatisticField)}async function D(e,n,i){if(!n||!i||!("fields"in i))return;const t=[],r=i.popupTemplate;t.push(V(e,n,r)),i.fields&&t.push(...i.fields.map((async i=>O(e,n.fieldsIndex,i)))),await Promise.all(t)}async function M(e,n){const{fieldsIndex:i,trackInfo:t}=n;if(!n||!t||!i)return;const r=[t.latestObservations.renderer?.collectRequiredFields(e,i),t.previousObservations.renderer?.collectRequiredFields(e,i),t.trackLines.renderer?.collectRequiredFields(e,i)];t.popupTemplate&&r.push(V(e,n,t.popupTemplate));for(const l of[t.latestObservations.labelingInfo,t.previousObservations.labelingInfo,t.trackLines.labelingInfo])if(l)for(const n of l)r.push(Z(e,i,n));await Promise.all(r)}async function V(e,n,i){const t=[];i?.expressionInfos&&t.push(...i.expressionInfos.map((i=>A(e,n.fieldsIndex,i.expression))));const r=i?.content;if(Array.isArray(r))for(const l of r)"expression"===l.type&&l.expressionInfo&&t.push(A(e,n.fieldsIndex,l.expressionInfo.expression));await Promise.all(t)}async function R(e,n,i){n&&(n.timeInfo&&i?.timeExtent&&x(e,n.fieldsIndex,[n.timeInfo.startField,n.timeInfo.endField]),n.floorInfo&&x(e,n.fieldsIndex,[n.floorInfo.floorField]),null!=i?.where&&await _(e,n.fieldsIndex,i.where))}async function j(e,n,i){n&&i&&await Promise.all(i.map((i=>U(e,n,i))))}async function U(e,n,i){n&&i&&(i.valueExpression?await A(e,n.fieldsIndex,i.valueExpression):i.field&&T(e,n.fieldsIndex,i.field))}async function k(e){if(!e)return[];const n="timeInfo"in e&&e.timeInfo;return n?w(e.fieldsIndex,[e.trackIdField,n.startField,n.endField]):[]}function C(e){return e?w(e.fieldsIndex,Y(e)):[]}function G(e){if(!e)return[];const n=e.geometryFieldsInfo;return n?w(e.fieldsIndex,[n.shapeAreaField,n.shapeLengthField]):[]}async function P(e,n,i){if(!n||!i)return;const t=n.fieldsIndex;await Promise.all(i.filters.map((n=>_(e,t,n.where))))}const q=new Set(["oid","global-id","guid"]),X=new Set(["oid","global-id"]),z=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^shape$/i,/^shape_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/perimeter/i,/objectid/i,/_i$/i];function B(e){const n=new Set;J(e).forEach((e=>n.add(e))),G(e).forEach((e=>n.add(e.toLowerCase())));const i=e&&"infoFor3D"in e?e.infoFor3D:void 0;return i&&(Object.values(i.assetMapFieldRoles).forEach((e=>n.add(e.toLowerCase()))),Object.values(i.transformFieldRoles).forEach((e=>n.add(e.toLowerCase())))),Array.from(n)}function Y(e){if(!e)return[];const n="editFieldsInfo"in e&&e.editFieldsInfo;if(!n)return[];const{creationDateField:i,creatorField:t,editDateField:r,editorField:l}=n;return[i,t,r,l].filter(Boolean)}function J(e){return Y(e).map((e=>e.toLowerCase()))}function W(e,n){return e.editable&&!q.has(e.type)&&!J(n).includes(e.name?.toLowerCase()??"")}function H(e,n){const i=e.name?.toLowerCase()??"";return!(null!=n?.objectIdField&&i===n.objectIdField.toLowerCase()||null!=n?.globalIdField&&i===n.globalIdField.toLowerCase()||B(n).includes(i)||X.has(e.type)||z.some((e=>e.test(i))))}async function K(e){if(!e)return[];const n=new Set;return await Q(n,e),Array.from(n).sort()}async function Q(e,n){const{labelingInfo:i,fieldsIndex:t}=n;i?.length&&await Promise.all(i.map((n=>Z(e,t,n))))}async function Z(e,n,i){if(!i)return;const t=i.getLabelExpression(),r=i.where;if("arcade"===t.type)await A(e,n,t.expression);else{const i=t.expression.match(/{[^}]*}/g);i&&i.forEach((i=>{T(e,n,i.slice(1,-1))}))}await _(e,n,r)}function ee(e){const n=e.defaultValue;return void 0!==n&&oe(e,n)?n:e.nullable?null:void 0}function ne(e){const n="string"==typeof e?{type:e}:e;return Fe(n)?255:"esriFieldTypeDate"===n.type||"date"===n.type?8:void 0}function ie(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function te(e){return null===e||ie(e)}function re(e){return null===e||Number.isInteger(e)}function le(){return!0}function oe(e,n){let i;switch(e.type){case"date":case"integer":case"long":case"small-integer":case"big-integer":case"esriFieldTypeDate":case"esriFieldTypeInteger":case"esriFieldTypeLong":case"esriFieldTypeSmallInteger":case"esriFieldTypeBigInteger":i=e.nullable?re:Number.isInteger;break;case"double":case"single":case"esriFieldTypeSingle":case"esriFieldTypeDouble":i=e.nullable?te:ie;break;case"string":case"esriFieldTypeString":i=e.nullable?a:u;break;default:i=le}return 1===arguments.length?i:i(n)}const se=["integer","small-integer","big-integer"],ae=["single","double"],ue=[...se,...ae],fe=["esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeBigInteger"],ce=["esriFieldTypeSingle","esriFieldTypeDouble"],de=new Set([...se,...fe]),pe=new Set([...ae,...ce]),me=t(de,pe);function ye(e){return null!=e&&de.has(e.type)}function ge(e){return null!=e&&me.has(e.type)}function Fe(e){return null!=e&&("string"===e.type||"esriFieldTypeString"===e.type)}function Ie(e){return null!=e&&("date"===e.type||"esriFieldTypeDate"===e.type)}function be(e){return null!=e&&("date-only"===e.type||"esriFieldTypeDateOnly"===e.type)}function we(e){return null!=e&&("timestamp-offset"===e.type||"esriFieldTypeTimestampOffset"===e.type)}function xe(e){return null!=e&&("time-only"===e.type||"esriFieldTypeTimeOnly"===e.type)}function Te(e){return null!=e&&("oid"===e.type||"esriFieldTypeOID"===e.type)}function he(e){return null!=e&&("global-id"===e.type||"esriFieldTypeGlobalID"===e.type)}function Ee(e,n){return null===Se(e,n)}var Ae,_e;function ve(e){return null==e||"number"==typeof e&&isNaN(e)?null:e}function Se(e,n){return null==e||e.nullable&&null===n?null:oe(e,n)?ge(e)&&!Ne(e.type,Number(n))?Ae.OUT_OF_RANGE:null:_e.INVALID_TYPE}function Ne(e,n){const i="string"==typeof e?Le(e):e;if(!i)return!1;const t=i.min,r=i.max;return i.isInteger?Number.isInteger(n)&&n>=t&&n<=r:n>=t&&n<=r}function $e(e,n){const i=l(e,n);return i||(ge(e)?Le(e.type):void 0)}function Le(e){switch(e){case"esriFieldTypeSmallInteger":case"small-integer":return De;case"esriFieldTypeInteger":case"integer":return Me;case"esriFieldTypeBigInteger":case"big-integer":return Ve;case"esriFieldTypeSingle":case"single":return Re;case"esriFieldTypeDouble":case"double":return je}}function Oe(e){if(!ie(e))return null;if(Number.isInteger(e)){if(e>=De.min&&e<=De.max)return"esriFieldTypeSmallInteger";if(e>=Me.min&&e<=Me.max)return"esriFieldTypeInteger";if(e>=Ve.min&&e<=Ve.max)return"esriFieldTypeBigInteger"}return e>=Re.min&&e<=Re.max?"esriFieldTypeSingle":"esriFieldTypeDouble"}!function(e){e.OUT_OF_RANGE="numeric-range-validation-error::out-of-range"}(Ae||(Ae={})),function(e){e.INVALID_TYPE="type-validation-error::invalid-type"}(_e||(_e={}));const De={min:-32768,max:32767,isInteger:!0,rawMin:-32768,rawMax:32767},Me={min:-2147483648,max:2147483647,isInteger:!0,rawMin:-2147483648,rawMax:2147483647},Ve={min:-Number.MAX_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,isInteger:!0,rawMin:-Number.MAX_SAFE_INTEGER,rawMax:Number.MAX_SAFE_INTEGER},Re={min:-34e37,max:12e37,isInteger:!1,rawMin:-34e37,rawMax:12e37},je={min:-Number.MAX_VALUE,max:Number.MAX_VALUE,isInteger:!1,rawMin:-Number.MAX_VALUE,rawMax:Number.MAX_VALUE};function Ue(e,n,i){switch(e){case o.INVALID_CODED_VALUE:return`Value ${i} is not in the coded domain - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case o.VALUE_OUT_OF_RANGE:return`Value ${i} is out of the range of valid values - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case _e.INVALID_TYPE:return`Value ${i} is not a valid value for the field type - field: ${n.name}, type: ${n.type}, nullable: ${n.nullable}`;case Ae.OUT_OF_RANGE:{const{min:e,max:t}=Le(n.type);return`Value ${i} is out of range for the number type - field: ${n.name}, type: ${n.type}, value range is ${e} to ${t}`}}}function ke(e,n){return!Ce(e,n,null)}function Ce(e,n,i){if(!n?.attributes||!e){if(null!=i)for(const n of e??[])i.add(n);return!0}const t=new Set(Object.keys(n.attributes));let r=!1;for(const l of e)if(!t.has(l)){if(r=!0,null==i)break;i.add(l)}return r}async function Ge(e,n){const i=new Set;for(const t of n)await A(i,e.fieldsIndex,t);return Array.from(i).sort()}function Pe(e){return!!e&&["raster.itempixelvalue","raster.servicepixelvalue"].some((n=>e.toLowerCase().startsWith(n)))}async function qe(e,n){const i=new Set;return e?.collectRequiredFields&&await e.collectRequiredFields(i,n),Array.from(i).sort()}function Xe(e){const n=e?.match(/{[^}]+}/g);return n?n.map((e=>e.slice(1,-1).split(":")[0].trim())):[]}export{Ae as NumericRangeValidationError,_e as TypeValidationError,Ve as bigIntegerRange,A as collectArcadeFieldNames,P as collectDisplayFilterFields,L as collectElevationFields,D as collectFeatureReductionFields,T as collectField,x as collectFields,R as collectFilterFields,Q as collectLabelingFields,j as collectOrderByInfos,V as collectPopupTemplateFields,M as collectTrackInfoFields,je as doubleRange,Xe as extractSubstitutionTemplatesFromString,ke as featureHasFields,w as fixFields,g as fixRendererFields,I as fixTimeInfoFields,ce as floatJSONTypes,ae as floatTypes,v as getDisplayFieldName,Y as getEditTrackingFields,$ as getElevationFields,Ge as getExpressionFields,C as getFeatureEditFields,G as getFeatureGeometryFields,ne as getFieldDefaultLength,ee as getFieldDefaultValue,$e as getFieldRange,K as getLabelingFields,B as getLowerCaseDefaultHiddenFields,J as getLowerCaseEditTrackingFields,Oe as getNumericTypeForValue,qe as getRendererFields,k as getTimeFields,fe as integerJSONTypes,Me as integerRange,se as integerTypes,Ie as isDateField,be as isDateOnlyField,W as isFieldEditable,H as isFieldVisibleByDefault,he as isGlobalIDField,ye as isIntegerField,Ne as isNumberInRange,ge as isNumericField,Te as isObjectIDField,Pe as isRasterPixelValueField,Fe as isStringField,xe as isTimeOnlyField,we as isTimestampOffsetField,Ee as isValidFieldValue,oe as isValueMatchingFieldType,p as normalizeFieldName,ue as numericTypes,E as packFields,Ce as populateMissingFields,m as rendererFields,ve as sanitizeNullFieldValue,Re as singleRange,De as smallIntegerRange,h as unpackFieldNames,Se as validateFieldValue,Ue as validationErrorToString,y as visualVariableFields};
|
|
5
|
+
import e from"../../core/Error.js";import{getDeepValue as n,setDeepValue as i}from"../../core/object.js";import{union as t}from"../../core/SetUtils.js";import{parseWhereClause as r}from"../../core/sql.js";import{getDomainRange as l,DomainValidationError as o}from"./domainUtils.js";import{getFieldNameFromSimpleExpression as s}from"../../support/arcadeExpressionUtils.js";import{isStringOrNull as a,isString as u}from"../../support/guards.js";import{loadArcade as f}from"../../support/loadArcade.js";const c=/^([0-9_])/,d=/[^a-z0-9_\u0080-\uffff]+/gi;function p(e){if(null==e)return null;return e.trim().replaceAll(d,"_").replace(c,"F$1")||null}const m=["field","field2","field3","normalizationField","rotationInfo.field","proportionalSymbolInfo.field","proportionalSymbolInfo.normalizationField","colorInfo.field","colorInfo.normalizationField"],y=["field","normalizationField"];function g(e,n){if(null!=e&&null!=n)for(const i of Array.isArray(e)?e:[e])if(F(m,i,n),"visualVariables"in i&&i.visualVariables)for(const e of i.visualVariables)F(y,e,n)}function F(e,t,r){if(e)for(const l of e){const e=n(l,t),o=e&&"function"!=typeof e&&r.get(e);o&&i(l,o.name,t)}}function I(e,n){if(null!=e&&n?.fields?.length)if("startField"in e){const i=n.get(e.startField),t=n.get(e.endField);e.startField=i?.name??null,e.endField=t?.name??null}else{const i=n.get(e.startTimeField),t=n.get(e.endTimeField);e.startTimeField=i?.name??null,e.endTimeField=t?.name??null}}const b=new Set;function w(e,n){return e&&n?(b.clear(),T(b,e,n),Array.from(b).sort()):[]}function T(e,n,i){if(i)if(n?.fields?.length)if(i.includes("*"))for(const{name:t}of n.fields)e.add(t);else for(const t of i)x(e,n,t);else{if(i.includes("*"))return e.clear(),void e.add("*");for(const n of i)null!=n&&e.add(n)}}function x(e,n,i){if("string"==typeof i)if(n){const t=n.get(i);t&&e.add(t.name)}else e.add(i)}function h(e,n){return null==n||null==e?[]:n.includes("*")?(e.fields??[]).map((e=>e.name)):n}function E(e,n,i=1){if(!n||!e)return[];if(n.includes("*"))return["*"];const t=w(e,n);return t.length/e.fields.length>=i?["*"]:t}async function A(e,n,i){if(!i)return;let t;const r=s(i);if(r)t=[r];else{const{arcadeUtils:e}=await f();t=e.extractFieldNames(i,n?.fields?.map((e=>e.name)))}for(const l of t)x(e,n,l)}async function _(n,i,t){if(t&&"1=1"!==t){const l=await r(t,i);if(!l.isStandardized)throw new e("fieldUtils:collectFilterFields","Where clause is not standardized",{where:t});T(n,i,l.fieldNames)}}function v({displayField:e,fields:n}){return e||(n?.length?N(n,"name-or-title")||N(n,"unique-identifier")||N(n,"type-or-category")||S(n):null)}function S(e){for(const n of e){if(!n?.name)continue;const e=n.name.toLowerCase();if(e.includes("name")||e.includes("title"))return n.name}return null}function N(e,n){for(const i of e)if(i?.valueType&&i.valueType===n)return i.name;return null}async function $(e){if(!e)return[];const n=new Set;return await L(n,e),Array.from(n).sort()}async function L(e,n){if(!n)return;const i=n.elevationInfo?.featureExpressionInfo;return i?i.collectRequiredFields(e,n.fieldsIndex):void 0}function O(e,n,i){i.onStatisticExpression?A(e,n,i.onStatisticExpression.expression):e.add(i.onStatisticField)}async function D(e,n,i){if(!n||!i||!("fields"in i))return;const t=[],r=i.popupTemplate;t.push(V(e,n,r)),i.fields&&t.push(...i.fields.map((async i=>O(e,n.fieldsIndex,i)))),await Promise.all(t)}async function M(e,n){const{fieldsIndex:i,trackInfo:t}=n;if(!n||!t||!i)return;const r=[t.latestObservations.renderer?.collectRequiredFields(e,i),t.previousObservations.renderer?.collectRequiredFields(e,i),t.trackLines.renderer?.collectRequiredFields(e,i)];t.popupTemplate&&r.push(V(e,n,t.popupTemplate));for(const l of[t.latestObservations.labelingInfo,t.previousObservations.labelingInfo,t.trackLines.labelingInfo])if(l)for(const n of l)r.push(Z(e,i,n));await Promise.all(r)}async function V(e,n,i){const t=[];i?.expressionInfos&&t.push(...i.expressionInfos.map((i=>A(e,n.fieldsIndex,i.expression))));const r=i?.content;if(Array.isArray(r))for(const l of r)"expression"===l.type&&l.expressionInfo&&t.push(A(e,n.fieldsIndex,l.expressionInfo.expression));await Promise.all(t)}async function R(e,n,i){n&&(n.timeInfo&&i?.timeExtent&&T(e,n.fieldsIndex,[n.timeInfo.startField,n.timeInfo.endField]),n.floorInfo&&T(e,n.fieldsIndex,[n.floorInfo.floorField]),null!=i?.where&&await _(e,n.fieldsIndex,i.where))}async function j(e,n,i){n&&i&&await Promise.all(i.map((i=>U(e,n,i))))}async function U(e,n,i){n&&i&&(i.valueExpression?await A(e,n.fieldsIndex,i.valueExpression):i.field&&x(e,n.fieldsIndex,i.field))}async function k(e){if(!e)return[];const n="timeInfo"in e&&e.timeInfo;return n?w(e.fieldsIndex,[e.trackIdField,n.startField,n.endField]):[]}function C(e){return e?w(e.fieldsIndex,Y(e)):[]}function G(e){if(!e)return[];const n=e.geometryFieldsInfo;return n?w(e.fieldsIndex,[n.shapeAreaField,n.shapeLengthField]):[]}async function P(e,n,i){if(!n||!i)return;const t=n.fieldsIndex;await Promise.all(i.filters.map((n=>_(e,t,n.where))))}const q=new Set(["oid","global-id","guid"]),X=new Set(["oid","global-id"]),z=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^shape$/i,/^shape_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/perimeter/i,/objectid/i,/_i$/i];function B(e){const n=new Set;J(e).forEach((e=>n.add(e))),G(e).forEach((e=>n.add(e.toLowerCase())));const i=e&&"infoFor3D"in e?e.infoFor3D:void 0;return i&&(Object.values(i.assetMapFieldRoles).forEach((e=>n.add(e.toLowerCase()))),Object.values(i.transformFieldRoles).forEach((e=>n.add(e.toLowerCase())))),Array.from(n)}function Y(e){if(!e)return[];const n="editFieldsInfo"in e&&e.editFieldsInfo;if(!n)return[];const{creationDateField:i,creatorField:t,editDateField:r,editorField:l}=n;return[i,t,r,l].filter(Boolean)}function J(e){return Y(e).map((e=>e.toLowerCase()))}function W(e,n){return e.editable&&!q.has(e.type)&&!J(n).includes(e.name?.toLowerCase()??"")}function H(e,n){const i=e.name?.toLowerCase()??"";return!(null!=n?.objectIdField&&i===n.objectIdField.toLowerCase()||null!=n?.globalIdField&&i===n.globalIdField.toLowerCase()||B(n).includes(i)||X.has(e.type)||z.some((e=>e.test(i))))}async function K(e){if(!e)return[];const n=new Set;return await Q(n,e),Array.from(n).sort()}async function Q(e,n){const{labelingInfo:i,fieldsIndex:t}=n;i?.length&&await Promise.all(i.map((n=>Z(e,t,n))))}async function Z(e,n,i){if(!i)return;const t=i.getLabelExpression(),r=i.where;if("arcade"===t.type)await A(e,n,t.expression);else{const i=t.expression.match(/{[^}]*}/g);i&&i.forEach((i=>{x(e,n,i.slice(1,-1))}))}await _(e,n,r)}function ee(e){const n=e.defaultValue;return void 0!==n&&oe(e,n)?n:e.nullable?null:void 0}function ne(e){const n="string"==typeof e?{type:e}:e;return Fe(n)?255:"esriFieldTypeDate"===n.type||"date"===n.type?8:void 0}function ie(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function te(e){return null===e||ie(e)}function re(e){return null===e||Number.isInteger(e)}function le(){return!0}function oe(e,n){let i;switch(e.type){case"date":case"integer":case"long":case"small-integer":case"big-integer":case"esriFieldTypeDate":case"esriFieldTypeInteger":case"esriFieldTypeLong":case"esriFieldTypeSmallInteger":case"esriFieldTypeBigInteger":i=e.nullable?re:Number.isInteger;break;case"double":case"single":case"esriFieldTypeSingle":case"esriFieldTypeDouble":i=e.nullable?te:ie;break;case"string":case"esriFieldTypeString":i=e.nullable?a:u;break;default:i=le}return 1===arguments.length?i:i(n)}const se=["integer","small-integer","big-integer","long"],ae=["single","double"],ue=[...se,...ae],fe=["esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeLong","esriFieldTypeBigInteger"],ce=["esriFieldTypeSingle","esriFieldTypeDouble"],de=new Set([...se,...fe]),pe=new Set([...ae,...ce]),me=t(de,pe);function ye(e){return null!=e&&de.has(e.type)}function ge(e){return null!=e&&me.has(e.type)}function Fe(e){return null!=e&&("string"===e.type||"esriFieldTypeString"===e.type)}function Ie(e){return null!=e&&("date"===e.type||"esriFieldTypeDate"===e.type)}function be(e){return null!=e&&("date-only"===e.type||"esriFieldTypeDateOnly"===e.type)}function we(e){return null!=e&&("timestamp-offset"===e.type||"esriFieldTypeTimestampOffset"===e.type)}function Te(e){return null!=e&&("time-only"===e.type||"esriFieldTypeTimeOnly"===e.type)}function xe(e){return null!=e&&("oid"===e.type||"esriFieldTypeOID"===e.type)}function he(e){return null!=e&&("global-id"===e.type||"esriFieldTypeGlobalID"===e.type)}function Ee(e,n){return null===Se(e,n)}var Ae,_e;function ve(e){return null==e||"number"==typeof e&&isNaN(e)?null:e}function Se(e,n){return null==e||e.nullable&&null===n?null:oe(e,n)?ge(e)&&!Ne(e.type,Number(n))?Ae.OUT_OF_RANGE:null:_e.INVALID_TYPE}function Ne(e,n){const i="string"==typeof e?Le(e):e;if(!i)return!1;const t=i.min,r=i.max;return i.isInteger?Number.isInteger(n)&&n>=t&&n<=r:n>=t&&n<=r}function $e(e,n){const i=l(e,n);return i||(ge(e)?Le(e.type):void 0)}function Le(e){switch(e){case"esriFieldTypeSmallInteger":case"small-integer":return De;case"esriFieldTypeInteger":case"esriFieldTypeLong":case"integer":case"long":return Me;case"esriFieldTypeBigInteger":case"big-integer":return Ve;case"esriFieldTypeSingle":case"single":return Re;case"esriFieldTypeDouble":case"double":return je}}function Oe(e){if(!ie(e))return null;if(Number.isInteger(e)){if(e>=De.min&&e<=De.max)return"esriFieldTypeSmallInteger";if(e>=Me.min&&e<=Me.max)return"esriFieldTypeInteger";if(e>=Ve.min&&e<=Ve.max)return"esriFieldTypeBigInteger"}return e>=Re.min&&e<=Re.max?"esriFieldTypeSingle":"esriFieldTypeDouble"}!function(e){e.OUT_OF_RANGE="numeric-range-validation-error::out-of-range"}(Ae||(Ae={})),function(e){e.INVALID_TYPE="type-validation-error::invalid-type"}(_e||(_e={}));const De={min:-32768,max:32767,isInteger:!0,rawMin:-32768,rawMax:32767},Me={min:-2147483648,max:2147483647,isInteger:!0,rawMin:-2147483648,rawMax:2147483647},Ve={min:-Number.MAX_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,isInteger:!0,rawMin:-Number.MAX_SAFE_INTEGER,rawMax:Number.MAX_SAFE_INTEGER},Re={min:-34e37,max:12e37,isInteger:!1,rawMin:-34e37,rawMax:12e37},je={min:-Number.MAX_VALUE,max:Number.MAX_VALUE,isInteger:!1,rawMin:-Number.MAX_VALUE,rawMax:Number.MAX_VALUE};function Ue(e,n,i){switch(e){case o.INVALID_CODED_VALUE:return`Value ${i} is not in the coded domain - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case o.VALUE_OUT_OF_RANGE:return`Value ${i} is out of the range of valid values - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case _e.INVALID_TYPE:return`Value ${i} is not a valid value for the field type - field: ${n.name}, type: ${n.type}, nullable: ${n.nullable}`;case Ae.OUT_OF_RANGE:{const{min:e,max:t}=Le(n.type);return`Value ${i} is out of range for the number type - field: ${n.name}, type: ${n.type}, value range is ${e} to ${t}`}}}function ke(e,n){return!Ce(e,n,null)}function Ce(e,n,i){if(!n?.attributes||!e){if(null!=i)for(const n of e??[])i.add(n);return!0}const t=new Set(Object.keys(n.attributes));let r=!1;for(const l of e)if(!t.has(l)){if(r=!0,null==i)break;i.add(l)}return r}async function Ge(e,n){const i=new Set;for(const t of n)await A(i,e.fieldsIndex,t);return Array.from(i).sort()}function Pe(e){return!!e&&["raster.itempixelvalue","raster.servicepixelvalue"].some((n=>e.toLowerCase().startsWith(n)))}async function qe(e,n){const i=new Set;return e?.collectRequiredFields&&await e.collectRequiredFields(i,n),Array.from(i).sort()}function Xe(e){const n=e?.match(/{[^}]+}/g);return n?n.map((e=>e.slice(1,-1).split(":")[0].trim())):[]}export{Ae as NumericRangeValidationError,_e as TypeValidationError,Ve as bigIntegerRange,A as collectArcadeFieldNames,P as collectDisplayFilterFields,L as collectElevationFields,D as collectFeatureReductionFields,x as collectField,T as collectFields,R as collectFilterFields,Q as collectLabelingFields,j as collectOrderByInfos,V as collectPopupTemplateFields,M as collectTrackInfoFields,je as doubleRange,Xe as extractSubstitutionTemplatesFromString,ke as featureHasFields,w as fixFields,g as fixRendererFields,I as fixTimeInfoFields,ce as floatJSONTypes,ae as floatTypes,v as getDisplayFieldName,Y as getEditTrackingFields,$ as getElevationFields,Ge as getExpressionFields,C as getFeatureEditFields,G as getFeatureGeometryFields,ne as getFieldDefaultLength,ee as getFieldDefaultValue,$e as getFieldRange,K as getLabelingFields,B as getLowerCaseDefaultHiddenFields,J as getLowerCaseEditTrackingFields,Oe as getNumericTypeForValue,qe as getRendererFields,k as getTimeFields,fe as integerJSONTypes,Me as integerRange,se as integerTypes,Ie as isDateField,be as isDateOnlyField,W as isFieldEditable,H as isFieldVisibleByDefault,he as isGlobalIDField,ye as isIntegerField,Ne as isNumberInRange,ge as isNumericField,xe as isObjectIDField,Pe as isRasterPixelValueField,Fe as isStringField,Te as isTimeOnlyField,we as isTimestampOffsetField,Ee as isValidFieldValue,oe as isValueMatchingFieldType,p as normalizeFieldName,ue as numericTypes,E as packFields,Ce as populateMissingFields,m as rendererFields,ve as sanitizeNullFieldValue,Re as singleRange,De as smallIntegerRange,h as unpackFieldNames,Se as validateFieldValue,Ue as validationErrorToString,y as visualVariableFields};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../core/Error.js";import o from"../../core/Logger.js";import r from"./LabelClass.js";const t=()=>o.getLogger("esri.layers.support.labelingInfo"),
|
|
5
|
+
import e from"../../core/Error.js";import o from"../../core/Logger.js";import r from"./LabelClass.js";const t=()=>o.getLogger("esri.layers.support.labelingInfo"),n=/\[([^[\]]+)\]/gi;function l(e,o,t){return e?e.map((e=>{const l=new r;if(l.read(e,t),l.labelExpression){const e=o.fields||o.layerDefinition?.fields||this.fields;l.labelExpression=l.labelExpression.replaceAll(n,((o,r)=>`[${s(r,e)}]`))}return l})):null}function s(e,o){if(!o)return e;const r=e.toLowerCase();for(let t=0;t<o.length;t++){const e=o[t].name;if(e.toLowerCase()===r)return e}return e}const i=["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],a={esriGeometryPoint:i,esriGeometryMultiPatch:["always-horizontal"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along","above-along","below-along"],esriGeometryMultipoint:i,esriGeometryEnvelope:null};function c(o,r){const n=[];for(const l of o){const o=l.labelPlacement,s=a[r];if(!l.symbol)return t().warn("No ILabelClass symbol specified."),[];if(!s)return t().error(new e("labeling:unsupported-geometry-type",`Unable to create labels for layer, geometry type '${r}' is not supported`)),[];if(s.includes(o))n.push(l);else{const e=s[0];o&&t().warn(`Found invalid label placement type ${o} for ${r}. Defaulting to ${e}`);const i=l.clone();i.labelPlacement=e,n.push(i)}}return n}export{l as reader,c as validateLabelingInfo};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import has from"../../core/has.js";import{parse as t,isHostedAgolService as s}from"./arcgisLayerUrl.js";import{getGltfQueryFormat as e}from"./infoFor3D.js";import{readBoolean as r,readNumber as p}from"../../rest/support/jsonUtils.js";const o={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function u(t){const s=t?.supportedSpatialAggregationStatistics?.map((t=>t.toLowerCase()));return{envelope:!!s?.includes("envelopeaggregate"),centroid:!!s?.includes("centroidaggregate"),convexHull:!!s?.includes("convexhullaggregate")}}function n(t,s){const e=t?.supportedOperationsWithCacheHint?.map((t=>t.toLowerCase()));return!!e?.includes(s.toLowerCase())}function i(t){const s=t?.supportedStatisticTypes?.map((t=>t.toLowerCase()));return{count:!!s?.includes("count"),sum:!!s?.includes("sum"),min:!!s?.includes("min"),max:!!s?.includes("max"),avg:!!s?.includes("avg"),var:!!s?.includes("var"),stddev:!!s?.includes("stddev"),percentileContinuous:!!s?.includes("percentile_continuous"),percentileDiscrete:!!s?.includes("percentile_discrete"),envelope:!!s?.includes("envelopeaggregate"),centroid:!!s?.includes("centroidaggregate"),convexHull:!!s?.includes("convexhullaggregate")}}function a(t){const s=t?.supportedNormalizationTypes?.map((t=>t.toLowerCase()));return{field:!!s?.includes("field"),log:!!s?.includes("log"),naturalLog:!!s?.includes("naturallog"),percentOfTotal:!!s?.includes("percentoftotal"),squareRoot:!!s?.includes("squareroot")}}function c(t,s){return{analytics:l(t),attachment:d(t),data:y(t),metadata:m(t),operations:g(t.capabilities,t,s),query:C(t,s),queryAttributeBins:S(t),queryRelated:v(t),queryTopFeatures:h(t),editing:f(t)}}function l(t){return{supportsCacheHint:n(t.advancedQueryCapabilities,"queryAnalytics")}}function d(t){const s=t.attachmentProperties,e={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:n(t.advancedQueryCapabilities,"queryAttachments"),supportsOrderByFields:r(t.advancedQueryCapabilities,"supportsQueryAttachmentOrderByFields",!1),supportsResize:r(t,"supportsAttachmentsResizing",!1)};return s&&Array.isArray(s)&&s.forEach((t=>{const s=o[t.name];s&&(e[s]=!!t.isEnabled)})),e}function y(t){return{isVersioned:r(t,"isDataVersioned",!1),isBranchVersioned:r(t,"isDataBranchVersioned",!1),supportsAttachment:r(t,"hasAttachments",!1),supportsM:r(t,"hasM",!1),supportsZ:r(t,"hasZ",!1)}}function m(t){return{supportsAdvancedFieldProperties:r(t,"supportsFieldDescriptionProperty",!1)}}function g(s,e,p){const o=s?.toLowerCase().split(",").map((t=>t.trim()))??[],u=p?t(p):null,n=o.includes("MapServer"===u?.serverType?"data":"query"),i=o.includes("editing")&&!e.datesInUnknownTimezone;let a=i&&o.includes("create"),c=i&&o.includes("delete"),l=i&&o.includes("update");const d=o.includes("changetracking"),y=e.advancedQueryCapabilities;return i&&!(a||c||l)&&(a=c=l=!0),{supportsCalculate:r(e,"supportsCalculate",!1),supportsTruncate:r(e,"supportsTruncate",!1),supportsValidateSql:r(e,"supportsValidateSql",!1),supportsAdd:a,supportsDelete:c,supportsEditing:i,supportsChangeTracking:d,supportsQuery:n,supportsQueryAnalytics:r(y,"supportsQueryAnalytic",!1),supportsQueryAttachments:r(y,"supportsQueryAttachments",!1),supportsQueryBins:r(y,"supportsQueryBins",!1),supportsQueryTopFeatures:r(y,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:r(e,"supportsAttachmentsResizing",!1),supportsSync:o.includes("sync"),supportsUpdate:l,supportsExceedsLimitStatistics:r(e,"supportsExceedsLimitStatistics",!1),supportsAsyncConvert3D:r(e,"supportsAsyncConvert3D",!1)}}function C(t,o){const i=t.advancedQueryCapabilities,a=t.ownershipBasedAccessControlForFeatures,c=t.archivingInfo,l=t.currentVersion,d=o?.includes("MapServer"),y=!d||l>=has("mapserver-pbf-version-support"),m=s(o),g=new Set((t.supportedQueryFormats??"").split(",").map((t=>t.toLowerCase().trim())));return{maxRecordCount:p(t,"maxRecordCount",void 0),maxRecordCountFactor:p(t,"maxRecordCountFactor",void 0),maxUniqueIDCount:p(t,"maxUniqueIDCount",void 0),standardMaxRecordCount:p(t,"standardMaxRecordCount",void 0),supportedSpatialAggregationStatistics:u(i),supportsCacheHint:r(i,"supportsQueryWithCacheHint",!1)||n(i,"query"),supportsCentroid:r(i,"supportsReturningGeometryCentroid",!1),supportsCompactGeometry:m,supportsCurrentUser:r(i,"supportsCurrentUserQueries",!1),supportsDefaultSpatialReference:r(i,"supportsDefaultSR",!1),supportsDisjointSpatialRelationship:r(i,"supportsDisjointSpatialRel",!1),supportsDistance:r(i,"supportsQueryWithDistance",!1),supportsDistinct:r(i,"supportsDistinct",t.supportsAdvancedQueries),supportsExtent:r(i,"supportsReturningQueryExtent",!1),supportsFormatPBF:y&&g.has("pbf"),supportsFullTextSearch:r(i,"supportsFullTextSearch",!1),supportsGeometryProperties:r(i,"supportsReturningGeometryProperties",!1),supportsHavingClause:r(i,"supportsHavingClause",!1),supportsHistoricMoment:r(c,"supportsQueryWithHistoricMoment",!1),supportsMaxRecordCountFactor:r(i,"supportsMaxRecordCountFactor",!1),supportsOrderBy:r(i,"supportsOrderBy",t.supportsAdvancedQueries),supportsPagination:r(i,"supportsPagination",!1),supportsPercentileStatistics:r(i,"supportsPercentileStatistics",!1),supportsQuantization:r(t,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:r(t,"supportsQuantizationEditMode",!1),supportsQueryByAnonymous:r(a,"allowAnonymousToQuery",!0),supportsQueryByOthers:r(a,"allowOthersToQuery",!0),supportsQueryGeometry:r(t,"supportsReturningQueryGeometry",!1),supportsResultType:r(i,"supportsQueryWithResultType",!1),supportsReturnMesh:!!e(t.infoFor3D),supportsSpatialAggregationStatistics:r(i,"supportsSpatialAggregationStatistics",!1),supportsSqlExpression:r(i,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:r(t,"useStandardizedQueries",!1),supportsStatistics:r(i,"supportsStatistics",t.supportsStatistics),supportsTopFeaturesQuery:r(i,"supportsTopFeaturesQuery",!1),supportsTrueCurve:r(i,"supportsTrueCurve",!1),tileMaxRecordCount:p(t,"tileMaxRecordCount",void 0)}}function v(t){const s=t.advancedQueryCapabilities,e=r(s,"supportsAdvancedQueryRelated",!1);return{supportsPagination:r(s,"supportsQueryRelatedPagination",!1),supportsCount:e,supportsOrderBy:e,supportsCacheHint:n(s,"queryRelated")}}function h(t){return{supportsCacheHint:n(t.advancedQueryCapabilities,"queryTopFilter")}}function S(t){const s=t?t.queryBinsCapabilities:void 0;return{supportsDate:r(s,"supportsDateBin",!1),supportsFixedInterval:r(s,"supportsFixedIntervalBin",!1),supportsAutoInterval:r(s,"supportsAutoIntervalBin",!1),supportsFixedBoundaries:r(s,"supportsFixedBoundariesBin",!1),supportsStackBy:r(s,"supportsStackBy",!1),supportsSplitBy:r(s,"supportsSplitBy",!1),supportsSnapToData:r(s,"supportsSnapToData",!1),supportsReturnFullIntervalBin:r(s,"supportsReturnFullIntervalBin",!1),supportsFirstDayOfWeek:r(s,"supportsFirstDayOfWeek",!1),supportsNormalization:r(s,"supportsNormalization",!1),supportedStatistics:i(s),supportedNormalizationTypes:a(s)}}function f(t){const s=t.ownershipBasedAccessControlForFeatures,e=t?t.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:r(t,"allowGeometryUpdates",!0),supportsGlobalId:r(t,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:r(t,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:r(t,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:r(t,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:r(t,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:r(s,"allowAnonymousToDelete",!0),supportsDeleteByOthers:r(s,"allowOthersToDelete",!0),supportsUpdateByAnonymous:r(s,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:r(s,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:r(e,"supportsAsyncApplyEdits",!1),zDefault:p(t,"zDefault",void 0)}}function A(t){return{operations:{supportsAppend:r(t,"supportsAppend",!1),supportsCoverageQuery:t?.playbackInfo?.klv["0601"]??!1,supportsExportClip:r(t,"supportsExportClip",!1),supportsExportFrameset:r(t,"supportsExportFrameset",!1),supportsMensuration:r(t,"supportsMensuration",!1),supportsUpdate:r(t,"supportsUpdate",!1)}}}export{c as getFeatureLayerCapabilities,A as getVideoLayerCapabilities};
|
|
5
|
+
import has from"../../core/has.js";import{parse as t,isHostedAgolService as s}from"./arcgisLayerUrl.js";import{getGltfQueryFormat as e}from"./infoFor3D.js";import{readBoolean as r,readNumber as p}from"../../rest/support/jsonUtils.js";const o={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function u(t){const s=t?.supportedSpatialAggregationStatistics?.map((t=>t.toLowerCase()));return{envelope:!!s?.includes("envelopeaggregate"),centroid:!!s?.includes("centroidaggregate"),convexHull:!!s?.includes("convexhullaggregate")}}function n(t,s){const e=t?.supportedOperationsWithCacheHint?.map((t=>t.toLowerCase()));return!!e?.includes(s.toLowerCase())}function i(t){const s=t?.supportedStatisticTypes?.map((t=>t.toLowerCase()));return{count:!!s?.includes("count"),sum:!!s?.includes("sum"),min:!!s?.includes("min"),max:!!s?.includes("max"),avg:!!s?.includes("avg"),var:!!s?.includes("var"),stddev:!!s?.includes("stddev"),percentileContinuous:!!s?.includes("percentile_continuous"),percentileDiscrete:!!s?.includes("percentile_discrete"),envelope:!!s?.includes("envelopeaggregate"),centroid:!!s?.includes("centroidaggregate"),convexHull:!!s?.includes("convexhullaggregate")}}function a(t){const s=t?.supportedNormalizationTypes?.map((t=>t.toLowerCase()));return{field:!!s?.includes("field"),log:!!s?.includes("log"),naturalLog:!!s?.includes("naturallog"),percentOfTotal:!!s?.includes("percentoftotal"),squareRoot:!!s?.includes("squareroot")}}function c(t,s){return{analytics:l(t),attachment:d(t),data:y(t),metadata:m(t),operations:g(t.capabilities,t,s),query:C(t,s),queryAttributeBins:S(t),queryRelated:v(t),queryTopFeatures:h(t),editing:f(t)}}function l(t){return{supportsCacheHint:n(t.advancedQueryCapabilities,"queryAnalytics")}}function d(t){const s=t.attachmentProperties,e={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:n(t.advancedQueryCapabilities,"queryAttachments"),supportsOrderByFields:r(t.advancedQueryCapabilities,"supportsQueryAttachmentOrderByFields",!1),supportsResize:r(t,"supportsAttachmentsResizing",!1)};return s&&Array.isArray(s)&&s.forEach((t=>{const s=o[t.name];s&&(e[s]=!!t.isEnabled)})),e}function y(t){return{isVersioned:r(t,"isDataVersioned",!1),isBranchVersioned:r(t,"isDataBranchVersioned",!1),supportsAttachment:r(t,"hasAttachments",!1),supportsM:r(t,"hasM",!1),supportsZ:r(t,"hasZ",!1)}}function m(t){return{supportsAdvancedFieldProperties:r(t,"supportsFieldDescriptionProperty",!1)}}function g(s,e,p){const o=s?.toLowerCase().split(",").map((t=>t.trim()))??[],u=p?t(p):null,n=o.includes("MapServer"===u?.serverType?"data":"query"),i=o.includes("editing")&&!e.datesInUnknownTimezone;let a=i&&o.includes("create"),c=i&&o.includes("delete"),l=i&&o.includes("update");const d=o.includes("changetracking"),y=e.advancedQueryCapabilities;return i&&!(a||c||l)&&(a=c=l=!0),{supportsCalculate:r(e,"supportsCalculate",!1),supportsTruncate:r(e,"supportsTruncate",!1),supportsValidateSql:r(e,"supportsValidateSql",!1),supportsAdd:a,supportsDelete:c,supportsEditing:i,supportsChangeTracking:d,supportsQuery:n,supportsQueryAnalytics:r(y,"supportsQueryAnalytic",!1),supportsQueryAttachments:r(y,"supportsQueryAttachments",!1),supportsQueryBins:r(y,"supportsQueryBins",!1),supportsQueryTopFeatures:r(y,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:r(e,"supportsAttachmentsResizing",!1),supportsSync:o.includes("sync"),supportsUpdate:l,supportsExceedsLimitStatistics:r(e,"supportsExceedsLimitStatistics",!1),supportsAsyncConvert3D:r(e,"supportsAsyncConvert3D",!1)}}function C(t,o){const i=t.advancedQueryCapabilities,a=t.ownershipBasedAccessControlForFeatures,c=t.archivingInfo,l=t.currentVersion,d=o?.includes("MapServer"),y=!d||l>=has("mapserver-pbf-version-support"),m=s(o),g=new Set((t.supportedQueryFormats??"").split(",").map((t=>t.toLowerCase().trim())));return{maxRecordCount:p(t,"maxRecordCount",void 0),maxRecordCountFactor:p(t,"maxRecordCountFactor",void 0),maxUniqueIDCount:p(t,"maxUniqueIDCount",void 0),standardMaxRecordCount:p(t,"standardMaxRecordCount",void 0),supportedSpatialAggregationStatistics:u(i),supportsCacheHint:r(i,"supportsQueryWithCacheHint",!1)||n(i,"query"),supportsCentroid:r(i,"supportsReturningGeometryCentroid",!1),supportsCompactGeometry:m,supportsCurrentUser:r(i,"supportsCurrentUserQueries",!1),supportsDefaultSpatialReference:r(i,"supportsDefaultSR",!1),supportsDisjointSpatialRelationship:r(i,"supportsDisjointSpatialRel",!1),supportsDistance:r(i,"supportsQueryWithDistance",!1),supportsDistinct:r(i,"supportsDistinct",t.supportsAdvancedQueries),supportsExtent:r(i,"supportsReturningQueryExtent",!1),supportsFormatPBF:y&&g.has("pbf"),supportsFullTextSearch:r(i,"supportsFullTextSearch",!1),supportsGeometryProperties:r(i,"supportsReturningGeometryProperties",!1),supportsHavingClause:r(i,"supportsHavingClause",!1),supportsHistoricMoment:r(c,"supportsQueryWithHistoricMoment",!1),supportsMaxRecordCountFactor:r(i,"supportsMaxRecordCountFactor",!1),supportsOrderBy:r(i,"supportsOrderBy",t.supportsAdvancedQueries),supportsPagination:r(i,"supportsPagination",!1),supportsPercentileStatistics:r(i,"supportsPercentileStatistics",!1),supportsQuantization:r(t,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:r(t,"supportsQuantizationEditMode",!1),supportsQueryByAnonymous:r(a,"allowAnonymousToQuery",!0),supportsQueryByOthers:r(a,"allowOthersToQuery",!0),supportsQueryGeometry:r(t,"supportsReturningQueryGeometry",!1),supportsResultType:r(i,"supportsQueryWithResultType",!1),supportsReturnMesh:!!e(t.infoFor3D),supportsSpatialAggregationStatistics:r(i,"supportsSpatialAggregationStatistics",!1),supportsSqlExpression:r(i,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:r(t,"useStandardizedQueries",!1),supportsStatistics:r(i,"supportsStatistics",t.supportsStatistics),supportsTopFeaturesQuery:r(i,"supportsTopFeaturesQuery",!1),supportsTrueCurve:r(i,"supportsTrueCurve",!1),tileMaxRecordCount:p(t,"tileMaxRecordCount",void 0)}}function v(t){const s=t.advancedQueryCapabilities,e=r(s,"supportsAdvancedQueryRelated",!1);return{supportsPagination:r(s,"supportsQueryRelatedPagination",!1),supportsCount:e,supportsOrderBy:e,supportsCacheHint:n(s,"queryRelated")}}function h(t){return{supportsCacheHint:n(t.advancedQueryCapabilities,"queryTopFilter")}}function S(t){const s=t?t.queryBinsCapabilities:void 0;return{supportsDate:r(s,"supportsDateBin",!1),supportsFixedInterval:r(s,"supportsFixedIntervalBin",!1),supportsAutoInterval:r(s,"supportsAutoIntervalBin",!1),supportsFixedBoundaries:r(s,"supportsFixedBoundariesBin",!1),supportsStackBy:r(s,"supportsStackBy",!1),supportsSplitBy:r(s,"supportsSplitBy",!1),supportsSnapToData:r(s,"supportsSnapToData",!1),supportsReturnFullIntervalBin:r(s,"supportsReturnFullIntervalBin",!1),supportsFirstDayOfWeek:r(s,"supportsFirstDayOfWeek",!1),supportsNormalization:r(s,"supportsNormalization",!1),supportedStatistics:i(s),supportedNormalizationTypes:a(s)}}function f(t){const s=t.ownershipBasedAccessControlForFeatures,e=t?t.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:r(t,"allowGeometryUpdates",!0),supportsGlobalId:r(t,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:r(t,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:r(t,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:r(t,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:r(t,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:r(s,"allowAnonymousToDelete",!0),supportsDeleteByOthers:r(s,"allowOthersToDelete",!0),supportsUpdateByAnonymous:r(s,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:r(s,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:r(e,"supportsAsyncApplyEdits",!1),zDefault:p(t,"zDefault",void 0)}}function A(t){return{operations:{supportsAppend:r(t,"supportsAppend",!1),supportsCoverageQuery:t?.playbackInfo?.klv["0601"]??!1,supportsExportClip:r(t,"supportsExportClip",!1),supportsExportFrameset:r(t,"supportsExportFrameset",!1),supportsMensuration:r(t,"supportsMensuration",!1),supportsPreviews:r(t,"supportsPreviews",!1),supportsUpdate:r(t,"supportsUpdate",!1)}}}export{c as getFeatureLayerCapabilities,A as getVideoLayerCapabilities};
|