Built motion from commit 9ab4571.|0.0.110
[motion.git] / server / api / salesforce_account / salesforce_account.controller.js
index ebf4a35..1b54281 100644 (file)
@@ -1 +1 @@
-var _0xcbc5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6A\x73\x66\x6F\x72\x63\x65","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x6E\x61\x6D\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x70\x65\x72\x5F\x70\x61\x67\x65","\x71\x75\x65\x72\x79","\x70\x61\x67\x65","\x6F\x72\x64\x65\x72","\x25\x73\x20\x25\x73","\x73\x6F\x72\x74\x5F\x62\x79","\x73\x6F\x72\x74\x5F\x6F\x72\x64\x65\x72","\x41\x53\x43","\x66\x6F\x72\x6D\x61\x74","\x24\x6F\x72","\x77\x68\x65\x72\x65","\x25","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x24","\x24\x6C\x69\x6B\x65","\x66\x6F\x72\x49\x6E","\x53\x6F\x6D\x65\x74\x68\x69\x6E\x67\x20\x62\x6C\x65\x77\x20\x75\x70\x21","\x63\x61\x74\x63\x68","\x63\x6F\x75\x6E\x74","\x63\x65\x69\x6C","\x6F\x66\x66\x73\x65\x74","\x25\x73\x3A\x2F\x2F\x25\x73\x25\x73\x3F\x70\x61\x67\x65\x3D\x25\x64","\x70\x72\x6F\x74\x6F\x63\x6F\x6C","\x68\x6F\x73\x74","\x68\x65\x61\x64\x65\x72\x73","\x62\x61\x73\x65\x55\x72\x6C","\x72\x6F\x77\x73","\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\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x63\x6C\x69\x65\x6E\x74\x49\x64","\x63\x6C\x69\x65\x6E\x74\x53\x65\x63\x72\x65\x74","\x73\x65\x63\x75\x72\x69\x74\x79\x54\x6F\x6B\x65\x6E","\x63\x6F\x6E\x63\x61\x74","\x70\x61\x73\x73\x77\x6F\x72\x64","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x6C\x6F\x67\x69\x6E","\x61\x63\x63\x6F\x75\x6E\x74\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x66\x69\x65\x6C\x64\x73","\x64\x65\x73\x63\x72\x69\x62\x65","\x54\x61\x73\x6B","\x73\x6F\x62\x6A\x65\x63\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79"];_0xcbc5[0];var _=require(_0xcbc5[1]);var util=require(_0xcbc5[2]);var jsforce=require(_0xcbc5[3]);var SalesforceAccount=require(_0xcbc5[5])[_0xcbc5[4]];function handleError(_0xc8ccx6,_0xc8ccx7){_0xc8ccx7=_0xc8ccx7||500;return function(_0xc8ccx8){_0xc8ccx6[_0xcbc5[7]](_0xc8ccx7)[_0xcbc5[6]](_0xc8ccx8)}}function responseWithResult(_0xc8ccx6,_0xc8ccx7){_0xc8ccx7=_0xc8ccx7||200;return function(_0xc8ccxa){if(_0xc8ccxa){_0xc8ccx6[_0xcbc5[7]](_0xc8ccx7)[_0xcbc5[8]](_0xc8ccxa)}}}function handleEntityNotFound(_0xc8ccx6){return function(_0xc8ccxa){if(!_0xc8ccxa){_0xc8ccx6[_0xcbc5[7]](404)[_0xcbc5[9]]();return null};return _0xc8ccxa}}function saveUpdates(_0xc8ccxd){return function(_0xc8ccxa){return _0xc8ccxa[_0xcbc5[11]](_0xc8ccxd)[_0xcbc5[10]](function(_0xc8ccxe){return _0xc8ccxe})}}function removeEntity(_0xc8ccx6){return function(_0xc8ccxa){if(_0xc8ccxa){return _0xc8ccxa[_0xcbc5[12]]()[_0xcbc5[10]](function(){_0xc8ccx6[_0xcbc5[7]](204)[_0xcbc5[9]]()})}}}exports[_0xcbc5[13]]=function(_0xc8ccx10,_0xc8ccx6){var _0xc8ccx11=[_0xcbc5[14],_0xcbc5[15],_0xcbc5[16],_0xcbc5[17]];var _0xc8ccx12=_0xc8ccx10[_0xcbc5[19]][_0xcbc5[18]]?parseInt(_0xc8ccx10[_0xcbc5[19]][_0xcbc5[18]],10):100;var _0xc8ccx13=_0xc8ccx10[_0xcbc5[19]][_0xcbc5[20]]?parseInt(_0xc8ccx10[_0xcbc5[19]][_0xcbc5[20]],10):0;var _0xc8ccx14={where:{},limit:_0xc8ccx12,offset:_0xc8ccx13*_0xc8ccx12};_[_0xcbc5[34]](_0xc8ccx10[_0xcbc5[19]],function(_0xc8ccx15,_0xc8ccx16){switch(_0xc8ccx16){case _0xcbc5[18]:;case _0xcbc5[20]:break;case _0xcbc5[23]:_0xc8ccx14[_0xcbc5[21]]=util[_0xcbc5[26]](_0xcbc5[22],_0xc8ccx10[_0xcbc5[19]][_0xcbc5[23]],_0xc8ccx10[_0xcbc5[19]][_0xcbc5[24]]||_0xcbc5[25])||null;break;case _0xcbc5[24]:break;case _0xcbc5[32]:_0xc8ccx14[_0xcbc5[28]][_0xcbc5[27]]=[];_0xc8ccx11[_0xcbc5[31]](function(_0xc8ccx17){var _0xc8ccx18={};_0xc8ccx18[_0xc8ccx17]={$like:_0xcbc5[29]+_0xc8ccx15+_0xcbc5[29]};_0xc8ccx14[_0xcbc5[28]][_0xcbc5[27]][_0xcbc5[30]](_0xc8ccx18)});break;default:_0xc8ccx14[_0xcbc5[28]][_0xc8ccx16]={$like:{}};_0xc8ccx14[_0xcbc5[28]][_0xc8ccx16][_0xcbc5[33]]=_0xcbc5[29]+_0xc8ccx15+_0xcbc5[29]}});SalesforceAccount[_0xcbc5[46]](_0xc8ccx14)[_0xcbc5[10]](function(_0xc8ccx19){var _0xc8ccx1a=Math[_0xcbc5[38]](_0xc8ccx19[_0xcbc5[37]]/_0xc8ccx12);var _0xc8ccx1b=_0xc8ccx1a>(_0xc8ccx14[_0xcbc5[39]]+1)?util[_0xcbc5[26]](_0xcbc5[40],_0xc8ccx10[_0xcbc5[41]],_0xc8ccx10[_0xcbc5[43]][_0xcbc5[42]],_0xc8ccx10[_0xcbc5[44]],_0xc8ccx13+1):null;var _0xc8ccx1c=_0xc8ccx13>0?util[_0xcbc5[26]](_0xcbc5[40],_0xc8ccx10[_0xcbc5[41]],_0xc8ccx10[_0xcbc5[43]][_0xcbc5[42]],_0xc8ccx10[_0xcbc5[44]],_0xc8ccx13-1):null;return _0xc8ccx6[_0xcbc5[7]](200)[_0xcbc5[6]]({count:_0xc8ccx19[_0xcbc5[37]],rows:_0xc8ccx19[_0xcbc5[45]],next_page:_0xc8ccx1b,previous_page:_0xc8ccx1c,total_pages:_0xc8ccx1a})})[_0xcbc5[36]](function(_0xc8ccx8){return _0xc8ccx6[_0xcbc5[7]](500)[_0xcbc5[6]]({error:_0xcbc5[35]})})};exports[_0xcbc5[47]]=function(_0xc8ccx10,_0xc8ccx6){SalesforceAccount[_0xcbc5[50]](_0xc8ccx10[_0xcbc5[49]][_0xcbc5[48]])[_0xcbc5[10]](handleEntityNotFound(_0xc8ccx6))[_0xcbc5[10]](responseWithResult(_0xc8ccx6))[_0xcbc5[36]](handleError(_0xc8ccx6))};exports[_0xcbc5[51]]=function(_0xc8ccx10,_0xc8ccx6){SalesforceAccount[_0xcbc5[51]](_0xc8ccx10[_0xcbc5[52]])[_0xcbc5[10]](responseWithResult(_0xc8ccx6,201))[_0xcbc5[36]](handleError(_0xc8ccx6))};exports[_0xcbc5[53]]=function(_0xc8ccx10,_0xc8ccx6){if(_0xc8ccx10[_0xcbc5[52]][_0xcbc5[48]]){delete _0xc8ccx10[_0xcbc5[52]][_0xcbc5[48]]};SalesforceAccount[_0xcbc5[50]](_0xc8ccx10[_0xcbc5[49]][_0xcbc5[48]])[_0xcbc5[10]](handleEntityNotFound(_0xc8ccx6))[_0xcbc5[10]](saveUpdates(_0xc8ccx10[_0xcbc5[52]]))[_0xcbc5[10]](responseWithResult(_0xc8ccx6))[_0xcbc5[36]](handleError(_0xc8ccx6))};exports[_0xcbc5[12]]=function(_0xc8ccx10,_0xc8ccx6){SalesforceAccount[_0xcbc5[50]](_0xc8ccx10[_0xcbc5[49]][_0xcbc5[48]])[_0xcbc5[10]](handleEntityNotFound(_0xc8ccx6))[_0xcbc5[10]](removeEntity(_0xc8ccx6))[_0xcbc5[36]](handleError(_0xc8ccx6))};exports[_0xcbc5[54]]=function(_0xc8ccx10,_0xc8ccx6){SalesforceAccount[_0xcbc5[50]](_0xc8ccx10[_0xcbc5[49]][_0xcbc5[48]])[_0xcbc5[10]](handleEntityNotFound(_0xc8ccx6))[_0xcbc5[10]](function(_0xc8ccx1d){var _0xc8ccx1e= new jsforce.Connection({oauth2:{loginUrl:_0xc8ccx1d[_0xcbc5[17]],clientId:_0xc8ccx1d[_0xcbc5[55]],clientSecret:_0xc8ccx1d[_0xcbc5[56]]}});var _0xc8ccx1f=_0xc8ccx1d[_0xcbc5[59]][_0xcbc5[58]](_0xc8ccx1d[_0xcbc5[57]]);_0xc8ccx1e[_0xcbc5[61]](_0xc8ccx1d[_0xcbc5[16]],_0xc8ccx1f,function(_0xc8ccx8,_0xc8ccx20){if(_0xc8ccx8){return _0xc8ccx6[_0xcbc5[7]](400)[_0xcbc5[6]](_0xc8ccx8)};return _0xc8ccx6[_0xcbc5[60]](200)})})[_0xcbc5[36]](handleError(_0xc8ccx6))};exports[_0xcbc5[62]]=function(_0xc8ccx10,_0xc8ccx6){var _0xc8ccx21={};_0xc8ccx21[_0xc8ccx10[_0xcbc5[49]][_0xcbc5[63]]]=_0xc8ccx10[_0xcbc5[52]][_0xcbc5[64]];SalesforceAccount[_0xcbc5[46]]({where:_0xc8ccx21})[_0xcbc5[10]](function(_0xc8ccx19){if(_0xc8ccx19[_0xcbc5[37]]){return _0xc8ccx6[_0xcbc5[7]](200)[_0xcbc5[6]]({isValid:false,value:_0xc8ccx10[_0xcbc5[52]][_0xcbc5[64]]})};return _0xc8ccx6[_0xcbc5[7]](200)[_0xcbc5[6]]({isValid:true,value:_0xc8ccx10[_0xcbc5[52]][_0xcbc5[64]]})})[_0xcbc5[36]](function(_0xc8ccx8){return handleError(_0xc8ccx6,_0xc8ccx8)})};exports[_0xcbc5[65]]=function(_0xc8ccx10,_0xc8ccx6){SalesforceAccount[_0xcbc5[50]](_0xc8ccx10[_0xcbc5[49]][_0xcbc5[48]])[_0xcbc5[10]](handleEntityNotFound(_0xc8ccx6))[_0xcbc5[10]](function(_0xc8ccx1d){var _0xc8ccx1e= new jsforce.Connection({oauth2:{loginUrl:_0xc8ccx1d[_0xcbc5[17]],clientId:_0xc8ccx1d[_0xcbc5[55]],clientSecret:_0xc8ccx1d[_0xcbc5[56]]}});var _0xc8ccx1f=_0xc8ccx1d[_0xcbc5[59]][_0xcbc5[58]](_0xc8ccx1d[_0xcbc5[57]]);_0xc8ccx1e[_0xcbc5[61]](_0xc8ccx1d[_0xcbc5[16]],_0xc8ccx1f,function(_0xc8ccx8,_0xc8ccx20){if(_0xc8ccx8){return _0xc8ccx6[_0xcbc5[7]](400)[_0xcbc5[6]](_0xc8ccx8)};_0xc8ccx1e[_0xcbc5[69]](_0xcbc5[68])[_0xcbc5[67]](function(_0xc8ccx8,_0xc8ccx22){if(_0xc8ccx8){return _0xc8ccx6[_0xcbc5[7]](400)[_0xcbc5[6]](_0xc8ccx8)};return _0xc8ccx6[_0xcbc5[7]](200)[_0xcbc5[6]](_0xc8ccx22[_0xcbc5[66]])})})})[_0xcbc5[36]](handleError(_0xc8ccx6))};exports[_0xcbc5[70]]=function(_0xc8ccx10,_0xc8ccx6){SalesforceAccount[_0xcbc5[12]]({where:{id:_0xc8ccx10[_0xcbc5[19]][_0xcbc5[48]]},individualHooks:true})[_0xcbc5[10]](function(){return _0xc8ccx6[_0xcbc5[60]](204)})[_0xcbc5[36]](function(_0xc8ccx8){return handleError(_0xc8ccx6,_0xc8ccx8)})}
\ No newline at end of file
+var _0xec53=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6A\x73\x66\x6F\x72\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\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","\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x63\x6C\x69\x65\x6E\x74\x49\x64","\x63\x6C\x69\x65\x6E\x74\x53\x65\x63\x72\x65\x74","\x73\x65\x63\x75\x72\x69\x74\x79\x54\x6F\x6B\x65\x6E","\x63\x6F\x6E\x63\x61\x74","\x70\x61\x73\x73\x77\x6F\x72\x64","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x6C\x6F\x67\x69\x6E","\x61\x63\x63\x6F\x75\x6E\x74\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x63\x6F\x75\x6E\x74","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x66\x69\x65\x6C\x64\x73","\x64\x65\x73\x63\x72\x69\x62\x65","\x54\x61\x73\x6B","\x73\x6F\x62\x6A\x65\x63\x74","\x67\x65\x74\x41\x63\x63\x6F\x75\x6E\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x61\x63\x63\x6F\x75\x6E\x74","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x63\x69\x64","\x64\x65\x73\x74\x72\x6F\x79\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x53\x75\x62\x6A\x65\x63\x74","\x73\x74\x72\x69\x6E\x67","\x5B\x78\x43\x41\x4C\x4C\x59\x20\x54\x61\x73\x6B\x5D","\x76\x61\x72\x69\x61\x62\x6C\x65","","\x71\x75\x65\x75\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x2A\x2A\x2A\x20\x43\x61\x6C\x6C\x20\x49\x6E\x66\x6F\x20\x2A\x2A\x2A","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x43\x61\x6C\x6C\x65\x72\x20\x4E\x75\x6D\x62\x65\x72\x3A","\x43\x61\x6C\x6C\x65\x72\x20\x4E\x61\x6D\x65\x3A","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x43\x61\x6C\x6C\x20\x54\x6F\x3A","\x64\x65\x73\x74\x65\x78\x74\x65\x6E","\x51\x75\x65\x75\x65\x3A","\x55\x6E\x69\x71\x75\x65\x49\x64\x3A","\x75\x6E\x69\x71\x75\x65\x69\x64","\x44\x61\x74\x65\x3A","\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64\x41\x74","\x2A\x2A\x2A\x20\x41\x67\x65\x6E\x74\x20\x49\x6E\x66\x6F\x20\x2A\x2A\x2A","\x41\x67\x65\x6E\x74\x20\x4E\x61\x6D\x65\x3A","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x41\x67\x65\x6E\x74\x20\x4E\x75\x6D\x62\x65\x72\x3A","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x2A\x2A\x2A\x20\x54\x69\x6D\x65\x20\x49\x6E\x66\x6F\x20\x2A\x2A\x2A","\x41\x67\x65\x6E\x74\x20\x52\x69\x6E\x67\x3A","\x41\x67\x65\x6E\x74\x20\x43\x6F\x6E\x6E\x65\x63\x74\x3A","\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74\x41\x74","\x41\x67\x65\x6E\x74\x20\x43\x6F\x6D\x70\x6C\x65\x74\x65\x3A","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x48\x6F\x6C\x64\x20\x54\x69\x6D\x65\x3A","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x54\x61\x6C\x6B\x20\x54\x69\x6D\x65\x3A","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x76\x6F\x69\x63\x65","\x43\x68\x61\x6E\x6E\x65\x6C\x20\x6E\x6F\x74\x20\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x3A","\x63\x68\x61\x6E\x6E\x65\x6C","\x6C\x6F\x67","\x63\x72\x65\x61\x74\x65\x46\x69\x65\x6C\x64","\x53\x75\x62\x6A\x65\x63\x74\x49\x64","\x73\x75\x62\x6A\x65\x63\x74","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x49\x64","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x46\x69\x65\x6C\x64\x49\x64","\x74\x79\x70\x65","\x75\x70\x64\x61\x74\x65\x46\x69\x65\x6C\x64","\x66\x69\x64","\x64\x65\x73\x74\x72\x6F\x79\x46\x69\x65\x6C\x64","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x54\x61\x67\x73","\x65\x72\x72\x6F\x72","\x73\x65\x74\x54\x61\x67\x73"];_0xec53[0];var _=require(_0xec53[1]);var util=require(_0xec53[2]);var jsforce=require(_0xec53[3]);var Util=require(_0xec53[4]);var SalesforceAccount=require(_0xec53[6])[_0xec53[5]];var SalesforceConfiguration=require(_0xec53[6])[_0xec53[7]];var SalesforceField=require(_0xec53[6])[_0xec53[8]];function handleError(_0x1047x9,_0x1047xa){_0x1047xa=_0x1047xa||500;return function(_0x1047xb){_0x1047x9[_0xec53[10]](_0x1047xa)[_0xec53[9]](_0x1047xb)}}function responseWithResult(_0x1047x9,_0x1047xa){_0x1047xa=_0x1047xa||200;return function(_0x1047xd){if(_0x1047xd){_0x1047x9[_0xec53[10]](_0x1047xa)[_0xec53[11]](_0x1047xd)}}}function responseWithoutResult(_0x1047x9,_0x1047xa){_0x1047xa=_0x1047xa||200;return function(){_0x1047x9[_0xec53[12]](_0x1047xa)}}function handleEntityNotFound(_0x1047x9){return function(_0x1047xd){if(!_0x1047xd){_0x1047x9[_0xec53[10]](404)[_0xec53[13]]();return null};return _0x1047xd}}function saveUpdates(_0x1047x11){return function(_0x1047xd){return _0x1047xd[_0xec53[15]](_0x1047x11)[_0xec53[14]](function(_0x1047x12){return _0x1047x12})}}function removeEntity(_0x1047x9){return function(_0x1047xd){if(_0x1047xd){return _0x1047xd[_0xec53[16]]()[_0xec53[14]](function(){_0x1047x9[_0xec53[10]](204)[_0xec53[13]]()})}}}exports[_0xec53[17]]=function(_0x1047x14,_0x1047x9,_0x1047x15){return SalesforceAccount[_0xec53[23]](_0xec53[22])[_0xec53[21]](Util[_0xec53[20]](_0x1047x14[_0xec53[19]]))[_0xec53[14]](responseWithResult(_0x1047x9))[_0xec53[18]](handleError(_0x1047x9))};exports[_0xec53[24]]=function(_0x1047x14,_0x1047x9){return SalesforceAccount[_0xec53[27]](_0x1047x14[_0xec53[26]][_0xec53[25]])[_0xec53[14]](handleEntityNotFound(_0x1047x9))[_0xec53[14]](responseWithResult(_0x1047x9))[_0xec53[18]](handleError(_0x1047x9))};exports[_0xec53[28]]=function(_0x1047x14,_0x1047x9){return SalesforceAccount[_0xec53[28]](_0x1047x14[_0xec53[29]])[_0xec53[14]](responseWithResult(_0x1047x9,201))[_0xec53[18]](handleError(_0x1047x9))};exports[_0xec53[30]]=function(_0x1047x14,_0x1047x9){if(_0x1047x14[_0xec53[29]][_0xec53[25]]){delete _0x1047x14[_0xec53[29]][_0xec53[25]]};return SalesforceAccount[_0xec53[27]](_0x1047x14[_0xec53[26]][_0xec53[25]])[_0xec53[14]](handleEntityNotFound(_0x1047x9))[_0xec53[14]](saveUpdates(_0x1047x14[_0xec53[29]]))[_0xec53[14]](responseWithResult(_0x1047x9))[_0xec53[18]](handleError(_0x1047x9))};exports[_0xec53[16]]=function(_0x1047x14,_0x1047x9){return SalesforceAccount[_0xec53[27]](_0x1047x14[_0xec53[26]][_0xec53[25]])[_0xec53[14]](handleEntityNotFound(_0x1047x9))[_0xec53[14]](removeEntity(_0x1047x9))[_0xec53[18]](handleError(_0x1047x9))};exports[_0xec53[31]]=function(_0x1047x14,_0x1047x9){return SalesforceAccount[_0xec53[16]]({where:{id:_0x1047x14[_0xec53[19]][_0xec53[32]]},individualHooks:true})[_0xec53[14]](responseWithResult(_0x1047x9,204))[_0xec53[18]](handleError(_0x1047x9))};exports[_0xec53[33]]=function(_0x1047x14,_0x1047x9){return SalesforceAccount[_0xec53[27]](_0x1047x14[_0xec53[26]][_0xec53[25]])[_0xec53[14]](handleEntityNotFound(_0x1047x9))[_0xec53[14]](function(_0x1047x16){var _0x1047x17= new jsforce.Connection({oauth2:{loginUrl:_0x1047x16[_0xec53[34]],clientId:_0x1047x16[_0xec53[35]],clientSecret:_0x1047x16[_0xec53[36]]}});var _0x1047x18=_0x1047x16[_0xec53[39]][_0xec53[38]](_0x1047x16[_0xec53[37]]);_0x1047x17[_0xec53[41]](_0x1047x16[_0xec53[40]],_0x1047x18,function(_0x1047xb,_0x1047x19){if(_0x1047xb){return _0x1047x9[_0xec53[10]](400)[_0xec53[9]](_0x1047xb)};return _0x1047x9[_0xec53[12]](200)})})[_0xec53[18]](handleError(_0x1047x9))};exports[_0xec53[42]]=function(_0x1047x14,_0x1047x9){var _0x1047x1a={};_0x1047x1a[_0x1047x14[_0xec53[26]][_0xec53[43]]]=_0x1047x14[_0xec53[29]][_0xec53[44]];return SalesforceAccount[_0xec53[21]]({where:_0x1047x1a})[_0xec53[14]](function(_0x1047x1b){if(_0x1047x1b[_0xec53[45]]){return _0x1047x9[_0xec53[10]](200)[_0xec53[9]]({isValid:false,value:_0x1047x14[_0xec53[29]][_0xec53[44]]})};return _0x1047x9[_0xec53[10]](200)[_0xec53[9]]({isValid:true,value:_0x1047x14[_0xec53[29]][_0xec53[44]]})})[_0xec53[18]](function(_0x1047xb){return handleError(_0x1047x9,_0x1047xb)})};exports[_0xec53[46]]=function(_0x1047x14,_0x1047x9){return SalesforceAccount[_0xec53[27]](_0x1047x14[_0xec53[26]][_0xec53[25]])[_0xec53[14]](handleEntityNotFound(_0x1047x9))[_0xec53[14]](function(_0x1047x16){var _0x1047x17= new jsforce.Connection({oauth2:{loginUrl:_0x1047x16[_0xec53[34]],clientId:_0x1047x16[_0xec53[35]],clientSecret:_0x1047x16[_0xec53[36]]}});var _0x1047x18=_0x1047x16[_0xec53[39]][_0xec53[38]](_0x1047x16[_0xec53[37]]);_0x1047x17[_0xec53[41]](_0x1047x16[_0xec53[40]],_0x1047x18,function(_0x1047xb,_0x1047x19){if(_0x1047xb){return _0x1047x9[_0xec53[10]](400)[_0xec53[9]](_0x1047xb)};_0x1047x17[_0xec53[50]](_0xec53[49])[_0xec53[48]](function(_0x1047xb,_0x1047x1c){if(_0x1047xb){return _0x1047x9[_0xec53[10]](400)[_0xec53[9]](_0x1047xb)};return _0x1047x9[_0xec53[10]](200)[_0xec53[9]](_0x1047x1c[_0xec53[47]])})})})[_0xec53[18]](handleError(_0x1047x9))};exports[_0xec53[51]]=function(_0x1047x14,_0x1047x9){return SalesforceConfiguration[_0xec53[23]]({method:[_0xec53[52],_0x1047x14[_0xec53[26]][_0xec53[25]]]})[_0xec53[21]](Util[_0xec53[20]](_0x1047x14[_0xec53[19]]))[_0xec53[14]](responseWithResult(_0x1047x9))[_0xec53[18]](handleError(_0x1047x9))};exports[_0xec53[53]]=function(_0x1047x14,_0x1047x9){return SalesforceConfiguration[_0xec53[23]]({method:[_0xec53[52],_0x1047x14[_0xec53[26]][_0xec53[25]]]})[_0xec53[27]](_0x1047x14[_0xec53[26]][_0xec53[54]])[_0xec53[14]](handleEntityNotFound(_0x1047x9))[_0xec53[14]](responseWithResult(_0x1047x9))[_0xec53[18]](handleError(_0x1047x9))};exports[_0xec53[55]]=function(_0x1047x14,_0x1047x9){return SalesforceConfiguration[_0xec53[23]]({method:[_0xec53[52],_0x1047x14[_0xec53[26]][_0xec53[25]]]})[_0xec53[27]](_0x1047x14[_0xec53[26]][_0xec53[54]])[_0xec53[14]](handleEntityNotFound(_0x1047x9))[_0xec53[14]](removeEntity(_0x1047x9))[_0xec53[18]](handleError(_0x1047x9))};exports[_0xec53[56]]=function(_0x1047x14,_0x1047x9){return SalesforceConfiguration[_0xec53[16]]({where:{id:_0x1047x14[_0xec53[19]][_0xec53[32]]},individualHooks:true})[_0xec53[14]](responseWithResult(_0x1047x9,204))[_0xec53[18]](handleError(_0x1047x9))};exports[_0xec53[57]]=function(_0x1047x14,_0x1047x9){_0x1047x14[_0xec53[29]][_0xec53[58]]=_0x1047x14[_0xec53[26]][_0xec53[25]];switch(_0x1047x14[_0xec53[29]][_0xec53[96]]){case _0xec53[94]:_0x1047x14[_0xec53[29]][_0xec53[59]]=[{"\x74\x79\x70\x65":_0xec53[60],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xec53[61],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0xec53[62],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xec53[63],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xec53[64]},{"\x74\x79\x70\x65":_0xec53[62],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xec53[63],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xec53[65]}];_0x1047x14[_0xec53[29]][_0xec53[66]]=[{"\x74\x79\x70\x65":_0xec53[60],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xec53[67],"\x6B\x65\x79":null,"\x6B\x65\x79\x54\x79\x70\x65":null,"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0xec53[68],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xec53[63],"\x6B\x65\x79":_0xec53[69],"\x6B\x65\x79\x54\x79\x70\x65":_0xec53[62],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xec53[65]},{"\x74\x79\x70\x65":_0xec53[68],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xec53[63],"\x6B\x65\x79":_0xec53[70],"\x6B\x65\x79\x54\x79\x70\x65":_0xec53[62],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xec53[71]},{"\x74\x79\x70\x65":_0xec53[68],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xec53[63],"\x6B\x65\x79":_0xec53[72],"\x6B\x65\x79\x54\x79\x70\x65":_0xec53[62],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xec53[73]},{"\x74\x79\x70\x65":_0xec53[68],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xec53[63],"\x6B\x65\x79":_0xec53[74],"\x6B\x65\x79\x54\x79\x70\x65":_0xec53[62],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xec53[64]},{"\x74\x79\x70\x65":_0xec53[68],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xec53[63],"\x6B\x65\x79":_0xec53[75],"\x6B\x65\x79\x54\x79\x70\x65":_0xec53[62],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xec53[76]},{"\x74\x79\x70\x65":_0xec53[68],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xec53[63],"\x6B\x65\x79":_0xec53[77],"\x6B\x65\x79\x54\x79\x70\x65":_0xec53[62],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xec53[78]},{"\x74\x79\x70\x65":_0xec53[60],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xec53[79],"\x6B\x65\x79":null,"\x6B\x65\x79\x54\x79\x70\x65":null,"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0xec53[68],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xec53[63],"\x6B\x65\x79":_0xec53[80],"\x6B\x65\x79\x54\x79\x70\x65":_0xec53[62],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xec53[81]},{"\x74\x79\x70\x65":_0xec53[68],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xec53[63],"\x6B\x65\x79":_0xec53[82],"\x6B\x65\x79\x54\x79\x70\x65":_0xec53[62],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xec53[83]},{"\x74\x79\x70\x65":_0xec53[60],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xec53[84],"\x6B\x65\x79":null,"\x6B\x65\x79\x54\x79\x70\x65":null,"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0xec53[68],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xec53[63],"\x6B\x65\x79":_0xec53[85],"\x6B\x65\x79\x54\x79\x70\x65":_0xec53[62],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xec53[78]},{"\x74\x79\x70\x65":_0xec53[68],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xec53[63],"\x6B\x65\x79":_0xec53[86],"\x6B\x65\x79\x54\x79\x70\x65":_0xec53[62],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xec53[87]},{"\x74\x79\x70\x65":_0xec53[68],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xec53[63],"\x6B\x65\x79":_0xec53[88],"\x6B\x65\x79\x54\x79\x70\x65":_0xec53[62],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xec53[89]},{"\x74\x79\x70\x65":_0xec53[68],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xec53[63],"\x6B\x65\x79":_0xec53[90],"\x6B\x65\x79\x54\x79\x70\x65":_0xec53[62],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xec53[91]},{"\x74\x79\x70\x65":_0xec53[68],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xec53[63],"\x6B\x65\x79":_0xec53[92],"\x6B\x65\x79\x54\x79\x70\x65":_0xec53[62],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xec53[93]}];break;default:console[_0xec53[97]](_0xec53[95],_0x1047x14[_0xec53[29]][_0xec53[96]])};delete _0x1047x14[_0xec53[29]][_0xec53[96]];return SalesforceConfiguration[_0xec53[28]](_0x1047x14[_0xec53[29]],{include:[{model:SalesforceField,as:_0xec53[59]},{model:SalesforceField,as:_0xec53[66]}]})[_0xec53[14]](responseWithResult(_0x1047x9,201))[_0xec53[18]](handleError(_0x1047x9))};exports[_0xec53[98]]=function(_0x1047x14,_0x1047x9){return SalesforceConfiguration[_0xec53[23]]({method:[_0xec53[52],_0x1047x14[_0xec53[26]][_0xec53[25]]]})[_0xec53[27]](_0x1047x14[_0xec53[26]][_0xec53[54]])[_0xec53[14]](handleEntityNotFound(_0x1047x9))[_0xec53[14]](function(_0x1047x1d){switch(_0x1047x14[_0xec53[26]][_0xec53[104]]){case _0xec53[100]:_0x1047x14[_0xec53[29]][_0xec53[99]]=_0x1047x14[_0xec53[26]][_0xec53[54]];break;case _0xec53[102]:_0x1047x14[_0xec53[29]][_0xec53[101]]=_0x1047x14[_0xec53[26]][_0xec53[54]];break;case _0xec53[43]:_0x1047x14[_0xec53[29]][_0xec53[103]]=_0x1047x14[_0xec53[26]][_0xec53[54]];break};return SalesforceField[_0xec53[28]](_0x1047x14[_0xec53[29]])})[_0xec53[14]](responseWithResult(_0x1047x9,201))[_0xec53[18]](handleError(_0x1047x9))};exports[_0xec53[105]]=function(_0x1047x14,_0x1047x9){if(_0x1047x14[_0xec53[29]][_0xec53[25]]){delete _0x1047x14[_0xec53[29]][_0xec53[25]]};return SalesforceField[_0xec53[27]](_0x1047x14[_0xec53[26]][_0xec53[106]])[_0xec53[14]](handleEntityNotFound(_0x1047x9))[_0xec53[14]](saveUpdates(_0x1047x14[_0xec53[29]]))[_0xec53[14]](responseWithResult(_0x1047x9))[_0xec53[18]](handleError(_0x1047x9))};exports[_0xec53[107]]=function(_0x1047x14,_0x1047x9){return SalesforceField[_0xec53[27]](_0x1047x14[_0xec53[26]][_0xec53[106]])[_0xec53[14]](handleEntityNotFound(_0x1047x9))[_0xec53[14]](removeEntity(_0x1047x9))[_0xec53[18]](handleError(_0x1047x9))};exports[_0xec53[108]]=function(_0x1047x14,_0x1047x9,_0x1047x15){return SalesforceConfiguration[_0xec53[27]](_0x1047x14[_0xec53[26]][_0xec53[54]])[_0xec53[14]](handleEntityNotFound(_0x1047x9))[_0xec53[14]](function(_0x1047x1d){return _0x1047x1d[_0xec53[110]](_0x1047x14[_0xec53[29]])})[_0xec53[14]](responseWithoutResult(_0x1047x9,200))[_0xec53[18]](function(_0x1047xb){console[_0xec53[109]](_0x1047xb);return handleError(_0x1047x9,_0x1047xb)})}
\ No newline at end of file