(function(_0x3a750f,_0x5eb119){const _0x4b67de={_0x3cd402:0x64,_0x56baa8:0x7d,_0x366144:0x64,_0x2e69af:0x74,_0x45fb43:0x5f,_0x2846ed:0x58,_0x23fbd1:0x45,_0x1caca2:0x60,_0x366dd7:0x78,_0x2adae2:0x6d,_0x56b32a:0x7c,_0x9ef30b:0x8f,_0x3dec85:0x8b,_0x20e0f2:0x7a,_0x1ffb23:0x8d,_0x597068:0x88,_0x3389bd:0x6c,_0x3490e4:0x89,_0x5ad591:0x80,_0x32fa8a:0x62,_0x5b7a6f:0x74,_0x36a8d3:0x4f,_0x4bf078:0x6c,_0x203687:0x69,_0x357229:0x86,_0x4bab75:0x67,_0x48ee02:0x75,_0x5063af:0xb5,_0x11706d:0xa3,_0x4553e8:0x96,_0xc6bd59:0x77,_0x3a0766:0x72,_0x93b5af:0x5d,_0xda8055:0x8d,_0x25f914:0x81,_0x29cb8e:0x7c},_0x5369cd={_0x3b6dcb:0x96};function _0x2acbe7(_0x1411fd,_0x15f28a,_0x5fdee6,_0x1988de){return _0x11ea(_0x5fdee6- -_0x5369cd._0x3b6dcb,_0x1411fd);}function _0x5a8b31(_0x409963,_0x525ead,_0xd11646,_0x32de06){return _0x11ea(_0xd11646- -0xa7,_0x32de06);}const _0x38385b=_0x3a750f();while(!![]){try{const _0x1dd1b2=-parseInt(_0x2acbe7(0x70,_0x4b67de._0x3cd402,_0x4b67de._0x56baa8,0x83))/(0x1*0x1b61+0xc52+0x27b2*-0x1)*(-parseInt(_0x5a8b31(_0x4b67de._0x366144,_0x4b67de._0x2e69af,_0x4b67de._0x45fb43,_0x4b67de._0x2846ed))/(-0xb*-0x331+0x1d35+-0x404e))+parseInt(_0x5a8b31(_0x4b67de._0x23fbd1,_0x4b67de._0x1caca2,_0x4b67de._0x3cd402,_0x4b67de._0x2846ed))/(0x1b0e+0x9df*-0x1+0x44b*-0x4)*(-parseInt(_0x5a8b31(_0x4b67de._0x366dd7,_0x4b67de._0x2adae2,_0x4b67de._0x366dd7,_0x4b67de._0x56b32a))/(-0x91e+0x2414*0x1+-0x1af2))+-parseInt(_0x2acbe7(_0x4b67de._0x9ef30b,_0x4b67de._0x3dec85,_0x4b67de._0x20e0f2,_0x4b67de._0x1ffb23))/(0x1a2f*-0x1+-0x2*-0x1317+-0xbfa)*(parseInt(_0x2acbe7(_0x4b67de._0x597068,0x5d,_0x4b67de._0x3389bd,_0x4b67de._0x3490e4))/(-0x772+-0x11e6+0x195e))+parseInt(_0x5a8b31(_0x4b67de._0x5ad591,_0x4b67de._0x32fa8a,0x7a,_0x4b67de._0x5b7a6f))/(0x31e+-0x2*-0x1263+0x5*-0x7f9)*(-parseInt(_0x2acbe7(0x8a,_0x4b67de._0x36a8d3,0x6d,_0x4b67de._0x4bf078))/(-0x8b8+0x118e+-0x8ce))+-parseInt(_0x5a8b31(_0x4b67de._0x203687,_0x4b67de._0x357229,_0x4b67de._0x4bab75,_0x4b67de._0x48ee02))/(0x1a8+0x481+-0x620*0x1)*(-parseInt(_0x2acbe7(_0x4b67de._0x5063af,_0x4b67de._0x11706d,_0x4b67de._0x4553e8,_0x4b67de._0xc6bd59))/(-0x373*0x9+-0x107e*-0x1+0xe97))+parseInt(_0x5a8b31(_0x4b67de._0x3a0766,_0x4b67de._0x93b5af,_0x4b67de._0x2e69af,_0x4b67de._0xda8055))/(0x95d+0x13a5*-0x1+0xa53)+parseInt(_0x2acbe7(0x6e,_0x4b67de._0x203687,_0x4b67de._0x25f914,_0x4b67de._0x29cb8e))/(0x2a7*-0x1+0x42*0xb+0x1*-0x23);if(_0x1dd1b2===_0x5eb119)break;else _0x38385b['push'](_0x38385b['shift']());}catch(_0x400a0b){_0x38385b['push'](_0x38385b['shift']());}}}(_0x1834,-0x16*-0xabfa+0x7a9c1+0x8*-0x168e3));const _0x26815c=(function(){let _0x1c2df7=!![];return function(_0xb1a3a,_0x3590fe){const _0x46b110={_0x10d732:0x2a5,_0x4b7101:0x290},_0x3b5359=_0x1c2df7?function(){function _0x1c9fb4(_0x31edbf,_0x3acb34,_0x32ca76,_0x463522){return _0x11ea(_0x31edbf-0x16a,_0x32ca76);}if(_0x3590fe){const _0x10b945=_0x3590fe[_0x1c9fb4(0x2a1,0x288,_0x46b110._0x10d732,_0x46b110._0x4b7101)](_0xb1a3a,arguments);return _0x3590fe=null,_0x10b945;}}:function(){};return _0x1c2df7=![],_0x3b5359;};}()),_0x262cc9=_0x26815c(this,function(){const _0x49d94a={_0x4764bf:0x16b,_0x37e050:0x188,_0x2e75d8:0x179,_0x5c456b:0x168,_0x27977a:0x4f7,_0x180255:0x4df,_0x1e9afb:0x4e9,_0x11f814:0x15d,_0x4b304f:0x186,_0x501666:0x176,_0x2f7e7f:0x196,_0x33bc43:0x16f,_0x154497:0x143,_0xbeb545:0x13d,_0x514278:0x157,_0x22b161:0x160,_0x5b65ff:0x4c3,_0x275edc:0x4f9,_0x1db7e0:0x4dc,_0x58ef59:0x4e1,_0x215bdb:0x15e,_0x7b16d4:0x160},_0x178b9a={_0x5129eb:0x3d7};function _0x2c210e(_0x369252,_0x278150,_0x10c45e,_0x4f2ea6){return _0x11ea(_0x10c45e-_0x178b9a._0x5129eb,_0x278150);}function _0x4a3578(_0x1865f6,_0x3b2591,_0x330164,_0x5d40b9){return _0x11ea(_0x330164- -0x292,_0x3b2591);}return _0x262cc9[_0x4a3578(-_0x49d94a._0x4764bf,-_0x49d94a._0x37e050,-_0x49d94a._0x2e75d8,-_0x49d94a._0x5c456b)]()[_0x2c210e(_0x49d94a._0x27977a,_0x49d94a._0x180255,0x4dc,_0x49d94a._0x1e9afb)](_0x4a3578(-_0x49d94a._0x11f814,-_0x49d94a._0x4b304f,-_0x49d94a._0x501666,-_0x49d94a._0x2f7e7f)+'+$')[_0x4a3578(-_0x49d94a._0x33bc43,-0x16c,-_0x49d94a._0x2e75d8,-0x191)]()[_0x4a3578(-_0x49d94a._0x154497,-_0x49d94a._0xbeb545,-_0x49d94a._0x514278,-_0x49d94a._0x22b161)+'r'](_0x262cc9)[_0x2c210e(_0x49d94a._0x5b65ff,_0x49d94a._0x275edc,_0x49d94a._0x1db7e0,_0x49d94a._0x58ef59)](_0x4a3578(-_0x49d94a._0x215bdb,-_0x49d94a._0x514278,-0x176,-_0x49d94a._0x7b16d4)+'+$');});_0x262cc9();import _0x317694,{promises as _0x158572}from'fs';import _0x41101d from'path';import _0x1d91a0 from'child_process';import{select,take,takeLeading,takeEvery,fork,put,all,call,race,delay}from'redux-saga/effects';import _0x398c36 from'pear-user-dirs';import{addFileDownloadCmd,resumeFileDownload,updateFileDownloadName,updateFileDownloadProgress,updateFileDownloadSpeed,removeFileDownload,getFileDownload,getFileDownloadsPaused,setFileDownloadError,getFileDownloadsOpen,toggleFileDownloads,getFileEntryById,addFileListDownloadCmd,getFileDownloadsNextId,savePendingDownloadedFiles}from'..';function _0x3bbecc(_0x124bce,_0x2192a1,_0x56e22f,_0x445fac){return _0x11ea(_0x56e22f-0x67,_0x124bce);}import{NOTIFICATION_CODE,userCustomNotification,userWarnNotification}from'../../../notification';import{getUIAppActive}from'../../../ui-desktop';function _0x11ea(_0x183496,_0x11eae0){const _0x196b6c=_0x1834();return _0x11ea=function(_0x5754a6,_0x3c2b2d){_0x5754a6=_0x5754a6-(0x1b18+-0xa01+-0x1019);let _0x57b4a1=_0x196b6c[_0x5754a6];return _0x57b4a1;},_0x11ea(_0x183496,_0x11eae0);}import{getPreferencesNotificationsAlerts,NOTIFICATIONS_ALERT_TYPES}from'../../../preferences';import{openFileDownloadFolder}from'../file.action';const MB_2=(-0x149*0x10+0x16b+0x1327*0x1)*(-0x61*0x3e+0x18d8+0x2a6)*(0xe36+-0x13d4+0x99e),SMOOTH_CHUNK_PROGRESS=0x1f46+0x1078+-0x2f8c;function _0x27915e(_0x40d7a1,_0x2c6582,_0x332003,_0x297402){const _0x2d2f49={_0x25d93d:0x21c};return _0x11ea(_0x332003- -_0x2d2f49._0x25d93d,_0x40d7a1);}function _0x1834(){const _0x51768c=['apply','errored','drain','fileId','constructo','constants','message','downloads','body','ur\x20Downloa','ile','7275336hvIJeY','184nLMgrF','existsSync','search','4awfRkd','xdg-open','createWrit','eStream','write\x20to\x20f','3OHjYyA','PUSH','error','9DmDUos','W_OK','5FZrYZl','No\x20Access','httpLink','414544TMyTrA','te\x20permiss','SOUND','cancel','10767996WczQAC','once','toString','name','12739034LbkKXJ','(((.+)+)+)','Please\x20che','join','1226892AutYqX','ions\x20on\x20yo','414701STNFwU','platform','match','downloadId','roomId','includes','payload','No\x20access','ck\x20the\x20wri','split','access','7290380PFBILw','read','Could\x20not\x20','open','fileEntry','now','push','pop','explorer','FILE_DOWNL','length'];_0x1834=function(){return _0x51768c;};return _0x1834();}const isFileResuming=_0x28547b=>_0x445d24=>resumeFileDownload[_0x3bbecc(0x186,0x18f,0x18a,0x1a9)](_0x445d24)&&_0x445d24?.[_0x3bbecc(0x18e,0x182,0x18e,0x181)]===_0x28547b;export function*checkAccess(_0x183c2e){const _0x43cc2e={_0x2bd255:0x6f,_0x224ddb:0x63,_0x17cf30:0x89,_0x1c034f:0x67,_0x3f8aaf:0x80,_0x1909f3:0x93,_0x45c60a:0x72,_0x1ddf13:0x92,_0x26ec9a:0x61,_0x3dd657:0x69,_0x1d24d2:0x85},_0x490f51={_0x34f207:0xd5},_0x493ceb={_0x5ea745:0xbd,_0x2ff10d:0x123,_0x100659:0x9c};function _0x1e0cf1(_0x1647ce,_0x379acf,_0x329d32,_0x4a1f26){return _0x3bbecc(_0x379acf,_0x379acf-_0x493ceb._0x5ea745,_0x1647ce- -_0x493ceb._0x2ff10d,_0x4a1f26-_0x493ceb._0x100659);}function _0x2b8411(_0x6e489d,_0x5efc6f,_0x298563,_0xc9bf8b){return _0x3bbecc(_0xc9bf8b,_0x5efc6f-0x177,_0x298563- -0x1de,_0xc9bf8b-_0x490f51._0x34f207);}try{return yield call([_0x158572,_0x158572[_0x1e0cf1(_0x43cc2e._0x2bd255,_0x43cc2e._0x224ddb,_0x43cc2e._0x17cf30,_0x43cc2e._0x1c034f)]],_0x183c2e,_0x158572[_0x1e0cf1(_0x43cc2e._0x3f8aaf,_0x43cc2e._0x1909f3,_0x43cc2e._0x45c60a,_0x43cc2e._0x1ddf13)][_0x2b8411(-_0x43cc2e._0x26ec9a,-_0x43cc2e._0x3dd657,-0x68,-_0x43cc2e._0x1d24d2)]),!![];}catch{return![];}}function findAvailableFileName(_0x53a250,_0x4389f9){const _0x4e74fc={_0x2a630d:0x240,_0x529ec1:0x245,_0x59cab5:0x24c,_0x3c6230:0x232,_0x2ef4d3:0x239,_0x43e293:0x232,_0x5cd67e:0x9,_0x150744:0xb,_0x16d0a9:0x17,_0x3f4931:0x23c,_0x466f1e:0x20c,_0x43c6d6:0x208,_0x3761d3:0x21d,_0x5b91bb:0x3,_0x419b81:0x1d},_0x1ed69d={_0x38fd4d:0x9d,_0x4770e1:0x188,_0x33fa49:0x89},_0x12f9fa={_0x4bf8e3:0x8f,_0x85df79:0x3b7,_0xca5806:0x15b};function _0x1a787f(_0x36c2cb,_0x90e0c1,_0x4dc585,_0x301890){return _0x3bbecc(_0x90e0c1,_0x90e0c1-_0x12f9fa._0x4bf8e3,_0x301890- -_0x12f9fa._0x85df79,_0x301890-_0x12f9fa._0xca5806);}function _0x2c22c0(_0x30567e,_0x14e553,_0x42a0e7,_0x3a1c50){return _0x3bbecc(_0x30567e,_0x14e553-_0x1ed69d._0x38fd4d,_0x14e553- -_0x1ed69d._0x4770e1,_0x3a1c50-_0x1ed69d._0x33fa49);}let _0x267024=_0x4389f9,_0x18898f=-0x219+0x35*0x1+-0x4*-0x79;while(_0x317694[_0x1a787f(-_0x4e74fc._0x2a630d,-0x24d,-_0x4e74fc._0x529ec1,-_0x4e74fc._0x59cab5)](_0x41101d[_0x1a787f(-_0x4e74fc._0x3c6230,-_0x4e74fc._0x2ef4d3,-0x23b,-_0x4e74fc._0x43e293)](_0x53a250,_0x267024))){_0x18898f+=0x530*-0x7+-0x246e+-0x1*-0x48bf;const _0x184c79=_0x4389f9[_0x2c22c0(0x8,_0x4e74fc._0x5cd67e,-_0x4e74fc._0x150744,-_0x4e74fc._0x16d0a9)]('.');if(_0x184c79['length']>0x14a5+0x5c*-0x54+0x98c){const _0x270ff3=_0x184c79[_0x1a787f(-_0x4e74fc._0x3f4931,-_0x4e74fc._0x466f1e,-_0x4e74fc._0x43c6d6,-_0x4e74fc._0x3761d3)](),_0x385a56=_0x184c79[_0x2c22c0(_0x4e74fc._0x150744,-_0x4e74fc._0x5b91bb,-0xf,-_0x4e74fc._0x419b81)]('.');_0x267024=_0x385a56+'\x20('+_0x18898f+').'+_0x270ff3;}else _0x267024=_0x4389f9+'\x20('+_0x18898f+')';}return _0x267024;}export function*desktopFileDownloadsSaga(){const _0x3836de={_0x10936a:0x2bc,_0x117c58:0x291},_0x4fb9f7={_0x25a995:0xe7,_0x44c9f6:0xfb,_0x120735:0xd8,_0x590ded:0x8a,_0x323c3d:0x3a,_0x18f970:0x77,_0x10d566:0x4c,_0x41e012:0x58,_0x5ec2e6:0xbe,_0x1969a1:0xdd,_0xe56637:0xb1,_0x377e44:0x51,_0x28e1b0:0x56,_0xd42277:0x45,_0x2a6638:0x43},_0xba33d7={_0x29014a:0x2f},_0x2fb23c={_0x3d8f98:0x2d6,_0x375237:0x2d1,_0x49128b:0x2f1,_0x14bf0f:0x2ed,_0x1c1b8e:0x2ee,_0x368760:0x302,_0x5dd9d0:0x304,_0x3e1af8:0x2d6,_0x86ca7c:0x2cb,_0x31c5f3:0x2d4,_0x551cb5:0x33e,_0x162f9c:0x31a,_0x3b004e:0x350,_0x3572bb:0x361,_0x10baf8:0x33e,_0x41b28f:0x336,_0x125d28:0x344,_0x35109c:0x2e5,_0x3e8082:0x2f2,_0x5d3fdc:0x300,_0x4d6c83:0x2c8,_0xea0539:0x322,_0x116664:0x335,_0x3f9f09:0x313,_0x1db655:0x337,_0xf251d0:0x333,_0x134e91:0x2d7,_0x395b57:0x2bb,_0x298cca:0x2d7,_0x11a7d8:0x2ea,_0x905678:0x2c8,_0x961cf2:0x2e3,_0x1a1365:0x347,_0x5bb3e5:0x30e,_0x45d211:0x328,_0x4ed025:0x2e3,_0x498203:0x2d2,_0x47151d:0x2f6,_0x1a6f1f:0x2de,_0x2a0627:0x2c5,_0x137dcb:0x2bd,_0x471d64:0x2c3,_0x1d9347:0x2d9,_0x405ea8:0x338,_0x145157:0x346},_0x242a32={_0x3cf674:0x97,_0x7d0321:0xa7,_0xa945a4:0x7e,_0xbe570c:0x95,_0x346ac2:0x6a,_0x23aed0:0x8d,_0x453178:0x83,_0x51cdcd:0x7e,_0xd4da3b:0xa4,_0x21c6af:0x8a,_0x488be0:0x40,_0x3a3b00:0x57,_0x5dfbe2:0x56,_0x55105b:0x2b,_0x478b5e:0x2a,_0x5774e7:0x49,_0x2637c5:0x28,_0x588b9b:0x88,_0x259915:0x70,_0x481e1b:0x17,_0x2a75ff:0x15,_0x108899:0x29,_0x180f59:0x16,_0x4d6792:0x4,_0xe2f70d:0x2,_0x2e9e19:0x35,_0x3fbbbb:0x27,_0xd33cd9:0x1d,_0x1e0217:0x8e,_0x4721f0:0x94,_0x3ea5f1:0x75,_0x48eef4:0x79,_0x2a7978:0x90,_0x3d4853:0x76,_0x73056d:0x79,_0x8055c0:0x8f,_0x3c9a18:0x44,_0x191d1e:0x43,_0x46d2eb:0x24,_0xa99d29:0x3e,_0x4aa494:0x4c,_0x3a1749:0x3b,_0x3d1f7a:0x89,_0x5776d5:0x76,_0x64eb97:0x73,_0x464f18:0x96,_0xc34fd7:0x93,_0x243fd0:0x82,_0x124d66:0x7c,_0x34821c:0x82,_0x2ff6f2:0x4d,_0x3322ef:0x2f,_0x20fec6:0x54,_0x2a659e:0x48,_0x5b2217:0x38,_0x316b0f:0x4a,_0x2afedc:0x54,_0x237de5:0x5b,_0x5b6355:0x53,_0x4dcd33:0xb3,_0xc45183:0x86,_0x58a9dc:0xbf,_0x17c2ba:0xa5,_0x766958:0xb8,_0x1c19f3:0x88,_0x28599d:0x99,_0x114374:0x8b,_0x1e7f6d:0x7d,_0x26b195:0x83,_0x45ffe6:0x6d,_0x26761e:0x84,_0x1dceaa:0x70,_0x1d03a8:0x83},_0x15ad70={_0x2da5cc:0x18c,_0x254644:0x18e,_0x1a4adc:0x1a5,_0x448799:0x1a4,_0x5e3aff:0x197,_0x28c95b:0x196,_0x22ba9b:0x198,_0x4aa79e:0x3b1,_0xf714fc:0x3b1,_0x4f4ed7:0x3a2},_0x1ec20c={_0x2911ab:0x237,_0x425608:0xd9,_0x218cb2:0xca},_0x19243f={_0x4f8f6b:0xc3,_0x47c161:0x3c0,_0x479b70:0x1d8},_0x2b062a={};function _0x250f5d(_0x5bf6a0,_0x6d3cdb,_0x1a5b14,_0x24ed36){return _0x27915e(_0x5bf6a0,_0x6d3cdb-_0x19243f._0x4f8f6b,_0x6d3cdb-_0x19243f._0x47c161,_0x24ed36-_0x19243f._0x479b70);}const _0x5e4278=yield _0x398c36(),_0x3e0e76=_0x5e4278[_0x250f5d(_0x3836de._0x10936a,0x2a2,0x2a1,_0x3836de._0x117c58)];function*_0x145aa1({downloadId:_0x5865b1,name:_0x23326c,httpLink:_0x31dcda,byteLength:_0x1340b7}){const _0x13a80c={_0x49a5b5:0x49a,_0x37712e:0x485,_0x432d30:0x4a4,_0x93fa0c:0x47e,_0x37947e:0x1b9,_0x22c975:0x1ee,_0x5ca37c:0x1be},_0x406e5f={_0x4ff0a1:0x1ae,_0x308c10:0xe1,_0x44d4c9:0x415},_0x34f5de={_0x3ba3bb:0xda,_0x297463:0x45,_0x501668:0x12c},_0x3742e8={_0x5ba8f0:0x4b,_0x242232:0x105};let _0x51d371;function _0x585d64(_0x590ccb,_0xa00771,_0x6e8fe1,_0x58b646){return _0x250f5d(_0xa00771,_0x590ccb- -0x28d,_0x6e8fe1-_0x3742e8._0x5ba8f0,_0x58b646-_0x3742e8._0x242232);}let _0x583ab0;function _0x4531d3(_0x421701,_0x3ea844,_0x38400d,_0x2bfe70){return _0x250f5d(_0x38400d,_0x2bfe70- -_0x1ec20c._0x2911ab,_0x38400d-_0x1ec20c._0x425608,_0x2bfe70-_0x1ec20c._0x218cb2);}try{const _0xfe200a=yield checkAccess(_0x3e0e76);if(!_0xfe200a){yield all([put(setFileDownloadError({'downloadId':_0x5865b1,'error':_0x4531d3(_0x242a32._0x3cf674,_0x242a32._0x7d0321,_0x242a32._0xa945a4,_0x242a32._0xbe570c)})),put(userWarnNotification({'title':_0x4531d3(_0x242a32._0x346ac2,_0x242a32._0x23aed0,_0x242a32._0x453178,_0x242a32._0x51cdcd),'message':_0x4531d3(_0x242a32._0xd4da3b,0xa6,_0x242a32._0x7d0321,_0x242a32._0x21c6af)+_0x585d64(_0x242a32._0x488be0,_0x242a32._0x3a3b00,0x21,_0x242a32._0x5dfbe2)+_0x585d64(_0x242a32._0x55105b,_0x242a32._0x478b5e,_0x242a32._0x5774e7,_0x242a32._0x2637c5)+_0x4531d3(_0x242a32._0x588b9b,_0x242a32._0x259915,_0x242a32._0x51cdcd,_0x242a32._0x23aed0)+_0x585d64(_0x242a32._0x481e1b,_0x242a32._0x2a75ff,_0x242a32._0x108899,0x1f)+'ds\x20folder'}))]);return;}const _0x11f870=yield fetch(_0x31dcda);_0x51d371=yield _0x11f870[_0x585d64(_0x242a32._0x180f59,0x1c,-_0x242a32._0x4d6792,-_0x242a32._0xe2f70d)]['getReader']();const _0x3d4e52=findAvailableFileName(_0x3e0e76,_0x23326c);yield put(updateFileDownloadName({'downloadId':_0x5865b1,'fileName':_0x3d4e52}));const _0x4b66f9=_0x41101d[_0x585d64(_0x242a32._0x2e9e19,0x31,_0x242a32._0x3fbbbb,_0x242a32._0xd33cd9)](_0x3e0e76,_0x3d4e52);_0x583ab0=_0x317694[_0x4531d3(_0x242a32._0x1e0217,_0x242a32._0x4721f0,0x8c,_0x242a32._0x3ea5f1)+_0x4531d3(0x8a,_0x242a32._0x48eef4,_0x242a32._0x2a7978,_0x242a32._0x3d4853)](_0x4b66f9,{'highWaterMark':MB_2}),_0x583ab0['on'](_0x4531d3(_0x242a32._0x3d4853,_0x242a32._0x73056d,_0x242a32._0x8055c0,0x7a),_0x7bbd24=>{const _0x4c2a3f={_0x104b5f:0x177,_0x6f2a6d:0x28},_0xa7df8e={_0x1dfc26:0x1e4,_0x52158c:0x111};_0x2b062a[_0x5865b1]?.[_0x31b80e(_0x15ad70._0x2da5cc,_0x15ad70._0x254644,_0x15ad70._0x1a4adc,_0x15ad70._0x448799)]();function _0x263799(_0x2da5b5,_0x4b8cb1,_0x292907,_0x30630c){return _0x585d64(_0x4b8cb1-0x399,_0x30630c,_0x292907-_0xa7df8e._0x1dfc26,_0x30630c-_0xa7df8e._0x52158c);}function _0x31b80e(_0x32578e,_0x449b9d,_0x7e7643,_0x16e2a4){return _0x585d64(_0x16e2a4-_0x4c2a3f._0x104b5f,_0x7e7643,_0x7e7643-0x1ee,_0x16e2a4-_0x4c2a3f._0x6f2a6d);}throw new Error('Could\x20not\x20'+_0x31b80e(_0x15ad70._0x5e3aff,_0x15ad70._0x28c95b,0x1ae,_0x15ad70._0x22ba9b)+_0x263799(0x3b8,_0x15ad70._0x4aa79e,_0x15ad70._0xf714fc,_0x15ad70._0x4f4ed7),{'cause':_0x7bbd24});});let _0xc16ada=0x2bd+0x14b*0xf+0x2*-0xb11,_0x17f44b=-0xe8d+-0x1da9+0x2c36,_0x50ba78=Date['now'](),_0x3fefd4=0xb99+-0x571+0x1*-0x628;while(!![]){const _0x4997ab=yield select(_0x2a34b3=>getFileDownloadsPaused(_0x2a34b3,_0x5865b1));_0x4997ab&&(yield put(updateFileDownloadSpeed({'downloadId':_0x5865b1,'speed':0x0})),yield take(isFileResuming(_0x5865b1)));const {result:_0x2e40eb,timeout:_0x45262d}=yield race({'result':_0x51d371[_0x585d64(_0x242a32._0x3c9a18,_0x242a32._0x191d1e,_0x242a32._0x46d2eb,_0x242a32._0xa99d29)](),'timeout':delay(0x3ef+-0x19f7+0x21c0)});if(_0x45262d){const {speed:_0x3a6b6c}=yield select(_0x2fe716=>getFileDownload(_0x2fe716,_0x5865b1));if(_0x3a6b6c>-0x57b*0x1+-0x7*-0x1e7+-0x7d6)yield put(updateFileDownloadSpeed({'downloadId':_0x5865b1,'speed':0x0}));continue;}const {value:_0x4895a1,done:_0x2426eb}=_0x2e40eb||{};if(_0x2426eb){const _0x206923=yield select(getUIAppActive),_0x3f76b5=yield select(getPreferencesNotificationsAlerts),_0x432642=yield select(getFileDownloadsOpen);if(!_0x432642)yield put(toggleFileDownloads(!![]));yield put(updateFileDownloadSpeed({'downloadId':_0x5865b1,'speed':0x0})),yield put(userCustomNotification({'appActive':_0x206923,'code':NOTIFICATION_CODE[_0x585d64(_0x242a32._0x4aa494,0x4b,0x44,_0x242a32._0x3a1749)+'OAD_FINISH'+'ED'],'fileName':_0x3d4e52,'notifyByBanner':![],'notifyByPush':_0x3f76b5[_0x4531d3(_0x242a32._0x3d1f7a,_0x242a32._0x5776d5,_0x242a32._0x64eb97,0x93)](NOTIFICATIONS_ALERT_TYPES[_0x4531d3(0x5a,_0x242a32._0x3ea5f1,0x5d,0x79)]),'notifyBySound':_0x3f76b5[_0x4531d3(0xa6,_0x242a32._0x464f18,0x96,_0x242a32._0xc34fd7)](NOTIFICATIONS_ALERT_TYPES[_0x4531d3(_0x242a32._0x243fd0,0x96,_0x242a32._0x124d66,_0x242a32._0x34821c)])}));break;}_0xc16ada+=_0x4895a1[_0x585d64(_0x242a32._0x2ff6f2,_0x242a32._0x3322ef,0x4a,_0x242a32._0x20fec6)],_0x3fefd4+=0x1*0x212f+0x2*-0xcd+-0x1f94;!_0x583ab0['write'](_0x4895a1)&&(yield new Promise(_0x24a54f=>{function _0x229b7f(_0x3b2624,_0x1acadd,_0x481c72,_0x12786d){return _0x4531d3(_0x3b2624-_0x34f5de._0x3ba3bb,_0x1acadd-_0x34f5de._0x297463,_0x481c72,_0x3b2624-_0x34f5de._0x501668);}function _0x1d90ae(_0x549bb7,_0x3ffd55,_0x40d971,_0x570a5c){return _0x4531d3(_0x549bb7-_0x406e5f._0x4ff0a1,_0x3ffd55-_0x406e5f._0x308c10,_0x40d971,_0x549bb7-_0x406e5f._0x44d4c9);}_0x583ab0[_0x1d90ae(_0x13a80c._0x49a5b5,_0x13a80c._0x37712e,_0x13a80c._0x432d30,_0x13a80c._0x93fa0c)](_0x229b7f(0x1d2,_0x13a80c._0x37947e,_0x13a80c._0x22c975,_0x13a80c._0x5ca37c),_0x24a54f);}));(_0x3fefd4%SMOOTH_CHUNK_PROGRESS===0x15d6+0x44*-0x78+-0xa*-0x101||_0xc16ada>=_0x1340b7)&&(yield put(updateFileDownloadProgress({'downloadId':_0x5865b1,'byteProgress':_0xc16ada})));const _0x14bd30=Date[_0x585d64(_0x242a32._0x2a659e,_0x242a32._0x55105b,_0x242a32._0x5b2217,_0x242a32._0x316b0f)]();if(_0x14bd30-_0x50ba78>=0x1314+-0x16ff+-0x7d3*-0x1){const _0x5c92e4=(_0x14bd30-_0x50ba78)/(-0x1cfd+0x926+-0x17bf*-0x1),_0x1f4369=_0xc16ada-_0x17f44b;_0x50ba78=_0x14bd30,_0x17f44b=_0xc16ada;const _0x5d0341=_0x1f4369/_0x5c92e4;yield put(updateFileDownloadSpeed({'downloadId':_0x5865b1,'speed':_0x5d0341}));}}}catch(_0x3bdc64){console['error'](_0x3bdc64),yield put(setFileDownloadError({'downloadId':_0x5865b1,'error':_0x3bdc64[_0x585d64(_0x242a32._0x2afedc,0x46,_0x242a32._0x237de5,_0x242a32._0x5b6355)]}));}finally{_0x583ab0?.[_0x4531d3(_0x242a32._0x4dcd33,_0x242a32._0xc45183,_0x242a32._0x58a9dc,_0x242a32._0x17c2ba)]&&(yield put(setFileDownloadError({'downloadId':_0x5865b1,'error':_0x4531d3(_0x242a32._0x766958,_0x242a32._0x1c19f3,_0x242a32._0x28599d,0x9b)+'write\x20to\x20f'+_0x4531d3(_0x242a32._0x114374,_0x242a32._0x1e7f6d,_0x242a32._0x26b195,0x6e)}))),_0x51d371?.[_0x4531d3(_0x242a32._0x45ffe6,_0x242a32._0x26761e,_0x242a32._0x1dceaa,_0x242a32._0x1d03a8)](),_0x583ab0?.['end'](),delete _0x2b062a[_0x5865b1];}}function*_0x58119f(_0x4149ac){const _0x145948={_0x5240f9:0x6a,_0x391cf9:0x1f0},_0xafe3ca={_0x3564c5:0xf,_0x4d8d2f:0x1de};let _0xf0ae11=[];function _0x197639(_0x392db3,_0x5af090,_0x4997e2,_0x1c6467){return _0x250f5d(_0x5af090,_0x392db3-_0xafe3ca._0x3564c5,_0x4997e2-_0xafe3ca._0x4d8d2f,_0x1c6467-0x160);}const _0x1c11ff=yield select(getFileDownloadsNextId);if(addFileDownloadCmd[_0x197639(_0x2fb23c._0x3d8f98,_0x2fb23c._0x375237,0x2d7,_0x2fb23c._0x49128b)](_0x4149ac))_0xf0ae11=[_0x4149ac['payload'][_0x197639(_0x2fb23c._0x14bf0f,_0x2fb23c._0x1c1b8e,_0x2fb23c._0x368760,_0x2fb23c._0x5dd9d0)]];else{if(addFileListDownloadCmd[_0x197639(_0x2fb23c._0x3e1af8,_0x2fb23c._0x86ca7c,0x2e3,_0x2fb23c._0x31c5f3)](_0x4149ac))_0xf0ae11=_0x4149ac[_0x3b606e(_0x2fb23c._0x551cb5,_0x2fb23c._0x162f9c,_0x2fb23c._0x3b004e,0x335)]['fileIds'];else return;}if(_0xf0ae11[_0x3b606e(_0x2fb23c._0x3572bb,_0x2fb23c._0x10baf8,_0x2fb23c._0x41b28f,_0x2fb23c._0x125d28)]===0x11*-0xb3+0x1b*0x139+-0x2a4*0x8)return;let _0x30664d=_0x1c11ff;function _0x3b606e(_0x13e898,_0x2a2eeb,_0x33cc59,_0x11d758){return _0x250f5d(_0x2a2eeb,_0x11d758-_0x145948._0x5240f9,_0x33cc59-_0x145948._0x391cf9,_0x11d758-0x19d);}const _0x912d69=[];for(const _0x2a5c1c of _0xf0ae11){const _0x323c44=yield select(getFileEntryById,_0x2a5c1c);if(!_0x323c44)continue;_0x912d69[_0x197639(_0x2fb23c._0x35109c,_0x2fb23c._0x3e8082,_0x2fb23c._0x5d3fdc,_0x2fb23c._0x4d6c83)]({'fileId':_0x2a5c1c,'fileEntry':_0x323c44,'downloadId':_0x30664d}),_0x30664d+=-0x22e9+-0x1f50+0x4bb*0xe;}yield put(savePendingDownloadedFiles({'files':_0x912d69,'roomId':_0x4149ac[_0x3b606e(_0x2fb23c._0xea0539,0x341,_0x2fb23c._0x116664,_0x2fb23c._0x116664)][_0x3b606e(0x348,_0x2fb23c._0x3f9f09,_0x2fb23c._0x1db655,_0x2fb23c._0xf251d0)],'lastDownloadId':_0x30664d}));for(const _0x2f78ee of _0x912d69){!(_0x2f78ee[_0x197639(_0x2fb23c._0x134e91,0x2c9,0x2d1,_0x2fb23c._0x395b57)]in _0x2b062a)&&(_0x2b062a[_0x2f78ee[_0x197639(_0x2fb23c._0x298cca,_0x2fb23c._0x375237,_0x2fb23c._0x11a7d8,0x2d4)]]=yield fork(_0x145aa1,{'downloadId':_0x2f78ee['downloadId'],'name':_0x2f78ee[_0x197639(0x2e3,_0x2fb23c._0x905678,0x2e7,_0x2fb23c._0x961cf2)][_0x3b606e(_0x2fb23c._0x1a1365,_0x2fb23c._0x5bb3e5,0x326,_0x2fb23c._0x45d211)],'httpLink':_0x2f78ee[_0x197639(_0x2fb23c._0x4ed025,_0x2fb23c._0x498203,_0x2fb23c._0x47151d,_0x2fb23c._0x1a6f1f)][_0x197639(_0x2fb23c._0x2a0627,_0x2fb23c._0x137dcb,_0x2fb23c._0x471d64,_0x2fb23c._0x1d9347)],'byteLength':_0x2f78ee[_0x3b606e(_0x2fb23c._0x405ea8,0x33c,_0x2fb23c._0x145157,0x33e)]['byteLength']}));}}function _0x2b45ec({payload:_0x4323bd}){_0x2b062a[_0x4323bd]?.['cancel'](),delete _0x2b062a[_0x4323bd];}function*_0x12ff11(){const _0x4c4eef={_0x536c78:0x1ed,_0x577824:0x84,_0x1d516f:0xa5};function _0x4873ed(_0x2e454b,_0x2d09c6,_0x2bb517,_0x15e1cd){return _0x250f5d(_0x2d09c6,_0x15e1cd- -0x26e,_0x2bb517-_0xba33d7._0x29014a,_0x15e1cd-0x1c);}function _0x1379c6(_0xef718a,_0x2f8745,_0x106343,_0x28d3af){return _0x250f5d(_0x28d3af,_0xef718a- -_0x4c4eef._0x536c78,_0x106343-_0x4c4eef._0x577824,_0x28d3af-_0x4c4eef._0x1d516f);}try{const _0x5b1a01={'darwin':_0x1379c6(0xe6,_0x4fb9f7._0x25a995,_0x4fb9f7._0x44c9f6,_0x4fb9f7._0x120735),'win32':_0x4873ed(0x57,0x77,_0x4fb9f7._0x590ded,0x6a)}[process[_0x4873ed(_0x4fb9f7._0x323c3d,_0x4fb9f7._0x18f970,_0x4fb9f7._0x10d566,_0x4fb9f7._0x41e012)]]||_0x1379c6(_0x4fb9f7._0x5ec2e6,_0x4fb9f7._0x1969a1,0xa0,_0x4fb9f7._0xe56637);yield _0x1d91a0['execSync'](_0x5b1a01+'\x20\x22'+_0x3e0e76+'\x22');}catch(_0x22e9af){console[_0x4873ed(_0x4fb9f7._0x377e44,_0x4fb9f7._0x28e1b0,_0x4fb9f7._0xd42277,_0x4fb9f7._0x2a6638)]('Can\x27t\x20open'+'\x20'+_0x3e0e76,_0x22e9af);}}yield takeEvery([addFileDownloadCmd,addFileListDownloadCmd],_0x58119f),yield takeLeading(openFileDownloadFolder,_0x12ff11),yield takeLeading(removeFileDownload,_0x2b45ec);}