Built motion from commit f861bcb808219e66da88ba48b61bddb35224a65e. Version 3.0.0...
[motion-next.git] / server / components / import / cm / csv / utils.js
index f434154..0f74512 100644 (file)
@@ -1 +1 @@
-const a996_0x5d6a=['reason','exports','4xSoPNM','ListId\x20is\x20mandatory','pathExists','1wSvNzL','30VxWboA','body-parse','File\x20does\x20not\x20exist:\x20','425294vtRydB','40552JnrEmM','1nesXWZ','phone\x20is\x20mandatory','40720dCcjsW','firstName\x20is\x20mandatory','binding\x20does\x20not\x20exists','arguments\x20<filename>\x20<parameters>\x20<agents>','335NjtsKO','23905NXaAeP','binding','135214HGpeHH','No\x20agents\x20available','firstName','length','parseAndValidateArguments','126491YEVbCy','1265sqrarl','ListId'];const a996_0x1de3=function(_0x5a583e,_0x924721){_0x5a583e=_0x5a583e-0x1ef;let _0x5d6a0b=a996_0x5d6a[_0x5a583e];return _0x5d6a0b;};const a996_0xeef882=a996_0x1de3;(function(_0x49f808,_0x7df308){const _0x3df5a5=a996_0x1de3;while(!![]){try{const _0x75d5bd=parseInt(_0x3df5a5(0x203))*-parseInt(_0x3df5a5(0x1f0))+-parseInt(_0x3df5a5(0x1fb))*parseInt(_0x3df5a5(0x1fd))+parseInt(_0x3df5a5(0x1f7))*-parseInt(_0x3df5a5(0x1ef))+parseInt(_0x3df5a5(0x1ff))+parseInt(_0x3df5a5(0x1f4))*parseInt(_0x3df5a5(0x206))+-parseInt(_0x3df5a5(0x1fc))+-parseInt(_0x3df5a5(0x1f8))*-parseInt(_0x3df5a5(0x204));if(_0x75d5bd===_0x7df308)break;else _0x49f808['push'](_0x49f808['shift']());}catch(_0x179e59){_0x49f808['push'](_0x49f808['shift']());}}}(a996_0x5d6a,0x44ff6));const fs=require('fs-extra');async function parseAndValidateArguments(_0x314a7d,_0x55375a,_0xcc7b65){const _0x595df5=a996_0x1de3,_0x382b9f=[...arguments];if(_0x382b9f[_0x595df5(0x209)]!==0x3)throw new Error(_0x595df5(0x202));const _0x2ccd89=await fs[_0x595df5(0x1f6)](_0x314a7d);if(!_0x2ccd89)throw new Error(_0x595df5(0x1fa)+_0x314a7d);let _0x169cd7={},_0x1b4f74=0x0,_0x2cf3d8=[],_0xe40969=![];const _0x459960=[];try{_0x169cd7=JSON['parse'](_0x55375a);if(!_0x169cd7[_0x595df5(0x205)])throw new Error(_0x595df5(0x201));if(!_0x169cd7[_0x595df5(0x205)]['phone'])throw new Error(_0x595df5(0x1fe));if(!_0x169cd7[_0x595df5(0x205)][_0x595df5(0x208)])throw new Error(_0x595df5(0x200));_0x169cd7[_0x595df5(0x205)]['UserId']&&(_0x1b4f74=0x1);if(!_0x169cd7[_0x595df5(0x1f1)])throw new Error(_0x595df5(0x1f5));_0xe40969=!![],_0x2cf3d8=JSON['parse'](_0xcc7b65)['map'](_0x4a2758=>_0x4a2758['id']);}catch(_0x5df2ed){if(!_0xe40969){_0x5df2ed[_0x595df5(0x1f2)]=_0x595df5(0x1f9);throw _0x5df2ed;}else _0x459960['push'](_0x595df5(0x207));}return{'validatedFullFilePath':_0x314a7d,'body':_0x169cd7,'agents':_0x2cf3d8,'recallme':_0x1b4f74,'warnings':_0x459960};}module[a996_0xeef882(0x1f3)][a996_0xeef882(0x20a)]=parseAndValidateArguments;
\ No newline at end of file
+const a1003_0x34bb=['2wTMfav','437677xvAhVh','reason','29uYXQTu','arguments\x20<filename>\x20<parameters>\x20<agents>','231746ZRxgFC','1100311cBMTnP','8947qdMmmp','map','parse','body-parse','fs-extra','phone','parseAndValidateArguments','ListId\x20is\x20mandatory','ListId','File\x20does\x20not\x20exist:\x20','1fomOkh','binding','exports','push','939019zIrtYS','phone\x20is\x20mandatory','1801rdDnPJ','397357SmjWBF','470gEsffN'];const a1003_0x3700=function(_0x462703,_0x31351f){_0x462703=_0x462703-0x144;let _0x34bbe5=a1003_0x34bb[_0x462703];return _0x34bbe5;};const a1003_0x565f9d=a1003_0x3700;(function(_0x9bf846,_0x7d2ccf){const _0x520100=a1003_0x3700;while(!![]){try{const _0xcf308e=parseInt(_0x520100(0x157))+-parseInt(_0x520100(0x14d))*parseInt(_0x520100(0x149))+-parseInt(_0x520100(0x158))+-parseInt(_0x520100(0x159))*-parseInt(_0x520100(0x155))+-parseInt(_0x520100(0x14f))*-parseInt(_0x520100(0x151))+parseInt(_0x520100(0x150))+-parseInt(_0x520100(0x153))*-parseInt(_0x520100(0x152));if(_0xcf308e===_0x7d2ccf)break;else _0x9bf846['push'](_0x9bf846['shift']());}catch(_0x3fd083){_0x9bf846['push'](_0x9bf846['shift']());}}}(a1003_0x34bb,0x8b6b4));const fs=require(a1003_0x565f9d(0x15d));async function parseAndValidateArguments(_0x280686,_0x634755,_0x5effee){const _0x1f9629=a1003_0x565f9d,_0x365fe5=[...arguments];if(_0x365fe5['length']!==0x3)throw new Error(_0x1f9629(0x156));const _0x5a5437=await fs['pathExists'](_0x280686);if(!_0x5a5437)throw new Error(_0x1f9629(0x148)+_0x280686);let _0x3b6b46={},_0x54cc03=0x0,_0x88e156=[],_0x523fae=![];const _0x2d9e7e=[];try{_0x3b6b46=JSON[_0x1f9629(0x15b)](_0x634755);if(!_0x3b6b46[_0x1f9629(0x14a)])throw new Error('binding\x20does\x20not\x20exists');if(!_0x3b6b46[_0x1f9629(0x14a)][_0x1f9629(0x144)])throw new Error(_0x1f9629(0x14e));if(!_0x3b6b46[_0x1f9629(0x14a)]['firstName'])throw new Error('firstName\x20is\x20mandatory');_0x3b6b46[_0x1f9629(0x14a)]['UserId']&&(_0x54cc03=0x1);if(!_0x3b6b46[_0x1f9629(0x147)])throw new Error(_0x1f9629(0x146));_0x523fae=!![],_0x88e156=JSON[_0x1f9629(0x15b)](_0x5effee)[_0x1f9629(0x15a)](_0x6d4ca1=>_0x6d4ca1['id']);}catch(_0x522c41){if(!_0x523fae){_0x522c41[_0x1f9629(0x154)]=_0x1f9629(0x15c);throw _0x522c41;}else _0x2d9e7e[_0x1f9629(0x14c)]('No\x20agents\x20available');}return{'validatedFullFilePath':_0x280686,'body':_0x3b6b46,'agents':_0x88e156,'recallme':_0x54cc03,'warnings':_0x2d9e7e};}module[a1003_0x565f9d(0x14b)][a1003_0x565f9d(0x145)]=parseAndValidateArguments;
\ No newline at end of file