/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import{isSome as n,min as r}from"../../../core/arrayUtils.js";import{getMetersPerUnitForSR as l}from"../../../core/units.js";import{isGround as t}from"../../../support/groundInstanceUtils.js";function u(n){if(null==n)return null;if(t(n))return o(n);const r=n.tileInfo;if(null==r)return null;const u=r.lods?.at(-1);return null==u?null:u.resolution*l(r.spatialReference)}function o(l){if(null==l)return null;const t=l.layers.items.map(e).filter(n);return r(t)??null}function e(n){return n&&"tileInfo"in n?u(n):null}export{o as getGroundMinDemResolution,u as getQuerySourceMinDemResolution};
