Built motion from commit 7767ffc.|0.0.132
[motion.git] / server / utils / report_extraction.js
index dc1a329..c8dfacb 100644 (file)
@@ -1 +1 @@
-var _0xd276=["\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","\x6C\x6F\x67","\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","\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","\x70\x6F\x72\x74\x72\x61\x69\x74","\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(_0xd276[0]);var pdfMake=require(_0xd276[1]);var _=require(_0xd276[2]);var util=require(_0xd276[3]);var ExtractedReport=require(_0xd276[5])[_0xd276[4]];var sequelize=require(_0xd276[5])[_0xd276[6]];var fs=require(_0xd276[7]);var moment=require(_0xd276[8]);var sr=require(_0xd276[9]);var path=require(_0xd276[10]);var config=require(_0xd276[11]);var Promise=require(_0xd276[12]);var reportBuildUtils=require(_0xd276[13]);var fonts={Roboto:{normal:path[_0xd276[16]](config[_0xd276[14]],_0xd276[15]),bold:path[_0xd276[16]](config[_0xd276[14]],_0xd276[17]),italics:path[_0xd276[16]](config[_0xd276[14]],_0xd276[18]),bolditalics:path[_0xd276[16]](config[_0xd276[14]],_0xd276[18])}};process[_0xd276[27]](_0xd276[19],function(_0x2c0fxf){console[_0xd276[20]](_0x2c0fxf);general(_0x2c0fxf[_0xd276[21]],_0x2c0fxf[_0xd276[22]],_0x2c0fxf[_0xd276[23]],_0x2c0fxf[_0xd276[25]][_0xd276[24]](),_0x2c0fxf[_0xd276[26]])});function general(_0x2c0fx11,_0x2c0fx12,_0x2c0fx13,_0x2c0fx14,_0x2c0fx15){extract(_0x2c0fx11,_0x2c0fx12,_0x2c0fx13,_0x2c0fx14,_0x2c0fx15)}function extract(_0x2c0fx11,_0x2c0fx17,_0x2c0fx13,_0x2c0fx14,_0x2c0fx15){return Promise[_0xd276[46]]([])[_0xd276[39]](function(){return _0x2c0fx11[_0xd276[45]]})[_0xd276[39]](reportBuildUtils[_0xd276[44]](_0x2c0fx15))[_0xd276[39]](function(_0x2c0fx1d){return [_0x2c0fx1d,_0x2c0fx11]})[_0xd276[43]](reportBuildUtils[_0xd276[42]](_0x2c0fx17))[_0xd276[39]](function(_0x2c0fx12){return _0x2c0fx12?sequelize[_0xd276[22]](_0x2c0fx12,{type:sequelize[_0xd276[41]][_0xd276[40]]}):[]})[_0xd276[39]](function(_0x2c0fx19){if(_0x2c0fx19){if(_0x2c0fx19[_0xd276[30]]){_[_0xd276[34]](_0x2c0fx19,function(_0x2c0fx1a){_[_0xd276[33]](_0x2c0fx1a,function(_0x2c0fx1b,_0x2c0fx1c){if(_0x2c0fx1b instanceof Date){_0x2c0fx1a[_0x2c0fx1c]=moment(_0x2c0fx1b)[_0xd276[32]](_0xd276[31]).toString()}})});switch(_0x2c0fx14){case _0xd276[35]:createPdf(_0x2c0fx19,_0x2c0fx11,_0x2c0fx17,_0x2c0fx13);break;case _0xd276[36]:createCsv(_0x2c0fx19,_0x2c0fx11,_0x2c0fx17,_0x2c0fx13);break;default:createCsv(_0x2c0fx19,_0x2c0fx11,_0x2c0fx17,_0x2c0fx13)}}else {updateExtracted(_0x2c0fx13,null,_0xd276[37])}}else {updateExtracted(_0x2c0fx13,null,_0xd276[38])}})[_0xd276[29]](function(_0x2c0fx18){console[_0xd276[20]](_0x2c0fx18);updateExtracted(_0x2c0fx13,null,_0xd276[28])})}function createPdf(_0x2c0fx19,_0x2c0fx11,_0x2c0fx17,_0x2c0fx1f){var _0x2c0fx20=sr({length:20,prefix:_0xd276[47]+_0x2c0fx11[_0xd276[48]]+_0xd276[49],suffix:_0xd276[50]});var _0x2c0fx21=[],_0x2c0fx22=0;_[_0xd276[34]](_0x2c0fx11.Fields,function(_0x2c0fx23){_0x2c0fx21[_0xd276[53]]({text:String(_0x2c0fx23[_0xd276[51]]),style:_0xd276[52]});_0x2c0fx22++});var _0x2c0fx24=[_0x2c0fx21];_[_0xd276[34]](_0x2c0fx19,function(_0x2c0fx23){var _0x2c0fx1a=[];_[_0xd276[33]](_0x2c0fx23,function(_0x2c0fx25,_0x2c0fx1c){_0x2c0fx1a[_0xd276[53]](_0x2c0fx25?String(_0x2c0fx25):_0xd276[54])});_0x2c0fx24[_0xd276[53]](_0x2c0fx1a)});var _0x2c0fx26={pageOrientation:_0x2c0fx22>5?_0xd276[55]:_0xd276[56],content:[{text:_0x2c0fx11[_0xd276[48]],style:_0xd276[57]},_0x2c0fx17[_0xd276[58]]?moment(_0x2c0fx17[_0xd276[58]])[_0xd276[32]](_0xd276[59]).toString():_0xd276[54]+_0xd276[60]+_0x2c0fx17[_0xd276[61]]?moment(_0x2c0fx17[_0xd276[61]])[_0xd276[32]](_0xd276[59]).toString():_0xd276[54],{style:_0xd276[62],table:{headerRows:1,body:_0x2c0fx24}}],styles:{header:{fontSize:18,bold:true,margin:[0,0,0,10]},tableExample:{margin:[0,5,0,15]},tableHeader:{bold:true,fontSize:13,color:_0xd276[63]}}};var _0x2c0fx27= new pdfMake(fonts);var _0x2c0fx28=_0x2c0fx27[_0xd276[64]](_0x2c0fx26);if(_0x2c0fx28){var _0x2c0fx29=fs[_0xd276[66]](config[_0xd276[65]]+_0x2c0fx20);_0x2c0fx29[_0xd276[27]](_0xd276[67],function(){updateExtracted(_0x2c0fx1f,null,_0xd276[68])});_0x2c0fx29[_0xd276[27]](_0xd276[69],function(){updateExtracted(_0x2c0fx1f,_0x2c0fx20,_0xd276[70])});_0x2c0fx28[_0xd276[71]](_0x2c0fx29);_0x2c0fx28[_0xd276[72]]()}else {updateExtracted(_0x2c0fx1f,null,_0xd276[73])}}function createCsv(_0x2c0fx19,_0x2c0fx11,_0x2c0fx17,_0x2c0fx1f){var _0x2c0fx20=sr({length:20,prefix:_0xd276[47]+_0x2c0fx11[_0xd276[48]]+_0xd276[49],suffix:_0xd276[74]});var _0x2c0fx2b=csv(_0x2c0fx19);if(_0x2c0fx2b){fs[_0xd276[76]](config[_0xd276[65]]+_0x2c0fx20,_0x2c0fx2b,function(_0x2c0fx18){if(_0x2c0fx18){console[_0xd276[20]](_0x2c0fx18);updateExtracted(_0x2c0fx1f,null,_0xd276[75])}else {updateExtracted(_0x2c0fx1f,_0x2c0fx20,_0xd276[70])}})}else {updateExtracted(_0x2c0fx1f,null,_0xd276[77])}}function updateExtracted(_0x2c0fx1f,_0x2c0fx20,_0x2c0fx2d){return ExtractedReport[_0xd276[83]]({status:_0x2c0fx2d,savename:_0x2c0fx20},{where:{id:_0x2c0fx1f}})[_0xd276[39]](function(){console[_0xd276[20]](_0xd276[82])})[_0xd276[29]](function(_0x2c0fx18){console[_0xd276[20]](_0xd276[81]+_0x2c0fx18)})[_0xd276[80]](function(){process[_0xd276[79]]({message:_0xd276[78]})})}
\ No newline at end of file
+var _0x54f1=["\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","\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","\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","\x6C\x69\x63\x65\x6E\x73\x65","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\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","\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","\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"];var csv=require(_0x54f1[0]);var PdfMake=require(_0x54f1[1]);var _=require(_0x54f1[2]);var util=require(_0x54f1[3]);var ExtractedReport=require(_0x54f1[5])[_0x54f1[4]];var License=require(_0x54f1[5])[_0x54f1[6]];var Settings=require(_0x54f1[5])[_0x54f1[7]];var sequelize=require(_0x54f1[5])[_0x54f1[8]];var fs=require(_0x54f1[9]);var moment=require(_0x54f1[10]);var Promise=require(_0x54f1[11]);var base64=Promise[_0x54f1[14]](require(_0x54f1[13])[_0x54f1[12]]);var sr=require(_0x54f1[15]);var path=require(_0x54f1[16]);var config=require(_0x54f1[17]);var reportBuildUtils=require(_0x54f1[18]);var license=require(_0x54f1[19]);var fonts={Roboto:{normal:path[_0x54f1[22]](config[_0x54f1[20]],_0x54f1[21]),bold:path[_0x54f1[22]](config[_0x54f1[20]],_0x54f1[23]),italics:path[_0x54f1[22]](config[_0x54f1[20]],_0x54f1[24]),bolditalics:path[_0x54f1[22]](config[_0x54f1[20]],_0x54f1[24])}};process[_0x54f1[32]](_0x54f1[25],function(_0x96eex13){general(_0x96eex13[_0x54f1[26]],_0x96eex13[_0x54f1[27]],_0x96eex13[_0x54f1[28]],_0x96eex13[_0x54f1[30]][_0x54f1[29]](),_0x96eex13[_0x54f1[31]])});function general(_0x96eex15,_0x96eex16,_0x96eex17,_0x96eex18,_0x96eex19){extract(_0x96eex15,_0x96eex16,_0x96eex17,_0x96eex18,_0x96eex19)}function extract(_0x96eex15,_0x96eex1b,_0x96eex17,_0x96eex18,_0x96eex19){var _0x96eex1c,_0x96eex1d;return License[_0x54f1[68]](1)[_0x54f1[57]](function(_0x96eex23){_0x96eex1c= _0x96eex23;return Settings[_0x54f1[68]](1)})[_0x54f1[57]](function(_0x96eex28){_0x96eex1d= _0x96eex28;return _0x96eex15[_0x54f1[67]]})[_0x54f1[57]](reportBuildUtils[_0x54f1[66]](_0x96eex19))[_0x54f1[57]](function(_0x96eex27){return [_0x96eex27,_0x96eex15]})[_0x54f1[65]](reportBuildUtils[_0x54f1[64]](_0x96eex1b))[_0x54f1[57]](function(_0x96eex16){return _0x96eex16?sequelize[_0x54f1[27]](_0x96eex16,{type:sequelize[_0x54f1[63]][_0x54f1[62]]}):[]})[_0x54f1[57]](function(_0x96eex1f){if(_0x96eex1f){if(_0x96eex1f[_0x54f1[36]]){_[_0x54f1[40]](_0x96eex1f,function(_0x96eex20){_[_0x54f1[39]](_0x96eex20,function(_0x96eex21,_0x96eex22){if(_0x96eex21 instanceof  Date){_0x96eex20[_0x96eex22]= moment(_0x96eex21)[_0x54f1[38]](_0x54f1[37]).toString()}})});switch(_0x96eex18){case _0x54f1[58]:var _0x96eex23=_0x96eex1c?JSON[_0x54f1[44]](license[_0x54f1[43]](_0x96eex1c[_0x54f1[42]][_0x54f1[41]])):null;var _0x96eex24=(_0x96eex1d&& !_0x96eex1d[_0x54f1[45]]&& _0x96eex1d[_0x54f1[46]]&& _0x96eex23&& _0x96eex23[_0x54f1[47]])?path[_0x54f1[22]](config[_0x54f1[48]],_0x54f1[49],_0x54f1[50],_0x54f1[51],_0x96eex1d[_0x54f1[46]]):path[_0x54f1[22]](config[_0x54f1[48]],_0x54f1[49],_0x54f1[50],_0x54f1[51],_0x54f1[52],_0x54f1[53]);return base64(_0x96eex24)[_0x54f1[57]](function(_0x96eex25){var _0x96eex26=_0x96eex24[_0x54f1[56]](_0x54f1[55])[_0x54f1[54]]();return createPdf(_0x96eex1f,_0x96eex15,_0x96eex1b,_0x96eex17,_0x96eex25,_0x96eex26)});case _0x54f1[59]:return createCsv(_0x96eex1f,_0x96eex15,_0x96eex1b,_0x96eex17);default:return createCsv(_0x96eex1f,_0x96eex15,_0x96eex1b,_0x96eex17)}}else {return updateExtracted(_0x96eex17,null,_0x54f1[60])}}else {return updateExtracted(_0x96eex17,null,_0x54f1[61])}})[_0x54f1[35]](function(_0x96eex1e){console[_0x54f1[33]](_0x96eex1e);return updateExtracted(_0x96eex17,null,_0x54f1[34])})}function createPdf(_0x96eex1f,_0x96eex15,_0x96eex1b,_0x96eex2a,_0x96eex2b,_0x96eex26){switch(_0x96eex26){case _0x54f1[70]:_0x96eex26= _0x54f1[69];break;default:};var _0x96eex2c=sr({length:20,prefix:_0x54f1[71]+ _0x96eex15[_0x54f1[72]]+ _0x54f1[73],suffix:_0x54f1[74]});var _0x96eex2d=[];_[_0x54f1[40]](_0x96eex15.Fields,function(_0x96eex2e){_0x96eex2d[_0x54f1[77]]({text:String(_0x96eex2e[_0x54f1[75]]),style:_0x54f1[76]})});var _0x96eex2f=[_0x96eex2d];_[_0x54f1[40]](_0x96eex1f,function(_0x96eex2e){var _0x96eex20=[];_[_0x54f1[39]](_0x96eex2e,function(_0x96eex30,_0x96eex22){_0x96eex20[_0x54f1[77]](_0x96eex30?String(_0x96eex30):_0x54f1[78])});_0x96eex2f[_0x54f1[77]](_0x96eex20)});var _0x96eex31=[{text:_0x96eex15[_0x54f1[72]],style:_0x54f1[79]}];if(_0x96eex15[_0x54f1[80]]){_0x96eex31[_0x54f1[77]]({text:_0x96eex15[_0x54f1[80]]|| _0x54f1[78],color:_0x54f1[81],margin:[0,0,0,5]})};if(_0x96eex1b[_0x54f1[82]]){_0x96eex31[_0x54f1[77]]({text:[{text:_0x54f1[83],style:_0x54f1[84]},moment(_0x96eex1b[_0x54f1[82]])[_0x54f1[87]](_0x54f1[86])[_0x54f1[38]](_0x54f1[85]).toString(),{text:_0x54f1[88],style:_0x54f1[84]},moment(_0x96eex1b[_0x54f1[90]]|| _0x96eex1b[_0x54f1[82]])[_0x54f1[89]](_0x54f1[86])[_0x54f1[38]](_0x54f1[85]).toString()]})};var _0x96eex32=[];_0x96eex32[_0x54f1[77]]({style:_0x54f1[91],table:{headerRows:1,dontBreakRows:true,body:_0x96eex2f}});var _0x96eex33={pageOrientation:_0x54f1[92],pageMargins:[15,90,15,25],header:function(){return {margin:[15,15,0,0],columns:[{table:{widths:[100,_0x54f1[93]],body:[[{image:_0x54f1[94]+ _0x96eex26+ _0x54f1[95]+ _0x96eex2b,fit:[100,60]},_0x96eex31]]},layout:_0x54f1[96]}]}},content:_0x96eex32,footer:function(_0x96eex34,_0x96eex35){return {columns:[{text:_0x96eex34.toString()+ _0x54f1[97]+ _0x96eex35,alignment:_0x54f1[98]}]}},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:_0x54f1[99],wordWrap:_0x54f1[100]},label:{bold:true,color:_0x54f1[99]}}};var _0x96eex36= new PdfMake(fonts);var _0x96eex37=_0x96eex36[_0x54f1[101]](_0x96eex33);if(_0x96eex37){var _0x96eex38=fs[_0x54f1[103]](config[_0x54f1[102]]+ _0x96eex2c);_0x96eex38[_0x54f1[32]](_0x54f1[104],function(){return updateExtracted(_0x96eex2a,null,_0x54f1[105])});_0x96eex38[_0x54f1[32]](_0x54f1[106],function(){return updateExtracted(_0x96eex2a,_0x96eex2c,_0x54f1[107])});_0x96eex37[_0x54f1[108]](_0x96eex38);_0x96eex37[_0x54f1[109]]()}else {return updateExtracted(_0x96eex2a,null,_0x54f1[110])}}function createCsv(_0x96eex1f,_0x96eex15,_0x96eex1b,_0x96eex2a){var _0x96eex2c=sr({length:20,prefix:_0x54f1[71]+ _0x96eex15[_0x54f1[72]]+ _0x54f1[73],suffix:_0x54f1[111]});var _0x96eex3a=csv(_0x96eex1f);if(_0x96eex3a){fs[_0x54f1[113]](config[_0x54f1[102]]+ _0x96eex2c,_0x96eex3a,function(_0x96eex1e){if(_0x96eex1e){console[_0x54f1[33]](_0x96eex1e);return updateExtracted(_0x96eex2a,null,_0x54f1[112])}else {return updateExtracted(_0x96eex2a,_0x96eex2c,_0x54f1[107])}})}else {return updateExtracted(_0x96eex2a,null,_0x54f1[114])}}function updateExtracted(_0x96eex2a,_0x96eex2c,_0x96eex3c){return ExtractedReport[_0x54f1[120]]({status:_0x96eex3c,savename:_0x96eex2c},{where:{id:_0x96eex2a}})[_0x54f1[57]](function(){console[_0x54f1[33]](_0x54f1[119])})[_0x54f1[35]](function(_0x96eex1e){console[_0x54f1[33]](_0x54f1[118]+ _0x96eex1e)})[_0x54f1[117]](function(){process[_0x54f1[116]]({message:_0x54f1[115],status:_0x96eex3c})})}
\ No newline at end of file