Built motion from commit dde1e88.|2.0.20
[motion2.git] / server / api / cmHopperBlack / cmHopperBlack.controller.js
index 0e476f5..a716163 100644 (file)
@@ -1 +1 @@
-var _0x89fc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x74\x6F\x2D\x63\x73\x76","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x6E\x6F\x20\x63\x6F\x6E\x74\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x64\x65\x62\x75\x67","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x65\x6E\x74\x69\x74\x79\x20\x66\x6F\x75\x6E\x64","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x65\x6E\x74\x69\x74\x69\x65\x73\x20\x66\x6F\x75\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x65\x6E\x74\x69\x74\x79\x20\x75\x70\x64\x61\x74\x65\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x65\x6E\x74\x69\x74\x79\x20\x72\x65\x6D\x6F\x76\x65\x64","\x64\x65\x73\x74\x72\x6F\x79","\x65\x6E\x74\x69\x74\x79\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B","\x6B\x65\x79\x73","\x71\x75\x65\x72\x79","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6D\x65\x72\x67\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x89fc[0];var jsonpatch=require(_0x89fc[1]);var rp=require(_0x89fc[2]);var moment=require(_0x89fc[3]);var BPromise=require(_0x89fc[4]);var util=require(_0x89fc[5]);var path=require(_0x89fc[6]);var sox=require(_0x89fc[7]);var ejs=require(_0x89fc[8]);var fs=require(_0x89fc[9]);var _=require(_0x89fc[10]);var squel=require(_0x89fc[11]);var crypto=require(_0x89fc[12]);var jsforce=require(_0x89fc[13]);var toCsv=require(_0x89fc[14]);var qs=require(_0x89fc[15]);var logger=require(_0x89fc[17])(_0x89fc[16]);var utils=require(_0x89fc[18]);var config=require(_0x89fc[19]);var db=require(_0x89fc[21])[_0x89fc[20]];function respondWithStatusCode(_0x6bd6x15,_0x6bd6x16,_0x6bd6x17){_0x6bd6x16= _0x6bd6x16|| 204;return function(_0x6bd6x18){if(_0x6bd6x18){logger[_0x89fc[24]](_0x89fc[22],_0x6bd6x17,_0x6bd6x16,_0x89fc[23]);logger[_0x89fc[26]](_0x89fc[25],_0x6bd6x17,_0x6bd6x16,_0x89fc[23]);return _0x6bd6x15[_0x89fc[27]](_0x6bd6x16)};return _0x6bd6x15[_0x89fc[29]](304)[_0x89fc[28]]()}}function respondWithResult(_0x6bd6x15,_0x6bd6x16,_0x6bd6x17){_0x6bd6x16= _0x6bd6x16|| 200;return function(_0x6bd6x18){if(_0x6bd6x18){logger[_0x89fc[24]](_0x89fc[22],_0x6bd6x17,_0x6bd6x16,_0x89fc[30]);logger[_0x89fc[26]](_0x89fc[25],_0x6bd6x17,_0x6bd6x16,_0x89fc[30],JSON[_0x89fc[31]](_0x6bd6x18));return _0x6bd6x15[_0x89fc[29]](_0x6bd6x16)[_0x89fc[32]](_0x6bd6x18)};return _0x6bd6x15[_0x89fc[29]](304)[_0x89fc[28]]()}}function respondWithFilteredResult(_0x6bd6x15,_0x6bd6x1b,_0x6bd6x17){return function(_0x6bd6x18){if(_0x6bd6x18){var _0x6bd6x1c=_0x6bd6x18[_0x89fc[33]],_0x6bd6x1d=_0x6bd6x1b[_0x89fc[34]],_0x6bd6x1e=_0x6bd6x1b[_0x89fc[34]]+ _0x6bd6x1b[_0x89fc[35]],_0x6bd6x16;if(_0x6bd6x1e>= _0x6bd6x1c){_0x6bd6x1e= _0x6bd6x1c;_0x6bd6x16= 200}else {_0x6bd6x16= 206};_0x6bd6x15[_0x89fc[29]](_0x6bd6x16);logger[_0x89fc[24]](_0x89fc[22],_0x6bd6x17,_0x6bd6x16,_0x89fc[36]);logger[_0x89fc[26]](_0x89fc[25],_0x6bd6x17,_0x6bd6x16,_0x89fc[30],JSON[_0x89fc[31]](_0x6bd6x18));return _0x6bd6x15[_0x89fc[40]](_0x89fc[37],_0x6bd6x1d+ _0x89fc[38]+ _0x6bd6x1e+ _0x89fc[39]+ _0x6bd6x1c)[_0x89fc[32]](_0x6bd6x18)};return null}}function patchUpdates(_0x6bd6x20){return function(_0x6bd6x18){try{jsonpatch[_0x89fc[41]](_0x6bd6x18,_0x6bd6x20,true)}catch(err){return BPromise[_0x89fc[42]](err)};return _0x6bd6x18[_0x89fc[43]]()}}function saveUpdates(_0x6bd6x22,_0x6bd6x16,_0x6bd6x17){return function(_0x6bd6x18){if(_0x6bd6x18){return _0x6bd6x18[_0x89fc[46]](_0x6bd6x22)[_0x89fc[45]](function(_0x6bd6x23){logger[_0x89fc[24]](_0x89fc[22],_0x6bd6x17,_0x6bd6x16,_0x89fc[44]);logger[_0x89fc[26]](_0x89fc[25],_0x6bd6x17,_0x6bd6x16,_0x89fc[44],JSON[_0x89fc[31]](_0x6bd6x18));return _0x6bd6x23})};return null}}function removeEntity(_0x6bd6x15,_0x6bd6x16,_0x6bd6x17){return function(_0x6bd6x18){if(_0x6bd6x18){return _0x6bd6x18[_0x89fc[48]]()[_0x89fc[45]](function(){logger[_0x89fc[24]](_0x89fc[22],_0x6bd6x17,_0x6bd6x16,_0x89fc[47]);logger[_0x89fc[26]](_0x89fc[25],_0x6bd6x17,_0x6bd6x16,_0x89fc[47],JSON[_0x89fc[31]](_0x6bd6x18));_0x6bd6x15[_0x89fc[29]](204)[_0x89fc[28]]()})}}}function handleEntityNotFound(_0x6bd6x15,_0x6bd6x16,_0x6bd6x17){return function(_0x6bd6x18){if(!_0x6bd6x18){logger[_0x89fc[50]](_0x89fc[22],_0x6bd6x17,404,_0x89fc[49]);_0x6bd6x15[_0x89fc[29]](404)[_0x89fc[28]]();return null};return _0x6bd6x18}}function handleError(_0x6bd6x15,_0x6bd6x16,_0x6bd6x17){_0x6bd6x16= _0x6bd6x16|| 500;return function(_0x6bd6x27){logger[_0x89fc[50]](_0x89fc[22],_0x6bd6x17,_0x6bd6x16,JSON[_0x89fc[31]](_0x6bd6x27));delete _0x6bd6x27[_0x89fc[51]];_0x6bd6x15[_0x89fc[29]](_0x6bd6x16)[_0x89fc[52]](_0x6bd6x27)}}exports[_0x89fc[53]]= function(_0x6bd6x28,_0x6bd6x15){var _0x6bd6x1b={},_0x6bd6x29={};_0x6bd6x29[_0x89fc[54]]= _[_0x89fc[57]](db[_0x89fc[56]][_0x89fc[55]]);_0x6bd6x29[_0x89fc[58]]= _[_0x89fc[57]](_0x6bd6x28[_0x89fc[58]]);_0x6bd6x29[_0x89fc[59]]= _[_0x89fc[60]](_0x6bd6x29[_0x89fc[54]],_0x6bd6x29[_0x89fc[58]]);_0x6bd6x1b[_0x89fc[61]]= _[_0x89fc[60]](_0x6bd6x29[_0x89fc[54]],qs[_0x89fc[62]](_0x6bd6x28[_0x89fc[58]][_0x89fc[62]]));_0x6bd6x1b[_0x89fc[61]]= (_0x6bd6x1b[_0x89fc[61]][_0x89fc[63]])?_0x6bd6x1b[_0x89fc[61]]:_0x6bd6x29[_0x89fc[54]];if(!_0x6bd6x28[_0x89fc[58]][_0x89fc[65]](_0x89fc[64])){_0x6bd6x1b[_0x89fc[35]]= qs[_0x89fc[35]](_0x6bd6x28[_0x89fc[58]][_0x89fc[35]]);_0x6bd6x1b[_0x89fc[34]]= qs[_0x89fc[34]](_0x6bd6x28[_0x89fc[58]][_0x89fc[34]])};_0x6bd6x1b[_0x89fc[66]]= qs[_0x89fc[67]](_0x6bd6x28[_0x89fc[58]][_0x89fc[67]]);_0x6bd6x1b[_0x89fc[68]]= qs[_0x89fc[59]](_[_0x89fc[69]](_0x6bd6x28[_0x89fc[58]],_0x6bd6x29[_0x89fc[59]]));if(_0x6bd6x28[_0x89fc[58]][_0x89fc[70]]){_0x6bd6x1b[_0x89fc[68]]= _[_0x89fc[73]](_0x6bd6x1b[_0x89fc[68]],{$or:_[_0x89fc[72]](_0x6bd6x1b[_0x89fc[61]],function(_0x6bd6x2a){var _0x6bd6x2b={};_0x6bd6x2b[_0x6bd6x2a]= {$like:_0x89fc[71]+ _0x6bd6x28[_0x89fc[58]][_0x89fc[70]]+ _0x89fc[71]};return _0x6bd6x2b})})};_0x6bd6x1b= _[_0x89fc[73]]({},_0x6bd6x1b,_0x6bd6x28[_0x89fc[74]]);return db[_0x89fc[56]][_0x89fc[76]](_0x6bd6x1b)[_0x89fc[45]](respondWithFilteredResult(_0x6bd6x15,_0x6bd6x1b,_0x89fc[53]))[_0x89fc[75]](handleError(_0x6bd6x15,null,_0x89fc[53]))};exports[_0x89fc[77]]= function(_0x6bd6x28,_0x6bd6x15){var _0x6bd6x1b={raw:true,where:{id:_0x6bd6x28[_0x89fc[79]][_0x89fc[78]]}},_0x6bd6x29={};_0x6bd6x29[_0x89fc[54]]= _[_0x89fc[57]](db[_0x89fc[56]][_0x89fc[55]]);_0x6bd6x29[_0x89fc[58]]= _[_0x89fc[57]](_0x6bd6x28[_0x89fc[58]]);_0x6bd6x29[_0x89fc[59]]= _[_0x89fc[60]](_0x6bd6x29[_0x89fc[54]],_0x6bd6x29[_0x89fc[58]]);_0x6bd6x1b[_0x89fc[61]]= _[_0x89fc[60]](_0x6bd6x29[_0x89fc[54]],qs[_0x89fc[62]](_0x6bd6x28[_0x89fc[58]][_0x89fc[62]]));_0x6bd6x1b[_0x89fc[61]]= (_0x6bd6x1b[_0x89fc[61]][_0x89fc[63]])?_0x6bd6x1b[_0x89fc[61]]:_0x6bd6x29[_0x89fc[54]];_0x6bd6x1b= _[_0x89fc[73]]({},_0x6bd6x1b,_0x6bd6x28[_0x89fc[74]]);return db[_0x89fc[56]][_0x89fc[80]](_0x6bd6x1b)[_0x89fc[45]](handleEntityNotFound(_0x6bd6x15,null,_0x89fc[77]))[_0x89fc[45]](respondWithResult(_0x6bd6x15,null,_0x89fc[77]))[_0x89fc[75]](handleError(_0x6bd6x15,null,_0x89fc[77]))};exports[_0x89fc[46]]= function(_0x6bd6x28,_0x6bd6x15){if(_0x6bd6x28[_0x89fc[81]][_0x89fc[78]]){delete _0x6bd6x28[_0x89fc[81]][_0x89fc[78]]};return db[_0x89fc[56]][_0x89fc[80]]({where:{id:_0x6bd6x28[_0x89fc[79]][_0x89fc[78]]}})[_0x89fc[45]](handleEntityNotFound(_0x6bd6x15,null,_0x89fc[46]))[_0x89fc[45]](saveUpdates(_0x6bd6x28[_0x89fc[81]],null,_0x89fc[46]))[_0x89fc[45]](respondWithResult(_0x6bd6x15,null,_0x89fc[46]))[_0x89fc[75]](handleError(_0x6bd6x15,null,_0x89fc[46]))};exports[_0x89fc[48]]= function(_0x6bd6x28,_0x6bd6x15){return db[_0x89fc[56]][_0x89fc[80]]({where:{id:_0x6bd6x28[_0x89fc[79]][_0x89fc[78]]}})[_0x89fc[45]](handleEntityNotFound(_0x6bd6x15,null,_0x89fc[48]))[_0x89fc[45]](removeEntity(_0x6bd6x15,null,_0x89fc[48]))[_0x89fc[75]](handleError(_0x6bd6x15,null,_0x89fc[48]))};exports[_0x89fc[82]]= function(_0x6bd6x28,_0x6bd6x15){return db[_0x89fc[56]][_0x89fc[82]]()[_0x89fc[45]](respondWithResult(_0x6bd6x15,null,_0x89fc[82]))[_0x89fc[75]](handleError(_0x6bd6x15,null,_0x89fc[82]))}
\ No newline at end of file
+var _0xb4cb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x61\x73\x74\x2D\x6A\x73\x6F\x6E\x2D\x70\x61\x74\x63\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x73\x6F\x78","\x65\x6A\x73","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x71\x75\x65\x6C","\x63\x72\x79\x70\x74\x6F","\x6A\x73\x66\x6F\x72\x63\x65","\x74\x6F\x2D\x63\x73\x76","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x70\x61\x72\x73\x65\x72\x73\x2F\x71\x73","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x64\x62","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x79\x73\x71\x6C\x64\x62","\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x6E\x6F\x20\x63\x6F\x6E\x74\x65\x6E\x74","\x69\x6E\x66\x6F","\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73\x2C\x20\x25\x73","\x64\x65\x62\x75\x67","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x65\x6E\x74\x69\x74\x79\x20\x66\x6F\x75\x6E\x64","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x6A\x73\x6F\x6E","\x63\x6F\x75\x6E\x74","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x65\x6E\x74\x69\x74\x69\x65\x73\x20\x66\x6F\x75\x6E\x64","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x52\x61\x6E\x67\x65","\x2D","\x2F","\x73\x65\x74","\x61\x70\x70\x6C\x79","\x72\x65\x6A\x65\x63\x74","\x73\x61\x76\x65","\x65\x6E\x74\x69\x74\x79\x20\x75\x70\x64\x61\x74\x65\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x65\x6E\x74\x69\x74\x79\x20\x72\x65\x6D\x6F\x76\x65\x64","\x64\x65\x73\x74\x72\x6F\x79","\x65\x6E\x74\x69\x74\x79\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x65\x72\x72\x6F\x72","\x6E\x61\x6D\x65","\x73\x65\x6E\x64","\x69\x6E\x64\x65\x78","\x6D\x6F\x64\x65\x6C","\x72\x61\x77\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x43\x6D\x48\x6F\x70\x70\x65\x72\x42\x6C\x61\x63\x6B","\x6B\x65\x79\x73","\x71\x75\x65\x72\x79","\x66\x69\x6C\x74\x65\x72\x73","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x6F\x6C\x69\x6D\x69\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x72\x64\x65\x72","\x73\x6F\x72\x74","\x77\x68\x65\x72\x65","\x70\x69\x63\x6B","\x66\x69\x6C\x74\x65\x72","\x25","\x6D\x61\x70","\x6D\x65\x72\x67\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x62\x6F\x64\x79","\x64\x65\x73\x63\x72\x69\x62\x65"];_0xb4cb[0];var jsonpatch=require(_0xb4cb[1]);var rp=require(_0xb4cb[2]);var moment=require(_0xb4cb[3]);var BPromise=require(_0xb4cb[4]);var util=require(_0xb4cb[5]);var path=require(_0xb4cb[6]);var sox=require(_0xb4cb[7]);var ejs=require(_0xb4cb[8]);var fs=require(_0xb4cb[9]);var _=require(_0xb4cb[10]);var squel=require(_0xb4cb[11]);var crypto=require(_0xb4cb[12]);var jsforce=require(_0xb4cb[13]);var toCsv=require(_0xb4cb[14]);var qs=require(_0xb4cb[15]);var logger=require(_0xb4cb[17])(_0xb4cb[16]);var utils=require(_0xb4cb[18]);var config=require(_0xb4cb[19]);var db=require(_0xb4cb[21])[_0xb4cb[20]];function respondWithStatusCode(_0x17f6x15,_0x17f6x16,_0x17f6x17){_0x17f6x16= _0x17f6x16|| 204;return function(_0x17f6x18){if(_0x17f6x18){logger[_0xb4cb[24]](_0xb4cb[22],_0x17f6x17,_0x17f6x16,_0xb4cb[23]);logger[_0xb4cb[26]](_0xb4cb[25],_0x17f6x17,_0x17f6x16,_0xb4cb[23]);return _0x17f6x15[_0xb4cb[27]](_0x17f6x16)};return _0x17f6x15[_0xb4cb[29]](304)[_0xb4cb[28]]()}}function respondWithResult(_0x17f6x15,_0x17f6x16,_0x17f6x17){_0x17f6x16= _0x17f6x16|| 200;return function(_0x17f6x18){if(_0x17f6x18){logger[_0xb4cb[24]](_0xb4cb[22],_0x17f6x17,_0x17f6x16,_0xb4cb[30]);logger[_0xb4cb[26]](_0xb4cb[25],_0x17f6x17,_0x17f6x16,_0xb4cb[30],JSON[_0xb4cb[31]](_0x17f6x18));return _0x17f6x15[_0xb4cb[29]](_0x17f6x16)[_0xb4cb[32]](_0x17f6x18)};return _0x17f6x15[_0xb4cb[29]](304)[_0xb4cb[28]]()}}function respondWithFilteredResult(_0x17f6x15,_0x17f6x1b,_0x17f6x17){return function(_0x17f6x18){if(_0x17f6x18){var _0x17f6x1c=_0x17f6x18[_0xb4cb[33]],_0x17f6x1d=_0x17f6x1b[_0xb4cb[34]],_0x17f6x1e=_0x17f6x1b[_0xb4cb[34]]+ _0x17f6x1b[_0xb4cb[35]],_0x17f6x16;if(_0x17f6x1e>= _0x17f6x1c){_0x17f6x1e= _0x17f6x1c;_0x17f6x16= 200}else {_0x17f6x16= 206};_0x17f6x15[_0xb4cb[29]](_0x17f6x16);logger[_0xb4cb[24]](_0xb4cb[22],_0x17f6x17,_0x17f6x16,_0xb4cb[36]);logger[_0xb4cb[26]](_0xb4cb[25],_0x17f6x17,_0x17f6x16,_0xb4cb[30],JSON[_0xb4cb[31]](_0x17f6x18));return _0x17f6x15[_0xb4cb[40]](_0xb4cb[37],_0x17f6x1d+ _0xb4cb[38]+ _0x17f6x1e+ _0xb4cb[39]+ _0x17f6x1c)[_0xb4cb[32]](_0x17f6x18)};return null}}function patchUpdates(_0x17f6x20){return function(_0x17f6x18){try{jsonpatch[_0xb4cb[41]](_0x17f6x18,_0x17f6x20,true)}catch(err){return BPromise[_0xb4cb[42]](err)};return _0x17f6x18[_0xb4cb[43]]()}}function saveUpdates(_0x17f6x22,_0x17f6x16,_0x17f6x17){return function(_0x17f6x18){if(_0x17f6x18){return _0x17f6x18[_0xb4cb[46]](_0x17f6x22)[_0xb4cb[45]](function(_0x17f6x23){logger[_0xb4cb[24]](_0xb4cb[22],_0x17f6x17,_0x17f6x16,_0xb4cb[44]);logger[_0xb4cb[26]](_0xb4cb[25],_0x17f6x17,_0x17f6x16,_0xb4cb[44],JSON[_0xb4cb[31]](_0x17f6x18));return _0x17f6x23})};return null}}function removeEntity(_0x17f6x15,_0x17f6x16,_0x17f6x17){return function(_0x17f6x18){if(_0x17f6x18){return _0x17f6x18[_0xb4cb[48]]()[_0xb4cb[45]](function(){logger[_0xb4cb[24]](_0xb4cb[22],_0x17f6x17,_0x17f6x16,_0xb4cb[47]);logger[_0xb4cb[26]](_0xb4cb[25],_0x17f6x17,_0x17f6x16,_0xb4cb[47],JSON[_0xb4cb[31]](_0x17f6x18));_0x17f6x15[_0xb4cb[29]](204)[_0xb4cb[28]]()})}}}function handleEntityNotFound(_0x17f6x15,_0x17f6x16,_0x17f6x17){return function(_0x17f6x18){if(!_0x17f6x18){logger[_0xb4cb[50]](_0xb4cb[22],_0x17f6x17,404,_0xb4cb[49]);_0x17f6x15[_0xb4cb[29]](404)[_0xb4cb[28]]();return null};return _0x17f6x18}}function handleError(_0x17f6x15,_0x17f6x16,_0x17f6x17){_0x17f6x16= _0x17f6x16|| 500;return function(_0x17f6x27){logger[_0xb4cb[50]](_0xb4cb[22],_0x17f6x17,_0x17f6x16,JSON[_0xb4cb[31]](_0x17f6x27));delete _0x17f6x27[_0xb4cb[51]];_0x17f6x15[_0xb4cb[29]](_0x17f6x16)[_0xb4cb[52]](_0x17f6x27)}}exports[_0xb4cb[53]]= function(_0x17f6x28,_0x17f6x15){var _0x17f6x1b={},_0x17f6x29={};_0x17f6x29[_0xb4cb[54]]= _[_0xb4cb[57]](db[_0xb4cb[56]][_0xb4cb[55]]);_0x17f6x29[_0xb4cb[58]]= _[_0xb4cb[57]](_0x17f6x28[_0xb4cb[58]]);_0x17f6x29[_0xb4cb[59]]= _[_0xb4cb[60]](_0x17f6x29[_0xb4cb[54]],_0x17f6x29[_0xb4cb[58]]);_0x17f6x1b[_0xb4cb[61]]= _[_0xb4cb[60]](_0x17f6x29[_0xb4cb[54]],qs[_0xb4cb[62]](_0x17f6x28[_0xb4cb[58]][_0xb4cb[62]]));_0x17f6x1b[_0xb4cb[61]]= (_0x17f6x1b[_0xb4cb[61]][_0xb4cb[63]])?_0x17f6x1b[_0xb4cb[61]]:_0x17f6x29[_0xb4cb[54]];if(!_0x17f6x28[_0xb4cb[58]][_0xb4cb[65]](_0xb4cb[64])){_0x17f6x1b[_0xb4cb[35]]= qs[_0xb4cb[35]](_0x17f6x28[_0xb4cb[58]][_0xb4cb[35]]);_0x17f6x1b[_0xb4cb[34]]= qs[_0xb4cb[34]](_0x17f6x28[_0xb4cb[58]][_0xb4cb[34]])};_0x17f6x1b[_0xb4cb[66]]= qs[_0xb4cb[67]](_0x17f6x28[_0xb4cb[58]][_0xb4cb[67]]);_0x17f6x1b[_0xb4cb[68]]= qs[_0xb4cb[59]](_[_0xb4cb[69]](_0x17f6x28[_0xb4cb[58]],_0x17f6x29[_0xb4cb[59]]));if(_0x17f6x28[_0xb4cb[58]][_0xb4cb[70]]){_0x17f6x1b[_0xb4cb[68]]= _[_0xb4cb[73]](_0x17f6x1b[_0xb4cb[68]],{$or:_[_0xb4cb[72]](_0x17f6x1b[_0xb4cb[61]],function(_0x17f6x2a){var _0x17f6x2b={};_0x17f6x2b[_0x17f6x2a]= {$like:_0xb4cb[71]+ _0x17f6x28[_0xb4cb[58]][_0xb4cb[70]]+ _0xb4cb[71]};return _0x17f6x2b})})};_0x17f6x1b= _[_0xb4cb[73]]({},_0x17f6x1b,_0x17f6x28[_0xb4cb[74]]);return db[_0xb4cb[56]][_0xb4cb[76]](_0x17f6x1b)[_0xb4cb[45]](respondWithFilteredResult(_0x17f6x15,_0x17f6x1b,_0xb4cb[53]))[_0xb4cb[75]](handleError(_0x17f6x15,null,_0xb4cb[53]))};exports[_0xb4cb[77]]= function(_0x17f6x28,_0x17f6x15){var _0x17f6x1b={raw:true,where:{id:_0x17f6x28[_0xb4cb[79]][_0xb4cb[78]]}},_0x17f6x29={};_0x17f6x29[_0xb4cb[54]]= _[_0xb4cb[57]](db[_0xb4cb[56]][_0xb4cb[55]]);_0x17f6x29[_0xb4cb[58]]= _[_0xb4cb[57]](_0x17f6x28[_0xb4cb[58]]);_0x17f6x29[_0xb4cb[59]]= _[_0xb4cb[60]](_0x17f6x29[_0xb4cb[54]],_0x17f6x29[_0xb4cb[58]]);_0x17f6x1b[_0xb4cb[61]]= _[_0xb4cb[60]](_0x17f6x29[_0xb4cb[54]],qs[_0xb4cb[62]](_0x17f6x28[_0xb4cb[58]][_0xb4cb[62]]));_0x17f6x1b[_0xb4cb[61]]= (_0x17f6x1b[_0xb4cb[61]][_0xb4cb[63]])?_0x17f6x1b[_0xb4cb[61]]:_0x17f6x29[_0xb4cb[54]];_0x17f6x1b= _[_0xb4cb[73]]({},_0x17f6x1b,_0x17f6x28[_0xb4cb[74]]);return db[_0xb4cb[56]][_0xb4cb[80]](_0x17f6x1b)[_0xb4cb[45]](handleEntityNotFound(_0x17f6x15,null,_0xb4cb[77]))[_0xb4cb[45]](respondWithResult(_0x17f6x15,null,_0xb4cb[77]))[_0xb4cb[75]](handleError(_0x17f6x15,null,_0xb4cb[77]))};exports[_0xb4cb[46]]= function(_0x17f6x28,_0x17f6x15){if(_0x17f6x28[_0xb4cb[81]][_0xb4cb[78]]){delete _0x17f6x28[_0xb4cb[81]][_0xb4cb[78]]};return db[_0xb4cb[56]][_0xb4cb[80]]({where:{id:_0x17f6x28[_0xb4cb[79]][_0xb4cb[78]]}})[_0xb4cb[45]](handleEntityNotFound(_0x17f6x15,null,_0xb4cb[46]))[_0xb4cb[45]](saveUpdates(_0x17f6x28[_0xb4cb[81]],null,_0xb4cb[46]))[_0xb4cb[45]](respondWithResult(_0x17f6x15,null,_0xb4cb[46]))[_0xb4cb[75]](handleError(_0x17f6x15,null,_0xb4cb[46]))};exports[_0xb4cb[48]]= function(_0x17f6x28,_0x17f6x15){return db[_0xb4cb[56]][_0xb4cb[80]]({where:{id:_0x17f6x28[_0xb4cb[79]][_0xb4cb[78]]}})[_0xb4cb[45]](handleEntityNotFound(_0x17f6x15,null,_0xb4cb[48]))[_0xb4cb[45]](removeEntity(_0x17f6x15,null,_0xb4cb[48]))[_0xb4cb[75]](handleError(_0x17f6x15,null,_0xb4cb[48]))};exports[_0xb4cb[82]]= function(_0x17f6x28,_0x17f6x15){return db[_0xb4cb[56]][_0xb4cb[82]]()[_0xb4cb[45]](respondWithResult(_0x17f6x15,null,_0xb4cb[82]))[_0xb4cb[75]](handleError(_0x17f6x15,null,_0xb4cb[82]))}
\ No newline at end of file