Built motion from commit 2239aeb.|0.0.113
[motion.git] / server / api / default_report / default_report.controller.js
index 1973536..9bb014c 100644 (file)
@@ -1 +1 @@
-var _0x6b9f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74","\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x62\x75\x69\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x70\x61\x72\x61\x6D\x73","\x6D\x65\x72\x67\x65","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x70\x72\x65\x76\x69\x65\x77","\x6C\x6F\x67","\x6C\x65\x6E\x67\x74\x68","\x6C\x69\x6D\x69\x74","\x76\x61\x6C\x75\x65","\x74\x61\x6B\x65","\x6F\x66\x66\x73\x65\x74","\x73\x6C\x69\x63\x65","\x4D\x4D\x2D\x44\x44\x2D\x59\x59\x59\x59\x20\x48\x48\x3A\x6D\x6D","\x66\x6F\x72\x6D\x61\x74","\x66\x6F\x72\x4F\x77\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x62\x75\x69\x6C\x64\x51\x75\x65\x72\x79","\x73\x70\x72\x65\x61\x64","\x75\x73\x65\x72","\x62\x75\x69\x6C\x64\x46\x69\x6C\x74\x65\x72","\x66\x6F\x75\x6E\x64\x20\x72\x65\x70\x6F\x72\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x64\x61\x69\x6C\x79","\x74\x72\x75\x65","\x73\x74\x61\x72\x74\x44\x61\x74\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44","\x65\x6E\x64\x44\x61\x74\x65","\x74\x61\x62\x6C\x65","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x5F\x68\x69\x73\x74\x6F\x72\x79","","\x72\x65\x70\x6C\x61\x63\x65","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x66\x69\x65\x6C\x64\x73","\x73\x63\x6F\x70\x65","\x65\x78\x74\x72\x61\x63\x74\x50\x64\x66","\x50\x44\x46","\x65\x78\x74\x72\x61\x63\x74\x43\x73\x76","\x43\x53\x56","\x65\x78\x74\x72\x61\x63\x74","\x6E\x61\x6D\x65","\x63\x72\x65\x61\x74\x65","\x28","\x72\x75\x6C\x65\x73","\x20","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x67\x72\x6F\x75\x70","\x66\x69\x65\x6C\x64","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x20\x27","\x4C\x49\x4B\x45","\x25","\x27","\x29","\x73\x68\x6F\x77","\x63\x6F\x70\x79","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x70\x61\x72\x65\x6E\x74","\x62\x6F\x64\x79","\x46\x69\x65\x6C\x64\x73","\x6D\x61\x70","\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x6b9f[0];var _=require(_0x6b9f[1]);var util=require(_0x6b9f[2]);var DefaultReport=require(_0x6b9f[4])[_0x6b9f[3]];var sequelize=require(_0x6b9f[4])[_0x6b9f[5]];var CustomReport=require(_0x6b9f[4])[_0x6b9f[6]];var ExtractedReport=require(_0x6b9f[4])[_0x6b9f[7]];var extractUtils=require(_0x6b9f[8]);var reportBuildUtils=require(_0x6b9f[9]);var Util=require(_0x6b9f[10]);var moment=require(_0x6b9f[11]);exports[_0x6b9f[12]]=function(_0x2b2bxb,_0x2b2bxc,_0x2b2bxd){return DefaultReport[_0x6b9f[21]](Util[_0x6b9f[20]](_[_0x6b9f[19]](_0x2b2bxb[_0x6b9f[17]],_0x2b2bxb[_0x6b9f[18]])))[_0x6b9f[16]](function(_0x2b2bxf){_0x2b2bxc[_0x6b9f[15]](200)[_0x6b9f[14]](_0x2b2bxf)})[_0x6b9f[13]](function(_0x2b2bxe){return handleError(_0x2b2bxc,_0x2b2bxe)})};exports[_0x6b9f[22]]=function(_0x2b2bxb,_0x2b2bxc){var _0x2b2bx10,_0x2b2bx11;return DefaultReport[_0x6b9f[55]](_0x6b9f[54])[_0x6b9f[53]](_0x2b2bxb[_0x6b9f[18]][_0x6b9f[52]])[_0x6b9f[16]](function(_0x2b2bx18){console[_0x6b9f[23]](_0x6b9f[40]);if(!_0x2b2bx18){return _0x2b2bxc[_0x6b9f[41]](404)};if(_0x2b2bxb[_0x6b9f[17]][_0x6b9f[42]]&&_0x2b2bxb[_0x6b9f[17]][_0x6b9f[42]]===_0x6b9f[43]){_0x2b2bxb[_0x6b9f[17]][_0x6b9f[44]]=moment()[_0x6b9f[31]](_0x6b9f[45]);_0x2b2bxb[_0x6b9f[17]][_0x6b9f[46]]=moment()[_0x6b9f[31]](_0x6b9f[45]);_0x2b2bx18[_0x6b9f[48]][_0x6b9f[47]]=_0x2b2bx18[_0x6b9f[48]][_0x6b9f[47]][_0x6b9f[51]](_0x6b9f[49],_0x6b9f[50])};delete _0x2b2bxb[_0x6b9f[17]][_0x6b9f[42]];_0x2b2bx11=_0x2b2bx18[_0x6b9f[48]];return _0x2b2bx11[_0x6b9f[47]]})[_0x6b9f[16]](reportBuildUtils[_0x6b9f[39]](_0x2b2bxb[_0x6b9f[38]]))[_0x6b9f[16]](function(_0x2b2bx17){return [_0x2b2bx17,_0x2b2bx11]})[_0x6b9f[37]](reportBuildUtils[_0x6b9f[36]](_0x2b2bxb[_0x6b9f[17]]))[_0x6b9f[16]](function(_0x2b2bx16){return sequelize[_0x6b9f[17]](_0x2b2bx16,{type:sequelize[_0x6b9f[35]][_0x6b9f[34]]})})[_0x6b9f[16]](function(_0x2b2bx12){_0x2b2bx10=_0x2b2bx12[_0x6b9f[24]];if(_0x2b2bxb[_0x6b9f[17]][_0x6b9f[25]]){_0x2b2bx12=_(_0x2b2bx12)[_0x6b9f[29]](_0x2b2bxb[_0x6b9f[17]][_0x6b9f[28]]||0)[_0x6b9f[27]](_0x2b2bxb[_0x6b9f[17]][_0x6b9f[25]])[_0x6b9f[26]]()};_[_0x6b9f[33]](_0x2b2bx12,function(_0x2b2bx13){_[_0x6b9f[32]](_0x2b2bx13,function(_0x2b2bx14,_0x2b2bx15){if(_0x2b2bx14 instanceof Date){_0x2b2bx13[_0x2b2bx15]=moment(_0x2b2bx14)[_0x6b9f[31]](_0x6b9f[30]).toString()}})});_0x2b2bxc[_0x6b9f[15]](200)[_0x6b9f[14]]({rows:_0x2b2bx12,count:_0x2b2bx10})})[_0x6b9f[13]](function(_0x2b2bxe){console[_0x6b9f[23]](_0x2b2bxe);return handleError(_0x2b2bxc,_0x2b2bxe)})};exports[_0x6b9f[56]]=function(_0x2b2bxb,_0x2b2bxc){docExtract(_0x2b2bxb,_0x2b2bxc,_0x6b9f[57])};exports[_0x6b9f[58]]=function(_0x2b2bxb,_0x2b2bxc){docExtract(_0x2b2bxb,_0x2b2bxc,_0x6b9f[59])};function docExtract(_0x2b2bxb,_0x2b2bxc,_0x2b2bx1a){DefaultReport[_0x6b9f[55]](_0x6b9f[54])[_0x6b9f[53]](_0x2b2bxb[_0x6b9f[18]][_0x6b9f[52]])[_0x6b9f[16]](function(_0x2b2bx18){if(!_0x2b2bx18){return _0x2b2bxc[_0x6b9f[41]](404)};if(_0x2b2bxb[_0x6b9f[17]][_0x6b9f[42]]&&_0x2b2bxb[_0x6b9f[17]][_0x6b9f[42]]===_0x6b9f[43]){_0x2b2bxb[_0x6b9f[17]][_0x6b9f[44]]=moment()[_0x6b9f[31]](_0x6b9f[45]);_0x2b2bxb[_0x6b9f[17]][_0x6b9f[46]]=moment()[_0x6b9f[31]](_0x6b9f[45]);_0x2b2bx18[_0x6b9f[48]][_0x6b9f[47]]=_0x2b2bx18[_0x6b9f[48]][_0x6b9f[47]][_0x6b9f[51]](_0x6b9f[49],_0x6b9f[50])};delete _0x2b2bxb[_0x6b9f[17]][_0x6b9f[42]];return [_0x2b2bx18,ExtractedReport[_0x6b9f[62]]({name:_0x2b2bx18[_0x6b9f[61]],startDate:_0x2b2bxb[_0x6b9f[17]][_0x6b9f[44]]||null,endDate:_0x2b2bxb[_0x6b9f[17]][_0x6b9f[46]]||null,output:_0x2b2bx1a})]})[_0x6b9f[37]](function(_0x2b2bx18,_0x2b2bx1b){extractUtils[_0x6b9f[60]+_0x2b2bx1a](_0x2b2bx18,_0x2b2bxb[_0x6b9f[17]],_0x2b2bx1b[_0x6b9f[52]],_0x2b2bxb[_0x6b9f[38]])})[_0x6b9f[13]](function(_0x2b2bxe){console[_0x6b9f[23]](_0x2b2bxe);return handleError(_0x2b2bxc,_0x2b2bxe)});return _0x2b2bxc[_0x6b9f[41]](200)}function getConditions(_0x2b2bx1d){if(!_0x2b2bx1d){return _0x6b9f[50]};for(var _0x2b2bx1e=_0x6b9f[63],_0x2b2bx1f=0;_0x2b2bx1f<_0x2b2bx1d[_0x6b9f[64]][_0x6b9f[24]];_0x2b2bx1f++){_0x2b2bx1f>0&&(_0x2b2bx1e+=_0x6b9f[65]+_0x2b2bx1d[_0x6b9f[66]]+_0x6b9f[65]);_0x2b2bx1e+=_0x2b2bx1d[_0x6b9f[64]][_0x2b2bx1f][_0x6b9f[67]]?getConditions(_0x2b2bx1d[_0x6b9f[64]][_0x2b2bx1f][_0x6b9f[67]]):_0x2b2bx1d[_0x6b9f[64]][_0x2b2bx1f][_0x6b9f[68]]+_0x6b9f[65]+_0x2b2bx1d[_0x6b9f[64]][_0x2b2bx1f][_0x6b9f[69]]+_0x6b9f[70]+(_0x2b2bx1d[_0x6b9f[64]][_0x2b2bx1f][_0x6b9f[69]]===_0x6b9f[71]?_0x6b9f[72]+_0x2b2bx1d[_0x6b9f[64]][_0x2b2bx1f][_0x6b9f[26]]+_0x6b9f[72]:_0x2b2bx1d[_0x6b9f[64]][_0x2b2bx1f][_0x6b9f[26]])+_0x6b9f[73]};return _0x2b2bx1e+_0x6b9f[74]}exports[_0x6b9f[75]]=function(_0x2b2bxb,_0x2b2bxc){return DefaultReport[_0x6b9f[53]](_0x2b2bxb[_0x6b9f[18]][_0x6b9f[52]],{include:[{all:true}]})[_0x6b9f[16]](function(_0x2b2bx18){if(!_0x2b2bx18){return _0x2b2bxc[_0x6b9f[41]](404)};return _0x2b2bxc[_0x6b9f[14]](_0x2b2bx18)})[_0x6b9f[13]](function(_0x2b2bxe){return handleError(_0x2b2bxc,_0x2b2bxe)})};exports[_0x6b9f[76]]=function(_0x2b2bxb,_0x2b2bxc){return DefaultReport[_0x6b9f[53]](_0x2b2bxb[_0x6b9f[18]][_0x6b9f[52]],{include:[{all:true}]})[_0x6b9f[16]](function(_0x2b2bx18){if(!_0x2b2bx18){return _0x2b2bxc[_0x6b9f[41]](404)};var _0x2b2bx20=_0x2b2bx18[_0x6b9f[48]];delete _0x2b2bx20[_0x6b9f[52]];delete _0x2b2bx20[_0x6b9f[77]];delete _0x2b2bx20[_0x6b9f[78]];_0x2b2bx20[_0x6b9f[79]]=_0x2b2bxb[_0x6b9f[80]][_0x6b9f[79]];_0x2b2bx20[_0x6b9f[81]]=_[_0x6b9f[82]](_0x2b2bx20.Fields,_0x6b9f[48]);_[_0x6b9f[33]](_0x2b2bx20.Fields,function(_0x2b2bx21){delete _0x2b2bx21[_0x6b9f[52]];delete _0x2b2bx21[_0x6b9f[83]];delete _0x2b2bx21[_0x6b9f[77]];delete _0x2b2bx21[_0x6b9f[78]]});return CustomReport[_0x6b9f[62]](_0x2b2bx20,{include:[{all:true}]})})[_0x6b9f[16]](function(){return _0x2b2bxc[_0x6b9f[41]](201)})[_0x6b9f[13]](function(_0x2b2bxe){console[_0x6b9f[23]](_0x2b2bxe);return handleError(_0x2b2bxc,_0x2b2bxe)})};exports[_0x6b9f[62]]=function(_0x2b2bxb,_0x2b2bxc){return DefaultReport[_0x6b9f[62]](_0x2b2bxb[_0x6b9f[80]])[_0x6b9f[16]](function(_0x2b2bx18){return _0x2b2bxc[_0x6b9f[15]](201)[_0x6b9f[14]](_0x2b2bx18)})[_0x6b9f[13]](function(_0x2b2bxe){return handleError(_0x2b2bxc,_0x2b2bxe)})};exports[_0x6b9f[84]]=function(_0x2b2bxb,_0x2b2bxc){if(_0x2b2bxb[_0x6b9f[80]][_0x6b9f[52]]){delete _0x2b2bxb[_0x6b9f[80]][_0x6b9f[52]]};return DefaultReport[_0x6b9f[53]](_0x2b2bxb[_0x6b9f[18]][_0x6b9f[52]])[_0x6b9f[16]](function(_0x2b2bx18){if(!_0x2b2bx18){return _0x2b2bxc[_0x6b9f[41]](404)};var _0x2b2bx22=_[_0x6b9f[19]](_0x2b2bx18,_0x2b2bxb[_0x6b9f[80]]);return _0x2b2bx22[_0x6b9f[85]]()})[_0x6b9f[16]](function(_0x2b2bx18){return _0x2b2bxc[_0x6b9f[15]](200)[_0x6b9f[14]](_0x2b2bx18)})[_0x6b9f[13]](function(_0x2b2bxe){return handleError(_0x2b2bxc,_0x2b2bxe)})};exports[_0x6b9f[86]]=function(_0x2b2bxb,_0x2b2bxc){return DefaultReport[_0x6b9f[53]](_0x2b2bxb[_0x6b9f[18]][_0x6b9f[52]])[_0x6b9f[16]](function(_0x2b2bx18){if(!_0x2b2bx18){return _0x2b2bxc[_0x6b9f[41]](404)};return _0x2b2bx18[_0x6b9f[86]]()})[_0x6b9f[16]](function(){return _0x2b2bxc[_0x6b9f[41]](204)})[_0x6b9f[13]](function(_0x2b2bxe){return handleError(_0x2b2bxc,_0x2b2bxe)})};function handleError(_0x2b2bxc,_0x2b2bxe){return _0x2b2bxc[_0x6b9f[15]](500)[_0x6b9f[14]](_0x2b2bxe)}
\ No newline at end of file
+var _0x2cf0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74","\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x62\x75\x69\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x65\x78\x70\x6F\x72\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x6E\x61\x6D\x65","\x70\x61\x72\x65\x6E\x74","\x74\x61\x62\x6C\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x65\x78\x70\x6F\x72\x74\x46\x69\x65\x6C\x64\x73","\x73\x63\x6F\x70\x65","\x67\x65\x74\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x72\x79","\x45\x72\x72\x6F\x72\x20\x67\x65\x74\x74\x69\x6E\x67\x20\x71\x75\x65\x72\x79\x20\x66\x72\x6F\x6D\x20\x61\x70\x69\x3A","\x6C\x6F\x67","\x61\x6C\x6C","\x62\x75\x69\x6C\x64\x51\x75\x65\x72\x79","\x73\x70\x72\x65\x61\x64","\x75\x73\x65\x72","\x62\x75\x69\x6C\x64\x46\x69\x6C\x74\x65\x72","\x66\x6F\x75\x6E\x64\x20\x72\x65\x70\x6F\x72\x74","\x64\x61\x69\x6C\x79","\x74\x72\x75\x65","\x73\x74\x61\x72\x74\x44\x61\x74\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44","\x66\x6F\x72\x6D\x61\x74","\x65\x6E\x64\x44\x61\x74\x65","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x5F\x68\x69\x73\x74\x6F\x72\x79","","\x72\x65\x70\x6C\x61\x63\x65","\x66\x69\x65\x6C\x64\x73","\x70\x72\x65\x76\x69\x65\x77","\x6C\x65\x6E\x67\x74\x68","\x6C\x69\x6D\x69\x74","\x76\x61\x6C\x75\x65","\x74\x61\x6B\x65","\x6F\x66\x66\x73\x65\x74","\x73\x6C\x69\x63\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x4F\x77\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x65\x78\x74\x72\x61\x63\x74\x50\x64\x66","\x50\x44\x46","\x65\x78\x74\x72\x61\x63\x74\x43\x73\x76","\x43\x53\x56","\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x2E\x6A\x73","\x66\x6F\x72\x6B","\x65\x72\x72\x6F\x72","\x63\x68\x69\x6C\x64\x20\x65\x72\x72\x6F\x72","\x6F\x6E","\x63\x6C\x6F\x73\x65","\x63\x68\x69\x6C\x64\x20\x63\x6C\x6F\x73\x65","\x6D\x65\x73\x73\x61\x67\x65","\x63\x68\x69\x6C\x64\x20\x6D\x65\x73\x73\x61\x67\x65","\x6B\x69\x6C\x6C","\x63\x72\x65\x61\x74\x65","\x28","\x72\x75\x6C\x65\x73","\x20","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x67\x72\x6F\x75\x70","\x66\x69\x65\x6C\x64","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x20\x27","\x4C\x49\x4B\x45","\x25","\x27","\x29","\x73\x68\x6F\x77","\x63\x6F\x70\x79","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x62\x6F\x64\x79","\x46\x69\x65\x6C\x64\x73","\x6D\x61\x70","\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x2cf0[0];var _=require(_0x2cf0[1]);var util=require(_0x2cf0[2]);var DefaultReport=require(_0x2cf0[4])[_0x2cf0[3]];var sequelize=require(_0x2cf0[4])[_0x2cf0[5]];var CustomReport=require(_0x2cf0[4])[_0x2cf0[6]];var ExtractedReport=require(_0x2cf0[4])[_0x2cf0[7]];var extractUtils=require(_0x2cf0[8]);var reportBuildUtils=require(_0x2cf0[9]);var Util=require(_0x2cf0[10]);var moment=require(_0x2cf0[11]);var cp=require(_0x2cf0[12]);exports[_0x2cf0[13]]= function(_0x14dfxc,_0x14dfxd,_0x14dfxe){return DefaultReport[_0x2cf0[20]](Util[_0x2cf0[19]](_0x14dfxc[_0x2cf0[18]]))[_0x2cf0[17]](function(_0x14dfx10){_0x14dfxd[_0x2cf0[16]](200)[_0x2cf0[15]](_0x14dfx10)})[_0x2cf0[14]](function(_0x14dfxf){return handleError(_0x14dfxd,_0x14dfxf)})};exports[_0x2cf0[21]]= function(_0x14dfxc,_0x14dfxd){return DefaultReport[_0x2cf0[32]]({method:[_0x2cf0[31],{DefaultReportId:_0x14dfxc[_0x2cf0[24]][_0x2cf0[23]]}]})[_0x2cf0[30]](_0x14dfxc[_0x2cf0[24]][_0x2cf0[23]],{attributes:[_0x2cf0[25],_0x2cf0[26],_0x2cf0[27],_0x2cf0[28],_0x2cf0[29]]})[_0x2cf0[17]](function(_0x14dfx11){if(!_0x14dfx11){return _0x14dfxd[_0x2cf0[22]](404)};return _0x14dfxd[_0x2cf0[15]](_0x14dfx11)})[_0x2cf0[14]](function(_0x14dfxf){return handleError(_0x14dfxd,_0x14dfxf)})};exports[_0x2cf0[33]]= function(_0x14dfxc,_0x14dfxd){return Promise[_0x2cf0[36]]([])[_0x2cf0[17]](getQuery(_0x14dfxc,_0x14dfxd))[_0x2cf0[17]](function(_0x14dfx12){_0x14dfxd[_0x2cf0[16]](200)[_0x2cf0[15]]({query:_0x14dfx12})})[_0x2cf0[14]](function(_0x14dfxf){console[_0x2cf0[35]](_0x2cf0[34],_0x14dfxf)})};function getQuery(_0x14dfxc,_0x14dfxd){var _0x14dfx14;return function(){return DefaultReport[_0x2cf0[32]](_0x2cf0[52])[_0x2cf0[30]](_0x14dfxc[_0x2cf0[24]][_0x2cf0[23]])[_0x2cf0[17]](function(_0x14dfx11){console[_0x2cf0[35]](_0x2cf0[41]);if(!_0x14dfx11){return _0x14dfxd[_0x2cf0[22]](404)};if(_0x14dfxc[_0x2cf0[18]][_0x2cf0[42]]&& _0x14dfxc[_0x2cf0[18]][_0x2cf0[42]]=== _0x2cf0[43]){_0x14dfxc[_0x2cf0[18]][_0x2cf0[44]]= moment()[_0x2cf0[46]](_0x2cf0[45]);_0x14dfxc[_0x2cf0[18]][_0x2cf0[47]]= moment()[_0x2cf0[46]](_0x2cf0[45]);_0x14dfx11[_0x2cf0[48]][_0x2cf0[29]]= _0x14dfx11[_0x2cf0[48]][_0x2cf0[29]][_0x2cf0[51]](_0x2cf0[49],_0x2cf0[50])};delete _0x14dfxc[_0x2cf0[18]][_0x2cf0[42]];_0x14dfx14= _0x14dfx11[_0x2cf0[48]];return _0x14dfx14[_0x2cf0[29]]})[_0x2cf0[17]](reportBuildUtils[_0x2cf0[40]](_0x14dfxc[_0x2cf0[39]]))[_0x2cf0[17]](function(_0x14dfx15){return [_0x14dfx15,_0x14dfx14]})[_0x2cf0[38]](reportBuildUtils[_0x2cf0[37]](_0x14dfxc[_0x2cf0[18]]))}}exports[_0x2cf0[53]]= function(_0x14dfxc,_0x14dfxd){var _0x14dfx16;return Promise[_0x2cf0[36]]([])[_0x2cf0[17]](getQuery(_0x14dfxc,_0x14dfxd))[_0x2cf0[17]](function(_0x14dfx12){return sequelize[_0x2cf0[18]](_0x14dfx12,{type:sequelize[_0x2cf0[64]][_0x2cf0[63]]})})[_0x2cf0[17]](function(_0x14dfx17){_0x14dfx16= _0x14dfx17[_0x2cf0[54]];if(_0x14dfxc[_0x2cf0[18]][_0x2cf0[55]]){_0x14dfx17= _(_0x14dfx17)[_0x2cf0[59]](_0x14dfxc[_0x2cf0[18]][_0x2cf0[58]]|| 0)[_0x2cf0[57]](_0x14dfxc[_0x2cf0[18]][_0x2cf0[55]])[_0x2cf0[56]]()};_[_0x2cf0[62]](_0x14dfx17,function(_0x14dfx18){_[_0x2cf0[61]](_0x14dfx18,function(_0x14dfx19,_0x14dfx1a){if(_0x14dfx19 instanceof  Date){_0x14dfx18[_0x14dfx1a]= moment(_0x14dfx19)[_0x2cf0[46]](_0x2cf0[60]).toString()}})});_0x14dfxd[_0x2cf0[16]](200)[_0x2cf0[15]]({rows:_0x14dfx17,count:_0x14dfx16})})[_0x2cf0[14]](function(_0x14dfxf){console[_0x2cf0[35]](_0x14dfxf);return handleError(_0x14dfxd,_0x14dfxf)})};exports[_0x2cf0[65]]= function(_0x14dfxc,_0x14dfxd){docExtract(_0x14dfxc,_0x14dfxd,_0x2cf0[66])};exports[_0x2cf0[67]]= function(_0x14dfxc,_0x14dfxd){docExtract(_0x14dfxc,_0x14dfxd,_0x2cf0[68])};function docExtract(_0x14dfxc,_0x14dfxd,_0x14dfx1c){DefaultReport[_0x2cf0[32]](_0x2cf0[52])[_0x2cf0[30]](_0x14dfxc[_0x2cf0[24]][_0x2cf0[23]])[_0x2cf0[17]](function(_0x14dfx11){if(!_0x14dfx11){return _0x14dfxd[_0x2cf0[22]](404)};if(_0x14dfxc[_0x2cf0[18]][_0x2cf0[42]]&& _0x14dfxc[_0x2cf0[18]][_0x2cf0[42]]=== _0x2cf0[43]){_0x14dfxc[_0x2cf0[18]][_0x2cf0[44]]= moment()[_0x2cf0[46]](_0x2cf0[45]);_0x14dfxc[_0x2cf0[18]][_0x2cf0[47]]= moment()[_0x2cf0[46]](_0x2cf0[45]);_0x14dfx11[_0x2cf0[48]][_0x2cf0[29]]= _0x14dfx11[_0x2cf0[48]][_0x2cf0[29]][_0x2cf0[51]](_0x2cf0[49],_0x2cf0[50])};delete _0x14dfxc[_0x2cf0[18]][_0x2cf0[42]];return [_0x14dfx11,ExtractedReport[_0x2cf0[79]]({name:_0x14dfx11[_0x2cf0[27]],startDate:_0x14dfxc[_0x2cf0[18]][_0x2cf0[44]]|| null,endDate:_0x14dfxc[_0x2cf0[18]][_0x2cf0[47]]|| null,output:_0x14dfx1c,UserId:_0x14dfxc[_0x2cf0[39]][_0x2cf0[23]]})]})[_0x2cf0[38]](function(_0x14dfx11,_0x14dfx1d){var _0x14dfx1e=cp[_0x2cf0[70]](__dirname+ _0x2cf0[69]);_0x14dfx1e[_0x2cf0[73]](_0x2cf0[76],function(_0x14dfx1f){console[_0x2cf0[35]](_0x2cf0[77],_0x14dfx1f);_0x14dfx1e[_0x2cf0[78]]()})[_0x2cf0[73]](_0x2cf0[74],function(){console[_0x2cf0[35]](_0x2cf0[75])})[_0x2cf0[73]](_0x2cf0[71],function(_0x14dfxf){console[_0x2cf0[35]](_0x2cf0[72],_0x14dfxf)});_0x14dfx1e[_0x2cf0[15]]({report:_0x14dfx11,query:_0x14dfxc[_0x2cf0[18]],extractedId:_0x14dfx1d[_0x2cf0[23]],user:_0x14dfxc[_0x2cf0[39]],type:_0x14dfx1c})})[_0x2cf0[14]](function(_0x14dfxf){console[_0x2cf0[35]](_0x14dfxf);return handleError(_0x14dfxd,_0x14dfxf)});return _0x14dfxd[_0x2cf0[22]](200)}function getConditions(_0x14dfx21){if(!_0x14dfx21){return _0x2cf0[50]};for(var _0x14dfx22=_0x2cf0[80],_0x14dfx23=0;_0x14dfx23< _0x14dfx21[_0x2cf0[81]][_0x2cf0[54]];_0x14dfx23++){_0x14dfx23> 0&& (_0x14dfx22+= _0x2cf0[82]+ _0x14dfx21[_0x2cf0[83]]+ _0x2cf0[82]);_0x14dfx22+= _0x14dfx21[_0x2cf0[81]][_0x14dfx23][_0x2cf0[84]]?getConditions(_0x14dfx21[_0x2cf0[81]][_0x14dfx23][_0x2cf0[84]]):_0x14dfx21[_0x2cf0[81]][_0x14dfx23][_0x2cf0[85]]+ _0x2cf0[82]+ _0x14dfx21[_0x2cf0[81]][_0x14dfx23][_0x2cf0[86]]+ _0x2cf0[87]+ (_0x14dfx21[_0x2cf0[81]][_0x14dfx23][_0x2cf0[86]]=== _0x2cf0[88]?_0x2cf0[89]+ _0x14dfx21[_0x2cf0[81]][_0x14dfx23][_0x2cf0[56]]+ _0x2cf0[89]:_0x14dfx21[_0x2cf0[81]][_0x14dfx23][_0x2cf0[56]])+ _0x2cf0[90]};return _0x14dfx22+ _0x2cf0[91]}exports[_0x2cf0[92]]= function(_0x14dfxc,_0x14dfxd){return DefaultReport[_0x2cf0[30]](_0x14dfxc[_0x2cf0[24]][_0x2cf0[23]],{include:[{all:true}]})[_0x2cf0[17]](function(_0x14dfx11){if(!_0x14dfx11){return _0x14dfxd[_0x2cf0[22]](404)};return _0x14dfxd[_0x2cf0[15]](_0x14dfx11)})[_0x2cf0[14]](function(_0x14dfxf){return handleError(_0x14dfxd,_0x14dfxf)})};exports[_0x2cf0[93]]= function(_0x14dfxc,_0x14dfxd){return DefaultReport[_0x2cf0[30]](_0x14dfxc[_0x2cf0[24]][_0x2cf0[23]],{include:[{all:true}]})[_0x2cf0[17]](function(_0x14dfx11){if(!_0x14dfx11){return _0x14dfxd[_0x2cf0[22]](404)};var _0x14dfx24=_0x14dfx11[_0x2cf0[48]];delete _0x14dfx24[_0x2cf0[23]];delete _0x14dfx24[_0x2cf0[94]];delete _0x14dfx24[_0x2cf0[95]];_0x14dfx24[_0x2cf0[28]]= _0x14dfxc[_0x2cf0[96]][_0x2cf0[28]];_0x14dfx24[_0x2cf0[97]]= _[_0x2cf0[98]](_0x14dfx24.Fields,_0x2cf0[48]);_[_0x2cf0[62]](_0x14dfx24.Fields,function(_0x14dfx25){delete _0x14dfx25[_0x2cf0[23]];delete _0x14dfx25[_0x2cf0[99]];delete _0x14dfx25[_0x2cf0[94]];delete _0x14dfx25[_0x2cf0[95]]});return CustomReport[_0x2cf0[79]](_0x14dfx24,{include:[{all:true}]})})[_0x2cf0[17]](function(){return _0x14dfxd[_0x2cf0[22]](201)})[_0x2cf0[14]](function(_0x14dfxf){console[_0x2cf0[35]](_0x14dfxf);return handleError(_0x14dfxd,_0x14dfxf)})};exports[_0x2cf0[79]]= function(_0x14dfxc,_0x14dfxd){return DefaultReport[_0x2cf0[79]](_0x14dfxc[_0x2cf0[96]])[_0x2cf0[17]](function(_0x14dfx11){return _0x14dfxd[_0x2cf0[16]](201)[_0x2cf0[15]](_0x14dfx11)})[_0x2cf0[14]](function(_0x14dfxf){return handleError(_0x14dfxd,_0x14dfxf)})};exports[_0x2cf0[100]]= function(_0x14dfxc,_0x14dfxd){if(_0x14dfxc[_0x2cf0[96]][_0x2cf0[23]]){delete _0x14dfxc[_0x2cf0[96]][_0x2cf0[23]]};return DefaultReport[_0x2cf0[30]](_0x14dfxc[_0x2cf0[24]][_0x2cf0[23]])[_0x2cf0[17]](function(_0x14dfx11){if(!_0x14dfx11){return _0x14dfxd[_0x2cf0[22]](404)};var _0x14dfx26=_[_0x2cf0[101]](_0x14dfx11,_0x14dfxc[_0x2cf0[96]]);return _0x14dfx26[_0x2cf0[102]]()})[_0x2cf0[17]](function(_0x14dfx11){return _0x14dfxd[_0x2cf0[16]](200)[_0x2cf0[15]](_0x14dfx11)})[_0x2cf0[14]](function(_0x14dfxf){return handleError(_0x14dfxd,_0x14dfxf)})};exports[_0x2cf0[103]]= function(_0x14dfxc,_0x14dfxd){return DefaultReport[_0x2cf0[30]](_0x14dfxc[_0x2cf0[24]][_0x2cf0[23]])[_0x2cf0[17]](function(_0x14dfx11){if(!_0x14dfx11){return _0x14dfxd[_0x2cf0[22]](404)};return _0x14dfx11[_0x2cf0[103]]()})[_0x2cf0[17]](function(){return _0x14dfxd[_0x2cf0[22]](204)})[_0x2cf0[14]](function(_0x14dfxf){return handleError(_0x14dfxd,_0x14dfxf)})};function handleError(_0x14dfxd,_0x14dfxf){return _0x14dfxd[_0x2cf0[16]](500)[_0x2cf0[15]](_0x14dfxf)}
\ No newline at end of file