Built motion from commit bfa6da2.|0.0.130
[motion.git] / server / api / custom_report / custom_report.controller.js
index 2bb16a9..347b684 100644 (file)
@@ -1 +1 @@
-var _0x717a=["\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","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x70\x61\x72\x61\x6D\x73","\x6D\x65\x72\x67\x65","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x70\x72\x65\x76\x69\x65\x77","\x6C\x6F\x67","\x6C\x65\x6E\x67\x74\x68","\x6C\x69\x6D\x69\x74","\x76\x61\x6C\x75\x65","\x74\x61\x6B\x65","\x6F\x66\x66\x73\x65\x74","\x73\x6C\x69\x63\x65","\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","\x62\x75\x69\x6C\x64\x52\x65\x70\x6F\x72\x74","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x66\x69\x65\x6C\x64\x73","\x73\x63\x6F\x70\x65","\x65\x78\x74\x72\x61\x63\x74\x50\x64\x66","\x50\x44\x46","\x65\x78\x74\x72\x61\x63\x74\x43\x73\x76","\x43\x53\x56","\x65\x78\x74\x72\x61\x63\x74","\x73\x70\x72\x65\x61\x64","\x6E\x61\x6D\x65","\x73\x74\x61\x72\x74\x44\x61\x74\x65","\x65\x6E\x64\x44\x61\x74\x65","\x63\x72\x65\x61\x74\x65","\x73\x68\x6F\x77","\x63\x6F\x70\x79","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x70\x61\x72\x65\x6E\x74","\x62\x6F\x64\x79","\x6D\x61\x70","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x46\x69\x65\x6C\x64\x73","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x61\x76\x65","\x69\x73\x41\x72\x72\x61\x79","\x74\x61\x62\x6C\x65","\x61\x6C\x6C","\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","\x66\x6F\x72\x45\x61\x63\x68","\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","\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","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x717a[0];var _=require(_0x717a[1]);var util=require(_0x717a[2]);var sequelize=require(_0x717a[4])[_0x717a[3]];var CustomReport=require(_0x717a[4])[_0x717a[5]];var ReportField=require(_0x717a[4])[_0x717a[6]];var Metric=require(_0x717a[4])[_0x717a[7]];var ExtractedReport=require(_0x717a[4])[_0x717a[8]];var extractUtils=require(_0x717a[9]);var reportBuildUtils=require(_0x717a[10]);var Util=require(_0x717a[11]);exports[_0x717a[12]]=function(_0x6f0fxb,_0x6f0fxc,_0x6f0fxd){return CustomReport[_0x717a[21]](Util[_0x717a[20]](_[_0x717a[19]](_0x6f0fxb[_0x717a[17]],_0x6f0fxb[_0x717a[18]])))[_0x717a[16]](function(_0x6f0fxf){_0x6f0fxc[_0x717a[15]](200)[_0x717a[14]](_0x6f0fxf)})[_0x717a[13]](function(_0x6f0fxe){return handleError(_0x6f0fxc,_0x6f0fxe)})};exports[_0x717a[22]]=function(_0x6f0fxb,_0x6f0fxc){var _0x6f0fx10;return CustomReport[_0x717a[39]](_0x717a[38])[_0x717a[37]](_0x6f0fxb[_0x717a[18]][_0x717a[36]])[_0x717a[16]](function(_0x6f0fx12){console[_0x717a[23]](_0x717a[30]);if(!_0x6f0fx12){return _0x6f0fxc[_0x717a[31]](404)};var _0x6f0fx13=reportBuildUtils[_0x717a[33]](_0x6f0fx12[_0x717a[32]],_0x6f0fxb[_0x717a[17]]);return sequelize[_0x717a[17]](_0x6f0fx13,{type:sequelize[_0x717a[35]][_0x717a[34]]})})[_0x717a[16]](function(_0x6f0fx11){_0x6f0fx10=_0x6f0fx11[_0x717a[24]];if(_0x6f0fxb[_0x717a[17]][_0x717a[25]]){_0x6f0fx11=_(_0x6f0fx11)[_0x717a[29]](_0x6f0fxb[_0x717a[17]][_0x717a[28]]||0)[_0x717a[27]](_0x6f0fxb[_0x717a[17]][_0x717a[25]])[_0x717a[26]]()};_0x6f0fxc[_0x717a[15]](200)[_0x717a[14]]({rows:_0x6f0fx11,count:_0x6f0fx10})})[_0x717a[13]](function(_0x6f0fxe){console[_0x717a[23]](_0x6f0fxe);return handleError(_0x6f0fxc,_0x6f0fxe)})};exports[_0x717a[40]]=function(_0x6f0fxb,_0x6f0fxc){docExtract(_0x6f0fxb,_0x6f0fxc,_0x717a[41])};exports[_0x717a[42]]=function(_0x6f0fxb,_0x6f0fxc){docExtract(_0x6f0fxb,_0x6f0fxc,_0x717a[43])};function docExtract(_0x6f0fxb,_0x6f0fxc,_0x6f0fx15){CustomReport[_0x717a[39]](_0x717a[38])[_0x717a[37]](_0x6f0fxb[_0x717a[18]][_0x717a[36]])[_0x717a[16]](function(_0x6f0fx12){if(!_0x6f0fx12){return _0x6f0fxc[_0x717a[31]](404)};return [_0x6f0fx12,ExtractedReport[_0x717a[49]]({name:_0x6f0fx12[_0x717a[46]],startDate:_0x6f0fxb[_0x717a[17]][_0x717a[47]]||null,endDate:_0x6f0fxb[_0x717a[17]][_0x717a[48]]||null,output:_0x6f0fx15})]})[_0x717a[45]](function(_0x6f0fx12,_0x6f0fx16){extractUtils[_0x717a[44]+_0x6f0fx15](_0x6f0fx12,_0x6f0fxb[_0x717a[17]],_0x6f0fx16[_0x717a[36]])})[_0x717a[13]](function(_0x6f0fxe){console[_0x717a[23]](_0x6f0fxe);return handleError(_0x6f0fxc,_0x6f0fxe)});return _0x6f0fxc[_0x717a[31]](200)}exports[_0x717a[50]]=function(_0x6f0fxb,_0x6f0fxc){return CustomReport[_0x717a[39]](_0x717a[38])[_0x717a[37]](_0x6f0fxb[_0x717a[18]][_0x717a[36]])[_0x717a[16]](function(_0x6f0fx12){if(!_0x6f0fx12){return _0x6f0fxc[_0x717a[31]](404)};return _0x6f0fxc[_0x717a[14]](_0x6f0fx12)})[_0x717a[13]](function(_0x6f0fxe){return handleError(_0x6f0fxc,_0x6f0fxe)})};exports[_0x717a[51]]=function(_0x6f0fxb,_0x6f0fxc){var _0x6f0fx17;return sequelize[_0x717a[57]](function(_0x6f0fx18){return CustomReport[_0x717a[39]](_0x717a[38])[_0x717a[37]](_0x6f0fxb[_0x717a[18]][_0x717a[36]])[_0x717a[16]](function(_0x6f0fx12){if(!_0x6f0fx12){return _0x6f0fxc[_0x717a[31]](404)};var _0x6f0fx19=_0x6f0fx12[_0x717a[32]];delete _0x6f0fx19[_0x717a[36]];delete _0x6f0fx19[_0x717a[52]];delete _0x6f0fx19[_0x717a[53]];_0x6f0fx19[_0x717a[54]]=_0x6f0fxb[_0x717a[55]][_0x717a[54]];_0x6f0fx17=_[_0x717a[56]](_0x6f0fx19.Fields,_0x717a[32]);return CustomReport[_0x717a[49]](_0x6f0fx19,{transaction:_0x6f0fx18})})[_0x717a[16]](function(_0x6f0fx12){return [_0x6f0fx12,_0x6f0fx17]})[_0x717a[45]](createFields(_0x6f0fx18))})[_0x717a[16]](function(){return _0x6f0fxc[_0x717a[31]](201)})[_0x717a[13]](function(_0x6f0fxe){console[_0x717a[23]](_0x6f0fxe);return handleError(_0x6f0fxc,_0x6f0fxe)})};exports[_0x717a[49]]=function(_0x6f0fxb,_0x6f0fxc){var _0x6f0fx1a;return sequelize[_0x717a[57]](function(_0x6f0fx18){return CustomReport[_0x717a[49]](_0x6f0fxb[_0x717a[55]],{transaction:_0x6f0fx18})[_0x717a[16]](function(_0x6f0fx12){_0x6f0fx1a=_0x6f0fx12;return [_0x6f0fx1a,_0x6f0fxb[_0x717a[55]][_0x717a[58]]]})[_0x717a[45]](createFields(_0x6f0fx18))})[_0x717a[16]](function(){return _0x6f0fxc[_0x717a[15]](201)[_0x717a[14]](_0x6f0fx1a)})[_0x717a[13]](function(_0x6f0fxe){console[_0x717a[23]](_0x6f0fxe);return handleError(_0x6f0fxc,_0x6f0fxe)})};exports[_0x717a[59]]=function(_0x6f0fxb,_0x6f0fxc){if(_0x6f0fxb[_0x717a[55]][_0x717a[36]]){delete _0x6f0fxb[_0x717a[55]][_0x717a[36]]};var _0x6f0fx1a;return sequelize[_0x717a[57]](function(_0x6f0fx18){return CustomReport[_0x717a[37]](_0x6f0fxb[_0x717a[18]][_0x717a[36]])[_0x717a[16]](function(_0x6f0fx12){if(!_0x6f0fx12){return _0x6f0fxc[_0x717a[31]](404)};var _0x6f0fx1b=_[_0x717a[19]](_0x6f0fx12,_0x6f0fxb[_0x717a[55]]);return _0x6f0fx12[_0x717a[61]]({transaction:_0x6f0fx18})})[_0x717a[16]](function(_0x6f0fx12){_0x6f0fx1a=_0x6f0fx12;if(_0x6f0fxb[_0x717a[55]][_0x717a[58]]){return ReportField[_0x717a[60]]({where:{CustomReportId:_0x6f0fxb[_0x717a[18]][_0x717a[36]]},transaction:_0x6f0fx18})}})[_0x717a[16]](function(){return [_0x6f0fx1a,_0x6f0fxb[_0x717a[55]][_0x717a[58]]]})[_0x717a[45]](createFields(_0x6f0fx18))})[_0x717a[16]](function(){return _0x6f0fxc[_0x717a[31]](200)})[_0x717a[13]](function(_0x6f0fxe){console[_0x717a[23]](_0x6f0fxe);return handleError(_0x6f0fxc,_0x6f0fxe)})};function createFields(_0x6f0fx18){return function(_0x6f0fx12,_0x6f0fx1d){if(_0x6f0fx1d&&Array[_0x717a[62]](_0x6f0fx1d)&&_0x6f0fx1d[_0x717a[24]]){var _0x6f0fx1e=getTable(_0x6f0fx12[_0x717a[63]]);if(_0x6f0fx1e){var _0x6f0fx1f;return _0x6f0fx1e[_0x717a[79]]()[_0x717a[16]](function(_0x6f0fx24){_0x6f0fx1f=_[_0x717a[77]](_0x6f0fx24);return Metric[_0x717a[78]]()})[_0x717a[16]](function(_0x6f0fx20){var _0x6f0fx21=[];_0x6f0fx20=_[_0x717a[56]](_0x6f0fx20,_0x717a[32]);_0x6f0fx1d[_0x717a[76]](function(_0x6f0fx22){_0x6f0fx22[_0x717a[65]]=_0x6f0fx12[_0x717a[36]];if(_0x6f0fx22[_0x717a[66]]){var _0x6f0fx23=_[_0x717a[67]](_0x6f0fx20,{id:_0x6f0fx22[_0x717a[66]]});if(_0x6f0fx23){_0x6f0fx22[_0x717a[68]]=_0x6f0fx23[_0x717a[69]];_0x6f0fx21[_0x717a[70]](ReportField[_0x717a[49]](_0x6f0fx22,{transaction:_0x6f0fx18}))}else {throw  new Error(_0x717a[71]+_0x6f0fx22[_0x717a[66]]+_0x717a[72])}}else {if(_[_0x717a[73]](_0x6f0fx1f,_0x6f0fx22[_0x717a[68]])){_0x6f0fx21[_0x717a[70]](ReportField[_0x717a[49]](_0x6f0fx22,{transaction:_0x6f0fx18}))}else {throw  new Error(_0x717a[74]+_0x6f0fx22[_0x717a[68]]+_0x717a[75])}}});return _0x6f0fx21})[_0x717a[64]]()}else {throw  new Error(_0x717a[80])}}}}function getTable(_0x6f0fx26){var _0x6f0fx1e;switch(_0x6f0fx26){case _0x717a[83]:_0x6f0fx1e=require(_0x717a[4])[_0x717a[82]][_0x717a[81]];break;case _0x717a[85]:_0x6f0fx1e=require(_0x717a[4])[_0x717a[82]][_0x717a[84]];break;case _0x717a[87]:_0x6f0fx1e=require(_0x717a[4])[_0x717a[82]][_0x717a[86]];break;case _0x717a[89]:_0x6f0fx1e=require(_0x717a[4])[_0x717a[82]][_0x717a[88]];break;default:};return _0x6f0fx1e}exports[_0x717a[60]]=function(_0x6f0fxb,_0x6f0fxc){CustomReport[_0x717a[37]](_0x6f0fxb[_0x717a[18]][_0x717a[36]])[_0x717a[16]](function(_0x6f0fx12){if(!_0x6f0fx12){return _0x6f0fxc[_0x717a[31]](404)};_0x6f0fx12[_0x717a[60]]()[_0x717a[16]](function(){return _0x6f0fxc[_0x717a[31]](204)})[_0x717a[13]](function(_0x6f0fxe){return handleError(_0x6f0fxc,_0x6f0fxe)})})[_0x717a[13]](function(_0x6f0fxe){return handleError(_0x6f0fxc,_0x6f0fxe)})};exports[_0x717a[90]]=function(_0x6f0fxb,_0x6f0fxc){CustomReport[_0x717a[60]]({where:{id:_0x6f0fxb[_0x717a[17]][_0x717a[91]]},individualHooks:true})[_0x717a[16]](function(){return _0x6f0fxc[_0x717a[31]](204)})[_0x717a[13]](function(_0x6f0fxe){return handleError(_0x6f0fxc,_0x6f0fxe)})};function handleError(_0x6f0fxc,_0x6f0fxe){return _0x6f0fxc[_0x717a[15]](500)[_0x717a[14]](_0x6f0fxe)}
\ No newline at end of file
+var _0x6d6e=["\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","\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","\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","\x74\x72\x65\x65","\x70\x61\x72\x73\x65","\x70\x61\x72\x65\x6E\x74","\x66\x69\x6E\x64","\x6E\x61\x6D\x65","\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","\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","\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","\x67\x65\x74\x54\x61\x62\x6C\x65","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64","\x4D\x65\x74\x72\x69\x63\x49\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","\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","\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","\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64","\x68\x61\x73","\x65\x76\x65\x72\x79","\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63","\x55\x6E\x73\x75\x70\x70\x6F\x72\x74\x65\x64\x20\x49\x6D\x70\x6F\x72\x74\x20\x66\x6F\x72\x6D\x61\x74\x20\x28\x4D\x65\x74\x72\x69\x63\x20\x74\x79\x70\x65\x20\x69\x6E\x20\x72\x65\x70\x6F\x72\x74\x20\x66\x69\x65\x6C\x64\x73\x20\x69\x73\x20\x6D\x69\x73\x73\x69\x6E\x67\x29","\x49\x64","\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","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x6d6e[0];var _=require(_0x6d6e[1]);var util=require(_0x6d6e[2]);var sequelize=require(_0x6d6e[4])[_0x6d6e[3]];var CustomReport=require(_0x6d6e[4])[_0x6d6e[5]];var ReportField=require(_0x6d6e[4])[_0x6d6e[6]];var Metric=require(_0x6d6e[4])[_0x6d6e[7]];var ExtractedReport=require(_0x6d6e[4])[_0x6d6e[8]];var extractUtils=require(_0x6d6e[9]);var reportBuildUtils=require(_0x6d6e[10]);var Util=require(_0x6d6e[11]);var sr=require(_0x6d6e[12]);var moment=require(_0x6d6e[13]);var cp=require(_0x6d6e[14]);var ReportTree=require(_0x6d6e[4])[_0x6d6e[15]];exports[_0x6d6e[16]]= function(_0x8254xf,_0x8254x10,_0x8254x11){return CustomReport[_0x6d6e[23]](Util[_0x6d6e[22]](_0x8254xf[_0x6d6e[21]]))[_0x6d6e[20]](function(_0x8254x13){_0x8254x10[_0x6d6e[19]](200)[_0x6d6e[18]](_0x8254x13)})[_0x6d6e[17]](function(_0x8254x12){return handleError(_0x8254x10,_0x8254x12)})};exports[_0x6d6e[24]]= function(_0x8254xf,_0x8254x10){return Promise[_0x6d6e[27]]([])[_0x6d6e[20]](getQuery(_0x8254xf,_0x8254x10))[_0x6d6e[20]](function(_0x8254x14){_0x8254x10[_0x6d6e[19]](200)[_0x6d6e[18]]({query:_0x8254x14})})[_0x6d6e[17]](function(_0x8254x12){console[_0x6d6e[26]](_0x6d6e[25],_0x8254x12)})};function getQuery(_0x8254xf,_0x8254x10){var _0x8254x16;return function(){return CustomReport[_0x6d6e[49]](_0x6d6e[48])[_0x6d6e[47]](_0x8254xf[_0x6d6e[46]][_0x6d6e[45]])[_0x6d6e[20]](function(_0x8254x18){console[_0x6d6e[26]](_0x6d6e[32]);if(!_0x8254x18){return _0x8254x10[_0x6d6e[33]](404)};if(_0x8254xf[_0x6d6e[21]][_0x6d6e[34]]&& _0x8254xf[_0x6d6e[21]][_0x6d6e[34]]=== _0x6d6e[35]){_0x8254xf[_0x6d6e[21]][_0x6d6e[36]]= moment()[_0x6d6e[38]](_0x6d6e[37]);_0x8254xf[_0x6d6e[21]][_0x6d6e[39]]= moment()[_0x6d6e[38]](_0x6d6e[37]);_0x8254x18[_0x6d6e[41]][_0x6d6e[40]]= _0x8254x18[_0x6d6e[41]][_0x6d6e[40]][_0x6d6e[44]](_0x6d6e[42],_0x6d6e[43])};delete _0x8254xf[_0x6d6e[21]][_0x6d6e[34]];_0x8254x16= _0x8254x18[_0x6d6e[41]];return _0x8254x16[_0x6d6e[40]]})[_0x6d6e[20]](reportBuildUtils[_0x6d6e[31]](_0x8254xf[_0x6d6e[30]]))[_0x6d6e[20]](function(_0x8254x17){return [_0x8254x17,_0x8254x16]})[_0x6d6e[29]](reportBuildUtils[_0x6d6e[28]](_0x8254xf[_0x6d6e[21]]))}}exports[_0x6d6e[50]]= function(_0x8254xf,_0x8254x10){var _0x8254x19;return Promise[_0x6d6e[27]]([])[_0x6d6e[20]](getQuery(_0x8254xf,_0x8254x10))[_0x6d6e[20]](function(_0x8254x14){return _0x8254x14?sequelize[_0x6d6e[21]](_0x8254x14,{type:sequelize[_0x6d6e[61]][_0x6d6e[60]]}):[]})[_0x6d6e[20]](function(_0x8254x1a){_0x8254x19= _0x8254x1a[_0x6d6e[51]];if(_0x8254xf[_0x6d6e[21]][_0x6d6e[52]]){_0x8254x1a= _(_0x8254x1a)[_0x6d6e[56]](_0x8254xf[_0x6d6e[21]][_0x6d6e[55]]|| 0)[_0x6d6e[54]](_0x8254xf[_0x6d6e[21]][_0x6d6e[52]])[_0x6d6e[53]]()};_[_0x6d6e[59]](_0x8254x1a,function(_0x8254x1b){_[_0x6d6e[58]](_0x8254x1b,function(_0x8254x1c,_0x8254x1d){if(_0x8254x1c instanceof  Date){_0x8254x1b[_0x8254x1d]= moment(_0x8254x1c)[_0x6d6e[38]](_0x6d6e[57]).toString()}})});_0x8254x10[_0x6d6e[19]](200)[_0x6d6e[18]]({rows:_0x8254x1a,count:_0x8254x19})})[_0x6d6e[17]](function(_0x8254x12){console[_0x6d6e[26]](_0x8254x12);return handleError(_0x8254x10,_0x8254x12)})};exports[_0x6d6e[62]]= function(_0x8254xf,_0x8254x10){docExtract(_0x8254xf,_0x8254x10,_0x6d6e[63])};exports[_0x6d6e[64]]= function(_0x8254xf,_0x8254x10){docExtract(_0x8254xf,_0x8254x10,_0x6d6e[65])};function docExtract(_0x8254xf,_0x8254x10,_0x8254x1f){var _0x8254x18;CustomReport[_0x6d6e[49]](_0x6d6e[48])[_0x6d6e[47]](_0x8254xf[_0x6d6e[46]][_0x6d6e[45]])[_0x6d6e[20]](function(_0x8254x16){if(!_0x8254x16){return _0x8254x10[_0x6d6e[33]](404)};_0x8254x18= _0x8254x16;return ReportTree[_0x6d6e[47]](2)})[_0x6d6e[20]](function(_0x8254x23){_0x8254x23= JSON[_0x6d6e[77]](_0x8254x23[_0x6d6e[76]]);var _0x8254x24=_[_0x6d6e[79]](_0x8254x23,{id:_0x8254x18[_0x6d6e[78]]});var _0x8254x25=getReportPath(_0x8254x24,_0x8254x23,_0x8254x18[_0x6d6e[80]]);if(_0x8254xf[_0x6d6e[21]][_0x6d6e[34]]&& _0x8254xf[_0x6d6e[21]][_0x6d6e[34]]=== _0x6d6e[35]){_0x8254xf[_0x6d6e[21]][_0x6d6e[36]]= moment()[_0x6d6e[38]](_0x6d6e[37]);_0x8254xf[_0x6d6e[21]][_0x6d6e[39]]= moment()[_0x6d6e[38]](_0x6d6e[37]);_0x8254x18[_0x6d6e[41]][_0x6d6e[40]]= _0x8254x18[_0x6d6e[41]][_0x6d6e[40]][_0x6d6e[44]](_0x6d6e[42],_0x6d6e[43])};delete _0x8254xf[_0x6d6e[21]][_0x6d6e[34]];return [_0x8254x18,ExtractedReport[_0x6d6e[86]]({name:_0x8254x25,startDate:_0x8254xf[_0x6d6e[21]][_0x6d6e[36]]?_0x8254xf[_0x6d6e[21]][_0x6d6e[36]]+ (_0x8254xf[_0x6d6e[21]][_0x6d6e[81]]?_0x6d6e[82]+ _0x8254xf[_0x6d6e[21]][_0x6d6e[81]]:_0x6d6e[83]):null,endDate:_0x8254xf[_0x6d6e[21]][_0x6d6e[39]]?_0x8254xf[_0x6d6e[21]][_0x6d6e[39]]+ (_0x8254xf[_0x6d6e[21]][_0x6d6e[84]]?_0x6d6e[82]+ _0x8254xf[_0x6d6e[21]][_0x6d6e[84]]:_0x6d6e[85]):null,output:_0x8254x1f,UserId:_0x8254xf[_0x6d6e[30]][_0x6d6e[45]]})]})[_0x6d6e[29]](function(_0x8254x18,_0x8254x20){var _0x8254x21=cp[_0x6d6e[67]](__dirname+ _0x6d6e[66]);_0x8254x21[_0x6d6e[70]](_0x6d6e[73],function(_0x8254x22){console[_0x6d6e[26]](_0x6d6e[74],_0x8254x22);_0x8254x21[_0x6d6e[75]]()})[_0x6d6e[70]](_0x6d6e[71],function(){console[_0x6d6e[26]](_0x6d6e[72])})[_0x6d6e[70]](_0x6d6e[68],function(_0x8254x12){console[_0x6d6e[26]](_0x6d6e[69],_0x8254x12)});_0x8254x21[_0x6d6e[18]]({report:_0x8254x18,query:_0x8254xf[_0x6d6e[21]],extractedId:_0x8254x20[_0x6d6e[45]],user:_0x8254xf[_0x6d6e[30]],type:_0x8254x1f})})[_0x6d6e[17]](function(_0x8254x12){console[_0x6d6e[26]](_0x8254x12);return handleError(_0x8254x10,_0x8254x12)});return _0x8254x10[_0x6d6e[33]](200)}function getReportPath(_0x8254x24,_0x8254x23,_0x8254x25){_0x8254x25= _0x8254x24[_0x6d6e[87]]+ _0x6d6e[88]+ _0x8254x25;if(_0x8254x24[_0x6d6e[78]]=== _0x6d6e[89]){return _0x8254x25}else {return getReportPath(_[_0x6d6e[79]](_0x8254x23,{id:_0x8254x24[_0x6d6e[78]]}),_0x8254x23,_0x8254x25)}}exports[_0x6d6e[90]]= function(_0x8254xf,_0x8254x10){return CustomReport[_0x6d6e[49]](_0x6d6e[48])[_0x6d6e[47]](_0x8254xf[_0x6d6e[46]][_0x6d6e[45]])[_0x6d6e[20]](function(_0x8254x18){if(!_0x8254x18){return _0x8254x10[_0x6d6e[33]](404)};return _0x8254x10[_0x6d6e[18]](_0x8254x18)})[_0x6d6e[17]](function(_0x8254x12){return handleError(_0x8254x10,_0x8254x12)})};exports[_0x6d6e[91]]= function(_0x8254xf,_0x8254x10){return CustomReport[_0x6d6e[49]]({method:[_0x6d6e[94],{CustomReportId:_0x8254xf[_0x6d6e[46]][_0x6d6e[45]]}]})[_0x6d6e[47]](_0x8254xf[_0x6d6e[46]][_0x6d6e[45]],{attributes:[_0x6d6e[92],_0x6d6e[93],_0x6d6e[80],_0x6d6e[78],_0x6d6e[40]]})[_0x6d6e[20]](function(_0x8254x18){if(!_0x8254x18){return _0x8254x10[_0x6d6e[33]](404)};return _0x8254x10[_0x6d6e[18]](_0x8254x18)})[_0x6d6e[17]](function(_0x8254x12){return handleError(_0x8254x10,_0x8254x12)})};exports[_0x6d6e[95]]= function(_0x8254xf,_0x8254x10){var _0x8254x27;return sequelize[_0x6d6e[100]](function(_0x8254x28){return CustomReport[_0x6d6e[49]](_0x6d6e[48])[_0x6d6e[47]](_0x8254xf[_0x6d6e[46]][_0x6d6e[45]])[_0x6d6e[20]](function(_0x8254x18){if(!_0x8254x18){return _0x8254x10[_0x6d6e[33]](404)};var _0x8254x29=_0x8254x18[_0x6d6e[41]];delete _0x8254x29[_0x6d6e[45]];delete _0x8254x29[_0x6d6e[96]];delete _0x8254x29[_0x6d6e[97]];_0x8254x29[_0x6d6e[78]]= _0x8254xf[_0x6d6e[98]][_0x6d6e[78]];_0x8254x27= _[_0x6d6e[99]](_0x8254x29.Fields,_0x6d6e[41]);return CustomReport[_0x6d6e[86]](_0x8254x29,{transaction:_0x8254x28})})[_0x6d6e[20]](function(_0x8254x18){return [_0x8254x18,_0x8254x27]})[_0x6d6e[29]](createFields(_0x8254x28))})[_0x6d6e[20]](function(){return _0x8254x10[_0x6d6e[33]](201)})[_0x6d6e[17]](function(_0x8254x12){console[_0x6d6e[26]](_0x8254x12);return handleError(_0x8254x10,_0x8254x12)})};exports[_0x6d6e[86]]= function(_0x8254xf,_0x8254x10){var _0x8254x16;return sequelize[_0x6d6e[100]](function(_0x8254x28){return CustomReport[_0x6d6e[86]](_0x8254xf[_0x6d6e[98]],{transaction:_0x8254x28})[_0x6d6e[20]](function(_0x8254x18){_0x8254x16= _0x8254x18;return [_0x8254x16,_0x8254xf[_0x6d6e[98]][_0x6d6e[101]]]})[_0x6d6e[29]](createFields(_0x8254x28))})[_0x6d6e[20]](function(){return _0x8254x10[_0x6d6e[19]](201)[_0x6d6e[18]](_0x8254x16)})[_0x6d6e[17]](function(_0x8254x12){console[_0x6d6e[26]](_0x8254x12);return handleError(_0x8254x10,_0x8254x12)})};exports[_0x6d6e[102]]= function(_0x8254xf,_0x8254x10){var _0x8254x16;return sequelize[_0x6d6e[100]](function(_0x8254x28){return CustomReport[_0x6d6e[86]](_0x8254xf[_0x6d6e[98]],{transaction:_0x8254x28})[_0x6d6e[20]](function(_0x8254x18){_0x8254x16= _0x8254x18;return [_0x8254x16,_0x8254xf[_0x6d6e[98]][_0x6d6e[101]]]})[_0x6d6e[29]](createImportFields(_0x8254x28))})[_0x6d6e[20]](function(){return _0x8254x10[_0x6d6e[19]](201)[_0x6d6e[18]](_0x8254x16)})[_0x6d6e[17]](function(_0x8254x12){console[_0x6d6e[26]](_0x8254x12);return handleError(_0x8254x10,_0x8254x12)})};exports[_0x6d6e[103]]= function(_0x8254xf,_0x8254x10,_0x8254x11){if(_0x8254xf[_0x6d6e[98]][_0x6d6e[45]]){delete _0x8254xf[_0x6d6e[98]][_0x6d6e[45]]};var _0x8254x16;return sequelize[_0x6d6e[100]](function(_0x8254x28){return CustomReport[_0x6d6e[47]](_0x8254xf[_0x6d6e[46]][_0x6d6e[45]])[_0x6d6e[20]](function(_0x8254x18){if(!_0x8254x18){return _0x8254x10[_0x6d6e[33]](404)};var _0x8254x2a=_[_0x6d6e[105]](_0x8254x18,_0x8254xf[_0x6d6e[98]]);return _0x8254x18[_0x6d6e[106]]({transaction:_0x8254x28})})[_0x6d6e[20]](function(_0x8254x18){_0x8254x16= _0x8254x18;if(_0x8254xf[_0x6d6e[98]][_0x6d6e[101]]){return ReportField[_0x6d6e[104]]({where:{CustomReportId:_0x8254xf[_0x6d6e[46]][_0x6d6e[45]]},transaction:_0x8254x28})}})[_0x6d6e[20]](function(){return [_0x8254x16,_0x8254xf[_0x6d6e[98]][_0x6d6e[101]]]})[_0x6d6e[29]](createFields(_0x8254x28))})[_0x6d6e[20]](function(){return _0x8254x10[_0x6d6e[33]](200)})[_0x6d6e[17]](function(_0x8254x12){console[_0x6d6e[26]](_0x8254x12);return handleError(_0x8254x10,_0x8254x12)})};function createFields(_0x8254x28){return function(_0x8254x18,_0x8254x2c){if(_0x8254x2c&& Array[_0x6d6e[107]](_0x8254x2c)&& _0x8254x2c[_0x6d6e[51]]){var _0x8254x2d=reportBuildUtils[_0x6d6e[108]](_0x8254x18[_0x6d6e[40]]);if(_0x8254x2d){var _0x8254x2e;return _0x8254x2d[_0x6d6e[122]]()[_0x6d6e[20]](function(_0x8254x33){_0x8254x2e= _[_0x6d6e[120]](_0x8254x33);return Metric[_0x6d6e[121]]()})[_0x6d6e[20]](function(_0x8254x2f){var _0x8254x30=[];_0x8254x2f= _[_0x6d6e[99]](_0x8254x2f,_0x6d6e[41]);_0x8254x2c[_0x6d6e[59]](function(_0x8254x31){_0x8254x31[_0x6d6e[109]]= _0x8254x18[_0x6d6e[45]];if(_0x8254x31[_0x6d6e[110]]){var _0x8254x32=_[_0x6d6e[79]](_0x8254x2f,{id:_0x8254x31[_0x6d6e[110]]});if(_0x8254x32){_0x8254x31[_0x6d6e[111]]= _0x8254x32[_0x6d6e[112]];_0x8254x30[_0x6d6e[113]](ReportField[_0x6d6e[86]](_0x8254x31,{transaction:_0x8254x28}))}else {throw  new sequelize.Error(_0x6d6e[114]+ _0x8254x31[_0x6d6e[110]]+ _0x6d6e[115])}}else {if(_[_0x6d6e[116]](_0x8254x2e,_0x8254x31[_0x6d6e[111]])|| _0x8254x31[_0x6d6e[117]]){_0x8254x30[_0x6d6e[113]](ReportField[_0x6d6e[86]](_0x8254x31,{transaction:_0x8254x28}))}else {throw  new sequelize.Error(_0x6d6e[118]+ _0x8254x31[_0x6d6e[111]]+ _0x6d6e[119])}}});return _0x8254x30})[_0x6d6e[27]]()}else {throw  new sequelize.Error(_0x6d6e[123])}}}}function createImportFields(_0x8254x28){return function(_0x8254x18,_0x8254x2c){if(_0x8254x2c&& Array[_0x6d6e[107]](_0x8254x2c)&& _0x8254x2c[_0x6d6e[51]]){var _0x8254x2d=reportBuildUtils[_0x6d6e[108]](_0x8254x18[_0x6d6e[40]]);if(_0x8254x2d){var _0x8254x2e;return _0x8254x2d[_0x6d6e[122]]()[_0x6d6e[20]](function(_0x8254x33){_0x8254x2e= _[_0x6d6e[120]](_0x8254x33);var _0x8254x30=[];var _0x8254x35;if(_[_0x6d6e[126]](_0x8254x2c,function(_0x8254x31){return _[_0x6d6e[125]](_0x8254x31,_0x6d6e[124])})){_0x8254x35= _0x6d6e[127]}else {if(_[_0x6d6e[126]](_0x8254x2c,function(_0x8254x31){return _[_0x6d6e[125]](_0x8254x31,_0x6d6e[110])})){_0x8254x35= _0x6d6e[7]}else {throw  new sequelize.Error(_0x6d6e[128])}};var _0x8254x36=_[_0x6d6e[130]](_0x8254x2c,_0x8254x35+ _0x6d6e[129]);_[_0x6d6e[58]](_0x8254x36,function(_0x8254x37,_0x8254x1d){if(_0x8254x1d!== _0x6d6e[131]&& _0x8254x1d!== _0x6d6e[132]){_0x8254x37[0][_0x8254x35][_0x6d6e[133]][_0x6d6e[59]](function(_0x8254x31){_0x8254x31[_0x6d6e[109]]= _0x8254x18[_0x6d6e[45]]});_0x8254x37[0][_0x8254x35][_0x6d6e[80]]+= _0x6d6e[134]+ sr({length:5});_0x8254x30[_0x6d6e[113]](Metric[_0x6d6e[86]](_0x8254x37[0][_0x8254x35],{include:[{model:ReportField,as:_0x6d6e[133]}],transaction:_0x8254x28}))}else {_0x8254x37[_0x6d6e[59]](function(_0x8254x31){if(_[_0x6d6e[116]](_0x8254x2e,_0x8254x31[_0x6d6e[111]])|| _0x8254x31[_0x6d6e[117]]){_0x8254x31[_0x6d6e[109]]= _0x8254x18[_0x6d6e[45]];_0x8254x30[_0x6d6e[113]](ReportField[_0x6d6e[86]](_0x8254x31,{transaction:_0x8254x28}))}else {throw  new sequelize.Error(_0x6d6e[118]+ _0x8254x31[_0x6d6e[111]]+ _0x6d6e[119])}})}});return _0x8254x30})[_0x6d6e[27]]()}else {throw  new sequelize.Error(_0x6d6e[123])}}}}exports[_0x6d6e[104]]= function(_0x8254xf,_0x8254x10){return CustomReport[_0x6d6e[47]](_0x8254xf[_0x6d6e[46]][_0x6d6e[45]])[_0x6d6e[20]](function(_0x8254x18){if(!_0x8254x18){return _0x8254x10[_0x6d6e[33]](404)};return _0x8254x18[_0x6d6e[104]]()})[_0x6d6e[20]](function(){return _0x8254x10[_0x6d6e[33]](204)})[_0x6d6e[17]](function(_0x8254x12){return handleError(_0x8254x10,_0x8254x12)})};exports[_0x6d6e[135]]= function(_0x8254xf,_0x8254x10){return CustomReport[_0x6d6e[104]]({where:{id:_0x8254xf[_0x6d6e[21]][_0x6d6e[136]]},individualHooks:true})[_0x6d6e[20]](function(){return _0x8254x10[_0x6d6e[33]](204)})[_0x6d6e[17]](function(_0x8254x12){return handleError(_0x8254x10,_0x8254x12)})};function handleError(_0x8254x10,_0x8254x12){return _0x8254x10[_0x6d6e[19]](500)[_0x6d6e[18]](_0x8254x12)}
\ No newline at end of file