Built motion from commit 1333b3551.|1.0.38
[motion.git] / server / api / default_report / default_report.controller.js
index 2d3c4e7..1751e50 100644 (file)
@@ -1 +1 @@
-var _0x9740=["\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","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64","\x4D\x65\x74\x72\x69\x63","\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","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x54\x72\x65\x65","\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","\x6E\x6F\x20\x73\x75\x66\x66\x69\x63\x69\x65\x6E\x74\x20\x71\x75\x65\x75\x65\x20\x70\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x73\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x75\x73\x65\x72","\x70\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E","\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","\x69\x73\x41\x72\x72\x61\x79","\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","\x71\x75\x65\x72\x79\x20\x65\x72\x72\x6F\x72","\x63\x68\x65\x63\x6B\x51\x75\x65\x72\x79","\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","\x74\x72\x65\x65","\x70\x61\x72\x73\x65","\x66\x69\x6E\x64","\x73\x74\x61\x72\x74\x54\x69\x6D\x65","\x20","\x30\x30\x3A\x30\x30","\x65\x6E\x64\x54\x69\x6D\x65","\x32\x33\x3A\x35\x39","\x63\x72\x65\x61\x74\x65","\x74\x65\x78\x74","\x2F\x20","\x23","\x28","\x72\x75\x6C\x65\x73","\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","\x6D\x61\x70","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74\x54\x61\x62\x6C\x65","\x6B\x65\x79\x73","\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64","\x67\x72\x6F\x75\x70\x42\x79","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6E\x75\x6C\x6C","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64\x73","\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63","\x5F","\x70\x75\x73\x68","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x63\x75\x73\x74\x6F\x6D","\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","\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","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x9740[0];var _=require(_0x9740[1]);var util=require(_0x9740[2]);var DefaultReport=require(_0x9740[4])[_0x9740[3]];var ReportField=require(_0x9740[4])[_0x9740[5]];var Metric=require(_0x9740[4])[_0x9740[6]];var sequelize=require(_0x9740[4])[_0x9740[7]];var CustomReport=require(_0x9740[4])[_0x9740[8]];var ExtractedReport=require(_0x9740[4])[_0x9740[9]];var extractUtils=require(_0x9740[10]);var reportBuildUtils=require(_0x9740[11]);var Util=require(_0x9740[12]);var moment=require(_0x9740[13]);var cp=require(_0x9740[14]);var sr=require(_0x9740[15]);var ReportTree=require(_0x9740[4])[_0x9740[16]];exports[_0x9740[17]]= function(_0xbd60x10,_0xbd60x11,_0xbd60x12){return DefaultReport[_0x9740[24]](Util[_0x9740[23]](_0xbd60x10[_0x9740[22]]))[_0x9740[21]](function(_0xbd60x14){_0xbd60x11[_0x9740[20]](200)[_0x9740[19]](_0xbd60x14)})[_0x9740[18]](function(_0xbd60x13){return handleError(_0xbd60x11,_0xbd60x13)})};exports[_0x9740[25]]= function(_0xbd60x10,_0xbd60x11){return DefaultReport[_0x9740[36]]({method:[_0x9740[35],{DefaultReportId:_0xbd60x10[_0x9740[28]][_0x9740[27]]}]})[_0x9740[34]](_0xbd60x10[_0x9740[28]][_0x9740[27]],{attributes:[_0x9740[29],_0x9740[30],_0x9740[31],_0x9740[32],_0x9740[33]]})[_0x9740[21]](function(_0xbd60x15){if(!_0xbd60x15){return _0xbd60x11[_0x9740[26]](404)};return _0xbd60x11[_0x9740[19]](_0xbd60x15)})[_0x9740[18]](function(_0xbd60x13){return handleError(_0xbd60x11,_0xbd60x13)})};exports[_0x9740[37]]= function(_0xbd60x10,_0xbd60x11){return Promise[_0x9740[42]]([])[_0x9740[21]](getQuery(_0xbd60x10,_0xbd60x11))[_0x9740[21]](function(_0xbd60x16){if(_0xbd60x16){switch(_0xbd60x16){case _0x9740[41]:_0xbd60x16= _0x9740[40];break;default:}};_0xbd60x11[_0x9740[20]](200)[_0x9740[19]]({query:_0xbd60x16})})[_0x9740[18]](function(_0xbd60x13){console[_0x9740[39]](_0x9740[38],_0xbd60x13)})};function getQuery(_0xbd60x10,_0xbd60x11){var _0xbd60x18;return function(){return DefaultReport[_0x9740[36]](_0x9740[58])[_0x9740[34]](_0xbd60x10[_0x9740[28]][_0x9740[27]])[_0x9740[21]](function(_0xbd60x15){console[_0x9740[39]](_0x9740[47]);if(!_0xbd60x15){return _0xbd60x11[_0x9740[26]](404)};if(_0xbd60x10[_0x9740[22]][_0x9740[48]]&& _0xbd60x10[_0x9740[22]][_0x9740[48]]=== _0x9740[49]){_0xbd60x10[_0x9740[22]][_0x9740[50]]= moment()[_0x9740[52]](_0x9740[51]);_0xbd60x10[_0x9740[22]][_0x9740[53]]= moment()[_0x9740[52]](_0x9740[51]);_0xbd60x15[_0x9740[54]][_0x9740[33]]= _0xbd60x15[_0x9740[54]][_0x9740[33]][_0x9740[57]](_0x9740[55],_0x9740[56])};delete _0xbd60x10[_0x9740[22]][_0x9740[48]];_0xbd60x18= _0xbd60x15[_0x9740[54]];return _0xbd60x18[_0x9740[33]]})[_0x9740[21]](reportBuildUtils[_0x9740[46]](_0xbd60x10[_0x9740[45]]))[_0x9740[21]](function(_0xbd60x19){return [_0xbd60x19,_0xbd60x18]})[_0x9740[44]](reportBuildUtils[_0x9740[43]](_0xbd60x10[_0x9740[22]]))}}exports[_0x9740[59]]= function(_0xbd60x10,_0xbd60x11){var _0xbd60x1a;return Promise[_0x9740[42]]([])[_0x9740[21]](getQuery(_0xbd60x10,_0xbd60x11))[_0x9740[21]](reportBuildUtils[_0x9740[71]]())[_0x9740[21]](function(_0xbd60x1b){if(_0xbd60x1b&& _[_0x9740[60]](_0xbd60x1b)){_0xbd60x1a= _0xbd60x1b[_0x9740[61]];if(_0xbd60x10[_0x9740[22]][_0x9740[62]]){_0xbd60x1b= _(_0xbd60x1b)[_0x9740[66]](_0xbd60x10[_0x9740[22]][_0x9740[65]]|| 0)[_0x9740[64]](_0xbd60x10[_0x9740[22]][_0x9740[62]])[_0x9740[63]]()};_[_0x9740[69]](_0xbd60x1b,function(_0xbd60x1c){_[_0x9740[68]](_0xbd60x1c,function(_0xbd60x1d,_0xbd60x1e){if(_0xbd60x1d instanceof  Date){_0xbd60x1c[_0xbd60x1e]= moment(_0xbd60x1d)[_0x9740[52]](_0x9740[67]).toString()}})});_0xbd60x11[_0x9740[20]](200)[_0x9740[19]]({rows:_0xbd60x1b,count:_0xbd60x1a})}else {return handleError(_0xbd60x11,{message:_0xbd60x1b|| _0x9740[70]})}})[_0x9740[18]](function(_0xbd60x13){console[_0x9740[39]](_0xbd60x13);return handleError(_0xbd60x11,_0xbd60x13)})};exports[_0x9740[72]]= function(_0xbd60x10,_0xbd60x11){docExtract(_0xbd60x10,_0xbd60x11,_0x9740[73])};exports[_0x9740[74]]= function(_0xbd60x10,_0xbd60x11){docExtract(_0xbd60x10,_0xbd60x11,_0x9740[75])};function docExtract(_0xbd60x10,_0xbd60x11,_0xbd60x20){var _0xbd60x15;DefaultReport[_0x9740[36]](_0x9740[58])[_0x9740[34]](_0xbd60x10[_0x9740[28]][_0x9740[27]])[_0x9740[21]](function(_0xbd60x18){if(!_0xbd60x18){return _0xbd60x11[_0x9740[26]](404)};_0xbd60x15= _0xbd60x18;return ReportTree[_0x9740[34]](1)})[_0x9740[21]](function(_0xbd60x24){_0xbd60x24= JSON[_0x9740[87]](_0xbd60x24[_0x9740[86]]);var _0xbd60x25=_[_0x9740[88]](_0xbd60x24,{id:_0xbd60x15[_0x9740[32]]});var _0xbd60x26=getReportPath(_0xbd60x25,_0xbd60x24,_0xbd60x15[_0x9740[31]]);if(_0xbd60x10[_0x9740[22]][_0x9740[48]]&& _0xbd60x10[_0x9740[22]][_0x9740[48]]=== _0x9740[49]){_0xbd60x10[_0x9740[22]][_0x9740[50]]= moment()[_0x9740[52]](_0x9740[51]);_0xbd60x10[_0x9740[22]][_0x9740[53]]= moment()[_0x9740[52]](_0x9740[51]);_0xbd60x15[_0x9740[54]][_0x9740[33]]= _0xbd60x15[_0x9740[54]][_0x9740[33]][_0x9740[57]](_0x9740[55],_0x9740[56])};delete _0xbd60x10[_0x9740[22]][_0x9740[48]];return [_0xbd60x15,ExtractedReport[_0x9740[94]]({name:_0xbd60x26,startDate:_0xbd60x10[_0x9740[22]][_0x9740[50]]?_0xbd60x10[_0x9740[22]][_0x9740[50]]+ (_0xbd60x10[_0x9740[22]][_0x9740[89]]?_0x9740[90]+ _0xbd60x10[_0x9740[22]][_0x9740[89]]:_0x9740[91]):null,endDate:_0xbd60x10[_0x9740[22]][_0x9740[53]]?_0xbd60x10[_0x9740[22]][_0x9740[53]]+ (_0xbd60x10[_0x9740[22]][_0x9740[92]]?_0x9740[90]+ _0xbd60x10[_0x9740[22]][_0x9740[92]]:_0x9740[93]):null,output:_0xbd60x20,UserId:_0xbd60x10[_0x9740[45]][_0x9740[27]]})]})[_0x9740[44]](function(_0xbd60x15,_0xbd60x21){var _0xbd60x22=cp[_0x9740[77]](__dirname+ _0x9740[76]);_0xbd60x22[_0x9740[80]](_0x9740[83],function(_0xbd60x23){console[_0x9740[39]](_0x9740[84],_0xbd60x23);_0xbd60x22[_0x9740[85]]()})[_0x9740[80]](_0x9740[81],function(){console[_0x9740[39]](_0x9740[82])})[_0x9740[80]](_0x9740[78],function(_0xbd60x13){console[_0x9740[39]](_0x9740[79],_0xbd60x13)});_0xbd60x22[_0x9740[19]]({report:_0xbd60x15,query:_0xbd60x10[_0x9740[22]],extractedId:_0xbd60x21[_0x9740[27]],user:_0xbd60x10[_0x9740[45]],type:_0xbd60x20})})[_0x9740[18]](function(_0xbd60x13){console[_0x9740[39]](_0xbd60x13);return handleError(_0xbd60x11,_0xbd60x13)});return _0xbd60x11[_0x9740[26]](200)}function getReportPath(_0xbd60x25,_0xbd60x24,_0xbd60x26){_0xbd60x26= _0xbd60x25[_0x9740[95]]+ _0x9740[96]+ _0xbd60x26;if(_0xbd60x25[_0x9740[32]]=== _0x9740[97]){return _0xbd60x26}else {return getReportPath(_[_0x9740[88]](_0xbd60x24,{id:_0xbd60x25[_0x9740[32]]}),_0xbd60x24,_0xbd60x26)}}function getConditions(_0xbd60x29){if(!_0xbd60x29){return _0x9740[56]};for(var _0xbd60x2a=_0x9740[98],_0xbd60x2b=0;_0xbd60x2b< _0xbd60x29[_0x9740[99]][_0x9740[61]];_0xbd60x2b++){_0xbd60x2b> 0&& (_0xbd60x2a+= _0x9740[90]+ _0xbd60x29[_0x9740[100]]+ _0x9740[90]);_0xbd60x2a+= _0xbd60x29[_0x9740[99]][_0xbd60x2b][_0x9740[101]]?getConditions(_0xbd60x29[_0x9740[99]][_0xbd60x2b][_0x9740[101]]):_0xbd60x29[_0x9740[99]][_0xbd60x2b][_0x9740[102]]+ _0x9740[90]+ _0xbd60x29[_0x9740[99]][_0xbd60x2b][_0x9740[103]]+ _0x9740[104]+ (_0xbd60x29[_0x9740[99]][_0xbd60x2b][_0x9740[103]]=== _0x9740[105]?_0x9740[106]+ _0xbd60x29[_0x9740[99]][_0xbd60x2b][_0x9740[63]]+ _0x9740[106]:_0xbd60x29[_0x9740[99]][_0xbd60x2b][_0x9740[63]])+ _0x9740[107]};return _0xbd60x2a+ _0x9740[108]}exports[_0x9740[109]]= function(_0xbd60x10,_0xbd60x11){return DefaultReport[_0x9740[34]](_0xbd60x10[_0x9740[28]][_0x9740[27]],{include:[{all:true}]})[_0x9740[21]](function(_0xbd60x15){if(!_0xbd60x15){return _0xbd60x11[_0x9740[26]](404)};return _0xbd60x11[_0x9740[19]](_0xbd60x15)})[_0x9740[18]](function(_0xbd60x13){return handleError(_0xbd60x11,_0xbd60x13)})};exports[_0x9740[110]]= function(_0xbd60x10,_0xbd60x11){var _0xbd60x2c;return sequelize[_0x9740[115]](function(_0xbd60x2d){return DefaultReport[_0x9740[36]]({method:[_0x9740[35],{DefaultReportId:_0xbd60x10[_0x9740[28]][_0x9740[27]]}]})[_0x9740[34]](_0xbd60x10[_0x9740[28]][_0x9740[27]])[_0x9740[21]](function(_0xbd60x15){if(!_0xbd60x15){return _0xbd60x11[_0x9740[26]](404)};var _0xbd60x2e=_0xbd60x15[_0x9740[54]];console[_0x9740[39]](_0xbd60x2e);delete _0xbd60x2e[_0x9740[27]];delete _0xbd60x2e[_0x9740[111]];delete _0xbd60x2e[_0x9740[112]];_0xbd60x2e[_0x9740[32]]= _0xbd60x10[_0x9740[113]][_0x9740[32]];_0xbd60x2c= _[_0x9740[114]](_0xbd60x2e.Fields,_0x9740[54]);return CustomReport[_0x9740[94]](_0xbd60x2e,{transaction:_0xbd60x2d})})[_0x9740[21]](function(_0xbd60x15){return [_0xbd60x15,_0xbd60x2c]})[_0x9740[44]](createCopyFields(_0xbd60x2d))})[_0x9740[21]](function(){return _0xbd60x11[_0x9740[26]](201)})[_0x9740[18]](function(_0xbd60x13){console[_0x9740[39]](_0xbd60x13);return handleError(_0xbd60x11,_0xbd60x13)})};function createCopyFields(_0xbd60x2d){return function(_0xbd60x15,_0xbd60x30){if(_0xbd60x30&& Array[_0x9740[60]](_0xbd60x30)&& _0xbd60x30[_0x9740[61]]){var _0xbd60x31=reportBuildUtils[_0x9740[116]](_0xbd60x15[_0x9740[33]]);if(_0xbd60x31){var _0xbd60x32;return _0xbd60x31[_0x9740[131]]()[_0x9740[21]](function(_0xbd60x33){_0xbd60x32= _[_0x9740[117]](_0xbd60x33);var _0xbd60x34=[];var _0xbd60x35=_[_0x9740[119]](_0xbd60x30,_0x9740[118]);_[_0x9740[68]](_0xbd60x35,function(_0xbd60x36,_0xbd60x1e){if(_0xbd60x1e!== _0x9740[120]&& _0xbd60x1e!== _0x9740[121]){_0xbd60x36[0][_0x9740[124]][_0x9740[123]][_0x9740[69]](function(_0xbd60x37){_0xbd60x37[_0x9740[122]]= _0xbd60x15[_0x9740[27]]});_0xbd60x36[0][_0x9740[124]][_0x9740[31]]+= _0x9740[125]+ sr({length:5});_0xbd60x34[_0x9740[126]](Metric[_0x9740[94]](_0xbd60x36[0][_0x9740[124]][_0x9740[54]],{include:[{model:ReportField,as:_0x9740[123]}],transaction:_0xbd60x2d}))}else {_0xbd60x36[_0x9740[69]](function(_0xbd60x37){if(_[_0x9740[127]](_0xbd60x32,_0xbd60x37[_0x9740[102]])|| _0xbd60x37[_0x9740[128]]){_0xbd60x37[_0x9740[122]]= _0xbd60x15[_0x9740[27]];_0xbd60x34[_0x9740[126]](ReportField[_0x9740[94]](_0xbd60x37,{transaction:_0xbd60x2d}))}else {throw  new sequelize.Error(_0x9740[129]+ _0xbd60x37[_0x9740[102]]+ _0x9740[130])}})}});return _0xbd60x34})[_0x9740[42]]()}else {throw  new sequelize.Error(_0x9740[132])}}}}exports[_0x9740[94]]= function(_0xbd60x10,_0xbd60x11){return DefaultReport[_0x9740[94]](_0xbd60x10[_0x9740[113]])[_0x9740[21]](function(_0xbd60x15){return _0xbd60x11[_0x9740[20]](201)[_0x9740[19]](_0xbd60x15)})[_0x9740[18]](function(_0xbd60x13){return handleError(_0xbd60x11,_0xbd60x13)})};exports[_0x9740[133]]= function(_0xbd60x10,_0xbd60x11){if(_0xbd60x10[_0x9740[113]][_0x9740[27]]){delete _0xbd60x10[_0x9740[113]][_0x9740[27]]};return DefaultReport[_0x9740[34]](_0xbd60x10[_0x9740[28]][_0x9740[27]])[_0x9740[21]](function(_0xbd60x15){if(!_0xbd60x15){return _0xbd60x11[_0x9740[26]](404)};var _0xbd60x38=_[_0x9740[134]](_0xbd60x15,_0xbd60x10[_0x9740[113]]);return _0xbd60x38[_0x9740[135]]()})[_0x9740[21]](function(_0xbd60x15){return _0xbd60x11[_0x9740[20]](200)[_0x9740[19]](_0xbd60x15)})[_0x9740[18]](function(_0xbd60x13){return handleError(_0xbd60x11,_0xbd60x13)})};exports[_0x9740[136]]= function(_0xbd60x10,_0xbd60x11){return DefaultReport[_0x9740[34]](_0xbd60x10[_0x9740[28]][_0x9740[27]])[_0x9740[21]](function(_0xbd60x15){if(!_0xbd60x15){return _0xbd60x11[_0x9740[26]](404)};return _0xbd60x15[_0x9740[136]]()})[_0x9740[21]](function(){return _0xbd60x11[_0x9740[26]](204)})[_0x9740[18]](function(_0xbd60x13){return handleError(_0xbd60x11,_0xbd60x13)})};function handleError(_0xbd60x11,_0xbd60x13){return _0xbd60x11[_0x9740[20]](500)[_0x9740[19]](_0xbd60x13)}
\ No newline at end of file
+var _0x1a4c=["\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","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64","\x4D\x65\x74\x72\x69\x63","\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","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x54\x72\x65\x65","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\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","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x6F\x20\x73\x75\x66\x66\x69\x63\x69\x65\x6E\x74\x20\x71\x75\x65\x75\x65\x20\x70\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x73\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x75\x73\x65\x72","\x70\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E","\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","\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","\x69\x73\x41\x72\x72\x61\x79","\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","\x71\x75\x65\x72\x79\x20\x65\x72\x72\x6F\x72","\x63\x68\x65\x63\x6B\x51\x75\x65\x72\x79","\x65\x78\x74\x72\x61\x63\x74\x50\x64\x66","\x65\x78\x74\x72\x61\x63\x74\x50\x64\x66\x20\x61\x70\x69\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E","\x64\x65\x62\x75\x67","\x50\x44\x46","\x65\x78\x74\x72\x61\x63\x74\x43\x73\x76","\x65\x78\x74\x72\x61\x63\x74\x43\x73\x76\x20\x61\x70\x69\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E","\x43\x53\x56","\x63\x6F\x6D\x6D\x6F\x6E\x20\x64\x6F\x63\x45\x78\x74\x72\x61\x63\x74\x20\x61\x70\x69\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E","\x43\x72\x65\x61\x74\x65\x64\x20\x6E\x65\x77\x20\x65\x78\x74\x72\x61\x63\x74\x65\x64\x20\x72\x65\x70\x6F\x72\x74\x73\x20\x64\x62\x20\x65\x6E\x74\x72\x79\x2C\x20\x63\x61\x6C\x6C\x69\x6E\x67\x20\x65\x78\x74\x65\x72\x6E\x61\x6C\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x3A\x20","\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","\x52\x65\x70\x6F\x72\x74\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x20\x70\x72\x6F\x63\x65\x73\x73\x20\x65\x72\x72\x6F\x72","\x6F\x6E","\x63\x6C\x6F\x73\x65","\x52\x65\x70\x6F\x72\x74\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x20\x70\x72\x6F\x63\x65\x73\x73\x20\x63\x6C\x6F\x73\x65","\x6D\x65\x73\x73\x61\x67\x65","\x52\x65\x70\x6F\x72\x74\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x20\x70\x72\x6F\x63\x65\x73\x73\x20\x6D\x65\x73\x73\x61\x67\x65","\x6B\x69\x6C\x6C","\x74\x72\x65\x65","\x70\x61\x72\x73\x65","\x66\x69\x6E\x64","\x46\x6F\x75\x6E\x64\x20\x74\x68\x65\x20\x72\x65\x70\x6F\x72\x74\x2C\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x74\x68\x65\x20\x6E\x65\x77\x20\x44\x42\x20\x72\x6F\x77\x20\x66\x6F\x72\x20\x65\x78\x74\x72\x61\x63\x74\x65\x64\x20\x72\x65\x70\x6F\x72\x74\x73\x2E\x2E","\x73\x74\x61\x72\x74\x54\x69\x6D\x65","\x20","\x30\x30\x3A\x30\x30","\x65\x6E\x64\x54\x69\x6D\x65","\x32\x33\x3A\x35\x39","\x63\x72\x65\x61\x74\x65","\x74\x65\x78\x74","\x2F\x20","\x23","\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","\x6D\x61\x70","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74\x54\x61\x62\x6C\x65","\x6B\x65\x79\x73","\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64","\x67\x72\x6F\x75\x70\x42\x79","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6E\x75\x6C\x6C","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64\x73","\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63","\x5F","\x70\x75\x73\x68","\x66\x69\x65\x6C\x64","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x63\x75\x73\x74\x6F\x6D","\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","\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","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x1a4c[0];var _=require(_0x1a4c[1]);var util=require(_0x1a4c[2]);var DefaultReport=require(_0x1a4c[4])[_0x1a4c[3]];var ReportField=require(_0x1a4c[4])[_0x1a4c[5]];var Metric=require(_0x1a4c[4])[_0x1a4c[6]];var sequelize=require(_0x1a4c[4])[_0x1a4c[7]];var CustomReport=require(_0x1a4c[4])[_0x1a4c[8]];var ExtractedReport=require(_0x1a4c[4])[_0x1a4c[9]];var extractUtils=require(_0x1a4c[10]);var reportBuildUtils=require(_0x1a4c[11]);var Util=require(_0x1a4c[12]);var moment=require(_0x1a4c[13]);var cp=require(_0x1a4c[14]);var sr=require(_0x1a4c[15]);var ReportTree=require(_0x1a4c[4])[_0x1a4c[16]];var logger=require(_0x1a4c[18])(_0x1a4c[17]);exports[_0x1a4c[19]]= function(_0x6b08x11,_0x6b08x12,_0x6b08x13){return DefaultReport[_0x1a4c[26]](Util[_0x1a4c[25]](_0x6b08x11[_0x1a4c[24]]))[_0x1a4c[23]](function(_0x6b08x15){_0x6b08x12[_0x1a4c[22]](200)[_0x1a4c[21]](_0x6b08x15)})[_0x1a4c[20]](function(_0x6b08x14){return handleError(_0x6b08x12,_0x6b08x14)})};exports[_0x1a4c[27]]= function(_0x6b08x11,_0x6b08x12){return DefaultReport[_0x1a4c[38]]({method:[_0x1a4c[37],{DefaultReportId:_0x6b08x11[_0x1a4c[30]][_0x1a4c[29]]}]})[_0x1a4c[36]](_0x6b08x11[_0x1a4c[30]][_0x1a4c[29]],{attributes:[_0x1a4c[31],_0x1a4c[32],_0x1a4c[33],_0x1a4c[34],_0x1a4c[35]]})[_0x1a4c[23]](function(_0x6b08x16){if(!_0x6b08x16){return _0x6b08x12[_0x1a4c[28]](404)};return _0x6b08x12[_0x1a4c[21]](_0x6b08x16)})[_0x1a4c[20]](function(_0x6b08x14){return handleError(_0x6b08x12,_0x6b08x14)})};exports[_0x1a4c[39]]= function(_0x6b08x11,_0x6b08x12){return Promise[_0x1a4c[45]]([])[_0x1a4c[23]](getQuery(_0x6b08x11,_0x6b08x12))[_0x1a4c[23]](function(_0x6b08x17){if(_0x6b08x17){switch(_0x6b08x17){case _0x1a4c[44]:_0x6b08x17= _0x1a4c[43];break;default:}};_0x6b08x12[_0x1a4c[22]](200)[_0x1a4c[21]]({query:_0x6b08x17})})[_0x1a4c[20]](function(_0x6b08x14){logger[_0x1a4c[42]](_0x1a4c[40],_0x6b08x14[_0x1a4c[41]])})};function getQuery(_0x6b08x11,_0x6b08x12){var _0x6b08x19;return function(){return DefaultReport[_0x1a4c[38]](_0x1a4c[60])[_0x1a4c[36]](_0x6b08x11[_0x1a4c[30]][_0x1a4c[29]])[_0x1a4c[23]](function(_0x6b08x16){if(!_0x6b08x16){return _0x6b08x12[_0x1a4c[28]](404)};if(_0x6b08x11[_0x1a4c[24]][_0x1a4c[50]]&& _0x6b08x11[_0x1a4c[24]][_0x1a4c[50]]=== _0x1a4c[51]){_0x6b08x11[_0x1a4c[24]][_0x1a4c[52]]= moment()[_0x1a4c[54]](_0x1a4c[53]);_0x6b08x11[_0x1a4c[24]][_0x1a4c[55]]= moment()[_0x1a4c[54]](_0x1a4c[53]);_0x6b08x16[_0x1a4c[56]][_0x1a4c[35]]= _0x6b08x16[_0x1a4c[56]][_0x1a4c[35]][_0x1a4c[59]](_0x1a4c[57],_0x1a4c[58])};delete _0x6b08x11[_0x1a4c[24]][_0x1a4c[50]];_0x6b08x19= _0x6b08x16[_0x1a4c[56]];return _0x6b08x19[_0x1a4c[35]]})[_0x1a4c[23]](reportBuildUtils[_0x1a4c[49]](_0x6b08x11[_0x1a4c[48]]))[_0x1a4c[23]](function(_0x6b08x1a){return [_0x6b08x1a,_0x6b08x19]})[_0x1a4c[47]](reportBuildUtils[_0x1a4c[46]](_0x6b08x11[_0x1a4c[24]]))}}exports[_0x1a4c[61]]= function(_0x6b08x11,_0x6b08x12){var _0x6b08x1b;return Promise[_0x1a4c[45]]([])[_0x1a4c[23]](getQuery(_0x6b08x11,_0x6b08x12))[_0x1a4c[23]](reportBuildUtils[_0x1a4c[73]]())[_0x1a4c[23]](function(_0x6b08x1c){if(_0x6b08x1c&& _[_0x1a4c[62]](_0x6b08x1c)){_0x6b08x1b= _0x6b08x1c[_0x1a4c[63]];if(_0x6b08x11[_0x1a4c[24]][_0x1a4c[64]]){_0x6b08x1c= _(_0x6b08x1c)[_0x1a4c[68]](_0x6b08x11[_0x1a4c[24]][_0x1a4c[67]]|| 0)[_0x1a4c[66]](_0x6b08x11[_0x1a4c[24]][_0x1a4c[64]])[_0x1a4c[65]]()};_[_0x1a4c[71]](_0x6b08x1c,function(_0x6b08x1d){_[_0x1a4c[70]](_0x6b08x1d,function(_0x6b08x1e,_0x6b08x1f){if(_0x6b08x1e instanceof  Date){_0x6b08x1d[_0x6b08x1f]= moment(_0x6b08x1e)[_0x1a4c[54]](_0x1a4c[69]).toString()}})});_0x6b08x12[_0x1a4c[22]](200)[_0x1a4c[21]]({rows:_0x6b08x1c,count:_0x6b08x1b})}else {return handleError(_0x6b08x12,{message:_0x6b08x1c|| _0x1a4c[72]})}})[_0x1a4c[20]](function(_0x6b08x14){return handleError(_0x6b08x12,_0x6b08x14)})};exports[_0x1a4c[74]]= function(_0x6b08x11,_0x6b08x12){logger[_0x1a4c[76]](_0x1a4c[75]);docExtract(_0x6b08x11,_0x6b08x12,_0x1a4c[77])};exports[_0x1a4c[78]]= function(_0x6b08x11,_0x6b08x12){logger[_0x1a4c[76]](_0x1a4c[79]);docExtract(_0x6b08x11,_0x6b08x12,_0x1a4c[80])};function docExtract(_0x6b08x11,_0x6b08x12,_0x6b08x21){var _0x6b08x16;logger[_0x1a4c[76]](_0x1a4c[81]);DefaultReport[_0x1a4c[38]](_0x1a4c[60])[_0x1a4c[36]](_0x6b08x11[_0x1a4c[30]][_0x1a4c[29]])[_0x1a4c[23]](function(_0x6b08x19){if(!_0x6b08x19){return _0x6b08x12[_0x1a4c[28]](404)};_0x6b08x16= _0x6b08x19;return ReportTree[_0x1a4c[36]](1)})[_0x1a4c[23]](function(_0x6b08x25){_0x6b08x25= JSON[_0x1a4c[93]](_0x6b08x25[_0x1a4c[92]]);var _0x6b08x26=_[_0x1a4c[94]](_0x6b08x25,{id:_0x6b08x16[_0x1a4c[34]]});var _0x6b08x27=getReportPath(_0x6b08x26,_0x6b08x25,_0x6b08x16[_0x1a4c[33]]);logger[_0x1a4c[76]](_0x1a4c[95]);if(_0x6b08x11[_0x1a4c[24]][_0x1a4c[50]]&& _0x6b08x11[_0x1a4c[24]][_0x1a4c[50]]=== _0x1a4c[51]){_0x6b08x11[_0x1a4c[24]][_0x1a4c[52]]= moment()[_0x1a4c[54]](_0x1a4c[53]);_0x6b08x11[_0x1a4c[24]][_0x1a4c[55]]= moment()[_0x1a4c[54]](_0x1a4c[53]);_0x6b08x16[_0x1a4c[56]][_0x1a4c[35]]= _0x6b08x16[_0x1a4c[56]][_0x1a4c[35]][_0x1a4c[59]](_0x1a4c[57],_0x1a4c[58])};delete _0x6b08x11[_0x1a4c[24]][_0x1a4c[50]];return [_0x6b08x16,ExtractedReport[_0x1a4c[101]]({name:_0x6b08x27,startDate:_0x6b08x11[_0x1a4c[24]][_0x1a4c[52]]?_0x6b08x11[_0x1a4c[24]][_0x1a4c[52]]+ (_0x6b08x11[_0x1a4c[24]][_0x1a4c[96]]?_0x1a4c[97]+ _0x6b08x11[_0x1a4c[24]][_0x1a4c[96]]:_0x1a4c[98]):null,endDate:_0x6b08x11[_0x1a4c[24]][_0x1a4c[55]]?_0x6b08x11[_0x1a4c[24]][_0x1a4c[55]]+ (_0x6b08x11[_0x1a4c[24]][_0x1a4c[99]]?_0x1a4c[97]+ _0x6b08x11[_0x1a4c[24]][_0x1a4c[99]]:_0x1a4c[100]):null,output:_0x6b08x21,UserId:_0x6b08x11[_0x1a4c[48]][_0x1a4c[29]]})]})[_0x1a4c[47]](function(_0x6b08x16,_0x6b08x22){logger[_0x1a4c[76]](_0x1a4c[82]+ _0x6b08x21);var _0x6b08x23=cp[_0x1a4c[84]](__dirname+ _0x1a4c[83]);_0x6b08x23[_0x1a4c[86]](_0x1a4c[89],function(_0x6b08x24){logger[_0x1a4c[76]](_0x1a4c[90],_0x6b08x24);_0x6b08x23[_0x1a4c[91]]()})[_0x1a4c[86]](_0x1a4c[87],function(){logger[_0x1a4c[76]](_0x1a4c[88])})[_0x1a4c[86]](_0x1a4c[42],function(_0x6b08x14){logger[_0x1a4c[76]](_0x1a4c[85],_0x6b08x14)});_0x6b08x23[_0x1a4c[21]]({report:_0x6b08x16,query:_0x6b08x11[_0x1a4c[24]],extractedId:_0x6b08x22[_0x1a4c[29]],user:_0x6b08x11[_0x1a4c[48]],type:_0x6b08x21})})[_0x1a4c[20]](function(_0x6b08x14){return handleError(_0x6b08x12,_0x6b08x14)});return _0x6b08x12[_0x1a4c[28]](200)}function getReportPath(_0x6b08x26,_0x6b08x25,_0x6b08x27){_0x6b08x27= _0x6b08x26[_0x1a4c[102]]+ _0x1a4c[103]+ _0x6b08x27;if(_0x6b08x26[_0x1a4c[34]]=== _0x1a4c[104]){return _0x6b08x27}else {return getReportPath(_[_0x1a4c[94]](_0x6b08x25,{id:_0x6b08x26[_0x1a4c[34]]}),_0x6b08x25,_0x6b08x27)}}exports[_0x1a4c[105]]= function(_0x6b08x11,_0x6b08x12){return DefaultReport[_0x1a4c[36]](_0x6b08x11[_0x1a4c[30]][_0x1a4c[29]],{include:[{all:true}]})[_0x1a4c[23]](function(_0x6b08x16){if(!_0x6b08x16){return _0x6b08x12[_0x1a4c[28]](404)};return _0x6b08x12[_0x1a4c[21]](_0x6b08x16)})[_0x1a4c[20]](function(_0x6b08x14){return handleError(_0x6b08x12,_0x6b08x14)})};exports[_0x1a4c[106]]= function(_0x6b08x11,_0x6b08x12){var _0x6b08x29;return sequelize[_0x1a4c[111]](function(_0x6b08x2a){return DefaultReport[_0x1a4c[38]]({method:[_0x1a4c[37],{DefaultReportId:_0x6b08x11[_0x1a4c[30]][_0x1a4c[29]]}]})[_0x1a4c[36]](_0x6b08x11[_0x1a4c[30]][_0x1a4c[29]])[_0x1a4c[23]](function(_0x6b08x16){if(!_0x6b08x16){return _0x6b08x12[_0x1a4c[28]](404)};var _0x6b08x2b=_0x6b08x16[_0x1a4c[56]];delete _0x6b08x2b[_0x1a4c[29]];delete _0x6b08x2b[_0x1a4c[107]];delete _0x6b08x2b[_0x1a4c[108]];_0x6b08x2b[_0x1a4c[34]]= _0x6b08x11[_0x1a4c[109]][_0x1a4c[34]];_0x6b08x29= _[_0x1a4c[110]](_0x6b08x2b.Fields,_0x1a4c[56]);return CustomReport[_0x1a4c[101]](_0x6b08x2b,{transaction:_0x6b08x2a})})[_0x1a4c[23]](function(_0x6b08x16){return [_0x6b08x16,_0x6b08x29]})[_0x1a4c[47]](createCopyFields(_0x6b08x2a))})[_0x1a4c[23]](function(){return _0x6b08x12[_0x1a4c[28]](201)})[_0x1a4c[20]](function(_0x6b08x14){return handleError(_0x6b08x12,_0x6b08x14)})};function createCopyFields(_0x6b08x2a){return function(_0x6b08x16,_0x6b08x2d){if(_0x6b08x2d&& Array[_0x1a4c[62]](_0x6b08x2d)&& _0x6b08x2d[_0x1a4c[63]]){var _0x6b08x2e=reportBuildUtils[_0x1a4c[112]](_0x6b08x16[_0x1a4c[35]]);if(_0x6b08x2e){var _0x6b08x2f;return _0x6b08x2e[_0x1a4c[128]]()[_0x1a4c[23]](function(_0x6b08x30){_0x6b08x2f= _[_0x1a4c[113]](_0x6b08x30);var _0x6b08x31=[];var _0x6b08x32=_[_0x1a4c[115]](_0x6b08x2d,_0x1a4c[114]);_[_0x1a4c[70]](_0x6b08x32,function(_0x6b08x33,_0x6b08x1f){if(_0x6b08x1f!== _0x1a4c[116]&& _0x6b08x1f!== _0x1a4c[117]){_0x6b08x33[0][_0x1a4c[120]][_0x1a4c[119]][_0x1a4c[71]](function(_0x6b08x34){_0x6b08x34[_0x1a4c[118]]= _0x6b08x16[_0x1a4c[29]]});_0x6b08x33[0][_0x1a4c[120]][_0x1a4c[33]]+= _0x1a4c[121]+ sr({length:5});_0x6b08x31[_0x1a4c[122]](Metric[_0x1a4c[101]](_0x6b08x33[0][_0x1a4c[120]][_0x1a4c[56]],{include:[{model:ReportField,as:_0x1a4c[119]}],transaction:_0x6b08x2a}))}else {_0x6b08x33[_0x1a4c[71]](function(_0x6b08x34){if(_[_0x1a4c[124]](_0x6b08x2f,_0x6b08x34[_0x1a4c[123]])|| _0x6b08x34[_0x1a4c[125]]){_0x6b08x34[_0x1a4c[118]]= _0x6b08x16[_0x1a4c[29]];_0x6b08x31[_0x1a4c[122]](ReportField[_0x1a4c[101]](_0x6b08x34,{transaction:_0x6b08x2a}))}else {throw  new sequelize.Error(_0x1a4c[126]+ _0x6b08x34[_0x1a4c[123]]+ _0x1a4c[127])}})}});return _0x6b08x31})[_0x1a4c[45]]()}else {throw  new sequelize.Error(_0x1a4c[129])}}}}exports[_0x1a4c[101]]= function(_0x6b08x11,_0x6b08x12){return DefaultReport[_0x1a4c[101]](_0x6b08x11[_0x1a4c[109]])[_0x1a4c[23]](function(_0x6b08x16){return _0x6b08x12[_0x1a4c[22]](201)[_0x1a4c[21]](_0x6b08x16)})[_0x1a4c[20]](function(_0x6b08x14){return handleError(_0x6b08x12,_0x6b08x14)})};exports[_0x1a4c[130]]= function(_0x6b08x11,_0x6b08x12){if(_0x6b08x11[_0x1a4c[109]][_0x1a4c[29]]){delete _0x6b08x11[_0x1a4c[109]][_0x1a4c[29]]};return DefaultReport[_0x1a4c[36]](_0x6b08x11[_0x1a4c[30]][_0x1a4c[29]])[_0x1a4c[23]](function(_0x6b08x16){if(!_0x6b08x16){return _0x6b08x12[_0x1a4c[28]](404)};var _0x6b08x35=_[_0x1a4c[131]](_0x6b08x16,_0x6b08x11[_0x1a4c[109]]);return _0x6b08x35[_0x1a4c[132]]()})[_0x1a4c[23]](function(_0x6b08x16){return _0x6b08x12[_0x1a4c[22]](200)[_0x1a4c[21]](_0x6b08x16)})[_0x1a4c[20]](function(_0x6b08x14){return handleError(_0x6b08x12,_0x6b08x14)})};exports[_0x1a4c[133]]= function(_0x6b08x11,_0x6b08x12){return DefaultReport[_0x1a4c[36]](_0x6b08x11[_0x1a4c[30]][_0x1a4c[29]])[_0x1a4c[23]](function(_0x6b08x16){if(!_0x6b08x16){return _0x6b08x12[_0x1a4c[28]](404)};return _0x6b08x16[_0x1a4c[133]]()})[_0x1a4c[23]](function(){return _0x6b08x12[_0x1a4c[28]](204)})[_0x1a4c[20]](function(_0x6b08x14){return handleError(_0x6b08x12,_0x6b08x14)})};function handleError(_0x6b08x12,_0x6b08x14){logger[_0x1a4c[42]](_0x6b08x14[_0x1a4c[41]]);return _0x6b08x12[_0x1a4c[22]](500)[_0x1a4c[21]](_0x6b08x14)}
\ No newline at end of file