Built motion from commit 8dae768.|0.0.121
[motion.git] / server / api / default_report / default_report.controller.js
index 72fd088..fab9082 100644 (file)
@@ -1 +1 @@
-var _0x6e50=["\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\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\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","\x73\x70\x72\x65\x61\x64","\x61\x6C\x6C","\x66\x6F\x75\x6E\x64\x20\x72\x65\x70\x6F\x72\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x75\x69\x50\x61\x67\x69\x6E\x61\x74\x69\x6F\x6E","\x70\x75\x73\x68","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\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","\x73\x74\x61\x72\x74\x44\x61\x74\x65","\x62\x6F\x64\x79","\x65\x6E\x64\x44\x61\x74\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x53\x54\x41\x52\x54\x5F\x4F\x52\x5F\x45\x4E\x44\x5F\x44\x41\x54\x45\x5F\x4D\x49\x53\x53\x49\x4E\x47","\x65\x78\x74\x72\x61\x63\x74","\x6E\x61\x6D\x65","\x63\x72\x65\x61\x74\x65","","\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","\x66\x6F\x72\x6D\x61\x74","\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","\x25\x73\x20\x25\x73","\x66\x6F\x72\x45\x61\x63\x68","\x67\x72\x6F\x75\x70","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x70\x61\x72\x73\x65","\x20","\x2C","\x6A\x6F\x69\x6E","\x2C\x43\x4F\x55\x4E\x54\x28\x2A\x29","\x20\x46\x52\x4F\x4D\x20","\x74\x61\x62\x6C\x65","\x28\x29","\x20\x57\x48\x45\x52\x45\x20","\x70\x65\x72\x50\x61\x67\x65","\x70\x61\x67\x65","\x20\x41\x4E\x44\x20\x63\x72\x65\x61\x74\x65\x64\x41\x74\x20\x3E\x3D\x20\x27","\x27","\x20\x41\x4E\x44\x20\x63\x72\x65\x61\x74\x65\x64\x41\x74\x20\x3C\x3D\x20\x27","\x66\x69\x6E\x64","\x20\x41\x4E\x44\x20","\x20\x4C\x49\x4B\x45\x20\x27\x25","\x25\x27","\x66\x6F\x72\x4F\x77\x6E","\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20","\x20\x4F\x52\x44\x45\x52\x20\x42\x59\x20","\x20\x4C\x49\x4D\x49\x54\x20","\x20\x4F\x46\x46\x53\x45\x54\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","\x25","\x76\x61\x6C\x75\x65","\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","\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"];_0x6e50[0];var _=require(_0x6e50[1]);var util=require(_0x6e50[2]);var DefaultReport=require(_0x6e50[4])[_0x6e50[3]];var sequelize=require(_0x6e50[4])[_0x6e50[5]];var CustomReport=require(_0x6e50[4])[_0x6e50[6]];var ExtractedReport=require(_0x6e50[4])[_0x6e50[7]];var extractUtils=require(_0x6e50[8]);var Util=require(_0x6e50[9]);exports[_0x6e50[10]]=function(_0xbcc9x9,_0xbcc9xa,_0xbcc9xb){return DefaultReport[_0x6e50[19]](Util[_0x6e50[18]](_[_0x6e50[17]](_0xbcc9x9[_0x6e50[15]],_0xbcc9x9[_0x6e50[16]])))[_0x6e50[14]](function(_0xbcc9xd){_0xbcc9xa[_0x6e50[13]](200)[_0x6e50[12]](_0xbcc9xd)})[_0x6e50[11]](function(_0xbcc9xc){return handleError(_0xbcc9xa,_0xbcc9xc)})};exports[_0x6e50[20]]=function(_0xbcc9x9,_0xbcc9xa){DefaultReport[_0x6e50[33]](_0xbcc9x9[_0x6e50[16]][_0x6e50[32]],{include:[{all:true}]})[_0x6e50[14]](function(_0xbcc9x10){console[_0x6e50[21]](_0x6e50[25]);if(!_0xbcc9x10){return _0xbcc9xa[_0x6e50[26]](404)};var _0xbcc9x11=buildReport(_0xbcc9x10[_0x6e50[27]],_0xbcc9x9[_0x6e50[15]]);var _0xbcc9x12=[sequelize[_0x6e50[15]](_0xbcc9x11,{type:sequelize[_0x6e50[29]][_0x6e50[28]]})];if(_0xbcc9x9[_0x6e50[15]][_0x6e50[30]]){var _0xbcc9x13=buildReport(_0xbcc9x10[_0x6e50[27]],_0xbcc9x9[_0x6e50[15]],true);_0xbcc9x12[_0x6e50[31]](sequelize[_0x6e50[15]](_0xbcc9x13,{type:sequelize[_0x6e50[29]][_0x6e50[28]]}))};return _0xbcc9x12})[_0x6e50[24]]()[_0x6e50[23]](function(_0xbcc9xe,_0xbcc9xf){console[_0x6e50[21]](_0xbcc9xe[_0x6e50[22]]);console[_0x6e50[21]](_0xbcc9xf);_0xbcc9xa[_0x6e50[13]](200)[_0x6e50[12]]({rows:_0xbcc9xe,count:_0xbcc9xf?_0xbcc9xf[0]:null})})[_0x6e50[11]](function(_0xbcc9xc){console[_0x6e50[21]](_0xbcc9xc);return handleError(_0xbcc9xa,_0xbcc9xc)})};exports[_0x6e50[34]]=function(_0xbcc9x9,_0xbcc9xa){docExtract(_0xbcc9x9,_0xbcc9xa,_0x6e50[35])};exports[_0x6e50[36]]=function(_0xbcc9x9,_0xbcc9xa){docExtract(_0xbcc9x9,_0xbcc9xa,_0x6e50[37])};function docExtract(_0xbcc9x9,_0xbcc9xa,_0xbcc9x15){if(!_0xbcc9x9[_0x6e50[39]][_0x6e50[38]]||!_0xbcc9x9[_0x6e50[39]][_0x6e50[40]]){return _0xbcc9xa[_0x6e50[13]](500)[_0x6e50[12]]({message:_0x6e50[41]})};DefaultReport[_0x6e50[33]](_0xbcc9x9[_0x6e50[16]][_0x6e50[32]],{include:[{all:true}]})[_0x6e50[14]](function(_0xbcc9x10){if(!_0xbcc9x10){return _0xbcc9xa[_0x6e50[26]](404)};return [_0xbcc9x10,ExtractedReport[_0x6e50[44]]({name:_0xbcc9x10[_0x6e50[43]],startDate:_0xbcc9x9[_0x6e50[39]][_0x6e50[38]],endDate:_0xbcc9x9[_0x6e50[39]][_0x6e50[40]],output:_0xbcc9x15})]})[_0x6e50[23]](function(_0xbcc9x10,_0xbcc9x16){extractUtils[_0x6e50[42]+_0xbcc9x15](_0xbcc9x10,_0xbcc9x9[_0x6e50[39]][_0x6e50[38]],_0xbcc9x9[_0x6e50[39]][_0x6e50[40]],_0xbcc9x16[_0x6e50[32]])})[_0x6e50[11]](function(_0xbcc9xc){console[_0x6e50[21]](_0xbcc9xc);return handleError(_0xbcc9xa,_0xbcc9xc)});return _0xbcc9xa[_0x6e50[26]](200)}function buildReport(_0xbcc9x10,_0xbcc9x11,_0xbcc9x18){var _0xbcc9x19=[],_0xbcc9x1a=[],_0xbcc9x1b=[];_[_0x6e50[61]](_0xbcc9x10.Fields,function(_0xbcc9x1c){var _0xbcc9x1d=_0x6e50[45];if(_0xbcc9x1c[_0x6e50[46]]){switch(_0xbcc9x1c[_0x6e50[46]]){case _0x6e50[50]:_0xbcc9x1d=util[_0x6e50[49]](_0x6e50[47],_0xbcc9x1c[_0x6e50[48]]);break;case _0x6e50[52]:_0xbcc9x1d=util[_0x6e50[49]](_0x6e50[51],_0xbcc9x1c[_0x6e50[48]],_0xbcc9x1c[_0x6e50[48]]);break;case _0x6e50[54]:_0xbcc9x1d=util[_0x6e50[49]](_0x6e50[53],_0xbcc9x1c[_0x6e50[48]],_0xbcc9x1c[_0x6e50[48]]);break;default:_0xbcc9x1d=util[_0x6e50[49]](_0x6e50[55],_0xbcc9x1c[_0x6e50[46]],_0xbcc9x1c[_0x6e50[48]])}}else {_0xbcc9x1d=_0xbcc9x1c[_0x6e50[48]]};_0xbcc9x19[_0x6e50[31]](util[_0x6e50[49]](_0x6e50[56],_0xbcc9x1d,_0xbcc9x1c[_0x6e50[57]]));if(_0xbcc9x1c[_0x6e50[58]]){_0xbcc9x1a[_0x6e50[31]](_0xbcc9x1c[_0x6e50[48]])};if(_0xbcc9x1c[_0x6e50[59]]){_0xbcc9x1b[_0x6e50[31]](util[_0x6e50[49]](_0x6e50[60],_0xbcc9x1c[_0x6e50[48]],_0xbcc9x1c[_0x6e50[59]]))}});var _0xbcc9x1e=getConditions(JSON[_0x6e50[64]](_0xbcc9x10[_0x6e50[63]])[_0x6e50[62]]);var _0xbcc9x1f=_0x6e50[28];_0xbcc9x1f+=_0x6e50[65]+_0xbcc9x19[_0x6e50[67]](_0x6e50[66]);if(_0xbcc9x18){_0xbcc9x1f+=_0x6e50[68]};_0xbcc9x1f+=_0x6e50[69]+_0xbcc9x10[_0x6e50[70]];_0xbcc9x1f+=_0xbcc9x1e!==_0x6e50[71]?_0x6e50[72]+_0xbcc9x1e:_0x6e50[45];var _0xbcc9x20=false;var _0xbcc9x21=false;if(_0xbcc9x11){_[_0x6e50[82]](_0xbcc9x11,function(_0xbcc9x22,_0xbcc9x23){switch(_0xbcc9x23){case _0x6e50[74]:if(_0xbcc9x11[_0x6e50[73]]){_0xbcc9x20=parseInt(_0xbcc9x11[_0x6e50[73]],10);_0xbcc9x21=parseInt(_0xbcc9x22,10)*_0xbcc9x20};break;case _0x6e50[73]:_0xbcc9x20=parseInt(_0xbcc9x22,10);break;case _0x6e50[38]:_0xbcc9x1f+=_0x6e50[75]+_0xbcc9x22+_0x6e50[76];break;case _0x6e50[40]:_0xbcc9x1f+=_0x6e50[77]+_0xbcc9x22+_0x6e50[76];break;case _0x6e50[30]:break;default:var _0xbcc9x24=_[_0x6e50[78]](_0xbcc9x10.Fields,{alias:_0xbcc9x23})[_0x6e50[48]];if(_0xbcc9x24){_0xbcc9x1f+=_0x6e50[79]+_0xbcc9x24+_0x6e50[80]+_0xbcc9x22+_0x6e50[81]}else {_0xbcc9x1f+=_0x6e50[79]+_0xbcc9x23+_0x6e50[80]+_0xbcc9x22+_0x6e50[81]}}})};_0xbcc9x1f+=_0xbcc9x1a[_0x6e50[22]]?_0x6e50[83]+_0xbcc9x1a[_0x6e50[67]](_0x6e50[66]):_0x6e50[45];_0xbcc9x1f+=_0xbcc9x1b[_0x6e50[22]]?_0x6e50[84]+_0xbcc9x1b[_0x6e50[67]](_0x6e50[66]):_0x6e50[45];_0xbcc9x1f+=_0xbcc9x20&&!_0xbcc9x18?_0x6e50[85]+_0xbcc9x20:_0x6e50[45];_0xbcc9x1f+=_0xbcc9x21&&!_0xbcc9x18?_0x6e50[86]+_0xbcc9x21:_0x6e50[45];return _0xbcc9x1f}function getConditions(_0xbcc9x26){if(!_0xbcc9x26){return _0x6e50[45]};for(var _0xbcc9x27=_0x6e50[87],_0xbcc9x28=0;_0xbcc9x28<_0xbcc9x26[_0x6e50[88]][_0x6e50[22]];_0xbcc9x28++){_0xbcc9x28>0&&(_0xbcc9x27+=_0x6e50[65]+_0xbcc9x26[_0x6e50[89]]+_0x6e50[65]);_0xbcc9x27+=_0xbcc9x26[_0x6e50[88]][_0xbcc9x28][_0x6e50[62]]?getConditions(_0xbcc9x26[_0x6e50[88]][_0xbcc9x28][_0x6e50[62]]):_0xbcc9x26[_0x6e50[88]][_0xbcc9x28][_0x6e50[48]]+_0x6e50[65]+_0xbcc9x26[_0x6e50[88]][_0xbcc9x28][_0x6e50[90]]+_0x6e50[91]+(_0xbcc9x26[_0x6e50[88]][_0xbcc9x28][_0x6e50[90]]===_0x6e50[92]?_0x6e50[93]+_0xbcc9x26[_0x6e50[88]][_0xbcc9x28][_0x6e50[94]]+_0x6e50[93]:_0xbcc9x26[_0x6e50[88]][_0xbcc9x28][_0x6e50[94]])+_0x6e50[76]};return _0xbcc9x27+_0x6e50[95]}exports[_0x6e50[96]]=function(_0xbcc9x9,_0xbcc9xa){DefaultReport[_0x6e50[33]](_0xbcc9x9[_0x6e50[16]][_0x6e50[32]],{include:[{all:true}]})[_0x6e50[14]](function(_0xbcc9x10){if(!_0xbcc9x10){return _0xbcc9xa[_0x6e50[26]](404)};return _0xbcc9xa[_0x6e50[12]](_0xbcc9x10)})[_0x6e50[11]](function(_0xbcc9xc){return handleError(_0xbcc9xa,_0xbcc9xc)})};exports[_0x6e50[97]]=function(_0xbcc9x9,_0xbcc9xa){DefaultReport[_0x6e50[33]](_0xbcc9x9[_0x6e50[16]][_0x6e50[32]],{include:[{all:true}]})[_0x6e50[14]](function(_0xbcc9x10){if(!_0xbcc9x10){return _0xbcc9xa[_0x6e50[26]](404)};var _0xbcc9x29=_0xbcc9x10[_0x6e50[27]];delete _0xbcc9x29[_0x6e50[32]];delete _0xbcc9x29[_0x6e50[98]];delete _0xbcc9x29[_0x6e50[99]];_0xbcc9x29[_0x6e50[100]]=_0xbcc9x9[_0x6e50[39]][_0x6e50[100]];_0xbcc9x29[_0x6e50[101]]=_[_0x6e50[102]](_0xbcc9x29.Fields,_0x6e50[27]);_[_0x6e50[61]](_0xbcc9x29.Fields,function(_0xbcc9x1c){delete _0xbcc9x1c[_0x6e50[32]];delete _0xbcc9x1c[_0x6e50[103]];delete _0xbcc9x1c[_0x6e50[98]];delete _0xbcc9x1c[_0x6e50[99]]});return CustomReport[_0x6e50[44]](_0xbcc9x29,{include:[{all:true}]})})[_0x6e50[14]](function(){return _0xbcc9xa[_0x6e50[26]](201)})[_0x6e50[11]](function(_0xbcc9xc){console[_0x6e50[21]](_0xbcc9xc);return handleError(_0xbcc9xa,_0xbcc9xc)})};exports[_0x6e50[44]]=function(_0xbcc9x9,_0xbcc9xa){DefaultReport[_0x6e50[44]](_0xbcc9x9[_0x6e50[39]])[_0x6e50[14]](function(_0xbcc9x10){return _0xbcc9xa[_0x6e50[13]](201)[_0x6e50[12]](_0xbcc9x10)})[_0x6e50[11]](function(_0xbcc9xc){return handleError(_0xbcc9xa,_0xbcc9xc)})};exports[_0x6e50[104]]=function(_0xbcc9x9,_0xbcc9xa){if(_0xbcc9x9[_0x6e50[39]][_0x6e50[32]]){delete _0xbcc9x9[_0x6e50[39]][_0x6e50[32]]};DefaultReport[_0x6e50[33]](_0xbcc9x9[_0x6e50[16]][_0x6e50[32]])[_0x6e50[14]](function(_0xbcc9x10){if(!_0xbcc9x10){return _0xbcc9xa[_0x6e50[26]](404)};var _0xbcc9x2a=_[_0x6e50[17]](_0xbcc9x10,_0xbcc9x9[_0x6e50[39]]);_0xbcc9x2a[_0x6e50[105]]()[_0x6e50[14]](function(){return _0xbcc9xa[_0x6e50[13]](200)[_0x6e50[12]](_0xbcc9x10)})[_0x6e50[11]](function(_0xbcc9xc){return handleError(_0xbcc9xa,_0xbcc9xc)})})[_0x6e50[11]](function(_0xbcc9xc){return handleError(_0xbcc9xa,_0xbcc9xc)})};exports[_0x6e50[106]]=function(_0xbcc9x9,_0xbcc9xa){DefaultReport[_0x6e50[33]](_0xbcc9x9[_0x6e50[16]][_0x6e50[32]])[_0x6e50[14]](function(_0xbcc9x10){if(!_0xbcc9x10){return _0xbcc9xa[_0x6e50[26]](404)};_0xbcc9x10[_0x6e50[106]]()[_0x6e50[14]](function(){return _0xbcc9xa[_0x6e50[26]](204)})[_0x6e50[11]](function(_0xbcc9xc){return handleError(_0xbcc9xa,_0xbcc9xc)})})[_0x6e50[11]](function(_0xbcc9xc){return handleError(_0xbcc9xa,_0xbcc9xc)})};function handleError(_0xbcc9xa,_0xbcc9xc){return _0xbcc9xa[_0x6e50[13]](500)[_0x6e50[12]](_0xbcc9xc)}
\ No newline at end of file
+var _0x9217=["\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","\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","\x74\x72\x65\x65","\x70\x61\x72\x73\x65","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x74\x65\x78\x74","\x2F\x20","\x23","\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","\x6D\x61\x70","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x69\x73\x41\x72\x72\x61\x79","\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","\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"];_0x9217[0];var _=require(_0x9217[1]);var util=require(_0x9217[2]);var DefaultReport=require(_0x9217[4])[_0x9217[3]];var ReportField=require(_0x9217[4])[_0x9217[5]];var Metric=require(_0x9217[4])[_0x9217[6]];var sequelize=require(_0x9217[4])[_0x9217[7]];var CustomReport=require(_0x9217[4])[_0x9217[8]];var ExtractedReport=require(_0x9217[4])[_0x9217[9]];var extractUtils=require(_0x9217[10]);var reportBuildUtils=require(_0x9217[11]);var Util=require(_0x9217[12]);var moment=require(_0x9217[13]);var cp=require(_0x9217[14]);var sr=require(_0x9217[15]);var ReportTree=require(_0x9217[4])[_0x9217[16]];exports[_0x9217[17]]= function(_0x3347x10,_0x3347x11,_0x3347x12){return DefaultReport[_0x9217[24]](Util[_0x9217[23]](_0x3347x10[_0x9217[22]]))[_0x9217[21]](function(_0x3347x14){_0x3347x11[_0x9217[20]](200)[_0x9217[19]](_0x3347x14)})[_0x9217[18]](function(_0x3347x13){return handleError(_0x3347x11,_0x3347x13)})};exports[_0x9217[25]]= function(_0x3347x10,_0x3347x11){return DefaultReport[_0x9217[36]]({method:[_0x9217[35],{DefaultReportId:_0x3347x10[_0x9217[28]][_0x9217[27]]}]})[_0x9217[34]](_0x3347x10[_0x9217[28]][_0x9217[27]],{attributes:[_0x9217[29],_0x9217[30],_0x9217[31],_0x9217[32],_0x9217[33]]})[_0x9217[21]](function(_0x3347x15){if(!_0x3347x15){return _0x3347x11[_0x9217[26]](404)};return _0x3347x11[_0x9217[19]](_0x3347x15)})[_0x9217[18]](function(_0x3347x13){return handleError(_0x3347x11,_0x3347x13)})};exports[_0x9217[37]]= function(_0x3347x10,_0x3347x11){return Promise[_0x9217[40]]([])[_0x9217[21]](getQuery(_0x3347x10,_0x3347x11))[_0x9217[21]](function(_0x3347x16){_0x3347x11[_0x9217[20]](200)[_0x9217[19]]({query:_0x3347x16})})[_0x9217[18]](function(_0x3347x13){console[_0x9217[39]](_0x9217[38],_0x3347x13)})};function getQuery(_0x3347x10,_0x3347x11){var _0x3347x18;return function(){return DefaultReport[_0x9217[36]](_0x9217[56])[_0x9217[34]](_0x3347x10[_0x9217[28]][_0x9217[27]])[_0x9217[21]](function(_0x3347x15){console[_0x9217[39]](_0x9217[45]);if(!_0x3347x15){return _0x3347x11[_0x9217[26]](404)};if(_0x3347x10[_0x9217[22]][_0x9217[46]]&& _0x3347x10[_0x9217[22]][_0x9217[46]]=== _0x9217[47]){_0x3347x10[_0x9217[22]][_0x9217[48]]= moment()[_0x9217[50]](_0x9217[49]);_0x3347x10[_0x9217[22]][_0x9217[51]]= moment()[_0x9217[50]](_0x9217[49]);_0x3347x15[_0x9217[52]][_0x9217[33]]= _0x3347x15[_0x9217[52]][_0x9217[33]][_0x9217[55]](_0x9217[53],_0x9217[54])};delete _0x3347x10[_0x9217[22]][_0x9217[46]];_0x3347x18= _0x3347x15[_0x9217[52]];return _0x3347x18[_0x9217[33]]})[_0x9217[21]](reportBuildUtils[_0x9217[44]](_0x3347x10[_0x9217[43]]))[_0x9217[21]](function(_0x3347x19){return [_0x3347x19,_0x3347x18]})[_0x9217[42]](reportBuildUtils[_0x9217[41]](_0x3347x10[_0x9217[22]]))}}exports[_0x9217[57]]= function(_0x3347x10,_0x3347x11){var _0x3347x1a;return Promise[_0x9217[40]]([])[_0x9217[21]](getQuery(_0x3347x10,_0x3347x11))[_0x9217[21]](function(_0x3347x16){return sequelize[_0x9217[22]](_0x3347x16,{type:sequelize[_0x9217[68]][_0x9217[67]]})})[_0x9217[21]](function(_0x3347x1b){_0x3347x1a= _0x3347x1b[_0x9217[58]];if(_0x3347x10[_0x9217[22]][_0x9217[59]]){_0x3347x1b= _(_0x3347x1b)[_0x9217[63]](_0x3347x10[_0x9217[22]][_0x9217[62]]|| 0)[_0x9217[61]](_0x3347x10[_0x9217[22]][_0x9217[59]])[_0x9217[60]]()};_[_0x9217[66]](_0x3347x1b,function(_0x3347x1c){_[_0x9217[65]](_0x3347x1c,function(_0x3347x1d,_0x3347x1e){if(_0x3347x1d instanceof  Date){_0x3347x1c[_0x3347x1e]= moment(_0x3347x1d)[_0x9217[50]](_0x9217[64]).toString()}})});_0x3347x11[_0x9217[20]](200)[_0x9217[19]]({rows:_0x3347x1b,count:_0x3347x1a})})[_0x9217[18]](function(_0x3347x13){console[_0x9217[39]](_0x3347x13);return handleError(_0x3347x11,_0x3347x13)})};exports[_0x9217[69]]= function(_0x3347x10,_0x3347x11){docExtract(_0x3347x10,_0x3347x11,_0x9217[70])};exports[_0x9217[71]]= function(_0x3347x10,_0x3347x11){docExtract(_0x3347x10,_0x3347x11,_0x9217[72])};function docExtract(_0x3347x10,_0x3347x11,_0x3347x20){var _0x3347x15;DefaultReport[_0x9217[36]](_0x9217[56])[_0x9217[34]](_0x3347x10[_0x9217[28]][_0x9217[27]])[_0x9217[21]](function(_0x3347x18){if(!_0x3347x18){return _0x3347x11[_0x9217[26]](404)};_0x3347x15= _0x3347x18;return ReportTree[_0x9217[34]](1)})[_0x9217[21]](function(_0x3347x24){_0x3347x24= JSON[_0x9217[84]](_0x3347x24[_0x9217[83]]);var _0x3347x25=_[_0x9217[85]](_0x3347x24,{id:_0x3347x15[_0x9217[32]]});var _0x3347x26=getReportPath(_0x3347x25,_0x3347x24,_0x3347x15[_0x9217[31]]);if(_0x3347x10[_0x9217[22]][_0x9217[46]]&& _0x3347x10[_0x9217[22]][_0x9217[46]]=== _0x9217[47]){_0x3347x10[_0x9217[22]][_0x9217[48]]= moment()[_0x9217[50]](_0x9217[49]);_0x3347x10[_0x9217[22]][_0x9217[51]]= moment()[_0x9217[50]](_0x9217[49]);_0x3347x15[_0x9217[52]][_0x9217[33]]= _0x3347x15[_0x9217[52]][_0x9217[33]][_0x9217[55]](_0x9217[53],_0x9217[54])};delete _0x3347x10[_0x9217[22]][_0x9217[46]];return [_0x3347x15,ExtractedReport[_0x9217[86]]({name:_0x3347x26,startDate:_0x3347x10[_0x9217[22]][_0x9217[48]]|| null,endDate:_0x3347x10[_0x9217[22]][_0x9217[51]]|| null,output:_0x3347x20,UserId:_0x3347x10[_0x9217[43]][_0x9217[27]]})]})[_0x9217[42]](function(_0x3347x15,_0x3347x21){var _0x3347x22=cp[_0x9217[74]](__dirname+ _0x9217[73]);_0x3347x22[_0x9217[77]](_0x9217[80],function(_0x3347x23){console[_0x9217[39]](_0x9217[81],_0x3347x23);_0x3347x22[_0x9217[82]]()})[_0x9217[77]](_0x9217[78],function(){console[_0x9217[39]](_0x9217[79])})[_0x9217[77]](_0x9217[75],function(_0x3347x13){console[_0x9217[39]](_0x9217[76],_0x3347x13)});_0x3347x22[_0x9217[19]]({report:_0x3347x15,query:_0x3347x10[_0x9217[22]],extractedId:_0x3347x21[_0x9217[27]],user:_0x3347x10[_0x9217[43]],type:_0x3347x20})})[_0x9217[18]](function(_0x3347x13){console[_0x9217[39]](_0x3347x13);return handleError(_0x3347x11,_0x3347x13)});return _0x3347x11[_0x9217[26]](200)}function getReportPath(_0x3347x25,_0x3347x24,_0x3347x26){_0x3347x26= _0x3347x25[_0x9217[87]]+ _0x9217[88]+ _0x3347x26;if(_0x3347x25[_0x9217[32]]=== _0x9217[89]){return _0x3347x26}else {return getReportPath(_[_0x9217[85]](_0x3347x24,{id:_0x3347x25[_0x9217[32]]}),_0x3347x24,_0x3347x26)}}function getConditions(_0x3347x29){if(!_0x3347x29){return _0x9217[54]};for(var _0x3347x2a=_0x9217[90],_0x3347x2b=0;_0x3347x2b< _0x3347x29[_0x9217[91]][_0x9217[58]];_0x3347x2b++){_0x3347x2b> 0&& (_0x3347x2a+= _0x9217[92]+ _0x3347x29[_0x9217[93]]+ _0x9217[92]);_0x3347x2a+= _0x3347x29[_0x9217[91]][_0x3347x2b][_0x9217[94]]?getConditions(_0x3347x29[_0x9217[91]][_0x3347x2b][_0x9217[94]]):_0x3347x29[_0x9217[91]][_0x3347x2b][_0x9217[95]]+ _0x9217[92]+ _0x3347x29[_0x9217[91]][_0x3347x2b][_0x9217[96]]+ _0x9217[97]+ (_0x3347x29[_0x9217[91]][_0x3347x2b][_0x9217[96]]=== _0x9217[98]?_0x9217[99]+ _0x3347x29[_0x9217[91]][_0x3347x2b][_0x9217[60]]+ _0x9217[99]:_0x3347x29[_0x9217[91]][_0x3347x2b][_0x9217[60]])+ _0x9217[100]};return _0x3347x2a+ _0x9217[101]}exports[_0x9217[102]]= function(_0x3347x10,_0x3347x11){return DefaultReport[_0x9217[34]](_0x3347x10[_0x9217[28]][_0x9217[27]],{include:[{all:true}]})[_0x9217[21]](function(_0x3347x15){if(!_0x3347x15){return _0x3347x11[_0x9217[26]](404)};return _0x3347x11[_0x9217[19]](_0x3347x15)})[_0x9217[18]](function(_0x3347x13){return handleError(_0x3347x11,_0x3347x13)})};exports[_0x9217[103]]= function(_0x3347x10,_0x3347x11){var _0x3347x2c;return sequelize[_0x9217[108]](function(_0x3347x2d){return DefaultReport[_0x9217[36]]({method:[_0x9217[35],{DefaultReportId:_0x3347x10[_0x9217[28]][_0x9217[27]]}]})[_0x9217[34]](_0x3347x10[_0x9217[28]][_0x9217[27]])[_0x9217[21]](function(_0x3347x15){if(!_0x3347x15){return _0x3347x11[_0x9217[26]](404)};var _0x3347x2e=_0x3347x15[_0x9217[52]];console[_0x9217[39]](_0x3347x2e);delete _0x3347x2e[_0x9217[27]];delete _0x3347x2e[_0x9217[104]];delete _0x3347x2e[_0x9217[105]];_0x3347x2e[_0x9217[32]]= _0x3347x10[_0x9217[106]][_0x9217[32]];_0x3347x2c= _[_0x9217[107]](_0x3347x2e.Fields,_0x9217[52]);return CustomReport[_0x9217[86]](_0x3347x2e,{transaction:_0x3347x2d})})[_0x9217[21]](function(_0x3347x15){return [_0x3347x15,_0x3347x2c]})[_0x9217[42]](createCopyFields(_0x3347x2d))})[_0x9217[21]](function(){return _0x3347x11[_0x9217[26]](201)})[_0x9217[18]](function(_0x3347x13){console[_0x9217[39]](_0x3347x13);return handleError(_0x3347x11,_0x3347x13)})};function createCopyFields(_0x3347x2d){return function(_0x3347x15,_0x3347x30){if(_0x3347x30&& Array[_0x9217[109]](_0x3347x30)&& _0x3347x30[_0x9217[58]]){var _0x3347x31=reportBuildUtils[_0x9217[110]](_0x3347x15[_0x9217[33]]);if(_0x3347x31){var _0x3347x32;return _0x3347x31[_0x9217[124]]()[_0x9217[21]](function(_0x3347x33){_0x3347x32= _[_0x9217[111]](_0x3347x33);var _0x3347x34=[];var _0x3347x35=_[_0x9217[113]](_0x3347x30,_0x9217[112]);_[_0x9217[65]](_0x3347x35,function(_0x3347x36,_0x3347x1e){if(_0x3347x1e!== _0x9217[114]&& _0x3347x1e!== _0x9217[115]){_0x3347x36[0][_0x9217[118]][_0x9217[117]][_0x9217[66]](function(_0x3347x37){_0x3347x37[_0x9217[116]]= _0x3347x15[_0x9217[27]]});_0x3347x36[0][_0x9217[118]][_0x9217[31]]+= _0x9217[119]+ sr({length:5});_0x3347x34[_0x9217[120]](Metric[_0x9217[86]](_0x3347x36[0][_0x9217[118]][_0x9217[52]],{include:[{model:ReportField,as:_0x9217[117]}],transaction:_0x3347x2d}))}else {_0x3347x36[_0x9217[66]](function(_0x3347x37){if(_[_0x9217[121]](_0x3347x32,_0x3347x37[_0x9217[95]])){_0x3347x37[_0x9217[116]]= _0x3347x15[_0x9217[27]];_0x3347x34[_0x9217[120]](ReportField[_0x9217[86]](_0x3347x37,{transaction:_0x3347x2d}))}else {throw  new sequelize.Error(_0x9217[122]+ _0x3347x37[_0x9217[95]]+ _0x9217[123])}})}});return _0x3347x34})[_0x9217[40]]()}else {throw  new sequelize.Error(_0x9217[125])}}}}exports[_0x9217[86]]= function(_0x3347x10,_0x3347x11){return DefaultReport[_0x9217[86]](_0x3347x10[_0x9217[106]])[_0x9217[21]](function(_0x3347x15){return _0x3347x11[_0x9217[20]](201)[_0x9217[19]](_0x3347x15)})[_0x9217[18]](function(_0x3347x13){return handleError(_0x3347x11,_0x3347x13)})};exports[_0x9217[126]]= function(_0x3347x10,_0x3347x11){if(_0x3347x10[_0x9217[106]][_0x9217[27]]){delete _0x3347x10[_0x9217[106]][_0x9217[27]]};return DefaultReport[_0x9217[34]](_0x3347x10[_0x9217[28]][_0x9217[27]])[_0x9217[21]](function(_0x3347x15){if(!_0x3347x15){return _0x3347x11[_0x9217[26]](404)};var _0x3347x38=_[_0x9217[127]](_0x3347x15,_0x3347x10[_0x9217[106]]);return _0x3347x38[_0x9217[128]]()})[_0x9217[21]](function(_0x3347x15){return _0x3347x11[_0x9217[20]](200)[_0x9217[19]](_0x3347x15)})[_0x9217[18]](function(_0x3347x13){return handleError(_0x3347x11,_0x3347x13)})};exports[_0x9217[129]]= function(_0x3347x10,_0x3347x11){return DefaultReport[_0x9217[34]](_0x3347x10[_0x9217[28]][_0x9217[27]])[_0x9217[21]](function(_0x3347x15){if(!_0x3347x15){return _0x3347x11[_0x9217[26]](404)};return _0x3347x15[_0x9217[129]]()})[_0x9217[21]](function(){return _0x3347x11[_0x9217[26]](204)})[_0x9217[18]](function(_0x3347x13){return handleError(_0x3347x11,_0x3347x13)})};function handleError(_0x3347x11,_0x3347x13){return _0x3347x11[_0x9217[20]](500)[_0x9217[19]](_0x3347x13)}
\ No newline at end of file