UNPKG

@e-techsolutions/e-baas-sdk

Version:

Official E-BaaS TypeScript SDK - Backend as a Service client library

1 lines 77.2 kB
'use strict';(function(stringArrayFunction,comparisonValue){const stringArray=stringArrayFunction();function _0x1ce845(_0x2de47c,_0x3b7bc8){return _0x4da2(_0x3b7bc8- -0x183,_0x2de47c);}while(!![]){try{const _0x5214f1=parseInt(_0x1ce845(0x155,0x16e))/0x1+-parseInt(_0x1ce845(0xd,0x84))/0x2*(-parseInt(_0x1ce845(0x74,0x71))/0x3)+-parseInt(_0x1ce845(0xaa,0xa6))/0x4+parseInt(_0x1ce845(0x148,0x13c))/0x5+parseInt(_0x1ce845(0xaf,0xed))/0x6+-parseInt(_0x1ce845(0x47,0x97))/0x7+-parseInt(_0x1ce845(0x15c,0x13d))/0x8;if(_0x5214f1===comparisonValue)break;else stringArray['push'](stringArray['shift']());}catch(_0x3c5f31){stringArray['push'](stringArray['shift']());}}}(_0x39f8,0x1c638));var axios=require(_0x347d1c(-0x104,-0x161));class EBaaSError extends Error{constructor(_0x10f038,status=0x0,_0x2bdc15){super(_0x10f038),this[_0xc1c899(0x3a5,0x3d3)]=_0xc1c899(0x382,0x3f7),this['status']=status;function _0xc1c899(_0x2c6972,_0x1adc51){return _0x4da2(_0x2c6972-0xbc,_0x1adc51);}this['details']=_0x2bdc15,Error[_0xc1c899(0x395,0x39a)]&&Error[_0xc1c899(0x395,0x3b9)](this,EBaaSError);}[_0x347d1c(-0x44,-0xa8)](){function _0x579ec6(_0x472a60,_0x422bd3){return _0x4da2(_0x422bd3-0x255,_0x472a60);}return{'name':this[_0x579ec6(0x52e,0x53e)],'message':this['message'],'status':this['status'],'details':this['details'],'stack':this['stack']};}[_0x347d1c(-0xfb,-0x110)](){function _0x5b692f(_0x7455a9,_0x55739f){return _0x4da2(_0x55739f- -0x2c5,_0x7455a9);}return this['name']+':\x20'+this[_0x5b692f(0x4a,-0x9)]+'\x20(Status:\x20'+this[_0x5b692f(-0x14a,-0xc1)]+')';}}class HttpClient{constructor(config){this['baseURL']=config['url'],this[_0x560215(0x138,0x196)]=config[_0x560215(0x1fc,0x196)],this[_0x560215(0x22c,0x25a)]=axios[_0x560215(0x1eb,0x223)]({'baseURL':this['baseURL'],'timeout':config['timeout']||0x2710,'headers':{'Content-Type':'application/json','apikey':this[_0x560215(0x18d,0x196)],...config['headers']}});function _0x560215(_0x47a710,_0x5a2472){return _0x4da2(_0x5a2472- -0x56,_0x47a710);}this[_0x560215(0x20d,0x1f9)]();}['setupInterceptors'](){function _0x4d8a55(_0x3a4b66,_0x34f415){return _0x4da2(_0x34f415- -0x313,_0x3a4b66);}this['client']['interceptors'][_0x4d8a55(0x36,-0x30)][_0x4d8a55(-0xf0,-0xdd)](config=>{return config;},_0x32cfaf=>{function _0x5443fb(_0x2a4600,_0xc89296){return _0x4da2(_0x2a4600- -0x9,_0xc89296);}return Promise['reject'](new EBaaSError(_0x5443fb(0x234,0x249),0x0,_0x32cfaf));}),this['client'][_0x4d8a55(0x5,-0x49)]['response']['use'](response=>{return response;},_0x55abfb=>{const status=_0x55abfb[_0x4f0201(0x486,0x502)]?.['status']||0x0,_0x32fd56=_0x55abfb['response']?.['data']?.['message']||_0x55abfb['message']||'Unknown\x20error';function _0x4f0201(_0x3b4118,_0x129ea7){return _0x4da2(_0x3b4118-0x215,_0x129ea7);}const _0x2c2b64=_0x55abfb['response']?.[_0x4f0201(0x444,0x4ac)]||_0x55abfb;return Promise[_0x4f0201(0x427,0x48a)](new EBaaSError(_0x32fd56,status,_0x2c2b64));});}async['get'](_0x273d4c,config){function _0x751f87(_0x52571f,_0x289f50){return _0x4da2(_0x52571f- -0x4d,_0x289f50);}try{const response=await this['client'][_0x751f87(0x2a1,0x2d6)](_0x273d4c,config);return{'data':response[_0x751f87(0x1e2,0x193)],'status':response['status'],'statusText':response[_0x751f87(0x1d6,0x1d2)],'headers':response['headers']};}catch(_0x1d5089){throw this[_0x751f87(0x1b8,0x1a3)](_0x1d5089);}}async[_0x347d1c(-0x77,-0xac)](_0x302d7d,data,config){function _0x129c50(_0x5c206f,_0xa69451){return _0x4da2(_0xa69451- -0x37a,_0x5c206f);}try{const response=await this[_0x129c50(-0x124,-0xca)]['post'](_0x302d7d,data,config);return{'data':response['data'],'status':response['status'],'statusText':response['statusText'],'headers':response[_0x129c50(-0x135,-0x180)]};}catch(_0x4a4919){throw this['handleError'](_0x4a4919);}}async['put'](_0x298578,data,config){function _0xdf1677(_0x104f03,_0x694750){return _0x4da2(_0x694750- -0x243,_0x104f03);}try{const response=await this[_0xdf1677(-0xe,0x6d)]['put'](_0x298578,data,config);return{'data':response[_0xdf1677(0x2b,-0x14)],'status':response[_0xdf1677(0x4d,-0x3f)],'statusText':response[_0xdf1677(0x4e,-0x20)],'headers':response[_0xdf1677(-0xb9,-0x49)]};}catch(_0x4f9adc){throw this['handleError'](_0x4f9adc);}}async[_0x347d1c(-0x1af,-0x172)](_0x1a0b0b,data,config){function _0x4192b8(_0x59235c,_0x568144){return _0x4da2(_0x59235c-0x19f,_0x568144);}try{const response=await this['client']['patch'](_0x1a0b0b,data,config);return{'data':response[_0x4192b8(0x3ce,0x435)],'status':response[_0x4192b8(0x3a3,0x3f4)],'statusText':response[_0x4192b8(0x3c2,0x434)],'headers':response[_0x4192b8(0x399,0x3c7)]};}catch(_0x2d78e7){throw this[_0x4192b8(0x3a4,0x345)](_0x2d78e7);}}async[_0x347d1c(-0x121,-0xcc)](_0x14fdd8,config){function _0x47cf99(_0x273e67,_0x440629){return _0x4da2(_0x273e67- -0x248,_0x440629);}try{const response=await this['client'][_0x47cf99(0x66,0xde)](_0x14fdd8,config);return{'data':response[_0x47cf99(-0x19,-0xa3)],'status':response['status'],'statusText':response[_0x47cf99(-0x25,-0x7)],'headers':response['headers']};}catch(_0x4490e3){throw this['handleError'](_0x4490e3);}}[_0x347d1c(-0x1aa,-0x182)](_0x3b4cf2){function _0x523906(_0x175ea1,_0x57822e){return _0x4da2(_0x175ea1-0x387,_0x57822e);}this[_0x523906(0x637,0x6b3)]['defaults'][_0x523906(0x581,0x5da)][_0x523906(0x584,0x60e)]['Authorization']='Bearer\x20'+_0x3b4cf2;}[_0x347d1c(-0x17c,-0x140)](){function _0x2025f7(_0x58dbbb,_0x181825){return _0x4da2(_0x181825-0x57,_0x58dbbb);}delete this['client'][_0x2025f7(0x309,0x2bb)]['headers']['common']['Authorization'],this['client']['defaults'][_0x2025f7(0x252,0x251)]['common']['Authorization']=_0x2025f7(0x23f,0x256)+this[_0x2025f7(0x283,0x243)];}[_0x347d1c(-0x11a,-0x175)](_0x36d121){if(_0x36d121 instanceof EBaaSError)return _0x36d121;function _0x48f40d(_0x4cf509,_0x5ccfcd){return _0x4da2(_0x5ccfcd-0x13f,_0x4cf509);}return new EBaaSError(_0x36d121[_0x48f40d(0x386,0x3fb)]||_0x48f40d(0x37c,0x34c),_0x36d121[_0x48f40d(0x312,0x343)]||0x0,_0x36d121);}}class AuthClient{constructor(_0x13f2d5,_0x17e455){this['currentSession']=null;function _0x506a69(_0x497108,_0x1f7f46){return _0x4da2(_0x1f7f46-0x199,_0x497108);}this[_0x506a69(0x46b,0x439)]=_0x13f2d5,this['workspaceId']=_0x17e455,this['loadSession']();}async['signUp'](data){function _0x21b0fe(_0x2c860f,_0x1b8195){return _0x4da2(_0x1b8195-0x108,_0x2c860f);}try{const response=await this['httpClient']['post']('/auth/v1/signup',data);return response[_0x21b0fe(0x309,0x337)][_0x21b0fe(0x412,0x3a7)]&&this['setSessionInternal'](response[_0x21b0fe(0x2c7,0x337)]['session']),response[_0x21b0fe(0x37a,0x337)];}catch(_0x5161f0){throw this[_0x21b0fe(0x429,0x3f3)](_0x5161f0);}}async['signIn'](data){function _0x549db0(_0x188d7d,_0x15aeb0){return _0x4da2(_0x188d7d-0x24c,_0x15aeb0);}try{const headers={};this['workspaceId']&&(headers['X-Workspace-ID']=this['workspaceId']);const response=await this[_0x549db0(0x4ec,0x4c4)]['post']('/auth/v1/sdk/signin',data,{'headers':headers});return response['data'][_0x549db0(0x4eb,0x4f7)]&&this[_0x549db0(0x487,0x480)](response['data'][_0x549db0(0x4eb,0x49a)]),response[_0x549db0(0x47b,0x3fd)];}catch(_0x27a86b){throw this['handleAuthError'](_0x27a86b);}}async['signOut'](){function _0xa0e8e4(_0x397c0e,_0xe9eb4a){return _0x4da2(_0xe9eb4a- -0x19a,_0x397c0e);}try{await this['httpClient'][_0xa0e8e4(0x178,0x134)]('/auth/v1/signout'),this[_0xa0e8e4(0xaf,0x59)]();}catch(_0x5e4a23){this[_0xa0e8e4(-0x16,0x59)]();throw this['handleAuthError'](_0x5e4a23);}}async['getUser'](){if(!this[_0x1801ef(0x2f1,0x2c0)]?.[_0x1801ef(0x2c7,0x2cc)])return null;function _0x1801ef(_0x436155,_0x2196bf){return _0x4da2(_0x2196bf-0x66,_0x436155);}try{const response=await this[_0x1801ef(0x33b,0x306)][_0x1801ef(0x2ef,0x354)]('/auth/v1/user');return response['data'][_0x1801ef(0x26d,0x28a)];}catch(_0x2f86dc){if(_0x2f86dc instanceof EBaaSError&&_0x2f86dc['status']===0x191)return this['clearSession'](),null;throw this['handleAuthError'](_0x2f86dc);}}async['refreshSession'](){if(!this[_0x2f060c(0x483,0x3fe)]?.[_0x2f060c(0x462,0x41f)])return null;function _0x2f060c(_0x24059a,_0x40cc52){return _0x4da2(_0x40cc52-0x1a4,_0x24059a);}try{const response=await this[_0x2f060c(0x488,0x444)][_0x2f060c(0x40c,0x472)]('/auth/v1/refresh',{'refresh_token':this[_0x2f060c(0x3fc,0x3fe)]['refresh_token']});if(response[_0x2f060c(0x44d,0x3d3)]['session'])return this['setSession'](response['data']['session']),response['data']['session'];return null;}catch(_0x3d8f79){this['clearSession']();throw this['handleAuthError'](_0x3d8f79);}}async[_0x347d1c(-0x1e2,-0x164)](_0x41fafa){try{await this['httpClient']['post']('/auth/v1/reset-password',{'email':_0x41fafa});}catch(_0x56046d){throw this['handleAuthError'](_0x56046d);}}async['updateUser'](data){function _0x2c3f79(_0x581cf0,_0x3683f8){return _0x4da2(_0x3683f8-0x30,_0x581cf0);}try{const response=await this[_0x2c3f79(0x2a3,0x2d0)]['put']('/auth/v1/user',data);return response['data']['user'];}catch(_0x281f9a){throw this['handleAuthError'](_0x281f9a);}}[_0x347d1c(-0x18d,-0x12a)](){function _0x4d4900(_0x39a42d,_0xcef37f){return _0x4da2(_0x39a42d- -0x221,_0xcef37f);}return this[_0x4d4900(0x39,-0x6)];}[_0x347d1c(-0xe2,-0x11d)](_0x29b8ef){function _0x19cefb(_0x1bb1aa,_0x193b45){return _0x4da2(_0x193b45-0x323,_0x1bb1aa);}this['currentSession']=_0x29b8ef,this[_0x19cefb(0x5cf,0x5c3)][_0x19cefb(0x57e,0x51b)](_0x29b8ef[_0x19cefb(0x501,0x589)]),typeof localStorage!==_0x19cefb(0x605,0x5f9)&&localStorage[_0x19cefb(0x53f,0x5b0)](_0x19cefb(0x589,0x554),JSON[_0x19cefb(0x554,0x5c1)](_0x29b8ef));}['onAuthStateChange'](_0x3aea52){return()=>{};}[_0x347d1c(-0x39,-0x95)](_0x144442){function _0x19b76c(_0x32a6fe,_0x137d99){return _0x4da2(_0x137d99- -0xe,_0x32a6fe);}this[_0x19b76c(0x258,0x29b)]=_0x144442;}[_0x347d1c(-0x16c,-0x13f)](_0x45251c){function _0x3bee88(_0x4df9b4,_0x4e2f7f){return _0x4da2(_0x4e2f7f-0x2a6,_0x4df9b4);}this['currentSession']=_0x45251c,this['httpClient'][_0x3bee88(0x4fb,0x49e)](_0x45251c[_0x3bee88(0x528,0x50c)]),typeof localStorage!==_0x3bee88(0x58f,0x57c)&&localStorage['setItem'](_0x3bee88(0x543,0x4d7),JSON['stringify'](_0x45251c));}[_0x347d1c(-0x1eb,-0x187)](){this['currentSession']=null;function _0x4e8854(_0x20f2b0,_0x3db7ae){return _0x4da2(_0x3db7ae- -0x2d9,_0x20f2b0);}this[_0x4e8854(-0x29,-0x39)]['removeAuthToken'](),typeof localStorage!==_0x4e8854(-0x57,-0x3)&&localStorage['removeItem'](_0x4e8854(-0xd4,-0xa8));}[_0x347d1c(-0x117,-0x171)](){function _0x1a73d4(_0xb882c8,_0x321617){return _0x4da2(_0xb882c8-0x22c,_0x321617);}if(typeof localStorage!==_0x1a73d4(0x502,0x543)){const _0x1d4207=localStorage[_0x1a73d4(0x43f,0x457)]('ebaas.auth.session');if(_0x1d4207)try{const _0x3d7219=JSON['parse'](_0x1d4207);this[_0x1a73d4(0x467,0x448)](_0x3d7219);}catch(_0x2f307f){this[_0x1a73d4(0x41f,0x3de)]();}}}[_0x347d1c(-0xcc,-0x8f)](_0x6baf90){function _0x20958b(_0x2d9f8a,_0x1e9151){return _0x4da2(_0x1e9151- -0x381,_0x2d9f8a);}if(_0x6baf90 instanceof EBaaSError)return _0x6baf90;return new EBaaSError(_0x6baf90[_0x20958b(-0xa0,-0xc5)]||'Authentication\x20failed',_0x6baf90['status']||0x0,_0x6baf90);}}class QueryBuilder{constructor(_0x5e64eb,_0x1c718c,_0x5c56de,_0x2c6d12){this['httpClient']=_0x5e64eb,this[_0x4eba93(0x2b0,0x2a5)]=_0x1c718c,this[_0x4eba93(0x262,0x251)]=_0x5c56de,this[_0x4eba93(0x28c,0x208)]=_0x2c6d12;function _0x4eba93(_0x1356dc,_0x1271b9){return _0x4da2(_0x1356dc- -0x1d,_0x1271b9);}this['query']={'filters':[]};}[_0x347d1c(-0xc2,-0xe8)](_0x48584a='*',_0x307ac9){return this['query']['select']=_0x48584a,this;}['insert'](data,_0x4b8db6){return this['executeQuery']('POST','/sdk/v1/'+this['table']+'?operation=insert',{'data':data,'options':_0x4b8db6});}[_0x347d1c(-0x111,-0x18f)](data,_0x538343){function _0x57571d(_0x5adeca,_0x227996){return _0x4da2(_0x227996- -0x346,_0x5adeca);}return this[_0x57571d(-0x9d,-0x71)][_0x57571d(-0x12f,-0xe7)]=data,this[_0x57571d(-0xdc,-0x71)][_0x57571d(-0x185,-0x158)]=_0x538343,this;}[_0x347d1c(-0xfc,-0xde)](data,_0x2455a0){function _0x19a1b3(_0x313c14,_0x142b20){return _0x4da2(_0x142b20- -0xd9,_0x313c14);}return this['executeQuery']('POST','/sdk/v1/'+this[_0x19a1b3(0x20f,0x1f4)]+'?operation=upsert',{'data':data,'options':{..._0x2455a0,'upsert':!![]}});}[_0x347d1c(-0xe9,-0xcc)](_0x2d8268){this[_0x13a751(0x27f,0x207)][_0x13a751(0x194,0x1e6)]=_0x2d8268,this['query']['isDelete']=!![];function _0x13a751(_0x54276b,_0x4b0d9d){return _0x4da2(_0x4b0d9d- -0xce,_0x54276b);}return this;}['eq'](_0x369da7,_0x10430e){this[_0x472bd2(0x587,0x5ab)][_0x472bd2(0x529,0x52a)][_0x472bd2(0x4fd,0x567)]({'column':_0x369da7,'operator':'eq','value':_0x10430e});function _0x472bd2(_0x54ad73,_0x38cbc1){return _0x4da2(_0x38cbc1-0x2d6,_0x54ad73);}return this;}[_0x347d1c(-0xd6,-0x8a)](_0x436bc2,_0x90c880){this['query'][_0x22c2f4(-0xb0,-0x131)]['push']({'column':_0x436bc2,'operator':'neq','value':_0x90c880});function _0x22c2f4(_0x4b32c8,_0x36553c){return _0x4da2(_0x36553c- -0x385,_0x4b32c8);}return this;}['gt'](_0x33fcb5,_0x100d35){function _0x135b32(_0x11bd1d,_0x6e0baf){return _0x4da2(_0x6e0baf-0x1d9,_0x11bd1d);}return this['query']['filters'][_0x135b32(0x475,0x46a)]({'column':_0x33fcb5,'operator':'gt','value':_0x100d35}),this;}['gte'](_0x13e68e,_0x4d76a5){this['query'][_0x3590ce(0x162,0x1de)][_0x3590ce(0x281,0x21b)]({'column':_0x13e68e,'operator':_0x3590ce(0x1c9,0x1c9),'value':_0x4d76a5});function _0x3590ce(_0x4c94e5,_0x4c7ac4){return _0x4da2(_0x4c7ac4- -0x76,_0x4c94e5);}return this;}['lt'](_0x128adc,_0x125bf6){this[_0x17281f(0x551,0x50b)][_0x17281f(0x4d0,0x541)]['push']({'column':_0x128adc,'operator':'lt','value':_0x125bf6});function _0x17281f(_0x1195c8,_0x4372b1){return _0x4da2(_0x1195c8-0x27c,_0x4372b1);}return this;}[_0x347d1c(-0x98,-0xe3)](_0x377eaa,_0x162a29){function _0x29c5f8(_0x413741,_0x2b52cc){return _0x4da2(_0x2b52cc-0x2fb,_0x413741);}return this[_0x29c5f8(0x552,0x5d0)]['filters']['push']({'column':_0x377eaa,'operator':'lte','value':_0x162a29}),this;}['like'](_0x2f1905,_0x4e320e){this['query'][_0x509996(-0x56,-0x71)][_0x509996(-0x19,-0x83)]({'column':_0x2f1905,'operator':_0x509996(-0x64,0x1b),'value':_0x4e320e});function _0x509996(_0xc0b8c3,_0x52f239){return _0x4da2(_0xc0b8c3- -0x2aa,_0x52f239);}return this;}[_0x347d1c(-0x178,-0x13c)](_0x45d735,_0x1b6cbf){return this['query']['filters']['push']({'column':_0x45d735,'operator':'ilike','value':_0x1b6cbf}),this;}['is'](_0x58b65f,_0x256537){this[_0x124f13(0x76,0x53)]['filters']['push']({'column':_0x58b65f,'operator':'is','value':_0x256537});function _0x124f13(_0x3600bb,_0x580011){return _0x4da2(_0x3600bb- -0x25f,_0x580011);}return this;}['in'](_0x153d99,_0x394efe){this['query'][_0x1dfd88(0x3c,0x76)]['push']({'column':_0x153d99,'operator':'in','value':_0x394efe});function _0x1dfd88(_0x12091e,_0x358d6e){return _0x4da2(_0x12091e- -0x218,_0x358d6e);}return this;}[_0x347d1c(-0xf9,-0x87)](_0x105275,_0xbedd54){this[_0x56a46a(0x19c,0x174)][_0x56a46a(0x11a,0xf3)]['push']({'column':_0x105275,'operator':'contains','value':_0xbedd54});function _0x56a46a(_0x24e5e3,_0x290930){return _0x4da2(_0x290930- -0x161,_0x24e5e3);}return this;}['match'](_0x4baaed){function _0x48b66d(_0x3747a0,_0x485ed7){return _0x4da2(_0x485ed7-0x74,_0x3747a0);}return Object[_0x48b66d(0x2cc,0x2db)](_0x4baaed)['forEach'](([_0x3fbb88,_0x268bab])=>{this['eq'](_0x3fbb88,_0x268bab);}),this;}['order'](_0x3a5f58,_0x12ba10){function _0xffbc3c(_0x2b1e5f,_0x512cb7){return _0x4da2(_0x512cb7-0x19b,_0x2b1e5f);}return!this[_0xffbc3c(0x4a0,0x470)]['order']&&(this[_0xffbc3c(0x455,0x470)]['order']=[]),this['query']['order']['push']({'column':_0x3a5f58,'ascending':_0x12ba10?.[_0xffbc3c(0x3f3,0x38a)]!==![]}),this;}['limit'](count){function _0x2ec6c0(_0x227bf3,_0x6a8a01){return _0x4da2(_0x6a8a01- -0x1cf,_0x227bf3);}return this[_0x2ec6c0(0x8c,0x106)]['limit']=count,this;}[_0x347d1c(-0x1cb,-0x17c)](from,_0x438054){return this['query']['range']={'from':from,'to':_0x438054},this;}async[_0x347d1c(-0xe2,-0xfc)](){function _0x42e57f(_0x1b8049,_0x2207fb){return _0x4da2(_0x1b8049-0x303,_0x2207fb);}if(this['query'][_0x42e57f(0x562,0x53b)])return this['executeQuery']('PATCH','/sdk/v1/'+this[_0x42e57f(0x5d0,0x5c5)],{'data':this['query']['updateData'],'options':this[_0x42e57f(0x5d8,0x638)][_0x42e57f(0x4f1,0x479)],'filters':this['query']['filters']});else return this['query'][_0x42e57f(0x548,0x4ef)]?this['executeQuery']('DELETE','/sdk/v1/'+this['table']+_0x42e57f(0x556,0x51c),{'options':this['query']['deleteOptions'],'filters':this[_0x42e57f(0x5d8,0x64a)]['filters']}):this[_0x42e57f(0x57a,0x541)]('GET','/sdk/v1/'+this[_0x42e57f(0x5d0,0x5dc)]+'?operation=select',{'select':this['query'][_0x42e57f(0x595,0x5e8)],'filters':this['query'][_0x42e57f(0x557,0x529)],'order':this['query'][_0x42e57f(0x55f,0x5cd)],'limit':this[_0x42e57f(0x5d8,0x602)]['limit'],'range':this['query'][_0x42e57f(0x501,0x566)]});}async['single'](){this['limit'](0x1);function _0x4dfaf5(_0x482014,_0x48a72d){return _0x4da2(_0x482014-0x3e,_0x48a72d);}const result=await this[_0x4dfaf5(0x2bc,0x274)]();return{'data':result['data']?.[0x0]||null,'error':result['error']};}async['executeQuery'](_0x48f0e3,_0x4b71b0,_0xee62e2){function _0x19f7cb(_0x34c6c4,_0x257492){return _0x4da2(_0x257492- -0x210,_0x34c6c4);}try{let response;const headers={};this[_0x19f7cb(0x116,0x99)]&&(headers['x-workspace-id']=this[_0x19f7cb(0xa6,0x99)]);if(_0x48f0e3==='GET'){const _0x5d9b4e=_0x4b71b0[_0x19f7cb(-0x2,0x64)]('?'),_0x403577=_0x5d9b4e[0x0],existingParams=new URLSearchParams(_0x5d9b4e[0x1]||'');if(_0xee62e2[_0x19f7cb(0x55,0x82)])existingParams['append']('select',_0xee62e2[_0x19f7cb(0x33,0x82)]);_0xee62e2['filters']?.[_0x19f7cb(0xc5,0x74)]&&_0xee62e2['filters']['forEach'](filter=>{function _0x424189(_0x469a48,_0x3a58a7){return _0x4da2(_0x469a48-0x40,_0x3a58a7);}existingParams['append'](filter[_0x424189(0x301,0x362)],filter[_0x424189(0x24e,0x23d)]+'.'+filter[_0x424189(0x24a,0x2cd)]);});if(_0xee62e2['order']?.[_0x19f7cb(0xe7,0x74)]){const orderStr=_0xee62e2['order']['map'](_0x445c1e=>''+_0x445c1e[_0x19f7cb(0xed,0xb1)]+(_0x445c1e['ascending']?'.asc':_0x19f7cb(0xb1,0x4b)))['join'](',');existingParams['append']('order',orderStr);}if(_0xee62e2[_0x19f7cb(0x134,0xcf)])existingParams[_0x19f7cb(0x19,0x9b)](_0x19f7cb(0xc3,0xcf),_0xee62e2[_0x19f7cb(0x13b,0xcf)]['toString']());_0xee62e2['range']&&(existingParams[_0x19f7cb(0xbb,0x9b)]('offset',_0xee62e2['range'][_0x19f7cb(0xd3,0xef)]['toString']()),existingParams[_0x19f7cb(0x1d,0x9b)]('limit',(_0xee62e2[_0x19f7cb(-0xe,-0x12)]['to']-_0xee62e2['range']['from']+0x1)[_0x19f7cb(0x99,0x5a)]())),response=await this[_0x19f7cb(0xc0,0x90)][_0x19f7cb(0xcf,0xde)](_0x403577+'?'+existingParams[_0x19f7cb(0xd3,0x5a)](),{'headers':headers});}else{if(_0x48f0e3==='DELETE'){const _0x3023eb=_0x4b71b0[_0x19f7cb(0xd3,0x64)]('?'),_0x50b941=_0x3023eb[0x0],existingParams=new URLSearchParams(_0x3023eb[0x1]||'');!existingParams[_0x19f7cb(0xb1,0xd8)]('operation')&&existingParams[_0x19f7cb(0xe0,0x9b)]('operation','delete');_0xee62e2['filters']?.[_0x19f7cb(-0x16,0x74)]&&_0xee62e2['filters'][_0x19f7cb(0x53,0x10)](filter=>{function _0x5b11a1(_0x4c974a,_0x4ae7c8){return _0x4da2(_0x4c974a- -0x47,_0x4ae7c8);}existingParams['append'](filter[_0x5b11a1(0x27a,0x2db)],filter[_0x5b11a1(0x1c7,0x1e0)]+'.'+filter['value']);});const deleteUrl=_0x50b941+'?'+existingParams[_0x19f7cb(0x62,0x5a)]();console['log']('\uD83D\uDD27 DELETE URL construída:',deleteUrl),console[_0x19f7cb(0x92,0x6a)]('\uD83D\uDD27 DELETE headers:',headers),console[_0x19f7cb(0x77,0x6a)]('\uD83D\uDD27 DELETE filtros originais:',_0xee62e2[_0x19f7cb(0x87,0x44)]),response=await this['httpClient'][_0x19f7cb(0x11a,0x9e)](deleteUrl,{'headers':headers});}else{if(_0x48f0e3==='PATCH'){const _0x131e9f=_0x4b71b0['split']('?'),_0x10f53c=_0x131e9f[0x0],existingParams=new URLSearchParams(_0x131e9f[0x1]||'');!existingParams['has'](_0x19f7cb(0xde,0x83))&&existingParams['append'](_0x19f7cb(0x42,0x83),'update');_0xee62e2['filters']?.['length']&&_0xee62e2['filters']['forEach'](filter=>{function _0xe5713a(_0x3697b4,_0x313cc8){return _0x4da2(_0x313cc8-0x3c7,_0x3697b4);}existingParams['append'](filter['column'],filter[_0xe5713a(0x591,0x5d5)]+'.'+filter['value']);});_0xee62e2['options']?.[_0x19f7cb(0xf9,0x9d)]&&(headers[_0x19f7cb(-0x2e,0x39)]=_0xee62e2[_0x19f7cb(0x34,0xb8)]['prefer']);const updateUrl=_0x10f53c+'?'+existingParams['toString']();response=await this[_0x19f7cb(0x2b,0x90)]['patch'](updateUrl,_0xee62e2[_0x19f7cb(-0x2f,0x1f)],{'headers':headers});}else{let _0x5c0183=_0xee62e2[_0x19f7cb(0x9a,0x1f)];!headers['Prefer']&&(headers['Prefer']='return=representation'),_0xee62e2[_0x19f7cb(0x42,0xb8)]?.['upsert']&&(headers['Prefer']='resolution=merge-duplicates,return=representation'),_0xee62e2['dataArray']&&(_0x5c0183=_0xee62e2[_0x19f7cb(0xc4,0xa1)]),response=await this['httpClient'][_0x19f7cb(0x12e,0xbe)](_0x4b71b0,_0x5c0183,{'headers':headers});}}}return{'data':response['data'],'error':null,'count':response[_0x19f7cb(-0x2f,-0x16)]?.['x-total-count']?parseInt(response[_0x19f7cb(-0x88,-0x16)]['x-total-count']):undefined};}catch(_0x252d04){return{'data':null,'error':_0x252d04 instanceof EBaaSError?_0x252d04:new EBaaSError(_0x252d04 instanceof Error?_0x252d04['message']:_0x19f7cb(0x7c,0x77),0x0,_0x252d04)};}}}function _0x347d1c(_0x3ae3e3,_0x175749){return _0x4da2(_0x175749- -0x37a,_0x3ae3e3);}class CustomDatabaseManager{constructor(_0x19e708,_0x227194){this[_0xa8ed0a(0x3a4,0x363)]=_0x19e708;function _0xa8ed0a(_0x2a095c,_0x50f902){return _0x4da2(_0x50f902-0xc3,_0x2a095c);}this[_0xa8ed0a(0x340,0x36c)]=_0x227194;}async[_0x347d1c(-0xc6,-0x14c)](){if(!this[_0x229fb8(0x2a0,0x240)])return{'hasCustomDatabase':![]};function _0x229fb8(_0x5edbd0,_0x333b6a){return _0x4da2(_0x333b6a- -0x69,_0x5edbd0);}try{const response=await this[_0x229fb8(0x252,0x237)][_0x229fb8(0x220,0x285)]('/admin/v1/workspace/custom-database',{'headers':{'x-workspace-id':this['workspaceId']}});if(response['status']===0xc8&&response[_0x229fb8(0x1fd,0x1c6)]?.[_0x229fb8(0x16c,0x1db)]){const config=response['data'][_0x229fb8(0x246,0x1db)],_0xbf5c1e={'host':config[_0x229fb8(0x25a,0x28f)],'port':config['postgresPort'],'database':config['postgresDatabase'],'username':config[_0x229fb8(0x1fc,0x1ee)],'password':'','schema':config[_0x229fb8(0x254,0x1d3)],'sslEnabled':config['sslEnabled']};return this['detectedConfig']={'hasCustomDatabase':!![],'config':config,'credentials':_0xbf5c1e},this['detectedConfig'];}}catch(_0x6e1bd7){if(_0x6e1bd7?.['status']===0x194)return this[_0x229fb8(0x104,0x184)]={'hasCustomDatabase':![]},this[_0x229fb8(0x1e4,0x184)];console['warn']('Failed to detect custom database configuration:',_0x6e1bd7);}return this['detectedConfig']={'hasCustomDatabase':![]},this[_0x229fb8(0x210,0x184)];}async[_0x347d1c(-0x1cc,-0x14e)](_0x57f679){function _0x5f1d5b(_0x4f769b,_0x22b3d6){return _0x4da2(_0x4f769b-0x197,_0x22b3d6);}try{const response=await this[_0x5f1d5b(0x437,0x3c7)]['post']('/admin/v1/workspace/custom-database/test-connection',_0x57f679,{'headers':this[_0x5f1d5b(0x440,0x4bd)]?{'X-Workspace-ID':this[_0x5f1d5b(0x440,0x3e0)]}:{}});return response['data'];}catch(_0x4aaacf){return{'success':![],'message':_0x4aaacf?.[_0x5f1d5b(0x453,0x3fc)]||_0x5f1d5b(0x3fc,0x3e9)};}}async['configureCustomDatabase'](_0x278f1d){if(!this[_0x481770(-0xda,-0xc6)])throw new Error('Workspace ID is required to configure custom database');const response=await this[_0x481770(-0xaa,-0xcf)][_0x481770(-0x7f,-0xa1)]('/admin/v1/workspace/custom-database',{'workspaceId':this['workspaceId'],..._0x278f1d},{'headers':{'X-Workspace-ID':this[_0x481770(-0xea,-0xc6)]}}),config=response[_0x481770(-0x1ab,-0x140)]['config'];function _0x481770(_0x260f43,_0xa5c1bf){return _0x4da2(_0xa5c1bf- -0x36f,_0x260f43);}return this[_0x481770(-0x1d1,-0x182)]={'hasCustomDatabase':!![],'config':config,'credentials':_0x278f1d},config;}async['removeCustomDatabase'](){function _0x11fda6(_0x2efae5,_0x5554d4){return _0x4da2(_0x5554d4-0x15d,_0x2efae5);}if(!this['workspaceId'])throw new Error('Workspace ID is required to remove custom database');await this['httpClient']['delete']('/admin/v1/workspace/custom-database',{'headers':{'X-Workspace-ID':this[_0x11fda6(0x3c1,0x406)]}}),this[_0x11fda6(0x366,0x34a)]={'hasCustomDatabase':![]};}['getDetectedConfig'](){return this['detectedConfig'];}['hasCustomDatabase'](){function _0xd1e9c5(_0x3bace3,_0xc16160){return _0x4da2(_0xc16160- -0x7a,_0x3bace3);}return this[_0xd1e9c5(0x1f3,0x173)]?.[_0xd1e9c5(0x299,0x275)]??![];}[_0x347d1c(-0xf3,-0x8e)](){function _0x4df45b(_0x13d91e,_0x2b4c0f){return _0x4da2(_0x13d91e-0x22c,_0x2b4c0f);}return this[_0x4df45b(0x419,0x3b4)]?.['credentials'];}['setWorkspaceId'](_0x4c375e){this['workspaceId']=_0x4c375e,this['detectedConfig']=undefined;}['getWorkspaceId'](){function _0x525561(_0x3e99d0,_0x49ea06){return _0x4da2(_0x49ea06- -0x21b,_0x3e99d0);}return this[_0x525561(0xe5,0x8e)];}[_0x347d1c(-0xa2,-0xd6)](){function _0x39397b(_0x29e140,_0x2fdde7){return _0x4da2(_0x2fdde7-0x8,_0x29e140);}return{'workspaceId':this['workspaceId'],'hasConfig':this[_0x39397b(0x365,0x2f7)](),'configDetails':this[_0x39397b(0x27b,0x1f5)]?.[_0x39397b(0x2b6,0x24f)]?{'host':this[_0x39397b(0x1a0,0x1f5)]['credentials'][_0x39397b(0x1d9,0x266)],'port':this[_0x39397b(0x1ec,0x1f5)][_0x39397b(0x2d2,0x24f)][_0x39397b(0x1fa,0x238)],'database':this['detectedConfig'][_0x39397b(0x294,0x24f)][_0x39397b(0x273,0x1f8)],'schema':this[_0x39397b(0x250,0x1f5)]['credentials'][_0x39397b(0x2cd,0x287)]||_0x39397b(0x336,0x2cf),'sslEnabled':this['detectedConfig']['credentials'][_0x39397b(0x334,0x2e5)]||![]}:undefined};}}class DatabaseClient{constructor(_0x4f2eaa,_0x10cad0){function _0x4829c1(_0x4e1ba5,_0x4d54ef){return _0x4da2(_0x4e1ba5-0xe8,_0x4d54ef);}this[_0x4829c1(0x388,0x3bb)]=_0x4f2eaa,this['customDatabaseManager']=new CustomDatabaseManager(_0x4f2eaa,_0x10cad0);}['from'](_0x342e46){return new QueryBuilder(this['httpClient'],_0x342e46,this['currentSchema'],this['customDatabaseManager']['getWorkspaceId']());}['rpc'](_0x97b450,_0x34b1bb){function _0x219980(_0x1747c5,_0x3ac50e){return _0x4da2(_0x1747c5- -0x352,_0x3ac50e);}return this[_0x219980(-0xb2,-0x13a)][_0x219980(-0x84,-0xbd)](_0x219980(-0x150,-0x1af)+_0x97b450,_0x34b1bb);}[_0x347d1c(-0x186,-0xfb)](_0x3847a9){const _0x26a4ad=new DatabaseClient(this['httpClient'],this[_0x1890d6(0x420,0x493)]['getWorkspaceId']());_0x26a4ad[_0x1890d6(0x436,0x400)]=_0x3847a9;function _0x1890d6(_0x4b7aaa,_0x228a88){return _0x4da2(_0x228a88-0x1f0,_0x4b7aaa);}return _0x26a4ad['customDatabaseManager']=this[_0x1890d6(0x413,0x493)],_0x26a4ad;}async[_0x347d1c(-0x12f,-0x14c)](){function _0x330222(_0x4fbc11,_0x2f8075){return _0x4da2(_0x4fbc11- -0x1c,_0x2f8075);}return this[_0x330222(0x287,0x2c7)][_0x330222(0x212,0x22f)]();}async['testCustomConnection'](_0x3e5d5e){function _0x54f228(_0x4f7a06,_0x1bcae9){return _0x4da2(_0x4f7a06- -0x280,_0x1bcae9);}return this[_0x54f228(0x23,0xab)][_0x54f228(-0x54,-0x62)](_0x3e5d5e);}async[_0x347d1c(-0x12b,-0xd5)](_0x5c0ee4){function _0x4e8387(_0x5dae32,_0x360263){return _0x4da2(_0x5dae32- -0x225,_0x360263);}return this['customDatabaseManager'][_0x4e8387(0x80,-0x6)](_0x5c0ee4);}async[_0x347d1c(-0x5d,-0xbf)](){function _0x4a39f9(_0x43eb86,_0x25a4c3){return _0x4da2(_0x25a4c3-0x2c1,_0x43eb86);}return this[_0x4a39f9(0x594,0x564)][_0x4a39f9(0x514,0x57c)]();}['isUsingCustomDatabase'](){function _0x3a5306(_0x1b847e,_0x809808){return _0x4da2(_0x809808-0x3dd,_0x1b847e);}return this[_0x3a5306(0x6f8,0x680)]['hasCustomDatabase']();}[_0x347d1c(-0x58,-0x85)](){function _0x11787f(_0x50be0f,_0x3e1fc0){return _0x4da2(_0x50be0f- -0x2fc,_0x3e1fc0);}return this['customDatabaseManager'][_0x11787f(-0x58,0x23)]();}[_0x347d1c(-0xb1,-0x95)](_0x30ec78){function _0x20edfc(_0x35a8f9,_0x4d468f){return _0x4da2(_0x4d468f-0x21a,_0x35a8f9);}this[_0x20edfc(0x46c,0x4bd)]['setWorkspaceId'](_0x30ec78);}async[_0x347d1c(-0x67,-0x9a)](){function _0x9d945f(_0x1ed1ca,_0x1a962e){return _0x4da2(_0x1ed1ca-0x172,_0x1a962e);}try{await this[_0x9d945f(0x415,0x400)]['detectCustomDatabase']();}catch(_0xe81fbc){console['warn']('Failed to initialize custom database detection:',_0xe81fbc);}}}class StorageBucket{constructor(_0x30c6b0,bucketId){this[_0x3920f(0x117,0xcc)]=_0x30c6b0;function _0x3920f(_0x5bf068,_0x118525){return _0x4da2(_0x5bf068- -0x189,_0x118525);}this['bucketId']=bucketId;}async['upload'](_0x3c7aef,_0x5a2c59,_0x59c9c4){function _0x23e24d(_0x4db8ec,_0x15a634){return _0x4da2(_0x4db8ec-0x3e2,_0x15a634);}try{const _0x383ee4=new FormData();if(_0x5a2c59 instanceof File)_0x383ee4['append'](_0x23e24d(0x63a,0x6b1),_0x5a2c59);else{if(_0x5a2c59 instanceof Blob)_0x383ee4[_0x23e24d(0x68d,0x6c9)](_0x23e24d(0x63a,0x5e2),_0x5a2c59,_0x3c7aef);else{if(_0x5a2c59 instanceof ArrayBuffer)_0x383ee4[_0x23e24d(0x68d,0x6d5)]('file',new Blob([_0x5a2c59]),_0x3c7aef);else typeof _0x5a2c59===_0x23e24d(0x67c,0x62f)&&_0x383ee4['append'](_0x23e24d(0x63a,0x5bb),new Blob([_0x5a2c59],{'type':'text/plain'}),_0x3c7aef);}}_0x383ee4['append']('path',_0x3c7aef);_0x59c9c4?.[_0x23e24d(0x66d,0x68a)]&&_0x383ee4[_0x23e24d(0x68d,0x695)]('cacheControl',_0x59c9c4['cacheControl']);_0x59c9c4?.[_0x23e24d(0x6d6,0x681)]&&_0x383ee4[_0x23e24d(0x68d,0x6f8)]('contentType',_0x59c9c4[_0x23e24d(0x6d6,0x66f)]);_0x59c9c4?.['metadata']&&_0x383ee4['append']('metadata',JSON['stringify'](_0x59c9c4[_0x23e24d(0x64d,0x6d4)]));const _0x178c40='/storage/buckets/'+this['bucketId']+'/files'+(_0x59c9c4?.[_0x23e24d(0x67e,0x6be)]?_0x23e24d(0x6be,0x739):''),response=await this[_0x23e24d(0x682,0x6c1)][_0x23e24d(0x6b0,0x66c)](_0x178c40,_0x383ee4,{'headers':{'Content-Type':'multipart/form-data'}});return{'data':response[_0x23e24d(0x611,0x602)],'error':null};}catch(_0x5277e6){return{'data':null,'error':_0x5277e6 instanceof EBaaSError?_0x5277e6:new EBaaSError(_0x5277e6 instanceof Error?_0x5277e6[_0x23e24d(0x69e,0x6a9)]:_0x23e24d(0x5cb,0x5ba),0x0,_0x5277e6)};}}async['download'](_0x3dbca7,_0x150d4d){function _0x237258(_0x23f6e6,_0x5dfd6e){return _0x4da2(_0x23f6e6-0xf1,_0x5dfd6e);}try{const _0x52b88f=new URLSearchParams();_0x150d4d?.['transform']&&Object[_0x237258(0x358,0x2d0)](_0x150d4d['transform'])['forEach'](([_0x5946e5,_0x30e110])=>{_0x30e110!==undefined&&_0x52b88f['append'](_0x5946e5,String(_0x30e110));});const _0x424575=_0x237258(0x3f1,0x475)+this[_0x237258(0x2ea,0x31c)]+_0x237258(0x318,0x2b4)+_0x3dbca7+(_0x52b88f['toString']()?'?'+_0x52b88f['toString']():''),response=await this[_0x237258(0x391,0x37a)][_0x237258(0x3df,0x40e)](_0x424575,{'responseType':_0x237258(0x3b6,0x38a)});return{'data':response['data'],'error':null};}catch(_0x23e4aa){return{'data':null,'error':_0x23e4aa instanceof EBaaSError?_0x23e4aa:new EBaaSError(_0x23e4aa instanceof Error?_0x23e4aa['message']:'Failed\x20to\x20download\x20file',0x0,_0x23e4aa)};}}async['list'](_0x3876b3,_0x3642b8){function _0x3c214e(_0x53313f,_0x16e6cf){return _0x4da2(_0x53313f-0x18a,_0x16e6cf);}try{const _0x3f7bf6=new URLSearchParams();_0x3876b3&&_0x3f7bf6['append'](_0x3c214e(0x410,0x410),_0x3876b3);_0x3642b8?.['limit']&&_0x3f7bf6[_0x3c214e(0x435,0x3e5)](_0x3c214e(0x469,0x4d2),String(_0x3642b8[_0x3c214e(0x469,0x426)]));_0x3642b8?.[_0x3c214e(0x412,0x472)]&&_0x3f7bf6['append'](_0x3c214e(0x412,0x411),String(_0x3642b8[_0x3c214e(0x412,0x39e)]));_0x3642b8?.['sortBy']&&_0x3f7bf6['append'](_0x3c214e(0x40a,0x389),JSON[_0x3c214e(0x428,0x476)](_0x3642b8[_0x3c214e(0x40a,0x451)]));_0x3642b8?.[_0x3c214e(0x3dc,0x432)]&&_0x3f7bf6['append'](_0x3c214e(0x3dc,0x425),_0x3642b8['search']);const _0x3e2cb1='/storage/buckets/'+this['bucketId']+'/files'+(_0x3f7bf6['toString']()?'?'+_0x3f7bf6['toString']():''),response=await this['httpClient'][_0x3c214e(0x478,0x41a)](_0x3e2cb1);return{'data':response['data'],'error':null};}catch(_0x243704){return{'data':null,'error':_0x243704 instanceof EBaaSError?_0x243704:new EBaaSError(_0x243704 instanceof Error?_0x243704['message']:_0x3c214e(0x40b,0x46c),0x0,_0x243704)};}}async[_0x347d1c(-0x143,-0xce)](_0x1750bd){function _0x3d4f8e(_0xeb80be,_0x4c78b4){return _0x4da2(_0x4c78b4-0x202,_0xeb80be);}try{const response=await this[_0x3d4f8e(0x431,0x4a2)][_0x3d4f8e(0x4d0,0x4b0)](_0x3d4f8e(0x47d,0x502)+this['bucketId']+'/files',{'data':{'paths':_0x1750bd}});return{'data':response[_0x3d4f8e(0x461,0x431)],'error':null};}catch(_0x1340e6){return{'data':null,'error':_0x1340e6 instanceof EBaaSError?_0x1340e6:new EBaaSError(_0x1340e6 instanceof Error?_0x1340e6['message']:_0x3d4f8e(0x50c,0x4ce),0x0,_0x1340e6)};}}async[_0x347d1c(-0x74,-0xa0)](fromPath,_0x1ef510){function _0x2cb497(_0x284bd0,_0x1b8bde){return _0x4da2(_0x1b8bde- -0xe0,_0x284bd0);}try{const response=await this[_0x2cb497(0x1f6,0x1c0)]['post'](_0x2cb497(0x2a0,0x220)+this[_0x2cb497(0x12f,0x119)]+'/files/move',{'sourceKey':fromPath,'destinationKey':_0x1ef510});return{'data':response[_0x2cb497(0x1d0,0x14f)],'error':null};}catch(_0x21ec94){return{'data':null,'error':_0x21ec94 instanceof EBaaSError?_0x21ec94:new EBaaSError(_0x21ec94 instanceof Error?_0x21ec94[_0x2cb497(0x1c8,0x1dc)]:'Failed\x20to\x20move\x20file',0x0,_0x21ec94)};}}async[_0x347d1c(-0x125,-0x125)](fromPath,_0x2d8146){function _0x16317a(_0x305a2a,_0x3124fb){return _0x4da2(_0x3124fb- -0x14,_0x305a2a);}try{const response=await this['httpClient'][_0x16317a(0x232,0x2ba)](_0x16317a(0x348,0x2ec)+this['bucketId']+_0x16317a(0x276,0x214),{'sourceKey':fromPath,'destinationKey':_0x2d8146});return{'data':response[_0x16317a(0x243,0x21b)],'error':null};}catch(_0x210295){return{'data':null,'error':_0x210295 instanceof EBaaSError?_0x210295:new EBaaSError(_0x210295 instanceof Error?_0x210295[_0x16317a(0x256,0x2a8)]:_0x16317a(0x1e8,0x217),0x0,_0x210295)};}}async[_0x347d1c(-0xe0,-0x105)](_0xe5b35f,_0xcf9192,_0x2e08b9){function _0x14993e(_0x3ba9f2,_0x269f1a){return _0x4da2(_0x269f1a-0x3c4,_0x3ba9f2);}try{const response=await this[_0x14993e(0x6ab,0x664)]['post']('/storage/buckets/'+this[_0x14993e(0x59c,0x5bd)]+_0x14993e(0x58a,0x5eb)+_0xe5b35f+'/sign',{'expiresIn':_0xcf9192,..._0x2e08b9});return{'data':response[_0x14993e(0x595,0x5f3)],'error':null};}catch(_0x480d4f){return{'data':null,'error':_0x480d4f instanceof EBaaSError?_0x480d4f:new EBaaSError(_0x480d4f instanceof Error?_0x480d4f['message']:'Failed\x20to\x20create\x20signed\x20URL',0x0,_0x480d4f)};}}['getPublicUrl'](_0x513007,_0x5b9104){const _0x4ceeb5=new URLSearchParams();_0x5b9104?.['transform']&&Object[_0x5e5528(0x2c,0x37)](_0x5b9104[_0x5e5528(-0x46,-0x84)])[_0x5e5528(-0x1b,-0x9f)](([_0x18f8eb,_0x18d3f7])=>{function _0x351f55(_0xb6c7ec,_0x379647){return _0x4da2(_0xb6c7ec- -0x34b,_0x379647);}_0x18d3f7!==undefined&&_0x4ceeb5[_0x351f55(-0xa0,-0xba)](_0x18f8eb,String(_0x18d3f7));});function _0x5e5528(_0x20cbea,_0x1173e9){return _0x4da2(_0x20cbea- -0x23b,_0x1173e9);}const _0x5d281e=this['httpClient']['baseURL']||'',_0x37aeb2=_0x5d281e+'/storage/buckets/'+this['bucketId']+'/files/'+_0x513007+(_0x4ceeb5['toString']()?'?'+_0x4ceeb5[_0x5e5528(0x2f,0x5b)]():'');return{'data':{'publicUrl':_0x37aeb2}};}async['getFileInfo'](_0x22a04c){function _0x5e8977(_0x49654e,_0x106c5d){return _0x4da2(_0x106c5d- -0x2b0,_0x49654e);}try{const response=await this[_0x5e8977(-0x2e,-0x10)]['get'](_0x5e8977(0x0,0x50)+this[_0x5e8977(-0xbf,-0xb7)]+'/files/'+_0x22a04c+_0x5e8977(0x34,0x4b));return{'data':response['data'],'error':null};}catch(_0x365878){return{'data':null,'error':_0x365878 instanceof EBaaSError?_0x365878:new EBaaSError(_0x365878 instanceof Error?_0x365878[_0x5e8977(0x2f,0xc)]:_0x5e8977(-0x86,-0xc9),0x0,_0x365878)};}}async['updateFileMetadata'](_0x345b92,metadata){function _0x54d78a(_0x1cf65c,_0x3799dd){return _0x4da2(_0x3799dd-0x34b,_0x1cf65c);}try{const response=await this[_0x54d78a(0x583,0x5eb)]['put']('/storage/buckets/'+this[_0x54d78a(0x569,0x544)]+'/files/'+_0x345b92+_0x54d78a(0x4f3,0x570),{'metadata':metadata});return{'data':response[_0x54d78a(0x5e7,0x57a)],'error':null};}catch(_0x2e335a){return{'data':null,'error':_0x2e335a instanceof EBaaSError?_0x2e335a:new EBaaSError(_0x2e335a instanceof Error?_0x2e335a[_0x54d78a(0x5a5,0x607)]:_0x54d78a(0x5ed,0x5b8),0x0,_0x2e335a)};}}}class StorageClient{constructor(_0x3c500b){this['httpClient']=_0x3c500b;}['from'](bucketId){return new StorageBucket(this['httpClient'],bucketId);}async['createBucket'](_0x3eca50,_0x5ab952){function _0x4e8ed2(_0x15c36b,_0x132cb6){return _0x4da2(_0x132cb6-0x3b4,_0x15c36b);}try{const response=await this[_0x4e8ed2(0x6ba,0x654)]['post']('/storage/buckets',{'id':_0x3eca50,..._0x5ab952});return{'data':response['data'],'error':null};}catch(_0x5c210d){return{'data':null,'error':_0x5c210d instanceof EBaaSError?_0x5c210d:new EBaaSError(_0x5c210d instanceof Error?_0x5c210d['message']:_0x4e8ed2(0x6ba,0x66b),0x0,_0x5c210d)};}}async[_0x347d1c(-0xf0,-0x162)](_0x104ad6){function _0x32dc4d(_0x3565fa,_0x3b88c7){return _0x4da2(_0x3565fa-0x1e6,_0x3b88c7);}try{const response=await this['httpClient']['get']('/storage/buckets/'+_0x104ad6);return{'data':response[_0x32dc4d(0x415,0x41f)],'error':null};}catch(_0x23ada5){return{'data':null,'error':_0x23ada5 instanceof EBaaSError?_0x23ada5:new EBaaSError(_0x23ada5 instanceof Error?_0x23ada5[_0x32dc4d(0x4a2,0x482)]:'Failed\x20to\x20get\x20bucket',0x0,_0x23ada5)};}}async['listBuckets'](){function _0x577e78(_0x27c953,_0x535660){return _0x4da2(_0x535660- -0x1fb,_0x27c953);}try{const response=await this[_0x577e78(0x25,0xa5)]['get']('/storage/buckets');return{'data':response[_0x577e78(0x44,0x34)],'error':null};}catch(_0x43a8f8){return{'data':null,'error':_0x43a8f8 instanceof EBaaSError?_0x43a8f8:new EBaaSError(_0x43a8f8 instanceof Error?_0x43a8f8['message']:_0x577e78(0x104,0xb4),0x0,_0x43a8f8)};}}async[_0x347d1c(-0x139,-0x163)](_0x50b3c7,_0x1fc616){function _0x5c4a2b(_0x1b3add,_0x1f212a){return _0x4da2(_0x1b3add- -0x2cf,_0x1f212a);}try{const response=await this[_0x5c4a2b(-0x2f,0x32)][_0x5c4a2b(-0x52,-0x97)]('/storage/buckets/'+_0x50b3c7,_0x1fc616);return{'data':response['data'],'error':null};}catch(_0x314a2f){return{'data':null,'error':_0x314a2f instanceof EBaaSError?_0x314a2f:new EBaaSError(_0x314a2f instanceof Error?_0x314a2f['message']:_0x5c4a2b(-0xe5,-0xcd),0x0,_0x314a2f)};}}async[_0x347d1c(-0x17e,-0x119)](_0x34a8fa){function _0x22f3bb(_0x2a79c7,_0x3ccc85){return _0x4da2(_0x2a79c7-0x122,_0x3ccc85);}try{const response=await this['httpClient'][_0x22f3bb(0x3d0,0x382)]('/storage/buckets/'+_0x34a8fa);return{'data':response[_0x22f3bb(0x351,0x3c1)],'error':null};}catch(_0x5124ee){return{'data':null,'error':_0x5124ee instanceof EBaaSError?_0x5124ee:new EBaaSError(_0x5124ee instanceof Error?_0x5124ee[_0x22f3bb(0x3de,0x35c)]:_0x22f3bb(0x394,0x314),0x0,_0x5124ee)};}}async['getUsage'](){function _0x2c53c4(_0x3d3b6b,_0x376e7e){return _0x4da2(_0x3d3b6b- -0x24b,_0x376e7e);}try{const response=await this['httpClient'][_0x2c53c4(0xa3,0xda)](_0x2c53c4(-0x12,-0x7f));return{'data':response['data'],'error':null};}catch(_0x61632f){return{'data':null,'error':_0x61632f instanceof EBaaSError?_0x61632f:new EBaaSError(_0x61632f instanceof Error?_0x61632f['message']:'Failed\x20to\x20get\x20storage\x20usage',0x0,_0x61632f)};}}}class EventManager{constructor(){function _0x343b20(_0x16a19e,_0x5e39f7){return _0x4da2(_0x5e39f7- -0x1ac,_0x16a19e);}this[_0x343b20(0x87,0x106)]=new Map(),this['maxListeners']=0xa;}['on'](_0x11ec96,_0x3ead64){function _0x4a27ed(_0x42df3b,_0x15fda9){return _0x4da2(_0x42df3b- -0x25d,_0x15fda9);}!this['events'][_0x4a27ed(0x8b,0x92)](_0x11ec96)&&this[_0x4a27ed(0x55,0x1d)][_0x4a27ed(-0x4e,-0x6a)](_0x11ec96,new Set()),this['events'][_0x4a27ed(0x91,0x52)](_0x11ec96)[_0x4a27ed(0x60,0x18)](_0x3ead64);}['off'](_0x2fd905,_0x43c3ad){if(!this['events']['has'](_0x2fd905))return;function _0x2525a0(_0x3da363,_0x41db0a){return _0x4da2(_0x41db0a- -0x4e,_0x3da363);}const _0x4e1090=this['events']['get'](_0x2fd905);_0x43c3ad?_0x4e1090[_0x2525a0(0x252,0x260)](_0x43c3ad):_0x4e1090['clear'](),_0x4e1090['size']===0x0&&this[_0x2525a0(0x1ec,0x264)]['delete'](_0x2fd905);}[_0x347d1c(-0x16d,-0x137)](_0x20b255,..._0x51e88c){function _0x235c3e(_0x31f278,_0x1c06d2){return _0x4da2(_0x31f278- -0x174,_0x1c06d2);}if(!this['events']['has'](_0x20b255))return![];const _0x4afb03=this['events']['get'](_0x20b255);for(const _0x30434a of _0x4afb03){try{_0x30434a(..._0x51e88c);}catch(_0x31f305){console[_0x235c3e(0xd6,0xb2)]('Error\x20in\x20event\x20listener\x20for\x20\x22'+_0x20b255+'\x22:',_0x31f305);}}return _0x4afb03['size']>0x0;}['removeAllListeners'](_0x3a4684){function _0x716a1b(_0x1133d2,_0x10f994){return _0x4da2(_0x1133d2-0xf2,_0x10f994);}_0x3a4684?this['events'][_0x716a1b(0x3a0,0x394)](_0x3a4684):this['events']['clear']();}[_0x347d1c(-0x1df,-0x179)](_0x2dc678){function _0x13ad6a(_0x559d9c,_0x378077){return _0x4da2(_0x378077- -0x1d3,_0x559d9c);}return this[_0x13ad6a(0x6f,0xdf)][_0x13ad6a(0xf4,0x11b)](_0x2dc678)?.[_0x13ad6a(-0x17,0x1e)]??0x0;}[_0x347d1c(-0xec,-0x147)](){function _0xff7a51(_0x596d6a,_0x176b8f){return _0x4da2(_0x176b8f-0x3bb,_0x596d6a);}return Array[_0xff7a51(0x6ee,0x6ba)](this[_0xff7a51(0x640,0x66d)]['keys']());}[_0x347d1c(-0xb4,-0xe1)](_0x58a6f1){return Array['from'](this['events']['get'](_0x58a6f1)??[]);}[_0x347d1c(-0x17b,-0x16f)](_0x3382d5,_0x3883d9){this['on'](_0x3382d5,_0x3883d9);}[_0x347d1c(-0xb1,-0x118)](_0x52726f,_0x47f14d){this['off'](_0x52726f,_0x47f14d);}[_0x347d1c(-0x175,-0x111)](_0xd9df66,_0x21ef8d){const _0x3a8c2e=(..._0x1d26e0)=>{this[_0xd70c23(-0x118,-0x16b)](_0xd9df66,_0x3a8c2e);function _0xd70c23(_0x2e4fc8,_0x35c908){return _0x4da2(_0x2e4fc8- -0x3db,_0x35c908);}_0x21ef8d(..._0x1d26e0);};this['on'](_0xd9df66,_0x3a8c2e);}[_0x347d1c(-0x99,-0xe6)](_0x3a3f3a,_0x3ee463){this['on'](_0x3a3f3a,_0x3ee463);}['prependOnceListener'](_0x1172b0,_0x66a718){const _0x209977=(..._0xb7a67c)=>{function _0x163700(_0x5b0411,_0x3cb016){return _0x4da2(_0x3cb016-0x259,_0x5b0411);}this[_0x163700(0x543,0x51c)](_0x1172b0,_0x209977),_0x66a718(..._0xb7a67c);};this['on'](_0x1172b0,_0x209977);}['setMaxListeners'](_0x9c4aeb){function _0x250c19(_0x55d53b,_0x25545b){return _0x4da2(_0x25545b- -0x3d8,_0x55d53b);}return this[_0x250c19(-0x1c1,-0x14f)]=_0x9c4aeb,this;}[_0x347d1c(-0x121,-0xc7)](){return this['maxListeners'];}[_0x347d1c(-0x131,-0xa6)](_0x4c2c48){function _0x354972(_0x495b2a,_0x343118){return _0x4da2(_0x343118- -0x2a5,_0x495b2a);}return this[_0x354972(-0x7f,-0xc)](_0x4c2c48);}}class RealtimeChannel extends EventManager{constructor(_0x575625,_0x54995d){super(),this[_0x1458ea(0x44b,0x3d0)]=![],this['state']='closed',this['subscriptions']=new Map();function _0x1458ea(_0x13872d,_0x38e25){return _0x4da2(_0x13872d-0x259,_0x38e25);}this[_0x1458ea(0x478,0x441)]=_0x575625,this[_0x1458ea(0x483,0x475)]=_0x54995d;}['subscribe'](_0x9e8e5d){!this['joinedOnce']&&(this[_0x5b5dde(-0xb0,-0x119)]=!![],this['_join']());_0x9e8e5d&&this['on'](_0x5b5dde(-0xcd,-0x107),_0x9e8e5d);function _0x5b5dde(_0x2fe749,_0x2aa1dc){return _0x4da2(_0x2aa1dc- -0x30b,_0x2fe749);}return this;}[_0x347d1c(-0xed,-0x98)](filter,_0x17b603){const _0x359dea='postgres_changes:'+JSON['stringify'](filter);function _0x2279e7(_0x1ee0c4,_0x18cfd2){return _0x4da2(_0x18cfd2-0x161,_0x1ee0c4);}this['on'](_0x359dea,_0x17b603);const _0x1f764e={'unsubscribe':()=>{this['off'](_0x359dea,_0x17b603),this['subscriptions']['delete'](_0x359dea);}};return this['subscriptions'][_0x2279e7(0x337,0x370)](_0x359dea,_0x1f764e),this['socket']?.['connected']&&this[_0x2279e7(0x3a9,0x3d9)]==='joined'&&this[_0x2279e7(0x3dc,0x38b)][_0x2279e7(0x3f4,0x3a4)]('subscribe_postgres_changes',{'topic':this['topic'],'filter':filter,'ref':this['makeRef']()}),_0x1f764e;}[_0x347d1c(-0x13f,-0xd8)](filter,_0x4f5efe){const _0x21e4b3='broadcast:'+JSON[_0x14bbc3(0x24,0xa3)](filter);this['on'](_0x21e4b3,_0x4f5efe);function _0x14bbc3(_0x34551e,_0x5d8cfc){return _0x4da2(_0x34551e- -0x27a,_0x5d8cfc);}const _0x1d5c22={'unsubscribe':()=>{this[_0x16b29f(0x4ed,0x4ba)](_0x21e4b3,_0x4f5efe);function _0x16b29f(_0xca1db5,_0xfc5d18){return _0x4da2(_0xfc5d18-0x1f7,_0xca1db5);}this['subscriptions']['delete'](_0x21e4b3);}};return this['subscriptions'][_0x14bbc3(-0x6b,-0xb4)](_0x21e4b3,_0x1d5c22),_0x1d5c22;}['onPresence'](filter,_0x2b337d){const _0x713e2a=_0x531c78(-0x136,-0xe3)+JSON['stringify'](filter);this['on'](_0x713e2a,_0x2b337d);const _0x1e20e2={'unsubscribe':()=>{function _0x1756b6(_0x38db53,_0xea82fb){return _0x4da2(_0xea82fb- -0x1c,_0x38db53);}this[_0x1756b6(0x21b,0x2a7)](_0x713e2a,_0x2b337d),this[_0x1756b6(0x347,0x2de)]['delete'](_0x713e2a);}};this[_0x531c78(-0x9,0x3)]['set'](_0x713e2a,_0x1e20e2);function _0x531c78(_0x2a4c6d,_0x22b2e7){return _0x4da2(_0x22b2e7- -0x2f7,_0x2a4c6d);}return _0x1e20e2;}[_0x347d1c(-0x9c,-0xd2)](_0x5a0151){return new Promise(_0x3aa59e=>{function _0x4e0d0c(_0x22d898,_0x245439){return _0x4da2(_0x22d898- -0x6c,_0x245439);}this[_0x4e0d0c(0x1be,0x229)]?.[_0x4e0d0c(0x1f7,0x1bc)]&&this['state']==='joined'?(this[_0x4e0d0c(0x1be,0x1bb)]['emit'](_0x4e0d0c(0x1b5,0x148),{'topic':this['topic'],'event':_0x5a0151['event'],'payload':_0x5a0151,'ref':this[_0x4e0d0c(0x25f,0x2a6)]()}),_0x3aa59e('ok')):_0x3aa59e('error');});}['track'](_0x48234d){return new Promise(_0x46898e=>{function _0x3bf963(_0x469698,_0x2e42f0){return _0x4da2(_0x2e42f0-0x391,_0x469698);}this[_0x3bf963(0x5cc,0x5bb)]?.['connected']&&this[_0x3bf963(0x61a,0x609)]===_0x3bf963(0x5cb,0x5f1)?(this[_0x3bf963(0x61d,0x5bb)]['emit']('presence',{'topic':this[_0x3bf963(0x57f,0x5b0)],'event':_0x3bf963(0x5dd,0x5dc),'payload':_0x48234d,'ref':this[_0x3bf963(0x64d,0x65c)]()}),_0x46898e('ok')):_0x46898e('error');});}[_0x347d1c(-0x14e,-0x17e)](){return new Promise(_0x2d49d3=>{function _0x200d06(_0x2782f0,_0x926f0f){return _0x4da2(_0x2782f0- -0x2d6,_0x926f0f);}this['socket']?.[_0x200d06(-0x73,-0xf5)]&&this[_0x200d06(-0x5e,-0x24)]==='joined'?(this['socket'][_0x200d06(-0x93,-0xb6)](_0x200d06(-0x9e,-0xcc),{'topic':this[_0x200d06(-0xb7,-0x6d)],'event':_0x200d06(-0xda,-0x132),'ref':this['makeRef']()}),_0x2d49d3('ok')):_0x2d49d3(_0x200d06(-0x8c,-0x2c));});}['unsubscribe'](){return new Promise(_0x254ade=>{this['state']='leaving',this[_0x46fc3f(0x639,0x602)]['forEach'](_0xbaaad7=>{function _0x2dde19(_0x23bd7f,_0x4fd070){return _0x4da2(_0x23bd7f- -0x1c7,_0x4fd070);}_0xbaaad7[_0x2dde19(0xc8,0x147)]();}),this['subscriptions']['clear']();this['socket']?.[_0x46fc3f(0x5a2,0x517)]&&this[_0x46fc3f(0x569,0x520)]['emit']('leave',{'topic':this[_0x46fc3f(0x55e,0x596)],'ref':this[_0x46fc3f(0x60a,0x64c)]()});function _0x46fc3f(_0x2abf83,_0x497a64){return _0x4da2(_0x2abf83-0x33f,_0x497a64);}this[_0x46fc3f(0x5b7,0x587)]='closed',this['removeAllListeners'](),_0x254ade('ok');});}[_0x347d1c(-0x116,-0x146)](){function _0x35963b(_0x51e7a6,_0x36c2ac){return _0x4da2(_0x36c2ac- -0x1a,_0x51e7a6);}if(this['state']==='leaving')return;this[_0x35963b(0x208,0x25e)]='joining',this['socket']?.['connected']&&(this[_0x35963b(0x1db,0x210)]['emit'](_0x35963b(0x201,0x254),{'topic':this[_0x35963b(0x280,0x205)],'ref':this[_0x35963b(0x319,0x2b1)]()}),setTimeout(()=>{function _0x4d003f(_0x51412f,_0xc14288){return _0x4da2(_0xc14288- -0x1c2,_0x51412f);}this[_0x4d003f(0x75,0xb6)]===_0x4d003f(0x1ba,0x134)&&(this['state']=_0x4d003f(0x10d,0x9e),this['emit']('status',_0x4d003f(0xb5,0x34)));},0x64));}['_rejoin'](){function _0x4a6628(_0x54b427,_0x1903b9){return _0x4da2(_0x1903b9-0xe8,_0x54b427);}this[_0x4a6628(0x33c,0x2da)]&&(this[_0x4a6628(0x2e0,0x31c)](),this['subscriptions'][_0x4a6628(0x35b,0x308)]((_0x44e776,_0x51880a)=>{function _0xb5bb0f(_0x1b5313,_0x59ea5a){return _0x4da2(_0x1b5313- -0x24a,_0x59ea5a);}if(_0x51880a['startsWith'](_0xb5bb0f(0x46,0x64))){const filter=JSON[_0xb5bb0f(0x86,0xef)](_0x51880a[_0xb5bb0f(0x22,0x2f)]('postgres_changes:',''));this[_0xb5bb0f(-0x20,0x61)]?.[_0xb5bb0f(-0x7,-0x24)](_0xb5bb0f(-0x2c,-0x12),{'topic':this[_0xb5bb0f(-0x2b,-0x9b)],'filter':filter,'ref':this[_0xb5bb0f(0x81,0x2)]()});}}));}[_0x347d1c(-0xc7,-0x12c)](_0x337068,_0x586b0f){if(_0x337068==='postgres_changes'){const _0x4b9f25=_0x347775(0x4c5,0x43a)+JSON[_0x347775(0x3bd,0x448)](_0x586b0f[_0x347775(0x422,0x3ad)]||{});this[_0x347775(0x382,0x3ed)](_0x4b9f25,_0x586b0f);}else{if(_0x337068===_0x347775(0x354,0x3cb)){const _0x36c21e=_0x347775(0x497,0x434)+JSON[_0x347775(0x417,0x448)]({'event':_0x586b0f[_0x347775(0x524,0x4a3)]});this[_0x347775(0x398,0x3ed)](_0x36c21e,_0x586b0f);}else{if(_0x337068===_0x347775(0x37d,0x3e2)){const _0x483fea=_0x347775(0x3a4,0x3be)+JSON[_0x347775(0x4b6,0x448)]({'event':_0x586b0f[_0x347775(0x41c,0x4a3)]});this['emit'](_0x483fea,_0x586b0f);}}}function _0x347775(_0x22daac,_0x44b85a){return _0x4da2(_0x44b85a-0x1aa,_0x22daac);}this['emit'](_0x337068,_0x586b0f);}[_0x347d1c(-0x190,-0x183)](_0x8acd49){function _0x4e1f07(_0x23c861,_0x51e2cc){return _0x4da2(_0x23c861-0x52,_0x51e2cc);}this[_0x4e1f07(0x2ca,0x2b1)]=_0x8acd49;let status;switch(_0x8acd49){case _0x4e1f07(0x2b2,0x330):status=_0x4e1f07(0x248,0x1e9);break;case'errored':status='CHANNEL_ERROR';break;case _0x4e1f07(0x310,0x29e):status=_0x4e1f07(0x2ce,0x2d7);break;default:return;}this[_0x4e1f07(0x295,0x259)]('status',status);}[_0x347d1c(-0xd5,-0xaf)](){function _0x485b99(_0x3eede2,_0x2934d0){return _0x4da2(_0x2934d0- -0x234,_0x3eede2);}return Math[_0x485b99(0xed,0x76)]()['toString'](0x24)['substring'](0x2,0xf);}['getState'](){return this['state'];}}function getEnvironment(){if(typeof navigator!==_0x1fb6ad(0x357,0x371)&&navigator['product']==='ReactNative')return _0x1fb6ad(0x381,0x342);function _0x1fb6ad(_0x303173,_0x1f28e0){return _0x4da2(_0x1f28e0-0x9b,_0x303173);}if(typeof window!==_0x1fb6ad(0x327,0x371)&&typeof document!==_0x1fb6ad(0x363,0x371))return _0x1fb6ad(0x2bd,0x2bd);if(typeof global!==_0x1fb6ad(0x346,0x371)&&typeof process!==_0x1fb6ad(0x30f,0x371)&&process['versions']?.['node'])return _0x1fb6ad(0x32b,0x399);return _0x1fb6ad(0x329,0x2bd);}function isSocketIOAvailable(){function _0x34966a(_0x80e11f,_0x119c12){return _0x4da2(_0x119c12-0x3ce,_0x80e11f);}try{const _0x24312f=getEnvironment();switch(_0x24312f){case _0x34966a(0x6c3,0x6cc):return typeof require!=='undefined'&&require[_0x34966a(0x643,0x600)]&&!!require['resolve'](_0x34966a(0x628,0x69f));case'browser':if(typeof globalThis!==_0x34966a(0x704,0x6a4)&&'io'in globalThis)return!![];return typeof require!=='undefined'&&require['resolve']&&!!require[_0x34966a(0x5b6,0x600)]('socket.io-client');case _0x34966a(0x621,0x675):try{return typeof require!==_0x34966a(0x6de,0x6a4)&&!!require('socket.io-client');}catch{return![];}default:return![];}}catch{return![];}}function getSocketIO(