/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports"],(function(a){"use strict";function n(a,n){const e=t[a.toLowerCase()];if(null==e)throw new Error("Function Not Recognised");if(n.length<e.minParams||n.length>e.maxParams)throw new Error(`Invalid Parameter count for call to ${a.toUpperCase()}`);return e.evaluate(n)}function e(a,n){const e=t[a.toLowerCase()];return null!=e&&n>=e.minParams&&n<=e.maxParams}const t={min:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.min.apply(Math,a[0])},max:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.max.apply(Math,a[0])},avg:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:l(a[0])},sum:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:r(a[0])},stddev:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:Math.sqrt(u(a[0]))},count:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:a[0].length},var:{minParams:1,maxParams:1,evaluate:a=>null==a[0]?null:u(a[0])}};function l(a){let n=0;for(let e=0;e<a.length;e++)n+=a[e];return n/a.length}function r(a){let n=0;for(let e=0;e<a.length;e++)n+=a[e];return n}function u(a){const n=l(a),e=a.length;let t=0;for(const l of a)t+=(l-n)**2;return e>1?t/(e-1):0}a.aggregateFunction=n,a.isAggregate=e,Object.defineProperties(a,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
