/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import{__decorate as t}from"tslib";import{clone as s}from"../../../core/lang.js";import{property as r,subclass as o}from"../../../core/accessorSupport/decorators.js";import e from"./BaseFunctionArguments.js";import{reader as i}from"../../../core/accessorSupport/decorators/reader.js";import{writer as a}from"../../../core/accessorSupport/decorators/writer.js";var n;let c=n=class extends e{constructor(){super(...arguments),this.statistics=null,this.histograms=null}readStatistics(t,s){if(!t?.length)return null;const r=[];return t.forEach(t=>{const s={min:t.min,max:t.max,avg:t.avg??t.mean,stddev:t.stddev??t.standardDeviation};r.push(s)}),r}writeStatistics(t,s,r){if(!t?.length)return;const o=[];t.forEach(t=>{const s={...t,mean:t.avg,standardDeviation:t.stddev};delete s.avg,delete s.stddev,o.push(s)}),s[r]=o}clone(){return new n({statistics:s(this.statistics),histograms:s(this.histograms)})}};t([r({json:{write:!0}})],c.prototype,"statistics",void 0),t([i("statistics")],c.prototype,"readStatistics",null),t([a("statistics")],c.prototype,"writeStatistics",null),t([r({json:{write:!0}})],c.prototype,"histograms",void 0),c=n=t([o("esri.layers.raster.functions.StatisticsHistogramFunctionArguments")],c);const m=c;export{m as default};
