(this["webpackJsonpgonzo-test-client"]=this["webpackJsonpgonzo-test-client"]||[]).push([[33],{"K/Fu":function(t,n,g){"use strict";g.d(n,"a",(function(){return l}));var o=g("J2iB"),i=g.n(o),e=g("lFKM"),a=g.n(e),s=g("wd/R"),r=g.n(s);const l=({shadow:t={},aggData:n=[],range:g={},today:o=+r()().utc().startOf("day")})=>{const e={averageDailyFlow:void 0,dailyConsumption:void 0,settlementConsumption:void 0};if(n.length){const s=n.filter(t=>t.AggDt.length);if(s.length){const n=s.find(t=>t.AggTi===o);if(n){const g=a()(t.waterConsumption)?t.waterConsumption:n.AggDt[n.AggDt.length-1].MR;e.dailyConsumption=g-n.AggDt[0].MR}if(i()(g.end)){const i=s.filter(t=>t.AggTi>=g.start&&t.AggTit.AggTi-n.AggTi);if(i.length){const g=Math.abs(r.a.utc(i[0].AggTi).diff(r.a.utc(a()(t.waterConsumption)?void 0:i[i.length-1].AggTi).startOf("day"),"days")),o=(a()(t.waterConsumption)?t.waterConsumption:i[i.length-1].AggDt[i[i.length-1].AggDt.length-1].MR)-i[0].AggDt[i[0].AggDt.length-1].MR;e.averageDailyFlow=o/(g||1),e.settlementConsumption=n?o+e.dailyConsumption:o}}}}return e}},ZVfr:function(t,n,g){"use strict";g.d(n,"a",(function(){return i}));var o=g("kiXb");const i=t=>{switch(t){case 1:return o.a.t("morning");case 2:return o.a.t("noon");case 3:return o.a.t("afternoon");default:return""}}},nscK:function(t,n,g){"use strict";g.d(n,"a",(function(){return l}));var o=g("J2iB"),i=g.n(o),e=g("lFKM"),a=g.n(e),s=g("wd/R"),r=g.n(s);const l=({shadow:t={},aggData:n=[],range:g={},today:o=+r()().utc().startOf("day")})=>{const e={averageDailyConsumption:void 0,dailyConsumption:void 0,settlementConsumption:void 0};if(n.length){const s=n.filter(t=>t.AggDt.length);if(s.length){const n=s.find(t=>t.AggTi===o);if(n){const g=a()(t.totalActiveEnergyConsumption)?t.totalActiveEnergyConsumption:n.AggDt[n.AggDt.length-1].MR;e.dailyConsumption=g-n.AggDt[0].MR}if(i()(g.end)){const i=s.filter(t=>t.AggTi>=g.start&&t.AggTit.AggTi-n.AggTi);if(i.length){const g=Math.abs(r.a.utc(i[0].AggTi).diff(r.a.utc(a()(t.waterConsumption)?void 0:i[i.length-1].AggTi).startOf("day"),"days")),o=(a()(t.totalActiveEnergyConsumption)?t.totalActiveEnergyConsumption:i[i.length-1].AggDt[i[i.length-1].AggDt.length-1].MR)-i[0].AggDt[i[0].AggDt.length-1].MR;e.averageDailyConsumption=o/(g||1),e.settlementConsumption=n?o+e.dailyConsumption:o}}}}return e}}}]); //# sourceMappingURL=main~4c7ba33a.e640bfc0.chunk.js.map