From 6d863f4b473ebc0ba1224c625337a47609b61867 Mon Sep 17 00:00:00 2001 From: XiaoMo Date: Tue, 2 Sep 2025 16:38:20 +0800 Subject: [PATCH] 12345 --- index.js | 2 +- source.js | 820 ++++++++++++------------------------------------------ 2 files changed, 172 insertions(+), 650 deletions(-) diff --git a/index.js b/index.js index f3421e6..504b6e0 100644 --- a/index.js +++ b/index.js @@ -1 +1 @@ -const _0x2201b1=_0x54eb;(function(_0x4a456b,_0x12bb9b){const _0x1ca711=_0x54eb,_0x61cb4b=_0x4a456b();while(!![]){try{const _0x37d3ff=parseInt(_0x1ca711(0x120))/(-0xa37+-0x220c+0x2c44)*(-parseInt(_0x1ca711(0x104))/(0x26a8+-0xa*-0x2fd+-0xc*0x5b6))+-parseInt(_0x1ca711(0x1a5))/(0x791*-0x1+-0x1b*0xe1+0x23*0xe5)*(-parseInt(_0x1ca711(0x126))/(-0x10b0+-0x26a7+-0x25*-0x17f))+-parseInt(_0x1ca711(0x1c0))/(0x26c2+0x1e5*-0xb+0x1d*-0x9e)*(parseInt(_0x1ca711(0x9e))/(-0xf*0x5+-0x184d+0x189e))+-parseInt(_0x1ca711(0x221))/(0x2*-0xecc+0x1701+0x69e)*(parseInt(_0x1ca711(0x20b))/(0x10bc+-0x2*0x5ad+-0x55a))+-parseInt(_0x1ca711(0x242))/(-0x1*0xa9e+0x1649*-0x1+0x20f0)+-parseInt(_0x1ca711(0xc4))/(0x20e+-0x4*0x455+0x4*0x3d4)+parseInt(_0x1ca711(0x181))/(-0x1be6+-0x11c*-0x19+0x35)*(parseInt(_0x1ca711(0xcf))/(0x11*0x125+0x35*0x49+0x6*-0x5c1));if(_0x37d3ff===_0x12bb9b)break;else _0x61cb4b['push'](_0x61cb4b['shift']());}catch(_0x41238f){_0x61cb4b['push'](_0x61cb4b['shift']());}}}(_0x1cc3,0x6b13c+0x3*-0x46d2b+0xd5b86*0x1));const _0x1991c2=require(_0x2201b1(0x157)),_0x25c663=require(_0x2201b1(0x11c)),_0x5a4d4a=require(_0x2201b1(0xb6)),_0x3f9000=require(_0x2201b1(0x10c)+'g'),_0x50ed75=require('fs'),_0x261916=require(_0x2201b1(0x213)),_0x15cd4e=require(_0x2201b1(0x160)),_0x4b519d=_0x2201b1(0x1d4),_0x5df283=0x148f*0x3+-0x6d3+-0x13b1,_0x336c22=_0x2201b1(0xfa)+'.6.121.121'+_0x2201b1(0x114),_0x42ab9a=_0x261916['join'](__dirname,_0x4b519d),_0x5f5a67={},_0x48a8cb={'request':0x0,'cacheHit':0x0,'apiCall':0x0,'cacheCall':0x0,'cacheReadError':0x0,'fetchApiError':0x0,'fetchApiWarning':0x0,'increment':function(_0x475a0d){const _0x596958=_0x2201b1;this[_0x596958(0x1d2)+_0x596958(0x258)](_0x475a0d)&&this[_0x475a0d]++;}};let _0x565d94=_0x5df283,_0x897617=_0x336c22;function _0x50b917(){const _0x1fa211=_0x2201b1,_0x11e139={'ZOMhv':function(_0x1925fb,_0x9802e2){return _0x1925fb===_0x9802e2;},'LtrBI':_0x1fa211(0x17e),'UbRRC':function(_0x5f3f78,_0x4b37b1,_0x2bbb64){return _0x5f3f78(_0x4b37b1,_0x2bbb64);},'qkSEo':function(_0x2e56a1,_0x1583af){return _0x2e56a1(_0x1583af);},'edkxT':_0x1fa211(0x16d)},_0x17204e=process[_0x1fa211(0x1de)][_0x1fa211(0x8c)](-0x1097*-0x2+0xf93+0x1*-0x30bf);_0x17204e[_0x1fa211(0xfb)](_0x151801=>{const _0x1392c9=_0x1fa211,_0x5d8fc0=_0x151801['startsWith']('--')?_0x151801[_0x1392c9(0x227)](0xc33+0x1b7a+-0x27ab):_0x151801,[_0x35fbe2,_0x381b2d]=_0x5d8fc0[_0x1392c9(0x179)]('=');if(_0x11e139[_0x1392c9(0x1cd)](_0x35fbe2,_0x11e139[_0x1392c9(0x237)])&&_0x381b2d){const _0x3f7e89=_0x11e139[_0x1392c9(0x202)](parseInt,_0x381b2d,0x243b+0x1*-0x112+0x25*-0xf3);!_0x11e139[_0x1392c9(0x117)](isNaN,_0x3f7e89)&&(_0x565d94=_0x3f7e89);}else _0x35fbe2===_0x11e139['edkxT']&&_0x381b2d&&(_0x897617=_0x381b2d);});}function _0x1cc3(){const _0x19c503=['lOwxL','OzzjV','writeFileS','tch','kpujI','Atkqk','Error\x20stat','video/mp4','\x20for\x20valid','mjrOM','\x20not\x20found','Sjqsw','CkFyB','URzGv','length','yJmZK','lVfsU','unlinkSync','http://183','forEach','xFfQB','rfIek','tch\x20for\x20','JBBkg','CTurL','cacheHit','IfUPN','Error\x20writ','486ZrJoru','data\x20unava','bSAMT','tTwcw','GET','RRisU','TTrAq','WAVCt','querystrin','apiCall','\x20path\x20or\x20m','thumb','REDIRECT','ing\x20stale\x20','IXTNA','pathname',':9519/api','ly\x20cached:','r:\x20Unable\x20','qkSEo','Error\x20crea','ing\x20on\x20htt','vSiif','toUTCStrin','https','timeout','nUULo','rning','1619wculds','\x20Chrome/89','necfx','SLtHi','dvLOD','BAD_GATEWA','146528OXONAm','QYDNE','aMSba','join','THdVt','SIGINT','Proxy\x20serv','lknXK','MKizh','ream.','\x20cache\x20for','Mozilla/5.','request','public,\x20ma','Client\x20clo','ngth\x20misma','t:\x20Invalid','efined\x20for','OYseO','sing\x20cache','warn','favicon.ic','ded','SzYlZ','exit','PyWQR','Cache\x20meta','ing.','statusCode','Error\x20pars','ghPZS','createServ','wYiBx','tent\x20file\x20','l\x20cacheDat','eader\x20chec','nNJyj','ailed\x20or\x20r','FwlUC','Failed\x20to\x20','createWrit','ZJvPs','czzzb','ydyvT','renameSync','Paxge','rom\x20','rIsAb','KSwUm','http','content\x20fi','zvrZI','.meta','erver\x20Erro','update','WrlDt','pxWqx','tion\x20prema','crypto','nt\x20updated','QCDTW','increment','hex','\x20has\x20size\x20','hZmfQ','0\x20(Windows','fetchApiEr',';charset=U','ache\x20calle','getTime','randomByte','api','CFtPO','en.','myPJZ','hHfpY','message','DKVrQ','KWYmF','to\x20read\x20ca','ing\x20cache\x20','RaDfJ','data','split','Cached\x20con','expiration','ggTOV','GDPQa','port','FlkXu','hRmIq','44eDXFxP','Received\x20S','eeaOF','\x20directory','bmMgk','IfQQj','elrjP','HthoV','headersSen','real\x20URL:\x20','PHWQZ','nbazX','oYXEg','t\x20to\x20','t\x20file','USQwu','d.\x20','serveFromC','RClSD','utf8','protocol','UYGdr','AYfHM','a\x20for\x20','\x20timed\x20out','QOPVH','query','smatch\x20for','rvygM','IaLko','destroy','EcmWs','arset=utf-','rror','existsSync','EIXeY','6KBqjiD','er\x20is\x20runn','ing\x20or\x20par','xrKhf','headers','JLudK','bbs','bytes','th\x20status\x20','wBAsk','Error\x20unli','th\x20in\x20','uest\x20to\x20','Forcing\x20sh','createHash','OZzDT','nAyXd','kUvpq','nLxiH','AqeUY','INTERNAL_S','\x20failed\x20wi','esponse\x20fr','IGINT.\x20Shu','sed\x20connec','\x20after\x20','zMOAr','15ihZsFO','URHmR','n/json;\x20ch','vrbJn','UmYvw','sed.','.mp4','replace','\x20the\x20respo','d-since','itcrJ','0\x20or\x20stat\x20','write\x20cach','ZOMhv','qgfVM','uniqid','digest','ctory\x20crea','hasOwnProp','hMNRO','.cache','.content','Updated\x20co','wbyMd','hmdRR','tting\x20down','IOYJw','pcxCz','log','test','argv','content-le','\x20(KHTML,\x20l','meta\x20file\x20','ATVbi','API\x20reques','KKRaL','ing\x20date\x20f','AvEUt','cacheReadE','NzyPe','.temp','dmkqr','gHpZH','app','WIYYg','error','RtBGU','yNpwF','VaDOh','FGrMe','XNqgh','UqIaH','AElxK','NOT_MODIFI','pcQMN','ntent-leng','wUbyS','RwOce','toString','LiSwC','Server\x20clo','https:','OMvDL','x-age=3153','turely\x20for','UbRRC','GtCLw','md5','Bad\x20Reques','API\x20endpoi','fetchApiWa','JdkPf','applicatio','Internal\x20S','523696AQkoGI','realUrl','keys','hNxTT','FrsKE','che\x20conten','ILKbY',')\x20AppleWeb','path','jfpaa','y...','zuiRe','Error\x20duri','nse\x20from:','ike\x20Gecko)','FsxOr','uXoMm','includes','WCwft','ohXpH','tAnAQ','Stream','42xcWBvI','ngth','Content\x20le','ZHKEP','endpoint','kBEqL','substring','end','avhbm','utdown...','brBpG','DecHP','\x20NT\x2010.0;\x20','qMstM','parse','if-modifie','TF-8','timestamp','\x20to\x20','TtoVb','EsfFK','or\x20cache\x20h','LtrBI','PADwf','NO_CONTENT','Temp\x20cache','pipe','yFUaJ','API\x20Error:','RuiAS','FeQHy','ExGIu','ontent-len','6853509nAloBV','acheHeader','qiqlW','issing\x20tok','eEWtL','DjAza','6000','y:\x20Failed\x20','keep-alive','string','uest\x20faile','size','ied','last-modif','\x20meta\x20file','bQbac','dQPOV','rhenC','BAD_REQUES','gth\x20is\x20und','PllOe','ync','erty','xCndL','text/plain','n/octet-st','\x20after\x20str','eam\x20end\x20fo','ving\x20stale','ng\x20respons','GhsIq','setEncodin','vOIDl','.\x20Re-fetch','UAncO','ing\x20meta\x20f','duQia','QuFoh','LNgJC','ySvnC','\x20failed:','lETPe','slice','p://localh','civWK','ilable.','listen','parse\x20API\x20','ng\x20GET\x20req','stringify','ream','failed.','now','wqIIR','xjusg','\x20to:\x20','gEjxp','PpAJz','ZuFKT','mtime','1403052lGSyFy','le\x20','RKmgy','EEnYk','mKzea','Error\x20read','response:\x20','PMceo','om\x20','RoNil','code','ror','cQdpx','Warning:\x20c','jJmkw','HFBTS','bzPul','statSync','writableEn','.0.4389.11','.\x20API:\x20','Cache\x20dire','4\x20Safari/5','lGdQD','url','ERVER_ERRO','YoCus','Successful','N/A','dirname',',\x20Cache:\x20','boloG','MrMLn','FYtnk','wcyqv','xrfoJ','AwNhJ','\x20file\x20','6132510ZbXfXT','hHGMh','cacheCall','RVOxW','cAdEM','e\x20metadata','readFileSy','Fzqyt','AarAs','mkdirSync','ing\x20JSON\x20r','9698748IOIGVR','ting\x20cache','startsWith','writeHead','API\x20call\x20f','to\x20fetch\x20f','QsOyA','SGdxA','close','cloudtype','PI\x20call\x20or','Bad\x20Gatewa','kkBPJ','ZDLXi','AgpST','LdvvA','www','content-ty','fJPJI','WkvAI','zndhF','Error\x20maki','eYlgW','WoMEp','OLUTV'];_0x1cc3=function(){return _0x19c503;};return _0x1cc3();}function _0x1f9f39(){const _0x58e976=_0x2201b1,_0x483c9e={'RRisU':_0x58e976(0xab)+_0x58e976(0x241)+'gth\x20is\x20und'+_0x58e976(0x137)+_0x58e976(0x1c8)+_0x58e976(0x218),'QsOyA':function(_0x5580f9,_0x3ede51){return _0x5580f9!==_0x3ede51;},'gHpZH':_0x58e976(0x155)};_0x50b917();if(!_0x50ed75[_0x58e976(0x1a3)](_0x42ab9a))try{_0x483c9e[_0x58e976(0xd5)](_0x483c9e[_0x58e976(0x1eb)],_0x483c9e[_0x58e976(0x1eb)])?_0x6636d2[_0x58e976(0x13a)](_0x483c9e[_0x58e976(0x109)],_0xfb6158[_0x58e976(0x20c)]):(_0x50ed75['mkdirSync'](_0x42ab9a,{'recursive':!![]}),console[_0x58e976(0x1dc)](_0x58e976(0xb3)+_0x58e976(0x1d1)+'ted:\x20'+_0x42ab9a));}catch(_0x477866){console[_0x58e976(0x1ee)]('Error\x20crea'+_0x58e976(0xd0)+_0x58e976(0x184)+'\x20'+_0x42ab9a+':',_0x477866),process[_0x58e976(0x13e)](0x144f*0x1+-0x2*0x33b+-0xdd8);}}_0x1f9f39();const _0x20230e=(-0x3f*0xb+-0x2f*0x45+-0x6*-0x294)*(0xb*-0x26b+0xa*-0x14e+-0x3*-0xd4b)*(0x221a+-0x149e+-0xd40)*(-0x2*-0x27f+0x1bd5+-0x1ceb),_0x4e982c=(-0x1*0x1fad+0x5b1+-0x4*-0x68e)*(0x228a+-0x3*-0x7e6+-0x3a00)*(0x714+0x21c3+-0x24ef*0x1),_0x1ee738={'OK':0xc8,'NO_CONTENT':0xcc,'REDIRECT':0x12e,'NOT_MODIFIED':0x130,'BAD_REQUEST':0x190,'NOT_FOUND':0x194,'INTERNAL_SERVER_ERROR':0x1f4,'BAD_GATEWAY':0x1f6};setInterval(()=>{const _0xe3d52a=_0x2201b1,_0x5cc147={'OYseO':function(_0x161f34,_0x281e41){return _0x161f34-_0x281e41;},'rvygM':function(_0x273b7a,_0x3ce484){return _0x273b7a===_0x3ce484;},'ExGIu':_0xe3d52a(0xe9),'bzPul':_0xe3d52a(0x22b)},_0xcc410=Date['now']();for(const _0xfe051 in _0x5f5a67){if(_0x5cc147[_0xe3d52a(0x138)](_0xcc410,_0x5f5a67[_0xfe051][_0xe3d52a(0x232)])>_0x20230e){if(_0x5cc147[_0xe3d52a(0x19d)](_0x5cc147[_0xe3d52a(0x240)],_0x5cc147[_0xe3d52a(0xae)]))return{'cacheData':_0x2feea5,'isNotModified':!![]};else delete _0x5f5a67[_0xfe051];}}},_0x4e982c);function _0x54eb(_0x3fa1ed,_0x56a0cc){const _0x1ca846=_0x1cc3();return _0x54eb=function(_0xc0479d,_0x13fe99){_0xc0479d=_0xc0479d-(-0x2ac+-0xc29*-0x1+-0x8fd);let _0x4e374a=_0x1ca846[_0xc0479d];return _0x4e374a;},_0x54eb(_0x3fa1ed,_0x56a0cc);}function _0x14aaae(_0x5e9f13,_0x1d19f3,_0x17ed42){const _0x37fadb=_0x2201b1,_0x472822={'zHNYV':_0x37fadb(0x25a)+_0x37fadb(0x169)+_0x37fadb(0x231)};!_0x5e9f13[_0x37fadb(0x189)+'t']&&(_0x5e9f13[_0x37fadb(0xd2)](_0x1d19f3,{'Content-Type':_0x472822['zHNYV']}),_0x5e9f13[_0x37fadb(0x228)](_0x17ed42));}async function _0x35cf52(_0x31228f,_0x283cfc){const _0xce37af=_0x2201b1;_0x283cfc['writeHead'](_0x1ee738[_0xce37af(0x239)]),_0x283cfc[_0xce37af(0x228)]();}async function _0xd2bc17(_0x549a48,_0x16a381,_0x288770){const _0xea67b6=_0x2201b1,_0x20030f={'eoYxt':function(_0x6df27a,_0x4c92ec){return _0x6df27a===_0x4c92ec;},'TOrUL':_0xea67b6(0x144),'tTwcw':function(_0x2d5dcf,_0x3cb414){return _0x2d5dcf!==_0x3cb414;},'Sjqsw':_0xea67b6(0x180),'GQYKZ':_0xea67b6(0x209)+_0xea67b6(0x1c2)+_0xea67b6(0x1a1)+'8'};if(_0x288770[_0xea67b6(0x19b)]['api']){if(_0x20030f['eoYxt'](_0xea67b6(0xf5),_0x20030f['TOrUL']))_0x2a6a21[_0xea67b6(0x1ee)](_0xea67b6(0x143)+'ing\x20stale\x20'+'meta\x20file\x20'+_0x4ffac5+':',_0x3095ed);else{const _0x2c1b68=/^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([\/\w.-]*)*\/?$/;if(_0x2c1b68[_0xea67b6(0x1dd)](_0x288770['query'][_0xea67b6(0x16d)])){if(_0x20030f[_0xea67b6(0x107)]('gxKNV',_0x20030f[_0xea67b6(0xf3)]))_0x897617=_0x288770['query'][_0xea67b6(0x16d)],console[_0xea67b6(0x1dc)]('API\x20endpoi'+_0xea67b6(0x161)+_0xea67b6(0x99)+_0x897617);else{const _0x569672=_0x4357a2['parse'](_0x586e7d);if(_0x569672&&_0x569672[_0xea67b6(0x172)])_0x46e5ba[_0xea67b6(0x172)]=_0x569672[_0xea67b6(0x172)];}}}}_0x16a381[_0xea67b6(0xd2)](_0x1ee738['OK'],{'Content-Type':_0x20030f['GQYKZ']}),_0x16a381[_0xea67b6(0x228)](JSON[_0xea67b6(0x93)]({'code':_0x1ee738['OK'],'data':{'api':_0x897617,'port':_0x565d94,'cacheDir':_0x42ab9a,'pathIndexCount':Object[_0xea67b6(0x20d)](_0x5f5a67)[_0xea67b6(0xf6)],'viewsInfo':{'request':_0x48a8cb['request'],'cacheHit':_0x48a8cb[_0xea67b6(0x101)],'apiCall':_0x48a8cb[_0xea67b6(0x10d)],'cacheCall':_0x48a8cb[_0xea67b6(0xc6)],'cacheReadError':_0x48a8cb[_0xea67b6(0x1e7)+_0xea67b6(0x1a2)],'fetchApiError':_0x48a8cb[_0xea67b6(0x168)+_0xea67b6(0xa9)],'fetchApiWarning':_0x48a8cb[_0xea67b6(0x207)+_0xea67b6(0x11f)]}}}));}async function _0x4b3ceb(_0xfe8840,_0x19629b){const _0x15164d=_0x2201b1;_0xfe8840[_0x15164d(0xd2)](_0x1ee738[_0x15164d(0x110)],{'Location':_0x19629b[_0x15164d(0x178)][_0x15164d(0xb6)]}),_0xfe8840['end']();}async function _0x147c5f(_0x194465,_0x2321f0,_0x4759d7,_0x51af4c,_0x3c2b1e,_0x49e92f){const _0x1959ef=_0x2201b1,_0x314425={'Fzqyt':_0x1959ef(0x164),'zvrZI':function(_0xa3538e,_0x2807c9,_0x31641f,_0x5d4787){return _0xa3538e(_0x2807c9,_0x31641f,_0x5d4787);},'vrbJn':_0x1959ef(0x14d)+_0x1959ef(0x1cc)+_0x1959ef(0xc9)+'.','zndhF':function(_0x1b6c85,_0x1972e9){return _0x1b6c85<_0x1972e9;},'XNqgh':_0x1959ef(0x1df)+'ngth','wcyqv':function(_0x2c82da,_0x5cfb9e){return _0x2c82da!==_0x5cfb9e;},'WIYYg':function(_0x1db0e,_0x143a28,_0x376d4d){return _0x1db0e(_0x143a28,_0x376d4d);},'jbeHd':function(_0x2292a2,_0xd4d260,_0x1278a7,_0x135a6c,_0x12e415,_0x35c18b){return _0x2292a2(_0xd4d260,_0x1278a7,_0x135a6c,_0x12e415,_0x35c18b);}},{url:_0x484323,cloudtype:_0x25e707,expiration:_0xca8669,path:_0x618d4,headers:_0x2f3b44,uniqid:_0x1cdeee,thumb:_0x525eeb}=_0x194465['data'],_0x1da0d9={'realUrl':_0x484323,'cloudtype':_0x25e707,'expiration':_0xca8669*(0x115*-0x7+0x84e*-0x3+0x2465*0x1),'path':_0x618d4,'headers':_0x2f3b44,'uniqid':_0x1cdeee,'thumb':_0x525eeb};_0x5f5a67[_0x2321f0]={'uniqid':_0x1da0d9['uniqid'],'timestamp':Date[_0x1959ef(0x96)]()};const _0x15fd19=_0x261916[_0x1959ef(0x129)](_0x42ab9a,_0x2321f0+_0x1959ef(0x15a)),_0x460889=_0x261916[_0x1959ef(0x129)](_0x42ab9a,_0x1da0d9[_0x1959ef(0x1cf)]+'.content'),_0x5ee4bf=_0x261916[_0x1959ef(0x129)](_0x42ab9a,_0x1da0d9[_0x1959ef(0x1cf)]+'_'+_0x15cd4e[_0x1959ef(0x16c)+'s'](0x2419+-0x1d44+-0x6c5)[_0x1959ef(0x1fb)](_0x314425[_0x1959ef(0xcb)])+_0x1959ef(0x1e9));try{_0x50ed75[_0x1959ef(0xea)+'ync'](_0x15fd19,JSON[_0x1959ef(0x93)](_0x1da0d9));}catch(_0x2e2877){console[_0x1959ef(0x1ee)](_0x1959ef(0x103)+_0x1959ef(0x85)+'ile\x20'+_0x15fd19+':',_0x2e2877),_0x314425[_0x1959ef(0x159)](_0x14aaae,_0x49e92f,_0x1ee738[_0x1959ef(0x1b9)+_0x1959ef(0xb7)+'R'],_0x314425[_0x1959ef(0x1c3)]);return;}if(_0x50ed75[_0x1959ef(0x1a3)](_0x460889)){const _0x157936=_0x50ed75['statSync'](_0x460889),_0x4cc69e=_0x157936[_0x1959ef(0x24d)];_0x314425[_0x1959ef(0xe3)](_0x4cc69e,0x23fc+0x1d8a+-0x2*0x1cc3)&&_0x1da0d9[_0x1959ef(0x1a9)][_0x314425['XNqgh']]&&_0x314425[_0x1959ef(0xc0)](_0x314425[_0x1959ef(0x1ed)](parseInt,_0x1da0d9['headers'][_0x314425[_0x1959ef(0x1f3)]],-0x2344+-0x168d+0x39db),_0x4cc69e)?(console[_0x1959ef(0x13a)](_0x1959ef(0x223)+_0x1959ef(0x135)+_0x1959ef(0xfe)+_0x460889+_0x1959ef(0xb2)+_0x1da0d9[_0x1959ef(0x1a9)][_0x1959ef(0x1df)+'ngth']+_0x1959ef(0xbc)+_0x4cc69e+('.\x20Re-fetch'+_0x1959ef(0x141))),_0x5c83a5(_0x1da0d9,_0x5ee4bf,_0x460889,_0x15fd19,_0x49e92f)):_0x3f7a2c(_0x1da0d9,_0x460889,_0x15fd19,_0x49e92f);}else _0x314425['jbeHd'](_0x5c83a5,_0x1da0d9,_0x5ee4bf,_0x460889,_0x15fd19,_0x49e92f);}async function _0x49aa08(_0x38cf89,_0x4490ea,_0x5e239b){const _0x4f98dd=_0x2201b1,_0x44b8c9={'czzzb':_0x4f98dd(0xc7),'wYiBx':_0x4f98dd(0x14f),'wBAsk':_0x4f98dd(0x194),'ATVbi':function(_0x414db8,_0x51b96d,_0x472265,_0x549dc8,_0x8e60a){return _0x414db8(_0x51b96d,_0x472265,_0x549dc8,_0x8e60a);},'AvEUt':function(_0x5d35c2,_0x4e3fe6){return _0x5d35c2!==_0x4e3fe6;},'MrMLn':function(_0x125802,_0x5a18df){return _0x125802||_0x5a18df;}};if(_0x5f5a67[_0x38cf89]){const _0x1236d3=_0x261916[_0x4f98dd(0x129)](_0x42ab9a,_0x38cf89+_0x4f98dd(0x15a)),_0x1d7e29=_0x261916[_0x4f98dd(0x129)](_0x42ab9a,_0x5f5a67[_0x38cf89][_0x4f98dd(0x1cf)]+'.content');if(_0x50ed75[_0x4f98dd(0x1a3)](_0x1236d3)&&_0x50ed75[_0x4f98dd(0x1a3)](_0x1d7e29)){if(_0x44b8c9[_0x4f98dd(0x150)]===_0x44b8c9['czzzb']){console['warn'](_0x4f98dd(0xd3)+_0x4f98dd(0x14b)+'eturned\x20no'+'n-200.\x20Ser'+_0x4f98dd(0x25e)+'\x20cache\x20for'+'\x20'+_0x38cf89);try{if(_0x44b8c9[_0x4f98dd(0x146)]!==_0x4f98dd(0x1b5)){const _0x162620=JSON[_0x4f98dd(0x22f)](_0x50ed75[_0x4f98dd(0xca)+'nc'](_0x1236d3,_0x44b8c9[_0x4f98dd(0x1ae)]));_0x44b8c9[_0x4f98dd(0x1e2)](_0x3f7a2c,_0x162620,_0x1d7e29,_0x1236d3,_0x4490ea);return;}else _0xf02467(_0x33463b,_0x10fa7e,_0x218fc8,_0x5b8e03,_0x546d0d);}catch(_0x340069){_0x44b8c9[_0x4f98dd(0x1e6)]('xFncY',_0x4f98dd(0x10b))?console[_0x4f98dd(0x1ee)](_0x4f98dd(0x143)+_0x4f98dd(0x111)+_0x4f98dd(0x1e1)+_0x1236d3+':',_0x340069):_0x4e5d70[_0x4f98dd(0x1ee)](_0x4f98dd(0x1af)+'nking\x20temp'+'\x20file\x20'+_0x5a35ec+':',_0x23a930);}}else _0x59fbbd[_0x4f98dd(0x13a)]('Cached\x20con'+_0x4f98dd(0x147)+_0x281d8d+('\x20has\x20size\x20'+_0x4f98dd(0x1cb)+_0x4f98dd(0x95)));}}_0x14aaae(_0x4490ea,_0x1ee738[_0x4f98dd(0x125)+'Y'],_0x44b8c9[_0x4f98dd(0xbe)](_0x5e239b,_0x4f98dd(0xda)+'y'));}async function _0x18e8d2(_0xa27056,_0x4c9109){const _0x1f026f=_0x2201b1,_0x2449d1={'oYXEg':function(_0x13dc70,_0x2870e1){return _0x13dc70<_0x2870e1;},'itcrJ':_0x1f026f(0x1df)+_0x1f026f(0x222),'USQwu':function(_0x3ad8c4,_0x42f53c,_0x27ad3f,_0x4be4bb,_0x565b4a,_0x4e2b73){return _0x3ad8c4(_0x42f53c,_0x27ad3f,_0x4be4bb,_0x565b4a,_0x4e2b73);},'vNZrV':'utf8','CFtPO':_0x1f026f(0x1e7)+_0x1f026f(0x1a2),'UYGdr':function(_0x473489,_0x3a0ead,_0x5a7649,_0x12443c){return _0x473489(_0x3a0ead,_0x5a7649,_0x12443c);},'gylpo':_0x1f026f(0x20a)+_0x1f026f(0x15b)+_0x1f026f(0x116)+_0x1f026f(0x175)+_0x1f026f(0x210)+'t\x20file','xrfoJ':_0x1f026f(0x13b)+'o','YoCus':function(_0x59f8c4,_0x176e00){return _0x59f8c4===_0x176e00;},'IOYJw':_0x1f026f(0x225),'vOIDl':function(_0x4dd052,_0x52153b,_0x3e9bf6,_0x209bb3){return _0x4dd052(_0x52153b,_0x3e9bf6,_0x209bb3);},'nbazX':function(_0x508833,_0x12718f){return _0x508833!==_0x12718f;},'pcQMN':_0x1f026f(0x9b),'ggTOV':_0x1f026f(0x1ec),'bSAMT':'avatar','qiqlW':_0x1f026f(0x1ab),'AElxK':'url','OHbFi':_0x1f026f(0x10f),'wRLWj':_0x1f026f(0x12a),'SGdxA':_0x1f026f(0x1b8),'nUULo':_0x1f026f(0x132),'cHLIi':'md5','XUdSF':function(_0x4ec704,_0x1b7ff){return _0x4ec704+_0x1b7ff;},'NhHij':function(_0x38a0e4,_0xb3d531){return _0x38a0e4+_0xb3d531;},'JdkPf':_0x1f026f(0x164),'xCndL':function(_0x157fbf,_0x5acac7,_0x209990){return _0x157fbf(_0x5acac7,_0x209990);},'JLudK':_0x1f026f(0x1fc),'ZHKEP':_0x1f026f(0x101),'NBhKn':function(_0x16349f,_0x2accce,_0x4965d0,_0x3395f0,_0x4e2708){return _0x16349f(_0x2accce,_0x4965d0,_0x3395f0,_0x4e2708);},'aMSba':_0x1f026f(0xdd),'uaXKd':_0x1f026f(0x10d),'GtCLw':function(_0x50e489,_0x47add0){return _0x50e489===_0x47add0;},'fqbRp':function(_0x47975c,_0x1d43ac){return _0x47975c===_0x1d43ac;},'boloG':_0x1f026f(0xec),'xjusg':function(_0x456252,_0x65e31c,_0x544550,_0x5a6000,_0x3c6a06,_0x3d4726,_0x3de004){return _0x456252(_0x65e31c,_0x544550,_0x5a6000,_0x3c6a06,_0x3d4726,_0x3de004);},'GDPQa':_0x1f026f(0xe7),'HthoV':'qqEpF','LNgJC':'fetchApiWa'+_0x1f026f(0x11f),'Paxge':_0x1f026f(0x168)+_0x1f026f(0xa9),'cAdEM':function(_0x2486b9,_0x35b231,_0x197d33,_0x59d974){return _0x2486b9(_0x35b231,_0x197d33,_0x59d974);}};_0xa27056[_0x1f026f(0xb6)]=_0xa27056[_0x1f026f(0xb6)][_0x1f026f(0x1c7)](/\/{2,}/g,'/');const _0xb25105=_0x5a4d4a[_0x1f026f(0x22f)](_0xa27056[_0x1f026f(0xb6)],!![]),_0x269745=_0xb25105[_0x1f026f(0x19b)]['sign']||'';let _0x348bd4=_0xb25105[_0x1f026f(0x113)][_0x1f026f(0x179)]('/')[0x1451+0x25df*-0x1+0x118f]||'',_0x27cab8=_0xb25105[_0x1f026f(0x113)][_0x1f026f(0x179)]('/')['slice'](-0xa8d+0x236+0x859)[_0x1f026f(0x129)]('/');if(_0x348bd4===_0x2449d1[_0x1f026f(0xc1)])return _0x35cf52(_0xa27056,_0x4c9109);if(_0x2449d1[_0x1f026f(0xb8)](_0x348bd4,_0x2449d1[_0x1f026f(0x1da)]))return _0x2449d1[_0x1f026f(0x82)](_0xd2bc17,_0xa27056,_0x4c9109,_0xb25105);if(!_0x27cab8&&_0x348bd4){if(_0x2449d1[_0x1f026f(0x18c)](_0x2449d1[_0x1f026f(0x1f7)],_0x2449d1[_0x1f026f(0x1f7)]))try{_0x70544c[_0x1f026f(0xcd)](_0x45e8c8,{'recursive':!![]}),_0x4519f8[_0x1f026f(0x1dc)]('Cache\x20dire'+_0x1f026f(0x1d1)+'ted:\x20'+_0x52e1f5);}catch(_0x29549b){_0xb24a23[_0x1f026f(0x1ee)](_0x1f026f(0x118)+_0x1f026f(0xd0)+_0x1f026f(0x184)+'\x20'+_0x40d70f+':',_0x29549b),_0x372248[_0x1f026f(0x13e)](0xb29*-0x1+0xafc+-0x2*-0x17);}else _0x27cab8=_0x348bd4,_0x348bd4=_0x2449d1[_0x1f026f(0x17c)];}const _0x95c16d=[_0x2449d1[_0x1f026f(0x106)],'go',_0x2449d1[_0x1f026f(0x244)],_0x1f026f(0xdf),_0x2449d1[_0x1f026f(0x1f5)],_0x2449d1['OHbFi'],_0x2449d1[_0x1f026f(0x17c)]];if(!_0x95c16d[_0x1f026f(0x21c)](_0x348bd4)||!_0x27cab8){if(_0x2449d1[_0x1f026f(0xb8)](_0x2449d1['wRLWj'],_0x2449d1[_0x1f026f(0xd6)]))this[_0x1f026f(0x1d2)+_0x1f026f(0x258)](_0x229a46)&&this[_0x3cd0ce]++;else return _0x2449d1[_0x1f026f(0x196)](_0x14aaae,_0x4c9109,_0x1ee738[_0x1f026f(0x254)+'T'],_0x1f026f(0x205)+'t:\x20Invalid'+_0x1f026f(0x10e)+_0x1f026f(0x245)+_0x1f026f(0x16f));}_0x48a8cb[_0x1f026f(0x163)](_0x2449d1[_0x1f026f(0x11e)]);const _0x3bb6c7=_0x15cd4e['createHash'](_0x2449d1['cHLIi'])[_0x1f026f(0x15c)](_0x2449d1['XUdSF'](_0x2449d1['NhHij'](_0x348bd4,_0x27cab8),_0x269745))[_0x1f026f(0x1d0)](_0x2449d1[_0x1f026f(0x208)]);let _0x3d3d02='',_0x4887c5='';_0x5f5a67[_0x3bb6c7]&&(_0x3d3d02=_0x261916[_0x1f026f(0x129)](_0x42ab9a,_0x3bb6c7+_0x1f026f(0x15a)),_0x4887c5=_0x261916[_0x1f026f(0x129)](_0x42ab9a,_0x5f5a67[_0x3bb6c7][_0x1f026f(0x1cf)]+_0x1f026f(0x1d5)));if(_0x5f5a67[_0x3bb6c7]&&_0x2449d1['xCndL'](_0x2346b9,_0x3d3d02,_0x4887c5)){const {cacheData:_0x3a27de,isNotModified:_0x55feea}=await _0x378efe(_0xa27056,_0x3d3d02);if(_0x55feea){if(_0x2449d1[_0x1f026f(0xb8)](_0x2449d1[_0x1f026f(0x1aa)],_0x1f026f(0x1fc)))_0x4c9109[_0x1f026f(0xd2)](_0x1ee738[_0x1f026f(0x1f6)+'ED']),_0x4c9109[_0x1f026f(0x228)]();else{const _0x3a931f=_0x497249[_0x1f026f(0xaf)](_0x763220),_0x4e2541=_0x3a931f[_0x1f026f(0x24d)];_0x2449d1[_0x1f026f(0x18d)](_0x4e2541,-0xbd4+0x125e+0x176)&&_0x58bcff['headers'][_0x2449d1[_0x1f026f(0x1ca)]]&&_0x254f76(_0x515c3b[_0x1f026f(0x1a9)][_0x2449d1['itcrJ']],0x27*-0x3+0x3*-0xcf7+0x2764)!==_0x4e2541?(_0x55c474[_0x1f026f(0x13a)](_0x1f026f(0x223)+'ngth\x20misma'+'tch\x20for\x20'+_0x56dc1a+'.\x20API:\x20'+_0x4ccc12[_0x1f026f(0x1a9)][_0x2449d1[_0x1f026f(0x1ca)]]+_0x1f026f(0xbc)+_0x4e2541+(_0x1f026f(0x83)+_0x1f026f(0x141))),_0x2449d1[_0x1f026f(0x190)](_0x17bf22,_0x4f0b2d,_0x5991f0,_0x3bb108,_0x3dcc5c,_0x36fd78)):_0x14be9d(_0x437252,_0x4e2bce,_0x25360a,_0x5e4d98);}}else _0x48a8cb[_0x1f026f(0x163)](_0x2449d1[_0x1f026f(0x224)]),_0x2449d1['NBhKn'](_0x3f7a2c,_0x3a27de,_0x4887c5,_0x3d3d02,_0x4c9109);}else{if(_0x2449d1['YoCus'](_0x2449d1[_0x1f026f(0x128)],_0x2449d1['aMSba']))try{_0x48a8cb['increment'](_0x2449d1['uaXKd']);const _0x30f890=await _0x213ea0(_0x348bd4,_0x27cab8,_0x269745);if(_0x30f890[_0x1f026f(0xa8)]===_0x1ee738['REDIRECT']||_0x2449d1[_0x1f026f(0x203)](_0x30f890[_0x1f026f(0xa8)],-0x96+0x16d+0x56))return _0x2449d1[_0x1f026f(0x259)](_0x4b3ceb,_0x4c9109,_0x30f890);if(_0x2449d1['fqbRp'](_0x30f890[_0x1f026f(0xa8)],_0x1ee738['OK'])&&_0x30f890['data']&&_0x30f890[_0x1f026f(0x178)]['url']){if(_0x2449d1[_0x1f026f(0x18c)](_0x2449d1[_0x1f026f(0xbd)],_0x1f026f(0x151)))await _0x2449d1[_0x1f026f(0x98)](_0x147c5f,_0x30f890,_0x3bb6c7,_0x348bd4,_0x27cab8,_0x269745,_0x4c9109);else{_0x4a2964[_0x1f026f(0x13a)](_0x1f026f(0xd3)+'ailed\x20or\x20r'+'eturned\x20no'+'n-200.\x20Ser'+_0x1f026f(0x25e)+_0x1f026f(0x130)+'\x20'+_0x33c974);try{const _0x2dedb5=_0x5b229e['parse'](_0x42b398[_0x1f026f(0xca)+'nc'](_0x11f048,_0x2449d1['vNZrV']));_0x25f8a6(_0x2dedb5,_0x285c7f,_0x8cf8a4,_0x437744);return;}catch(_0x4144e8){_0x48306f[_0x1f026f(0x1ee)]('Error\x20pars'+_0x1f026f(0x111)+_0x1f026f(0x1e1)+_0x4e1ade+':',_0x4144e8);}}}else _0x2449d1['fqbRp'](_0x2449d1[_0x1f026f(0x17d)],_0x2449d1[_0x1f026f(0x188)])?(_0x511f50['increment'](_0x2449d1[_0x1f026f(0x16e)]),_0x183f24[_0x1f026f(0x1ee)](_0x1f026f(0xa3)+_0x1f026f(0x176)+'file:\x20'+_0x5ba219),_0x2449d1['UYGdr'](_0x5da5f2,_0x49566f,_0x1e0caf[_0x1f026f(0x1b9)+_0x1f026f(0xb7)+'R'],_0x2449d1['gylpo'])):(_0x48a8cb[_0x1f026f(0x163)](_0x2449d1[_0x1f026f(0x88)]),await _0x49aa08(_0x3bb6c7,_0x4c9109,_0x30f890[_0x1f026f(0x172)]));}catch(_0x3d07fe){_0x48a8cb['increment'](_0x2449d1[_0x1f026f(0x153)]),console[_0x1f026f(0x1ee)]('Error\x20in\x20A'+_0x1f026f(0xd9)+'\x20processin'+'g:',_0x3d07fe),await _0x2449d1[_0x1f026f(0xc8)](_0x49aa08,_0x3bb6c7,_0x4c9109,'Bad\x20Gatewa'+'y:\x20API\x20req'+_0x1f026f(0x24c)+_0x1f026f(0x191)+_0x3d07fe['message']);}else _0x394a70['unlinkSync'](_0x3d1c38);}}const _0x10290f=_0x1991c2[_0x2201b1(0x145)+'er'](_0x18e8d2);async function _0x378efe(_0xeaf753,_0x38bc82){const _0x2358e9=_0x2201b1,_0x29d2d6={'tsiKf':_0x2358e9(0x194),'qgfVM':_0x2358e9(0x230)+_0x2358e9(0x1c9),'RaDfJ':function(_0x22d677,_0x405470){return _0x22d677===_0x405470;},'uLiwT':function(_0x48e683,_0x3bbb69){return _0x48e683===_0x3bbb69;},'avhbm':'last-modif'+_0x2358e9(0x24e),'UmYvw':function(_0x44344f,_0x4af1b6){return _0x44344f<=_0x4af1b6;}};try{const _0x4b9281=_0x50ed75['readFileSy'+'nc'](_0x38bc82,_0x29d2d6['tsiKf']),_0x45230d=JSON[_0x2358e9(0x22f)](_0x4b9281),_0x471fc1=_0xeaf753[_0x2358e9(0x1a9)]['if-none-ma'+_0x2358e9(0xeb)],_0xd223b8=_0xeaf753[_0x2358e9(0x1a9)][_0x29d2d6[_0x2358e9(0x1ce)]];if(_0x471fc1&&_0x45230d['uniqid']&&_0x29d2d6[_0x2358e9(0x177)](_0x471fc1,_0x45230d[_0x2358e9(0x1cf)])){if(_0x29d2d6['uLiwT'](_0x2358e9(0x1ef),_0x2358e9(0x1ef)))return{'cacheData':_0x45230d,'isNotModified':!![]};else{const _0xa8fff5=/^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([\/\w.-]*)*\/?$/;_0xa8fff5['test'](_0xd259b5[_0x2358e9(0x19b)]['api'])&&(_0x54cbeb=_0x21d314[_0x2358e9(0x19b)][_0x2358e9(0x16d)],_0x3ae21[_0x2358e9(0x1dc)](_0x2358e9(0x206)+_0x2358e9(0x161)+_0x2358e9(0x99)+_0x52adc8));}}if(_0xd223b8&&_0x45230d['headers']&&_0x45230d[_0x2358e9(0x1a9)][_0x2358e9(0x24f)+_0x2358e9(0x24e)])try{const _0x1ff301=new Date(_0x45230d[_0x2358e9(0x1a9)][_0x29d2d6[_0x2358e9(0x229)]]),_0xab14cd=new Date(_0xd223b8);if(_0x29d2d6[_0x2358e9(0x1c4)](_0x1ff301[_0x2358e9(0x16b)](),_0xab14cd[_0x2358e9(0x16b)]()))return{'cacheData':_0x45230d,'isNotModified':!![]};}catch(_0x5a0bbb){console['warn']('Error\x20pars'+_0x2358e9(0x1e5)+_0x2358e9(0x236)+_0x2358e9(0x149)+'k\x20('+_0x38bc82+'):',_0x5a0bbb);}return{'cacheData':_0x45230d,'isNotModified':![]};}catch(_0xba1bc5){return console[_0x2358e9(0x1ee)](_0x2358e9(0xa3)+'ing\x20or\x20par'+_0x2358e9(0x139)+_0x2358e9(0x250)+'\x20'+_0x38bc82+('\x20in\x20checkC'+_0x2358e9(0x243)+'s:'),_0xba1bc5),{'cacheData':null,'isNotModified':![]};}}function _0x2346b9(_0x3a379a,_0x1c626e){const _0x266630=_0x2201b1,_0x359148={'lknXK':'Forcing\x20sh'+'utdown...','jJmkw':_0x266630(0x194),'VaDOh':function(_0x21b593,_0x73214d){return _0x21b593===_0x73214d;},'ZuFKT':'number','civWK':function(_0x50adc6,_0x176017){return _0x50adc6>_0x176017;},'eeaOF':function(_0x1a5867,_0x534fd8){return _0x1a5867!==_0x534fd8;},'WoMEp':_0x266630(0x1b7)};if(!_0x50ed75[_0x266630(0x1a3)](_0x3a379a)||!_0x50ed75[_0x266630(0x1a3)](_0x1c626e))return![];try{const _0x279a35=_0x50ed75[_0x266630(0xca)+'nc'](_0x3a379a,_0x359148[_0x266630(0xac)]),_0x3c7590=JSON[_0x266630(0x22f)](_0x279a35);return _0x359148[_0x266630(0x1f1)](typeof _0x3c7590[_0x266630(0x17b)],_0x359148[_0x266630(0x9c)])&&_0x359148[_0x266630(0x8e)](_0x3c7590[_0x266630(0x17b)],Date[_0x266630(0x96)]());}catch(_0x5bbf9d){if(_0x359148[_0x266630(0x183)](_0x359148[_0x266630(0xe6)],'cHYGj'))return console[_0x266630(0x13a)]('Error\x20read'+_0x266630(0x1a7)+_0x266630(0x139)+'\x20meta\x20file'+'\x20'+_0x3a379a+(_0x266630(0xf0)+'ation:'),_0x5bbf9d),![];else _0x40875b[_0x266630(0x1ee)](_0x359148[_0x266630(0x12d)]),_0x8234c2['exit'](0x33*-0x27+0x2f4*0xa+-0x15c2);}}const _0x8ef23f=0x78c+-0x593*-0x5+-0xfe3,_0x55dee4=_0x2201b1(0x131)+_0x2201b1(0x167)+_0x2201b1(0x22d)+'Win64;\x20x64'+_0x2201b1(0x212)+'Kit/537.36'+_0x2201b1(0x1e0)+_0x2201b1(0x219)+_0x2201b1(0x121)+_0x2201b1(0xb1)+_0x2201b1(0xb4)+'37.36';async function _0x213ea0(_0x107388,_0x4b8728,_0x255bb8){const _0x1d0e93=_0x2201b1,_0x1695a5={'necfx':function(_0x4c58da,_0x2def52){return _0x4c58da===_0x2def52;},'cXwNr':'LFNOF','ZDLXi':'DipSV','EcmWs':function(_0x48ec63,_0x12e00d){return _0x48ec63(_0x12e00d);},'ohXpH':function(_0x5b4d34,_0x153d63){return _0x5b4d34(_0x153d63);},'MtuYI':_0x1d0e93(0x194),'yNpwF':'data','URHmR':_0x1d0e93(0x228),'uXoMm':_0x1d0e93(0x11d),'WpBwl':'error','vqbyZ':_0x1d0e93(0x1fe),'xrKhf':_0x1d0e93(0x108),'KKRaL':_0x1d0e93(0x209)+_0x1d0e93(0x1c2)+_0x1d0e93(0x1a1)+'8'},_0x31cf52=_0x3f9000[_0x1d0e93(0x93)]({'type':_0x107388,'sign':_0x255bb8}),_0x2f92c3=_0x897617+'?'+_0x31cf52,_0x35857f=new URL(_0x2f92c3),_0x5e71e2=_0x1695a5[_0x1d0e93(0x122)](_0x35857f[_0x1d0e93(0x195)],_0x1695a5['vqbyZ'])?_0x25c663:_0x1991c2,_0x4b1562={'method':_0x1695a5[_0x1d0e93(0x1a8)],'headers':{'Accept':_0x1695a5[_0x1d0e93(0x1e4)],'User-Agent':_0x55dee4,'token':_0x4b8728},'timeout':_0x8ef23f,'rejectUnauthorized':![]};return new Promise((_0x514147,_0xe26a88)=>{const _0x57dd39=_0x1d0e93,_0x31494b={'rhenC':function(_0x2ee471,_0x253c88){return _0x2ee471>=_0x253c88;},'xFfQB':function(_0x6ea2f4,_0x5cb887){const _0x5b88e7=_0x54eb;return _0x1695a5[_0x5b88e7(0x1a0)](_0x6ea2f4,_0x5cb887);},'anCFl':function(_0x3938fa,_0x5bb8e4){const _0x2248c3=_0x54eb;return _0x1695a5[_0x2248c3(0x21e)](_0x3938fa,_0x5bb8e4);},'rcwlv':_0x1695a5['MtuYI'],'PyWQR':_0x1695a5[_0x57dd39(0x1f0)],'KWYmF':_0x1695a5[_0x57dd39(0x1c1)],'YPoSJ':function(_0x4eae28,_0x19fcd3){const _0x31c31f=_0x57dd39;return _0x1695a5[_0x31c31f(0x21e)](_0x4eae28,_0x19fcd3);}},_0x168d1b=_0x5e71e2[_0x57dd39(0x132)](_0x2f92c3,_0x4b1562,_0xf86198=>{const _0x453fe4=_0x57dd39,_0x5edbdf={'dFAhZ':function(_0x307b1d,_0x4f5949){const _0x2c142b=_0x54eb;return _0x31494b[_0x2c142b(0x253)](_0x307b1d,_0x4f5949);},'RoNil':function(_0x85a8ac,_0x4f4545){return _0x85a8ac(_0x4f4545);},'XLWpj':function(_0x1b5a2e,_0x29c30b){const _0x35f5c6=_0x54eb;return _0x31494b[_0x35f5c6(0xfc)](_0x1b5a2e,_0x29c30b);},'JBBkg':function(_0xa51f0,_0x10f9c4){return _0x31494b['anCFl'](_0xa51f0,_0x10f9c4);}};let _0x3f7a59='';_0xf86198[_0x453fe4(0x81)+'g'](_0x31494b['rcwlv']),_0xf86198['on'](_0x31494b[_0x453fe4(0x13f)],_0x1a3445=>_0x3f7a59+=_0x1a3445),_0xf86198['on'](_0x31494b[_0x453fe4(0x174)],()=>{const _0x5d5d30=_0x453fe4;try{if(_0x5edbdf['dFAhZ'](_0xf86198[_0x5d5d30(0x142)],0x2609+-0x1*-0x21d9+-0x4652*0x1)){console[_0x5d5d30(0x1ee)](_0x5d5d30(0x1e3)+_0x5d5d30(0x18e)+_0x2f92c3+(_0x5d5d30(0x1ba)+'th\x20status\x20')+_0xf86198[_0x5d5d30(0x142)]+':\x20'+_0x3f7a59);let _0x4ea7d8={'code':_0xf86198[_0x5d5d30(0x142)],'message':_0x5d5d30(0x23d)+'\x20'+_0xf86198[_0x5d5d30(0x142)]};try{const _0x1734b4=JSON[_0x5d5d30(0x22f)](_0x3f7a59);if(_0x1734b4&&_0x1734b4[_0x5d5d30(0x172)])_0x4ea7d8[_0x5d5d30(0x172)]=_0x1734b4[_0x5d5d30(0x172)];}catch(_0x4e9e1b){}_0x5edbdf[_0x5d5d30(0xa7)](_0x514147,_0x4ea7d8);return;}_0x5edbdf['XLWpj'](_0x514147,JSON[_0x5d5d30(0x22f)](_0x3f7a59));}catch(_0x232581){console[_0x5d5d30(0x1ee)]('Error\x20pars'+_0x5d5d30(0xce)+'esponse\x20fr'+_0x5d5d30(0xa6)+_0x2f92c3+':',_0x232581,_0x3f7a59),_0x5edbdf[_0x5d5d30(0xff)](_0xe26a88,new Error(_0x5d5d30(0x14d)+'parse\x20API\x20'+'response:\x20'+_0x232581[_0x5d5d30(0x172)]));}});});_0x168d1b['on'](_0x1695a5[_0x57dd39(0x21b)],()=>{const _0x51d162=_0x57dd39;_0x1695a5['necfx'](_0x1695a5['cXwNr'],_0x1695a5[_0x51d162(0xdc)])?_0x577dad=_0x33dbfa:(_0x168d1b[_0x51d162(0x19f)](),console[_0x51d162(0x1ee)](_0x51d162(0x1e3)+'t\x20to\x20'+_0x2f92c3+(_0x51d162(0x199)+_0x51d162(0x1be))+_0x8ef23f+'ms'),_0x1695a5[_0x51d162(0x1a0)](_0xe26a88,new Error(_0x51d162(0x1e3)+'t\x20timed\x20ou'+'t')));}),_0x168d1b['on'](_0x1695a5['WpBwl'],_0x14b733=>{const _0x50a1e6=_0x57dd39;console[_0x50a1e6(0x1ee)](_0x50a1e6(0x1e3)+'t\x20to\x20'+_0x2f92c3+_0x50a1e6(0x8a),_0x14b733),_0x31494b['YPoSJ'](_0xe26a88,_0x14b733);}),_0x168d1b[_0x57dd39(0x228)]();});}const _0x42bcee=-0x2001+0x2390+-0x38f,_0x5c83a5=(_0x4d21ce,_0x19d6e5,_0x248274,_0x5c260d,_0xcca08)=>{const _0x4e6a11=_0x2201b1,_0x27e5bf={'DjAza':function(_0x381814,_0x17da63,_0x5544e4,_0x3e6787){return _0x381814(_0x17da63,_0x5544e4,_0x3e6787);},'hMNRO':function(_0x48574d,_0x462b8a){return _0x48574d(_0x462b8a);},'bQbac':_0x4e6a11(0x1df)+_0x4e6a11(0x222),'FYtnk':function(_0x487619,_0x2b9ae2,_0x43a127,_0x1c9aef,_0x2a9f1f,_0x786ea5){return _0x487619(_0x2b9ae2,_0x43a127,_0x1c9aef,_0x2a9f1f,_0x786ea5);},'IXTNA':function(_0x3a10ff,_0xdf50){return _0x3a10ff!==_0xdf50;},'FeQHy':_0x4e6a11(0x14c),'HdZEi':_0x4e6a11(0x226),'yJmZK':function(_0x214eda,_0x2bd210){return _0x214eda>_0x2bd210;},'ySvnC':function(_0x3cf961,_0x3f0806){return _0x3cf961(_0x3f0806);},'SLtHi':function(_0xe69d2c,_0x3b4091){return _0xe69d2c!==_0x3b4091;},'EEnYk':_0x4e6a11(0xdb),'EsfFK':function(_0x500e30,_0x1c2355){return _0x500e30===_0x1c2355;},'TTrAq':_0x4e6a11(0x216),'wbyMd':_0x4e6a11(0xc5),'WkvAI':function(_0x3560fd,_0x1234b6){return _0x3560fd===_0x1234b6;},'wUbyS':_0x4e6a11(0x24b),'MKizh':'.mp4','fJPJI':_0x4e6a11(0x252),'Atkqk':_0x4e6a11(0x21a),'tAnAQ':function(_0x110634,_0x3b3fb6){return _0x110634<_0x3b3fb6;},'eYlgW':function(_0x149c40,_0x42a4fa){return _0x149c40!==_0x42a4fa;},'duQia':_0x4e6a11(0x186),'zMOAr':_0x4e6a11(0xab)+_0x4e6a11(0x241)+'gth\x20is\x20dif'+'ferent\x20for'+_0x4e6a11(0x1c8)+_0x4e6a11(0x218),'elrjP':function(_0x2c0262,_0x3b8eb1){return _0x2c0262!==_0x3b8eb1;},'gUEcK':'WoWxB','RClSD':_0x4e6a11(0xab)+_0x4e6a11(0x241)+_0x4e6a11(0x255)+_0x4e6a11(0x137)+'\x20the\x20respo'+_0x4e6a11(0x218),'SzYlZ':_0x4e6a11(0x133)+_0x4e6a11(0x200)+_0x4e6a11(0x248),'KBvyj':function(_0x5c78dd,_0x13d33b){return _0x5c78dd+_0x13d33b;},'fkiYx':_0x4e6a11(0x1ac),'CvItG':'keep-alive','FxEJB':_0x4e6a11(0x24f)+_0x4e6a11(0x24e),'IaLko':_0x4e6a11(0xe0)+'pe','AwNhJ':_0x4e6a11(0x209)+'n/octet-st'+_0x4e6a11(0x94),'QCDTW':_0x4e6a11(0x228),'PADwf':_0x4e6a11(0x214),'RKmgy':_0x4e6a11(0x1fe),'NzyPe':'error'},_0x1c0435=_0x4d21ce[_0x4e6a11(0x20c)][_0x4e6a11(0xd1)](_0x27e5bf[_0x4e6a11(0xa0)])?_0x25c663:_0x1991c2;_0x1c0435['get'](_0x4d21ce['realUrl'],{'timeout':_0x42bcee,'rejectUnauthorized':![]},_0x4ac102=>{const _0xc1d4bc=_0x4e6a11,_0x5d06cf={'TtoVb':function(_0x5c82d7,_0x2009a7){const _0x1eebf6=_0x54eb;return _0x27e5bf[_0x1eebf6(0xf7)](_0x5c82d7,_0x2009a7);},'YqLob':_0x27e5bf['bQbac'],'PllOe':function(_0x59d2c5,_0x4177ba){const _0x229907=_0x54eb;return _0x27e5bf[_0x229907(0x89)](_0x59d2c5,_0x4177ba);},'pxWqx':function(_0x4c5296,_0x2c9d0c){const _0x561054=_0x54eb;return _0x27e5bf[_0x561054(0x112)](_0x4c5296,_0x2c9d0c);},'bmMgk':function(_0x1d64c7,_0x1504f7){const _0x4fd151=_0x54eb;return _0x27e5bf[_0x4fd151(0x123)](_0x1d64c7,_0x1504f7);},'Qzphq':_0x27e5bf[_0xc1d4bc(0xa1)]};if(_0x27e5bf['EsfFK'](_0x27e5bf[_0xc1d4bc(0x10a)],_0x27e5bf[_0xc1d4bc(0x1d7)]))_0xf78a55[_0xc1d4bc(0x1ee)](_0xc1d4bc(0xe4)+'ng\x20GET\x20req'+_0xc1d4bc(0x1b1)+_0x1140c9[_0xc1d4bc(0x20c)]+':',_0x57aee7),_0x27e5bf[_0xc1d4bc(0x247)](_0x48e2a0,_0x309520,_0x252fb5,_0x2a7b24['realUrl']);else{const _0x26d804=_0x50ed75[_0xc1d4bc(0x14e)+'eStream'](_0x19d6e5,{'flags':'w'});let _0x46d3b0=_0x4d21ce[_0xc1d4bc(0x213)]&&_0x27e5bf[_0xc1d4bc(0xe2)](typeof _0x4d21ce[_0xc1d4bc(0x213)],_0x27e5bf[_0xc1d4bc(0x1f9)])&&_0x4d21ce[_0xc1d4bc(0x213)]['includes'](_0x27e5bf[_0xc1d4bc(0x12e)]);const _0x5a4355=_0x4ac102[_0xc1d4bc(0x1a9)][_0xc1d4bc(0x1df)+_0xc1d4bc(0x222)];if(_0x5a4355){if(_0x27e5bf[_0xc1d4bc(0xe2)](_0x27e5bf[_0xc1d4bc(0xe1)],_0x27e5bf[_0xc1d4bc(0xed)])){const _0x354422=_0x4ce5a1['now']();for(const _0x347689 in _0x48bb37){_0x354422-_0x5700a1[_0x347689][_0xc1d4bc(0x232)]>_0x5bee5b&&delete _0x29fab7[_0x347689];}}else{if(_0x27e5bf[_0xc1d4bc(0x21f)](_0x5a4355,-0x12f8+-0x70e+-0x1*-0x2206)&&_0x27e5bf['eYlgW'](_0x4d21ce[_0xc1d4bc(0x1a9)][_0x27e5bf['bQbac']],_0x5a4355)){if(_0x27e5bf[_0xc1d4bc(0xe5)](_0x27e5bf[_0xc1d4bc(0x86)],_0x27e5bf['duQia']))_0x3c8b42[_0xc1d4bc(0x1ee)](_0xc1d4bc(0x143)+'ing\x20JSON\x20r'+_0xc1d4bc(0x1bb)+'om\x20'+_0x18da25+':',_0x1d6186,_0x33882a),_0x27e5bf[_0xc1d4bc(0x1d3)](_0x474917,new _0x5ba6c7(_0xc1d4bc(0x14d)+_0xc1d4bc(0x91)+_0xc1d4bc(0xa4)+_0x35803d[_0xc1d4bc(0x172)]));else{console[_0xc1d4bc(0x13a)](_0x27e5bf[_0xc1d4bc(0x1bf)],_0x4d21ce[_0xc1d4bc(0x20c)]),_0x14aaae(_0xcca08,_0x1ee738[_0xc1d4bc(0x125)+'Y'],_0xc1d4bc(0xda)+'y:\x20Content'+'-Length\x20mi'+_0xc1d4bc(0x19c)+'\x20'+_0x4d21ce[_0xc1d4bc(0x20c)]);_0x50ed75[_0xc1d4bc(0x1a3)](_0x19d6e5)&&(_0x27e5bf[_0xc1d4bc(0x187)](_0xc1d4bc(0x15d),_0xc1d4bc(0xad))?_0x50ed75[_0xc1d4bc(0xf9)](_0x19d6e5):(_0x6277fb['warn'](_0xc1d4bc(0x223)+_0xc1d4bc(0x135)+_0xc1d4bc(0xfe)+_0x486d31+_0xc1d4bc(0xb2)+_0x3e495d[_0xc1d4bc(0x1a9)][_0x27e5bf[_0xc1d4bc(0x251)]]+_0xc1d4bc(0xbc)+_0x30dcdc+(_0xc1d4bc(0x83)+_0xc1d4bc(0x141))),_0x27e5bf[_0xc1d4bc(0xbf)](_0x2cba08,_0x31027b,_0x47fb26,_0x557aac,_0x18d91c,_0x49630)));return;}}_0x4d21ce[_0xc1d4bc(0x1a9)][_0x27e5bf[_0xc1d4bc(0x251)]]=_0x5a4355,_0x50ed75[_0xc1d4bc(0xea)+_0xc1d4bc(0x257)](_0x5c260d,JSON[_0xc1d4bc(0x93)](_0x4d21ce));}}else{if(_0x27e5bf[_0xc1d4bc(0x235)](_0x27e5bf['gUEcK'],_0x27e5bf['gUEcK']))console['warn'](_0x27e5bf[_0xc1d4bc(0x193)],_0x4d21ce[_0xc1d4bc(0x20c)]);else{const _0x1c55c3=_0x3b0702[_0xc1d4bc(0xaf)](_0x493281);_0x2d194=_0x1c55c3[_0xc1d4bc(0x24d)];if(_0x5d06cf[_0xc1d4bc(0x234)](_0x4d09cd,-0x2*0xad+0xc*0x2cd+-0x2042)){if(!_0x5ea711['headers'])_0x12df80[_0xc1d4bc(0x1a9)]={};_0x378c89['headers'][_0x5d06cf['YqLob']]=_0x4de801[_0xc1d4bc(0x1fb)](),_0x167ff6[_0xc1d4bc(0xea)+_0xc1d4bc(0x257)](_0x5e2822,_0x40fb71[_0xc1d4bc(0x93)](_0x3e8121)),_0x123e47[_0xc1d4bc(0x1dc)](_0xc1d4bc(0x1d6)+'ntent-leng'+_0xc1d4bc(0x1b0)+_0x596604+_0xc1d4bc(0x233)+_0xa18b61);}else _0x35758c['warn'](_0xc1d4bc(0x17a)+'tent\x20file\x20'+_0x326dc4+(_0xc1d4bc(0x165)+_0xc1d4bc(0x1cb)+'failed.'));}}const _0x268ef6={'Cloud-Type':_0x4d21ce['cloudtype'],'Cloud-Expiration':_0x4d21ce[_0xc1d4bc(0x17b)],'ETag':_0x4d21ce['uniqid']||'','Cache-Control':_0x27e5bf[_0xc1d4bc(0x13d)],'Expires':new Date(_0x27e5bf['KBvyj'](Date[_0xc1d4bc(0x96)](),0x1f426f1c7*0x4+-0x1513f7f3d*-0x5+-0x70f28174d))['toUTCStrin'+'g'](),'Accept-Ranges':_0x27e5bf['fkiYx'],'Connection':_0x27e5bf['CvItG'],'Date':new Date()[_0xc1d4bc(0x11b)+'g'](),'Last-Modified':_0x4d21ce[_0xc1d4bc(0x1a9)][_0x27e5bf['FxEJB']]||new Date(_0x50ed75['statSync'](_0x5c260d)['mtime'])['toUTCStrin'+'g']()},_0x23e5cf={..._0x268ef6,'Content-Type':_0x4ac102[_0xc1d4bc(0x1a9)][_0x27e5bf[_0xc1d4bc(0x19e)]]||(_0x46d3b0?'video/mp4':_0x27e5bf[_0xc1d4bc(0xc2)]),..._0x4d21ce['headers']};_0xcca08['writeHead'](_0x4ac102[_0xc1d4bc(0x142)],_0x23e5cf),_0x4ac102['pipe'](_0x26d804),_0x4ac102[_0xc1d4bc(0x23b)](_0xcca08),_0x4ac102['on'](_0x27e5bf[_0xc1d4bc(0x162)],()=>{const _0x26598c=_0xc1d4bc;_0x27e5bf[_0x26598c(0x112)](_0x27e5bf[_0x26598c(0x23f)],_0x27e5bf['HdZEi'])?_0x26d804[_0x26598c(0x228)](()=>{const _0xba15cf=_0x26598c,_0x348ac5={'kUvpq':function(_0x4abc23,_0xe95f49){return _0x4abc23>=_0xe95f49;},'DecHP':function(_0x437438,_0x1f9412){const _0x46a5a5=_0x54eb;return _0x5d06cf[_0x46a5a5(0x256)](_0x437438,_0x1f9412);}};if(_0x50ed75[_0xba15cf(0x1a3)](_0x19d6e5))try{const _0x24cf15=_0x261916[_0xba15cf(0xbb)](_0x248274);!_0x50ed75['existsSync'](_0x24cf15)&&_0x50ed75[_0xba15cf(0xcd)](_0x24cf15,{'recursive':!![]}),_0x50ed75[_0xba15cf(0x152)](_0x19d6e5,_0x248274),console['log'](_0xba15cf(0xb9)+_0xba15cf(0x115)+'\x20'+_0x248274);}catch(_0x26d004){if(_0x5d06cf[_0xba15cf(0x15e)]('CkFyB',_0xba15cf(0xf4)))return _0x40b16c(_0x5203bf,_0x57f42f[_0xba15cf(0x254)+'T'],_0xba15cf(0x205)+_0xba15cf(0x136)+'\x20path\x20or\x20m'+'issing\x20tok'+_0xba15cf(0x16f));else{console['error']('Error\x20rena'+'ming\x20temp\x20'+'cache\x20file'+'\x20'+_0x19d6e5+_0xba15cf(0x233)+_0x248274+':',_0x26d004);try{_0x50ed75[_0xba15cf(0xf9)](_0x19d6e5);}catch(_0x302205){}}}else{if(_0x5d06cf[_0xba15cf(0x185)](_0x5d06cf['Qzphq'],_0xba15cf(0xdb))){if(_0x348ac5[_0xba15cf(0x1b6)](_0x105b9d[_0xba15cf(0x142)],0x1d*0xcd+0x7a*-0x44+0x7*0x189)){_0x8c34d8[_0xba15cf(0x1ee)](_0xba15cf(0x1e3)+_0xba15cf(0x18e)+_0x23ac00+(_0xba15cf(0x1ba)+_0xba15cf(0x1ad))+_0x102f48[_0xba15cf(0x142)]+':\x20'+_0x56a76d);let _0x2d8061={'code':_0x190837[_0xba15cf(0x142)],'message':_0xba15cf(0x23d)+'\x20'+_0x4d076e[_0xba15cf(0x142)]};try{const _0x3ad5f9=_0x2ece6f[_0xba15cf(0x22f)](_0x19befd);if(_0x3ad5f9&&_0x3ad5f9[_0xba15cf(0x172)])_0x2d8061[_0xba15cf(0x172)]=_0x3ad5f9['message'];}catch(_0x4b5daa){}_0x348ac5[_0xba15cf(0x22c)](_0x5c0eed,_0x2d8061);return;}_0x348ac5[_0xba15cf(0x22c)](_0xd848c6,_0x53a1dd[_0xba15cf(0x22f)](_0x39ef07));}else console[_0xba15cf(0x13a)](_0xba15cf(0x23a)+'\x20file\x20'+_0x19d6e5+('\x20not\x20found'+_0xba15cf(0x25c)+_0xba15cf(0x25d)+'r\x20')+_0x4d21ce[_0xba15cf(0x20c)]);}}):_0x5d06cf[_0x26598c(0x234)](_0x46c1ed-_0x5885f2[_0xc3c93c][_0x26598c(0x232)],_0x451f3c)&&delete _0x505cf0[_0x25825e];}),_0x4ac102['on'](_0xc1d4bc(0x1ee),_0x4db473=>{const _0x5ee352=_0xc1d4bc;console[_0x5ee352(0x1ee)](_0x5ee352(0x217)+_0x5ee352(0x25f)+'e\x20stream\x20f'+'rom\x20'+_0x4d21ce[_0x5ee352(0x20c)]+':',_0x4db473),_0x26d804['end'](),_0x1aa795(_0xcca08,_0x19d6e5,_0x4d21ce[_0x5ee352(0x20c)]);});}})['on'](_0x27e5bf[_0x4e6a11(0x1e8)],_0x14def1=>{const _0x3fec54=_0x4e6a11;if(_0x27e5bf[_0x3fec54(0x238)]!==_0x27e5bf[_0x3fec54(0x238)])return{'cacheData':_0x16060a,'isNotModified':!![]};else console[_0x3fec54(0x1ee)](_0x3fec54(0xe4)+_0x3fec54(0x92)+'uest\x20to\x20'+_0x4d21ce[_0x3fec54(0x20c)]+':',_0x14def1),_0x27e5bf[_0x3fec54(0x247)](_0x1aa795,_0xcca08,_0x19d6e5,_0x4d21ce['realUrl']);});};function _0x3f7a2c(_0x5cff65,_0x370e70,_0x288fec,_0x521c79){const _0x371fb6=_0x2201b1,_0x452aeb={'OZzDT':_0x371fb6(0xe0)+'pe','lVfsU':_0x371fb6(0x209)+_0x371fb6(0x25b)+'ream','FrsKE':function(_0x4c7995,_0x24d97d,_0x158306){return _0x4c7995(_0x24d97d,_0x158306);},'nNJyj':function(_0x3b344d,_0x2b4450){return _0x3b344d===_0x2b4450;},'aMIFT':_0x371fb6(0x1f4),'EaQMn':_0x371fb6(0x1fa),'mjrOM':_0x371fb6(0xef),'wqIIR':function(_0x42e233,_0x268855){return _0x42e233!==_0x268855;},'hNxTT':'awMQO','RuiAS':_0x371fb6(0x17f),'QuFoh':function(_0x27d725,_0x4bc3b7,_0x46c3cb,_0x48f288){return _0x27d725(_0x4bc3b7,_0x46c3cb,_0x48f288);},'kZgls':_0x371fb6(0x140)+_0x371fb6(0x105)+_0x371fb6(0x8f),'HZiwE':_0x371fb6(0x204),'eVxdl':'hex','UAncO':_0x371fb6(0x1ac),'rfIek':_0x371fb6(0x24a),'KMeov':_0x371fb6(0x24f)+_0x371fb6(0x24e),'LdvvA':_0x371fb6(0x1c6),'IfUPN':_0x371fb6(0x1df)+_0x371fb6(0x222),'ILKbY':function(_0x18fee3,_0x4957c2,_0x211736){return _0x18fee3(_0x4957c2,_0x211736);},'hZmfQ':function(_0xdfbd86,_0x182bae){return _0xdfbd86===_0x182bae;},'gEjxp':_0x371fb6(0x156),'FGrMe':_0x371fb6(0x1a4),'hHfpY':function(_0x4bbf3c,_0x58fb77){return _0x4bbf3c>_0x58fb77;},'dvLOD':function(_0x5d784a,_0x10fbb8){return _0x5d784a!==_0x10fbb8;},'AYfHM':_0x371fb6(0xcc),'mKzea':_0x371fb6(0x19a),'WCwft':_0x371fb6(0x1d8),'OMvDL':_0x371fb6(0xaa),'pcxCz':'DejNf','wnDnf':function(_0x496c1d,_0x11564d,_0x5ce83d){return _0x496c1d(_0x11564d,_0x5ce83d);},'QjuDE':'open'};if(!_0x5cff65){console[_0x371fb6(0x1ee)](_0x371fb6(0x192)+_0x371fb6(0x16a)+'d\x20with\x20nul'+_0x371fb6(0x148)+_0x371fb6(0x198)+_0x370e70),_0x452aeb[_0x371fb6(0x87)](_0x14aaae,_0x521c79,_0x1ee738[_0x371fb6(0x1b9)+_0x371fb6(0xb7)+'R'],_0x452aeb['kZgls']);return;}const _0x5640f3={'Cloud-Type':_0x5cff65[_0x371fb6(0xd8)]||'unknown','Cloud-Expiration':_0x5cff65[_0x371fb6(0x17b)]||_0x371fb6(0xba),'ETag':_0x5cff65['uniqid']||_0x15cd4e[_0x371fb6(0x1b3)](_0x452aeb['HZiwE'])[_0x371fb6(0x15c)](_0x50ed75[_0x371fb6(0xca)+'nc'](_0x370e70))[_0x371fb6(0x1d0)](_0x452aeb['eVxdl']),'Cache-Control':'public,\x20ma'+'x-age=3153'+'6000','Expires':new Date(Date['now']()+(-0xabf8c46d*-0x4+-0xde1319919+0x1288ffb365))['toUTCStrin'+'g'](),'Accept-Ranges':_0x452aeb[_0x371fb6(0x84)],'Connection':_0x452aeb[_0x371fb6(0xfd)],'Date':new Date()[_0x371fb6(0x11b)+'g'](),'Last-Modified':_0x5cff65[_0x371fb6(0x1a9)]&&_0x5cff65[_0x371fb6(0x1a9)][_0x452aeb['KMeov']]||new Date(_0x50ed75['statSync'](_0x288fec)[_0x371fb6(0x9d)])[_0x371fb6(0x11b)+'g']()};_0x48a8cb[_0x371fb6(0x163)](_0x371fb6(0xc6));const _0x5b311c=_0x50ed75['createRead'+_0x371fb6(0x220)](_0x370e70),_0x2926ad=_0x5cff65[_0x371fb6(0x213)]&&_0x452aeb[_0x371fb6(0x14a)](typeof _0x5cff65[_0x371fb6(0x213)],'string')&&_0x5cff65[_0x371fb6(0x213)][_0x371fb6(0x21c)](_0x452aeb[_0x371fb6(0xde)]);let _0xfaca35=_0x5cff65['headers']&&_0x5cff65[_0x371fb6(0x1a9)][_0x452aeb[_0x371fb6(0x102)]]?_0x452aeb[_0x371fb6(0x211)](parseInt,_0x5cff65[_0x371fb6(0x1a9)][_0x452aeb[_0x371fb6(0x102)]],0x1697+0x24b9+-0x3b46):0x1cb9+0x2f4+-0x1fad;if(!_0xfaca35||_0x452aeb[_0x371fb6(0x166)](_0xfaca35,0x19c9+-0x154e+-0x1*0x47b)){if(_0x452aeb[_0x371fb6(0x97)](_0x452aeb[_0x371fb6(0x9a)],_0x452aeb[_0x371fb6(0x1f2)]))try{const _0x321139=_0x50ed75[_0x371fb6(0xaf)](_0x370e70);_0xfaca35=_0x321139[_0x371fb6(0x24d)];if(_0x452aeb[_0x371fb6(0x171)](_0xfaca35,-0x8*0xc0+0x1*-0x1df7+0x23f7)){if(_0x452aeb[_0x371fb6(0x124)](_0x452aeb[_0x371fb6(0x197)],_0x452aeb[_0x371fb6(0xa2)])){if(!_0x5cff65[_0x371fb6(0x1a9)])_0x5cff65['headers']={};_0x5cff65[_0x371fb6(0x1a9)][_0x452aeb['IfUPN']]=_0xfaca35[_0x371fb6(0x1fb)](),_0x50ed75[_0x371fb6(0xea)+_0x371fb6(0x257)](_0x288fec,JSON[_0x371fb6(0x93)](_0x5cff65)),console[_0x371fb6(0x1dc)](_0x371fb6(0x1d6)+_0x371fb6(0x1f8)+_0x371fb6(0x1b0)+_0x288fec+_0x371fb6(0x233)+_0xfaca35);}else _0xfa7a49[_0x371fb6(0x13a)]('Temp\x20cache'+_0x371fb6(0xc3)+_0x532129+(_0x371fb6(0xf2)+_0x371fb6(0x25c)+_0x371fb6(0x25d)+'r\x20')+_0x2b42d7[_0x371fb6(0x20c)]);}else{if(_0x452aeb['wqIIR'](_0x452aeb[_0x371fb6(0x21d)],_0x452aeb[_0x371fb6(0x1ff)]))console[_0x371fb6(0x13a)]('Cached\x20con'+'tent\x20file\x20'+_0x370e70+(_0x371fb6(0x165)+_0x371fb6(0x1cb)+'failed.'));else{const _0x53559b={..._0x58f597,'Content-Type':_0x51b931[_0x371fb6(0x1a9)]&&_0x217184[_0x371fb6(0x1a9)][_0x452aeb[_0x371fb6(0x1b4)]]||(_0x50d1e3?'video/mp4':_0x452aeb[_0x371fb6(0xf8)]),..._0x486047[_0x371fb6(0x1a9)]||{}};_0x262eb7[_0x371fb6(0xd2)](_0x5563c3['OK'],_0x53559b),_0x132571[_0x371fb6(0x23b)](_0x11323b);}}}catch(_0x3d5ccd){if(_0x452aeb[_0x371fb6(0x14a)](_0x452aeb[_0x371fb6(0x1db)],_0x452aeb[_0x371fb6(0x1db)])){console[_0x371fb6(0x1ee)](_0x371fb6(0xee)+_0x371fb6(0x176)+_0x371fb6(0x158)+_0x371fb6(0x9f)+_0x370e70+':',_0x3d5ccd),_0x452aeb['wnDnf'](_0x57de4a,_0x521c79,_0x370e70);return;}else _0x3bdb5f=_0x5874c8[_0x371fb6(0x19b)][_0x371fb6(0x16d)],_0xd58f76[_0x371fb6(0x1dc)](_0x371fb6(0x206)+_0x371fb6(0x161)+_0x371fb6(0x99)+_0xaa8027);}else{_0x1f58f9['error'](_0x371fb6(0xee)+_0x371fb6(0x176)+_0x371fb6(0x158)+_0x371fb6(0x9f)+_0x4b9a6c+':',_0x301cc0),_0x452aeb['FrsKE'](_0x56a24a,_0x4030f2,_0x170bfa);return;}}_0x5b311c['on'](_0x452aeb['QjuDE'],()=>{const _0xdde313=_0x371fb6;if(_0x452aeb[_0xdde313(0x14a)](_0x452aeb['aMIFT'],_0x452aeb['EaQMn']))_0xbf3a90['writeHead'](_0x2597e2[_0xdde313(0x239)]),_0xb3c659['end']();else{const _0x36a202={..._0x5640f3,'Content-Type':_0x5cff65[_0xdde313(0x1a9)]&&_0x5cff65[_0xdde313(0x1a9)][_0xdde313(0xe0)+'pe']||(_0x2926ad?_0x452aeb[_0xdde313(0xf1)]:_0x452aeb[_0xdde313(0xf8)]),..._0x5cff65[_0xdde313(0x1a9)]||{}};_0x521c79[_0xdde313(0xd2)](_0x1ee738['OK'],_0x36a202),_0x5b311c['pipe'](_0x521c79);}}),_0x5b311c['on'](_0x371fb6(0x1ee),_0x5acaea=>{const _0x5b8c2f=_0x371fb6;console[_0x5b8c2f(0x1ee)]('Read\x20strea'+'m\x20error\x20fo'+'r\x20'+_0x370e70+':',_0x5acaea),_0x452aeb[_0x5b8c2f(0x20f)](_0x57de4a,_0x521c79,_0x370e70);}),_0x521c79['on'](_0x371fb6(0xd7),()=>{const _0x1752f7=_0x371fb6;!_0x521c79[_0x1752f7(0xb0)+_0x1752f7(0x13c)]&&(_0x452aeb[_0x1752f7(0x97)](_0x452aeb[_0x1752f7(0x20e)],_0x452aeb[_0x1752f7(0x23e)])?(console[_0x1752f7(0x1dc)](_0x1752f7(0x134)+_0x1752f7(0x1bd)+_0x1752f7(0x15f)+_0x1752f7(0x201)+'\x20'+_0x370e70+('.\x20Destroyi'+'ng\x20read\x20st'+_0x1752f7(0x12f))),_0x5b311c['destroy']()):(_0x409dd4[_0x1752f7(0xd2)](_0x335192['NOT_MODIFI'+'ED']),_0x1834f6[_0x1752f7(0x228)]()));});}const _0x1aa795=(_0x4e7bb6,_0x4d8ad1,_0x33383b)=>{const _0x1c1d62=_0x2201b1,_0x2c732e={'yFUaJ':_0x1c1d62(0x168)+_0x1c1d62(0xa9),'QYDNE':function(_0x277619,_0x21b137,_0x3b6d20,_0x2b8a89){return _0x277619(_0x21b137,_0x3b6d20,_0x2b8a89);},'lOwxL':_0x1c1d62(0x170),'CTurL':_0x1c1d62(0x18b)};_0x48a8cb['increment'](_0x2c732e[_0x1c1d62(0x23c)]),console[_0x1c1d62(0x1ee)]('Error\x20fetc'+'hing\x20from\x20'+_0x1c1d62(0x18a)+_0x33383b),_0x2c732e[_0x1c1d62(0x127)](_0x14aaae,_0x4e7bb6,_0x1ee738[_0x1c1d62(0x125)+'Y'],'Bad\x20Gatewa'+_0x1c1d62(0x249)+_0x1c1d62(0xd4)+_0x1c1d62(0x154)+_0x33383b);if(_0x50ed75[_0x1c1d62(0x1a3)](_0x4d8ad1)){if(_0x2c732e[_0x1c1d62(0xe8)]!==_0x2c732e[_0x1c1d62(0x100)])try{_0x50ed75[_0x1c1d62(0xf9)](_0x4d8ad1);}catch(_0x431fc9){console[_0x1c1d62(0x1ee)](_0x1c1d62(0x1af)+'nking\x20temp'+'\x20file\x20'+_0x4d8ad1+':',_0x431fc9);}else delete _0x23909c[_0x7a567f];}},_0x57de4a=(_0x2662dd,_0x279fc0)=>{const _0x53c650=_0x2201b1,_0x552296={'vSiif':function(_0x1f5557,_0x37f9ed,_0x292ff3,_0x5b5a71){return _0x1f5557(_0x37f9ed,_0x292ff3,_0x5b5a71);},'qMstM':'Internal\x20S'+_0x53c650(0x15b)+_0x53c650(0x116)+_0x53c650(0x175)+'che\x20conten'+_0x53c650(0x18f)};_0x48a8cb[_0x53c650(0x163)](_0x53c650(0x1e7)+_0x53c650(0x1a2)),console[_0x53c650(0x1ee)]('Error\x20read'+_0x53c650(0x176)+'file:\x20'+_0x279fc0),_0x552296[_0x53c650(0x11a)](_0x14aaae,_0x2662dd,_0x1ee738[_0x53c650(0x1b9)+_0x53c650(0xb7)+'R'],_0x552296[_0x53c650(0x22e)]);};_0x10290f[_0x2201b1(0x90)](_0x565d94,()=>{const _0xf0c2d6=_0x2201b1;console[_0xf0c2d6(0x1dc)](_0xf0c2d6(0x12c)+_0xf0c2d6(0x1a6)+_0xf0c2d6(0x119)+_0xf0c2d6(0x8d)+'ost:'+_0x565d94);}),process['on'](_0x2201b1(0x12b),()=>{const _0x107e6a=_0x2201b1,_0xfc35c={'DKVrQ':_0x107e6a(0x1fd)+_0x107e6a(0x1c5),'GhsIq':'applicatio'+_0x107e6a(0x1c2)+_0x107e6a(0x1a1)+'8','PMceo':function(_0x12c867,_0x2ee189){return _0x12c867===_0x2ee189;},'AklOu':'dmkqr','eEWtL':_0x107e6a(0x1b2)+_0x107e6a(0x22a),'lETPe':_0x107e6a(0x182)+_0x107e6a(0x1bc)+_0x107e6a(0x1d9)+'\x20gracefull'+_0x107e6a(0x215),'lGdQD':function(_0xe355e8,_0x50928b,_0x414c5e){return _0xe355e8(_0x50928b,_0x414c5e);}};console[_0x107e6a(0x1dc)](_0xfc35c[_0x107e6a(0x8b)]),_0x10290f['close'](()=>{const _0x305945=_0x107e6a;console[_0x305945(0x1dc)](_0xfc35c[_0x305945(0x173)]),process[_0x305945(0x13e)](0x1579+0x1331+-0x28aa);}),_0xfc35c[_0x107e6a(0xb5)](setTimeout,()=>{const _0x453289=_0x107e6a;if(_0xfc35c[_0x453289(0xa5)](_0x453289(0x1ea),_0xfc35c['AklOu']))console['error'](_0xfc35c[_0x453289(0x246)]),process[_0x453289(0x13e)](0x2273+-0x1f5+-0x207d);else{if(_0x2088f0[_0x453289(0x19b)][_0x453289(0x16d)]){const _0x28528d=/^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([\/\w.-]*)*\/?$/;_0x28528d[_0x453289(0x1dd)](_0x4a9448[_0x453289(0x19b)][_0x453289(0x16d)])&&(_0x498c73=_0x59ae36[_0x453289(0x19b)][_0x453289(0x16d)],_0x4f35e4[_0x453289(0x1dc)](_0x453289(0x206)+_0x453289(0x161)+_0x453289(0x99)+_0x2c36f4));}_0x3743f1[_0x453289(0xd2)](_0x4468e5['OK'],{'Content-Type':_0xfc35c[_0x453289(0x80)]}),_0x4d9f40[_0x453289(0x228)](_0x4deaf7[_0x453289(0x93)]({'code':_0x36929a['OK'],'data':{'api':_0x3d774b,'port':_0x2514ac,'cacheDir':_0x26542b,'pathIndexCount':_0x455df8[_0x453289(0x20d)](_0x573f92)[_0x453289(0xf6)],'viewsInfo':{'request':_0x4d68e5['request'],'cacheHit':_0x446a96[_0x453289(0x101)],'apiCall':_0x303f89['apiCall'],'cacheCall':_0x4bc77d[_0x453289(0xc6)],'cacheReadError':_0x33f4af[_0x453289(0x1e7)+_0x453289(0x1a2)],'fetchApiError':_0x3cef8f[_0x453289(0x168)+'ror'],'fetchApiWarning':_0x98830[_0x453289(0x207)+_0x453289(0x11f)]}}}));}},0x4b2e+-0xd02*-0x6+0x1307*-0x6);}); \ No newline at end of file +const _0x16cc39=_0x59f4;(function(_0x3aff0e,_0x132945){const _0xe3a0d5=_0x59f4,_0x974b36=_0x3aff0e();while(!![]){try{const _0x427acf=-parseInt(_0xe3a0d5(0xb4))/(0x1575+-0xa7*-0x33+0x1*-0x36b9)+-parseInt(_0xe3a0d5(0x85))/(0x13*0x16d+0x3*0x75f+-0x3132)*(parseInt(_0xe3a0d5(0x137))/(-0x7cc*-0x2+-0x7fa+-0xb*0xb1))+-parseInt(_0xe3a0d5(0x1f4))/(-0x101e*-0x2+-0x1b1a+-0x2*0x28f)+parseInt(_0xe3a0d5(0x12f))/(-0x2*-0xbd8+-0x227d+0x2*0x569)*(parseInt(_0xe3a0d5(0x136))/(0xe7b+0x1*-0x125b+0x1*0x3e6))+parseInt(_0xe3a0d5(0x82))/(0x401*-0x2+-0xf4d*0x1+0x1756)+parseInt(_0xe3a0d5(0x97))/(-0x781+0x59*0x3e+-0xe05)+-parseInt(_0xe3a0d5(0x274))/(-0x18f1+0x74a+-0x2*-0x8d8)*(parseInt(_0xe3a0d5(0x233))/(-0xdcf*-0x2+0x1*-0xf39+-0xc5b*0x1));if(_0x427acf===_0x132945)break;else _0x974b36['push'](_0x974b36['shift']());}catch(_0x20a462){_0x974b36['push'](_0x974b36['shift']());}}}(_0x2460,-0xbc0b6+-0x1179b*-0xe+0x9ee4b*0x1));const _0x3907d7=require('http'),_0x568bec=require(_0x16cc39(0x259)),_0x1361d9=require('url'),_0x2b82cf=require(_0x16cc39(0x156)+'g'),_0x1e8eee=require('fs'),_0x51bf51=require(_0x16cc39(0x264)),_0x3fbbb4=require(_0x16cc39(0x231)),_0x15dbb4=require('sharp'),_0xa4cbd1=_0x16cc39(0x242),_0x4e4203=0x8c*-0x7a+0x16*-0x19c+-0xb*-0xc7b,_0x3fecc8=_0x16cc39(0x272)+_0x16cc39(0x1fe)+_0x16cc39(0x185)+'t',_0x5cdaca=_0x51bf51[_0x16cc39(0x77)](__dirname,_0xa4cbd1),_0x45bdde={},_0x40723d={'request':0x0,'cacheHit':0x0,'apiCall':0x0,'cacheCall':0x0,'cacheReadError':0x0,'fetchApiError':0x0,'fetchApiWarning':0x0,'increment':function(_0x2a0b49){const _0x216f5b=_0x16cc39,_0x231542={'atAPu':function(_0xa3f30e,_0x28d646){return _0xa3f30e===_0x28d646;},'mHGFS':_0x216f5b(0x277)};if(this[_0x216f5b(0x113)+'erty'](_0x2a0b49)){if(_0x231542['atAPu'](_0x231542['mHGFS'],_0x231542['mHGFS']))this[_0x2a0b49]++;else{_0x5f4814[_0x216f5b(0x194)](_0x216f5b(0x239)+_0x216f5b(0x11a)+_0x5882de+('\x20failed\x20wi'+_0x216f5b(0x1ea))+_0x38e709[_0x216f5b(0xe6)]+':\x20'+_0x32cb44);let _0x4d929d={'code':_0x585c06[_0x216f5b(0xe6)],'message':_0x216f5b(0xc4)+'\x20'+_0x3382c8[_0x216f5b(0xe6)]};try{const _0x1d8cad=_0x909883[_0x216f5b(0x198)](_0x4f8990);if(_0x1d8cad&&_0x1d8cad[_0x216f5b(0xa8)])_0x4d929d[_0x216f5b(0xa8)]=_0x1d8cad[_0x216f5b(0xa8)];}catch(_0x272107){}_0x2a5909(_0x4d929d);return;}}}};function _0x59f4(_0x3e282a,_0x4d6ba4){const _0x38d002=_0x2460();return _0x59f4=function(_0x2f2b55,_0x1c3566){_0x2f2b55=_0x2f2b55-(-0x156d+-0x1*0xcf8+-0x22db*-0x1);let _0x44fcdf=_0x38d002[_0x2f2b55];return _0x44fcdf;},_0x59f4(_0x3e282a,_0x4d6ba4);}let _0x3b959f=_0x4e4203,_0x4e7d86=_0x3fecc8;function _0x2460(){const _0x5067e1=['mnceB','VpPpn','Qymec','wtAps','content-le','qjpPV','qWLnw','data\x20unava','y:\x20Content','NO_CONTENT','mykAZ','RaKHI','PpBYn','ntent-leng','VbSsM','WunQA','uVIfV','rom\x20','KVqGn','Error\x20duri','MPBNa','Win64;\x20x64','code','hyVsp','Kit/537.36','Cache\x20dire','qyODE','Error\x20pars','API\x20endpoi','vcMlF','eader\x20chec','UGSCL','ZqKsJ','ngVOt','query','Warning:\x20c','gtLaR','renameSync','aShEe','fpGnU','ream','a\x20for\x20','acheHeader','NdLmG','www','th\x20status\x20','TFFiJ','ngth\x20misma','gth\x20is\x20dif','INTERNAL_S','EEdLQ','image/jpeg','replace','timestamp','l\x20cacheDat','1011856IUhpgC','destroy','erver\x20Erro','\x20directory','Received\x20S','text/plain','XzaAT','HXjtY','n-200.\x20Ser','cacheHit','.6.121.121','YbxmQ','xitRF','k\x20(','y...','ferent\x20for','last-modif','substring','dPfaz','dWdZN','mByMA','KwryV','IaTEe','EODbi','FvHrJ','uvVtj','headersSen','writeFileS','\x20the\x20respo','GoSpt','pHDBc','startsWith','ELVXg','sjklI','or\x20cache\x20h','bbs','API\x20call\x20f','yqnJS','vLwEc','.\x20Re-fetch','port','.\x20API:\x20','YbSvu','Error\x20rena',';charset=U','Cache\x20meta','Error\x20crea','zSEgT','timeout','t\x20timed\x20ou','QLnsK','p://localh','MfHQn','fetchApiEr','zQXzc','Cphnr','IRtdb','.mp4','le\x20','aCtgb','zZQZl','crypto','UxBNI','20NabTUh','realUrl','Content\x20le','YPTFM','file:\x20','37.36','API\x20reques','YNtgq','QMjii','efined\x20for','\x20path\x20or\x20m','thumb','zjgpf','\x20failed:','zubuW','.cache','existsSync','applicatio','LAkqG','turely\x20for','uxKfH','fLkOm','MkeHB','utdown...','gamVD','QGcTz','Temp\x20cache','SIGINT','bytes','NspkF','nrKkB','6000','number','cache\x20file','meta\x20file\x20','sed.','slice','iWAMY','https','XOjSX','\x20after\x20str','favicon.ic','response:\x20','\x20in\x20checkC','gth\x20is\x20und','smatch\x20for','t:\x20Invalid','close','pLvoE','path','che\x20conten','dNPPo','aeGGZ','forEach','xBjKS','UWhzB','mlmno','pathname','Server\x20clo','en.','y:\x20Failed\x20','content-ty','ucNIV','http://183','JMPBr','535635asfYwo','jBTxr','now','KHAll','end','jriYj','tch','lGIPv','protocol','Tusrn','cacheCall','writeHead','\x20for\x20valid','\x20not\x20found','MidQT','ync','unknown','split','join','Successful','FRNFQ','\x20meta\x20file','dVByr','tting\x20down','rnGLC','KBYyE','kFoLc','pxYKh','AjbFz','2754171lPsYxo','createRead','ing\x20date\x20f','818EzhMgi','uBFDQ','ezUXm','mQsMj','iTNep','uest\x20to\x20','XKsMn','Bad\x20Gatewa','hVSCj','data','tion\x20prema','\x20gracefull','CBicz','WeMIE','NYwrg','OaTlu','nPtsM','QTVCX','14120088Lqglgh','warn','glrYT','xHbEY','OSWEn','IdDIE','Error\x20writ','IGINT.\x20Shu','string','wBhfX','Fufhn','ing\x20stale\x20','\x20to:\x20','jSbWv','mkXNs','PAwHF','LycmM','message','khUXj','eam\x20end\x20fo','zKWmq','aGVbD','lhMku','gFByh','Read\x20strea','Axfwe','Error\x20read','toString','parse\x20API\x20','172027zksgsa','d\x20with\x20nul','GyBZx','aUVWG','kVXLc','createWrit','cEhfM','UySDm','DXqEc','mpfeX','\x20timed\x20out','ZBETr','.meta','n/json;\x20ch','ZkNjR','yPTjn','API\x20Error:','fEwfj','wdKOq','sing\x20cache','y:\x20API\x20req','PI\x20call\x20or','BAD_REQUES','odbfG','nt\x20updated',')\x20AppleWeb','wQFJg','fsgUR','if-modifie','ilable.','serveFromC','Failed\x20to\x20','Error\x20in\x20A','fetchApiWa','SEdyC','0\x20or\x20stat\x20','wzzRm','YdyIf','x-age=3153','randomByte','eStream','eturned\x20no','uHiPC','SNPEE','PvPUo','\x20to\x20','om\x20','stringify','ERVER_ERRO','wKSMO','statusCode','https:','bEOMd','wrOWL','BMbCR','REDIRECT','ming\x20temp\x20',',\x20Cache:\x20','GFVQS','ving\x20stale','request','t\x20file','iQXar','GWWXZ','0\x20(Windows','ted:\x20','SbWci','length','iBvnx','increment','ndIfN','update','ream.','YNyJe','BNNbX','Stream','\x20failed\x20wi','gcqCm','ost:','ied','_thumb','size','GET','d.\x20','unlinkSync','.\x20Destroyi','nse\x20from:','avatar','er\x20is\x20runn','IDLHY','Client\x20clo','dOace','jrzhl','video/mp4','HYdFz','hasOwnProp','VtzvJ','ror','mkdirSync','DHbDw','AYkQX','pSsrX','t\x20to\x20','Forcing\x20sh','QdxpT','oaMgQ','jjcNG','dCYzl','SwpnC','\x20(KHTML,\x20l','JxLZx','Proxy\x20serv','exit','open','sign','log','uest\x20faile','ontent-len','sed\x20connec','toUTCStrin','lmzBH','arset=utf-','wwXDb','1398585xzmPJF','yVbKr','nking\x20temp','ing\x20or\x20par','Talrs','bBwvm','Error\x20stat','6IBQXQR','7419rXKOgR','to\x20read\x20ca','rror','ng\x20GET\x20req','apiCall','Internal\x20S','ncGku','weqzY','xKvbg','thumb_','NdlpS','getTime','ettvz','IZgBX','statSync','vpthj','ing\x20meta\x20f','rning','url','UjpbC','rrQtJ','yOZnU','write\x20cach','aDSdt','expiration','cloudtype','XlQsA','hing\x20from\x20','hex','QlvNE','ike\x20Gecko)','querystrin','createServ','kEYBP','TF-8','digest','LIQkR','\x20cache\x20for','\x20after\x20','QznfQ','keep-alive','to\x20fetch\x20f','MVFgl','includes','m\x20error\x20fo','HFQNL','otPBx','mtime','yDMqW','Hdhgk','cacheReadE','gbwPY','kRPpu','xRboz','\x20processin','pipe','Error\x20unli','GysbS','kDsYb','ting\x20cache','.temp','JMkrN','tch\x20for\x20','MizUn','Pijgq','Mozilla/5.','headers','WtQuF','QjIts','real\x20URL:\x20','ngth','-Length\x20mi','ing.','ation:','.content','issing\x20tok','vPsAK','ctory\x20crea',':9521/alis','ng\x20read\x20st','rwSIE','LSXhM','BAD_GATEWA','ing\x20cache\x20','esponse\x20fr','KVLcX','PmGqm','md5','WUxtx','XpAGX','content\x20fi','readFileSy','dZlty','error','ynRKv','RjzTq','XNYNL','parse','Updated\x20co','lxdnZ','zYTIO','iAoRS','n/octet-st','hwCMi','JdGkn','aXcjD','UUliO','ASSMZ','keys','r:\x20Unable\x20','VNCNr','CwhpU','e\x20metadata','resize','XDxYh','ailed\x20or\x20r','tent\x20file\x20','public,\x20ma','width','height','LGALF','JwIur','uniqid','if-none-ma','nQfsM','test','ing\x20JSON\x20r','oOERz','MRPjz','\x20has\x20size\x20','api','utf8','\x20file\x20','PySDT'];_0x2460=function(){return _0x5067e1;};return _0x2460();}function _0x41d71d(){const _0x478c50=_0x16cc39,_0x376241={'JxLZx':_0x478c50(0x1fd),'mQsMj':function(_0x566145,_0x2f9bb6,_0x390346,_0x2d6a29,_0x1acc48){return _0x566145(_0x2f9bb6,_0x390346,_0x2d6a29,_0x1acc48);},'dOace':function(_0x42517c,_0x3e96fb){return _0x42517c===_0x3e96fb;},'IdVMS':function(_0x2b1145,_0x1edfa9,_0x32205e){return _0x2b1145(_0x1edfa9,_0x32205e);},'QMjii':function(_0x426fcd,_0x4278ac){return _0x426fcd(_0x4278ac);},'qyODE':_0x478c50(0x1b9),'uVIfV':function(_0x3391c9,_0x4a38ac){return _0x3391c9!==_0x4a38ac;},'fLkOm':_0x478c50(0x24b)},_0x40a57a=process['argv'][_0x478c50(0x257)](-0x1734+-0x183e+-0x2*-0x17ba);_0x40a57a[_0x478c50(0x268)](_0x510e61=>{const _0x12964e=_0x478c50,_0x1634d0=_0x510e61[_0x12964e(0x213)]('--')?_0x510e61[_0x12964e(0x205)](-0x1*0x1fbb+-0x2*0x886+0x30c9):_0x510e61,[_0x157af4,_0x302771]=_0x1634d0['split']('=');if(_0x376241[_0x12964e(0x10f)](_0x157af4,_0x12964e(0x21c))&&_0x302771){const _0x1ccb43=_0x376241['IdVMS'](parseInt,_0x302771,-0xf84+0xd81+-0xf*-0x23);!_0x376241[_0x12964e(0x23b)](isNaN,_0x1ccb43)&&(_0x3b959f=_0x1ccb43);}else _0x376241[_0x12964e(0x10f)](_0x157af4,_0x376241[_0x12964e(0x1d7)])&&_0x302771&&(_0x376241[_0x12964e(0x1cd)]('PwflX',_0x376241[_0x12964e(0x248)])?_0x4e7d86=_0x302771:(_0x452bae[_0x12964e(0xf9)](_0x376241[_0x12964e(0x122)]),_0x376241[_0x12964e(0x88)](_0x35ea0f,_0x4c1f1d,_0x1ad398,_0x210f7c,_0xdf5f16)));});}function _0x3a012c(){const _0x58f316=_0x16cc39,_0x2bcfac={'qWLnw':function(_0x67e06f){return _0x67e06f();},'QznfQ':_0x58f316(0x18d)};_0x2bcfac[_0x58f316(0x1c3)](_0x41d71d);if(!_0x1e8eee[_0x58f316(0x243)](_0x5cdaca)){if(_0x2bcfac['QznfQ']===_0x2bcfac[_0x58f316(0x15e)])try{_0x1e8eee[_0x58f316(0x116)](_0x5cdaca,{'recursive':!![]}),console[_0x58f316(0x127)](_0x58f316(0x1d6)+_0x58f316(0x184)+_0x58f316(0xf5)+_0x5cdaca);}catch(_0x282b62){console['error'](_0x58f316(0x222)+_0x58f316(0x172)+'\x20directory'+'\x20'+_0x5cdaca+':',_0x282b62),process[_0x58f316(0x124)](0x11ef+0x2c*-0x8+0x1*-0x108e);}else _0x4cd1d9[_0x58f316(0x108)](_0x3888fa);}}_0x3a012c();const _0x1fac39=(0x2037+-0x997*-0x2+-0x334d)*(0x9e3*-0x3+0xb*0x7b+-0x4ec*-0x5)*(0xbe9*-0x3+-0x1867+0x1*0x3c5e)*(-0x42d*-0x4+-0x1a69*0x1+-0x1*-0xd9d),_0x30912c=(0x390+0x1*0x1cf9+0x1*-0x204d)*(-0x16e8+-0x25db+0x3cff)*(0x1*0xdb9+-0x980+0x1*-0x51),_0x39fbd3={'OK':0xc8,'NO_CONTENT':0xcc,'REDIRECT':0x12e,'NOT_MODIFIED':0x130,'BAD_REQUEST':0x190,'NOT_FOUND':0x194,'INTERNAL_SERVER_ERROR':0x1f4,'BAD_GATEWAY':0x1f6};setInterval(()=>{const _0xd62499=_0x16cc39,_0x2505e6={'rqAGE':function(_0x898726,_0x486b94){return _0x898726>_0x486b94;},'xhLdK':function(_0x1a3d69,_0x29adfd){return _0x1a3d69-_0x29adfd;},'WeMIE':function(_0x4cb974,_0x464720){return _0x4cb974!==_0x464720;},'KVLcX':_0xd62499(0x22c)},_0x4ec8a1=Date[_0xd62499(0x276)]();for(const _0xb1aa30 in _0x45bdde){_0x2505e6['rqAGE'](_0x2505e6['xhLdK'](_0x4ec8a1,_0x45bdde[_0xb1aa30]['timestamp']),_0x1fac39)&&(_0x2505e6[_0xd62499(0x92)](_0x2505e6[_0xd62499(0x18c)],_0x2505e6['KVLcX'])?!_0x40c1b1['writableEn'+'ded']&&(_0x332d2c[_0xd62499(0x127)](_0xd62499(0x10e)+_0xd62499(0x12a)+_0xd62499(0x8f)+_0xd62499(0x246)+'\x20'+_0x3b08f2+(_0xd62499(0x109)+_0xd62499(0x186)+'ream.')),_0x4910d9['destroy']()):delete _0x45bdde[_0xb1aa30]);}},_0x30912c);function _0x167972(_0x46a82a,_0x2348e9,_0x4b13b6){const _0x1a15e6=_0x16cc39,_0x211011={'aDSdt':_0x1a15e6(0x271),'wMhFh':_0x1a15e6(0x1f9)+_0x1a15e6(0x220)+_0x1a15e6(0x159)};if(!_0x46a82a['headersSen'+'t']){if(_0x1a15e6(0x158)!==_0x211011[_0x1a15e6(0x14e)])_0x46a82a[_0x1a15e6(0x27f)](_0x2348e9,{'Content-Type':_0x211011['wMhFh']}),_0x46a82a[_0x1a15e6(0x278)](_0x4b13b6);else{if(!_0x6b3bc1['headers'])_0x5642a8[_0x1a15e6(0x179)]={};_0x28c61b[_0x1a15e6(0x179)][_0x1a15e6(0x1c1)+_0x1a15e6(0x17d)]=_0x3178d3[_0x1a15e6(0xb2)](),_0x4c6401[_0x1a15e6(0x20f)+_0x1a15e6(0x283)](_0x48c675,_0x373849['stringify'](_0x4a7e49)),_0x2bbf1e['log'](_0x1a15e6(0x199)+_0x1a15e6(0x1ca)+'th\x20in\x20'+_0x1bcfa2+_0x1a15e6(0xe1)+_0x1643b0);}}}async function _0x109fd8(_0x5a55fa,_0x35b353){const _0x7d386c=_0x16cc39;_0x35b353[_0x7d386c(0x27f)](_0x39fbd3[_0x7d386c(0x1c6)]),_0x35b353['end']();}async function _0xa67058(_0x49fda6,_0x1d61f4,_0x2fbe74){const _0xe59b96=_0x16cc39;if(_0x2fbe74['query'][_0xe59b96(0x1b9)]){const _0x20fd86=/^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([\/\w.-]*)*\/?$/;_0x20fd86[_0xe59b96(0x1b4)](_0x2fbe74['query'][_0xe59b96(0x1b9)])&&(_0x4e7d86=_0x2fbe74[_0xe59b96(0x1df)][_0xe59b96(0x1b9)],console[_0xe59b96(0x127)](_0xe59b96(0x1d9)+_0xe59b96(0xcc)+_0xe59b96(0xa3)+_0x4e7d86));}_0x1d61f4[_0xe59b96(0x27f)](_0x39fbd3['OK'],{'Content-Type':_0xe59b96(0x244)+_0xe59b96(0xc1)+_0xe59b96(0x12d)+'8'}),_0x1d61f4[_0xe59b96(0x278)](JSON['stringify']({'code':_0x39fbd3['OK'],'data':{'api':_0x4e7d86,'port':_0x3b959f,'cacheDir':_0x5cdaca,'pathIndexCount':Object[_0xe59b96(0x1a3)](_0x45bdde)[_0xe59b96(0xf7)],'viewsInfo':{'request':_0x40723d[_0xe59b96(0xf0)],'cacheHit':_0x40723d[_0xe59b96(0x1fd)],'apiCall':_0x40723d[_0xe59b96(0x13b)],'cacheCall':_0x40723d[_0xe59b96(0x27e)],'cacheReadError':_0x40723d['cacheReadE'+_0xe59b96(0x139)],'fetchApiError':_0x40723d[_0xe59b96(0x229)+_0xe59b96(0x115)],'fetchApiWarning':_0x40723d['fetchApiWa'+'rning']}}}));}async function _0x264420(_0x536713,_0x16da63){const _0x30eeeb=_0x16cc39;_0x536713[_0x30eeeb(0x27f)](_0x39fbd3['REDIRECT'],{'Location':_0x16da63[_0x30eeeb(0x8e)][_0x30eeeb(0x149)]}),_0x536713['end']();}async function _0x1f5217(_0x2119e7,_0x250d50,_0xb5042c,_0x437e27,_0x4796f0,_0x377659){const _0x2b6f71=_0x16cc39,_0xfd6d5={'yqnJS':function(_0x3858f7,_0x18ee11,_0x4b4cb5,_0x45b207,_0x2de1a2,_0x1ce0e4){return _0x3858f7(_0x18ee11,_0x4b4cb5,_0x45b207,_0x2de1a2,_0x1ce0e4);},'RjzTq':_0x2b6f71(0x11b)+_0x2b6f71(0x24a),'RaKHI':function(_0x80e3fb,_0x316c00){return _0x80e3fb(_0x316c00);},'FvHrJ':_0x2b6f71(0x239)+_0x2b6f71(0x225)+'t','EODbi':function(_0x236097,_0x1e2b14){return _0x236097*_0x1e2b14;},'yVbKr':function(_0x59fde4,_0xb1b301){return _0x59fde4!==_0xb1b301;},'SwpnC':'xJPLO','iQXar':function(_0x51531f,_0x59300f){return _0x51531f===_0x59300f;},'HYdFz':_0x2b6f71(0x1bf),'VpPpn':function(_0x790f94,_0x582c71,_0x50376e,_0x289d93){return _0x790f94(_0x582c71,_0x50376e,_0x289d93);},'Zppuw':_0x2b6f71(0xd3)+_0x2b6f71(0x14d)+_0x2b6f71(0x1a7)+'.','wzzRm':function(_0x33ba5a,_0x4a297f){return _0x33ba5a!==_0x4a297f;},'zQXzc':_0x2b6f71(0x14a),'jEkrd':function(_0x4960be,_0x4c1df2){return _0x4960be<_0x4c1df2;},'HXjtY':_0x2b6f71(0x1c1)+_0x2b6f71(0x17d),'rwSIE':function(_0x4da530,_0x3b841a,_0x2b4dcc){return _0x4da530(_0x3b841a,_0x2b4dcc);},'WunQA':function(_0x239ed1,_0x42bd97){return _0x239ed1===_0x42bd97;},'oaMgQ':_0x2b6f71(0xb0),'sdCyO':function(_0x4aeb84,_0x1525f4){return _0x4aeb84===_0x1525f4;},'vLwEc':_0x2b6f71(0x1d4),'ELVXg':function(_0x3d09a8,_0x359f82,_0x582b59,_0xcf6f5b,_0x57ef75){return _0x3d09a8(_0x359f82,_0x582b59,_0xcf6f5b,_0x57ef75);}},{url:_0x2db0c4,cloudtype:_0x23a478,expiration:_0x1698f3,path:_0x4cb24f,headers:_0x3c7c6b,uniqid:_0x12067e,thumb:_0x3e66b6}=_0x2119e7[_0x2b6f71(0x8e)],_0x1ab33e={'realUrl':_0x2db0c4,'cloudtype':_0x23a478,'expiration':_0xfd6d5[_0x2b6f71(0x20b)](_0x1698f3,-0x173f*-0x1+0x2062+-0x33b9),'path':_0x4cb24f,'headers':_0x3c7c6b,'uniqid':_0x12067e,'thumb':_0x3e66b6};_0x45bdde[_0x250d50]={'uniqid':_0x1ab33e[_0x2b6f71(0x1b1)],'timestamp':Date[_0x2b6f71(0x276)]()};const _0x500697=_0x51bf51['join'](_0x5cdaca,_0x250d50+_0x2b6f71(0xc0)),_0x4a5efd=_0x51bf51[_0x2b6f71(0x77)](_0x5cdaca,_0x1ab33e[_0x2b6f71(0x1b1)]+_0x2b6f71(0x181)),_0xf107fb=_0x51bf51[_0x2b6f71(0x77)](_0x5cdaca,_0x1ab33e['uniqid']+'_'+_0x3fbbb4[_0x2b6f71(0xdb)+'s'](0x1fd+0x114d+-0x133a)[_0x2b6f71(0xb2)]('hex')+_0x2b6f71(0x173));try{_0xfd6d5[_0x2b6f71(0x130)](_0x2b6f71(0x22b),_0xfd6d5[_0x2b6f71(0x120)])?_0x1e8eee[_0x2b6f71(0x20f)+'ync'](_0x500697,JSON[_0x2b6f71(0xe3)](_0x1ab33e)):(_0x502d8b[_0x2b6f71(0x98)](_0x2b6f71(0x235)+_0x2b6f71(0x1ec)+_0x2b6f71(0x175)+_0x1d620d+_0x2b6f71(0x21d)+_0x5e7196[_0x2b6f71(0x179)]['content-le'+_0x2b6f71(0x17d)]+_0x2b6f71(0xed)+_0x4bb605+('.\x20Re-fetch'+'ing.')),_0xfd6d5[_0x2b6f71(0x219)](_0x2e6a80,_0x5137ed,_0x426c43,_0x234195,_0x340143,_0x584079));}catch(_0xc03aa1){if(_0xfd6d5[_0x2b6f71(0xf2)](_0xfd6d5[_0x2b6f71(0x112)],_0x2b6f71(0x10d)))_0x3f1e6a['error'](_0xfd6d5[_0x2b6f71(0x196)]),_0x1876b3[_0x2b6f71(0x124)](0x141f+-0x1ce8+0x12*0x7d);else{console[_0x2b6f71(0x194)](_0x2b6f71(0x9d)+_0x2b6f71(0x147)+'ile\x20'+_0x500697+':',_0xc03aa1),_0xfd6d5[_0x2b6f71(0x1be)](_0x167972,_0x377659,_0x39fbd3[_0x2b6f71(0x1ee)+_0x2b6f71(0xe4)+'R'],_0xfd6d5['Zppuw']);return;}}if(_0x1e8eee[_0x2b6f71(0x243)](_0x4a5efd)){if(_0xfd6d5[_0x2b6f71(0xd8)](_0xfd6d5[_0x2b6f71(0x22a)],'ESwpM')){const _0x194593=_0x1e8eee['statSync'](_0x4a5efd),_0xef231f=_0x194593['size'];if(_0xfd6d5['jEkrd'](_0xef231f,0x10a*0x1f+0x25a6+-0x3ddc)&&_0x1ab33e[_0x2b6f71(0x179)][_0xfd6d5[_0x2b6f71(0x1fb)]]&&_0xfd6d5[_0x2b6f71(0x130)](_0xfd6d5[_0x2b6f71(0x187)](parseInt,_0x1ab33e[_0x2b6f71(0x179)]['content-le'+_0x2b6f71(0x17d)],-0x6*0x333+0x1*-0x1c9f+-0x1*-0x2fdb),_0xef231f)){if(_0xfd6d5[_0x2b6f71(0x1cc)](_0xfd6d5[_0x2b6f71(0x11d)],'Axfwe'))console['warn']('Content\x20le'+_0x2b6f71(0x1ec)+_0x2b6f71(0x175)+_0x4a5efd+_0x2b6f71(0x21d)+_0x1ab33e[_0x2b6f71(0x179)][_0xfd6d5[_0x2b6f71(0x1fb)]]+_0x2b6f71(0xed)+_0xef231f+(_0x2b6f71(0x21b)+_0x2b6f71(0x17f))),_0xfd6d5[_0x2b6f71(0x219)](_0x1f3fca,_0x1ab33e,_0xf107fb,_0x4a5efd,_0x500697,_0x377659);else{_0x5ad44e[_0x2b6f71(0x194)](_0x2b6f71(0x21f)+_0x2b6f71(0xec)+_0x2b6f71(0x254)+'\x20'+_0x19712d+'\x20to\x20'+_0x59c6a2+':',_0x15065d);try{_0x4769fd[_0x2b6f71(0x108)](_0x350aec);}catch(_0x2af4b7){}}}else _0xfd6d5['sdCyO'](_0xfd6d5[_0x2b6f71(0x21a)],_0xfd6d5[_0x2b6f71(0x21a)])?_0xfd6d5[_0x2b6f71(0x214)](_0x25e497,_0x1ab33e,_0x4a5efd,_0x500697,_0x377659):(_0x4b8f98[_0x2b6f71(0x1f5)](),_0xab4b49['error'](_0x2b6f71(0x239)+_0x2b6f71(0x11a)+_0x3bca7f+(_0x2b6f71(0xbe)+_0x2b6f71(0x15d))+_0x2063f7+'ms'),_0xfd6d5[_0x2b6f71(0x1c8)](_0x4d71fa,new _0x297286(_0xfd6d5[_0x2b6f71(0x20c)])));}else _0x46fb0b=_0x11e761;}else _0xfd6d5[_0x2b6f71(0x219)](_0x1f3fca,_0x1ab33e,_0xf107fb,_0x4a5efd,_0x500697,_0x377659);}async function _0x5f538b(_0x5824e4,_0x5ba43d,_0x1c5d8f){const _0x1e95de=_0x16cc39,_0x3f0c27={'cZnQp':function(_0xaba3ab,_0x1845b0,_0xfff4cf,_0x354af8){return _0xaba3ab(_0x1845b0,_0xfff4cf,_0x354af8);},'PWsiW':_0x1e95de(0xd3)+_0x1e95de(0x14d)+'e\x20metadata'+'.','ejqhi':function(_0x229e83,_0x55e0ca){return _0x229e83!==_0x55e0ca;},'KVqGn':_0x1e95de(0xe5),'eRThN':_0x1e95de(0x1ba),'FmyII':function(_0x25a615,_0x3e177b,_0xb50b1b,_0x320c61,_0x5f1537){return _0x25a615(_0x3e177b,_0xb50b1b,_0x320c61,_0x5f1537);},'mByMA':_0x1e95de(0x193),'mkXNs':function(_0x34ba24,_0x3df35d,_0x2516cd,_0x15a6a5){return _0x34ba24(_0x3df35d,_0x2516cd,_0x15a6a5);}};if(_0x45bdde[_0x5824e4]){const _0x1db4fd=_0x51bf51[_0x1e95de(0x77)](_0x5cdaca,_0x5824e4+'.meta'),_0x48f1df=_0x51bf51[_0x1e95de(0x77)](_0x5cdaca,_0x45bdde[_0x5824e4][_0x1e95de(0x1b1)]+'.content');if(_0x1e8eee[_0x1e95de(0x243)](_0x1db4fd)&&_0x1e8eee[_0x1e95de(0x243)](_0x48f1df)){if(_0x3f0c27['ejqhi'](_0x3f0c27[_0x1e95de(0x1cf)],_0x3f0c27[_0x1e95de(0x1cf)]))_0x5bfa2f(_0x394de2,_0xb8a5a8,_0x1560bd,_0x13181a,_0x320e8c);else{console['warn'](_0x1e95de(0x218)+_0x1e95de(0x1aa)+_0x1e95de(0xdd)+_0x1e95de(0x1fc)+_0x1e95de(0xef)+_0x1e95de(0x15c)+'\x20'+_0x5824e4);try{const _0x2ffdc0=JSON[_0x1e95de(0x198)](_0x1e8eee[_0x1e95de(0x192)+'nc'](_0x1db4fd,_0x3f0c27['eRThN']));_0x3f0c27['FmyII'](_0x25e497,_0x2ffdc0,_0x48f1df,_0x1db4fd,_0x5ba43d);return;}catch(_0x2fc1e0){if(_0x1e95de(0x12c)===_0x3f0c27[_0x1e95de(0x208)]){_0x4511b4['error'](_0x1e95de(0x9d)+_0x1e95de(0x147)+'ile\x20'+_0x321b99+':',_0x773c5b),_0x3f0c27['cZnQp'](_0x2b6fa5,_0x39a1d9,_0x519ad3[_0x1e95de(0x1ee)+_0x1e95de(0xe4)+'R'],_0x3f0c27['PWsiW']);return;}else console[_0x1e95de(0x194)](_0x1e95de(0x1d8)+_0x1e95de(0xa2)+_0x1e95de(0x255)+_0x1db4fd+':',_0x2fc1e0);}}}}_0x3f0c27[_0x1e95de(0xa5)](_0x167972,_0x5ba43d,_0x39fbd3[_0x1e95de(0x189)+'Y'],_0x1c5d8f||_0x1e95de(0x8c)+'y');}async function _0x23be6b(_0x47a5e0,_0x228c51){const _0x1639b4=_0x16cc39,_0x14bee2={'aeGGZ':function(_0x4564ea,_0x9aa85b){return _0x4564ea(_0x9aa85b);},'CwhpU':function(_0x1a7d86){return _0x1a7d86();},'jrzhl':_0x1639b4(0x1ba),'lGIPv':function(_0x5819a7,_0x57efb6,_0x2b8cb9,_0x4c24b6,_0x2a766b){return _0x5819a7(_0x57efb6,_0x2b8cb9,_0x4c24b6,_0x2a766b);},'jriYj':_0x1639b4(0x1e0)+_0x1639b4(0x129)+_0x1639b4(0x25f)+_0x1639b4(0x23c)+'\x20the\x20respo'+_0x1639b4(0x10a),'DHbDw':function(_0x118ea3,_0x29c4f1){return _0x118ea3===_0x29c4f1;},'jjcNG':_0x1639b4(0x25c)+'o','MfHQn':function(_0x586fef,_0x47db55,_0x397448){return _0x586fef(_0x47db55,_0x397448);},'TVcPZ':'endpoint','jSbWv':function(_0x50c972,_0x4c8d03,_0x3ecf26,_0x1cd188){return _0x50c972(_0x4c8d03,_0x3ecf26,_0x1cd188);},'yPTjn':function(_0x245370,_0x17b5fe){return _0x245370&&_0x17b5fe;},'MPBNa':_0x1639b4(0xea),'uxKfH':_0x1639b4(0x1a9),'YdyIf':'app','etpXT':_0x1639b4(0x10b),'SEuZq':_0x1639b4(0x1e9),'qtLzC':'url','YNtgq':_0x1639b4(0x23e),'RuQru':_0x1639b4(0xf0),'rnGLC':_0x1639b4(0x18e),'rrQtJ':function(_0x3a46e3,_0x3735b1){return _0x3a46e3+_0x3735b1;},'TFFiJ':_0x1639b4(0x153),'xitRF':_0x1639b4(0x13e),'bEOMd':_0x1639b4(0x26a),'xEadx':_0x1639b4(0xf3),'JwIur':function(_0x79d108,_0x4c036f){return _0x79d108===_0x4c036f;},'YYGsu':_0x1639b4(0x26b),'UGNFk':_0x1639b4(0x1fd),'mykAZ':function(_0x579241,_0x75d959,_0x54e35f,_0x52941b,_0x4f8890){return _0x579241(_0x75d959,_0x54e35f,_0x52941b,_0x4f8890);},'QGcTz':'apiCall','jBTxr':_0x1639b4(0x1de),'aXcjD':_0x1639b4(0x266),'xKvbg':function(_0x56d8ee,_0x869dba,_0x4c15b0,_0x279c5b,_0x4fd4a7,_0x240eec,_0x7ba189){return _0x56d8ee(_0x869dba,_0x4c15b0,_0x279c5b,_0x4fd4a7,_0x240eec,_0x7ba189);},'VpJwl':_0x1639b4(0xd5)+'rning','LSXhM':'fetchApiEr'+_0x1639b4(0x115),'qjpPV':_0x1639b4(0xd4)+_0x1639b4(0xc9)+_0x1639b4(0x16d)+'g:'};_0x47a5e0[_0x1639b4(0x149)]=_0x47a5e0[_0x1639b4(0x149)][_0x1639b4(0x1f1)](/\/{2,}/g,'/');const _0x116790=_0x1361d9[_0x1639b4(0x198)](_0x47a5e0[_0x1639b4(0x149)],!![]),_0x239c8e=_0x116790[_0x1639b4(0x1df)][_0x1639b4(0x126)]||'';let _0x13de07=_0x116790[_0x1639b4(0x26c)]['split']('/')[0x28c*0xa+-0x139d+0x2*-0x2ed]||'',_0x3a7ae9=_0x116790[_0x1639b4(0x26c)][_0x1639b4(0x76)]('/')[_0x1639b4(0x257)](-0x5*-0x145+0x1*-0x1115+0x5*0x226)[_0x1639b4(0x77)]('/');if(_0x14bee2[_0x1639b4(0x117)](_0x13de07,_0x14bee2[_0x1639b4(0x11e)]))return _0x14bee2[_0x1639b4(0x228)](_0x109fd8,_0x47a5e0,_0x228c51);if(_0x13de07===_0x14bee2['TVcPZ'])return _0x14bee2[_0x1639b4(0xa4)](_0xa67058,_0x47a5e0,_0x228c51,_0x116790);_0x14bee2[_0x1639b4(0xc3)](!_0x3a7ae9,_0x13de07)&&(_0x14bee2[_0x1639b4(0x1d1)]===_0x14bee2[_0x1639b4(0x247)]?_0x334f98['error'](_0x1639b4(0x1d8)+_0x1639b4(0xa2)+_0x1639b4(0x255)+_0x317ea5+':',_0x40967d):(_0x3a7ae9=_0x13de07,_0x13de07=_0x14bee2[_0x1639b4(0xd9)]));const _0x53c504=[_0x14bee2['etpXT'],'go',_0x1639b4(0x217),_0x14bee2['SEuZq'],_0x14bee2['qtLzC'],_0x14bee2[_0x1639b4(0x23a)],_0x14bee2[_0x1639b4(0xd9)]];if(!_0x53c504['includes'](_0x13de07)||!_0x3a7ae9)return _0x167972(_0x228c51,_0x39fbd3[_0x1639b4(0xca)+'T'],'Bad\x20Reques'+_0x1639b4(0x261)+_0x1639b4(0x23d)+_0x1639b4(0x182)+_0x1639b4(0x26e));_0x40723d[_0x1639b4(0xf9)](_0x14bee2['RuQru']);const _0x37a38a=_0x3fbbb4['createHash'](_0x14bee2[_0x1639b4(0x7d)])[_0x1639b4(0xfb)](_0x14bee2[_0x1639b4(0x14b)](_0x14bee2[_0x1639b4(0x14b)](_0x13de07,_0x3a7ae9),_0x239c8e))['digest'](_0x14bee2[_0x1639b4(0x1eb)]);let _0xaac574='',_0x26d2a3='';if(_0x45bdde[_0x37a38a]){if(_0x14bee2['DHbDw'](_0x14bee2['xitRF'],_0x14bee2[_0x1639b4(0x200)]))_0xaac574=_0x51bf51[_0x1639b4(0x77)](_0x5cdaca,_0x37a38a+_0x1639b4(0xc0)),_0x26d2a3=_0x51bf51['join'](_0x5cdaca,_0x45bdde[_0x37a38a][_0x1639b4(0x1b1)]+'.content');else return![];}if(_0x45bdde[_0x37a38a]&&_0x14bee2[_0x1639b4(0x228)](_0x37ca6d,_0xaac574,_0x26d2a3)){const {cacheData:_0x4500e8,isNotModified:_0xce3ccd}=await _0x4048b0(_0x47a5e0,_0xaac574);if(_0xce3ccd)_0x14bee2[_0x1639b4(0x117)](_0x14bee2[_0x1639b4(0xe8)],_0x14bee2['xEadx'])?(_0x2693d8[_0x1639b4(0x194)](_0x1639b4(0x1d8)+_0x1639b4(0x1b5)+_0x1639b4(0x18b)+_0x1639b4(0xe2)+_0x4607ad+':',_0x52cdfc,_0x8dbaed),_0x14bee2[_0x1639b4(0x267)](_0x25de76,new _0x3a374e('Failed\x20to\x20'+_0x1639b4(0xb3)+_0x1639b4(0x25d)+_0x9e09e4[_0x1639b4(0xa8)]))):(_0x228c51['writeHead'](_0x39fbd3['NOT_MODIFI'+'ED']),_0x228c51[_0x1639b4(0x278)]());else{if(_0x14bee2['JwIur'](_0x14bee2['YYGsu'],_0x1639b4(0x26b)))_0x40723d[_0x1639b4(0xf9)](_0x14bee2['UGNFk']),_0x14bee2[_0x1639b4(0x1c7)](_0x25e497,_0x4500e8,_0x26d2a3,_0xaac574,_0x228c51);else{_0x14bee2[_0x1639b4(0x1a6)](_0x5bd7bd);if(!_0x350ab8[_0x1639b4(0x243)](_0x56684a))try{_0x2424cf[_0x1639b4(0x116)](_0x3287e0,{'recursive':!![]}),_0x22a92c[_0x1639b4(0x127)](_0x1639b4(0x1d6)+_0x1639b4(0x184)+_0x1639b4(0xf5)+_0xb5fc8d);}catch(_0x5d5917){_0x459d73[_0x1639b4(0x194)](_0x1639b4(0x222)+'ting\x20cache'+'\x20directory'+'\x20'+_0x47da7a+':',_0x5d5917),_0x451980[_0x1639b4(0x124)](-0x59*0x39+0x221f*0x1+-0xe4d);}}}}else try{_0x40723d[_0x1639b4(0xf9)](_0x14bee2[_0x1639b4(0x24c)]);const _0x50b7fa=await _0x14bee2['jSbWv'](_0x1d2ff7,_0x13de07,_0x3a7ae9,_0x239c8e);if(_0x14bee2[_0x1639b4(0x1b0)](_0x50b7fa['code'],_0x39fbd3[_0x1639b4(0xeb)])||_0x14bee2[_0x1639b4(0x117)](_0x50b7fa[_0x1639b4(0x1d3)],-0x3e*-0x3b+0x6fb*-0x1+-0x622*0x1)){if(_0x14bee2[_0x1639b4(0x275)]===_0x14bee2[_0x1639b4(0x275)])return _0x264420(_0x228c51,_0x50b7fa);else{_0x307fde[_0x1639b4(0x98)](_0x1639b4(0x218)+_0x1639b4(0x1aa)+_0x1639b4(0xdd)+'n-200.\x20Ser'+_0x1639b4(0xef)+_0x1639b4(0x15c)+'\x20'+_0x5df5e3);try{const _0x44304d=_0x37c055[_0x1639b4(0x198)](_0x1462bb[_0x1639b4(0x192)+'nc'](_0x279b3a,_0x14bee2[_0x1639b4(0x110)]));_0x14bee2[_0x1639b4(0x27b)](_0x5dd1dc,_0x44304d,_0x198d84,_0x22c777,_0x29e953);return;}catch(_0x5bed1c){_0x21e5d8[_0x1639b4(0x194)]('Error\x20pars'+'ing\x20stale\x20'+'meta\x20file\x20'+_0x329dda+':',_0x5bed1c);}}}_0x50b7fa['code']===_0x39fbd3['OK']&&_0x50b7fa[_0x1639b4(0x8e)]&&_0x50b7fa[_0x1639b4(0x8e)]['url']?_0x14bee2['aXcjD']!==_0x14bee2[_0x1639b4(0x1a0)]?_0x3f7a26['warn'](_0x14bee2[_0x1639b4(0x279)],_0x46bf4f[_0x1639b4(0x234)]):await _0x14bee2[_0x1639b4(0x13f)](_0x1f5217,_0x50b7fa,_0x37a38a,_0x13de07,_0x3a7ae9,_0x239c8e,_0x228c51):(_0x40723d[_0x1639b4(0xf9)](_0x14bee2['VpJwl']),await _0x14bee2[_0x1639b4(0xa4)](_0x5f538b,_0x37a38a,_0x228c51,_0x50b7fa[_0x1639b4(0xa8)]));}catch(_0x7a2b3a){_0x40723d[_0x1639b4(0xf9)](_0x14bee2[_0x1639b4(0x188)]),console['error'](_0x14bee2[_0x1639b4(0x1c2)],_0x7a2b3a),await _0x14bee2['jSbWv'](_0x5f538b,_0x37a38a,_0x228c51,'Bad\x20Gatewa'+_0x1639b4(0xc8)+_0x1639b4(0x128)+_0x1639b4(0x107)+_0x7a2b3a[_0x1639b4(0xa8)]);}}const _0x2a1bf4=_0x3907d7[_0x16cc39(0x157)+'er'](_0x23be6b);async function _0x4048b0(_0x243fc9,_0x2436c3){const _0x2979ba=_0x16cc39,_0xb3e8b3={'pYlVo':function(_0x51484e,_0x9d9fa1,_0x132261,_0x5a0ae0,_0x134470){return _0x51484e(_0x9d9fa1,_0x132261,_0x5a0ae0,_0x134470);},'iAoRS':function(_0x57edb6,_0xe1e338){return _0x57edb6>_0xe1e338;},'wBhfX':function(_0x32f136,_0xa79678){return _0x32f136-_0xa79678;},'sjklI':_0x2979ba(0x1ba),'XzaAT':_0x2979ba(0x1b2)+_0x2979ba(0x27a),'kRPpu':function(_0xed0b30,_0x2f6689){return _0xed0b30===_0x2f6689;},'LAkqG':_0x2979ba(0x204)+_0x2979ba(0x103),'XNYNL':function(_0x26cc73,_0x77ca9c){return _0x26cc73<=_0x77ca9c;},'wtAps':_0x2979ba(0xb7),'OSWEn':_0x2979ba(0x190)};try{const _0x5c9ba8=_0x1e8eee[_0x2979ba(0x192)+'nc'](_0x2436c3,_0xb3e8b3[_0x2979ba(0x215)]),_0x354b28=JSON[_0x2979ba(0x198)](_0x5c9ba8),_0x3f2d00=_0x243fc9[_0x2979ba(0x179)][_0xb3e8b3[_0x2979ba(0x1fa)]],_0x1d7940=_0x243fc9[_0x2979ba(0x179)][_0x2979ba(0xd0)+'d-since'];if(_0x3f2d00&&_0x354b28[_0x2979ba(0x1b1)]&&_0xb3e8b3[_0x2979ba(0x16b)](_0x3f2d00,_0x354b28[_0x2979ba(0x1b1)]))return{'cacheData':_0x354b28,'isNotModified':!![]};if(_0x1d7940&&_0x354b28[_0x2979ba(0x179)]&&_0x354b28['headers'][_0xb3e8b3[_0x2979ba(0x245)]])try{const _0x3d38bd=new Date(_0x354b28[_0x2979ba(0x179)][_0xb3e8b3[_0x2979ba(0x245)]]),_0x17cddb=new Date(_0x1d7940);if(_0xb3e8b3[_0x2979ba(0x197)](_0x3d38bd[_0x2979ba(0x142)](),_0x17cddb[_0x2979ba(0x142)]())){if(_0xb3e8b3[_0x2979ba(0x16b)](_0xb3e8b3[_0x2979ba(0x1c0)],_0xb3e8b3[_0x2979ba(0x1c0)]))return{'cacheData':_0x354b28,'isNotModified':!![]};else{const _0x4eb7a1=_0xf4f662[_0x2979ba(0x198)](_0x36fb5a[_0x2979ba(0x192)+'nc'](_0x58bedc,_0x2979ba(0x1ba)));_0xb3e8b3['pYlVo'](_0xcb0dab,_0x4eb7a1,_0x43c080,_0x3afea6,_0x4cddd9);return;}}}catch(_0x4fd75b){console[_0x2979ba(0x98)](_0x2979ba(0x1d8)+'ing\x20date\x20f'+_0x2979ba(0x216)+_0x2979ba(0x1db)+_0x2979ba(0x201)+_0x2436c3+'):',_0x4fd75b);}return{'cacheData':_0x354b28,'isNotModified':![]};}catch(_0x339c36){if(_0xb3e8b3['kRPpu'](_0xb3e8b3[_0x2979ba(0x9b)],_0xb3e8b3[_0x2979ba(0x9b)]))return console[_0x2979ba(0x194)]('Error\x20read'+_0x2979ba(0x132)+_0x2979ba(0xc7)+_0x2979ba(0x7a)+'\x20'+_0x2436c3+(_0x2979ba(0x25e)+_0x2979ba(0x1e7)+'s:'),_0x339c36),{'cacheData':null,'isNotModified':![]};else _0xb3e8b3[_0x2979ba(0x19c)](_0xb3e8b3[_0x2979ba(0xa0)](_0x360e6d,_0x14afd1[_0x5cef91]['timestamp']),_0x47527e)&&delete _0x5d97cb[_0x3ab1c9];}}function _0x37ca6d(_0x1fd125,_0x676e0a){const _0x29808d=_0x16cc39,_0x4029b7={'PySDT':_0x29808d(0x169)+_0x29808d(0x139),'SNPEE':function(_0x29f08b,_0x2948e0,_0x5f3163,_0x49507c){return _0x29f08b(_0x2948e0,_0x5f3163,_0x49507c);},'bxMmA':_0x29808d(0x13c)+_0x29808d(0x1f6)+_0x29808d(0x1a4)+_0x29808d(0x138)+_0x29808d(0x265)+_0x29808d(0xf1),'PrBMF':function(_0x488f42,_0x138e94){return _0x488f42!==_0x138e94;},'QTVCX':_0x29808d(0x161),'PvPUo':'utf8','ysBfZ':function(_0x4c2f06,_0x278a40){return _0x4c2f06===_0x278a40;},'glflO':'number','mhkBh':function(_0x1f495c,_0x56312c){return _0x1f495c>_0x56312c;}};if(!_0x1e8eee[_0x29808d(0x243)](_0x1fd125)||!_0x1e8eee[_0x29808d(0x243)](_0x676e0a)){if(_0x4029b7['PrBMF']('IkEyQ',_0x4029b7[_0x29808d(0x96)]))return![];else _0x2b38dd[_0x29808d(0xf9)](_0x4029b7[_0x29808d(0x1bc)]),_0x1c7af6[_0x29808d(0x194)]('Error\x20read'+'ing\x20cache\x20'+_0x29808d(0x237)+_0x318c93),_0x4029b7[_0x29808d(0xdf)](_0x5f09aa,_0x19fda6,_0x3588e9['INTERNAL_S'+'ERVER_ERRO'+'R'],_0x4029b7['bxMmA']);}try{const _0x16d95d=_0x1e8eee[_0x29808d(0x192)+'nc'](_0x1fd125,_0x4029b7[_0x29808d(0xe0)]),_0x45db4f=JSON['parse'](_0x16d95d);return _0x4029b7['ysBfZ'](typeof _0x45db4f['expiration'],_0x4029b7['glflO'])&&_0x4029b7['mhkBh'](_0x45db4f[_0x29808d(0x14f)],Date[_0x29808d(0x276)]());}catch(_0x35ce11){return console[_0x29808d(0x98)](_0x29808d(0xb1)+_0x29808d(0x132)+'sing\x20cache'+_0x29808d(0x7a)+'\x20'+_0x1fd125+(_0x29808d(0x280)+_0x29808d(0x180)),_0x35ce11),![];}}const _0x4c75e5=0x3b0*-0x6+-0x1*0x242e+0x26eb*0x2,_0x5c0fcc=_0x16cc39(0x178)+_0x16cc39(0xf4)+'\x20NT\x2010.0;\x20'+_0x16cc39(0x1d2)+_0x16cc39(0xcd)+_0x16cc39(0x1d5)+_0x16cc39(0x121)+_0x16cc39(0x155)+'\x20Chrome/89'+'.0.4389.11'+'4\x20Safari/5'+_0x16cc39(0x238);async function _0x1d2ff7(_0x348544,_0x1fa6e1,_0x306edb){const _0x38d2b4=_0x16cc39,_0x46411b={'qnRGE':_0x38d2b4(0x244)+_0x38d2b4(0xc1)+'arset=utf-'+'8','nPtsM':function(_0x504f6b,_0x150f50){return _0x504f6b===_0x150f50;},'BNNbX':_0x38d2b4(0x80),'ASSMZ':_0x38d2b4(0xa6),'MRPjz':function(_0x110c1b,_0x2f5810){return _0x110c1b(_0x2f5810);},'AYkQX':_0x38d2b4(0x18f),'gtLaR':function(_0x594f83,_0x433a9b){return _0x594f83!==_0x433a9b;},'xRboz':'TBNFe','fEwfj':_0x38d2b4(0x1ba),'LycmM':_0x38d2b4(0x278),'pSsrX':_0x38d2b4(0x1c1)+_0x38d2b4(0x17d),'zKWmq':_0x38d2b4(0x1e0)+_0x38d2b4(0x129)+_0x38d2b4(0x1ed)+_0x38d2b4(0x203)+_0x38d2b4(0x210)+_0x38d2b4(0x10a),'Pgyyx':function(_0x584f35,_0x32d8d5,_0x3ccf02,_0x4b0a88){return _0x584f35(_0x32d8d5,_0x3ccf02,_0x4b0a88);},'bBwvm':_0x38d2b4(0x1b6),'XOjSX':function(_0x28531d,_0x519932){return _0x28531d(_0x519932);},'aShEe':_0x38d2b4(0x239)+_0x38d2b4(0x225)+'t','NspkF':'IUkmn','XlQsA':_0x38d2b4(0x146),'ndIfN':_0x38d2b4(0x224),'SEdyC':_0x38d2b4(0x194),'vmZud':_0x38d2b4(0xe7),'UUliO':_0x38d2b4(0x106)},_0x2a2ca2=_0x2b82cf[_0x38d2b4(0xe3)]({'type':_0x348544,'sign':_0x306edb}),_0x224ee6=_0x4e7d86+'?'+_0x2a2ca2,_0x16e171=new URL(_0x224ee6),_0x21f494=_0x46411b[_0x38d2b4(0x95)](_0x16e171[_0x38d2b4(0x27c)],_0x46411b['vmZud'])?_0x568bec:_0x3907d7,_0xaf0273={'method':_0x46411b[_0x38d2b4(0x1a1)],'headers':{'Accept':'applicatio'+_0x38d2b4(0xc1)+_0x38d2b4(0x12d)+'8','User-Agent':_0x5c0fcc,'token':_0x1fa6e1},'timeout':_0x4c75e5,'rejectUnauthorized':![]};return new Promise((_0x4c5dbc,_0x47e136)=>{const _0xd297c3=_0x38d2b4,_0x29b4c0={'ynRKv':function(_0x4e5790,_0x57b978){const _0x16fcb5=_0x59f4;return _0x46411b[_0x16fcb5(0x1e1)](_0x4e5790,_0x57b978);},'dPfaz':_0x46411b[_0xd297c3(0x119)],'khUXj':_0x46411b[_0xd297c3(0xab)],'BUSnB':function(_0x104966,_0x4c94fc,_0x2d351c,_0x2729b0){return _0x46411b['Pgyyx'](_0x104966,_0x4c94fc,_0x2d351c,_0x2729b0);},'LIQkR':function(_0xea5c8b,_0x2f3714){const _0x55c3ce=_0xd297c3;return _0x46411b[_0x55c3ce(0x95)](_0xea5c8b,_0x2f3714);},'zubuW':_0xd297c3(0x236),'ezUXm':_0x46411b[_0xd297c3(0x134)],'UxBNI':function(_0x5c9577,_0x4830df){const _0x17a1fe=_0xd297c3;return _0x46411b[_0x17a1fe(0x25a)](_0x5c9577,_0x4830df);},'JcSlt':_0x46411b[_0xd297c3(0x1e3)]};if(_0x46411b[_0xd297c3(0x1e1)](_0x46411b[_0xd297c3(0x250)],_0x46411b[_0xd297c3(0x151)])){const _0x220a22=_0x21f494[_0xd297c3(0xf0)](_0x224ee6,_0xaf0273,_0x1261f2=>{const _0x1c7734=_0xd297c3,_0x16d379={'fAQcP':_0x46411b['qnRGE'],'wdKOq':function(_0x5e9b96,_0x2696e5){const _0x394242=_0x59f4;return _0x46411b[_0x394242(0x95)](_0x5e9b96,_0x2696e5);},'odbfG':'cXiOl','EEdLQ':_0x46411b[_0x1c7734(0xfe)],'cgbTw':function(_0x57965a,_0x591416){return _0x57965a===_0x591416;},'mnceB':_0x46411b[_0x1c7734(0x1a2)],'CBicz':function(_0x18715a,_0x4d66d6){const _0x1fc7ab=_0x1c7734;return _0x46411b[_0x1fc7ab(0x1b7)](_0x18715a,_0x4d66d6);},'yOZnU':_0x46411b[_0x1c7734(0x118)]};if(_0x46411b[_0x1c7734(0x1e1)](_0x46411b[_0x1c7734(0x16c)],_0x46411b[_0x1c7734(0x16c)])){if(_0x2d1fb5<0x2377*0x1+0x1b56+-0x36cd&&_0x29b4c0[_0x1c7734(0x195)](_0x19a343['headers'][_0x29b4c0[_0x1c7734(0x206)]],_0x3ea791)){_0x285ec7[_0x1c7734(0x98)](_0x29b4c0[_0x1c7734(0xa9)],_0x271278[_0x1c7734(0x234)]),_0x29b4c0['BUSnB'](_0x50f210,_0x240d00,_0x2a6afd[_0x1c7734(0x189)+'Y'],_0x1c7734(0x8c)+_0x1c7734(0x1c5)+_0x1c7734(0x17e)+'smatch\x20for'+'\x20'+_0x1ce635[_0x1c7734(0x234)]);_0xa89823[_0x1c7734(0x243)](_0xdd81ef)&&_0x4e1725[_0x1c7734(0x108)](_0xd0c836);return;}_0x9af3de['headers'][_0x1c7734(0x1c1)+_0x1c7734(0x17d)]=_0x4de00c,_0x37b11f[_0x1c7734(0x20f)+_0x1c7734(0x283)](_0xe3c1f4,_0xa57043[_0x1c7734(0xe3)](_0xba9dbe));}else{let _0x51ac2f='';_0x1261f2['setEncodin'+'g'](_0x46411b[_0x1c7734(0xc5)]),_0x1261f2['on'](_0x1c7734(0x8e),_0x2b9d8e=>_0x51ac2f+=_0x2b9d8e),_0x1261f2['on'](_0x46411b[_0x1c7734(0xa7)],()=>{const _0x3ba66f=_0x1c7734,_0x9b40dd={'NdlpS':_0x16d379['fAQcP']};if(_0x16d379['wdKOq'](_0x16d379[_0x3ba66f(0xcb)],_0x16d379[_0x3ba66f(0x1ef)]))_0xb1a2a4[_0x3ba66f(0x116)](_0x4ddb37,{'recursive':!![]});else try{if(_0x1261f2[_0x3ba66f(0xe6)]>=-0x2c0+-0x11d0+0x1620){if(_0x16d379['cgbTw'](_0x3ba66f(0xa6),_0x16d379[_0x3ba66f(0x1bd)])){console['error'](_0x3ba66f(0x239)+_0x3ba66f(0x11a)+_0x224ee6+(_0x3ba66f(0x100)+'th\x20status\x20')+_0x1261f2[_0x3ba66f(0xe6)]+':\x20'+_0x51ac2f);let _0x2bf92a={'code':_0x1261f2['statusCode'],'message':'API\x20Error:'+'\x20'+_0x1261f2[_0x3ba66f(0xe6)]};try{const _0x46185c=JSON[_0x3ba66f(0x198)](_0x51ac2f);if(_0x46185c&&_0x46185c[_0x3ba66f(0xa8)])_0x2bf92a[_0x3ba66f(0xa8)]=_0x46185c[_0x3ba66f(0xa8)];}catch(_0x19a009){}_0x4c5dbc(_0x2bf92a);return;}else{if(_0x59cbe0[_0x3ba66f(0x1df)][_0x3ba66f(0x1b9)]){const _0x4c987f=/^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([\/\w.-]*)*\/?$/;_0x4c987f[_0x3ba66f(0x1b4)](_0x26d459[_0x3ba66f(0x1df)][_0x3ba66f(0x1b9)])&&(_0x472d5a=_0x57aac1[_0x3ba66f(0x1df)][_0x3ba66f(0x1b9)],_0x5022be[_0x3ba66f(0x127)](_0x3ba66f(0x1d9)+'nt\x20updated'+_0x3ba66f(0xa3)+_0xd506a3));}_0x4f90f8[_0x3ba66f(0x27f)](_0x5c6b6e['OK'],{'Content-Type':_0x9b40dd[_0x3ba66f(0x141)]}),_0x5ba716[_0x3ba66f(0x278)](_0x30b574[_0x3ba66f(0xe3)]({'code':_0x38468d['OK'],'data':{'api':_0x23f954,'port':_0x170a05,'cacheDir':_0x39ccc8,'pathIndexCount':_0x5b091c['keys'](_0x4be1d9)['length'],'viewsInfo':{'request':_0x49cdcc[_0x3ba66f(0xf0)],'cacheHit':_0x5bfd9a[_0x3ba66f(0x1fd)],'apiCall':_0x474c81[_0x3ba66f(0x13b)],'cacheCall':_0x3a1ef4[_0x3ba66f(0x27e)],'cacheReadError':_0x124da1[_0x3ba66f(0x169)+_0x3ba66f(0x139)],'fetchApiError':_0x3f022b[_0x3ba66f(0x229)+_0x3ba66f(0x115)],'fetchApiWarning':_0x287470[_0x3ba66f(0xd5)+_0x3ba66f(0x148)]}}}));}}_0x16d379[_0x3ba66f(0x91)](_0x4c5dbc,JSON[_0x3ba66f(0x198)](_0x51ac2f));}catch(_0x1868aa){if(_0x16d379[_0x3ba66f(0xc6)](_0x3ba66f(0x79),_0x16d379[_0x3ba66f(0x14c)])){const _0x4974e8=/^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([\/\w.-]*)*\/?$/;_0x4974e8[_0x3ba66f(0x1b4)](_0x4b2072['query'][_0x3ba66f(0x1b9)])&&(_0x31ef5d=_0x2ecb32[_0x3ba66f(0x1df)][_0x3ba66f(0x1b9)],_0x3c0e44[_0x3ba66f(0x127)](_0x3ba66f(0x1d9)+_0x3ba66f(0xcc)+_0x3ba66f(0xa3)+_0x184e4e));}else console[_0x3ba66f(0x194)]('Error\x20pars'+'ing\x20JSON\x20r'+_0x3ba66f(0x18b)+_0x3ba66f(0xe2)+_0x224ee6+':',_0x1868aa,_0x51ac2f),_0x47e136(new Error('Failed\x20to\x20'+_0x3ba66f(0xb3)+_0x3ba66f(0x25d)+_0x1868aa[_0x3ba66f(0xa8)]));}});}});_0x220a22['on'](_0x46411b[_0xd297c3(0xfa)],()=>{const _0x1b7b9c=_0xd297c3;if(_0x29b4c0[_0x1b7b9c(0x15b)](_0x29b4c0[_0x1b7b9c(0x241)],_0x29b4c0[_0x1b7b9c(0x87)])){_0xa02551[_0x1b7b9c(0x98)](_0x29b4c0['khUXj'],_0x329f49[_0x1b7b9c(0x234)]),_0x106c7d(_0x2b4a5e,_0x24c10e[_0x1b7b9c(0x189)+'Y'],_0x1b7b9c(0x8c)+_0x1b7b9c(0x1c5)+_0x1b7b9c(0x17e)+_0x1b7b9c(0x260)+'\x20'+_0x55c6c6[_0x1b7b9c(0x234)]);_0x5c697d[_0x1b7b9c(0x243)](_0x747f44)&&_0x2113b0['unlinkSync'](_0x5a3b29);return;}else _0x220a22[_0x1b7b9c(0x1f5)](),console[_0x1b7b9c(0x194)](_0x1b7b9c(0x239)+'t\x20to\x20'+_0x224ee6+(_0x1b7b9c(0xbe)+'\x20after\x20')+_0x4c75e5+'ms'),_0x29b4c0[_0x1b7b9c(0x232)](_0x47e136,new Error(_0x29b4c0['JcSlt']));}),_0x220a22['on'](_0x46411b[_0xd297c3(0xd6)],_0x360a25=>{const _0x3d10b4=_0xd297c3;console[_0x3d10b4(0x194)](_0x3d10b4(0x239)+_0x3d10b4(0x11a)+_0x224ee6+_0x3d10b4(0x240),_0x360a25),_0x47e136(_0x360a25);}),_0x220a22['end']();}else _0x49a872[_0xd297c3(0x108)](_0x42e1ab);});}function _0x1bb7c3(_0x49ea51,_0x48e001){const _0x1a6a6a=_0x16cc39,_0x4e29f6={'wwXDb':'string','ZBETr':function(_0x47d06f,_0x1a34a2){return _0x47d06f||_0x1a34a2;},'gFByh':function(_0x323895,_0x3f5edc){return _0x323895>_0x3f5edc;},'UGSCL':function(_0x3abc0c,_0x39878f){return _0x3abc0c>_0x39878f;}},{path:_0x249c95,thumb:_0x22f006}=_0x49ea51,_0x2bfe6f=_0x51bf51[_0x1a6a6a(0x77)](_0x5cdaca,_0x1a6a6a(0x140)+_0x22f006['uniqid']+'.jpeg');if(_0x1e8eee[_0x1a6a6a(0x243)](_0x2bfe6f))return _0x2bfe6f;const _0x305328=_0x249c95&&typeof _0x249c95===_0x4e29f6[_0x1a6a6a(0x12e)]&&_0x249c95[_0x1a6a6a(0x162)]('.mp4');if(_0x4e29f6[_0x1a6a6a(0xbf)](_0x305328,!_0x22f006))return;const _0x503ad3=_0x22f006[_0x1a6a6a(0x1ad)]&&_0x4e29f6[_0x1a6a6a(0xae)](_0x22f006['width'],0x1*-0x2221+0xc*-0x30e+0x46c9)?_0x22f006[_0x1a6a6a(0x1ad)]:undefined,_0x3d849c=_0x22f006[_0x1a6a6a(0x1ae)]&&_0x4e29f6[_0x1a6a6a(0x1dc)](_0x22f006['height'],0x147c+0xb*-0x2e7+0xb71)?_0x22f006[_0x1a6a6a(0x1ae)]:undefined;if(!_0x503ad3)return;return _0x15dbb4(_0x48e001)[_0x1a6a6a(0x1a8)](_0x503ad3,_0x3d849c)['toFile'](_0x2bfe6f),_0x2bfe6f;}const _0x2d64c0=0x25*0x58+-0x1787+0xacf,_0x1f3fca=(_0x43c143,_0x11e0f1,_0x56d995,_0x256556,_0xaff14f)=>{const _0x97fa91=_0x16cc39,_0x33237b={'OaTlu':'last-modif'+'ied','KBYyE':function(_0xfbe57f,_0x293613){return _0xfbe57f<=_0x293613;},'kFoLc':function(_0x675ab0,_0x12b834){return _0x675ab0===_0x12b834;},'VtzvJ':_0x97fa91(0x168),'iTNep':_0x97fa91(0xc2),'HFQNL':_0x97fa91(0x26d)+_0x97fa91(0x256),'hVSCj':function(_0x5e8806,_0x52185f){return _0x5e8806!==_0x52185f;},'XKsMn':_0x97fa91(0x19f),'lxdnZ':_0x97fa91(0x1e4),'fsgUR':_0x97fa91(0x1cb),'wQFJg':function(_0x32628d,_0x1c332f,_0x4fa674){return _0x32628d(_0x1c332f,_0x4fa674);},'DXqEc':function(_0x22ce4e,_0x53ff6f){return _0x22ce4e===_0x53ff6f;},'otPBx':_0x97fa91(0x22d),'AjbFz':_0x97fa91(0x1c1)+_0x97fa91(0x17d),'dVByr':function(_0x2a9a07,_0x1e1975){return _0x2a9a07!==_0x1e1975;},'nrKkB':function(_0x157ed3,_0x474f4f,_0x4bb311,_0x8110fc){return _0x157ed3(_0x474f4f,_0x4bb311,_0x8110fc);},'aCtgb':function(_0x78fb89,_0x54f7e3){return _0x78fb89!==_0x54f7e3;},'tpcgj':_0x97fa91(0x93),'diQST':_0x97fa91(0x1e0)+_0x97fa91(0x129)+'gth\x20is\x20und'+_0x97fa91(0x23c)+_0x97fa91(0x210)+'nse\x20from:','MidQT':_0x97fa91(0x1ac)+_0x97fa91(0xda)+'6000','gbwPY':function(_0x4b6cb8,_0x383b15){return _0x4b6cb8+_0x383b15;},'KwryV':_0x97fa91(0x24f),'hwCMi':_0x97fa91(0x15f),'oUAQz':_0x97fa91(0x270)+'pe','kDsYb':'video/mp4','MkeHB':_0x97fa91(0x278),'OuhkC':'https:','GysbS':_0x97fa91(0x194)},_0x19c3a8=_0x43c143[_0x97fa91(0x234)]['startsWith'](_0x33237b['OuhkC'])?_0x568bec:_0x3907d7;_0x19c3a8['get'](_0x43c143[_0x97fa91(0x234)],{'timeout':_0x2d64c0,'rejectUnauthorized':![]},_0x5ebb75=>{const _0x303172=_0x97fa91,_0x4b27c={'dykFS':_0x33237b[_0x303172(0x164)],'GQJET':function(_0x4b62ce,_0x5c94c0){const _0xb2cbe2=_0x303172;return _0x33237b[_0xb2cbe2(0x8d)](_0x4b62ce,_0x5c94c0);},'xHbEY':_0x33237b[_0x303172(0x8b)],'zZQZl':_0x303172(0x101),'rorRi':_0x33237b[_0x303172(0x19a)],'Pijgq':function(_0x32e21a,_0x4241d1){return _0x32e21a===_0x4241d1;},'vcMlF':_0x33237b[_0x303172(0xcf)],'MizUn':function(_0x1b796b,_0x3d84c0,_0x74753e){const _0x2b8aa2=_0x303172;return _0x33237b[_0x2b8aa2(0xce)](_0x1b796b,_0x3d84c0,_0x74753e);},'aEEYY':function(_0x16e9f2,_0x205b57){return _0x16e9f2!==_0x205b57;},'bEOPl':'deSJj'},_0x37fe52=_0x1e8eee[_0x303172(0xb9)+_0x303172(0xdc)](_0x11e0f1,{'flags':'w'});let _0x8b6d92=_0x43c143['path']&&_0x33237b[_0x303172(0xbc)](typeof _0x43c143[_0x303172(0x264)],_0x303172(0x9f))&&_0x43c143['path'][_0x303172(0x162)](_0x33237b[_0x303172(0x165)]);const _0x198ab5=_0x5ebb75['headers'][_0x33237b[_0x303172(0x81)]];if(_0x198ab5){if(_0x198ab5<0x5*0xa4+0x1ed3+-0x1a07&&_0x33237b[_0x303172(0x7b)](_0x43c143[_0x303172(0x179)][_0x33237b[_0x303172(0x81)]],_0x198ab5)){console[_0x303172(0x98)](_0x303172(0x1e0)+_0x303172(0x129)+'gth\x20is\x20dif'+'ferent\x20for'+'\x20the\x20respo'+_0x303172(0x10a),_0x43c143[_0x303172(0x234)]),_0x33237b[_0x303172(0x251)](_0x167972,_0xaff14f,_0x39fbd3[_0x303172(0x189)+'Y'],_0x303172(0x8c)+_0x303172(0x1c5)+_0x303172(0x17e)+_0x303172(0x260)+'\x20'+_0x43c143[_0x303172(0x234)]);_0x1e8eee[_0x303172(0x243)](_0x11e0f1)&&_0x1e8eee['unlinkSync'](_0x11e0f1);return;}_0x43c143[_0x303172(0x179)][_0x33237b[_0x303172(0x81)]]=_0x198ab5,_0x1e8eee[_0x303172(0x20f)+_0x303172(0x283)](_0x256556,JSON['stringify'](_0x43c143));}else _0x33237b[_0x303172(0x22f)](_0x33237b['tpcgj'],_0x33237b['tpcgj'])?_0x52e660[_0x303172(0x98)]('Temp\x20cache'+_0x303172(0x1bb)+_0x42aefd+(_0x303172(0x281)+_0x303172(0x25b)+_0x303172(0xaa)+'r\x20')+_0x3c9647[_0x303172(0x234)]):console['warn'](_0x33237b['diQST'],_0x43c143[_0x303172(0x234)]);const _0x3a469e={'Cloud-Type':_0x43c143[_0x303172(0x150)],'Cloud-Expiration':_0x43c143[_0x303172(0x14f)],'ETag':_0x43c143[_0x303172(0x1b1)]||'','Cache-Control':_0x33237b[_0x303172(0x282)],'Expires':new Date(_0x33237b[_0x303172(0x16a)](Date[_0x303172(0x276)](),-0x65ff*0x85ad1+-0x65*0x1caaf4bd+0x15fb4aa5c0))[_0x303172(0x12b)+'g'](),'Accept-Ranges':_0x33237b[_0x303172(0x209)],'Connection':_0x33237b[_0x303172(0x19e)],'Date':new Date()[_0x303172(0x12b)+'g'](),'Last-Modified':_0x43c143['headers'][_0x33237b[_0x303172(0x94)]]||new Date(_0x1e8eee['statSync'](_0x256556)[_0x303172(0x166)])[_0x303172(0x12b)+'g']()},_0x52331d={..._0x3a469e,'Content-Type':_0x5ebb75[_0x303172(0x179)][_0x33237b['oUAQz']]||(_0x8b6d92?_0x33237b[_0x303172(0x171)]:_0x303172(0x244)+_0x303172(0x19d)+_0x303172(0x1e5)),..._0x43c143['headers']};_0xaff14f[_0x303172(0x27f)](_0x5ebb75[_0x303172(0xe6)],_0x52331d),_0x5ebb75[_0x303172(0x16e)](_0x37fe52),_0x5ebb75[_0x303172(0x16e)](_0xaff14f),_0x5ebb75['on'](_0x33237b[_0x303172(0x249)],()=>{const _0x4c70d3=_0x303172,_0x45edde={'YbSvu':_0x33237b[_0x4c70d3(0x94)],'pqGdF':function(_0x73ce33,_0x2e5417){const _0x2e2450=_0x4c70d3;return _0x33237b[_0x2e2450(0x7e)](_0x73ce33,_0x2e5417);}};_0x33237b[_0x4c70d3(0x7f)](_0x33237b[_0x4c70d3(0x114)],_0x33237b[_0x4c70d3(0x89)])?(_0x4fe0ea['log'](_0x4c70d3(0x10e)+_0x4c70d3(0x12a)+_0x4c70d3(0x8f)+_0x4c70d3(0x246)+'\x20'+_0x3a89cc+('.\x20Destroyi'+_0x4c70d3(0x186)+_0x4c70d3(0xfc))),_0x293e10[_0x4c70d3(0x1f5)]()):_0x37fe52[_0x4c70d3(0x278)](()=>{const _0x3662c3=_0x4c70d3,_0x3bd5e5={'YNyJe':_0x4b27c['dykFS']};if(_0x4b27c['GQJET'](_0x4b27c['xHbEY'],_0x4b27c[_0x3662c3(0x9a)]))_0x513413[_0x3662c3(0x194)]('Error\x20crea'+_0x3662c3(0x172)+_0x3662c3(0x1f7)+'\x20'+_0x4abfe9+':',_0x245ec0),_0x4e24c8[_0x3662c3(0x124)](-0x2*0x11fd+0xcf1+-0x3d7*-0x6);else{if(_0x1e8eee[_0x3662c3(0x243)](_0x11e0f1)){if(_0x4b27c['GQJET'](_0x4b27c[_0x3662c3(0x230)],_0x4b27c['rorRi']))try{const _0x22a00d=_0x51bf51['dirname'](_0x56d995);if(!_0x1e8eee[_0x3662c3(0x243)](_0x22a00d)){if(_0x4b27c[_0x3662c3(0x177)](_0x4b27c[_0x3662c3(0x1da)],_0x3662c3(0xee)))try{const _0x7f53d1=new _0x507fdd(_0x483bf0[_0x3662c3(0x179)][_0x45edde[_0x3662c3(0x21e)]]),_0x40ecb6=new _0x25d33e(_0x4f3a88);if(_0x45edde['pqGdF'](_0x7f53d1[_0x3662c3(0x142)](),_0x40ecb6['getTime']()))return{'cacheData':_0x1b65e4,'isNotModified':!![]};}catch(_0x471b47){_0x2e561e['warn']('Error\x20pars'+_0x3662c3(0x84)+_0x3662c3(0x216)+_0x3662c3(0x1db)+_0x3662c3(0x201)+_0x3e064f+'):',_0x471b47);}else _0x1e8eee['mkdirSync'](_0x22a00d,{'recursive':!![]});}_0x1e8eee[_0x3662c3(0x1e2)](_0x11e0f1,_0x56d995),console[_0x3662c3(0x127)](_0x3662c3(0x78)+'ly\x20cached:'+'\x20'+_0x56d995),_0x43c143[_0x3662c3(0x23e)]&&_0x4b27c[_0x3662c3(0x176)](_0x1bb7c3,_0x43c143,_0x56d995);}catch(_0x50118c){if(_0x4b27c['aEEYY'](_0x3662c3(0xde),_0x4b27c['bEOPl'])){console[_0x3662c3(0x194)](_0x3662c3(0x21f)+_0x3662c3(0xec)+'cache\x20file'+'\x20'+_0x11e0f1+'\x20to\x20'+_0x56d995+':',_0x50118c);try{_0x1e8eee[_0x3662c3(0x108)](_0x11e0f1);}catch(_0x22dda6){}}else _0xc71a7['log'](_0x3662c3(0x1f8)+_0x3662c3(0x9e)+_0x3662c3(0x7c)+_0x3662c3(0x90)+_0x3662c3(0x202)),_0x51c906[_0x3662c3(0x262)](()=>{const _0x3c3d64=_0x3662c3;_0x16fb29[_0x3c3d64(0x127)](_0x3bd5e5[_0x3c3d64(0xfd)]),_0x382595[_0x3c3d64(0x124)](-0x7c1+0x2*-0x1223+0x2c07);}),_0x531b29(()=>{const _0x1242f8=_0x3662c3;_0x202af9[_0x1242f8(0x194)]('Forcing\x20sh'+_0x1242f8(0x24a)),_0x40560d['exit'](0xf66+-0x1*-0x16ba+0x261f*-0x1);},0xa71+0x1eee+-0x24f);}else _0x376688[_0x3662c3(0x98)](_0x3662c3(0x1d8)+_0x3662c3(0x84)+'or\x20cache\x20h'+_0x3662c3(0x1db)+_0x3662c3(0x201)+_0x31a633+'):',_0x17fe43);}else console[_0x3662c3(0x98)](_0x3662c3(0x24d)+_0x3662c3(0x1bb)+_0x11e0f1+(_0x3662c3(0x281)+_0x3662c3(0x25b)+'eam\x20end\x20fo'+'r\x20')+_0x43c143[_0x3662c3(0x234)]);}});}),_0x5ebb75['on'](_0x303172(0x194),_0x20df35=>{const _0x446c49=_0x303172;console[_0x446c49(0x194)](_0x446c49(0x1d0)+'ng\x20respons'+'e\x20stream\x20f'+'rom\x20'+_0x43c143[_0x446c49(0x234)]+':',_0x20df35),_0x37fe52[_0x446c49(0x278)](),_0x58c669(_0xaff14f,_0x11e0f1,_0x43c143['realUrl']);});})['on'](_0x33237b[_0x97fa91(0x170)],_0x3a9c5d=>{const _0x331334=_0x97fa91;console['error']('Error\x20maki'+_0x331334(0x13a)+_0x331334(0x8a)+_0x43c143[_0x331334(0x234)]+':',_0x3a9c5d),_0x58c669(_0xaff14f,_0x11e0f1,_0x43c143[_0x331334(0x234)]);});};function _0x25e497(_0x61d9e,_0x2897,_0xdd6879,_0x521192){const _0x18e1b6=_0x16cc39,_0x105b9d={'vPsAK':'content-le'+'ngth','JMPBr':function(_0x2802b6,_0x4ae9f1){return _0x2802b6+_0x4ae9f1;},'QlvNE':_0x18e1b6(0x104),'LGALF':_0x18e1b6(0x1f0),'UySDm':_0x18e1b6(0x229)+'ror','pHDBc':function(_0x5b9147,_0xb995ae,_0x5d3e06,_0x205dbf){return _0x5b9147(_0xb995ae,_0x5d3e06,_0x205dbf);},'VLQDg':function(_0x35540a,_0x4398c0){return _0x35540a===_0x4398c0;},'WtQuF':_0x18e1b6(0x1e8),'mpfeX':'content-ty'+'pe','xqZRs':_0x18e1b6(0x111),'GoSpt':_0x18e1b6(0x244)+'n/octet-st'+_0x18e1b6(0x1e5),'ncGku':function(_0x1d27a0,_0x208393,_0xa3dc22){return _0x1d27a0(_0x208393,_0xa3dc22);},'aGVbD':_0x18e1b6(0x1f9)+_0x18e1b6(0x220)+_0x18e1b6(0x159),'UnRqp':_0x18e1b6(0x221)+_0x18e1b6(0x1c4)+_0x18e1b6(0xd1),'zjgpf':_0x18e1b6(0x284),'VXhzf':'N/A','cEhfM':_0x18e1b6(0x153),'xBjKS':_0x18e1b6(0x1ac)+_0x18e1b6(0xda)+_0x18e1b6(0x252),'kVXLc':_0x18e1b6(0x24f),'glrYT':_0x18e1b6(0x204)+_0x18e1b6(0x103),'ZqKsJ':function(_0x549c24,_0x441551,_0x5cc3ff){return _0x549c24(_0x441551,_0x5cc3ff);},'lhMku':function(_0x575828,_0x431393){return _0x575828!==_0x431393;},'ettvz':_0x18e1b6(0x11c),'cCyCY':_0x18e1b6(0x27e),'IZgBX':function(_0x9aa5a2,_0x8456f8){return _0x9aa5a2===_0x8456f8;},'PpBYn':function(_0x4c9d72,_0xf75f9e){return _0x4c9d72===_0xf75f9e;},'wrOWL':_0x18e1b6(0x20a),'uvVtj':_0x18e1b6(0x125),'zYTIO':'error','IdDIE':_0x18e1b6(0x262)};if(!_0x61d9e){console[_0x18e1b6(0x194)](_0x18e1b6(0xd2)+'ache\x20calle'+_0x18e1b6(0xb5)+_0x18e1b6(0x1f3)+_0x18e1b6(0x1e6)+_0x2897),_0x105b9d[_0x18e1b6(0x212)](_0x167972,_0x521192,_0x39fbd3['INTERNAL_S'+_0x18e1b6(0xe4)+'R'],_0x105b9d['UnRqp']);return;}const _0x58bd1d={'Cloud-Type':_0x61d9e[_0x18e1b6(0x150)]||_0x105b9d[_0x18e1b6(0x23f)],'Cloud-Expiration':_0x61d9e[_0x18e1b6(0x14f)]||_0x105b9d['VXhzf'],'ETag':_0x61d9e[_0x18e1b6(0x1b1)]||_0x3fbbb4['createHash'](_0x18e1b6(0x18e))['update'](_0x1e8eee[_0x18e1b6(0x192)+'nc'](_0x2897))[_0x18e1b6(0x15a)](_0x105b9d[_0x18e1b6(0xba)]),'Cache-Control':_0x105b9d[_0x18e1b6(0x269)],'Expires':new Date(_0x105b9d['JMPBr'](Date[_0x18e1b6(0x276)](),0x3350488f+-0x6efdcb116+0xe143d9487))[_0x18e1b6(0x12b)+'g'](),'Accept-Ranges':_0x105b9d[_0x18e1b6(0xb8)],'Connection':_0x18e1b6(0x15f),'Date':new Date()['toUTCStrin'+'g'](),'Last-Modified':_0x61d9e[_0x18e1b6(0x179)]&&_0x61d9e[_0x18e1b6(0x179)][_0x105b9d[_0x18e1b6(0x99)]]||new Date(_0x1e8eee[_0x18e1b6(0x145)](_0xdd6879)[_0x18e1b6(0x166)])[_0x18e1b6(0x12b)+'g']()};if(_0x61d9e['thumb']){var _0xfd48da=_0x105b9d[_0x18e1b6(0x1dd)](_0x1bb7c3,_0x61d9e,_0x2897);if(_0xfd48da&&_0x1e8eee[_0x18e1b6(0x243)](_0xfd48da)){if(_0x105b9d[_0x18e1b6(0xad)](_0x105b9d[_0x18e1b6(0x143)],_0x105b9d[_0x18e1b6(0x143)])){const _0x5e468a=new _0x13e38c(_0x30b6a7['headers'][_0x18e1b6(0x204)+_0x18e1b6(0x103)]),_0x427280=new _0x213bd4(_0x4c06a9);if(_0x5e468a['getTime']()<=_0x427280[_0x18e1b6(0x142)]())return{'cacheData':_0x4025fd,'isNotModified':!![]};}else{_0x61d9e['headers'][_0x105b9d[_0x18e1b6(0x183)]]=_0x1e8eee[_0x18e1b6(0x145)](_0xfd48da)[_0x18e1b6(0x105)];const _0x231df2={..._0x58bd1d,..._0x61d9e[_0x18e1b6(0x179)]||{},'ETag':_0x105b9d[_0x18e1b6(0x273)](_0x61d9e[_0x18e1b6(0x23e)]['uniqid']||_0x61d9e[_0x18e1b6(0x1b1)],_0x105b9d['QlvNE']),'Content-Type':_0x105b9d['LGALF']};_0x521192[_0x18e1b6(0x27f)](_0x39fbd3['OK'],_0x231df2);const _0xdc328b=_0x1e8eee['createRead'+_0x18e1b6(0xff)](_0xfd48da);_0xdc328b[_0x18e1b6(0x16e)](_0x521192);return;}}}_0x40723d[_0x18e1b6(0xf9)](_0x105b9d['cCyCY']);const _0x6e6294=_0x1e8eee[_0x18e1b6(0x83)+_0x18e1b6(0xff)](_0x2897),_0x283092=_0x61d9e['path']&&_0x105b9d[_0x18e1b6(0x144)](typeof _0x61d9e[_0x18e1b6(0x264)],_0x18e1b6(0x9f))&&_0x61d9e['path'][_0x18e1b6(0x162)](_0x18e1b6(0x22d));let _0x3d3d49=_0x61d9e[_0x18e1b6(0x179)]&&_0x61d9e[_0x18e1b6(0x179)]['content-le'+'ngth']?_0x105b9d['ZqKsJ'](parseInt,_0x61d9e[_0x18e1b6(0x179)][_0x18e1b6(0x1c1)+'ngth'],0x1d99+0x1bce+-0x395d):-0x35e*0x6+-0x1820+-0x1*-0x2c54;if(!_0x3d3d49||_0x105b9d[_0x18e1b6(0x1c9)](_0x3d3d49,0xd91+0x123*0xa+-0x1eb*0xd))try{if(_0x105b9d[_0x18e1b6(0xe9)]===_0x105b9d[_0x18e1b6(0xe9)]){const _0x150a0e=_0x1e8eee[_0x18e1b6(0x145)](_0x2897);_0x3d3d49=_0x150a0e[_0x18e1b6(0x105)];if(_0x3d3d49>0x1bd8+0x60b+-0x1*0x21e3){if(!_0x61d9e[_0x18e1b6(0x179)])_0x61d9e[_0x18e1b6(0x179)]={};_0x61d9e[_0x18e1b6(0x179)][_0x105b9d[_0x18e1b6(0x183)]]=_0x3d3d49[_0x18e1b6(0xb2)](),_0x1e8eee[_0x18e1b6(0x20f)+_0x18e1b6(0x283)](_0xdd6879,JSON[_0x18e1b6(0xe3)](_0x61d9e)),console['log'](_0x18e1b6(0x199)+'ntent-leng'+'th\x20in\x20'+_0xdd6879+_0x18e1b6(0xe1)+_0x3d3d49);}else console[_0x18e1b6(0x98)]('Cached\x20con'+_0x18e1b6(0x1ab)+_0x2897+(_0x18e1b6(0x1b8)+_0x18e1b6(0xd7)+'failed.'));}else{_0x2537e9[_0x18e1b6(0x179)][_0x105b9d[_0x18e1b6(0x183)]]=_0x219307[_0x18e1b6(0x145)](_0x3ee28b)['size'];const _0x5ee81e={..._0x376ec7,..._0x4baa5d[_0x18e1b6(0x179)]||{},'ETag':_0x105b9d[_0x18e1b6(0x273)](_0x3d0e50[_0x18e1b6(0x23e)][_0x18e1b6(0x1b1)]||_0xb0fb95[_0x18e1b6(0x1b1)],_0x105b9d[_0x18e1b6(0x154)]),'Content-Type':_0x105b9d[_0x18e1b6(0x1af)]};_0x22f619[_0x18e1b6(0x27f)](_0x5dcaa8['OK'],_0x5ee81e);const _0x2483f9=_0x2c935f[_0x18e1b6(0x83)+_0x18e1b6(0xff)](_0x248c42);_0x2483f9[_0x18e1b6(0x16e)](_0x4cc35c);return;}}catch(_0x256b53){console[_0x18e1b6(0x194)](_0x18e1b6(0x135)+_0x18e1b6(0x18a)+_0x18e1b6(0x191)+_0x18e1b6(0x22e)+_0x2897+':',_0x256b53),_0x105b9d[_0x18e1b6(0x13d)](_0x2ab1fc,_0x521192,_0x2897);return;}_0x6e6294['on'](_0x105b9d[_0x18e1b6(0x20d)],()=>{const _0x2a96db=_0x18e1b6;if(_0x105b9d['VLQDg'](_0x105b9d[_0x2a96db(0x17a)],_0x2a96db(0x86))){_0xe44330[_0x2a96db(0xf9)](_0x105b9d[_0x2a96db(0xbb)]),_0xec0390['error']('Error\x20fetc'+_0x2a96db(0x152)+_0x2a96db(0x17c)+_0x276973),_0x105b9d[_0x2a96db(0x212)](_0x1a344a,_0x417d96,_0x1b170[_0x2a96db(0x189)+'Y'],_0x2a96db(0x8c)+_0x2a96db(0x26f)+_0x2a96db(0x160)+_0x2a96db(0x1ce)+_0x423af5);if(_0x25df51[_0x2a96db(0x243)](_0x24646f))try{_0x19a108['unlinkSync'](_0x380255);}catch(_0x4da1f5){_0x68f65[_0x2a96db(0x194)]('Error\x20unli'+'nking\x20temp'+_0x2a96db(0x1bb)+_0x98375c+':',_0x4da1f5);}}else{const _0x59d5c0={..._0x58bd1d,'Content-Type':_0x61d9e['headers']&&_0x61d9e[_0x2a96db(0x179)][_0x105b9d[_0x2a96db(0xbd)]]||(_0x283092?_0x105b9d['xqZRs']:_0x105b9d[_0x2a96db(0x211)]),..._0x61d9e[_0x2a96db(0x179)]||{}};_0x521192['writeHead'](_0x39fbd3['OK'],_0x59d5c0),_0x6e6294[_0x2a96db(0x16e)](_0x521192);}}),_0x6e6294['on'](_0x105b9d[_0x18e1b6(0x19b)],_0x2010bc=>{const _0x1a49eb=_0x18e1b6;console['error'](_0x1a49eb(0xaf)+_0x1a49eb(0x163)+'r\x20'+_0x2897+':',_0x2010bc),_0x105b9d[_0x1a49eb(0x13d)](_0x2ab1fc,_0x521192,_0x2897);}),_0x521192['on'](_0x105b9d[_0x18e1b6(0x9c)],()=>{const _0x641055=_0x18e1b6,_0xa5e3e2={'dWdZN':_0x105b9d[_0x641055(0xac)]};_0x641055(0x226)===_0x641055(0x226)?!_0x521192['writableEn'+'ded']&&(console['log'](_0x641055(0x10e)+_0x641055(0x12a)+_0x641055(0x8f)+_0x641055(0x246)+'\x20'+_0x2897+(_0x641055(0x109)+_0x641055(0x186)+_0x641055(0xfc))),_0x6e6294[_0x641055(0x1f5)]()):!_0x22abbe[_0x641055(0x20e)+'t']&&(_0x294c[_0x641055(0x27f)](_0x36238d,{'Content-Type':_0xa5e3e2[_0x641055(0x207)]}),_0x318b58[_0x641055(0x278)](_0x58bf6b));});}const _0x58c669=(_0x52f5ca,_0x416aab,_0x15ab02)=>{const _0x53a34c=_0x16cc39,_0xf7e1d9={'pLvoE':_0x53a34c(0x229)+_0x53a34c(0x115),'GyBZx':function(_0xef66,_0x3d7768,_0x14c911,_0x4a0222){return _0xef66(_0x3d7768,_0x14c911,_0x4a0222);}};_0x40723d[_0x53a34c(0xf9)](_0xf7e1d9[_0x53a34c(0x263)]),console[_0x53a34c(0x194)]('Error\x20fetc'+_0x53a34c(0x152)+'real\x20URL:\x20'+_0x15ab02),_0xf7e1d9[_0x53a34c(0xb6)](_0x167972,_0x52f5ca,_0x39fbd3[_0x53a34c(0x189)+'Y'],_0x53a34c(0x8c)+_0x53a34c(0x26f)+_0x53a34c(0x160)+_0x53a34c(0x1ce)+_0x15ab02);if(_0x1e8eee[_0x53a34c(0x243)](_0x416aab))try{_0x1e8eee['unlinkSync'](_0x416aab);}catch(_0x535ded){console[_0x53a34c(0x194)](_0x53a34c(0x16f)+_0x53a34c(0x131)+'\x20file\x20'+_0x416aab+':',_0x535ded);}},_0x2ab1fc=(_0x49fbed,_0x4854f7)=>{const _0x1b5191=_0x16cc39,_0x4f07d1={'Fufhn':'cacheReadE'+'rror','zSEgT':function(_0x5206c3,_0x3e63c3,_0x39503a,_0x6911f5){return _0x5206c3(_0x3e63c3,_0x39503a,_0x6911f5);},'QjIts':_0x1b5191(0x13c)+'erver\x20Erro'+_0x1b5191(0x1a4)+_0x1b5191(0x138)+_0x1b5191(0x265)+_0x1b5191(0xf1)};_0x40723d['increment'](_0x4f07d1[_0x1b5191(0xa1)]),console['error'](_0x1b5191(0xb1)+_0x1b5191(0x18a)+_0x1b5191(0x237)+_0x4854f7),_0x4f07d1[_0x1b5191(0x223)](_0x167972,_0x49fbed,_0x39fbd3[_0x1b5191(0x1ee)+_0x1b5191(0xe4)+'R'],_0x4f07d1[_0x1b5191(0x17b)]);};_0x2a1bf4['listen'](_0x3b959f,()=>{const _0x236629=_0x16cc39;console[_0x236629(0x127)](_0x236629(0x123)+_0x236629(0x10c)+'ing\x20on\x20htt'+_0x236629(0x227)+_0x236629(0x102)+_0x3b959f);}),process['on'](_0x16cc39(0x24e),()=>{const _0x3c9cb4=_0x16cc39,_0x2d8168={'yDMqW':'utf8','nQfsM':function(_0x4be571,_0x316590){return _0x4be571===_0x316590;},'dCYzl':function(_0x54b4d5,_0x1b7007){return _0x54b4d5>_0x1b7007;},'iWAMY':function(_0x3cf918,_0x2ffc5e){return _0x3cf918!==_0x2ffc5e;},'Talrs':'xrceH','TaKgK':_0x3c9cb4(0xf8),'Tusrn':function(_0x3fa5ef,_0x5e5346){return _0x3fa5ef>_0x5e5346;},'YlayL':function(_0x2d0f0f,_0x16a943){return _0x2d0f0f-_0x16a943;},'YbxmQ':'Received\x20S'+_0x3c9cb4(0x9e)+'tting\x20down'+_0x3c9cb4(0x90)+'y...','VGtgT':function(_0x939acb,_0x5b84bd,_0x4964f5){return _0x939acb(_0x5b84bd,_0x4964f5);}};console[_0x3c9cb4(0x127)](_0x2d8168[_0x3c9cb4(0x1ff)]),_0x2a1bf4[_0x3c9cb4(0x262)](()=>{const _0x1d3d8a=_0x3c9cb4,_0x131e6e={'JMkrN':_0x2d8168[_0x1d3d8a(0x167)],'HOdWp':function(_0x2a9e23,_0x3d1d2b){const _0x17886a=_0x1d3d8a;return _0x2d8168[_0x17886a(0x1b3)](_0x2a9e23,_0x3d1d2b);},'VNCNr':function(_0x38f99b,_0x58298c){const _0x4e4461=_0x1d3d8a;return _0x2d8168[_0x4e4461(0x11f)](_0x38f99b,_0x58298c);}};if(_0x2d8168[_0x1d3d8a(0x258)](_0x2d8168[_0x1d3d8a(0x133)],_0x2d8168['TaKgK']))console[_0x1d3d8a(0x127)]('Server\x20clo'+'sed.'),process[_0x1d3d8a(0x124)](0x1a5f*0x1+0x157d+-0xc*0x3fd);else{const _0x168379=_0x1d49e6[_0x1d3d8a(0x192)+'nc'](_0x27d91c,_0x131e6e[_0x1d3d8a(0x174)]),_0x1d795e=_0x2e0e31[_0x1d3d8a(0x198)](_0x168379);return _0x131e6e['HOdWp'](typeof _0x1d795e[_0x1d3d8a(0x14f)],_0x1d3d8a(0x253))&&_0x131e6e[_0x1d3d8a(0x1a5)](_0x1d795e['expiration'],_0x546375['now']());}}),_0x2d8168['VGtgT'](setTimeout,()=>{const _0x2eada8=_0x3c9cb4;if(_0x2d8168[_0x2eada8(0x1b3)](_0x2eada8(0xf6),'SbWci'))console[_0x2eada8(0x194)](_0x2eada8(0x11b)+_0x2eada8(0x24a)),process[_0x2eada8(0x124)](-0x95f*0x4+0x2159+0x424);else{const _0x434f2f=_0x104c36[_0x2eada8(0x276)]();for(const _0x303fdd in _0x59cbf5){_0x2d8168[_0x2eada8(0x27d)](_0x2d8168['YlayL'](_0x434f2f,_0x3cc570[_0x303fdd][_0x2eada8(0x1f2)]),_0x2ca843)&&delete _0x20af72[_0x303fdd];}}},-0x38b8+0x2c4a*-0x1+0x8c12);}); \ No newline at end of file diff --git a/source.js b/source.js index e5f150d..ff579f9 100644 --- a/source.js +++ b/source.js @@ -5,12 +5,11 @@ const querystring = require('querystring'); const fs = require('fs'); const pathModule = require('path'); const crypto = require('crypto'); +const sharp = require('sharp'); const CACHE_DIR_NAME = '.cache'; const DEFAULT_PORT = 9001; -const DEFAULT_API_ENDPOINT = 'http://183.6.121.121:9519/api'; -// 备用 API -const BACKUP_API_ENDPOINT = 'http://x-mo.cn:9519/api'; +const DEFAULT_API_ENDPOINT = 'http://183.6.121.121:9521/alist'; const cacheDir = pathModule.join(__dirname, CACHE_DIR_NAME); const pathIndex = {}; @@ -139,7 +138,7 @@ async function handleApiRedirect(res, apiData) { res.end(); } -async function processSuccessfulApiData(apiData, uniqidhex, reqPath, token, sign, res, req) { +async function processSuccessfulApiData(apiData, uniqidhex, reqPath, token, sign, res) { const { url: realUrl, cloudtype, expiration, path: apiPath, headers, uniqid, thumb } = apiData.data; const data = { realUrl, cloudtype, expiration: expiration * 1000, path: apiPath, headers, uniqid, thumb }; @@ -161,16 +160,16 @@ async function processSuccessfulApiData(apiData, uniqidhex, reqPath, token, sign const contentLength = stats.size; if (contentLength < 2048 && data.headers['content-length'] && parseInt(data.headers['content-length'], 10) !== contentLength) { console.warn(`Content length mismatch for ${cacheContentFile}. API: ${data.headers['content-length']}, Cache: ${contentLength}. Re-fetching.`); - fetchAndServe(data, tempCacheContentFile, cacheContentFile, cacheMetaFile, res, req); + fetchAndServe(data, tempCacheContentFile, cacheContentFile, cacheMetaFile, res); } else { - serveFromCache(data, cacheContentFile, cacheMetaFile, res, req); + serveFromCache(data, cacheContentFile, cacheMetaFile, res); } } else { - fetchAndServe(data, tempCacheContentFile, cacheContentFile, cacheMetaFile, res, req); + fetchAndServe(data, tempCacheContentFile, cacheContentFile, cacheMetaFile, res); } } -async function tryServeFromStaleCacheOrError(uniqidhex, res, req, errorMessage) { +async function tryServeFromStaleCacheOrError(uniqidhex, res, errorMessage) { if (pathIndex[uniqidhex]) { const cacheMetaFile = pathModule.join(cacheDir, `${uniqidhex}.meta`); const cacheContentFile = pathModule.join(cacheDir, `${pathIndex[uniqidhex].uniqid}.content`); @@ -178,7 +177,7 @@ async function tryServeFromStaleCacheOrError(uniqidhex, res, req, errorMessage) console.warn(`API call failed or returned non-200. Serving stale cache for ${uniqidhex}`); try { const cacheData = JSON.parse(fs.readFileSync(cacheMetaFile, 'utf8')); - serveFromCache(cacheData, cacheContentFile, cacheMetaFile, res, req); + serveFromCache(cacheData, cacheContentFile, cacheMetaFile, res); return; } catch (parseError) { console.error(`Error parsing stale meta file ${cacheMetaFile}:`, parseError); @@ -226,7 +225,7 @@ async function handleMainRequest(req, res) { res.end(); } else { viewsInfo.increment('cacheHit'); - serveFromCache(cacheData, cacheContentFile, cacheMetaFile, res, req); + serveFromCache(cacheData, cacheContentFile, cacheMetaFile, res); } } else { try { @@ -238,15 +237,15 @@ async function handleMainRequest(req, res) { } if (apiData.code === HTTP_STATUS.OK && apiData.data && apiData.data.url) { - await processSuccessfulApiData(apiData, uniqidhex, reqPath, token, sign, res, req); + await processSuccessfulApiData(apiData, uniqidhex, reqPath, token, sign, res); } else { viewsInfo.increment('fetchApiWarning'); - await tryServeFromStaleCacheOrError(uniqidhex, res, req, apiData.message); + await tryServeFromStaleCacheOrError(uniqidhex, res, apiData.message); } } catch (error) { viewsInfo.increment('fetchApiError'); console.error('Error in API call or processing:', error); - await tryServeFromStaleCacheOrError(uniqidhex, res, req, `Bad Gateway: API request failed. ${error.message}`); + await tryServeFromStaleCacheOrError(uniqidhex, res, `Bad Gateway: API request failed. ${error.message}`); } } } @@ -261,42 +260,34 @@ async function checkCacheHeaders(req, cacheMetaFile) { const ifNoneMatch = req.headers['if-none-match']; const ifModifiedSince = req.headers['if-modified-since']; - // 优先检查ETag (更精确的缓存验证方式) - if (ifNoneMatch && cacheData.uniqid) { - // 支持弱验证器格式 "W/"etag-value"" - const cleanEtag = ifNoneMatch.replace(/^W\//, '').replace(/"/g, ''); - const cleanCacheEtag = cacheData.uniqid.replace(/^W\//, '').replace(/"/g, ''); - - if (cleanEtag === cleanCacheEtag || ifNoneMatch === cacheData.uniqid) { - console.log(`304 Not Modified: ETag match for ${cacheMetaFile}`); - return { cacheData, isNotModified: true }; - } + // Check ETag first + if (ifNoneMatch && cacheData.uniqid && ifNoneMatch === cacheData.uniqid) { + return { cacheData, isNotModified: true }; } - // 检查If-Modified-Since (基于时间的缓存验证) + // Check If-Modified-Since if (ifModifiedSince && cacheData.headers && cacheData.headers['last-modified']) { try { const lastModifiedDate = new Date(cacheData.headers['last-modified']); const ifModifiedSinceDate = new Date(ifModifiedSince); - - // HTTP日期的时间精度是1秒 - // 如果If-Modified-Since至少与Last-Modified一样新,则返回304 + // The time resolution of an HTTP date is one second. + // If If-Modified-Since is at least as new as Last-Modified, send 304. if (lastModifiedDate.getTime() <= ifModifiedSinceDate.getTime()) { - console.log(`304 Not Modified: Last-Modified check for ${cacheMetaFile}`); return { cacheData, isNotModified: true }; } } catch (dateParseError) { console.warn(`Error parsing date for cache header check (${cacheMetaFile}):`, dateParseError); - // 如果日期无效,则继续处理,视为未修改检查失败 + // Proceed as if not modified check failed if dates are invalid } } - - // 如果没有缓存验证头或验证失败,返回正常内容 return { cacheData, isNotModified: false }; } catch (error) { console.error(`Error reading or parsing cache meta file ${cacheMetaFile} in checkCacheHeaders:`, error); - // 如果无法读取元数据,假设缓存无效 - return { cacheData: null, isNotModified: false }; + // If we can't read meta, assume cache is invalid or treat as not modified: false + // Returning a dummy cacheData or null might be better depending on how caller handles it. + // For now, let it propagate and potentially fail later if cacheData is expected. + // Or, more safely, indicate cache is not valid / not modified is false. + return { cacheData: null, isNotModified: false }; // Indicate failure to load cacheData } } @@ -309,21 +300,11 @@ function isCacheValid(cacheMetaFile, cacheContentFile) { try { const metaContent = fs.readFileSync(cacheMetaFile, 'utf8'); const cacheData = JSON.parse(metaContent); - - // 确保expiration是一个数字并且在未来 - // 如果expiration未定义或为0,则设置为24小时后过期 - if (!cacheData.expiration || cacheData.expiration === 0) { - cacheData.expiration = Date.now() + CACHE_EXPIRY_MS; - // 更新缓存元数据文件 - fs.writeFileSync(cacheMetaFile, JSON.stringify(cacheData)); - console.log(`Updated missing expiration in ${cacheMetaFile} to ${cacheData.expiration}`); - return true; - } - + // Ensure expiration is a number and in the future return typeof cacheData.expiration === 'number' && cacheData.expiration > Date.now(); } catch (error) { console.warn(`Error reading or parsing cache meta file ${cacheMetaFile} for validation:`, error); - return false; // 如果元数据文件损坏或不可读,则缓存无效 + return false; // If meta file is corrupt or unreadable, cache is not valid } } @@ -332,18 +313,12 @@ function isCacheValid(cacheMetaFile, cacheContentFile) { const API_TIMEOUT_MS = 5000; const USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36'; -// 用于跟踪API状态的变量 -let isDefaultApiHealthy = true; -let lastApiSwitchTime = 0; -const API_SWITCH_COOLDOWN_MS = 60000; // 切换API后的冷却时间,防止频繁切换 - -// 尝试使用指定的API端点获取数据 -async function tryFetchWithEndpoint(endpoint, reqPath, token, sign) { +async function fetchApiData(reqPath, token, sign) { const queryParams = querystring.stringify({ type: reqPath, sign: sign }); - const apiUrl = `${endpoint}?${queryParams}`; + const apiUrl = `${apiEndpoint}?${queryParams}`; const parsedApiUrl = new URL(apiUrl); const protocol = parsedApiUrl.protocol === 'https:' ? https : http; @@ -374,10 +349,10 @@ async function tryFetchWithEndpoint(endpoint, reqPath, token, sign) { const parsedError = JSON.parse(responseData); if (parsedError && parsedError.message) errorPayload.message = parsedError.message; } catch (e) { /* Ignore if response is not JSON */ } - resolve({ success: false, data: errorPayload }); + resolve(errorPayload); // Resolve with error structure for consistency return; } - resolve({ success: true, data: JSON.parse(responseData) }); + resolve(JSON.parse(responseData)); } catch (parseError) { console.error(`Error parsing JSON response from ${apiUrl}:`, parseError, responseData); reject(new Error(`Failed to parse API response: ${parseError.message}`)); @@ -400,421 +375,108 @@ async function tryFetchWithEndpoint(endpoint, reqPath, token, sign) { }); } -// 主API获取函数,支持故障转移 -async function fetchApiData(reqPath, token, sign) { - // 确定当前使用的API端点 - const currentEndpoint = isDefaultApiHealthy ? DEFAULT_API_ENDPOINT : BACKUP_API_ENDPOINT; - const backupEndpoint = isDefaultApiHealthy ? BACKUP_API_ENDPOINT : DEFAULT_API_ENDPOINT; +// createThumbnail +function createThumbnail(data, cacheContentFile) { + const { path, thumb } = data; - try { - // 尝试使用当前API端点 - const result = await tryFetchWithEndpoint(currentEndpoint, reqPath, token, sign); + const thumbCacheFile = pathModule.join(cacheDir, `thumb_${thumb.uniqid}.jpeg`); + if (fs.existsSync(thumbCacheFile)) return thumbCacheFile; - // 如果当前使用的是备用API且成功了,考虑是否切回主API - if (!isDefaultApiHealthy && result.success) { - const now = Date.now(); - if (now - lastApiSwitchTime > API_SWITCH_COOLDOWN_MS) { - // 尝试恢复使用默认API - console.log(`尝试恢复使用默认API: ${DEFAULT_API_ENDPOINT}`); - isDefaultApiHealthy = true; - lastApiSwitchTime = now; - } - } - - return result.data; - } catch (error) { - console.error(`API请求失败,尝试使用备用API: ${backupEndpoint}`, error); - - // 如果当前API失败,切换到备用API - if (isDefaultApiHealthy) { - console.log(`主API ${DEFAULT_API_ENDPOINT} 不可用,切换到备用API ${BACKUP_API_ENDPOINT}`); - isDefaultApiHealthy = false; - lastApiSwitchTime = Date.now(); - } else { - console.log(`备用API ${BACKUP_API_ENDPOINT} 不可用,切换回主API ${DEFAULT_API_ENDPOINT}`); - isDefaultApiHealthy = true; - lastApiSwitchTime = Date.now(); - } - - try { - // 尝试使用备用API端点 - const backupResult = await tryFetchWithEndpoint(backupEndpoint, reqPath, token, sign); - return backupResult.data; - } catch (backupError) { - console.error(`备用API也失败了,无法获取数据`, backupError); - throw backupError; // 如果备用API也失败,则抛出错误 - } - } + const isVideo = path && typeof path === 'string' && path.includes('.mp4'); + if (isVideo || !thumb) return; + const width = thumb.width && thumb.width > 0 ? thumb.width : undefined; + const height = thumb.height && thumb.height > 0 ? thumb.height : undefined; + if (!width) return; + sharp(cacheContentFile).resize(width, height).toFile(thumbCacheFile); + return thumbCacheFile; } + // 从真实 URL 获取数据并写入缓存 -const REAL_URL_FETCH_TIMEOUT_MS = 30000; // 30秒超时 -const HIGH_WATER_MARK = 64 * 1024; // 64KB 缓冲区 +const REAL_URL_FETCH_TIMEOUT_MS = 0; // 0 means no timeout for the actual file download -// 媒体文件扩展名列表 -const VIDEO_EXTENSIONS = ['.mp4', '.mkv', '.webm', '.avi', '.mov', '.flv']; -const AUDIO_EXTENSIONS = ['.mp3', '.wav', '.ogg', '.flac', '.aac', '.m4a']; - -// 检查文件类型的辅助函数 -const isMediaFile = (path, extensions) => { - if (!path || typeof path !== 'string') return false; - return extensions.some(ext => path.includes(ext)); -}; - -// 从缓存提供范围请求的辅助函数 -const serveRangeFromCache = (rangeHeader, cacheContentFile, cacheMetaFile, res, isVideo, isAudio) => { - try { - const stats = fs.statSync(cacheContentFile); - const fileSize = stats.size; - - // 解析Range头 - const ranges = rangeHeader.replace(/bytes=/, '').split(','); - const rangeSpec = ranges[0].trim(); - const parts = rangeSpec.split('-'); - let start = parseInt(parts[0], 10); - let end = parts[1] ? parseInt(parts[1], 10) : fileSize - 1; - - // 处理特殊范围格式,如 bytes=-500 (最后500字节) - if (isNaN(start)) { - start = Math.max(0, fileSize - parseInt(parts[1], 10)); - end = fileSize - 1; - } - - // 确保范围有效 - end = Math.min(end, fileSize - 1); - start = Math.min(start, end); - - if (start < fileSize && fileSize > 0) { - console.log(`Serving range request from cache: bytes ${start}-${end}/${fileSize}`); - - const chunkSize = (end - start) + 1; - const metaData = JSON.parse(fs.readFileSync(cacheMetaFile, 'utf8')); - - const readStream = fs.createReadStream(cacheContentFile, { - start, end, highWaterMark: HIGH_WATER_MARK - }); - - const contentType = (metaData.headers && metaData.headers['content-type']) || - (isVideo ? 'video/mp4' : (isAudio ? 'audio/mpeg' : 'application/octet-stream')); - - res.writeHead(206, { - 'Content-Range': `bytes ${start}-${end}/${fileSize}`, - 'Content-Length': chunkSize.toString(), - 'Content-Type': contentType, - 'Accept-Ranges': 'bytes', - 'ETag': metaData.uniqid || '', - 'Cache-Control': 'public, max-age=3600', - 'Cloud-Type': metaData.cloudtype || 'unknown', - 'Cloud-Expiration': new Date(metaData.expiration || (Date.now() + 3600000)).toLocaleString() - }); - - readStream.pipe(res); - - readStream.on('error', (err) => { - console.error(`Read stream error: ${err.message}`); - if (!res.headersSent) { - sendErrorResponse(res, HTTP_STATUS.INTERNAL_SERVER_ERROR, 'Error reading from cache'); - } else { - try { res.end(); } catch (e) { /* ignore */ } - } - }); - - return true; // 成功从缓存提供服务 - } - } catch (error) { - console.error(`Error serving range request from cache: ${error.message}`); - } - return false; // 从缓存提供服务失败 -}; - -const fetchAndServe = (data, tempCacheContentFile, cacheContentFile, cacheMetaFile, res, req) => { +const fetchAndServe = (data, tempCacheContentFile, cacheContentFile, cacheMetaFile, res) => { const protocol = data.realUrl.startsWith('https:') ? https : http; - const cacheFileExists = fs.existsSync(cacheContentFile); - - // 如果缓存文件已存在,直接使用它 - if (cacheFileExists) { - tempCacheContentFile = cacheContentFile; - console.log(`Using existing cache file: ${cacheContentFile}`); - } - // 检查媒体文件类型 - const isVideo = isMediaFile(data.path, VIDEO_EXTENSIONS); - const isAudio = isMediaFile(data.path, AUDIO_EXTENSIONS); - const rangeHeader = req && req.headers && req.headers.range; - - // 构建请求选项 - const requestOptions = { - timeout: REAL_URL_FETCH_TIMEOUT_MS, - rejectUnauthorized: false, - headers: { - 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', - 'Accept': '*/*', - 'Accept-Encoding': 'gzip, deflate, br', - 'Connection': 'keep-alive' - } - }; - - // 处理范围请求 - if (rangeHeader) { - console.log(`Forwarding range request: ${rangeHeader} to ${data.realUrl}`); - requestOptions.headers['Range'] = rangeHeader; - - // 尝试从缓存提供范围请求 - if (cacheFileExists && fs.existsSync(cacheMetaFile)) { - if (serveRangeFromCache(rangeHeader, cacheContentFile, cacheMetaFile, res, isVideo, isAudio)) { - return; // 成功从缓存提供服务,不需要继续 - } - } - } - - // 转发条件请求头 - if (req && req.headers) { - ['if-range', 'if-match', 'if-none-match'].forEach(header => { - if (req.headers[header]) { - requestOptions.headers[header.charAt(0).toUpperCase() + header.slice(1)] = req.headers[header]; - console.log(`Forwarding ${header} header: ${req.headers[header]}`); - } - }); - } + protocol.get(data.realUrl, { timeout: REAL_URL_FETCH_TIMEOUT_MS, rejectUnauthorized: false }, (realRes) => { + const cacheStream = fs.createWriteStream(tempCacheContentFile, { flags: 'w' }); - protocol.get(data.realUrl, requestOptions, (realRes) => { - // 处理304 Not Modified响应 - if (realRes.statusCode === 304) { - console.log(`Received 304 Not Modified from source for ${data.realUrl}`); - res.writeHead(304, { - 'ETag': data.uniqid || '', - 'Cache-Control': 'public, max-age=3600', - 'Date': new Date().toUTCString() - }); - res.end(); - return; - } - - // 使用更高效的缓冲区设置,对于已存在的文件使用追加模式 - const cacheStream = fs.createWriteStream(tempCacheContentFile, { - flags: tempCacheContentFile === cacheContentFile && fs.existsSync(tempCacheContentFile) ? 'a' : 'w', - highWaterMark: HIGH_WATER_MARK - }); + let isVideo = data.path && typeof data.path === 'string' && data.path.includes('.mp4'); + // 确保 content-length 是有效的 + const contentLength = realRes.headers['content-length']; + if (contentLength) { - // 处理响应头和缓存元数据 - const handleResponseHeaders = () => { - const contentLength = realRes.headers['content-length']; - - // 验证内容长度 - if (contentLength) { - // 检查内容长度是否异常 - if (contentLength < 2048 && data.headers['content-length'] !== contentLength && !rangeHeader) { - console.warn('Warning: content-length mismatch from:', data.realUrl); - sendErrorResponse(res, HTTP_STATUS.BAD_GATEWAY, `Bad Gateway: Content-Length mismatch`); - - // 清理临时文件 - if (fs.existsSync(tempCacheContentFile)) { - fs.unlinkSync(tempCacheContentFile); - } - return false; + // contentLength 小于 2KB 且与缓存文件大小不一致时,重新获取 + if (contentLength < 2048 && data.headers['content-length'] !== contentLength) { + console.warn('Warning: content-length is different for the response from:', data.realUrl); + sendErrorResponse(res, HTTP_STATUS.BAD_GATEWAY, `Bad Gateway: Content-Length mismatch for ${data.realUrl}`); + // Clean up temp file if stream hasn't started or failed early + if (fs.existsSync(tempCacheContentFile)) { + fs.unlinkSync(tempCacheContentFile); } - - // 只在非范围请求时更新content-length - if (!rangeHeader) { - data.headers['content-length'] = contentLength; - updateCacheMetadata(); - } - } else { - console.warn('Warning: content-length undefined from:', data.realUrl); + return; } - // 确保过期时间有效 - if (!data.expiration || data.expiration === 0) { - data.expiration = Date.now() + CACHE_EXPIRY_MS; - updateCacheMetadata(); - } - - return true; - }; - - // 更新缓存元数据 - const updateCacheMetadata = () => { - fs.writeFile(cacheMetaFile, JSON.stringify(data), (err) => { - if (err) console.error(`Error updating cache metadata: ${err.message}`); - }); - }; - - // 如果头部处理失败,直接返回 - if (!handleResponseHeaders()) return; - - // 格式化过期时间为可读格式 - const expirationDate = new Date(data.expiration).toLocaleString(); - - // 设置响应头 - 更精简的方式 - const responseHeaders = { + data.headers['content-length'] = contentLength; + // 更新 data 到缓存 cacheMetaFile + fs.writeFileSync(cacheMetaFile, JSON.stringify(data)); + } else { + console.warn('Warning: content-length is undefined for the response from:', data.realUrl); + } + + const baseHeaders = { 'Cloud-Type': data.cloudtype, - 'Cloud-Expiration': expirationDate, + 'Cloud-Expiration': data.expiration, 'ETag': data.uniqid || '', - 'Cache-Control': 'public, max-age=3600, stale-while-revalidate=86400', - 'Expires': new Date(Date.now() + 3600000).toUTCString(), + 'Cache-Control': 'public, max-age=31536000', // 1 year + 'Expires': new Date(Date.now() + 31536000000).toUTCString(), 'Accept-Ranges': 'bytes', 'Connection': 'keep-alive', - 'Date': new Date().toUTCString(), - 'Last-Modified': data.headers['last-modified'] || new Date().toUTCString(), - 'Vary': 'Accept-Encoding', - 'Content-Type': realRes.headers['content-type'] || (isVideo ? 'video/mp4' : 'application/octet-stream'), - ...data.headers + 'Date': new Date().toUTCString(), // Should be set by the server, but good for consistency + 'Last-Modified': data.headers['last-modified'] || new Date(fs.statSync(cacheMetaFile).mtime).toUTCString(), // Prefer API's Last-Modified if available + }; + const responseHeaders = { + ...baseHeaders, + 'Content-Type': realRes.headers['content-type'] || (isVideo ? 'video/mp4' : 'application/octet-stream'), // Prefer actual content-type + ...data.headers, // Allow API to override some headers if necessary }; - - // 处理范围响应 - if (realRes.headers['content-range']) { - responseHeaders['Content-Range'] = realRes.headers['content-range']; - console.log(`Received partial content: ${realRes.headers['content-range']} for ${data.realUrl}`); - - // 从Content-Range中提取文件总大小 - const contentRangeMatch = /\/([0-9]+)$/.exec(realRes.headers['content-range']); - if (contentRangeMatch && contentRangeMatch[1]) { - const totalSize = parseInt(contentRangeMatch[1], 10); - if (totalSize > 0 && (!data.headers['content-length'] || parseInt(data.headers['content-length'], 10) !== totalSize)) { - data.headers['content-length'] = totalSize.toString(); - console.log(`Updated content-length: ${totalSize}`); - fs.writeFile(cacheMetaFile, JSON.stringify(data), err => { - if (err) console.error(`Error updating meta: ${err.message}`); - }); - } - } - } - // 使用源服务器返回的状态码 res.writeHead(realRes.statusCode, responseHeaders); - - // 使用流事件处理来优化性能 - let bytesReceived = 0; - const startTime = Date.now(); - - // 检测是否需要处理压缩内容 - const contentEncoding = realRes.headers['content-encoding']; - if (contentEncoding && (contentEncoding.includes('gzip') || contentEncoding.includes('deflate') || contentEncoding.includes('br'))) { - // 对于压缩内容,我们直接传递,不做解压处理 - console.log(`Streaming compressed content (${contentEncoding}) for ${data.realUrl}`); - } - - // 使用更高效的流处理方式,确保边下边播 - // 创建一个Transform流,同时写入缓存和响应 - const { Transform } = require('stream'); - const streamRelay = new Transform({ - transform(chunk, encoding, callback) { - // 将数据传递给下一个流 - this.push(chunk); - - // 更新接收的字节数 - bytesReceived += chunk.length; - - // 每10MB记录一次进度 - if (bytesReceived % (10 * 1024 * 1024) === 0) { - const elapsedSeconds = (Date.now() - startTime) / 1000; - const mbReceived = bytesReceived / (1024 * 1024); - const mbps = mbReceived / elapsedSeconds; - console.log(`Progress for ${data.realUrl}: ${mbReceived.toFixed(2)}MB received at ${mbps.toFixed(2)}MB/s`); - } - - callback(); - } - }); - - // 设置错误处理 - streamRelay.on('error', (err) => { - console.error(`Stream relay error for ${data.realUrl}:`, err); - try { - cacheStream.end(); - if (!res.writableEnded) res.end(); - } catch (e) { /* ignore */ } - }); - - // 优化流处理,确保数据立即流向客户端,实现真正的边下边播 - // 直接将源响应通过中继流同时发送到客户端和缓存 - realRes.pipe(streamRelay); - - // 优先将数据发送给客户端,确保低延迟 - streamRelay.pipe(res, { end: true }); - - // 同时将数据写入缓存 - streamRelay.pipe(cacheStream, { end: false }); // 不自动结束缓存流,我们需要在完成后手动处理 - - // 处理客户端提前关闭连接 - res.on('close', () => { - if (!res.writableEnded) { - console.log(`Client closed connection prematurely for ${data.realUrl}`); - // 断开客户端连接,但继续下载到缓存 - streamRelay.unpipe(res); - // 不中断缓存写入,继续下载完整文件 - } - }); - - // 处理完成事件 + realRes.pipe(cacheStream); + realRes.pipe(res); + realRes.on('end', () => { - const totalTime = (Date.now() - startTime) / 1000; - const totalMB = bytesReceived / (1024 * 1024); - console.log(`Completed ${data.realUrl}: ${totalMB.toFixed(2)}MB in ${totalTime.toFixed(2)}s (${(totalMB/totalTime).toFixed(2)}MB/s)`); - - // 确保缓存流正确结束 - cacheStream.end(() => { + cacheStream.end(() => { // Ensure stream is fully flushed before renaming if (fs.existsSync(tempCacheContentFile)) { - // 如果临时文件就是缓存文件,不需要重命名 - if (tempCacheContentFile === cacheContentFile) { - console.log(`Successfully cached: ${cacheContentFile}`); - - // 更新缓存元数据,添加文件大小信息 - if (bytesReceived > 0) { - data.headers['content-length'] = bytesReceived.toString(); - fs.writeFile(cacheMetaFile, JSON.stringify(data), (err) => { - if (err) console.error(`Error updating content-length in cache meta file ${cacheMetaFile}:`, err); - }); - } - } else { - // 确保目标目录存在 + try { + // Ensure the target directory exists before renaming const targetDir = pathModule.dirname(cacheContentFile); - fs.mkdir(targetDir, { recursive: true }, (mkdirErr) => { - if (mkdirErr) { - console.error(`Error creating directory ${targetDir}:`, mkdirErr); - try { fs.unlinkSync(tempCacheContentFile); } catch (e) { /* ignore */ } - return; - } - - // 异步重命名文件 - fs.rename(tempCacheContentFile, cacheContentFile, (renameErr) => { - if (renameErr) { - console.error(`Error renaming temp cache file ${tempCacheContentFile} to ${cacheContentFile}:`, renameErr); - try { fs.unlinkSync(tempCacheContentFile); } catch (e) { /* ignore */ } - } else { - console.log(`Successfully cached: ${cacheContentFile}`); - - // 更新缓存元数据,添加文件大小信息 - if (bytesReceived > 0) { - data.headers['content-length'] = bytesReceived.toString(); - fs.writeFile(cacheMetaFile, JSON.stringify(data), (err) => { - if (err) console.error(`Error updating content-length in cache meta file ${cacheMetaFile}:`, err); - }); - } - } - }); - }); + if (!fs.existsSync(targetDir)) { + fs.mkdirSync(targetDir, { recursive: true }); + } + fs.renameSync(tempCacheContentFile, cacheContentFile); + console.log(`Successfully cached: ${cacheContentFile}`); + + // 生成缩略图 + if (data.thumb) { + createThumbnail(data, cacheContentFile); + } + } catch (renameError) { + console.error(`Error renaming temp cache file ${tempCacheContentFile} to ${cacheContentFile}:`, renameError); + // If rename fails, try to remove the temp file to avoid clutter + try { fs.unlinkSync(tempCacheContentFile); } catch (e) { /* ignore */ } } } else { + // This case might indicate an issue if the stream ended but no temp file was created/found console.warn(`Temp cache file ${tempCacheContentFile} not found after stream end for ${data.realUrl}`); } }); }); - // 改进错误处理 realRes.on('error', (streamError) => { console.error(`Error during response stream from ${data.realUrl}:`, streamError); cacheStream.end(); // Close the writable stream - - // 如果响应已经开始发送,我们不能再发送错误响应 - if (!res.headersSent) { - handleResponseError(res, tempCacheContentFile, data.realUrl); - } else { - // 如果头部已发送,尝试结束响应 - try { res.end(); } catch (e) { /* ignore */ } - // 清理临时文件 - try { fs.unlinkSync(tempCacheContentFile); } catch (e) { /* ignore */ } - } + handleResponseError(res, tempCacheContentFile, data.realUrl); // tempCacheContentFile might be partially written }); }).on('error', (requestError) => { @@ -825,234 +487,94 @@ const fetchAndServe = (data, tempCacheContentFile, cacheContentFile, cacheMetaFi }; // 从缓存中读取数据并返回 -function serveFromCache(cacheData, cacheContentFile, cacheMetaFile, res, req) { +function serveFromCache(cacheData, cacheContentFile, cacheMetaFile, res) { if (!cacheData) { // Added check for null cacheData from checkCacheHeaders failure console.error(`serveFromCache called with null cacheData for ${cacheContentFile}`); sendErrorResponse(res, HTTP_STATUS.INTERNAL_SERVER_ERROR, 'Cache metadata unavailable.'); return; } - // 获取文件大小 - let fileSize = 0; - try { - const stats = fs.statSync(cacheContentFile); - fileSize = stats.size; - - // 更新缓存元数据中的content-length - if (fileSize > 0) { - if (!cacheData.headers) cacheData.headers = {}; - if (!cacheData.headers['content-length'] || parseInt(cacheData.headers['content-length'], 10) !== fileSize) { - cacheData.headers['content-length'] = fileSize.toString(); - // 异步更新缓存元数据 - fs.writeFile(cacheMetaFile, JSON.stringify(cacheData), (err) => { - if (err) console.error(`Error updating content-length in ${cacheMetaFile}:`, err); - else console.log(`Updated content-length in ${cacheMetaFile} to ${fileSize}`); - }); - } - } - } catch (statError) { - console.error(`Error stating cache content file ${cacheContentFile}:`, statError); - handleCacheReadError(res, cacheContentFile); - return; - } - - // 设置更强的缓存控制,确保短时间内不会重复请求 - const now = Date.now(); - const nowUTC = new Date(now).toUTCString(); - const expiresUTC = new Date(now + 3600000).toUTCString(); - - // 获取Last-Modified,优先使用API的值 - let lastModified = cacheData.headers && cacheData.headers['last-modified'] - ? cacheData.headers['last-modified'] - : new Date(fs.statSync(cacheMetaFile).mtime).toUTCString(); - - // 生成ETag,用于断点下载 - const etag = cacheData.uniqid || crypto.createHash('md5').update(cacheContentFile + fileSize).digest('hex'); - const baseHeaders = { 'Cloud-Type': cacheData.cloudtype || 'unknown', - 'Cloud-Expiration': new Date(cacheData.expiration || (now + CACHE_EXPIRY_MS)).toLocaleString(), - 'ETag': etag, - 'Cache-Control': 'public, max-age=3600, stale-while-revalidate=86400', - 'Expires': expiresUTC, - 'Pragma': 'cache', - 'Accept-Ranges': 'bytes', // 关键:支持范围请求和断点下载 + 'Cloud-Expiration': cacheData.expiration || 'N/A', + 'ETag': cacheData.uniqid || crypto.createHash('md5').update(fs.readFileSync(cacheContentFile)).digest('hex'), // Fallback ETag if missing + 'Cache-Control': 'public, max-age=31536000', // 1 year + 'Expires': new Date(Date.now() + 31536000000).toUTCString(), + 'Accept-Ranges': 'bytes', 'Connection': 'keep-alive', - 'Date': nowUTC, - 'Last-Modified': lastModified, - 'Vary': 'Accept-Encoding', + 'Date': new Date().toUTCString(), + 'Last-Modified': (cacheData.headers && cacheData.headers['last-modified']) || new Date(fs.statSync(cacheMetaFile).mtime).toUTCString(), }; - - viewsInfo.increment('cacheCall'); - - // 检测文件类型 - const isVideo = cacheData.path && typeof cacheData.path === 'string' && - (cacheData.path.includes('.mp4') || cacheData.path.includes('.mkv') || - cacheData.path.includes('.webm') || cacheData.path.includes('.avi') || - cacheData.path.includes('.mov') || cacheData.path.includes('.flv')); - - const isAudio = cacheData.path && typeof cacheData.path === 'string' && - (cacheData.path.includes('.mp3') || cacheData.path.includes('.wav') || - cacheData.path.includes('.ogg') || cacheData.path.includes('.flac') || - cacheData.path.includes('.aac') || cacheData.path.includes('.m4a')); - - // 检查是否是断点续传请求 - const ifRange = req && req.headers && req.headers['if-range']; - const ifMatch = req && req.headers && req.headers['if-match']; - const ifNoneMatch = req && req.headers && req.headers['if-none-match']; - - // 处理条件请求 - 如果ETag匹配,返回304 - if (ifNoneMatch && ifNoneMatch.includes(etag)) { - console.log(`304 Not Modified for ${cacheContentFile} - ETag match`); - res.writeHead(304, baseHeaders); - res.end(); - return; - } - - // 处理范围请求 (Range Requests) - const rangeHeader = req && req.headers && req.headers.range; - - // 如果有If-Range头且不匹配当前ETag,则忽略Range头,返回整个文件 - const ignoreRange = ifRange && ifRange !== etag && ifRange !== lastModified; - - if (rangeHeader && fileSize > 0 && !ignoreRange) { - console.log(`Range request received: ${rangeHeader} for file ${cacheContentFile}`); - - // 解析Range头 - const ranges = rangeHeader.replace(/bytes=/, '').split(','); - - // 如果是多范围请求,我们简化处理,只返回第一个范围 - const rangeSpec = ranges[0].trim(); - const parts = rangeSpec.split('-'); - let start = parseInt(parts[0], 10); - let end = parts[1] ? parseInt(parts[1], 10) : fileSize - 1; - - // 处理特殊范围格式,如 bytes=-500 (最后500字节) - if (isNaN(start)) { - start = Math.max(0, fileSize - parseInt(parts[1], 10)); - end = fileSize - 1; - } - - // 确保范围不超过文件大小 - end = Math.min(end, fileSize - 1); - start = Math.min(start, end); - - // 验证范围有效性 - if (start >= fileSize) { - // 无效范围,返回416错误 - res.writeHead(416, { - 'Content-Range': `bytes */${fileSize}`, - ...baseHeaders - }); - res.end(); - return; - } - - // 计算范围大小 - const chunkSize = (end - start) + 1; - - // 创建范围流 - const readStream = fs.createReadStream(cacheContentFile, { - start, - end, - highWaterMark: HIGH_WATER_MARK // 使用更高效的缓冲区设置 - }); - - // 设置206部分内容响应 - const responseHeaders = { - ...baseHeaders, - 'Content-Range': `bytes ${start}-${end}/${fileSize}`, - 'Content-Length': chunkSize.toString(), - 'Content-Type': (cacheData.headers && cacheData.headers['content-type']) || - (isVideo ? 'video/mp4' : (isAudio ? 'audio/mpeg' : 'application/octet-stream')), - }; - - console.log(`Serving partial content: bytes ${start}-${end}/${fileSize} for ${cacheContentFile}`); - res.writeHead(206, responseHeaders); - - // 处理流错误 - readStream.on('error', (err) => { - console.error(`Read stream error for range request ${cacheContentFile}:`, err); - if (!res.headersSent) { - handleCacheReadError(res, cacheContentFile); - } else { - try { res.end(); } catch (e) { /* ignore */ } - } - }); - - // 监控数据传输速度 - let bytesSent = 0; - const startTime = Date.now(); - - readStream.on('data', (chunk) => { - bytesSent += chunk.length; - // 每10MB记录一次进度 - if (bytesSent % (10 * 1024 * 1024) === 0) { - const elapsedSeconds = (Date.now() - startTime) / 1000; - const mbSent = bytesSent / (1024 * 1024); - const mbps = mbSent / elapsedSeconds; - console.log(`Range progress for ${cacheContentFile}: ${mbSent.toFixed(2)}MB sent at ${mbps.toFixed(2)}MB/s`); - } - }); - - // 将范围流传输到响应 - readStream.pipe(res); - - // 处理客户端提前关闭连接 - res.on('close', () => { - if (!res.writableEnded) { - console.log(`Client closed range request connection prematurely for ${cacheContentFile}`); - readStream.destroy(); - } - }); - } else { - // 非范围请求,返回完整文件 - const readStream = fs.createReadStream(cacheContentFile, { - highWaterMark: HIGH_WATER_MARK // 使用更高效的缓冲区设置 - }); - - readStream.on('open', () => { + if (cacheData.thumb) { + var thumbCacheFile = createThumbnail(cacheData, cacheContentFile) + if (thumbCacheFile && fs.existsSync(thumbCacheFile)) { + cacheData.headers['content-length'] = fs.statSync(thumbCacheFile).size; const responseHeaders = { ...baseHeaders, - 'Content-Length': fileSize.toString(), - 'Content-Type': (cacheData.headers && cacheData.headers['content-type']) || - (isVideo ? 'video/mp4' : (isAudio ? 'audio/mpeg' : 'application/octet-stream')), ...(cacheData.headers || {}), + 'ETag': (cacheData.thumb.uniqid || cacheData.uniqid) + '_thumb', + 'Content-Type': 'image/jpeg', }; - res.writeHead(HTTP_STATUS.OK, responseHeaders); - - // 监控数据传输速度 - let bytesSent = 0; - const startTime = Date.now(); - - readStream.on('data', (chunk) => { - bytesSent += chunk.length; - // 每10MB记录一次进度 - if (bytesSent % (10 * 1024 * 1024) === 0) { - const elapsedSeconds = (Date.now() - startTime) / 1000; - const mbSent = bytesSent / (1024 * 1024); - const mbps = mbSent / elapsedSeconds; - console.log(`Full file progress for ${cacheContentFile}: ${mbSent.toFixed(2)}MB sent at ${mbps.toFixed(2)}MB/s`); - } - }); - - readStream.pipe(res); - }); - - readStream.on('error', (err) => { - console.error(`Read stream error for ${cacheContentFile}:`, err); - handleCacheReadError(res, cacheContentFile); - }); - - // 处理客户端提前关闭连接 - res.on('close', () => { - if (!res.writableEnded) { - console.log(`Client closed connection prematurely for ${cacheContentFile}`); - readStream.destroy(); - } - }); + const thumbStream = fs.createReadStream(thumbCacheFile); + thumbStream.pipe(res); + return; + } } + + viewsInfo.increment('cacheCall'); + const readStream = fs.createReadStream(cacheContentFile); + const isVideo = cacheData.path && typeof cacheData.path === 'string' && cacheData.path.includes('.mp4'); + + let currentContentLength = cacheData.headers && cacheData.headers['content-length'] ? parseInt(cacheData.headers['content-length'], 10) : 0; + + if (!currentContentLength || currentContentLength === 0) { + try { + const stats = fs.statSync(cacheContentFile); + currentContentLength = stats.size; + if (currentContentLength > 0) { + if (!cacheData.headers) cacheData.headers = {}; + cacheData.headers['content-length'] = currentContentLength.toString(); + // Update meta file if content-length was missing or zero + fs.writeFileSync(cacheMetaFile, JSON.stringify(cacheData)); + console.log(`Updated content-length in ${cacheMetaFile} to ${currentContentLength}`); + } else { + console.warn(`Cached content file ${cacheContentFile} has size 0 or stat failed.`); + // Potentially treat as an error or serve as is if 0 length is valid for some files + } + } catch (statError) { + console.error(`Error stating cache content file ${cacheContentFile}:`, statError); + handleCacheReadError(res, cacheContentFile); // Treat stat error as read error + return; + } + } + + readStream.on('open', () => { + + const responseHeaders = { + ...baseHeaders, + 'Content-Type': (cacheData.headers && cacheData.headers['content-type']) || (isVideo ? 'video/mp4' : 'application/octet-stream'), + // Merge other headers from cacheData.headers, letting them override base if necessary + // but ensure our critical headers like Content-Length (if updated) are preserved. + ...(cacheData.headers || {}), + }; + + res.writeHead(HTTP_STATUS.OK, responseHeaders); + readStream.pipe(res); + }); + + readStream.on('error', (err) => { + console.error(`Read stream error for ${cacheContentFile}:`, err); + handleCacheReadError(res, cacheContentFile); + }); + + // Handle cases where client closes connection prematurely + res.on('close', () => { + if (!res.writableEnded) { + console.log(`Client closed connection prematurely for ${cacheContentFile}. Destroying read stream.`); + readStream.destroy(); + } + }); }