/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
function l(l){const n={fieldValueMap:new Map,allowedValues:[]};for(const e of l){const l=e.fieldValueMap,t=n.fieldValueMap;l.forEach((l,e)=>{t.has(e)||(t.set(e,l),n.allowedValues.push(e))})}return n.allowedValues.sort((l,n)=>l-n),n}function n(l){let n=null;for(const e of l)n=null!=n?Math.min(n,e):e;return n}function e(l){let n=null;for(const e of l)n=null!=n?Math.max(n,e):e;return n}function t(l,n){return n.allowedValues.length>0?o(l,n.allowedValues):null}function o(l,n){if(0===n.length)return l;if(l===1/0)return n[n.length-1];if(l===-1/0)return n[0];let e=n[0],t=Math.abs(e-l);for(const o of n){const n=Math.abs(o-l);n<t&&(e=o,t=n)}return e}export{o as findClosest,l as getDomainInfo,e as getMax,n as getMin,t as getValidNumber};
