Built motion from commit 8d1370ff4.|1.0.34
[motion.git] / server / utils / report_extraction.js
index b90926d..3e7f55f 100644 (file)
@@ -1 +1 @@
-var _0xa863=["\x74\x6F\x2D\x63\x73\x76","\x70\x64\x66\x6D\x61\x6B\x65","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x73","\x6D\x6F\x6D\x65\x6E\x74","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x70\x61\x74\x68","\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x62\x75\x69\x6C\x64","\x66\x6F\x6E\x74\x73","\x52\x6F\x62\x6F\x74\x6F\x2D\x52\x65\x67\x75\x6C\x61\x72\x2E\x74\x74\x66","\x6A\x6F\x69\x6E","\x52\x6F\x62\x6F\x74\x6F\x2D\x4D\x65\x64\x69\x75\x6D\x2E\x74\x74\x66","\x52\x6F\x62\x6F\x74\x6F\x2D\x49\x74\x61\x6C\x69\x63\x2E\x74\x74\x66","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x70\x6F\x72\x74","\x71\x75\x65\x72\x79","\x65\x78\x74\x72\x61\x63\x74\x65\x64\x49\x64","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x74\x79\x70\x65","\x75\x73\x65\x72","\x6F\x6E","\x6C\x6F\x67","\x71\x75\x65\x72\x79\x20\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x6C\x65\x6E\x67\x74\x68","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x66\x6F\x72\x4F\x77\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x70\x64\x66","\x63\x73\x76","\x65\x6D\x70\x74\x79","\x71\x75\x65\x72\x79\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x20\x65\x72\x72\x6F\x72","\x74\x68\x65\x6E","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x62\x75\x69\x6C\x64\x51\x75\x65\x72\x79","\x73\x70\x72\x65\x61\x64","\x62\x75\x69\x6C\x64\x46\x69\x6C\x74\x65\x72","\x74\x61\x62\x6C\x65","\x61\x6C\x6C","\x72\x65\x70\x6F\x72\x74\x5F","\x6E\x61\x6D\x65","\x5F","\x2E\x70\x64\x66","\x61\x6C\x69\x61\x73","\x74\x61\x62\x6C\x65\x48\x65\x61\x64\x65\x72","\x70\x75\x73\x68","","\x6C\x61\x6E\x64\x73\x63\x61\x70\x65","\x68\x65\x61\x64\x65\x72","\x73\x74\x61\x72\x74\x44\x61\x74\x65","\x4D\x4D\x2D\x44\x44\x2D\x59\x59\x59\x59\x20\x48\x48\x3A\x6D\x6D","\x20\x2D\x20","\x65\x6E\x64\x44\x61\x74\x65","\x74\x61\x62\x6C\x65\x45\x78\x61\x6D\x70\x6C\x65","\x62\x6C\x61\x63\x6B","\x63\x72\x65\x61\x74\x65\x50\x64\x66\x4B\x69\x74\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x72\x65\x70\x6F\x72\x74\x73","\x63\x72\x65\x61\x74\x65\x57\x72\x69\x74\x65\x53\x74\x72\x65\x61\x6D","\x65\x72\x72\x6F\x72","\x70\x64\x66\x20\x77\x72\x69\x74\x65\x20\x65\x72\x72\x6F\x72","\x66\x69\x6E\x69\x73\x68","\x63\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x70\x69\x70\x65","\x65\x6E\x64","\x70\x64\x66\x20\x63\x72\x65\x61\x74\x69\x6F\x6E\x20\x65\x72\x72\x6F\x72","\x2E\x63\x73\x76","\x63\x73\x76\x20\x77\x72\x69\x74\x65\x20\x65\x72\x72\x6F\x72","\x77\x72\x69\x74\x65\x46\x69\x6C\x65","\x63\x73\x76\x20\x63\x72\x65\x61\x74\x69\x6F\x6E\x20\x65\x72\x72\x6F\x72","\x66\x69\x6E\x69\x73\x68\x65\x64","\x73\x65\x6E\x64","\x66\x69\x6E\x61\x6C\x6C\x79","\x2D\x2D\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6E\x67\x20\x72\x65\x70\x6F\x72\x74\x20\x77\x69\x74\x68\x20\x65\x72\x72\x6F\x72\x20\x3A\x20","\x2D\x2D\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6E\x67\x20\x72\x65\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65"];var csv=require(_0xa863[0]);var pdfMake=require(_0xa863[1]);var _=require(_0xa863[2]);var util=require(_0xa863[3]);var ExtractedReport=require(_0xa863[5])[_0xa863[4]];var sequelize=require(_0xa863[5])[_0xa863[6]];var fs=require(_0xa863[7]);var moment=require(_0xa863[8]);var sr=require(_0xa863[9]);var path=require(_0xa863[10]);var config=require(_0xa863[11]);var Promise=require(_0xa863[12]);var reportBuildUtils=require(_0xa863[13]);var fonts={Roboto:{normal:path[_0xa863[16]](config[_0xa863[14]],_0xa863[15]),bold:path[_0xa863[16]](config[_0xa863[14]],_0xa863[17]),italics:path[_0xa863[16]](config[_0xa863[14]],_0xa863[18]),bolditalics:path[_0xa863[16]](config[_0xa863[14]],_0xa863[18])}};process[_0xa863[26]](_0xa863[19],function(_0xb1e9xf){general(_0xb1e9xf[_0xa863[20]],_0xb1e9xf[_0xa863[21]],_0xb1e9xf[_0xa863[22]],_0xb1e9xf[_0xa863[24]][_0xa863[23]](),_0xb1e9xf[_0xa863[25]])});function general(_0xb1e9x11,_0xb1e9x12,_0xb1e9x13,_0xb1e9x14,_0xb1e9x15){extract(_0xb1e9x11,_0xb1e9x12,_0xb1e9x13,_0xb1e9x14,_0xb1e9x15)}function extract(_0xb1e9x11,_0xb1e9x17,_0xb1e9x13,_0xb1e9x14,_0xb1e9x15){return Promise[_0xa863[46]]([])[_0xa863[39]](function(){return _0xb1e9x11[_0xa863[45]]})[_0xa863[39]](reportBuildUtils[_0xa863[44]](_0xb1e9x15))[_0xa863[39]](function(_0xb1e9x1d){return [_0xb1e9x1d,_0xb1e9x11]})[_0xa863[43]](reportBuildUtils[_0xa863[42]](_0xb1e9x17))[_0xa863[39]](function(_0xb1e9x12){return _0xb1e9x12?sequelize[_0xa863[21]](_0xb1e9x12,{type:sequelize[_0xa863[41]][_0xa863[40]]}):[]})[_0xa863[39]](function(_0xb1e9x19){if(_0xb1e9x19){if(_0xb1e9x19[_0xa863[30]]){_[_0xa863[34]](_0xb1e9x19,function(_0xb1e9x1a){_[_0xa863[33]](_0xb1e9x1a,function(_0xb1e9x1b,_0xb1e9x1c){if(_0xb1e9x1b instanceof Date){_0xb1e9x1a[_0xb1e9x1c]=moment(_0xb1e9x1b)[_0xa863[32]](_0xa863[31]).toString()}})});switch(_0xb1e9x14){case _0xa863[35]:createPdf(_0xb1e9x19,_0xb1e9x11,_0xb1e9x17,_0xb1e9x13);break;case _0xa863[36]:createCsv(_0xb1e9x19,_0xb1e9x11,_0xb1e9x17,_0xb1e9x13);break;default:createCsv(_0xb1e9x19,_0xb1e9x11,_0xb1e9x17,_0xb1e9x13)}}else {updateExtracted(_0xb1e9x13,null,_0xa863[37])}}else {updateExtracted(_0xb1e9x13,null,_0xa863[38])}})[_0xa863[29]](function(_0xb1e9x18){console[_0xa863[27]](_0xb1e9x18);updateExtracted(_0xb1e9x13,null,_0xa863[28])})}function createPdf(_0xb1e9x19,_0xb1e9x11,_0xb1e9x17,_0xb1e9x1f){var _0xb1e9x20=sr({length:20,prefix:_0xa863[47]+_0xb1e9x11[_0xa863[48]]+_0xa863[49],suffix:_0xa863[50]});var _0xb1e9x21=[],_0xb1e9x22=0;_[_0xa863[34]](_0xb1e9x11.Fields,function(_0xb1e9x23){_0xb1e9x21[_0xa863[53]]({text:String(_0xb1e9x23[_0xa863[51]]),style:_0xa863[52]});_0xb1e9x22++});var _0xb1e9x24=[_0xb1e9x21];_[_0xa863[34]](_0xb1e9x19,function(_0xb1e9x23){var _0xb1e9x1a=[];_[_0xa863[33]](_0xb1e9x23,function(_0xb1e9x25,_0xb1e9x1c){_0xb1e9x1a[_0xa863[53]](_0xb1e9x25?String(_0xb1e9x25):_0xa863[54])});_0xb1e9x24[_0xa863[53]](_0xb1e9x1a)});var _0xb1e9x26={pageOrientation:_0xa863[55],content:[{text:_0xb1e9x11[_0xa863[48]],style:_0xa863[56]},_0xb1e9x17[_0xa863[57]]?moment(_0xb1e9x17[_0xa863[57]])[_0xa863[32]](_0xa863[58]).toString():_0xa863[54]+_0xa863[59]+_0xb1e9x17[_0xa863[60]]?moment(_0xb1e9x17[_0xa863[60]])[_0xa863[32]](_0xa863[58]).toString():_0xa863[54],{style:_0xa863[61],table:{headerRows:1,body:_0xb1e9x24}}],styles:{header:{fontSize:18,bold:true,margin:[0,0,0,10]},tableExample:{margin:[0,5,0,15]},tableHeader:{bold:true,fontSize:13,color:_0xa863[62]}}};var _0xb1e9x27= new pdfMake(fonts);var _0xb1e9x28=_0xb1e9x27[_0xa863[63]](_0xb1e9x26);if(_0xb1e9x28){var _0xb1e9x29=fs[_0xa863[65]](config[_0xa863[64]]+_0xb1e9x20);_0xb1e9x29[_0xa863[26]](_0xa863[66],function(){updateExtracted(_0xb1e9x1f,null,_0xa863[67])});_0xb1e9x29[_0xa863[26]](_0xa863[68],function(){updateExtracted(_0xb1e9x1f,_0xb1e9x20,_0xa863[69])});_0xb1e9x28[_0xa863[70]](_0xb1e9x29);_0xb1e9x28[_0xa863[71]]()}else {updateExtracted(_0xb1e9x1f,null,_0xa863[72])}}function createCsv(_0xb1e9x19,_0xb1e9x11,_0xb1e9x17,_0xb1e9x1f){var _0xb1e9x20=sr({length:20,prefix:_0xa863[47]+_0xb1e9x11[_0xa863[48]]+_0xa863[49],suffix:_0xa863[73]});var _0xb1e9x2b=csv(_0xb1e9x19);if(_0xb1e9x2b){fs[_0xa863[75]](config[_0xa863[64]]+_0xb1e9x20,_0xb1e9x2b,function(_0xb1e9x18){if(_0xb1e9x18){console[_0xa863[27]](_0xb1e9x18);updateExtracted(_0xb1e9x1f,null,_0xa863[74])}else {updateExtracted(_0xb1e9x1f,_0xb1e9x20,_0xa863[69])}})}else {updateExtracted(_0xb1e9x1f,null,_0xa863[76])}}function updateExtracted(_0xb1e9x1f,_0xb1e9x20,_0xb1e9x2d){return ExtractedReport[_0xa863[82]]({status:_0xb1e9x2d,savename:_0xb1e9x20},{where:{id:_0xb1e9x1f}})[_0xa863[39]](function(){console[_0xa863[27]](_0xa863[81])})[_0xa863[29]](function(_0xb1e9x18){console[_0xa863[27]](_0xa863[80]+_0xb1e9x18)})[_0xa863[79]](function(){process[_0xa863[78]]({message:_0xa863[77],status:_0xb1e9x2d})})}
\ No newline at end of file
+var _0x2799=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x74\x6F\x2D\x63\x73\x76","\x70\x64\x66\x6D\x61\x6B\x65","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4C\x69\x63\x65\x6E\x73\x65","\x53\x65\x74\x74\x69\x6E\x67","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x73","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x65\x6E\x63\x6F\x64\x65","\x66\x69\x6C\x65\x2D\x62\x61\x73\x65\x36\x34","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x70\x61\x74\x68","\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x62\x75\x69\x6C\x64","\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x66\x6F\x6E\x74\x73","\x52\x6F\x62\x6F\x74\x6F\x2D\x52\x65\x67\x75\x6C\x61\x72\x2E\x74\x74\x66","\x6A\x6F\x69\x6E","\x52\x6F\x62\x6F\x74\x6F\x2D\x4D\x65\x64\x69\x75\x6D\x2E\x74\x74\x66","\x52\x6F\x62\x6F\x74\x6F\x2D\x49\x74\x61\x6C\x69\x63\x2E\x74\x74\x66","\x6D\x65\x73\x73\x61\x67\x65","\x73\x74\x69\x63\x6B\x79\x3A\x62\x61\x6C\x61\x6E\x63\x65","\x72\x65\x70\x6F\x72\x74","\x71\x75\x65\x72\x79","\x65\x78\x74\x72\x61\x63\x74\x65\x64\x49\x64","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x74\x79\x70\x65","\x75\x73\x65\x72","\x6F\x6E","\x6C\x6F\x67","\x71\x75\x65\x72\x79\x20\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x66\x6F\x72\x4F\x77\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x6C\x69\x63\x65\x6E\x73\x65","\x64\x61\x74\x61\x31","\x64\x65\x63\x72\x79\x70\x74","\x70\x61\x72\x73\x65","\x64\x65\x66\x61\x75\x6C\x74\x4C\x6F\x67\x69\x6E\x4C\x6F\x67\x6F","\x6C\x6F\x67\x69\x6E\x4C\x6F\x67\x6F","\x63\x75\x73\x74\x6F\x6D","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x69\x6D\x61\x67\x65\x73","\x64\x65\x66\x61\x75\x6C\x74","\x6C\x6F\x67\x6F\x2D\x62\x69\x67\x2D\x70\x64\x66\x2E\x70\x6E\x67","\x70\x6F\x70","\x2E","\x73\x70\x6C\x69\x74","\x74\x68\x65\x6E","\x70\x64\x66","\x63\x73\x76","\x65\x6D\x70\x74\x79","\x71\x75\x65\x72\x79\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x20\x65\x72\x72\x6F\x72","\x63\x68\x65\x63\x6B\x51\x75\x65\x72\x79","\x62\x75\x69\x6C\x64\x51\x75\x65\x72\x79","\x73\x70\x72\x65\x61\x64","\x62\x75\x69\x6C\x64\x46\x69\x6C\x74\x65\x72","\x74\x61\x62\x6C\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x6A\x70\x65\x67","\x6A\x70\x67","\x72\x65\x70\x6F\x72\x74\x5F","\x6E\x61\x6D\x65","\x5F","\x2E\x70\x64\x66","\x61\x6C\x69\x61\x73","\x74\x61\x62\x6C\x65\x48\x65\x61\x64\x65\x72","\x70\x75\x73\x68","","\x68\x65\x61\x64\x65\x72","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x23\x38\x32\x38\x36\x38\x32","\x73\x74\x61\x72\x74\x44\x61\x74\x65","\x46\x72\x6F\x6D\x3A\x20","\x6C\x61\x62\x65\x6C","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x20\x20\x54\x6F\x3A\x20","\x65\x6E\x64\x4F\x66","\x65\x6E\x64\x44\x61\x74\x65","\x74\x61\x62\x6C\x65\x45\x78\x61\x6D\x70\x6C\x65","\x6C\x61\x6E\x64\x73\x63\x61\x70\x65","\x2A","\x64\x61\x74\x61\x3A\x69\x6D\x61\x67\x65\x2F","\x3B\x62\x61\x73\x65\x36\x34\x2C","\x6E\x6F\x42\x6F\x72\x64\x65\x72\x73","\x20\x6F\x66\x20","\x63\x65\x6E\x74\x65\x72","\x62\x6C\x61\x63\x6B","\x62\x72\x65\x61\x6B\x2D\x77\x6F\x72\x64","\x63\x72\x65\x61\x74\x65\x50\x64\x66\x4B\x69\x74\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x72\x65\x70\x6F\x72\x74\x73","\x63\x72\x65\x61\x74\x65\x57\x72\x69\x74\x65\x53\x74\x72\x65\x61\x6D","\x65\x72\x72\x6F\x72","\x70\x64\x66\x20\x77\x72\x69\x74\x65\x20\x65\x72\x72\x6F\x72","\x66\x69\x6E\x69\x73\x68","\x63\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x70\x69\x70\x65","\x65\x6E\x64","\x70\x64\x66\x20\x63\x72\x65\x61\x74\x69\x6F\x6E\x20\x65\x72\x72\x6F\x72","\x2E\x63\x73\x76","\x63\x73\x76\x20\x77\x72\x69\x74\x65\x20\x65\x72\x72\x6F\x72","\x77\x72\x69\x74\x65\x46\x69\x6C\x65","\x63\x73\x76\x20\x63\x72\x65\x61\x74\x69\x6F\x6E\x20\x65\x72\x72\x6F\x72","\x66\x69\x6E\x69\x73\x68\x65\x64","\x73\x65\x6E\x64","\x66\x69\x6E\x61\x6C\x6C\x79","\x2D\x2D\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6E\x67\x20\x72\x65\x70\x6F\x72\x74\x20\x77\x69\x74\x68\x20\x65\x72\x72\x6F\x72\x20\x3A\x20","\x2D\x2D\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6E\x67\x20\x72\x65\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65"];_0x2799[0];var csv=require(_0x2799[1]);var PdfMake=require(_0x2799[2]);var _=require(_0x2799[3]);var util=require(_0x2799[4]);var ExtractedReport=require(_0x2799[6])[_0x2799[5]];var License=require(_0x2799[6])[_0x2799[7]];var Setting=require(_0x2799[6])[_0x2799[8]];var sequelize=require(_0x2799[6])[_0x2799[9]];var fs=require(_0x2799[10]);var moment=require(_0x2799[11]);var Promise=require(_0x2799[12]);var base64=Promise[_0x2799[15]](require(_0x2799[14])[_0x2799[13]]);var sr=require(_0x2799[16]);var path=require(_0x2799[17]);var config=require(_0x2799[18]);var reportBuildUtils=require(_0x2799[19]);var license=require(_0x2799[20]);var fonts={Roboto:{normal:path[_0x2799[23]](config[_0x2799[21]],_0x2799[22]),bold:path[_0x2799[23]](config[_0x2799[21]],_0x2799[24]),italics:path[_0x2799[23]](config[_0x2799[21]],_0x2799[25]),bolditalics:path[_0x2799[23]](config[_0x2799[21]],_0x2799[25])}};process[_0x2799[34]](_0x2799[26],function(_0x54fbx13){if(_0x54fbx13!== _0x2799[27]){general(_0x54fbx13[_0x2799[28]],_0x54fbx13[_0x2799[29]],_0x54fbx13[_0x2799[30]],_0x54fbx13[_0x2799[32]][_0x2799[31]](),_0x54fbx13[_0x2799[33]])}});function general(_0x54fbx15,_0x54fbx16,_0x54fbx17,_0x54fbx18,_0x54fbx19){extract(_0x54fbx15,_0x54fbx16,_0x54fbx17,_0x54fbx18,_0x54fbx19)}function extract(_0x54fbx15,_0x54fbx1b,_0x54fbx17,_0x54fbx18,_0x54fbx19){var _0x54fbx1c,_0x54fbx1d;return License[_0x2799[70]](1)[_0x2799[60]](function(_0x54fbx23){_0x54fbx1c= _0x54fbx23;return Setting[_0x2799[70]](1)})[_0x2799[60]](function(_0x54fbx28){_0x54fbx1d= _0x54fbx28;return _0x54fbx15[_0x2799[69]]})[_0x2799[60]](reportBuildUtils[_0x2799[68]](_0x54fbx19))[_0x2799[60]](function(_0x54fbx27){return [_0x54fbx27,_0x54fbx15]})[_0x2799[67]](reportBuildUtils[_0x2799[66]](_0x54fbx1b))[_0x2799[60]](reportBuildUtils[_0x2799[65]]())[_0x2799[60]](function(_0x54fbx1f){if(_0x54fbx1f){if(_[_0x2799[38]](_0x54fbx1f)){if(_0x54fbx1f[_0x2799[39]]){_[_0x2799[43]](_0x54fbx1f,function(_0x54fbx20){_[_0x2799[42]](_0x54fbx20,function(_0x54fbx21,_0x54fbx22){if(_0x54fbx21 instanceof  Date){_0x54fbx20[_0x54fbx22]= moment(_0x54fbx21)[_0x2799[41]](_0x2799[40]).toString()}})});switch(_0x54fbx18){case _0x2799[61]:var _0x54fbx23=_0x54fbx1c?JSON[_0x2799[47]](license[_0x2799[46]](_0x54fbx1c[_0x2799[44]],_0x54fbx1c[_0x2799[45]])):null;var _0x54fbx24=(_0x54fbx1d&&  !_0x54fbx1d[_0x2799[48]]&& _0x54fbx1d[_0x2799[49]]&& _0x54fbx23&& _0x54fbx23[_0x2799[50]])?path[_0x2799[23]](config[_0x2799[51]],_0x2799[52],_0x2799[53],_0x2799[54],_0x54fbx1d[_0x2799[49]]):path[_0x2799[23]](config[_0x2799[51]],_0x2799[52],_0x2799[53],_0x2799[54],_0x2799[55],_0x2799[56]);return base64(_0x54fbx24)[_0x2799[60]](function(_0x54fbx25){var _0x54fbx26=_0x54fbx24[_0x2799[59]](_0x2799[58])[_0x2799[57]]();return createPdf(_0x54fbx1f,_0x54fbx15,_0x54fbx1b,_0x54fbx17,_0x54fbx25,_0x54fbx26)});case _0x2799[62]:return createCsv(_0x54fbx1f,_0x54fbx15,_0x54fbx1b,_0x54fbx17);default:return createCsv(_0x54fbx1f,_0x54fbx15,_0x54fbx1b,_0x54fbx17)}}else {return updateExtracted(_0x54fbx17,null,_0x2799[63])}}else {return updateExtracted(_0x54fbx17,null,_0x54fbx1f)}}else {return updateExtracted(_0x54fbx17,null,_0x2799[64])}})[_0x2799[37]](function(_0x54fbx1e){console[_0x2799[35]](_0x54fbx1e);return updateExtracted(_0x54fbx17,null,_0x2799[36])})}function createPdf(_0x54fbx1f,_0x54fbx15,_0x54fbx1b,_0x54fbx2a,_0x54fbx2b,_0x54fbx26){switch(_0x54fbx26){case _0x2799[72]:_0x54fbx26= _0x2799[71];break;default:};var _0x54fbx2c=sr({length:20,prefix:_0x2799[73]+ _0x54fbx15[_0x2799[74]]+ _0x2799[75],suffix:_0x2799[76]});var _0x54fbx2d=[];_[_0x2799[43]](_0x54fbx15.Fields,function(_0x54fbx2e){_0x54fbx2d[_0x2799[79]]({text:String(_0x54fbx2e[_0x2799[77]]),style:_0x2799[78]})});var _0x54fbx2f=[_0x54fbx2d];_[_0x2799[43]](_0x54fbx1f,function(_0x54fbx2e){var _0x54fbx20=[];_[_0x2799[42]](_0x54fbx2e,function(_0x54fbx30,_0x54fbx22){_0x54fbx20[_0x2799[79]](_0x54fbx30?String(_0x54fbx30):_0x2799[80])});_0x54fbx2f[_0x2799[79]](_0x54fbx20)});var _0x54fbx31=[{text:_0x54fbx15[_0x2799[74]],style:_0x2799[81]}];if(_0x54fbx15[_0x2799[82]]){_0x54fbx31[_0x2799[79]]({text:_0x54fbx15[_0x2799[82]]|| _0x2799[80],color:_0x2799[83],margin:[0,0,0,5]})};if(_0x54fbx1b[_0x2799[84]]){_0x54fbx31[_0x2799[79]]({text:[{text:_0x2799[85],style:_0x2799[86]},moment(_0x54fbx1b[_0x2799[84]])[_0x2799[89]](_0x2799[88])[_0x2799[41]](_0x2799[87]).toString(),{text:_0x2799[90],style:_0x2799[86]},moment(_0x54fbx1b[_0x2799[92]]|| _0x54fbx1b[_0x2799[84]])[_0x2799[91]](_0x2799[88])[_0x2799[41]](_0x2799[87]).toString()]})};var _0x54fbx32=[];_0x54fbx32[_0x2799[79]]({style:_0x2799[93],table:{headerRows:1,dontBreakRows:true,body:_0x54fbx2f}});var _0x54fbx33={pageOrientation:_0x2799[94],pageMargins:[15,90,15,25],header:function(){return {margin:[15,15,0,0],columns:[{table:{widths:[100,_0x2799[95]],body:[[{image:_0x2799[96]+ _0x54fbx26+ _0x2799[97]+ _0x54fbx2b,fit:[100,60]},_0x54fbx31]]},layout:_0x2799[98]}]}},content:_0x54fbx32,footer:function(_0x54fbx34,_0x54fbx35){return {columns:[{text:_0x54fbx34.toString()+ _0x2799[99]+ _0x54fbx35,alignment:_0x2799[100]}]}},styles:{header:{fontSize:18,bold:true,margin:[0,0,0,5]},tableExample:{margin:[0,0,0,5],fontSize:8},tableHeader:{bold:true,fontSize:8,color:_0x2799[101],wordWrap:_0x2799[102]},label:{bold:true,color:_0x2799[101]}}};var _0x54fbx36= new PdfMake(fonts);var _0x54fbx37=_0x54fbx36[_0x2799[103]](_0x54fbx33);if(_0x54fbx37){var _0x54fbx38=fs[_0x2799[105]](config[_0x2799[104]]+ _0x54fbx2c);_0x54fbx38[_0x2799[34]](_0x2799[106],function(){return updateExtracted(_0x54fbx2a,null,_0x2799[107])});_0x54fbx38[_0x2799[34]](_0x2799[108],function(){return updateExtracted(_0x54fbx2a,_0x54fbx2c,_0x2799[109])});_0x54fbx37[_0x2799[110]](_0x54fbx38);_0x54fbx37[_0x2799[111]]()}else {return updateExtracted(_0x54fbx2a,null,_0x2799[112])}}function createCsv(_0x54fbx1f,_0x54fbx15,_0x54fbx1b,_0x54fbx2a){var _0x54fbx2c=sr({length:20,prefix:_0x2799[73]+ _0x54fbx15[_0x2799[74]]+ _0x2799[75],suffix:_0x2799[113]});var _0x54fbx3a=csv(_0x54fbx1f);if(_0x54fbx3a){fs[_0x2799[115]](config[_0x2799[104]]+ _0x54fbx2c,_0x54fbx3a,function(_0x54fbx1e){if(_0x54fbx1e){console[_0x2799[35]](_0x54fbx1e);return updateExtracted(_0x54fbx2a,null,_0x2799[114])}else {return updateExtracted(_0x54fbx2a,_0x54fbx2c,_0x2799[109])}})}else {return updateExtracted(_0x54fbx2a,null,_0x2799[116])}}function updateExtracted(_0x54fbx2a,_0x54fbx2c,_0x54fbx3c){return ExtractedReport[_0x2799[122]]({status:_0x54fbx3c,savename:_0x54fbx2c},{where:{id:_0x54fbx2a}})[_0x2799[60]](function(){console[_0x2799[35]](_0x2799[121])})[_0x2799[37]](function(_0x54fbx1e){console[_0x2799[35]](_0x2799[120]+ _0x54fbx1e)})[_0x2799[119]](function(){process[_0x2799[118]]({message:_0x2799[117],status:_0x54fbx3c})})}
\ No newline at end of file