/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{updateUsingElevationSampler as t,updateUsingElevationSource as e,updateUsingAverageGroundElevation as a,updateUsingConstant as r}from"./updateElevationUtils.js";import{isUpdateElevationWithElevationSampler as n,isUpdateElevationWithElevationSource as o}from"./utils.js";async function i(i,l,s){const u=Array.isArray(i)?i:[i];let c;if(n(l))c=await t(u,l.elevationSample,s);else if(o(l)){const{elevationSource:t,extent:a}=l,{url:r,lod:n,rasterFunction:o}=t;c=await e(u,{url:r,lod:n,rasterFunction:o,extent:a},s)}else c="averageGroundElevation"in l?a(u,l):await r(u,l.elevationSource.constantElevation,s);return Array.isArray(i)?c:c[0]}export{i as default};
