(()=>{function e(a,e,r,t,o,n,s,i){var m=e.deviceId;function c(e){function t(e,t){o.addAction({text:e,action:function(){var e=_.map(a.filters,function(e){return{dateFrom:moment(e.dateFrom).format(n.dateFullFormat),dateTo:moment(e.dateTo).format(n.dateFullFormat)}});i.downloadReportForDevice(t,m,(()=>{var e=a.supportedMeasurements||[],t=(o=a.pagination||{}).pageSize,o=((o.options||{})[o.page-1]||{}).startFrom;return e=_.isUndefined(t)||_.isUndefined(o)?e:r("limitTo")(e,t,o)})(),e)}})}a.supportedMeasurements=e,t("Download as CSV",s.format.csv),t("Download as Excel",s.format.xlsx)}this.realtime=!0,a.deviceId=m,a.filters=[],t.getSupportedMeasurements(m).then(c)}e.$inject=["$scope","$routeParams","$filter","c8yDevices","c8yActions","c8yBase","c8yMeasurements","MeasurementsReportSvc"],angular.module("c8y.core.measurements2").controller("measurementsCtrl",e)})();