Built motion from commit 57474b6.|0.0.99
[motion.git] / server / api / custom_report / custom_report.controller.js
index f6fab98..7f91618 100644 (file)
@@ -1 +1 @@
-var _0xeb78=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64","\x52\x65\x70\x6F\x72\x74\x54\x72\x65\x65","\x69\x6E\x64\x65\x78","\x6E\x61\x6D\x65","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x70\x61\x72\x65\x6E\x74","\x70\x65\x72\x5F\x70\x61\x67\x65","\x71\x75\x65\x72\x79","\x70\x61\x67\x65","\x6F\x72\x64\x65\x72","\x25\x73\x20\x25\x73","\x73\x6F\x72\x74\x5F\x62\x79","\x73\x6F\x72\x74\x5F\x6F\x72\x64\x65\x72","\x41\x53\x43","\x66\x6F\x72\x6D\x61\x74","\x24\x6F\x72","\x77\x68\x65\x72\x65","\x25","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x24","\x72\x6F\x6C\x65","\x73\x70\x6C\x69\x74","\x70\x61\x72\x73\x65","\x66\x6F\x72\x4F\x77\x6E","\x63\x6C\x69\x65\x6E\x74\x51\x75\x65\x72\x79","\x24\x6C\x69\x6B\x65","\x66\x6F\x72\x49\x6E","\x53\x6F\x6D\x65\x74\x68\x69\x6E\x67\x20\x62\x6C\x65\x77\x20\x75\x70\x21","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x63\x61\x74\x63\x68","\x63\x6F\x75\x6E\x74","\x63\x65\x69\x6C","\x6F\x66\x66\x73\x65\x74","\x25\x73\x3A\x2F\x2F\x25\x73\x25\x73\x3F\x70\x61\x67\x65\x3D\x25\x64","\x70\x72\x6F\x74\x6F\x63\x6F\x6C","\x68\x6F\x73\x74","\x68\x65\x61\x64\x65\x72\x73","\x62\x61\x73\x65\x55\x72\x6C","\x72\x6F\x77\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x6F\x70\x79","\x6C\x6F\x67","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\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","\x70\x6C\x75\x63\x6B","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64","\x63\x72\x65\x61\x74\x65","\x69\x6D\x70\x6F\x72\x74","\x67\x65\x74\x50\x72\x65\x76\x69\x65\x77","\x6C\x65\x6E\x67\x74\x68","\x4D\x45\x53\x53\x41\x47\x45\x5F\x53\x45\x4C\x45\x43\x54\x5F\x41\x5F\x46\x49\x45\x4C\x44","\x20\x4C\x49\x4D\x49\x54\x20\x32\x30","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","","\x66\x75\x6E\x63\x74\x69\x6F\x6E","\x43\x4F\x55\x4E\x54\x28\x44\x49\x53\x54\x49\x4E\x43\x54\x20\x25\x73\x29","\x66\x69\x65\x6C\x64","\x43\x4F\x55\x4E\x54\x20\x44\x49\x53\x54\x49\x4E\x43\x54","\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x28\x25\x73\x20\x4F\x52\x44\x45\x52\x20\x42\x59\x20\x25\x73\x20\x41\x53\x43\x29","\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x20\x41\x53\x43","\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x28\x25\x73\x20\x4F\x52\x44\x45\x52\x20\x42\x59\x20\x25\x73\x20\x44\x45\x53\x43\x29","\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x20\x44\x45\x53\x43","\x25\x73\x28\x25\x73\x29","\x25\x73\x20\x41\x53\x20\x27\x25\x73\x27","\x61\x6C\x69\x61\x73","\x67\x72\x6F\x75\x70\x42\x79","\x6F\x72\x64\x65\x72\x42\x79","\x67\x72\x6F\x75\x70","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x20","\x2C","\x6A\x6F\x69\x6E","\x20\x46\x52\x4F\x4D\x20","\x74\x61\x62\x6C\x65","\x28\x29","\x20\x57\x48\x45\x52\x45\x20","\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20","\x20\x4F\x52\x44\x45\x52\x20\x42\x59\x20","\x28","\x72\x75\x6C\x65\x73","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x20\x27","\x4C\x49\x4B\x45","\x76\x61\x6C\x75\x65","\x27","\x29","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79"];_0xeb78[0];var _=require(_0xeb78[1]);var util=require(_0xeb78[2]);var sequelize=require(_0xeb78[4])[_0xeb78[3]];var CustomReport=require(_0xeb78[4])[_0xeb78[5]];var ReportField=require(_0xeb78[4])[_0xeb78[6]];var ReportTree=require(_0xeb78[4])[_0xeb78[7]];exports[_0xeb78[8]]=function(_0x97ecx7,_0x97ecx8,_0x97ecx9){var _0x97ecxa=[_0xeb78[9],_0xeb78[10],_0xeb78[11]];var _0x97ecxb=_0x97ecx7[_0xeb78[13]][_0xeb78[12]]?parseInt(_0x97ecx7[_0xeb78[13]][_0xeb78[12]],10):100;var _0x97ecxc=_0x97ecx7[_0xeb78[13]][_0xeb78[14]]?parseInt(_0x97ecx7[_0xeb78[13]][_0xeb78[14]],10):0;var _0x97ecxd={where:{},limit:_0x97ecxb,offset:_0x97ecxc*_0x97ecxb};_[_0xeb78[33]](_0x97ecx7[_0xeb78[13]],function(_0x97ecxe,_0x97ecxf){switch(_0x97ecxf){case _0xeb78[12]:;case _0xeb78[14]:break ;;case _0xeb78[17]:_0x97ecxd[_0xeb78[15]]=util[_0xeb78[20]](_0xeb78[16],_0x97ecx7[_0xeb78[13]][_0xeb78[17]],_0x97ecx7[_0xeb78[13]][_0xeb78[18]]||_0xeb78[19])||null;break ;;case _0xeb78[18]:break ;;case _0xeb78[26]:_0x97ecxd[_0xeb78[22]][_0xeb78[21]]=[];_0x97ecxa[_0xeb78[25]](function(_0x97ecx10){var _0x97ecx11={};_0x97ecx11[_0x97ecx10]={$like:_0xeb78[23]+_0x97ecxe+_0xeb78[23]};_0x97ecxd[_0xeb78[22]][_0xeb78[21]][_0xeb78[24]](_0x97ecx11);});break ;;case _0xeb78[27]:_0x97ecxd[_0xeb78[22]][_0xeb78[27]]={$or:_0x97ecxe[_0xeb78[28]](/[\s,]+/)};break ;;case _0xeb78[31]:var _0x97ecx12=JSON[_0xeb78[29]](_0x97ecxe);_[_0xeb78[30]](_0x97ecx12,function(_0x97ecx13,_0x97ecx14){_0x97ecxd[_0xeb78[22]][_0x97ecx14]=_0x97ecx13});break ;;default:_0x97ecxd[_0xeb78[22]][_0x97ecxf]={$like:{}};_0x97ecxd[_0xeb78[22]][_0x97ecxf][_0xeb78[32]]=_0xeb78[23]+_0x97ecxe+_0xeb78[23];;}});CustomReport[_0xeb78[48]](_0x97ecxd)[_0xeb78[47]](function(_0x97ecx16){var _0x97ecx17=Math[_0xeb78[39]](_0x97ecx16[_0xeb78[38]]/_0x97ecxb);var _0x97ecx18=_0x97ecx17>(_0x97ecxd[_0xeb78[40]]+1)?util[_0xeb78[20]](_0xeb78[41],_0x97ecx7[_0xeb78[42]],_0x97ecx7[_0xeb78[44]][_0xeb78[43]],_0x97ecx7[_0xeb78[45]],_0x97ecxc+1):null;var _0x97ecx19=_0x97ecxc>0?util[_0xeb78[20]](_0xeb78[41],_0x97ecx7[_0xeb78[42]],_0x97ecx7[_0xeb78[44]][_0xeb78[43]],_0x97ecx7[_0xeb78[45]],_0x97ecxc-1):null;_0x97ecx8[_0xeb78[36]](200)[_0xeb78[35]]({count:_0x97ecx16[_0xeb78[38]],rows:_0x97ecx16[_0xeb78[46]],next_page:_0x97ecx18,previous_page:_0x97ecx19,total_pages:_0x97ecx17});})[_0xeb78[37]](function(_0x97ecx15){_0x97ecx8[_0xeb78[36]](500)[_0xeb78[35]]({error:_0xeb78[34]})});};exports[_0xeb78[49]]=function(_0x97ecx7,_0x97ecx8){CustomReport[_0xeb78[53]](_0x97ecx7[_0xeb78[52]][_0xeb78[51]],{include:[{all:true}]})[_0xeb78[47]](function(_0x97ecx1a){if(!_0x97ecx1a){return _0x97ecx8[_0xeb78[50]](404)};return _0x97ecx8[_0xeb78[35]](_0x97ecx1a);})[_0xeb78[37]](function(_0x97ecx15){return handleError(_0x97ecx8,_0x97ecx15)})};exports[_0xeb78[54]]=function(_0x97ecx7,_0x97ecx8){CustomReport[_0xeb78[53]](_0x97ecx7[_0xeb78[52]][_0xeb78[51]],{include:[{all:true}]})[_0xeb78[47]](function(_0x97ecx1a){if(!_0x97ecx1a){return _0x97ecx8[_0xeb78[50]](404)};var _0x97ecx1b=_0x97ecx1a[_0xeb78[56]];delete _0x97ecx1b[_0xeb78[51]];delete _0x97ecx1b[_0xeb78[57]];delete _0x97ecx1b[_0xeb78[58]];_0x97ecx1b[_0xeb78[11]]=_0x97ecx7[_0xeb78[59]][_0xeb78[11]];_0x97ecx1b[_0xeb78[60]]=_[_0xeb78[61]](_0x97ecx1b.Fields,_0xeb78[56]);_[_0xeb78[25]](_0x97ecx1b.Fields,function(_0x97ecx1c){delete _0x97ecx1c[_0xeb78[51]];delete _0x97ecx1c[_0xeb78[62]];delete _0x97ecx1c[_0xeb78[57]];delete _0x97ecx1c[_0xeb78[58]];});return CustomReport[_0xeb78[63]](_0x97ecx1b,{include:[{all:true}]});})[_0xeb78[47]](function(){return _0x97ecx8[_0xeb78[50]](201)})[_0xeb78[37]](function(_0x97ecx15){console[_0xeb78[55]](_0x97ecx15);return handleError(_0x97ecx8,_0x97ecx15);})};exports[_0xeb78[64]]=function(_0x97ecx7,_0x97ecx8){CustomReport[_0xeb78[63]](_0x97ecx7[_0xeb78[59]],{include:[{all:true}]})[_0xeb78[47]](function(_0x97ecx1a){return _0x97ecx8[_0xeb78[36]](201)[_0xeb78[35]](_0x97ecx1a)})[_0xeb78[37]](function(_0x97ecx15){return handleError(_0x97ecx8,_0x97ecx15)})};exports[_0xeb78[65]]=function(_0x97ecx7,_0x97ecx8){CustomReport[_0xeb78[53]](_0x97ecx7[_0xeb78[52]][_0xeb78[51]],{include:[{all:true}]})[_0xeb78[47]](function(_0x97ecx1a){if(!_0x97ecx1a){return _0x97ecx8[_0xeb78[50]](404)};if(!_0x97ecx1a[_0xeb78[60]][_0xeb78[66]]){return _0x97ecx8[_0xeb78[36]](500)[_0xeb78[35]]({message:_0xeb78[67]})};var _0x97ecxd=buildReport(_0x97ecx1a[_0xeb78[56]]);return sequelize[_0xeb78[13]](_0x97ecxd+_0xeb78[68],{type:sequelize[_0xeb78[70]][_0xeb78[69]]});})[_0xeb78[47]](function(_0x97ecx1d){return _0x97ecx8[_0xeb78[36]](200)[_0xeb78[35]](_0x97ecx1d)})[_0xeb78[37]](function(_0x97ecx15){return handleError(_0x97ecx8,_0x97ecx15)})};function buildReport(_0x97ecx1a){var _0x97ecx1f=[],_0x97ecx20=[],_0x97ecx21=[];_[_0xeb78[25]](_0x97ecx1a.Fields,function(_0x97ecx1c){var _0x97ecx22=_0xeb78[71];if(_0x97ecx1c[_0xeb78[72]]){switch(_0x97ecx1c[_0xeb78[72]]){case _0xeb78[75]:_0x97ecx22=util[_0xeb78[20]](_0xeb78[73],_0x97ecx1c[_0xeb78[74]]);break ;;case _0xeb78[77]:_0x97ecx22=util[_0xeb78[20]](_0xeb78[76],_0x97ecx1c[_0xeb78[74]],_0x97ecx1c[_0xeb78[74]]);break ;;case _0xeb78[79]:_0x97ecx22=util[_0xeb78[20]](_0xeb78[78],_0x97ecx1c[_0xeb78[74]],_0x97ecx1c[_0xeb78[74]]);break ;;default:_0x97ecx22=util[_0xeb78[20]](_0xeb78[80],_0x97ecx1c[_0xeb78[72]],_0x97ecx1c[_0xeb78[74]]);;}}else {_0x97ecx22=_0x97ecx1c[_0xeb78[74]]};_0x97ecx1f[_0xeb78[24]](util[_0xeb78[20]](_0xeb78[81],_0x97ecx22,_0x97ecx1c[_0xeb78[82]]));if(_0x97ecx1c[_0xeb78[83]]){_0x97ecx20[_0xeb78[24]](_0x97ecx1c[_0xeb78[74]])};if(_0x97ecx1c[_0xeb78[84]]){_0x97ecx21[_0xeb78[24]](util[_0xeb78[20]](_0xeb78[16],_0x97ecx1c[_0xeb78[74]],_0x97ecx1c[_0xeb78[84]]))};});var _0x97ecx23=getConditions(JSON[_0xeb78[29]](_0x97ecx1a[_0xeb78[86]])[_0xeb78[85]]);var _0x97ecxd=_0xeb78[69];_0x97ecxd+=_0xeb78[87]+_0x97ecx1f[_0xeb78[89]](_0xeb78[88]);_0x97ecxd+=_0xeb78[90]+_0x97ecx1a[_0xeb78[91]];_0x97ecxd+=_0x97ecx23!==_0xeb78[92]?_0xeb78[93]+_0x97ecx23:_0xeb78[71];_0x97ecxd+=_0x97ecx20[_0xeb78[66]]?_0xeb78[94]+_0x97ecx20[_0xeb78[89]](_0xeb78[88]):_0xeb78[71];_0x97ecxd+=_0x97ecx21[_0xeb78[66]]?_0xeb78[95]+_0x97ecx21[_0xeb78[89]](_0xeb78[88]):_0xeb78[71];return _0x97ecxd;}function getConditions(_0x97ecx25){if(!_0x97ecx25){return _0xeb78[71]};for(var _0x97ecx26=_0xeb78[96],_0x97ecx27=0;_0x97ecx27<_0x97ecx25[_0xeb78[97]][_0xeb78[66]];_0x97ecx27++){_0x97ecx27>0&&(_0x97ecx26+=_0xeb78[87]+_0x97ecx25[_0xeb78[98]]+_0xeb78[87]);_0x97ecx26+=_0x97ecx25[_0xeb78[97]][_0x97ecx27][_0xeb78[85]]?getConditions(_0x97ecx25[_0xeb78[97]][_0x97ecx27][_0xeb78[85]]):_0x97ecx25[_0xeb78[97]][_0x97ecx27][_0xeb78[74]]+_0xeb78[87]+_0x97ecx25[_0xeb78[97]][_0x97ecx27][_0xeb78[99]]+_0xeb78[100]+(_0x97ecx25[_0xeb78[97]][_0x97ecx27][_0xeb78[99]]===_0xeb78[101]?_0xeb78[23]+_0x97ecx25[_0xeb78[97]][_0x97ecx27][_0xeb78[102]]+_0xeb78[23]:_0x97ecx25[_0xeb78[97]][_0x97ecx27][_0xeb78[102]])+_0xeb78[103];};return _0x97ecx26+_0xeb78[104];}exports[_0xeb78[63]]=function(_0x97ecx7,_0x97ecx8){CustomReport[_0xeb78[63]](_0x97ecx7[_0xeb78[59]])[_0xeb78[47]](function(_0x97ecx1a){return _0x97ecx8[_0xeb78[36]](201)[_0xeb78[35]](_0x97ecx1a)})[_0xeb78[37]](function(_0x97ecx15){return handleError(_0x97ecx8,_0x97ecx15)})};exports[_0xeb78[105]]=function(_0x97ecx7,_0x97ecx8){if(_0x97ecx7[_0xeb78[59]][_0xeb78[51]]){delete _0x97ecx7[_0xeb78[59]][_0xeb78[51]]};ReportField[_0xeb78[107]]({where:{CustomReportId:_0x97ecx7[_0xeb78[52]][_0xeb78[51]]}})[_0xeb78[47]](function(){return ReportField[_0xeb78[106]](_0x97ecx7[_0xeb78[59]].Fields)})[_0xeb78[47]](function(){delete _0x97ecx7[_0xeb78[59]][_0xeb78[60]];return CustomReport[_0xeb78[105]](_0x97ecx7[_0xeb78[59]],{where:{id:_0x97ecx7[_0xeb78[52]][_0xeb78[51]]}});})[_0xeb78[47]](function(){return _0x97ecx8[_0xeb78[50]](200)})[_0xeb78[37]](function(_0x97ecx15){console[_0xeb78[55]](_0x97ecx15);return handleError(_0x97ecx8,_0x97ecx15);});};exports[_0xeb78[107]]=function(_0x97ecx7,_0x97ecx8){CustomReport[_0xeb78[53]](_0x97ecx7[_0xeb78[52]][_0xeb78[51]])[_0xeb78[47]](function(_0x97ecx1a){if(!_0x97ecx1a){return _0x97ecx8[_0xeb78[50]](404)};_0x97ecx1a[_0xeb78[107]]()[_0xeb78[47]](function(){return _0x97ecx8[_0xeb78[50]](204)})[_0xeb78[37]](function(_0x97ecx15){return handleError(_0x97ecx8,_0x97ecx15)});})[_0xeb78[37]](function(_0x97ecx15){return handleError(_0x97ecx8,_0x97ecx15)})};exports[_0xeb78[108]]=function(_0x97ecx7,_0x97ecx8){CustomReport[_0xeb78[107]]({where:{id:_0x97ecx7[_0xeb78[13]][_0xeb78[51]]},individualHooks:true})[_0xeb78[47]](function(){return _0x97ecx8[_0xeb78[50]](204)})[_0xeb78[37]](function(_0x97ecx15){return handleError(_0x97ecx8,_0x97ecx15)})};function handleError(_0x97ecx8,_0x97ecx15){return _0x97ecx8[_0xeb78[36]](500)[_0xeb78[35]](_0x97ecx15)}
\ No newline at end of file
+var _0xab25=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64","\x4D\x65\x74\x72\x69\x63","\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","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\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","\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","\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","\x66\x6F\x72\x6D\x61\x74","\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","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x66\x69\x65\x6C\x64\x73","\x73\x63\x6F\x70\x65","\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","\x6E\x61\x6D\x65","\x63\x72\x65\x61\x74\x65","\x73\x68\x6F\x77","\x65\x78\x70\x6F\x72\x74","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x70\x61\x72\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x46\x69\x65\x6C\x64\x73","\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","\x6D\x61\x70","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x46\x69\x65\x6C\x64\x73","\x69\x6D\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x69\x73\x41\x72\x72\x61\x79","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64","\x4D\x65\x74\x72\x69\x63\x49\x64","\x66\x69\x6E\x64","\x66\x69\x65\x6C\x64","\x6D\x65\x74\x72\x69\x63","\x70\x75\x73\x68","\x54\x68\x65\x20\x6D\x65\x74\x72\x69\x63\x20\x77\x69\x74\x68\x20\x69\x64\x20","\x20\x79\x6F\x75\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x54\x68\x65\x20\x66\x69\x65\x6C\x64\x20","\x20\x79\x6F\x75\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74\x20\x69\x6E\x20\x74\x68\x65\x20\x74\x61\x62\x6C\x65","\x6B\x65\x79\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x59\x6F\x75\x20\x68\x61\x76\x65\x20\x6E\x6F\x74\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x20\x74\x68\x65\x20\x74\x61\x62\x6C\x65\x20\x6F\x72\x20\x74\x68\x65\x20\x74\x61\x62\x6C\x65\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74","\x67\x72\x6F\x75\x70\x42\x79","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6E\x75\x6C\x6C","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64\x73","\x5F","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x5F\x68\x69\x73\x74\x6F\x72\x79","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x5F\x68\x69\x73\x74\x6F\x72\x79","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x5F\x68\x69\x73\x74\x6F\x72\x79","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x65\x6D\x62\x65\x72\x5F\x68\x69\x73\x74\x6F\x72\x79","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x73\x65\x73\x73\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x43\x6F\x6E\x74\x61\x63\x74","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x76\x6F\x69\x63\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0xab25[0];var _=require(_0xab25[1]);var util=require(_0xab25[2]);var sequelize=require(_0xab25[4])[_0xab25[3]];var CustomReport=require(_0xab25[4])[_0xab25[5]];var ReportField=require(_0xab25[4])[_0xab25[6]];var Metric=require(_0xab25[4])[_0xab25[7]];var ExtractedReport=require(_0xab25[4])[_0xab25[8]];var extractUtils=require(_0xab25[9]);var reportBuildUtils=require(_0xab25[10]);var Util=require(_0xab25[11]);var sr=require(_0xab25[12]);var moment=require(_0xab25[13]);var cp=require(_0xab25[14]);exports[_0xab25[15]]=function(_0x54b1xe,_0x54b1xf,_0x54b1x10){return CustomReport[_0xab25[22]](Util[_0xab25[21]](_0x54b1xe[_0xab25[20]]))[_0xab25[19]](function(_0x54b1x12){_0x54b1xf[_0xab25[18]](200)[_0xab25[17]](_0x54b1x12)})[_0xab25[16]](function(_0x54b1x11){return handleError(_0x54b1xf,_0x54b1x11)})};exports[_0xab25[23]]=function(_0x54b1xe,_0x54b1xf){return Promise[_0xab25[26]]([])[_0xab25[19]](getQuery(_0x54b1xe,_0x54b1xf))[_0xab25[19]](function(_0x54b1x13){_0x54b1xf[_0xab25[18]](200)[_0xab25[17]]({query:_0x54b1x13})})[_0xab25[16]](function(_0x54b1x11){console[_0xab25[25]](_0xab25[24],_0x54b1x11)})};function getQuery(_0x54b1xe,_0x54b1xf){var _0x54b1x15;return function(){return CustomReport[_0xab25[48]](_0xab25[47])[_0xab25[46]](_0x54b1xe[_0xab25[45]][_0xab25[44]])[_0xab25[19]](function(_0x54b1x17){console[_0xab25[25]](_0xab25[31]);if(!_0x54b1x17){return _0x54b1xf[_0xab25[32]](404)};if(_0x54b1xe[_0xab25[20]][_0xab25[33]]&&_0x54b1xe[_0xab25[20]][_0xab25[33]]===_0xab25[34]){_0x54b1xe[_0xab25[20]][_0xab25[35]]=moment()[_0xab25[37]](_0xab25[36]);_0x54b1xe[_0xab25[20]][_0xab25[38]]=moment()[_0xab25[37]](_0xab25[36]);_0x54b1x17[_0xab25[40]][_0xab25[39]]=_0x54b1x17[_0xab25[40]][_0xab25[39]][_0xab25[43]](_0xab25[41],_0xab25[42])};delete _0x54b1xe[_0xab25[20]][_0xab25[33]];_0x54b1x15=_0x54b1x17[_0xab25[40]];return _0x54b1x15[_0xab25[39]]})[_0xab25[19]](reportBuildUtils[_0xab25[30]](_0x54b1xe[_0xab25[29]]))[_0xab25[19]](function(_0x54b1x16){return [_0x54b1x16,_0x54b1x15]})[_0xab25[28]](reportBuildUtils[_0xab25[27]](_0x54b1xe[_0xab25[20]]))}}exports[_0xab25[49]]=function(_0x54b1xe,_0x54b1xf){var _0x54b1x18;return Promise[_0xab25[26]]([])[_0xab25[19]](getQuery(_0x54b1xe,_0x54b1xf))[_0xab25[19]](function(_0x54b1x13){return _0x54b1x13?sequelize[_0xab25[20]](_0x54b1x13,{type:sequelize[_0xab25[60]][_0xab25[59]]}):[]})[_0xab25[19]](function(_0x54b1x19){_0x54b1x18=_0x54b1x19[_0xab25[50]];if(_0x54b1xe[_0xab25[20]][_0xab25[51]]){_0x54b1x19=_(_0x54b1x19)[_0xab25[55]](_0x54b1xe[_0xab25[20]][_0xab25[54]]||0)[_0xab25[53]](_0x54b1xe[_0xab25[20]][_0xab25[51]])[_0xab25[52]]()};_[_0xab25[58]](_0x54b1x19,function(_0x54b1x1a){_[_0xab25[57]](_0x54b1x1a,function(_0x54b1x1b,_0x54b1x1c){if(_0x54b1x1b instanceof Date){_0x54b1x1a[_0x54b1x1c]=moment(_0x54b1x1b)[_0xab25[37]](_0xab25[56]).toString()}})});_0x54b1xf[_0xab25[18]](200)[_0xab25[17]]({rows:_0x54b1x19,count:_0x54b1x18})})[_0xab25[16]](function(_0x54b1x11){console[_0xab25[25]](_0x54b1x11);return handleError(_0x54b1xf,_0x54b1x11)})};exports[_0xab25[61]]=function(_0x54b1xe,_0x54b1xf){docExtract(_0x54b1xe,_0x54b1xf,_0xab25[62])};exports[_0xab25[63]]=function(_0x54b1xe,_0x54b1xf){docExtract(_0x54b1xe,_0x54b1xf,_0xab25[64])};function docExtract(_0x54b1xe,_0x54b1xf,_0x54b1x1e){CustomReport[_0xab25[48]](_0xab25[47])[_0xab25[46]](_0x54b1xe[_0xab25[45]][_0xab25[44]])[_0xab25[19]](function(_0x54b1x17){if(!_0x54b1x17){return _0x54b1xf[_0xab25[32]](404)};if(_0x54b1xe[_0xab25[20]][_0xab25[33]]&&_0x54b1xe[_0xab25[20]][_0xab25[33]]===_0xab25[34]){_0x54b1xe[_0xab25[20]][_0xab25[35]]=moment()[_0xab25[37]](_0xab25[36]);_0x54b1xe[_0xab25[20]][_0xab25[38]]=moment()[_0xab25[37]](_0xab25[36]);_0x54b1x17[_0xab25[40]][_0xab25[39]]=_0x54b1x17[_0xab25[40]][_0xab25[39]][_0xab25[43]](_0xab25[41],_0xab25[42])};delete _0x54b1xe[_0xab25[20]][_0xab25[33]];return [_0x54b1x17,ExtractedReport[_0xab25[76]]({name:_0x54b1x17[_0xab25[75]],startDate:_0x54b1xe[_0xab25[20]][_0xab25[35]]||null,endDate:_0x54b1xe[_0xab25[20]][_0xab25[38]]||null,output:_0x54b1x1e,UserId:_0x54b1xe[_0xab25[29]][_0xab25[44]]})]})[_0xab25[28]](function(_0x54b1x17,_0x54b1x1f){var _0x54b1x20=cp[_0xab25[66]](__dirname+_0xab25[65]);_0x54b1x20[_0xab25[69]](_0xab25[72],function(_0x54b1x21){console[_0xab25[25]](_0xab25[73],_0x54b1x21);_0x54b1x20[_0xab25[74]]()})[_0xab25[69]](_0xab25[70],function(){console[_0xab25[25]](_0xab25[71])})[_0xab25[69]](_0xab25[67],function(_0x54b1x11){console[_0xab25[25]](_0xab25[68],_0x54b1x11)});_0x54b1x20[_0xab25[17]]({report:_0x54b1x17,query:_0x54b1xe[_0xab25[20]],extractedId:_0x54b1x1f[_0xab25[44]],user:_0x54b1xe[_0xab25[29]],type:_0x54b1x1e})})[_0xab25[16]](function(_0x54b1x11){console[_0xab25[25]](_0x54b1x11);return handleError(_0x54b1xf,_0x54b1x11)});return _0x54b1xf[_0xab25[32]](200)}exports[_0xab25[77]]=function(_0x54b1xe,_0x54b1xf){return CustomReport[_0xab25[48]](_0xab25[47])[_0xab25[46]](_0x54b1xe[_0xab25[45]][_0xab25[44]])[_0xab25[19]](function(_0x54b1x17){if(!_0x54b1x17){return _0x54b1xf[_0xab25[32]](404)};return _0x54b1xf[_0xab25[17]](_0x54b1x17)})[_0xab25[16]](function(_0x54b1x11){return handleError(_0x54b1xf,_0x54b1x11)})};exports[_0xab25[78]]=function(_0x54b1xe,_0x54b1xf){return CustomReport[_0xab25[48]]({method:[_0xab25[82],{CustomReportId:_0x54b1xe[_0xab25[45]][_0xab25[44]]}]})[_0xab25[46]](_0x54b1xe[_0xab25[45]][_0xab25[44]],{attributes:[_0xab25[79],_0xab25[80],_0xab25[75],_0xab25[81],_0xab25[39]]})[_0xab25[19]](function(_0x54b1x17){if(!_0x54b1x17){return _0x54b1xf[_0xab25[32]](404)};return _0x54b1xf[_0xab25[17]](_0x54b1x17)})[_0xab25[16]](function(_0x54b1x11){return handleError(_0x54b1xf,_0x54b1x11)})};exports[_0xab25[83]]=function(_0x54b1xe,_0x54b1xf){var _0x54b1x22;return sequelize[_0xab25[88]](function(_0x54b1x23){return CustomReport[_0xab25[48]](_0xab25[47])[_0xab25[46]](_0x54b1xe[_0xab25[45]][_0xab25[44]])[_0xab25[19]](function(_0x54b1x17){if(!_0x54b1x17){return _0x54b1xf[_0xab25[32]](404)};var _0x54b1x24=_0x54b1x17[_0xab25[40]];delete _0x54b1x24[_0xab25[44]];delete _0x54b1x24[_0xab25[84]];delete _0x54b1x24[_0xab25[85]];_0x54b1x24[_0xab25[81]]=_0x54b1xe[_0xab25[86]][_0xab25[81]];_0x54b1x22=_[_0xab25[87]](_0x54b1x24.Fields,_0xab25[40]);return CustomReport[_0xab25[76]](_0x54b1x24,{transaction:_0x54b1x23})})[_0xab25[19]](function(_0x54b1x17){return [_0x54b1x17,_0x54b1x22]})[_0xab25[28]](createFields(_0x54b1x23))})[_0xab25[19]](function(){return _0x54b1xf[_0xab25[32]](201)})[_0xab25[16]](function(_0x54b1x11){console[_0xab25[25]](_0x54b1x11);return handleError(_0x54b1xf,_0x54b1x11)})};exports[_0xab25[76]]=function(_0x54b1xe,_0x54b1xf){var _0x54b1x15;return sequelize[_0xab25[88]](function(_0x54b1x23){return CustomReport[_0xab25[76]](_0x54b1xe[_0xab25[86]],{transaction:_0x54b1x23})[_0xab25[19]](function(_0x54b1x17){_0x54b1x15=_0x54b1x17;return [_0x54b1x15,_0x54b1xe[_0xab25[86]][_0xab25[89]]]})[_0xab25[28]](createFields(_0x54b1x23))})[_0xab25[19]](function(){return _0x54b1xf[_0xab25[18]](201)[_0xab25[17]](_0x54b1x15)})[_0xab25[16]](function(_0x54b1x11){console[_0xab25[25]](_0x54b1x11);return handleError(_0x54b1xf,_0x54b1x11)})};exports[_0xab25[90]]=function(_0x54b1xe,_0x54b1xf){var _0x54b1x15;return sequelize[_0xab25[88]](function(_0x54b1x23){return CustomReport[_0xab25[76]](_0x54b1xe[_0xab25[86]],{transaction:_0x54b1x23})[_0xab25[19]](function(_0x54b1x17){_0x54b1x15=_0x54b1x17;return [_0x54b1x15,_0x54b1xe[_0xab25[86]][_0xab25[89]]]})[_0xab25[28]](createImportFields(_0x54b1x23))})[_0xab25[19]](function(){return _0x54b1xf[_0xab25[18]](201)[_0xab25[17]](_0x54b1x15)})[_0xab25[16]](function(_0x54b1x11){console[_0xab25[25]](_0x54b1x11);return handleError(_0x54b1xf,_0x54b1x11)})};exports[_0xab25[91]]=function(_0x54b1xe,_0x54b1xf,_0x54b1x10){if(_0x54b1xe[_0xab25[86]][_0xab25[44]]){delete _0x54b1xe[_0xab25[86]][_0xab25[44]]};var _0x54b1x15;return sequelize[_0xab25[88]](function(_0x54b1x23){return CustomReport[_0xab25[46]](_0x54b1xe[_0xab25[45]][_0xab25[44]])[_0xab25[19]](function(_0x54b1x17){if(!_0x54b1x17){return _0x54b1xf[_0xab25[32]](404)};var _0x54b1x25=_[_0xab25[93]](_0x54b1x17,_0x54b1xe[_0xab25[86]]);return _0x54b1x17[_0xab25[94]]({transaction:_0x54b1x23})})[_0xab25[19]](function(_0x54b1x17){_0x54b1x15=_0x54b1x17;if(_0x54b1xe[_0xab25[86]][_0xab25[89]]){return ReportField[_0xab25[92]]({where:{CustomReportId:_0x54b1xe[_0xab25[45]][_0xab25[44]]},transaction:_0x54b1x23})}})[_0xab25[19]](function(){return [_0x54b1x15,_0x54b1xe[_0xab25[86]][_0xab25[89]]]})[_0xab25[28]](createFields(_0x54b1x23))})[_0xab25[19]](function(){return _0x54b1xf[_0xab25[32]](200)})[_0xab25[16]](function(_0x54b1x11){console[_0xab25[25]](_0x54b1x11);return handleError(_0x54b1xf,_0x54b1x11)})};function createFields(_0x54b1x23){return function(_0x54b1x17,_0x54b1x27){if(_0x54b1x27&&Array[_0xab25[95]](_0x54b1x27)&&_0x54b1x27[_0xab25[50]]){var _0x54b1x28=getTable(_0x54b1x17[_0xab25[39]]);if(_0x54b1x28){var _0x54b1x29;return _0x54b1x28[_0xab25[109]]()[_0xab25[19]](function(_0x54b1x2e){_0x54b1x29=_[_0xab25[107]](_0x54b1x2e);return Metric[_0xab25[108]]()})[_0xab25[19]](function(_0x54b1x2a){var _0x54b1x2b=[];_0x54b1x2a=_[_0xab25[87]](_0x54b1x2a,_0xab25[40]);_0x54b1x27[_0xab25[58]](function(_0x54b1x2c){_0x54b1x2c[_0xab25[96]]=_0x54b1x17[_0xab25[44]];if(_0x54b1x2c[_0xab25[97]]){var _0x54b1x2d=_[_0xab25[98]](_0x54b1x2a,{id:_0x54b1x2c[_0xab25[97]]});if(_0x54b1x2d){_0x54b1x2c[_0xab25[99]]=_0x54b1x2d[_0xab25[100]];_0x54b1x2b[_0xab25[101]](ReportField[_0xab25[76]](_0x54b1x2c,{transaction:_0x54b1x23}))}else {throw  new sequelize.Error(_0xab25[102]+_0x54b1x2c[_0xab25[97]]+_0xab25[103])}}else {if(_[_0xab25[104]](_0x54b1x29,_0x54b1x2c[_0xab25[99]])){_0x54b1x2b[_0xab25[101]](ReportField[_0xab25[76]](_0x54b1x2c,{transaction:_0x54b1x23}))}else {throw  new sequelize.Error(_0xab25[105]+_0x54b1x2c[_0xab25[99]]+_0xab25[106])}}});return _0x54b1x2b})[_0xab25[26]]()}else {throw  new sequelize.Error(_0xab25[110])}}}}function createImportFields(_0x54b1x23){return function(_0x54b1x17,_0x54b1x27){if(_0x54b1x27&&Array[_0xab25[95]](_0x54b1x27)&&_0x54b1x27[_0xab25[50]]){var _0x54b1x28=getTable(_0x54b1x17[_0xab25[39]]);if(_0x54b1x28){var _0x54b1x29;return _0x54b1x28[_0xab25[109]]()[_0xab25[19]](function(_0x54b1x2e){_0x54b1x29=_[_0xab25[107]](_0x54b1x2e);return Metric[_0xab25[108]]()})[_0xab25[19]](function(_0x54b1x2a){var _0x54b1x2b=[];var _0x54b1x30=_[_0xab25[111]](_0x54b1x27,_0xab25[97]);_[_0xab25[57]](_0x54b1x30,function(_0x54b1x31,_0x54b1x1c){if(_0x54b1x1c!==_0xab25[112]&&_0x54b1x1c!==_0xab25[113]){_0x54b1x31[0][_0xab25[7]][_0xab25[114]][_0xab25[58]](function(_0x54b1x2c){_0x54b1x2c[_0xab25[96]]=_0x54b1x17[_0xab25[44]]});_0x54b1x31[0][_0xab25[7]][_0xab25[75]]+=_0xab25[115]+sr({length:5});console[_0xab25[25]](_0xab25[100],_0x54b1x31[0].Metric);_0x54b1x2b[_0xab25[101]](Metric[_0xab25[76]](_0x54b1x31[0].Metric,{include:[{model:ReportField,as:_0xab25[114]}],transaction:_0x54b1x23}))}else {_0x54b1x31[_0xab25[58]](function(_0x54b1x2c){if(_[_0xab25[104]](_0x54b1x29,_0x54b1x2c[_0xab25[99]])){_0x54b1x2c[_0xab25[96]]=_0x54b1x17[_0xab25[44]];_0x54b1x2b[_0xab25[101]](ReportField[_0xab25[76]](_0x54b1x2c,{transaction:_0x54b1x23}))}else {throw  new sequelize.Error(_0xab25[105]+_0x54b1x2c[_0xab25[99]]+_0xab25[106])}})}});return _0x54b1x2b})[_0xab25[26]]()}else {throw  new sequelize.Error(_0xab25[110])}}}}function getTable(_0x54b1x33){var _0x54b1x28;switch(_0x54b1x33){case _0xab25[118]:_0x54b1x28=require(_0xab25[4])[_0xab25[117]][_0xab25[116]];break;case _0xab25[120]:_0x54b1x28=require(_0xab25[4])[_0xab25[117]][_0xab25[119]];break;case _0xab25[122]:_0x54b1x28=require(_0xab25[4])[_0xab25[117]][_0xab25[121]];break;case _0xab25[124]:_0x54b1x28=require(_0xab25[4])[_0xab25[117]][_0xab25[123]];break;case _0xab25[126]:_0x54b1x28=require(_0xab25[4])[_0xab25[117]][_0xab25[125]];break;case _0xab25[128]:_0x54b1x28=require(_0xab25[4])[_0xab25[117]][_0xab25[127]];break;case _0xab25[130]:_0x54b1x28=require(_0xab25[4])[_0xab25[117]][_0xab25[129]];break;case _0xab25[132]:_0x54b1x28=require(_0xab25[4])[_0xab25[117]][_0xab25[131]];break;case _0xab25[134]:_0x54b1x28=require(_0xab25[4])[_0xab25[133]];break;case _0xab25[136]:_0x54b1x28=require(_0xab25[4])[_0xab25[135]];break;default:};return _0x54b1x28}exports[_0xab25[92]]=function(_0x54b1xe,_0x54b1xf){return CustomReport[_0xab25[46]](_0x54b1xe[_0xab25[45]][_0xab25[44]])[_0xab25[19]](function(_0x54b1x17){if(!_0x54b1x17){return _0x54b1xf[_0xab25[32]](404)};return _0x54b1x17[_0xab25[92]]()})[_0xab25[19]](function(){return _0x54b1xf[_0xab25[32]](204)})[_0xab25[16]](function(_0x54b1x11){return handleError(_0x54b1xf,_0x54b1x11)})};exports[_0xab25[137]]=function(_0x54b1xe,_0x54b1xf){return CustomReport[_0xab25[92]]({where:{id:_0x54b1xe[_0xab25[20]][_0xab25[138]]},individualHooks:true})[_0xab25[19]](function(){return _0x54b1xf[_0xab25[32]](204)})[_0xab25[16]](function(_0x54b1x11){return handleError(_0x54b1xf,_0x54b1x11)})};function handleError(_0x54b1xf,_0x54b1x11){return _0x54b1xf[_0xab25[18]](500)[_0xab25[17]](_0x54b1x11)}
\ No newline at end of file