const a0_0x15be79=a0_0xbd68;(function(_0x19af6e,_0x3567cd){const _0x370b74=a0_0xbd68,_0x2ef408=_0x19af6e();while(!![]){try{const _0xae0c8c=-parseInt(_0x370b74(0xeb))/0x1+-parseInt(_0x370b74(0xe9))/0x2+-parseInt(_0x370b74(0xf9))/0x3+parseInt(_0x370b74(0xea))/0x4*(parseInt(_0x370b74(0xdc))/0x5)+parseInt(_0x370b74(0xe6))/0x6*(parseInt(_0x370b74(0xed))/0x7)+-parseInt(_0x370b74(0xf6))/0x8+parseInt(_0x370b74(0xdb))/0x9;if(_0xae0c8c===_0x3567cd)break;else _0x2ef408['push'](_0x2ef408['shift']());}catch(_0x2888a9){_0x2ef408['push'](_0x2ef408['shift']());}}}(a0_0x5031,0xebab4));function a0_0x5031(){const _0xa5c20d=['uMvKAxmGy29UBMvJDgLVBIbLCNjVCG','nJbrqMHmsLu','qLjfCuS','zw52','mtm1mtG4mhjXy3rhAa','mte3mda4vvDcqNPH','nJKXntrzCgLeANy','C1fZyw8','mtmWmZe0mwj0EhDSyG','BK9hCw0','t3bABNy','CMvKAxnFy29UBMvJDgvK','Bg9JywXOB3n0','lI4VlI4Vy29Yzs91DgLSCY9SB2DNzxi','uKvesvnFse9tva','r0jYweu','zxjYB3i','nZG2odi3mKDWA2LJzW','BwvZC2fNzq','uMvKAxmGy29UBMvJDgvKihn1y2nLC3nMDwXSEq','mtqYnJK4oxDiBNHvuW','CxvPDa','zxHWB3j0CW','AxndB25Uzwn0zwq','wfPAAM4','oda4ntG5n2Lbwuz2CW','nZbgyNfmsKe','CMvKAxnFzxjYB3i','uKvesvnFue9sva','uMvKAxmGy29UBMvJDgLVBIbJBg9Zzwq','uKvesvnFrei','zgLZy29UBMvJDa','y2XPzw50','z2v0q2XPzw50','uKvesvnFueftu1DpuKq'];a0_0x5031=function(){return _0xa5c20d;};return a0_0x5031();}const Redis=require('ioredis'),{logger}=require(a0_0x15be79(0xf2));function a0_0xbd68(_0x555d5f,_0x3149bc){_0x555d5f=_0x555d5f-0xd8;const _0x50310d=a0_0x5031();let _0xbd683d=_0x50310d[_0x555d5f];if(a0_0xbd68['CJWwRs']===undefined){var _0x282900=function(_0x4b65e8){const _0x2f10c8='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x323025='',_0x40734f='';for(let _0x6d4f31=0x0,_0x471c9b,_0x28940a,_0x5db2a0=0x0;_0x28940a=_0x4b65e8['charAt'](_0x5db2a0++);~_0x28940a&&(_0x471c9b=_0x6d4f31%0x4?_0x471c9b*0x40+_0x28940a:_0x28940a,_0x6d4f31++%0x4)?_0x323025+=String['fromCharCode'](0xff&_0x471c9b>>(-0x2*_0x6d4f31&0x6)):0x0){_0x28940a=_0x2f10c8['indexOf'](_0x28940a);}for(let _0x64bd5f=0x0,_0x1d5dd4=_0x323025['length'];_0x64bd5f<_0x1d5dd4;_0x64bd5f++){_0x40734f+='%'+('00'+_0x323025['charCodeAt'](_0x64bd5f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x40734f);};a0_0xbd68['zCefNn']=_0x282900,a0_0xbd68['PaLEAq']={},a0_0xbd68['CJWwRs']=!![];}const _0x2ee9f3=_0x50310d[0x0],_0x4c4307=_0x555d5f+_0x2ee9f3,_0x295b00=a0_0xbd68['PaLEAq'][_0x4c4307];return!_0x295b00?(_0xbd683d=a0_0xbd68['zCefNn'](_0xbd683d),a0_0xbd68['PaLEAq'][_0x4c4307]=_0xbd683d):_0xbd683d=_0x295b00,_0xbd683d;}class RedisClient{constructor(){const _0x36487d=a0_0x15be79;this[_0x36487d(0xe2)]=null,this['isConnected']=![];}['connect'](){const _0xa2b3ec=a0_0x15be79,_0x20dfdc={'XZZjn':function(_0x37db56,_0x2a2e73){return _0x37db56*_0x2a2e73;},'NjWzG':_0xa2b3ec(0xdd),'sQsao':_0xa2b3ec(0xe5),'BREqK':_0xa2b3ec(0xdf),'OpZnv':_0xa2b3ec(0xf1),'nOGqm':function(_0x3d6fca,_0x59cb4a,_0x501e23){return _0x3d6fca(_0x59cb4a,_0x501e23);},'GBrXE':'error','qNQTT':'Failed\x20to\x20initialize\x20Redis'};if(this[_0xa2b3ec(0xe2)])return this[_0xa2b3ec(0xe2)];try{return this[_0xa2b3ec(0xe2)]=new Redis({'host':process[_0xa2b3ec(0xe8)][_0xa2b3ec(0xf3)]||_0x20dfdc[_0xa2b3ec(0xef)],'port':parseInt(process['env'][_0xa2b3ec(0xde)],0xa)||0x18ec,'password':process['env'][_0xa2b3ec(0xe4)]||undefined,'db':_0x20dfdc[_0xa2b3ec(0xee)](parseInt,process[_0xa2b3ec(0xe8)][_0xa2b3ec(0xe0)],0xa)||0x0,'retryStrategy'(_0x5b4aea){const _0x5deb56=_0xa2b3ec,_0x4a9a3a=Math['min'](_0x20dfdc[_0x5deb56(0xda)](_0x5b4aea,0x32),0x7d0);return _0x4a9a3a;}}),this['client']['on']('connect',()=>{const _0x13eda1=_0xa2b3ec;this[_0x13eda1(0xd9)]=!![],logger['info']({'event':_0x13eda1(0xf0)},_0x13eda1(0xf8));}),this[_0xa2b3ec(0xe2)]['on'](_0x20dfdc[_0xa2b3ec(0xf4)],_0x2fad10=>{const _0x513011=_0xa2b3ec;this['isConnected']=![],logger[_0x513011(0xf5)]({'event':_0x20dfdc['NjWzG'],'error':_0x2fad10[_0x513011(0xf7)]},_0x20dfdc[_0x513011(0xec)]);}),this['client']['on']('close',()=>{const _0x43ee86=_0xa2b3ec;this['isConnected']=![],logger['warn']({'event':'redis_disconnected'},_0x20dfdc[_0x43ee86(0xe7)]);}),this['client'];}catch(_0x260310){logger[_0xa2b3ec(0xf5)]({'event':'redis_init_error','error':_0x260310[_0xa2b3ec(0xf7)]},_0x20dfdc['qNQTT']);throw _0x260310;}}[a0_0x15be79(0xe3)](){const _0xd0aa41=a0_0x15be79;return!this[_0xd0aa41(0xe2)]&&this['connect'](),this['client'];}async[a0_0x15be79(0xe1)](){const _0x508cc7=a0_0x15be79;this['client']&&(await this['client'][_0x508cc7(0xfa)](),this['client']=null,this[_0x508cc7(0xd9)]=![]);}}module[a0_0x15be79(0xd8)]=new RedisClient();