Built motion from commit d13e3c905.|1.0.24
[motion.git] / server / config / interval / index.js
index a7e8511..74d98c9 100644 (file)
@@ -1 +1 @@
-var _0x33b0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x66\x73\x2D\x65\x78\x74\x72\x61","\x6D\x6F\x74\x69\x6F\x6E","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D","\x69\x73\x56\x61\x6C\x69\x64","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x64\x61\x79\x53\x74\x61\x72\x74","\x65\x6E\x64\x4F\x66","\x64\x61\x79\x45\x6E\x64","\x2C","\x73\x70\x6C\x69\x74","\x2A","\x2D","\x74\x5F\x66\x72\x6F\x6D","\x48\x48\x3A\x6D\x6D","\x74\x5F\x74\x6F","\x77\x64\x5F\x66\x72\x6F\x6D","\x77\x64\x5F\x74\x6F","\x6D\x64\x5F\x66\x72\x6F\x6D","\x6D\x64\x5F\x74\x6F","\x6D\x5F\x66\x72\x6F\x6D","\x6D\x5F\x74\x6F","\x66\x6F\x72\x45\x61\x63\x68","\x66\x6F\x72\x6D\x61\x74","\x45","\x44","\x4D","\x70\x75\x73\x68","\x69\x73\x41\x66\x74\x65\x72","\x5B\x5D","\x69\x73\x42\x65\x74\x77\x65\x65\x6E","\x66\x69\x6C\x74\x65\x72","\x69\x6E\x64\x65\x78\x4F\x66","\x65\x78\x70\x6F\x72\x74\x73"];_0x33b0[0];var _=require(_0x33b0[1]);var moment=require(_0x33b0[2]);var request=require(_0x33b0[3]);var fs=require(_0x33b0[4]);var logger=require(_0x33b0[6])(_0x33b0[5]);var weekDaysCollection={mon:1,tue:2,wed:3,thu:4,fri:5,sat:6,sun:7};var monthsCollection={jan:1,feb:2,mar:3,apr:4,may:5,jun:6,jul:7,aug:8,sep:9,oct:10,nov:11,dec:12};var getDate=function(_0xc95fx9,_0xc95fxa){var _0xc95fxb=_0x33b0[7];if(moment(_0xc95fx9,_0xc95fxb,true)[_0x33b0[8]]()){return moment(_0xc95fx9)}else {switch(_0xc95fxa){case _0x33b0[11]:return moment(_0xc95fx9)[_0x33b0[10]](_0x33b0[9]);case _0x33b0[13]:return moment(_0xc95fx9)[_0x33b0[12]](_0x33b0[9]);default:return moment(_0xc95fx9)}}};function splitInterval(_0xc95fxd){var _0xc95fxe={};var _0xc95fxf=_0xc95fxd[_0x33b0[15]](_0x33b0[14]);var _0xc95fx10;_0xc95fxf[_0x33b0[27]](function(_0xc95fx11,_0xc95fx12){switch(_0xc95fx12){case 0:if(_0xc95fx11!== _0x33b0[16]){_0xc95fx10= _0xc95fx11[_0x33b0[15]](_0x33b0[17]);_0xc95fxe[_0x33b0[18]]= moment(_0xc95fx10[0],_0x33b0[19]);_0xc95fxe[_0x33b0[20]]= moment(_0xc95fx10[1],_0x33b0[19])}else {_0xc95fxe[_0x33b0[18]]= null;_0xc95fxe[_0x33b0[20]]= null};break;case 1:if(_0xc95fx11!== _0x33b0[16]){_0xc95fx10= _0xc95fx11[_0x33b0[15]](_0x33b0[17]);_0xc95fxe[_0x33b0[21]]= Number(weekDaysCollection[_0xc95fx10[0]]);_0xc95fxe[_0x33b0[22]]= _0xc95fx10[1]?Number(weekDaysCollection[_0xc95fx10[1]]):null}else {_0xc95fxe[_0x33b0[21]]= null;_0xc95fxe[_0x33b0[22]]= null};break;case 2:if(_0xc95fx11!== _0x33b0[16]){_0xc95fx10= _0xc95fx11[_0x33b0[15]](_0x33b0[17]);_0xc95fxe[_0x33b0[23]]= Number(_0xc95fx10[0]);_0xc95fxe[_0x33b0[24]]= _0xc95fx10[1]?Number(_0xc95fx10[1]):null}else {_0xc95fxe[_0x33b0[23]]= null;_0xc95fxe[_0x33b0[24]]= null};break;case 3:if(_0xc95fx11!== _0x33b0[16]){_0xc95fx10= _0xc95fx11[_0x33b0[15]](_0x33b0[17]);_0xc95fxe[_0x33b0[25]]= Number(monthsCollection[_0xc95fx10[0]]);_0xc95fxe[_0x33b0[26]]= _0xc95fx10[1]?Number(monthsCollection[_0xc95fx10[1]]):null}else {_0xc95fxe[_0x33b0[25]]= null;_0xc95fxe[_0x33b0[26]]= null};break;default:}});return _0xc95fxe}function isIntervalValid(_0xc95fxd){var _0xc95fx14=moment()[_0x33b0[28]](_0x33b0[19]);var _0xc95fx15=moment()[_0x33b0[28]](_0x33b0[29]);var _0xc95fx16=moment()[_0x33b0[28]](_0x33b0[30]);var _0xc95fx17=moment()[_0x33b0[28]](_0x33b0[31]);var _0xc95fx18,_0xc95fx19,_0xc95fx1a,_0xc95fx1b;var _0xc95fx1c=[1,2,3,4,5,6,7,8,9,10,11,12];var _0xc95fx1d=[1,2,3,4,5,6,7];var _0xc95fx1e=[];for(var _0xc95fx1f=1;_0xc95fx1f<= 31;_0xc95fx1f++){_0xc95fx1e[_0x33b0[32]](_0xc95fx1f)};if(_0xc95fxd[_0x33b0[18]]&& _0xc95fxd[_0x33b0[20]]){if(_0xc95fxd[_0x33b0[20]][_0x33b0[33]](_0xc95fxd[_0x33b0[18]])){_0xc95fx18= moment(_0xc95fx14,_0x33b0[19])[_0x33b0[35]](_0xc95fxd[_0x33b0[18]],_0xc95fxd[_0x33b0[20]],null,_0x33b0[34])}else {_0xc95fx18=  !moment(_0xc95fx14,_0x33b0[19])[_0x33b0[35]](_0xc95fxd[_0x33b0[20]],_0xc95fxd[_0x33b0[18]],null,_0x33b0[34])}}else {_0xc95fx18= true};if(_0xc95fxd[_0x33b0[21]]){if(_0xc95fxd[_0x33b0[22]]&& _0xc95fxd[_0x33b0[22]]!== _0xc95fxd[_0x33b0[21]]){var _0xc95fx20=_[_0x33b0[36]](_0xc95fx1d,function(_0xc95fx21){if(_0xc95fxd[_0x33b0[21]]< _0xc95fxd[_0x33b0[22]]){return (_0xc95fx21>= _0xc95fxd[_0x33b0[21]])&& (_0xc95fx21<= _0xc95fxd[_0x33b0[22]])}else {return (1<= _0xc95fx21&& _0xc95fx21<= _0xc95fxd[_0x33b0[22]])|| (_0xc95fxd[_0x33b0[21]]<= _0xc95fx21&& _0xc95fx21<= 7)}});_0xc95fx19= (_0xc95fx20[_0x33b0[37]](parseInt(_0xc95fx15))!==  -1)?true:false}else {_0xc95fx19= (parseInt(_0xc95fx15)=== _0xc95fxd[_0x33b0[21]])?true:false}}else {_0xc95fx19= true};if(_0xc95fxd[_0x33b0[23]]){if(_0xc95fxd[_0x33b0[24]]&& _0xc95fxd[_0x33b0[24]]!== _0xc95fxd[_0x33b0[23]]){var _0xc95fx22=_[_0x33b0[36]](_0xc95fx1e,function(_0xc95fx21){if(_0xc95fxd[_0x33b0[23]]< _0xc95fxd[_0x33b0[24]]){return (_0xc95fx21>= _0xc95fxd[_0x33b0[23]])&& (_0xc95fx21<= _0xc95fxd[_0x33b0[24]])}else {return (1<= _0xc95fx21&& _0xc95fx21<= _0xc95fxd[_0x33b0[24]])|| (_0xc95fxd[_0x33b0[23]]<= _0xc95fx21&& _0xc95fx21<= 7)}});_0xc95fx1a= (_0xc95fx22[_0x33b0[37]](parseInt(_0xc95fx16))!==  -1)?true:false}else {_0xc95fx1a= (parseInt(_0xc95fx16)=== _0xc95fxd[_0x33b0[23]])?true:false}}else {_0xc95fx1a= true};if(_0xc95fxd[_0x33b0[25]]){if(_0xc95fxd[_0x33b0[26]]&& _0xc95fxd[_0x33b0[26]]!== _0xc95fxd[_0x33b0[25]]){var _0xc95fx23=_[_0x33b0[36]](_0xc95fx1c,function(_0xc95fx21){if(_0xc95fxd[_0x33b0[25]]< _0xc95fxd[_0x33b0[26]]){return (_0xc95fx21>= _0xc95fxd[_0x33b0[25]])&& (_0xc95fx21<= _0xc95fxd[_0x33b0[26]])}else {return (1<= _0xc95fx21&& _0xc95fx21<= _0xc95fxd[_0x33b0[26]])|| (_0xc95fxd[_0x33b0[25]]<= _0xc95fx21&& _0xc95fx21<= 7)}});_0xc95fx1b= (_0xc95fx23[_0x33b0[37]](parseInt(_0xc95fx17))!==  -1)?true:false}else {_0xc95fx1b= (parseInt(_0xc95fx17)=== _0xc95fxd[_0x33b0[25]])?true:false}}else {_0xc95fx1b= true};return _0xc95fx18&& _0xc95fx19&& _0xc95fx1a&& _0xc95fx1b}module[_0x33b0[38]]= {splitInterval:splitInterval,isValidInterval:isIntervalValid}
\ No newline at end of file
+var _0xd05d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x66\x73\x2D\x65\x78\x74\x72\x61","\x6D\x6F\x74\x69\x6F\x6E","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D","\x69\x73\x56\x61\x6C\x69\x64","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x64\x61\x79\x53\x74\x61\x72\x74","\x65\x6E\x64\x4F\x66","\x64\x61\x79\x45\x6E\x64","\x2C","\x73\x70\x6C\x69\x74","\x2A","\x2D","\x74\x5F\x66\x72\x6F\x6D","\x48\x48\x3A\x6D\x6D","\x74\x5F\x74\x6F","\x77\x64\x5F\x66\x72\x6F\x6D","\x77\x64\x5F\x74\x6F","\x6D\x64\x5F\x66\x72\x6F\x6D","\x6D\x64\x5F\x74\x6F","\x6D\x5F\x66\x72\x6F\x6D","\x6D\x5F\x74\x6F","\x66\x6F\x72\x45\x61\x63\x68","\x66\x6F\x72\x6D\x61\x74","\x45","\x44","\x4D","\x70\x75\x73\x68","\x69\x73\x41\x66\x74\x65\x72","\x5B\x5D","\x69\x73\x42\x65\x74\x77\x65\x65\x6E","\x66\x69\x6C\x74\x65\x72","\x69\x6E\x64\x65\x78\x4F\x66","\x65\x78\x70\x6F\x72\x74\x73"];_0xd05d[0];var _=require(_0xd05d[1]);var moment=require(_0xd05d[2]);var request=require(_0xd05d[3]);var fs=require(_0xd05d[4]);var logger=require(_0xd05d[6])(_0xd05d[5]);var weekDaysCollection={mon:1,tue:2,wed:3,thu:4,fri:5,sat:6,sun:7};var monthsCollection={jan:1,feb:2,mar:3,apr:4,may:5,jun:6,jul:7,aug:8,sep:9,oct:10,nov:11,dec:12};var getDate=function(_0xe79fx9,_0xe79fxa){var _0xe79fxb=_0xd05d[7];if(moment(_0xe79fx9,_0xe79fxb,true)[_0xd05d[8]]()){return moment(_0xe79fx9)}else {switch(_0xe79fxa){case _0xd05d[11]:return moment(_0xe79fx9)[_0xd05d[10]](_0xd05d[9]);case _0xd05d[13]:return moment(_0xe79fx9)[_0xd05d[12]](_0xd05d[9]);default:return moment(_0xe79fx9)}}};function splitInterval(_0xe79fxd){var _0xe79fxe={};var _0xe79fxf=_0xe79fxd[_0xd05d[15]](_0xd05d[14]);var _0xe79fx10;_0xe79fxf[_0xd05d[27]](function(_0xe79fx11,_0xe79fx12){switch(_0xe79fx12){case 0:if(_0xe79fx11!== _0xd05d[16]){_0xe79fx10= _0xe79fx11[_0xd05d[15]](_0xd05d[17]);_0xe79fxe[_0xd05d[18]]= moment(_0xe79fx10[0],_0xd05d[19]);_0xe79fxe[_0xd05d[20]]= moment(_0xe79fx10[1],_0xd05d[19])}else {_0xe79fxe[_0xd05d[18]]= null;_0xe79fxe[_0xd05d[20]]= null};break;case 1:if(_0xe79fx11!== _0xd05d[16]){_0xe79fx10= _0xe79fx11[_0xd05d[15]](_0xd05d[17]);_0xe79fxe[_0xd05d[21]]= Number(weekDaysCollection[_0xe79fx10[0]]);_0xe79fxe[_0xd05d[22]]= _0xe79fx10[1]?Number(weekDaysCollection[_0xe79fx10[1]]):null}else {_0xe79fxe[_0xd05d[21]]= null;_0xe79fxe[_0xd05d[22]]= null};break;case 2:if(_0xe79fx11!== _0xd05d[16]){_0xe79fx10= _0xe79fx11[_0xd05d[15]](_0xd05d[17]);_0xe79fxe[_0xd05d[23]]= Number(_0xe79fx10[0]);_0xe79fxe[_0xd05d[24]]= _0xe79fx10[1]?Number(_0xe79fx10[1]):null}else {_0xe79fxe[_0xd05d[23]]= null;_0xe79fxe[_0xd05d[24]]= null};break;case 3:if(_0xe79fx11!== _0xd05d[16]){_0xe79fx10= _0xe79fx11[_0xd05d[15]](_0xd05d[17]);_0xe79fxe[_0xd05d[25]]= Number(monthsCollection[_0xe79fx10[0]]);_0xe79fxe[_0xd05d[26]]= _0xe79fx10[1]?Number(monthsCollection[_0xe79fx10[1]]):null}else {_0xe79fxe[_0xd05d[25]]= null;_0xe79fxe[_0xd05d[26]]= null};break;default:}});return _0xe79fxe}function isIntervalValid(_0xe79fxd){var _0xe79fx14=moment()[_0xd05d[28]](_0xd05d[19]);var _0xe79fx15=moment()[_0xd05d[28]](_0xd05d[29]);var _0xe79fx16=moment()[_0xd05d[28]](_0xd05d[30]);var _0xe79fx17=moment()[_0xd05d[28]](_0xd05d[31]);var _0xe79fx18,_0xe79fx19,_0xe79fx1a,_0xe79fx1b;var _0xe79fx1c=[1,2,3,4,5,6,7,8,9,10,11,12];var _0xe79fx1d=[1,2,3,4,5,6,7];var _0xe79fx1e=[];for(var _0xe79fx1f=1;_0xe79fx1f<= 31;_0xe79fx1f++){_0xe79fx1e[_0xd05d[32]](_0xe79fx1f)};if(_0xe79fxd[_0xd05d[18]]&& _0xe79fxd[_0xd05d[20]]){if(_0xe79fxd[_0xd05d[20]][_0xd05d[33]](_0xe79fxd[_0xd05d[18]])){_0xe79fx18= moment(_0xe79fx14,_0xd05d[19])[_0xd05d[35]](_0xe79fxd[_0xd05d[18]],_0xe79fxd[_0xd05d[20]],null,_0xd05d[34])}else {_0xe79fx18=  !moment(_0xe79fx14,_0xd05d[19])[_0xd05d[35]](_0xe79fxd[_0xd05d[20]],_0xe79fxd[_0xd05d[18]],null,_0xd05d[34])}}else {_0xe79fx18= true};if(_0xe79fxd[_0xd05d[21]]){if(_0xe79fxd[_0xd05d[22]]&& _0xe79fxd[_0xd05d[22]]!== _0xe79fxd[_0xd05d[21]]){var _0xe79fx20=_[_0xd05d[36]](_0xe79fx1d,function(_0xe79fx21){if(_0xe79fxd[_0xd05d[21]]< _0xe79fxd[_0xd05d[22]]){return (_0xe79fx21>= _0xe79fxd[_0xd05d[21]])&& (_0xe79fx21<= _0xe79fxd[_0xd05d[22]])}else {return (1<= _0xe79fx21&& _0xe79fx21<= _0xe79fxd[_0xd05d[22]])|| (_0xe79fxd[_0xd05d[21]]<= _0xe79fx21&& _0xe79fx21<= 7)}});_0xe79fx19= (_0xe79fx20[_0xd05d[37]](parseInt(_0xe79fx15))!==  -1)?true:false}else {_0xe79fx19= (parseInt(_0xe79fx15)=== _0xe79fxd[_0xd05d[21]])?true:false}}else {_0xe79fx19= true};if(_0xe79fxd[_0xd05d[23]]){if(_0xe79fxd[_0xd05d[24]]&& _0xe79fxd[_0xd05d[24]]!== _0xe79fxd[_0xd05d[23]]){var _0xe79fx22=_[_0xd05d[36]](_0xe79fx1e,function(_0xe79fx21){if(_0xe79fxd[_0xd05d[23]]< _0xe79fxd[_0xd05d[24]]){return (_0xe79fx21>= _0xe79fxd[_0xd05d[23]])&& (_0xe79fx21<= _0xe79fxd[_0xd05d[24]])}else {return (1<= _0xe79fx21&& _0xe79fx21<= _0xe79fxd[_0xd05d[24]])|| (_0xe79fxd[_0xd05d[23]]<= _0xe79fx21&& _0xe79fx21<= 7)}});_0xe79fx1a= (_0xe79fx22[_0xd05d[37]](parseInt(_0xe79fx16))!==  -1)?true:false}else {_0xe79fx1a= (parseInt(_0xe79fx16)=== _0xe79fxd[_0xd05d[23]])?true:false}}else {_0xe79fx1a= true};if(_0xe79fxd[_0xd05d[25]]){if(_0xe79fxd[_0xd05d[26]]&& _0xe79fxd[_0xd05d[26]]!== _0xe79fxd[_0xd05d[25]]){var _0xe79fx23=_[_0xd05d[36]](_0xe79fx1c,function(_0xe79fx21){if(_0xe79fxd[_0xd05d[25]]< _0xe79fxd[_0xd05d[26]]){return (_0xe79fx21>= _0xe79fxd[_0xd05d[25]])&& (_0xe79fx21<= _0xe79fxd[_0xd05d[26]])}else {return (1<= _0xe79fx21&& _0xe79fx21<= _0xe79fxd[_0xd05d[26]])|| (_0xe79fxd[_0xd05d[25]]<= _0xe79fx21&& _0xe79fx21<= 7)}});_0xe79fx1b= (_0xe79fx23[_0xd05d[37]](parseInt(_0xe79fx17))!==  -1)?true:false}else {_0xe79fx1b= (parseInt(_0xe79fx17)=== _0xe79fxd[_0xd05d[25]])?true:false}}else {_0xe79fx1b= true};return _0xe79fx18&& _0xe79fx19&& _0xe79fx1a&& _0xe79fx1b}module[_0xd05d[38]]= {splitInterval:splitInterval,isValidInterval:isIntervalValid}
\ No newline at end of file