@onairos/react-native 3.6.5 → 3.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/api/index.js +1 -1
- package/lib/commonjs/components/BodyText.js +1 -1
- package/lib/commonjs/components/BrandMark.js +1 -1
- package/lib/commonjs/components/CodeInput.js +1 -1
- package/lib/commonjs/components/EmailInput.js +1 -1
- package/lib/commonjs/components/GoogleButton.js +1 -1
- package/lib/commonjs/components/HeadingGroup.js +1 -1
- package/lib/commonjs/components/LLMDataInputModal.js +1 -1
- package/lib/commonjs/components/ModalHeader.js +1 -1
- package/lib/commonjs/components/ModalSheet.js +1 -1
- package/lib/commonjs/components/Onairos.js +1 -1
- package/lib/commonjs/components/OnairosButton.js +1 -1
- package/lib/commonjs/components/OnairosSignInButton.js +1 -1
- package/lib/commonjs/components/Overlay.js +1 -1
- package/lib/commonjs/components/PersonaImage.js +1 -1
- package/lib/commonjs/components/PersonaLoadingScreen.js +1 -1
- package/lib/commonjs/components/PersonalizationConsentScreen.js +1 -1
- package/lib/commonjs/components/PinCreationScreen.js +1 -1
- package/lib/commonjs/components/PinInput.js +1 -1
- package/lib/commonjs/components/PlatformConnectorsStep.js +1 -1
- package/lib/commonjs/components/PlatformList.js +1 -1
- package/lib/commonjs/components/PlatformToggle.js +1 -1
- package/lib/commonjs/components/PrimaryButton.js +1 -1
- package/lib/commonjs/components/SignInMatchAnimation.js +1 -1
- package/lib/commonjs/components/SignInStep.js +1 -1
- package/lib/commonjs/components/UniversalOnboarding.js +1 -1
- package/lib/commonjs/components/VerificationStep.js +1 -1
- package/lib/commonjs/components/WelcomeScreen.js +1 -1
- package/lib/commonjs/components/icons/Basicproficon.js +1 -1
- package/lib/commonjs/components/icons/Basicprofile.js +1 -1
- package/lib/commonjs/components/icons/Checkbox.js +1 -1
- package/lib/commonjs/components/icons/Checkmark.js +1 -1
- package/lib/commonjs/components/icons/Contentanalysis.js +1 -1
- package/lib/commonjs/components/icons/Contenticon.js +1 -1
- package/lib/commonjs/components/icons/EnochE.js +1 -1
- package/lib/commonjs/components/icons/Personalityicon.js +1 -1
- package/lib/commonjs/components/icons/Personalityprofile.js +1 -1
- package/lib/commonjs/components/icons/Personalitytraits.js +1 -1
- package/lib/commonjs/components/icons/Userpreferences.js +1 -1
- package/lib/commonjs/components/icons/index.js +1 -1
- package/lib/commonjs/components/onboarding/OAuthWebView.js +1 -1
- package/lib/commonjs/components/onboarding/OnboardingHeader.js +1 -1
- package/lib/commonjs/components/onboarding/PinInput.js +1 -1
- package/lib/commonjs/components/onboarding/PlatformConnector.js +1 -1
- package/lib/commonjs/config/api.js +1 -1
- package/lib/commonjs/constants/index.js +1 -1
- package/lib/commonjs/context/AuthContext.js +1 -1
- package/lib/commonjs/hooks/useConnectedAccounts.js +1 -1
- package/lib/commonjs/hooks/useConnections.js +1 -1
- package/lib/commonjs/hooks/useCredentials.js +1 -1
- package/lib/commonjs/hooks/useUserConnections.js +1 -1
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/services/apiClient.js +1 -1
- package/lib/commonjs/services/biometricPinService.js +1 -1
- package/lib/commonjs/services/chatGPTConversationExtractor.js +1 -1
- package/lib/commonjs/services/chatGPTConversationService.js +1 -1
- package/lib/commonjs/services/claudeConversationExtractor.js +1 -1
- package/lib/commonjs/services/claudeConversationService.js +1 -1
- package/lib/commonjs/services/connectedAccountsService.js +1 -1
- package/lib/commonjs/services/googleAuthService.js +1 -1
- package/lib/commonjs/services/hingeDataExtractor.js +1 -1
- package/lib/commonjs/services/hingeDataService.js +1 -1
- package/lib/commonjs/services/imageCompressionService.js +1 -1
- package/lib/commonjs/services/instagramDataExtractor.js +1 -1
- package/lib/commonjs/services/instagramDataService.js +1 -1
- package/lib/commonjs/services/jwtStorageService.js +1 -1
- package/lib/commonjs/services/linkedinDOMExtractor.js +1 -1
- package/lib/commonjs/services/linkedinProfileService.js +1 -1
- package/lib/commonjs/services/linkedinScrapingService.js +1 -1
- package/lib/commonjs/services/llmDataStorage.js +1 -1
- package/lib/commonjs/services/mobileTrainingService.js +1 -1
- package/lib/commonjs/services/pinEncryptionService.js +1 -1
- package/lib/commonjs/services/pinStorageUtils.js +1 -1
- package/lib/commonjs/services/platformAuthService.js +1 -1
- package/lib/commonjs/services/sephoraDataExtractor.js +1 -1
- package/lib/commonjs/services/sephoraDataService.js +1 -1
- package/lib/commonjs/services/storageService.js +1 -1
- package/lib/commonjs/services/telegramDataExtractor.js +1 -1
- package/lib/commonjs/services/telegramDataService.js +1 -1
- package/lib/commonjs/services/trainingApiHelpers.js +1 -1
- package/lib/commonjs/services/userConnectionsService.js +1 -1
- package/lib/commonjs/services/youtubeMigrationService.js +1 -1
- package/lib/commonjs/theme/index.js +1 -1
- package/lib/commonjs/types/index.js +1 -1
- package/lib/commonjs/types.js +1 -1
- package/lib/commonjs/utils/Portal.js +1 -1
- package/lib/commonjs/utils/api.js +1 -1
- package/lib/commonjs/utils/assetRegistry.js +1 -1
- package/lib/commonjs/utils/auth.js +1 -1
- package/lib/commonjs/utils/connectorTests.js +1 -1
- package/lib/commonjs/utils/crypto.js +1 -1
- package/lib/commonjs/utils/debugHelper.js +1 -1
- package/lib/commonjs/utils/encryption.js +1 -1
- package/lib/commonjs/utils/eventUtils.js +1 -1
- package/lib/commonjs/utils/haptics.js +1 -1
- package/lib/commonjs/utils/imagePreloader.js +1 -1
- package/lib/commonjs/utils/networkDiagnostics.js +1 -1
- package/lib/commonjs/utils/onairosApi.js +1 -1
- package/lib/commonjs/utils/programmaticFlow.js +1 -1
- package/lib/commonjs/utils/retryHelper.js +1 -1
- package/lib/commonjs/utils/secureStorage.js +1 -1
- package/lib/commonjs/utils/webviewScripts/chatgpt.js +1 -1
- package/lib/commonjs/utils/webviewScripts/claude.js +1 -1
- package/lib/commonjs/utils/webviewScripts/hinge.js +1 -1
- package/lib/commonjs/utils/webviewScripts/index.js +1 -1
- package/lib/commonjs/utils/webviewScripts/instagram.js +1 -1
- package/lib/commonjs/utils/webviewScripts/linkedin.js +1 -1
- package/lib/commonjs/utils/webviewScripts/sephora.js +1 -1
- package/lib/commonjs/utils/webviewScripts/telegram.js +1 -1
- package/lib/module/api/index.js +1 -1
- package/lib/module/components/BodyText.js +1 -1
- package/lib/module/components/BrandMark.js +1 -1
- package/lib/module/components/CodeInput.js +1 -1
- package/lib/module/components/EmailInput.js +1 -1
- package/lib/module/components/GoogleButton.js +1 -1
- package/lib/module/components/HeadingGroup.js +1 -1
- package/lib/module/components/LLMDataInputModal.js +1 -1
- package/lib/module/components/ModalHeader.js +1 -1
- package/lib/module/components/ModalSheet.js +1 -1
- package/lib/module/components/Onairos.js +1 -1
- package/lib/module/components/OnairosButton.js +1 -1
- package/lib/module/components/OnairosSignInButton.js +1 -1
- package/lib/module/components/Overlay.js +1 -1
- package/lib/module/components/PersonaImage.js +1 -1
- package/lib/module/components/PersonaLoadingScreen.js +1 -1
- package/lib/module/components/PersonalizationConsentScreen.js +1 -1
- package/lib/module/components/PinCreationScreen.js +1 -1
- package/lib/module/components/PinInput.js +1 -1
- package/lib/module/components/PlatformConnectorsStep.js +1 -1
- package/lib/module/components/PlatformList.js +1 -1
- package/lib/module/components/PlatformToggle.js +1 -1
- package/lib/module/components/PrimaryButton.js +1 -1
- package/lib/module/components/SignInMatchAnimation.js +1 -1
- package/lib/module/components/SignInStep.js +1 -1
- package/lib/module/components/UniversalOnboarding.js +1 -1
- package/lib/module/components/VerificationStep.js +1 -1
- package/lib/module/components/WelcomeScreen.js +1 -1
- package/lib/module/components/icons/Basicproficon.js +1 -1
- package/lib/module/components/icons/Basicprofile.js +1 -1
- package/lib/module/components/icons/Checkbox.js +1 -1
- package/lib/module/components/icons/Checkmark.js +1 -1
- package/lib/module/components/icons/Contentanalysis.js +1 -1
- package/lib/module/components/icons/Contenticon.js +1 -1
- package/lib/module/components/icons/EnochE.js +1 -1
- package/lib/module/components/icons/Personalityicon.js +1 -1
- package/lib/module/components/icons/Personalityprofile.js +1 -1
- package/lib/module/components/icons/Personalitytraits.js +1 -1
- package/lib/module/components/icons/Userpreferences.js +1 -1
- package/lib/module/components/onboarding/OAuthWebView.js +1 -1
- package/lib/module/components/onboarding/OnboardingHeader.js +1 -1
- package/lib/module/components/onboarding/PinInput.js +1 -1
- package/lib/module/components/onboarding/PlatformConnector.js +1 -1
- package/lib/module/config/api.js +1 -1
- package/lib/module/constants/index.js +1 -1
- package/lib/module/context/AuthContext.js +1 -1
- package/lib/module/hooks/useConnectedAccounts.js +1 -1
- package/lib/module/hooks/useConnections.js +1 -1
- package/lib/module/hooks/useCredentials.js +1 -1
- package/lib/module/hooks/useUserConnections.js +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/services/apiClient.js +1 -1
- package/lib/module/services/biometricPinService.js +1 -1
- package/lib/module/services/chatGPTConversationExtractor.js +1 -1
- package/lib/module/services/chatGPTConversationService.js +1 -1
- package/lib/module/services/claudeConversationExtractor.js +1 -1
- package/lib/module/services/claudeConversationService.js +1 -1
- package/lib/module/services/connectedAccountsService.js +1 -1
- package/lib/module/services/googleAuthService.js +1 -1
- package/lib/module/services/hingeDataExtractor.js +1 -1
- package/lib/module/services/hingeDataService.js +1 -1
- package/lib/module/services/imageCompressionService.js +1 -1
- package/lib/module/services/instagramDataExtractor.js +1 -1
- package/lib/module/services/instagramDataService.js +1 -1
- package/lib/module/services/jwtStorageService.js +1 -1
- package/lib/module/services/linkedinDOMExtractor.js +1 -1
- package/lib/module/services/linkedinProfileService.js +1 -1
- package/lib/module/services/linkedinScrapingService.js +1 -1
- package/lib/module/services/llmDataStorage.js +1 -1
- package/lib/module/services/mobileTrainingService.js +1 -1
- package/lib/module/services/pinEncryptionService.js +1 -1
- package/lib/module/services/pinStorageUtils.js +1 -1
- package/lib/module/services/platformAuthService.js +1 -1
- package/lib/module/services/sephoraDataExtractor.js +1 -1
- package/lib/module/services/sephoraDataService.js +1 -1
- package/lib/module/services/storageService.js +1 -1
- package/lib/module/services/telegramDataExtractor.js +1 -1
- package/lib/module/services/telegramDataService.js +1 -1
- package/lib/module/services/trainingApiHelpers.js +1 -1
- package/lib/module/services/userConnectionsService.js +1 -1
- package/lib/module/services/youtubeMigrationService.js +1 -1
- package/lib/module/theme/index.js +1 -1
- package/lib/module/types.js +1 -1
- package/lib/module/utils/Portal.js +1 -1
- package/lib/module/utils/api.js +1 -1
- package/lib/module/utils/assetRegistry.js +1 -1
- package/lib/module/utils/auth.js +1 -1
- package/lib/module/utils/connectorTests.js +1 -1
- package/lib/module/utils/crypto.js +1 -1
- package/lib/module/utils/debugHelper.js +1 -1
- package/lib/module/utils/encryption.js +1 -1
- package/lib/module/utils/eventUtils.js +1 -1
- package/lib/module/utils/haptics.js +1 -1
- package/lib/module/utils/networkDiagnostics.js +1 -1
- package/lib/module/utils/onairosApi.js +1 -1
- package/lib/module/utils/programmaticFlow.js +1 -1
- package/lib/module/utils/retryHelper.js +1 -1
- package/lib/module/utils/secureStorage.js +1 -1
- package/lib/module/utils/webviewScripts/chatgpt.js +1 -1
- package/lib/module/utils/webviewScripts/claude.js +1 -1
- package/lib/module/utils/webviewScripts/hinge.js +1 -1
- package/lib/module/utils/webviewScripts/index.js +1 -1
- package/lib/module/utils/webviewScripts/instagram.js +1 -1
- package/lib/module/utils/webviewScripts/linkedin.js +1 -1
- package/lib/module/utils/webviewScripts/sephora.js +1 -1
- package/lib/module/utils/webviewScripts/telegram.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const __DEV__=process[
|
|
1
|
+
const __DEV__=process[_0x403d(0x0)][_0x403d(0x1)]!==_0x403d(0x2);export const logDebug=(_0x17766d,_0x4ed4a7)=>{const _0x201ffc={'NruKD':function(_0x43e8e8,_0x9c30fd){return _0x43e8e8!==_0x9c30fd;},'GGuyU':'JWTne','LQOHV':function(_0x270d63,_0x25d451){return _0x270d63||_0x25d451;}};__DEV__&&(_0x201ffc[_0x403d(0x3)](_0x403d(0x4),_0x201ffc[_0x403d(0x5)])?console[_0x403d(0x6)](_0x403d(0x7)+_0x17766d+':',_0x201ffc[_0x403d(0x8)](_0x4ed4a7,'')):_0xdd5349&&_0x490bd7[_0x403d(0x9)]('[Onairos\x20Error]\x20'+_0x2017bc+':',_0x341f1e));};export const logError=(_0x19169c,_0x2a8d74)=>{__DEV__&&console[_0x403d(0x9)]('[Onairos\x20Error]\x20'+_0x19169c+':',_0x2a8d74);};export const isDebugMode=_0x53539e=>{const _0x935754={'cMiSi':function(_0x2398c7,_0x45654b){return _0x2398c7===_0x45654b;}};return _0x935754[_0x403d(0xa)](_0x53539e,!![])||__DEV__;};function _0x32fc(){const _0x1fd229=['env','NODE_ENV','production','NruKD','YcqoB','GGuyU','log','[Onairos\x20Debug]\x20','LQOHV','error','cMiSi','UxZij','cAcNS'];_0x32fc=function(){return _0x1fd229;};return _0x32fc();}function _0x403d(_0x32fca8,_0x403d22){_0x32fca8=_0x32fca8-0x0;const _0x545833=_0x32fc();let _0x219c76=_0x545833[_0x32fca8];return _0x219c76;}export const logApiRequest=(_0x51e60c,_0x8b73cf,_0x1fb341)=>{const _0x18e221={'UxZij':function(_0x3ca050,_0x4953aa,_0x1277cd){return _0x3ca050(_0x4953aa,_0x1277cd);},'cAcNS':'API\x20Request','qVwLW':function(_0x2b61e2,_0x291f83){return _0x2b61e2||_0x291f83;}};__DEV__&&_0x18e221[_0x403d(0xb)](logDebug,_0x18e221[_0x403d(0xc)],{'method':_0x51e60c,'url':_0x8b73cf,'data':_0x18e221['qVwLW'](_0x1fb341,{})});};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{onairosApi}from'../api';function
|
|
1
|
+
import{onairosApi}from'../api';function _0x7728(_0x15792d,_0x7728ee){_0x15792d=_0x15792d-0x0;const _0x55d955=_0x1579();let _0x2864bd=_0x55d955[_0x15792d];return _0x2864bd;}export const encryptModelKey=(_0xefd8c6,_0x5d7f54)=>{const _0x4e5f32={'jXbSR':_0x7728(0x0),'qBcqP':function(_0x1f6ac4,_0x5bf9d5){return _0x1f6ac4!==_0x5bf9d5;},'UNBdh':_0x7728(0x1),'ASMrs':_0x7728(0x2)};try{console[_0x7728(0x3)](_0x7728(0x4));if(!_0xefd8c6||!_0x5d7f54)throw new Error(_0x4e5f32[_0x7728(0x5)]);return _0x7728(0x6)+_0x5d7f54+'_'+Date[_0x7728(0x7)]();}catch(_0x5cc241){if(_0x4e5f32['qBcqP'](_0x4e5f32[_0x7728(0x8)],_0x4e5f32[_0x7728(0x8)]))throw new _0x519acc(_0x4e5f32[_0x7728(0x5)]);else{console[_0x7728(0x9)](_0x4e5f32[_0x7728(0xa)],_0x5cc241);throw _0x5cc241;}}};export const getServerPublicKey=async()=>{const _0x473bf8={'KZxhI':function(_0x1335b9,_0x2d0d2b){return _0x1335b9===_0x2d0d2b;},'tnHxH':_0x7728(0xb),'mXrTw':_0x7728(0xc),'yWuXm':function(_0x2ba2f8,_0x2b1491){return _0x2ba2f8!==_0x2b1491;},'zOCIl':function(_0x305fc9,_0x450d58){return _0x305fc9!==_0x450d58;},'XqMFn':function(_0x2b5de2,_0x385f50){return _0x2b5de2!==_0x385f50;},'rXpHj':function(_0x1943f0,_0x2cca0e){return _0x1943f0!==_0x2cca0e;},'FwhgU':_0x7728(0xd),'TtCBV':_0x7728(0xe),'cVLKV':function(_0x2bc9af,_0x4e4e7f){return _0x2bc9af!==_0x4e4e7f;},'CWlbM':function(_0x3ff451,_0x3b74ce){return _0x3ff451!==_0x3b74ce;},'kZzIk':_0x7728(0xf),'jDBMt':_0x7728(0x10)};try{if(_0x473bf8[_0x7728(0x11)](_0x7728(0x12),_0x473bf8['tnHxH'])){_0x5aff12['error'](_0x7728(0x2),_0x8a042a);throw _0x64da45;}else{var _0x5ea16f,_0x43d510;const _0x2abd66=await onairosApi['get'](_0x473bf8[_0x7728(0x13)]);if(_0x473bf8[_0x7728(0x14)](_0x2abd66,null)&&_0x473bf8[_0x7728(0x15)](_0x2abd66,void 0x0)&&_0x473bf8[_0x7728(0x15)](_0x5ea16f=_0x2abd66[_0x7728(0x16)],null)&&_0x473bf8[_0x7728(0x17)](_0x5ea16f,void 0x0)&&_0x473bf8['rXpHj'](_0x5ea16f=_0x5ea16f['data'],null)&&_0x473bf8[_0x7728(0x17)](_0x5ea16f,void 0x0)&&_0x5ea16f[_0x7728(0x18)]){if(_0x473bf8[_0x7728(0x19)]!==_0x473bf8[_0x7728(0x1a)])return _0x2abd66[_0x7728(0x16)][_0x7728(0x16)][_0x7728(0x18)];else throw new _0x17603d(_0x7728(0xf));}else{if(_0x473bf8[_0x7728(0x1b)](_0x2abd66,null)&&_0x2abd66!==void 0x0&&_0x473bf8['XqMFn'](_0x43d510=_0x2abd66[_0x7728(0x16)],null)&&_0x473bf8['CWlbM'](_0x43d510,void 0x0)&&_0x43d510[_0x7728(0x18)])return _0x2abd66['data'][_0x7728(0x18)];else throw new Error(_0x473bf8[_0x7728(0x1c)]);}}}catch(_0x14442d){return console[_0x7728(0x9)](_0x7728(0x1d),_0x14442d),_0x473bf8[_0x7728(0x1e)];}};export const hashString=async _0x395e6c=>{const _0x2a9162={'jclaU':'OPLwS','HahiH':'Error\x20hashing\x20string:'};try{return _0x7728(0x1f)+_0x395e6c[_0x7728(0x20)](/\s+/g,'_')+'_'+Date[_0x7728(0x7)]();}catch(_0x58c461){return _0x7728(0x21)!==_0x2a9162['jclaU']?(console[_0x7728(0x9)](_0x2a9162[_0x7728(0x22)],_0x58c461),_0x7728(0x23)+Date[_0x7728(0x7)]()):_0x1b87d3[_0x7728(0x16)]['data'][_0x7728(0x18)];}};function _0x1579(){const _0x28e4a6=['Public\x20key\x20or\x20model\x20key\x20is\x20missing','JxWSu','Error\x20encrypting\x20model\x20key:','log','Encrypting\x20model\x20key','jXbSR','encrypted_','now','UNBdh','error','ASMrs','jtqDm','public/getPublicKey','mwuLa','MbqQz','No\x20public\x20key\x20found\x20in\x20response','mock_public_key_for_testing','KZxhI','kCvxB','mXrTw','yWuXm','zOCIl','data','XqMFn','publicKey','FwhgU','TtCBV','cVLKV','kZzIk','Error\x20getting\x20server\x20public\x20key:','jDBMt','hash_','replace','XgHBa','HahiH','fallback_hash_'];_0x1579=function(){return _0x28e4a6;};return _0x1579();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const generateEventCode=(_0x31a6a8=0x6)=>{const _0x2cf297={'XNete':function(_0x58dd05){return _0x58dd05();},'AMeod':function(_0x38f9ed,_0x235f6b){return _0x38f9ed<_0x235f6b;},'ogIEq':_0x1c84(0x0)},_0xd700b2=_0x1c84(0x1);let _0x215d5e='';for(let _0x2caaef=0x0;_0x2cf297[_0x1c84(0x2)](_0x2caaef,_0x31a6a8);_0x2caaef++){if(_0x2cf297[_0x1c84(0x3)]!==_0x1c84(0x4))_0x215d5e+=_0xd700b2[_0x1c84(0x5)](Math['floor'](Math['random']()*_0xd700b2[_0x1c84(0x6)]));else return _0x2cf297[_0x1c84(0x7)](_0x35b586);}return _0x215d5e;};export const generateSmartEventCode=_0xa5e07c=>{const _0x431d26={'QnGsV':function(_0x55c9f8,_0x3c8c48){return _0x55c9f8(_0x3c8c48);},'ZpTdA':_0x1c84(0x8),'OwneW':_0x1c84(0x9),'SzBtf':function(_0x4f8a96){return _0x4f8a96();},'PWvlV':function(_0x3e33e8,_0x41cc15){return _0x3e33e8===_0x41cc15;},'QGziP':function(_0xe2493e,_0x330d5b){return _0xe2493e>=_0x330d5b;},'wQiiH':function(_0xf7a2ea,_0xc2c07c){return _0xf7a2ea-_0xc2c07c;},'CndQC':function(_0x5863be,_0x2f31bd){return _0x5863be>_0x2f31bd;},'hYNRa':function(_0x1ee788,_0x3a2b1c){return _0x1ee788!==_0x3a2b1c;},'ptZAp':'YndYt'};if(!_0xa5e07c[_0x1c84(0xa)]()){if(_0x431d26[_0x1c84(0xb)]!==_0x431d26[_0x1c84(0xc)])return _0x431d26[_0x1c84(0xd)](generateEventCode);else _0xa242c7+=_0x431d26[_0x1c84(0xe)](_0x4021d0,0x4-_0x3c6e14[_0x1c84(0x6)]);}const _0x118cfb=_0xa5e07c[_0x1c84(0xa)]()[_0x1c84(0xf)]()['replace'](/[^A-Z0-9\s]/g,'')['split'](/\s+/)['filter'](_0x2bcccf=>_0x2bcccf[_0x1c84(0x6)]>0x0);if(_0x431d26['PWvlV'](_0x118cfb[_0x1c84(0x6)],0x0))return _0x431d26[_0x1c84(0xd)](generateEventCode);let _0x5ed62d='';if(_0x431d26[_0x1c84(0x10)](_0x118cfb[_0x1c84(0x6)],0x2)){const _0x2c5131=_0x118cfb[_0x1c84(0x11)](0x0,0x3);_0x5ed62d=_0x2c5131[_0x1c84(0x12)](_0x5a2855=>_0x5a2855[_0x1c84(0x13)](0x0,0x2))[_0x1c84(0x14)]('');}else _0x5ed62d=_0x118cfb[0x0][_0x1c84(0x13)](0x0,0x4);const _0x173587=new Date()[_0x1c84(0x15)]()[_0x1c84(0x16)]()['slice'](-0x2);_0x5ed62d+=_0x173587;if(_0x5ed62d['length']<0x4)_0x5ed62d+=generateEventCode(_0x431d26[_0x1c84(0x17)](0x4,_0x5ed62d[_0x1c84(0x6)]));else{if(_0x431d26['CndQC'](_0x5ed62d[_0x1c84(0x6)],0x8)){if(_0x431d26[_0x1c84(0x18)](_0x431d26['ptZAp'],_0x431d26[_0x1c84(0x19)]))return![];else _0x5ed62d=_0x5ed62d['substring'](0x0,0x8);}}return _0x5ed62d;};export const validateEventCode=_0x11f7d0=>{const _0x243ce8={'nFLWE':function(_0xb3e6c2,_0x18a7b0){return _0xb3e6c2!==_0x18a7b0;},'OHLkz':_0x1c84(0x1a),'NwfZx':'llTPZ','HJJLb':_0x1c84(0x1b),'DdkPZ':function(_0x21c9b8,_0x328169){return _0x21c9b8>_0x328169;},'xZfct':_0x1c84(0x1c)};if(!_0x11f7d0||!_0x11f7d0['trim']())return{'isValid':![],'error':_0x1c84(0x1d)};const _0x4a23f7=_0x11f7d0[_0x1c84(0xa)]()['toUpperCase']();if(_0x4a23f7['length']<0x3)return _0x243ce8[_0x1c84(0x1e)](_0x243ce8[_0x1c84(0x1f)],_0x243ce8[_0x1c84(0x20)])?{'isValid':![],'error':_0x243ce8[_0x1c84(0x21)]}:{'isValid':![],'error':_0x1c84(0x1b)};if(_0x243ce8[_0x1c84(0x22)](_0x4a23f7[_0x1c84(0x6)],0xa))return{'isValid':![],'error':_0x243ce8[_0x1c84(0x23)]};if(!/^[A-Z0-9]+$/[_0x1c84(0x24)](_0x4a23f7))return{'isValid':![],'error':_0x1c84(0x25)};return{'isValid':!![]};};export const formatEventDate=_0x5d80a0=>{const _0x1b81d0={'doYIZ':'en-US','ZdPrV':_0x1c84(0x26),'GcAil':_0x1c84(0x27),'uXajq':function(_0x36f1c9,_0x3d48d6){return _0x36f1c9===_0x3d48d6;},'yjblD':'iXFih'};try{const _0x522221=new Date(_0x5d80a0);return _0x522221[_0x1c84(0x28)](_0x1b81d0[_0x1c84(0x29)],{'weekday':_0x1b81d0[_0x1c84(0x2a)],'year':_0x1b81d0[_0x1c84(0x2b)],'month':_0x1b81d0[_0x1c84(0x2a)],'day':_0x1b81d0[_0x1c84(0x2b)]});}catch(_0x3688ba){if(_0x1b81d0[_0x1c84(0x2c)](_0x1b81d0['yjblD'],_0x1b81d0['yjblD']))return _0x5d80a0;else _0x146e6d=_0x3b530b['substring'](0x0,0x8);}};export const isEventToday=_0x21f483=>{const _0x4fca0f={'oNcmn':function(_0xbe8512,_0x5decf1){return _0xbe8512===_0x5decf1;}};try{const _0x7d5a72=new Date(),_0x53e6fc=new Date(_0x21f483);return _0x4fca0f['oNcmn'](_0x7d5a72['getFullYear'](),_0x53e6fc[_0x1c84(0x15)]())&&_0x4fca0f[_0x1c84(0x2d)](_0x7d5a72['getMonth'](),_0x53e6fc['getMonth']())&&_0x4fca0f['oNcmn'](_0x7d5a72[_0x1c84(0x2e)](),_0x53e6fc['getDate']());}catch(_0x16e92b){return![];}};export const isEventPast=_0x1fcb10=>{const _0x179b6a={'heAnb':function(_0xc475a0,_0x3eae0a){return _0xc475a0===_0x3eae0a;},'BgFzI':function(_0x5d77f0,_0x4759e6){return _0x5d77f0===_0x4759e6;},'grefW':function(_0x35910e,_0x10eab5){return _0x35910e<_0x10eab5;}};try{const _0x580a2c=new Date(),_0x369580=new Date(_0x1fcb10);return _0x580a2c[_0x1c84(0x2f)](0x0,0x0,0x0,0x0),_0x369580[_0x1c84(0x2f)](0x0,0x0,0x0,0x0),_0x179b6a[_0x1c84(0x30)](_0x369580,_0x580a2c);}catch(_0x4ca9c7){if(_0x179b6a['heAnb'](_0x1c84(0x31),_0x1c84(0x32))){const _0x38c37e=new _0x34e479(),_0x3fe226=new _0x38441c(_0x59bde0);return _0x38c37e[_0x1c84(0x15)]()===_0x3fe226['getFullYear']()&&_0x179b6a['heAnb'](_0x38c37e[_0x1c84(0x33)](),_0x3fe226[_0x1c84(0x33)]())&&_0x179b6a[_0x1c84(0x34)](_0x38c37e[_0x1c84(0x2e)](),_0x3fe226[_0x1c84(0x2e)]());}else return![];}};export const getEventStatus=(_0x188307,_0x40af6a)=>{const _0xe4b6eb={'ZRZlz':function(_0x26c443,_0x4e7682){return _0x26c443<_0x4e7682;},'jJagz':'Inactive','YLrJq':function(_0x2ecf1c,_0x5d1f79){return _0x2ecf1c(_0x5d1f79);},'nLMTM':'KcxWJ','fumpJ':'Past','aETXw':function(_0x11f908,_0x531c39){return _0x11f908(_0x531c39);},'WlkvQ':function(_0x5183d5,_0x9ac818){return _0x5183d5!==_0x9ac818;},'ekMdY':_0x1c84(0x35),'VDnqq':_0x1c84(0x36)};if(!_0x40af6a)return _0xe4b6eb['jJagz'];if(_0xe4b6eb[_0x1c84(0x37)](isEventPast,_0x188307)){if(_0x1c84(0x38)!==_0xe4b6eb[_0x1c84(0x39)])return _0xe4b6eb[_0x1c84(0x3a)];else{const _0x447361=_0x30d4cf[_0x1c84(0x3b)](_0x1248ff=>_0x1248ff[_0x1c84(0x3c)]||[]);return _0x252819[_0x1c84(0x3d)](new _0x54befb(_0x447361))['sort']();}}if(_0xe4b6eb['aETXw'](isEventToday,_0x188307)){if(_0xe4b6eb['WlkvQ']('JqWEb',_0xe4b6eb[_0x1c84(0x3e)]))return _0xe4b6eb[_0x1c84(0x3f)];else try{const _0x5ed4dc=new _0x1b3230(),_0x5c0027=new _0x33134b(_0x22531d);return _0x5ed4dc[_0x1c84(0x2f)](0x0,0x0,0x0,0x0),_0x5c0027[_0x1c84(0x2f)](0x0,0x0,0x0,0x0),_0xe4b6eb['ZRZlz'](_0x5c0027,_0x5ed4dc);}catch(_0x24a350){return![];}}return _0x1c84(0x40);};export const getDaysUntilEvent=_0x366529=>{const _0x26bb46={'wOKTQ':_0x1c84(0x41),'pKWEb':_0x1c84(0x26),'TJBaM':'numeric','IjjtY':function(_0xb49d5,_0x5a3667){return _0xb49d5===_0x5a3667;},'QqiGM':'MRjEO','dIksT':function(_0x18ad82,_0x1fa12e){return _0x18ad82-_0x1fa12e;},'uxuLv':function(_0x20f3fb,_0xc81ca2){return _0x20f3fb*_0xc81ca2;},'rmirG':function(_0x18f30e,_0x4b71d6){return _0x18f30e*_0x4b71d6;}};try{if(_0x26bb46[_0x1c84(0x42)](_0x1c84(0x43),_0x26bb46[_0x1c84(0x44)])){const _0x23bd63=new Date(),_0x5073f2=new Date(_0x366529);_0x23bd63['setHours'](0x0,0x0,0x0,0x0),_0x5073f2[_0x1c84(0x2f)](0x0,0x0,0x0,0x0);const _0x3122b2=_0x26bb46[_0x1c84(0x45)](_0x5073f2['getTime'](),_0x23bd63[_0x1c84(0x46)]()),_0x459fdd=Math['ceil'](_0x3122b2/_0x26bb46[_0x1c84(0x47)](_0x26bb46[_0x1c84(0x47)](_0x26bb46[_0x1c84(0x48)](0x3e8,0x3c),0x3c),0x18));return _0x459fdd;}else try{const _0x3c60a5=new _0x31f408(_0x2eb4e6);return _0x3c60a5[_0x1c84(0x28)](_0x26bb46[_0x1c84(0x49)],{'weekday':_0x26bb46[_0x1c84(0x4a)],'year':_0x26bb46['TJBaM'],'month':_0x1c84(0x26),'day':_0x26bb46['TJBaM']});}catch(_0x50b0ad){return _0x2476e1;}}catch(_0x1dba2e){return 0x0;}};function _0x6c4d(){const _0x24a641=['Bglki','ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789','AMeod','ogIEq','zWMKo','charAt','length','XNete','EHaAy','goXNb','trim','ZpTdA','OwneW','SzBtf','QnGsV','toUpperCase','QGziP','slice','map','substring','join','getFullYear','toString','wQiiH','hYNRa','ptZAp','mTrnx','Event\x20code\x20must\x20be\x20at\x20least\x203\x20characters','Event\x20code\x20must\x20be\x2010\x20characters\x20or\x20less','Event\x20code\x20is\x20required','nFLWE','OHLkz','NwfZx','HJJLb','DdkPZ','xZfct','test','Event\x20code\x20must\x20contain\x20only\x20letters\x20and\x20numbers','long','numeric','toLocaleDateString','doYIZ','ZdPrV','GcAil','uXajq','oNcmn','getDate','setHours','grefW','lQKkV','JTHFe','getMonth','BgFzI','QmsZa','Today','YLrJq','ReTNR','nLMTM','fumpJ','flatMap','tags','from','ekMdY','VDnqq','Upcoming','en-US','IjjtY','MRjEO','QqiGM','dIksT','getTime','uxuLv','rmirG','wOKTQ','pKWEb','bMRjx','sort','ThwPp','ZHpVa','isActive','eventDate','uBLAM','Erafu','LVYId','ZxhAS','EXZLy','IqFLa','zxmKJ','EXTLW','gKTno','PgDnb','WnCST','BtUrI','toLowerCase','ywsGo','fKvUJ','ceil','hfjPj','includes','description','JDUPJ','location','organizer','haCLI','some','filter','kRHYH','reduce','attendeeCount','vVpiO','round','CKnGb'];_0x6c4d=function(){return _0x24a641;};return _0x6c4d();}export const sortEventsByDate=_0xc0f23f=>{const _0x55e2cc={'obViC':function(_0x2a4170){return _0x2a4170();},'ThwPp':function(_0x9bbe85,_0x4aeecb){return _0x9bbe85!==_0x4aeecb;},'ZHpVa':'zxnYr','uBLAM':function(_0x1f9ab4,_0x44047c){return _0x1f9ab4<_0x44047c;},'Erafu':function(_0x5778dc,_0x61a1b8){return _0x5778dc&&_0x61a1b8;},'LVYId':function(_0x1636af,_0x59a218){return _0x1636af&&_0x59a218;},'ZxhAS':function(_0xff2084,_0x10df97){return _0xff2084!==_0x10df97;},'EXZLy':'CybeE','PgDnb':function(_0xdb846b,_0x553093){return _0xdb846b-_0x553093;},'zxmKJ':function(_0x1d2481,_0x4007b9){return _0x1d2481!==_0x4007b9;},'EXTLW':'Etsvx','gKTno':_0x1c84(0x4b)};return _0xc0f23f[_0x1c84(0x4c)]((_0x2634af,_0x53feb6)=>{const _0x495bac={'IqFLa':function(_0x1b0363,_0x4a5063){return _0x1b0363-_0x4a5063;}};if(_0x55e2cc[_0x1c84(0x4d)](_0x55e2cc[_0x1c84(0x4e)],_0x55e2cc[_0x1c84(0x4e)]))return![];else{if(_0x2634af[_0x1c84(0x4f)]&&!_0x53feb6['isActive'])return-0x1;if(!_0x2634af[_0x1c84(0x4f)]&&_0x53feb6['isActive'])return 0x1;const _0x25867=new Date(_0x2634af['eventDate']),_0x1fb040=new Date(_0x53feb6[_0x1c84(0x50)]),_0xf2cb57=new Date(),_0x5d7c4e=_0x55e2cc['uBLAM'](_0x25867,_0xf2cb57),_0x55da4f=_0x55e2cc[_0x1c84(0x51)](_0x1fb040,_0xf2cb57);if(_0x55e2cc[_0x1c84(0x52)](_0x5d7c4e,!_0x55da4f))return 0x1;if(_0x55e2cc[_0x1c84(0x53)](!_0x5d7c4e,_0x55da4f))return-0x1;return _0x55e2cc[_0x1c84(0x52)](_0x5d7c4e,_0x55da4f)?_0x55e2cc[_0x1c84(0x54)](_0x55e2cc[_0x1c84(0x55)],_0x55e2cc[_0x1c84(0x55)])?_0x495bac[_0x1c84(0x56)](_0x188ab6[_0x1c84(0x46)](),_0x18c2b3[_0x1c84(0x46)]()):_0x55e2cc['PgDnb'](_0x1fb040[_0x1c84(0x46)](),_0x25867[_0x1c84(0x46)]()):_0x55e2cc[_0x1c84(0x57)](_0x55e2cc[_0x1c84(0x58)],_0x55e2cc[_0x1c84(0x59)])?_0x55e2cc[_0x1c84(0x5a)](_0x25867['getTime'](),_0x1fb040[_0x1c84(0x46)]()):_0x55e2cc['obViC'](_0x2f703a);}});};export const filterEventsBySearch=(_0x3cd286,_0xdb1d1)=>{const _0x310c5c={'SSiTw':function(_0x3c5b73,_0x1055f2){return _0x3c5b73-_0x1055f2;},'qbnGg':function(_0x5cf910,_0x564383){return _0x5cf910/_0x564383;},'hfjPj':function(_0x364dd3,_0x731485){return _0x364dd3*_0x731485;},'qFtTk':function(_0x15028d,_0x5bad1e){return _0x15028d*_0x5bad1e;},'ywsGo':_0x1c84(0x5b),'fKvUJ':_0x1c84(0x5c),'JDUPJ':function(_0x3be734,_0x54f204){return _0x3be734===_0x54f204;},'haCLI':function(_0x869214,_0x3f5cf8){return _0x869214===_0x3f5cf8;}};if(!_0xdb1d1['trim']())return _0x3cd286;const _0x4197cf=_0xdb1d1[_0x1c84(0x5d)]()['trim']();return _0x3cd286['filter'](_0x476159=>{if(_0x310c5c[_0x1c84(0x5e)]===_0x310c5c[_0x1c84(0x5f)]){const _0x2b19b7=new _0x11dc12(),_0x1e6294=new _0x723035(_0xf43f4b);_0x2b19b7[_0x1c84(0x2f)](0x0,0x0,0x0,0x0),_0x1e6294[_0x1c84(0x2f)](0x0,0x0,0x0,0x0);const _0x349f9c=_0x310c5c['SSiTw'](_0x1e6294['getTime'](),_0x2b19b7[_0x1c84(0x46)]()),_0x50c1b2=_0x30d640[_0x1c84(0x60)](_0x310c5c['qbnGg'](_0x349f9c,_0x310c5c['hfjPj'](_0x310c5c[_0x1c84(0x61)](_0x310c5c['qFtTk'](0x3e8,0x3c),0x3c),0x18)));return _0x50c1b2;}else{var _0x593831,_0x531b08,_0x39834c;return _0x476159['title'][_0x1c84(0x5d)]()[_0x1c84(0x62)](_0x4197cf)||_0x476159[_0x1c84(0x63)][_0x1c84(0x5d)]()[_0x1c84(0x62)](_0x4197cf)||_0x476159['code'][_0x1c84(0x5d)]()[_0x1c84(0x62)](_0x4197cf)||(_0x310c5c[_0x1c84(0x64)](_0x593831=_0x476159[_0x1c84(0x65)],null)||_0x310c5c[_0x1c84(0x64)](_0x593831,void 0x0)?void 0x0:_0x593831['toLowerCase']()['includes'](_0x4197cf))||((_0x531b08=_0x476159[_0x1c84(0x66)])===null||_0x531b08===void 0x0?void 0x0:_0x531b08[_0x1c84(0x5d)]()[_0x1c84(0x62)](_0x4197cf))||(_0x310c5c['haCLI'](_0x39834c=_0x476159[_0x1c84(0x3c)],null)||_0x310c5c[_0x1c84(0x67)](_0x39834c,void 0x0)?void 0x0:_0x39834c[_0x1c84(0x68)](_0x1f67a1=>_0x1f67a1['toLowerCase']()[_0x1c84(0x62)](_0x4197cf)));}});};function _0x1c84(_0x6c4dd0,_0x1c8490){_0x6c4dd0=_0x6c4dd0-0x0;const _0x44c515=_0x6c4d();let _0x3cbdbf=_0x44c515[_0x6c4dd0];return _0x3cbdbf;}export const getUniqueEventTags=_0x2d786e=>{const _0x34df4a=_0x2d786e[_0x1c84(0x3b)](_0x2ee754=>_0x2ee754[_0x1c84(0x3c)]||[]);return Array['from'](new Set(_0x34df4a))[_0x1c84(0x4c)]();};export const calculateEventStats=_0x26d86c=>{const _0x3e9e88={'kRHYH':function(_0x5bbc62,_0x497fc1){return _0x5bbc62-_0x497fc1;},'vVpiO':function(_0x36bdd5,_0x323650){return _0x36bdd5>_0x323650;},'CKnGb':function(_0x1371e3,_0x335844){return _0x1371e3/_0x335844;}},_0x34990f=_0x26d86c[_0x1c84(0x6)],_0x2fd849=_0x26d86c[_0x1c84(0x69)](_0x3b8d7e=>_0x3b8d7e[_0x1c84(0x4f)])['length'],_0x3e08bc=_0x3e9e88[_0x1c84(0x6a)](_0x34990f,_0x2fd849),_0x18fd13=_0x26d86c[_0x1c84(0x6b)]((_0x5c2830,_0x1536b7)=>_0x5c2830+_0x1536b7[_0x1c84(0x6c)],0x0),_0x5a2c8b=_0x26d86c['reduce']((_0x422131,_0x4174d)=>_0x422131+_0x4174d['maxAttendees'],0x0),_0x1e0e59=_0x26d86c[_0x1c84(0x69)](_0x474091=>_0x474091[_0x1c84(0x4f)]&&!isEventPast(_0x474091[_0x1c84(0x50)]))[_0x1c84(0x6)],_0x5ea764=_0x26d86c[_0x1c84(0x69)](_0x437c94=>isEventPast(_0x437c94[_0x1c84(0x50)]))[_0x1c84(0x6)],_0x77efc9=_0x26d86c[_0x1c84(0x69)](_0xfd7e35=>_0xfd7e35['isActive']&&isEventToday(_0xfd7e35['eventDate']))['length'];return{'total':_0x34990f,'active':_0x2fd849,'inactive':_0x3e08bc,'upcoming':_0x1e0e59,'past':_0x5ea764,'today':_0x77efc9,'totalAttendees':_0x18fd13,'totalCapacity':_0x5a2c8b,'averageAttendance':_0x3e9e88[_0x1c84(0x6d)](_0x5a2c8b,0x0)?Math[_0x1c84(0x6e)](_0x3e9e88[_0x1c84(0x6f)](_0x18fd13,_0x5a2c8b)*0x64):0x0};};
|
|
1
|
+
export const generateEventCode=(_0xe13f29=0x6)=>{const _0x53f446={'LlNpU':_0x580f(0x0),'EGkEm':function(_0x58c289,_0x2b6280){return _0x58c289<_0x2b6280;},'ajmke':function(_0x4e7fd1,_0x4493bf){return _0x4e7fd1*_0x4493bf;}},_0x4b6a8d=_0x53f446[_0x580f(0x1)];let _0x115df9='';for(let _0x46f5dc=0x0;_0x53f446[_0x580f(0x2)](_0x46f5dc,_0xe13f29);_0x46f5dc++){_0x115df9+=_0x4b6a8d[_0x580f(0x3)](Math[_0x580f(0x4)](_0x53f446[_0x580f(0x5)](Math[_0x580f(0x6)](),_0x4b6a8d['length'])));}return _0x115df9;};export const generateSmartEventCode=_0x494f62=>{const _0x274fc6={'uWctb':function(_0xb13bec){return _0xb13bec();},'wIqqi':function(_0x2911a1,_0x17f020){return _0x2911a1===_0x17f020;},'ortoB':function(_0x40b5f1,_0x375f7e){return _0x40b5f1>=_0x375f7e;},'BuVlf':function(_0x180ef3,_0x3c570b){return _0x180ef3<_0x3c570b;},'hgmHX':function(_0x5a6f7b,_0x1d8d0f){return _0x5a6f7b(_0x1d8d0f);},'WdARD':function(_0x48db43,_0x58a72f){return _0x48db43-_0x58a72f;}};if(!_0x494f62[_0x580f(0x7)]())return _0x274fc6[_0x580f(0x8)](generateEventCode);const _0x3bbbc1=_0x494f62[_0x580f(0x7)]()['toUpperCase']()['replace'](/[^A-Z0-9\s]/g,'')[_0x580f(0x9)](/\s+/)[_0x580f(0xa)](_0x2ad39f=>_0x2ad39f[_0x580f(0xb)]>0x0);if(_0x274fc6[_0x580f(0xc)](_0x3bbbc1[_0x580f(0xb)],0x0))return _0x274fc6[_0x580f(0x8)](generateEventCode);let _0xd96108='';if(_0x274fc6[_0x580f(0xd)](_0x3bbbc1[_0x580f(0xb)],0x2)){const _0x21bb01=_0x3bbbc1[_0x580f(0xe)](0x0,0x3);_0xd96108=_0x21bb01[_0x580f(0xf)](_0x51cf98=>_0x51cf98[_0x580f(0x10)](0x0,0x2))[_0x580f(0x11)]('');}else _0xd96108=_0x3bbbc1[0x0][_0x580f(0x10)](0x0,0x4);const _0x2c836d=new Date()[_0x580f(0x12)]()[_0x580f(0x13)]()[_0x580f(0xe)](-0x2);_0xd96108+=_0x2c836d;if(_0x274fc6[_0x580f(0x14)](_0xd96108[_0x580f(0xb)],0x4))_0xd96108+=_0x274fc6['hgmHX'](generateEventCode,_0x274fc6[_0x580f(0x15)](0x4,_0xd96108[_0x580f(0xb)]));else _0xd96108[_0x580f(0xb)]>0x8&&(_0xd96108=_0xd96108[_0x580f(0x10)](0x0,0x8));return _0xd96108;};export const validateEventCode=_0x5ca7ab=>{const _0x58d24f={'zGOni':function(_0x3d0788,_0xe76400){return _0x3d0788===_0xe76400;},'AgRPn':function(_0x169f93,_0x390cb9){return _0x169f93===_0x390cb9;},'RSrzn':function(_0x4b806e,_0x13b232){return _0x4b806e===_0x13b232;},'PYQNr':function(_0x26e1f2,_0x4fbb8c){return _0x26e1f2<_0x4fbb8c;},'adouZ':function(_0x42a5c5,_0x14c3cb){return _0x42a5c5&&_0x14c3cb;},'pfOrZ':function(_0x58e3a5,_0x4063bc){return _0x58e3a5-_0x4063bc;},'wbGTB':'WkUyH','SbcLY':'Event\x20code\x20is\x20required','iNhLO':_0x580f(0x16),'PtsjG':function(_0x2bd6db,_0x133ae0){return _0x2bd6db>_0x133ae0;},'fimNh':_0x580f(0x17),'SCQAm':_0x580f(0x18)};if(!_0x5ca7ab||!_0x5ca7ab[_0x580f(0x7)]()){if(_0x58d24f[_0x580f(0x19)](_0x580f(0x1a),_0x58d24f[_0x580f(0x1b)]))try{const _0x2b9259=new _0x4d3489(),_0x228246=new _0x4589d8(_0x40601d);return _0x58d24f[_0x580f(0x1c)](_0x2b9259[_0x580f(0x12)](),_0x228246[_0x580f(0x12)]())&&_0x58d24f['AgRPn'](_0x2b9259['getMonth'](),_0x228246[_0x580f(0x1d)]())&&_0x58d24f[_0x580f(0x19)](_0x2b9259['getDate'](),_0x228246['getDate']());}catch(_0x63b90c){return![];}else return{'isValid':![],'error':_0x58d24f[_0x580f(0x1e)]};}const _0x1fd8c6=_0x5ca7ab[_0x580f(0x7)]()['toUpperCase']();if(_0x58d24f[_0x580f(0x1f)](_0x1fd8c6['length'],0x3))return{'isValid':![],'error':_0x58d24f['iNhLO']};if(_0x58d24f['PtsjG'](_0x1fd8c6[_0x580f(0xb)],0xa))return{'isValid':![],'error':_0x58d24f[_0x580f(0x20)]};if(!/^[A-Z0-9]+$/[_0x580f(0x21)](_0x1fd8c6)){if(_0x58d24f[_0x580f(0x19)](_0x58d24f['SCQAm'],_0x580f(0x18)))return{'isValid':![],'error':'Event\x20code\x20must\x20contain\x20only\x20letters\x20and\x20numbers'};else{if(_0x28ca26[_0x580f(0x22)]&&!_0x5b7462[_0x580f(0x22)])return-0x1;if(!_0x564025[_0x580f(0x22)]&&_0x197ef6[_0x580f(0x22)])return 0x1;const _0x5295f4=new _0x5cc297(_0x38c01f['eventDate']),_0x2c44ec=new _0x53d8a5(_0x419419[_0x580f(0x23)]),_0xb64e7=new _0x16a2f5(),_0x2d157d=_0x58d24f[_0x580f(0x1f)](_0x5295f4,_0xb64e7),_0x2dbb87=_0x2c44ec<_0xb64e7;if(_0x58d24f[_0x580f(0x24)](_0x2d157d,!_0x2dbb87))return 0x1;if(_0x58d24f[_0x580f(0x24)](!_0x2d157d,_0x2dbb87))return-0x1;return _0x58d24f['adouZ'](_0x2d157d,_0x2dbb87)?_0x58d24f[_0x580f(0x25)](_0x2c44ec[_0x580f(0x26)](),_0x5295f4['getTime']()):_0x58d24f[_0x580f(0x25)](_0x5295f4[_0x580f(0x26)](),_0x2c44ec[_0x580f(0x26)]());}}return{'isValid':!![]};};function _0x580f(_0x33b6c2,_0x580ffd){_0x33b6c2=_0x33b6c2-0x0;const _0x3b0d82=_0x33b6();let _0x2072c5=_0x3b0d82[_0x33b6c2];return _0x2072c5;}export const formatEventDate=_0x2e0e09=>{const _0xfbf3a3={'tgVql':'en-US','rrcph':_0x580f(0x27),'EDJEy':'numeric'};try{const _0x20b90e=new Date(_0x2e0e09);return _0x20b90e['toLocaleDateString'](_0xfbf3a3[_0x580f(0x28)],{'weekday':_0xfbf3a3[_0x580f(0x29)],'year':_0xfbf3a3[_0x580f(0x2a)],'month':_0xfbf3a3[_0x580f(0x29)],'day':_0xfbf3a3[_0x580f(0x2a)]});}catch(_0x2a743a){return _0x2e0e09;}};export const isEventToday=_0x557109=>{const _0x279f27={'QsJHw':function(_0x42b125){return _0x42b125();},'lopHO':function(_0x52f4a1,_0x42c012){return _0x52f4a1===_0x42c012;},'vmIXv':function(_0x41c261,_0x40bbaa){return _0x41c261!==_0x40bbaa;},'tdpuw':'FiOLA'};try{const _0x29dbd8=new Date(),_0x3de214=new Date(_0x557109);return _0x279f27[_0x580f(0x2b)](_0x29dbd8[_0x580f(0x12)](),_0x3de214[_0x580f(0x12)]())&&_0x29dbd8[_0x580f(0x1d)]()===_0x3de214['getMonth']()&&_0x279f27[_0x580f(0x2b)](_0x29dbd8[_0x580f(0x2c)](),_0x3de214[_0x580f(0x2c)]());}catch(_0x5c11df){return _0x279f27['vmIXv'](_0x279f27[_0x580f(0x2d)],_0x580f(0x2e))?![]:_0x279f27[_0x580f(0x2f)](_0x5a197a);}};function _0x33b6(){const _0x304859=['ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789','LlNpU','EGkEm','charAt','floor','ajmke','random','trim','uWctb','split','filter','length','wIqqi','ortoB','slice','map','substring','join','getFullYear','toString','BuVlf','WdARD','Event\x20code\x20must\x20be\x20at\x20least\x203\x20characters','Event\x20code\x20must\x20be\x2010\x20characters\x20or\x20less','JrOka','RSrzn','OEGyb','wbGTB','zGOni','getMonth','SbcLY','PYQNr','fimNh','test','isActive','eventDate','adouZ','pfOrZ','getTime','long','tgVql','rrcph','EDJEy','lopHO','getDate','tdpuw','pppHI','QsJHw','pTBmO','tungi','setHours','Qgybx','nPrVd','Inactive','Edodt','EHCBY','WeLiX','Today','Upcoming','fUKcu','DNRNo','isCFD','ceil','FJVra','mRqMa','JntOY','Nvjjp','okOjR','VDjda','XwGXS','JcyiP','aiRDW','HMBuZ','teoNv','FWhbf','VFduP','toLowerCase','Tosgi','bmAjl','iPtmk','tags','from','sort','title','includes','description','code','BDGPF','some','flatMap','FGfKK','attendeeCount','reduce','bAvMy'];_0x33b6=function(){return _0x304859;};return _0x33b6();}export const isEventPast=_0x41afcd=>{const _0x6e56eb={'rHDpr':function(_0x64756f,_0x398462){return _0x64756f<_0x398462;},'Qgybx':_0x580f(0x30),'nPrVd':_0x580f(0x31)};try{const _0x54dad6=new Date(),_0x5e307a=new Date(_0x41afcd);return _0x54dad6[_0x580f(0x32)](0x0,0x0,0x0,0x0),_0x5e307a[_0x580f(0x32)](0x0,0x0,0x0,0x0),_0x6e56eb['rHDpr'](_0x5e307a,_0x54dad6);}catch(_0x5b9d39){return _0x6e56eb[_0x580f(0x33)]!==_0x6e56eb[_0x580f(0x34)]?![]:![];}};export const getEventStatus=(_0x15c1ca,_0x7bcb55)=>{const _0x719e32={'Edodt':_0x580f(0x35),'EHCBY':'Past','WeLiX':function(_0x2728ae,_0x53c6dc){return _0x2728ae(_0x53c6dc);}};if(!_0x7bcb55)return _0x719e32[_0x580f(0x36)];if(isEventPast(_0x15c1ca))return _0x719e32[_0x580f(0x37)];if(_0x719e32[_0x580f(0x38)](isEventToday,_0x15c1ca))return _0x580f(0x39);return _0x580f(0x3a);};export const getDaysUntilEvent=_0x392458=>{const _0x1c3826={'DNRNo':function(_0x2f49cc,_0x37bb4f){return _0x2f49cc!==_0x37bb4f;},'isCFD':_0x580f(0x3b),'FJVra':function(_0xe8749a,_0x5547eb){return _0xe8749a/_0x5547eb;},'jfXwx':function(_0xc68dec,_0x1db7dd){return _0xc68dec*_0x1db7dd;}};try{if(_0x1c3826[_0x580f(0x3c)](_0x1c3826[_0x580f(0x3d)],_0x1c3826[_0x580f(0x3d)]))_0x4bed5f=_0x5bd593[0x0][_0x580f(0x10)](0x0,0x4);else{const _0x442422=new Date(),_0x27e17f=new Date(_0x392458);_0x442422[_0x580f(0x32)](0x0,0x0,0x0,0x0),_0x27e17f[_0x580f(0x32)](0x0,0x0,0x0,0x0);const _0x375e36=_0x27e17f[_0x580f(0x26)]()-_0x442422[_0x580f(0x26)](),_0xbb4182=Math[_0x580f(0x3e)](_0x1c3826[_0x580f(0x3f)](_0x375e36,_0x1c3826['jfXwx'](0x3e8*0x3c*0x3c,0x18)));return _0xbb4182;}}catch(_0x22c7f3){return 0x0;}};export const sortEventsByDate=_0x5b4ec6=>{const _0x423444={'teoNv':function(_0x4ac54d,_0x244365){return _0x4ac54d<_0x244365;},'cVRNH':function(_0x3f9f16,_0x576e90){return _0x3f9f16<_0x576e90;},'Nvjjp':function(_0x2d7b97,_0x4f957a){return _0x2d7b97<_0x4f957a;},'okOjR':function(_0x2ca1ca,_0xf69e62){return _0x2ca1ca&&_0xf69e62;},'VDjda':function(_0x56b3e1,_0x429e95){return _0x56b3e1&&_0x429e95;},'XwGXS':function(_0x2f71b7,_0xa3609b){return _0x2f71b7&&_0xa3609b;},'JcyiP':function(_0x5d2bb5,_0x508fba){return _0x5d2bb5===_0x508fba;},'aiRDW':_0x580f(0x40),'HMBuZ':_0x580f(0x41),'FWhbf':function(_0x4ed067,_0x1ffd92){return _0x4ed067-_0x1ffd92;}};return _0x5b4ec6['sort']((_0x1e4883,_0x4d73ad)=>{if(_0x1e4883[_0x580f(0x22)]&&!_0x4d73ad[_0x580f(0x22)])return-0x1;if(!_0x1e4883[_0x580f(0x22)]&&_0x4d73ad['isActive'])return 0x1;const _0x5b8613=new Date(_0x1e4883[_0x580f(0x23)]),_0x239604=new Date(_0x4d73ad[_0x580f(0x23)]),_0x2a27f4=new Date(),_0x5cd8c1=_0x423444['cVRNH'](_0x5b8613,_0x2a27f4),_0x28a5e7=_0x423444[_0x580f(0x42)](_0x239604,_0x2a27f4);if(_0x423444[_0x580f(0x43)](_0x5cd8c1,!_0x28a5e7))return 0x1;if(_0x423444[_0x580f(0x44)](!_0x5cd8c1,_0x28a5e7))return-0x1;if(_0x423444[_0x580f(0x45)](_0x5cd8c1,_0x28a5e7))return _0x239604[_0x580f(0x26)]()-_0x5b8613[_0x580f(0x26)]();else{if(_0x423444[_0x580f(0x46)](_0x423444[_0x580f(0x47)],_0x423444[_0x580f(0x48)])){const _0x73eaf4=new _0x272757(),_0x9ff5df=new _0xed2c(_0x463dd3);return _0x73eaf4[_0x580f(0x32)](0x0,0x0,0x0,0x0),_0x9ff5df['setHours'](0x0,0x0,0x0,0x0),_0x423444[_0x580f(0x49)](_0x9ff5df,_0x73eaf4);}else return _0x423444[_0x580f(0x4a)](_0x5b8613[_0x580f(0x26)](),_0x239604[_0x580f(0x26)]());}});};export const filterEventsBySearch=(_0x460929,_0x2c83d2)=>{const _0x4b41f9={'Tosgi':function(_0x33e9ba,_0x3db10f){return _0x33e9ba===_0x3db10f;},'bmAjl':_0x580f(0x4b),'BDGPF':function(_0xf60405,_0x4927a2){return _0xf60405===_0x4927a2;},'lrXit':function(_0x4308ed,_0x23e667){return _0x4308ed===_0x23e667;}};if(!_0x2c83d2[_0x580f(0x7)]())return _0x460929;const _0xd57210=_0x2c83d2[_0x580f(0x4c)]()[_0x580f(0x7)]();return _0x460929['filter'](_0x5eda79=>{if(_0x4b41f9[_0x580f(0x4d)](_0x4b41f9[_0x580f(0x4e)],_0x580f(0x4f))){const _0x40cc5a=_0x5e97cd['flatMap'](_0x645efa=>_0x645efa[_0x580f(0x50)]||[]);return _0x2a3857[_0x580f(0x51)](new _0x16adb7(_0x40cc5a))[_0x580f(0x52)]();}else{var _0x220f66,_0x3dee2d,_0x99a569;return _0x5eda79[_0x580f(0x53)]['toLowerCase']()[_0x580f(0x54)](_0xd57210)||_0x5eda79[_0x580f(0x55)][_0x580f(0x4c)]()['includes'](_0xd57210)||_0x5eda79[_0x580f(0x56)][_0x580f(0x4c)]()[_0x580f(0x54)](_0xd57210)||(_0x4b41f9[_0x580f(0x4d)](_0x220f66=_0x5eda79['location'],null)||_0x4b41f9[_0x580f(0x4d)](_0x220f66,void 0x0)?void 0x0:_0x220f66[_0x580f(0x4c)]()[_0x580f(0x54)](_0xd57210))||(_0x4b41f9[_0x580f(0x57)](_0x3dee2d=_0x5eda79['organizer'],null)||_0x4b41f9[_0x580f(0x4d)](_0x3dee2d,void 0x0)?void 0x0:_0x3dee2d[_0x580f(0x4c)]()[_0x580f(0x54)](_0xd57210))||(_0x4b41f9[_0x580f(0x57)](_0x99a569=_0x5eda79[_0x580f(0x50)],null)||_0x4b41f9['lrXit'](_0x99a569,void 0x0)?void 0x0:_0x99a569[_0x580f(0x58)](_0x4dee9d=>_0x4dee9d[_0x580f(0x4c)]()[_0x580f(0x54)](_0xd57210)));}});};export const getUniqueEventTags=_0x2dc944=>{const _0x41e5c8=_0x2dc944[_0x580f(0x59)](_0x5d8572=>_0x5d8572[_0x580f(0x50)]||[]);return Array[_0x580f(0x51)](new Set(_0x41e5c8))['sort']();};export const calculateEventStats=_0x1bda65=>{const _0x50e9c4={'FGfKK':function(_0x9975b9,_0x283f4e){return _0x9975b9-_0x283f4e;},'lmzZj':function(_0x3f4444,_0x55c536){return _0x3f4444*_0x55c536;},'bAvMy':function(_0x1954c7,_0x3bb788){return _0x1954c7/_0x3bb788;}},_0x1cfc10=_0x1bda65['length'],_0x53d869=_0x1bda65['filter'](_0x3f52de=>_0x3f52de[_0x580f(0x22)])[_0x580f(0xb)],_0x438181=_0x50e9c4[_0x580f(0x5a)](_0x1cfc10,_0x53d869),_0x15de08=_0x1bda65['reduce']((_0x8577a3,_0x37ea65)=>_0x8577a3+_0x37ea65[_0x580f(0x5b)],0x0),_0x390b07=_0x1bda65[_0x580f(0x5c)]((_0x1a3364,_0x7fc149)=>_0x1a3364+_0x7fc149['maxAttendees'],0x0),_0x91d419=_0x1bda65[_0x580f(0xa)](_0x27bbc7=>_0x27bbc7[_0x580f(0x22)]&&!isEventPast(_0x27bbc7[_0x580f(0x23)]))[_0x580f(0xb)],_0x5507a4=_0x1bda65['filter'](_0x2ecc07=>isEventPast(_0x2ecc07[_0x580f(0x23)]))[_0x580f(0xb)],_0x16b02b=_0x1bda65[_0x580f(0xa)](_0x34ee52=>_0x34ee52[_0x580f(0x22)]&&isEventToday(_0x34ee52[_0x580f(0x23)]))[_0x580f(0xb)];return{'total':_0x1cfc10,'active':_0x53d869,'inactive':_0x438181,'upcoming':_0x91d419,'past':_0x5507a4,'today':_0x16b02b,'totalAttendees':_0x15de08,'totalCapacity':_0x390b07,'averageAttendance':_0x390b07>0x0?Math['round'](_0x50e9c4['lmzZj'](_0x50e9c4[_0x580f(0x5d)](_0x15de08,_0x390b07),0x64)):0x0};};
|
|
@@ -5,4 +5,4 @@ var __ONAIROS_REQ_REGISTRY__ = [
|
|
|
5
5
|
require('react-native')
|
|
6
6
|
];
|
|
7
7
|
function __ONAIROS_REQ_FUNC__(i) { return __ONAIROS_REQ_REGISTRY__[i]; }
|
|
8
|
-
import{Platform}from'react-native';export let HapticType=function(
|
|
8
|
+
import{Platform}from'react-native';export let HapticType=function(_0x3b1bf0){const _0x1853eb={'XIqJp':_0x4f85(0x0),'NxaTZ':_0x4f85(0x1),'nfZBc':_0x4f85(0x2),'bSrLk':_0x4f85(0x3),'hyNeM':'heavy','HfTjn':_0x4f85(0x4),'hFmhn':_0x4f85(0x5),'fMMBi':_0x4f85(0x6),'HcSGT':_0x4f85(0x7),'ohxIk':_0x4f85(0x8),'vxcEx':'BUTTON_PRESS'};return _0x3b1bf0[_0x1853eb[_0x4f85(0x9)]]=_0x1853eb['NxaTZ'],_0x3b1bf0[_0x1853eb[_0x4f85(0xa)]]=_0x1853eb['bSrLk'],_0x3b1bf0[_0x4f85(0xb)]=_0x1853eb[_0x4f85(0xc)],_0x3b1bf0[_0x1853eb[_0x4f85(0xd)]]=_0x1853eb[_0x4f85(0xe)],_0x3b1bf0[_0x4f85(0xf)]=_0x1853eb[_0x4f85(0x10)],_0x3b1bf0[_0x1853eb[_0x4f85(0x11)]]=_0x1853eb[_0x4f85(0x12)],_0x3b1bf0[_0x1853eb['vxcEx']]=_0x1853eb[_0x4f85(0x13)],_0x3b1bf0;}({});export const triggerHaptic=(_0xc5d080=HapticType[_0x4f85(0x0)])=>{const _0x16afc4={'SYHoT':function(_0x452a4a,_0x4c84de){return _0x452a4a(_0x4c84de);},'jtcek':function(_0x5bdccb,_0x2eb70f){return _0x5bdccb===_0x2eb70f;},'qurNH':_0x4f85(0x14),'EBhWD':_0x4f85(0x15),'pJfeh':_0x4f85(0x16),'yqPYh':_0x4f85(0x17),'EPCYR':_0x4f85(0x18),'SfBfe':_0x4f85(0x19),'WOlBB':'notificationSuccess','kMjzU':'notificationWarning','odxOu':_0x4f85(0x1a),'PMqhF':_0x4f85(0x1b),'CFrlu':function(_0x456854,_0x25e096){return _0x456854===_0x25e096;},'YFMQo':'android','vVPgn':function(_0x10e31d,_0x3a9e6d){return _0x10e31d(_0x3a9e6d);},'ncUIK':_0x4f85(0x1c)};if(_0x16afc4[_0x4f85(0x1d)](Platform['OS'],_0x16afc4[_0x4f85(0x1e)])){if(_0x16afc4[_0x4f85(0x1f)]!==_0x16afc4[_0x4f85(0x20)])try{const _0xe44b6c=__ONAIROS_REQ_FUNC__(0x0),_0x379553={'enableVibrateFallback':!![],'ignoreAndroidSystemSettings':![]};switch(_0xc5d080){case HapticType['LIGHT']:_0xe44b6c[_0x4f85(0x21)](_0x16afc4[_0x4f85(0x22)],_0x379553);break;case HapticType[_0x4f85(0x2)]:_0xe44b6c['trigger'](_0x16afc4[_0x4f85(0x23)],_0x379553);break;case HapticType[_0x4f85(0xb)]:_0xe44b6c[_0x4f85(0x21)](_0x16afc4[_0x4f85(0x24)],_0x379553);break;case HapticType['SUCCESS']:_0xe44b6c[_0x4f85(0x21)](_0x16afc4[_0x4f85(0x25)],_0x379553);break;case HapticType[_0x4f85(0xf)]:_0xe44b6c[_0x4f85(0x21)](_0x16afc4['kMjzU'],_0x379553);break;case HapticType[_0x4f85(0x7)]:_0xe44b6c[_0x4f85(0x21)](_0x16afc4[_0x4f85(0x26)],_0x379553);break;default:_0xe44b6c[_0x4f85(0x21)](_0x16afc4[_0x4f85(0x22)],_0x379553);}}catch(_0x49b5e8){console[_0x4f85(0x27)](_0x16afc4[_0x4f85(0x28)],_0x49b5e8);}else{const {Vibration:_0x25227a}=_0x16afc4[_0x4f85(0x29)](_0x4cce66,0x1);_0x25227a[_0x4f85(0x2a)](0x32);}}else{if(_0x16afc4[_0x4f85(0x2b)](Platform['OS'],_0x16afc4['YFMQo']))try{const {Vibration:_0x55a33b}=_0x16afc4[_0x4f85(0x2c)](__ONAIROS_REQ_FUNC__,0x1);_0x55a33b[_0x4f85(0x2a)](0x32);}catch(_0x2cd0f2){console[_0x4f85(0x27)](_0x16afc4[_0x4f85(0x2d)],_0x2cd0f2);}}};function _0x4f85(_0x10415e,_0x4f85b9){_0x10415e=_0x10415e-0x0;const _0x548dc8=_0x1041();let _0xa9c8b6=_0x548dc8[_0x10415e];return _0xa9c8b6;}function _0x1041(){const _0x398847=['LIGHT','light','MEDIUM','medium','SUCCESS','success','warning','ERROR','error','XIqJp','nfZBc','HEAVY','hyNeM','HfTjn','hFmhn','WARNING','fMMBi','HcSGT','ohxIk','NxaTZ','ios','NBhze','uCFYb','impactLight','impactMedium','impactHeavy','notificationError','Haptic\x20feedback\x20not\x20available:','Vibration\x20not\x20available:','jtcek','qurNH','EBhWD','pJfeh','trigger','yqPYh','EPCYR','SfBfe','WOlBB','odxOu','warn','PMqhF','SYHoT','vibrate','CFrlu','vVPgn','ncUIK'];_0x1041=function(){return _0x398847;};return _0x1041();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x1ccf(){const _0x592070=['online','Internet\x20works\x20but\x20API\x20blocked.\x20Check:\x20VPN,\x20Firewall,\x20iOS\x20ATS\x20settings','iOS:\x20Try\x20on\x20physical\x20device\x20instead\x20of\x20simulator','Device\x20has\x20no\x20internet\x20-\x20check\x20WiFi/cellular','═══════════════════════════════════════════','───────────────────────────────────────────','BskTW','https://www.google.com','mtIie','ycCrz','0|2|3|1|4','Check\x20internet\x20connection\x20on\x20device','\x0a🧪\x20Test\x202:\x20API\x20Reachability\x20(API\x20server/health)','rYeRA','zvulD','diagnostic_test','youtube','emFVZ','HXVwJ','\x0a───────────────────────────────────────────','xZBkm','\x0a✅\x20ALL\x20TESTS\x20PASSED\x20-\x20SDK\x20should\x20work\x20correctly','\x0a⚠️\x20SOME\x20TESTS\x20FAILED\x20-\x20See\x20recommendations\x20below:','lmPog','\x0a📌\x20RECOMMENDATIONS:','log','krkVs','toISOString','Version','📱\x20Platform:\x20','\x0a🧪\x20Test\x201:\x20Internet\x20Connectivity\x20(google.com)','Acknr','OGvPF','now','FzIkF','HEAD','tests','googleReachable','rawResults','status','\x20\x20\x20✅\x20PASS\x20-\x20Google\x20reachable\x20(','ms)','\x20\x20\x20✅\x20PASS\x20-\x20API\x20reachable\x20(','CscqN','ziCoR','split','\x20\x20\x20❌\x20FAIL\x20-\x20','message','errors','Google\x20unreachable:\x20','google','push','DBpvi','BASE_URL','VgExF','text','Unable\x20to\x20read','apiReachable','apiHealth','substring','\x20\x20\x20⚠️\x20PARTIAL\x20-\x20API\x20responded\x20with\x20','API\x20returned\x20status\x20','RZKRe','TIwSF','cGGRC','API\x20unreachable:\x20','ryslA','recommendations','MBUOi','mezVS','qTlNC','/youtube/authorize','stringify','fMlrr','\x20\x20\x20✅\x20PASS\x20-\x20POST\x20request\x20succeeded,\x20status:\x20','fQTgB','JNYxx','parse','youtubeURL','JHFma','Sesto','POST\x20request\x20failed:\x20','dRqna','VjCix','values','filter','length','keys','\x0aTests\x20Passed:\x20','cUuQA','hPxSk','MkFvv','apiPostWorks','apiPost','BDzmn','ios','rinUm','PpkxU','mpOMU','zniOX','youtubeOAuthWorks','\x20\x20\x20✅\x20BONUS\x20-\x20Got\x20YouTube\x20OAuth\x20URL!','WmREd','\x20\x20\x20','CCPIm','MJUzo','IkJsP','HMpWZ','oemTb','VLRWG','gIckC','Xmkoi','api_unreachable','offline','qNvtg','EaXhJ','CqNfH','/health','mYOWK','ddtDi','yjIkM','pLtzo','ZMzgl','ljMmp'];_0x1ccf=function(){return _0x592070;};return _0x1ccf();}import{Platform}from'react-native';function _0x1d4b(_0x1ccfc9,_0x1d4bac){_0x1ccfc9=_0x1ccfc9-0x0;const _0x47a897=_0x1ccf();let _0x6a738f=_0x47a897[_0x1ccfc9];return _0x6a738f;}import{API_CONFIG}from'../config/api';export const runFullDiagnostics=async()=>{const _0x4b847e={'xCdRq':_0x1d4b(0x0),'MBUOi':_0x1d4b(0x1),'PHchR':'iOS:\x20Add\x20NSAppTransportSecurity\x20to\x20Info.plist','rinUm':_0x1d4b(0x2),'dRqna':_0x1d4b(0x3),'eYutY':function(_0x17b393,_0x1e48e0){return _0x17b393+_0x1e48e0;},'krkVs':_0x1d4b(0x4),'VjCix':_0x1d4b(0x5),'Acknr':function(_0x1d230a,_0x1d511f){return _0x1d230a===_0x1d511f;},'OGvPF':_0x1d4b(0x6),'FzIkF':_0x1d4b(0x7),'pycRB':function(_0x51d940,_0x1944ee){return _0x51d940-_0x1944ee;},'CscqN':_0x1d4b(0x8),'ziCoR':_0x1d4b(0x9),'vnxcG':_0x1d4b(0xa),'qIGia':_0x1d4b(0xb),'DBpvi':_0x1d4b(0xc),'VgExF':function(_0x4ad57d,_0x27f36c){return _0x4ad57d-_0x27f36c;},'RZKRe':function(_0x5dd9ce,_0x17f1e1){return _0x5dd9ce!==_0x17f1e1;},'TIwSF':'GaOmE','cGGRC':'VcpPk','ryslA':_0x1d4b(0xd),'xeQij':'fgRJc','mezVS':_0x1d4b(0xe),'qTlNC':function(_0x339054,_0xd22420,_0x4dca81){return _0x339054(_0xd22420,_0x4dca81);},'slUgP':_0x1d4b(0xf),'fMlrr':_0x1d4b(0x10),'fQTgB':function(_0x47702f,_0x1a17be){return _0x47702f===_0x1a17be;},'JNYxx':_0x1d4b(0x11),'JHFma':_0x1d4b(0x12),'Sesto':'3|1|0|2|4','hsrvR':_0x1d4b(0x13),'xOPrZ':'📋\x20SUMMARY','cUuQA':_0x1d4b(0x14),'hPxSk':'dQzdS','MkFvv':_0x1d4b(0x15),'BDzmn':_0x1d4b(0x16),'PpkxU':function(_0x593fb2,_0x319dbb){return _0x593fb2!==_0x319dbb;},'mpOMU':_0x1d4b(0x17),'WmREd':_0x1d4b(0x18),'CCPIm':'\x0a═══════════════════════════════════════════','MJUzo':'Full\x20results\x20object\x20logged\x20below\x20for\x20debugging:'};console[_0x1d4b(0x19)](_0x4b847e[_0x1d4b(0x1a)]),console['log']('🔍\x20ONAIROS\x20SDK\x20NETWORK\x20DIAGNOSTICS'),console[_0x1d4b(0x19)](_0x4b847e[_0x1d4b(0x1a)]);const _0x2b3c98={'timestamp':new Date()[_0x1d4b(0x1b)](),'platform':Platform['OS'],'platformVersion':Platform[_0x1d4b(0x1c)],'tests':{'googleReachable':![],'apiReachable':![],'apiPostWorks':![],'youtubeOAuthWorks':![]},'errors':[],'recommendations':[],'rawResults':{}};console[_0x1d4b(0x19)](_0x1d4b(0x1d)+Platform['OS']+'\x20'+Platform[_0x1d4b(0x1c)]),console['log'](_0x4b847e['VjCix']),console[_0x1d4b(0x19)](_0x1d4b(0x1e));try{if(_0x4b847e[_0x1d4b(0x1f)](_0x4b847e[_0x1d4b(0x20)],_0x4b847e[_0x1d4b(0x20)])){const _0x1f70dd=Date[_0x1d4b(0x21)](),_0x239f7b=await fetch(_0x4b847e[_0x1d4b(0x22)],{'method':_0x1d4b(0x23)}),_0xa22870=_0x4b847e['pycRB'](Date[_0x1d4b(0x21)](),_0x1f70dd);_0x2b3c98[_0x1d4b(0x24)][_0x1d4b(0x25)]=!![],_0x2b3c98[_0x1d4b(0x26)]['google']={'status':_0x239f7b[_0x1d4b(0x27)],'time':_0xa22870},console['log'](_0x1d4b(0x28)+_0xa22870+_0x1d4b(0x29));}else _0xa7d2d9[_0x1d4b(0x19)](_0x1d4b(0x2a)+_0x3bd581+_0x1d4b(0x29));}catch(_0x24c095){if(_0x4b847e[_0x1d4b(0x1f)](_0x4b847e[_0x1d4b(0x2b)],_0x4b847e[_0x1d4b(0x2c)]))return _0x4b847e['xCdRq'];else{const _0x4dc36a=_0x4b847e['vnxcG'][_0x1d4b(0x2d)]('|');let _0x35b437=0x0;while(!![]){switch(_0x4dc36a[_0x35b437++]){case'0':_0x2b3c98[_0x1d4b(0x24)][_0x1d4b(0x25)]=![];continue;case'1':console[_0x1d4b(0x19)](_0x1d4b(0x2e)+_0x24c095[_0x1d4b(0x2f)]);continue;case'2':_0x2b3c98[_0x1d4b(0x30)]['push'](_0x1d4b(0x31)+_0x24c095[_0x1d4b(0x2f)]);continue;case'3':_0x2b3c98[_0x1d4b(0x26)][_0x1d4b(0x32)]={'error':_0x24c095[_0x1d4b(0x2f)]};continue;case'4':_0x2b3c98['recommendations'][_0x1d4b(0x33)](_0x4b847e['qIGia']);continue;}break;}}}console[_0x1d4b(0x19)](_0x4b847e[_0x1d4b(0x34)]);try{const _0x5baa51=Date[_0x1d4b(0x21)](),_0x160c43=await fetch(API_CONFIG[_0x1d4b(0x35)]+'/health',{'method':'GET','headers':{'Accept':'application/json'}}),_0x58aa4f=_0x4b847e[_0x1d4b(0x36)](Date[_0x1d4b(0x21)](),_0x5baa51),_0x36324b=await _0x160c43[_0x1d4b(0x37)]()['catch'](()=>_0x1d4b(0x38));_0x2b3c98[_0x1d4b(0x24)][_0x1d4b(0x39)]=_0x160c43['ok'],_0x2b3c98[_0x1d4b(0x26)][_0x1d4b(0x3a)]={'status':_0x160c43[_0x1d4b(0x27)],'time':_0x58aa4f,'body':_0x36324b[_0x1d4b(0x3b)](0x0,0xc8)},_0x160c43['ok']?console[_0x1d4b(0x19)](_0x1d4b(0x2a)+_0x58aa4f+_0x1d4b(0x29)):(console[_0x1d4b(0x19)](_0x1d4b(0x3c)+_0x160c43[_0x1d4b(0x27)]),_0x2b3c98['errors'][_0x1d4b(0x33)](_0x1d4b(0x3d)+_0x160c43[_0x1d4b(0x27)]));}catch(_0x3b0b94){_0x4b847e[_0x1d4b(0x3e)](_0x4b847e[_0x1d4b(0x3f)],_0x4b847e[_0x1d4b(0x40)])?(_0x2b3c98['tests']['apiReachable']=![],_0x2b3c98[_0x1d4b(0x30)][_0x1d4b(0x33)](_0x1d4b(0x41)+_0x3b0b94[_0x1d4b(0x2f)]),_0x2b3c98['rawResults']['apiHealth']={'error':_0x3b0b94[_0x1d4b(0x2f)]},console[_0x1d4b(0x19)]('\x20\x20\x20❌\x20FAIL\x20-\x20'+_0x3b0b94[_0x1d4b(0x2f)]),_0x2b3c98['tests'][_0x1d4b(0x25)]&&(_0x4b847e[_0x1d4b(0x3e)](_0x4b847e[_0x1d4b(0x42)],_0x4b847e['xeQij'])?_0x2b3c98[_0x1d4b(0x43)][_0x1d4b(0x33)](_0x4b847e[_0x1d4b(0x44)]):(_0x53772d['tests'][_0x1d4b(0x39)]=![],_0x131573[_0x1d4b(0x30)][_0x1d4b(0x33)](_0x1d4b(0x41)+_0x755dcd[_0x1d4b(0x2f)]),_0x1070c6[_0x1d4b(0x26)]['apiHealth']={'error':_0x49be10['message']},_0x3285f4[_0x1d4b(0x19)]('\x20\x20\x20❌\x20FAIL\x20-\x20'+_0xa3feab[_0x1d4b(0x2f)]),_0x4fc791[_0x1d4b(0x24)][_0x1d4b(0x25)]&&_0x235f83[_0x1d4b(0x43)][_0x1d4b(0x33)](_0x4b847e[_0x1d4b(0x44)])))):_0x4b4c93['recommendations'][_0x1d4b(0x33)](_0x4b847e[_0x1d4b(0x44)]);}console[_0x1d4b(0x19)]('\n\uD83E\uDDEA Test 3: POST Request (OAuth simulation)');try{if(_0x4b847e[_0x1d4b(0x3e)](_0x4b847e[_0x1d4b(0x45)],_0x4b847e[_0x1d4b(0x45)]))_0x1698ef[_0x1d4b(0x43)][_0x1d4b(0x33)](_0x4b847e['PHchR'],_0x4b847e['rinUm']);else{const _0xddc820=Date['now'](),_0x566ddc=await _0x4b847e[_0x1d4b(0x46)](fetch,API_CONFIG[_0x1d4b(0x35)]+_0x1d4b(0x47),{'method':'POST','headers':{'Content-Type':'application/json','Accept':'application/json'},'body':JSON[_0x1d4b(0x48)]({'session':{'username':_0x4b847e['slUgP'],'platform':_0x4b847e[_0x1d4b(0x49)],'timestamp':new Date()[_0x1d4b(0x1b)]()}})}),_0x29c653=_0x4b847e[_0x1d4b(0x36)](Date['now'](),_0xddc820),_0x20a369=await _0x566ddc[_0x1d4b(0x37)]()['catch'](()=>_0x1d4b(0x38));_0x2b3c98[_0x1d4b(0x26)]['apiPost']={'status':_0x566ddc[_0x1d4b(0x27)],'time':_0x29c653,'body':_0x20a369[_0x1d4b(0x3b)](0x0,0x1f4)},_0x2b3c98['tests']['apiPostWorks']=!![],console[_0x1d4b(0x19)](_0x1d4b(0x4a)+_0x566ddc[_0x1d4b(0x27)]+'\x20('+_0x29c653+'ms)');try{if(_0x4b847e[_0x1d4b(0x4b)](_0x4b847e[_0x1d4b(0x4c)],_0x4b847e[_0x1d4b(0x4c)])){const _0x4c7105=JSON[_0x1d4b(0x4d)](_0x20a369);_0x4c7105[_0x1d4b(0x4e)]&&(_0x2b3c98['tests']['youtubeOAuthWorks']=!![],console[_0x1d4b(0x19)]('\x20\x20\x20✅\x20BONUS\x20-\x20Got\x20YouTube\x20OAuth\x20URL!'));}else return'offline';}catch{}}}catch(_0x1bad36){if(_0x4b847e[_0x1d4b(0x1f)](_0x4b847e[_0x1d4b(0x4f)],_0x4b847e[_0x1d4b(0x4f)])){const _0x5d1151=_0x4b847e[_0x1d4b(0x50)][_0x1d4b(0x2d)]('|');let _0x4fc474=0x0;while(!![]){switch(_0x5d1151[_0x4fc474++]){case'0':_0x2b3c98[_0x1d4b(0x26)]['apiPost']={'error':_0x1bad36['message']};continue;case'1':_0x2b3c98[_0x1d4b(0x30)]['push'](_0x1d4b(0x51)+_0x1bad36[_0x1d4b(0x2f)]);continue;case'2':console[_0x1d4b(0x19)](_0x1d4b(0x2e)+_0x1bad36[_0x1d4b(0x2f)]);continue;case'3':_0x2b3c98[_0x1d4b(0x24)]['apiPostWorks']=![];continue;case'4':_0x2b3c98[_0x1d4b(0x43)][_0x1d4b(0x33)]('POST requests failing. This is the exact issue affecting OAuth.');continue;}break;}}else _0x142a59[_0x1d4b(0x43)][_0x1d4b(0x33)](_0x4b847e[_0x1d4b(0x52)]);}console[_0x1d4b(0x19)](_0x4b847e['hsrvR']),console[_0x1d4b(0x19)](_0x4b847e['xOPrZ']),console['log'](_0x4b847e[_0x1d4b(0x53)]);const _0x5a8634=Object[_0x1d4b(0x54)](_0x2b3c98[_0x1d4b(0x24)])[_0x1d4b(0x55)](Boolean)[_0x1d4b(0x56)],_0xbfb45c=Object[_0x1d4b(0x57)](_0x2b3c98[_0x1d4b(0x24)])[_0x1d4b(0x56)];console[_0x1d4b(0x19)](_0x1d4b(0x58)+_0x5a8634+'/'+_0xbfb45c);if(_0x5a8634===_0xbfb45c)_0x4b847e[_0x1d4b(0x59)]!==_0x4b847e[_0x1d4b(0x5a)]?console[_0x1d4b(0x19)](_0x4b847e[_0x1d4b(0x5b)]):(_0x5ea800['tests'][_0x1d4b(0x5c)]=![],_0x2d6d41[_0x1d4b(0x30)][_0x1d4b(0x33)](_0x1d4b(0x51)+_0x3429e5['message']),_0x5ddb70[_0x1d4b(0x26)][_0x1d4b(0x5d)]={'error':_0x14c7f4['message']},_0x59d895[_0x1d4b(0x19)](_0x1d4b(0x2e)+_0x1bb2f3['message']),_0x3e9337[_0x1d4b(0x43)]['push']('POST requests failing. This is the exact issue affecting OAuth.'));else{console[_0x1d4b(0x19)](_0x4b847e[_0x1d4b(0x5e)]);_0x4b847e[_0x1d4b(0x4b)](Platform['OS'],_0x1d4b(0x5f))&&!_0x2b3c98[_0x1d4b(0x24)][_0x1d4b(0x39)]&&_0x2b3c98[_0x1d4b(0x43)][_0x1d4b(0x33)](_0x4b847e['PHchR'],_0x4b847e[_0x1d4b(0x60)]);if(!_0x2b3c98[_0x1d4b(0x24)][_0x1d4b(0x25)]){if(_0x4b847e[_0x1d4b(0x61)](_0x4b847e[_0x1d4b(0x62)],_0x1d4b(0x63)))_0x2b3c98[_0x1d4b(0x43)][_0x1d4b(0x33)](_0x4b847e[_0x1d4b(0x52)]);else{const _0x295676=_0x48d95a[_0x1d4b(0x4d)](_0x48303b);_0x295676[_0x1d4b(0x4e)]&&(_0x396688[_0x1d4b(0x24)][_0x1d4b(0x64)]=!![],_0x4dc9c6['log'](_0x1d4b(0x65)));}}console['log'](_0x4b847e[_0x1d4b(0x66)]),_0x2b3c98[_0x1d4b(0x43)]['forEach']((_0x14f671,_0x2cc72c)=>{console[_0x1d4b(0x19)](_0x1d4b(0x67)+_0x4b847e['eYutY'](_0x2cc72c,0x1)+'.\x20'+_0x14f671);});}return console[_0x1d4b(0x19)](_0x4b847e[_0x1d4b(0x68)]),console['log'](_0x4b847e[_0x1d4b(0x69)]),console[_0x1d4b(0x19)](JSON[_0x1d4b(0x48)](_0x2b3c98,null,0x2)),_0x2b3c98;};export const isApiReachable=async()=>{const _0x41df86={'VLRWG':_0x1d4b(0x15),'HMpWZ':function(_0x9ad1b6,_0x3ed2a3){return _0x9ad1b6===_0x3ed2a3;},'oemTb':_0x1d4b(0x6a),'Zznph':function(_0x310020,_0x46ea8f,_0x3ecf6e){return _0x310020(_0x46ea8f,_0x3ecf6e);}};try{if(_0x41df86[_0x1d4b(0x6b)]('lZdNX',_0x41df86[_0x1d4b(0x6c)]))_0x2d206e['log'](_0x41df86[_0x1d4b(0x6d)]);else{const _0x257df1=await _0x41df86['Zznph'](fetch,API_CONFIG[_0x1d4b(0x35)]+'/health',{'method':'GET'});return _0x257df1['ok'];}}catch{return![];}};export const getNetworkStatus=async()=>{const _0xf46bf3={'qNvtg':function(_0x69b5c8,_0x2bfbe7,_0x3f4871){return _0x69b5c8(_0x2bfbe7,_0x3f4871);},'EaXhJ':_0x1d4b(0x7),'rVCbC':_0x1d4b(0x23),'CqNfH':function(_0x3fb564,_0x61bc2a){return _0x3fb564(_0x61bc2a);},'mYOWK':function(_0x1f6c6e,_0x4a5fd0){return _0x1f6c6e===_0x4a5fd0;},'ddtDi':_0x1d4b(0x6e),'QpIGq':'XYtTH','yjIkM':function(_0x5f3230,_0x3dba66){return _0x5f3230!==_0x3dba66;},'pLtzo':_0x1d4b(0x6f),'ZMzgl':_0x1d4b(0x70),'ljMmp':_0x1d4b(0x71)};try{await _0xf46bf3[_0x1d4b(0x72)](fetch,_0xf46bf3[_0x1d4b(0x73)],{'method':_0xf46bf3['rVCbC']});const _0x174de1=await _0xf46bf3[_0x1d4b(0x74)](fetch,API_CONFIG[_0x1d4b(0x35)]+_0x1d4b(0x75));if(_0x174de1['ok']){if(_0xf46bf3[_0x1d4b(0x76)](_0xf46bf3[_0x1d4b(0x77)],_0xf46bf3['QpIGq']))_0x33f433[_0x1d4b(0x24)][_0x1d4b(0x64)]=!![],_0x371e91[_0x1d4b(0x19)](_0x1d4b(0x65));else return _0x1d4b(0x0);}else return _0xf46bf3[_0x1d4b(0x78)]('Xmkoi',_0xf46bf3[_0x1d4b(0x79)])?_0x1d4b(0x70):_0xf46bf3[_0x1d4b(0x7a)];}catch{return _0xf46bf3[_0x1d4b(0x7b)];}};
|
|
1
|
+
import{Platform}from'react-native';function _0x4996(_0x5572b7,_0x499600){_0x5572b7=_0x5572b7-0x0;const _0x233831=_0x5572();let _0x23a111=_0x233831[_0x5572b7];return _0x23a111;}import{API_CONFIG}from'../config/api';function _0x5572(){const _0x3ae0ff=['4|0|2|3|1','\x0a🧪\x20Test\x201:\x20Internet\x20Connectivity\x20(google.com)','\x0a🧪\x20Test\x202:\x20API\x20Reachability\x20(API\x20server/health)','vzzmu','AFYGD','maVaz','bZqVt','0|4|1|3|2','NMnvm','0|1|3|4|2','\x0a───────────────────────────────────────────','───────────────────────────────────────────','RtKKu','\x0a✅\x20ALL\x20TESTS\x20PASSED\x20-\x20SDK\x20should\x20work\x20correctly','ios','iOS:\x20Try\x20on\x20physical\x20device\x20instead\x20of\x20simulator','\x0a═══════════════════════════════════════════','Full\x20results\x20object\x20logged\x20below\x20for\x20debugging:','═══════════════════════════════════════════','log','vsGBq','Version','📱\x20Platform:\x20','NNvfM','IxDVc','https://www.google.com','HEAD','tests','googleReachable','google','status','\x20\x20\x20✅\x20PASS\x20-\x20Google\x20reachable\x20(','ms)','JQAds','IaMwi','errors','push','Google\x20unreachable:\x20','message','rawResults','\x20\x20\x20❌\x20FAIL\x20-\x20','recommendations','wEuIO','cyqFT','IJgct','youtubeOAuthWorks','\x20\x20\x20✅\x20BONUS\x20-\x20Got\x20YouTube\x20OAuth\x20URL!','acWwY','BASE_URL','/health','DbxMy','now','apiReachable','apiHealth','substring','\x20\x20\x20✅\x20PASS\x20-\x20API\x20reachable\x20(','nHTaI','rQDAH','NctmH','\x20\x20\x20⚠️\x20PARTIAL\x20-\x20API\x20responded\x20with\x20','API\x20returned\x20status\x20','split','API\x20unreachable:\x20','UKoJE','tkHWc','hDuzJ','/youtube/authorize','kOLPp','youtube','toISOString','text','Unable\x20to\x20read','apiPost','apiPostWorks','\x20\x20\x20✅\x20PASS\x20-\x20POST\x20request\x20succeeded,\x20status:\x20','AglhP','youtubeURL','pBtfs','POST\x20request\x20failed:\x20','mjeSQ','values','filter','length','keys','nSJcQ','Fvksl','OTOlP','\x0a⚠️\x20SOME\x20TESTS\x20FAILED\x20-\x20See\x20recommendations\x20below:','XSThx','ajNCm','SVxwJ','zJMTp','ezxwU','XpNQv','qaWHn','BtUtH','forEach','TOgTy','kDOQG','\x20\x20\x20','jBAbN','JBwWs','fvExk','stringify','ceEiY','offline','jypnr','online','tFRvJ','RzCFt','Internet\x20works\x20but\x20API\x20blocked.\x20Check:\x20VPN,\x20Firewall,\x20iOS\x20ATS\x20settings'];_0x5572=function(){return _0x3ae0ff;};return _0x5572();}export const runFullDiagnostics=async()=>{const _0x4784bd={'wEuIO':'Check\x20internet\x20connection\x20on\x20device','apJlx':_0x4996(0x0),'hDuzJ':'Internet\x20works\x20but\x20API\x20blocked.\x20Check:\x20VPN,\x20Firewall,\x20iOS\x20ATS\x20settings','pBtfs':'Device\x20has\x20no\x20internet\x20-\x20check\x20WiFi/cellular','qaWHn':'offline','JBwWs':function(_0x2d4f9f,_0x163152){return _0x2d4f9f+_0x163152;},'TOgTy':'bGlZA','kDOQG':'SaCtw','jBAbN':function(_0x59dac8,_0x4ad4b1){return _0x59dac8+_0x4ad4b1;},'vsGBq':'🔍\x20ONAIROS\x20SDK\x20NETWORK\x20DIAGNOSTICS','NNvfM':_0x4996(0x1),'IxDVc':function(_0x117c22,_0x5237da,_0xdc6127){return _0x117c22(_0x5237da,_0xdc6127);},'iUhkB':function(_0xd888e8,_0x28f316){return _0xd888e8===_0x28f316;},'IaMwi':'fFARh','cyqFT':_0x4996(0x2),'uIVhG':function(_0x407a5e,_0x709c1c){return _0x407a5e!==_0x709c1c;},'IJgct':_0x4996(0x3),'acWwY':function(_0x208976,_0x127204,_0x3718f1){return _0x208976(_0x127204,_0x3718f1);},'DbxMy':function(_0x4a0c8e,_0x1ece55){return _0x4a0c8e-_0x1ece55;},'nHTaI':function(_0x61f436,_0x37d7a5){return _0x61f436!==_0x37d7a5;},'rQDAH':_0x4996(0x4),'NctmH':_0x4996(0x5),'UKoJE':_0x4996(0x6),'tkHWc':_0x4996(0x7),'kOLPp':'diagnostic_test','AglhP':_0x4996(0x8),'HKfKT':_0x4996(0x9),'mjeSQ':_0x4996(0xa),'uQOyv':'📋\x20SUMMARY','GJsfB':_0x4996(0xb),'nSJcQ':'wgzzY','Fvksl':_0x4996(0xc),'OTOlP':_0x4996(0xd),'XSThx':function(_0x3ad5fd,_0x3589d1){return _0x3ad5fd===_0x3589d1;},'ajNCm':_0x4996(0xe),'cfrNc':function(_0x2c2f59,_0x1d3e58){return _0x2c2f59!==_0x1d3e58;},'zJMTp':'iBozk','ezxwU':'iOS:\x20Add\x20NSAppTransportSecurity\x20to\x20Info.plist','XpNQv':_0x4996(0xf),'BtUtH':'\x0a📌\x20RECOMMENDATIONS:','ZCAHX':_0x4996(0x10),'fvExk':_0x4996(0x11)};console['log'](_0x4996(0x12)),console[_0x4996(0x13)](_0x4784bd[_0x4996(0x14)]),console[_0x4996(0x13)](_0x4996(0x12));const _0x15baf4={'timestamp':new Date()['toISOString'](),'platform':Platform['OS'],'platformVersion':Platform[_0x4996(0x15)],'tests':{'googleReachable':![],'apiReachable':![],'apiPostWorks':![],'youtubeOAuthWorks':![]},'errors':[],'recommendations':[],'rawResults':{}};console[_0x4996(0x13)](_0x4996(0x16)+Platform['OS']+'\x20'+Platform[_0x4996(0x15)]),console[_0x4996(0x13)](_0x4996(0xb)),console['log'](_0x4784bd[_0x4996(0x17)]);try{const _0x444e28=Date['now'](),_0x51c37e=await _0x4784bd[_0x4996(0x18)](fetch,_0x4996(0x19),{'method':_0x4996(0x1a)}),_0x4940d2=Date['now']()-_0x444e28;_0x15baf4[_0x4996(0x1b)][_0x4996(0x1c)]=!![],_0x15baf4['rawResults'][_0x4996(0x1d)]={'status':_0x51c37e[_0x4996(0x1e)],'time':_0x4940d2},console['log'](_0x4996(0x1f)+_0x4940d2+_0x4996(0x20));}catch(_0x22da95){_0x4784bd['iUhkB'](_0x4996(0x21),_0x4784bd[_0x4996(0x22)])?(_0x5bf88f[_0x4996(0x1b)][_0x4996(0x1c)]=![],_0x4a5aae[_0x4996(0x23)][_0x4996(0x24)](_0x4996(0x25)+_0x20279a[_0x4996(0x26)]),_0x341b46[_0x4996(0x27)]['google']={'error':_0x56741f['message']},_0x2ae520[_0x4996(0x13)](_0x4996(0x28)+_0x3b9394['message']),_0x477c11[_0x4996(0x29)]['push'](_0x4784bd[_0x4996(0x2a)])):(_0x15baf4[_0x4996(0x1b)][_0x4996(0x1c)]=![],_0x15baf4['errors'][_0x4996(0x24)](_0x4996(0x25)+_0x22da95[_0x4996(0x26)]),_0x15baf4[_0x4996(0x27)][_0x4996(0x1d)]={'error':_0x22da95['message']},console[_0x4996(0x13)](_0x4996(0x28)+_0x22da95[_0x4996(0x26)]),_0x15baf4[_0x4996(0x29)][_0x4996(0x24)](_0x4784bd[_0x4996(0x2a)]));}console[_0x4996(0x13)](_0x4784bd[_0x4996(0x2b)]);try{if(_0x4784bd['uIVhG'](_0x4784bd[_0x4996(0x2c)],_0x4996(0x3)))_0x3e1d56[_0x4996(0x1b)][_0x4996(0x2d)]=!![],_0x250fd8[_0x4996(0x13)](_0x4996(0x2e));else{const _0x46642b=Date['now'](),_0x4fd420=await _0x4784bd[_0x4996(0x2f)](fetch,API_CONFIG[_0x4996(0x30)]+_0x4996(0x31),{'method':'GET','headers':{'Accept':'application/json'}}),_0x256b6c=_0x4784bd[_0x4996(0x32)](Date[_0x4996(0x33)](),_0x46642b),_0x13bae7=await _0x4fd420['text']()['catch'](()=>'Unable\x20to\x20read');_0x15baf4['tests'][_0x4996(0x34)]=_0x4fd420['ok'],_0x15baf4[_0x4996(0x27)][_0x4996(0x35)]={'status':_0x4fd420[_0x4996(0x1e)],'time':_0x256b6c,'body':_0x13bae7[_0x4996(0x36)](0x0,0xc8)};if(_0x4fd420['ok'])console[_0x4996(0x13)](_0x4996(0x37)+_0x256b6c+_0x4996(0x20));else{if(_0x4784bd[_0x4996(0x38)](_0x4784bd[_0x4996(0x39)],_0x4784bd[_0x4996(0x3a)]))console[_0x4996(0x13)](_0x4996(0x3b)+_0x4fd420[_0x4996(0x1e)]),_0x15baf4[_0x4996(0x23)][_0x4996(0x24)](_0x4996(0x3c)+_0x4fd420[_0x4996(0x1e)]);else{const _0x5f1a70=_0x4784bd['apJlx'][_0x4996(0x3d)]('|');let _0x4f95e9=0x0;while(!![]){switch(_0x5f1a70[_0x4f95e9++]){case'0':_0xa49d1f[_0x4996(0x23)][_0x4996(0x24)](_0x4996(0x3e)+_0x55aef9[_0x4996(0x26)]);continue;case'1':_0x4a530c[_0x4996(0x1b)][_0x4996(0x1c)]&&_0xbc2d72[_0x4996(0x29)][_0x4996(0x24)](_0x4784bd['hDuzJ']);continue;case'2':_0x8a6bd9[_0x4996(0x27)][_0x4996(0x35)]={'error':_0xf3f564[_0x4996(0x26)]};continue;case'3':_0x3b3f9e[_0x4996(0x13)]('\x20\x20\x20❌\x20FAIL\x20-\x20'+_0xddf0e1['message']);continue;case'4':_0x294e19[_0x4996(0x1b)][_0x4996(0x34)]=![];continue;}break;}}}}}catch(_0x3e7e9c){if(_0x4784bd['uIVhG'](_0x4784bd[_0x4996(0x3f)],_0x4784bd[_0x4996(0x3f)]))_0x266c9e[_0x4996(0x13)](_0x4996(0x3b)+_0x3f1a2e['status']),_0x1090aa[_0x4996(0x23)][_0x4996(0x24)](_0x4996(0x3c)+_0x4aa50f[_0x4996(0x1e)]);else{const _0x3ffb5f=_0x4784bd[_0x4996(0x40)][_0x4996(0x3d)]('|');let _0x200f89=0x0;while(!![]){switch(_0x3ffb5f[_0x200f89++]){case'0':_0x15baf4[_0x4996(0x1b)][_0x4996(0x34)]=![];continue;case'1':_0x15baf4['rawResults']['apiHealth']={'error':_0x3e7e9c[_0x4996(0x26)]};continue;case'2':_0x15baf4[_0x4996(0x1b)][_0x4996(0x1c)]&&_0x15baf4[_0x4996(0x29)][_0x4996(0x24)](_0x4784bd[_0x4996(0x41)]);continue;case'3':console[_0x4996(0x13)]('\x20\x20\x20❌\x20FAIL\x20-\x20'+_0x3e7e9c[_0x4996(0x26)]);continue;case'4':_0x15baf4[_0x4996(0x23)][_0x4996(0x24)]('API\x20unreachable:\x20'+_0x3e7e9c[_0x4996(0x26)]);continue;}break;}}}console['log']('\n\uD83E\uDDEA Test 3: POST Request (OAuth simulation)');try{const _0x4144e8=Date[_0x4996(0x33)](),_0x2dba32=await fetch(API_CONFIG[_0x4996(0x30)]+_0x4996(0x42),{'method':'POST','headers':{'Content-Type':'application/json','Accept':'application/json'},'body':JSON['stringify']({'session':{'username':_0x4784bd[_0x4996(0x43)],'platform':_0x4996(0x44),'timestamp':new Date()[_0x4996(0x45)]()}})}),_0x5a0556=Date[_0x4996(0x33)]()-_0x4144e8,_0x289b90=await _0x2dba32[_0x4996(0x46)]()['catch'](()=>_0x4996(0x47));_0x15baf4['rawResults'][_0x4996(0x48)]={'status':_0x2dba32[_0x4996(0x1e)],'time':_0x5a0556,'body':_0x289b90[_0x4996(0x36)](0x0,0x1f4)},_0x15baf4['tests'][_0x4996(0x49)]=!![],console[_0x4996(0x13)](_0x4996(0x4a)+_0x2dba32[_0x4996(0x1e)]+'\x20('+_0x5a0556+_0x4996(0x20));try{if(_0x4784bd['iUhkB'](_0x4784bd[_0x4996(0x4b)],'NMnvm')){const _0x2e6a64=JSON['parse'](_0x289b90);_0x2e6a64[_0x4996(0x4c)]&&(_0x15baf4[_0x4996(0x1b)][_0x4996(0x2d)]=!![],console['log'](_0x4996(0x2e)));}else _0x5158b3[_0x4996(0x29)]['push'](_0x4784bd[_0x4996(0x4d)]);}catch{}}catch(_0x558a83){const _0x296b9d=_0x4784bd['HKfKT'][_0x4996(0x3d)]('|');let _0x18362b=0x0;while(!![]){switch(_0x296b9d[_0x18362b++]){case'0':_0x15baf4['tests'][_0x4996(0x49)]=![];continue;case'1':_0x15baf4[_0x4996(0x23)][_0x4996(0x24)](_0x4996(0x4e)+_0x558a83['message']);continue;case'2':_0x15baf4['recommendations'][_0x4996(0x24)]('POST requests failing. This is the exact issue affecting OAuth.');continue;case'3':_0x15baf4[_0x4996(0x27)][_0x4996(0x48)]={'error':_0x558a83['message']};continue;case'4':console[_0x4996(0x13)](_0x4996(0x28)+_0x558a83[_0x4996(0x26)]);continue;}break;}}console['log'](_0x4784bd[_0x4996(0x4f)]),console[_0x4996(0x13)](_0x4784bd['uQOyv']),console[_0x4996(0x13)](_0x4784bd['GJsfB']);const _0x1c6070=Object[_0x4996(0x50)](_0x15baf4[_0x4996(0x1b)])[_0x4996(0x51)](Boolean)[_0x4996(0x52)],_0x1109ae=Object[_0x4996(0x53)](_0x15baf4['tests'])['length'];console['log']('\x0aTests\x20Passed:\x20'+_0x1c6070+'/'+_0x1109ae);if(_0x1c6070===_0x1109ae){if(_0x4784bd[_0x4996(0x54)]!==_0x4784bd[_0x4996(0x55)])console['log'](_0x4784bd[_0x4996(0x56)]);else return![];}else{console[_0x4996(0x13)](_0x4996(0x57));if(_0x4784bd[_0x4996(0x58)](Platform['OS'],_0x4784bd[_0x4996(0x59)])&&!_0x15baf4[_0x4996(0x1b)][_0x4996(0x34)]){if(_0x4784bd['cfrNc'](_0x4996(0x5a),_0x4784bd[_0x4996(0x5b)]))_0x15baf4[_0x4996(0x29)]['push'](_0x4784bd[_0x4996(0x5c)],_0x4784bd[_0x4996(0x5d)]);else return _0x4784bd[_0x4996(0x5e)];}!_0x15baf4[_0x4996(0x1b)]['googleReachable']&&_0x15baf4['recommendations']['push'](_0x4784bd[_0x4996(0x4d)]),console[_0x4996(0x13)](_0x4784bd[_0x4996(0x5f)]),_0x15baf4[_0x4996(0x29)][_0x4996(0x60)]((_0x1ddcca,_0x1c64ae)=>{_0x4784bd[_0x4996(0x61)]!==_0x4784bd[_0x4996(0x62)]?console[_0x4996(0x13)](_0x4996(0x63)+_0x4784bd[_0x4996(0x64)](_0x1c64ae,0x1)+'.\x20'+_0x1ddcca):_0x3ac9f5[_0x4996(0x13)]('\x20\x20\x20'+_0x4784bd[_0x4996(0x65)](_0x1de9e8,0x1)+'.\x20'+_0x489b61);});}return console['log'](_0x4784bd['ZCAHX']),console[_0x4996(0x13)](_0x4784bd[_0x4996(0x66)]),console[_0x4996(0x13)](JSON[_0x4996(0x67)](_0x15baf4,null,0x2)),_0x15baf4;};export const isApiReachable=async()=>{const _0x5ef5d3={'ceEiY':function(_0x5a15f2,_0x2937d9,_0x126c6d){return _0x5a15f2(_0x2937d9,_0x126c6d);}};try{const _0x1a6168=await _0x5ef5d3[_0x4996(0x68)](fetch,API_CONFIG[_0x4996(0x30)]+_0x4996(0x31),{'method':'GET'});return _0x1a6168['ok'];}catch{return![];}};export const getNetworkStatus=async()=>{const _0x55daee={'hyUzc':function(_0x66e2c0,_0x3f856f,_0x5ba77d){return _0x66e2c0(_0x3f856f,_0x5ba77d);},'jypnr':_0x4996(0x1a),'CwgEF':function(_0x5d5126,_0x381456){return _0x5d5126(_0x381456);},'tFRvJ':function(_0xbe9e4d,_0x1f2efb){return _0xbe9e4d!==_0x1f2efb;},'RzCFt':'kzRZu','TijFw':'api_unreachable','TLYnR':_0x4996(0x69)};try{await _0x55daee['hyUzc'](fetch,'https://www.google.com',{'method':_0x55daee[_0x4996(0x6a)]});const _0x35ddc8=await _0x55daee['CwgEF'](fetch,API_CONFIG[_0x4996(0x30)]+_0x4996(0x31));if(_0x35ddc8['ok'])return _0x4996(0x6b);else{if(_0x55daee[_0x4996(0x6c)](_0x55daee[_0x4996(0x6d)],_0x55daee[_0x4996(0x6d)]))_0x145bfc[_0x4996(0x29)][_0x4996(0x24)](_0x4996(0x6e));else return _0x55daee['TijFw'];}}catch{return _0x55daee['TLYnR'];}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import NetInfo from'@react-native-community/netinfo';import{logDebug}from'./debugHelper';import{getJWT,makeUserRequest,makeDeveloperRequest,isUserAuthenticated,extractUsernameFromJWT}from'../services/apiKeyService';export class ApiError extends Error{constructor(_0x24e527,_0x4ab302,_0x287080,_0x4c8c80){const _0x13ce03={'UyAnf':_0x5f38(0x0),'wEpWq':_0x5f38(0x1)},_0x2c3c96=_0x13ce03[_0x5f38(0x2)]['split']('|');let _0x4a0efe=0x0;while(!![]){switch(_0x2c3c96[_0x4a0efe++]){case'0':this[_0x5f38(0x3)]=_0x13ce03[_0x5f38(0x4)];continue;case'1':this[_0x5f38(0x5)]=_0x287080;continue;case'2':super(_0x24e527);continue;case'3':this[_0x5f38(0x6)]=_0x4ab302;continue;case'4':this['details']=_0x4c8c80;continue;}break;}}}const checkNetworkConnection=async()=>{const _0x3d3ac6=await NetInfo[_0x5f38(0x7)]();return _0x3d3ac6[_0x5f38(0x8)]===!![];},makeUserApiRequest=async(_0x50777c,_0x1ab6b0,_0x5e5211={})=>{const _0xc04f8e={'gTFDy':_0x5f38(0x9),'OzYXv':_0x5f38(0xa),'PPJIe':function(_0x4bb42e,_0x4c0c8){return _0x4bb42e||_0x4c0c8;},'sTRrk':'Request\x20timed\x20out','Sevqc':'auth_error','SHuUp':_0x5f38(0xb),'ZZoYQ':function(_0x3dcbf0){return _0x3dcbf0();},'buWRZ':function(_0x343099,_0x872363){return _0x343099!==_0x872363;},'oQubn':_0x5f38(0xc),'sAxyd':_0x5f38(0xd),'EdzBy':_0x5f38(0xe),'WfxsK':function(_0x19d9f8,_0x4c4bfb){return _0x19d9f8!==_0x4c4bfb;},'zfQaV':'daQJx','bUVCs':'User\x20not\x20authenticated.\x20Please\x20verify\x20email\x20first.','EORXH':function(_0xf790a8,_0x292f74,_0x455d9f){return _0xf790a8(_0x292f74,_0x455d9f);},'bTiHQ':_0x5f38(0xf),'KXJND':function(_0x383cd3,_0x301fdb){return _0x383cd3||_0x301fdb;},'LapzM':function(_0x44e4f8,_0x241a0d,_0x2e75de){return _0x44e4f8(_0x241a0d,_0x2e75de);},'wqkUC':'User\x20API\x20Response','nQeIM':function(_0x4612cd,_0x21e857){return _0x4612cd===_0x21e857;},'fEpDm':function(_0x1326f2,_0x52736d){return _0x1326f2===_0x52736d;},'TVZwY':_0x5f38(0x10),'BouSr':function(_0x14cce0,_0x1179c9){return _0x14cce0>=_0x1179c9;},'DxsKu':_0x5f38(0x11),'ZLCuD':_0x5f38(0x12),'pCSpo':function(_0x4552b8,_0x4a46b5){return _0x4552b8===_0x4a46b5;},'RYdui':_0x5f38(0x13),'NQSsf':function(_0x5b9a07,_0x510617){return _0x5b9a07===_0x510617;},'oWzAZ':function(_0x4659ad,_0x2ab0d9){return _0x4659ad===_0x2ab0d9;},'ExzuJ':function(_0x42759a,_0x133623){return _0x42759a instanceof _0x133623;},'YWKOq':_0x5f38(0x14),'qNMXr':_0x5f38(0x15),'xdvfs':_0x5f38(0x16),'cjiea':_0x5f38(0x17),'zsVzo':'Unknown\x20error'},{data:_0x362ee0,headers:headers={},debug:debug=![]}=_0x5e5211;try{const _0x46e1ee=await _0xc04f8e[_0x5f38(0x18)](checkNetworkConnection);if(!_0x46e1ee){if(_0xc04f8e['buWRZ'](_0xc04f8e[_0x5f38(0x19)],_0xc04f8e[_0x5f38(0x19)]))_0x35e61b(_0xc04f8e[_0x5f38(0x1a)],{'endpoint':_0xd5bf67,'method':_0x35b98d,'headers':{..._0x4256f5,'Authorization':_0xc04f8e[_0x5f38(0x1b)]},'data':_0xc04f8e[_0x5f38(0x1c)](_0x49445c,null)});else throw new ApiError(_0xc04f8e[_0x5f38(0x1d)],_0xc04f8e[_0x5f38(0x1e)]);}if(!isUserAuthenticated()){if(_0xc04f8e[_0x5f38(0x1f)](_0xc04f8e['zfQaV'],_0x5f38(0x20)))throw new ApiError(_0xc04f8e[_0x5f38(0x21)],_0xc04f8e[_0x5f38(0x22)]);else throw new _0x502802(_0xc04f8e[_0x5f38(0x23)],_0x5f38(0x16));}debug&&_0xc04f8e[_0x5f38(0x24)](logDebug,_0xc04f8e['bTiHQ'],{'endpoint':_0x50777c,'method':_0x1ab6b0,'headers':{...headers,'Authorization':_0xc04f8e[_0x5f38(0x1b)]},'data':_0xc04f8e[_0x5f38(0x25)](_0x362ee0,null)});const _0x17fc0e=await _0xc04f8e[_0x5f38(0x26)](makeUserRequest,_0x50777c,{'method':_0x1ab6b0,'headers':headers,..._0x362ee0?{'body':JSON[_0x5f38(0x27)](_0x362ee0)}:{}}),_0x4ad51c=await _0x17fc0e[_0x5f38(0x28)]();debug&&_0xc04f8e[_0x5f38(0x24)](logDebug,_0xc04f8e[_0x5f38(0x29)],{'status':_0x17fc0e[_0x5f38(0x2a)],'data':_0x4ad51c});if(!_0x17fc0e['ok']){if('nCCCT'!==_0x5f38(0x2b)){var _0x19d25a,_0x4ec06a,_0xdf97c8;const _0x4a584a=_0xc04f8e[_0x5f38(0x2c)](_0x17fc0e['status'],0x191)||_0xc04f8e[_0x5f38(0x2c)](_0x17fc0e[_0x5f38(0x2a)],0x193)?_0xc04f8e[_0x5f38(0x22)]:_0xc04f8e['fEpDm'](_0x17fc0e[_0x5f38(0x2a)],0x190)?_0xc04f8e[_0x5f38(0x2d)]:_0xc04f8e['BouSr'](_0x17fc0e[_0x5f38(0x2a)],0x1f4)?_0xc04f8e[_0x5f38(0x2e)]:_0xc04f8e[_0x5f38(0x2f)];throw new ApiError((_0xc04f8e[_0x5f38(0x30)](_0x19d25a=_0x4ad51c[_0x5f38(0x31)],null)||_0xc04f8e['fEpDm'](_0x19d25a,void 0x0)?void 0x0:_0x19d25a[_0x5f38(0x32)])||_0xc04f8e[_0x5f38(0x33)],_0x4a584a,_0xc04f8e[_0x5f38(0x30)](_0x4ec06a=_0x4ad51c[_0x5f38(0x31)],null)||_0xc04f8e[_0x5f38(0x34)](_0x4ec06a,void 0x0)?void 0x0:_0x4ec06a['code'],_0xc04f8e[_0x5f38(0x35)](_0xdf97c8=_0x4ad51c[_0x5f38(0x31)],null)||_0xc04f8e['pCSpo'](_0xdf97c8,void 0x0)?void 0x0:_0xdf97c8[_0x5f38(0x36)]);}else throw new _0x4ca8c4('User\x20not\x20authenticated.\x20Please\x20verify\x20email\x20first.',_0xc04f8e[_0x5f38(0x22)]);}return _0x4ad51c;}catch(_0x584d91){if(_0xc04f8e[_0x5f38(0x37)](_0x584d91,ApiError)){if(_0xc04f8e[_0x5f38(0x35)](_0xc04f8e[_0x5f38(0x38)],'QaMBk'))return _0x345b9d(_0xc04f8e['SHuUp'],'POST',{'data':{'refreshToken':_0x53b09f},'debug':_0x37deb1[_0x5f38(0x39)]});else throw _0x584d91;}if(_0x584d91[_0x5f38(0x3)]===_0xc04f8e['qNMXr'])throw new ApiError(_0xc04f8e[_0x5f38(0x23)],_0xc04f8e[_0x5f38(0x3a)]);debug&&_0xc04f8e[_0x5f38(0x26)](logDebug,_0xc04f8e[_0x5f38(0x3b)],{'endpoint':_0x50777c,'method':_0x1ab6b0,'error':_0x584d91[_0x5f38(0x32)]||_0xc04f8e[_0x5f38(0x3c)]});throw new ApiError(_0x584d91[_0x5f38(0x32)]||_0x5f38(0x3d),_0xc04f8e[_0x5f38(0x2f)]);}},makeDeveloperApiRequest=async(_0x442510,_0x4a9319,_0x226666={})=>{const _0x64eb52={'FcwWP':_0x5f38(0x16),'DJodE':_0x5f38(0xd),'wHKDE':_0x5f38(0xe),'wiVEo':_0x5f38(0x3e),'YWYkz':_0x5f38(0x3f),'DtvoM':function(_0x166de2,_0xefc3f6,_0x15f9b4){return _0x166de2(_0xefc3f6,_0x15f9b4);},'KYaMT':_0x5f38(0x9),'LPBNE':function(_0x1c22e9,_0x41e566){return _0x1c22e9||_0x41e566;},'ydEBQ':function(_0x30ac90,_0x212258,_0x149d5b){return _0x30ac90(_0x212258,_0x149d5b);},'QJvCB':_0x5f38(0x40),'KvglX':function(_0x1996a2,_0x531cfb){return _0x1996a2===_0x531cfb;},'tvhKF':function(_0x55b69c,_0x22006d){return _0x55b69c===_0x22006d;},'MshRa':_0x5f38(0x41),'rmdpo':_0x5f38(0x10),'kklZK':function(_0x110498,_0x3dd7b5){return _0x110498>=_0x3dd7b5;},'PjvAr':'server_error','ajNgQ':function(_0x3d0877,_0x54541f){return _0x3d0877===_0x54541f;},'UVpAc':_0x5f38(0x13),'Ubpst':function(_0x2590ca,_0x42f9ac){return _0x2590ca===_0x42f9ac;},'RgoWE':'KPvBA','RDNTn':_0x5f38(0x42),'mSGtb':'Developer\x20API\x20Error','yQfvI':'Unknown\x20error','CHBGF':_0x5f38(0x3d),'gqxxL':_0x5f38(0x12)},{data:_0x2f89aa,headers:headers={},debug:debug=![]}=_0x226666;try{const _0x54456c=await checkNetworkConnection();if(!_0x54456c)throw new ApiError(_0x64eb52['DJodE'],_0x64eb52[_0x5f38(0x43)]);if(debug){if(_0x64eb52['wiVEo']!==_0x64eb52['YWYkz'])_0x64eb52[_0x5f38(0x44)](logDebug,_0x64eb52[_0x5f38(0x45)],{'endpoint':_0x442510,'method':_0x4a9319,'headers':{...headers,'Authorization':_0x5f38(0xa)},'data':_0x64eb52['LPBNE'](_0x2f89aa,null)});else throw new _0x17ded0(_0x5f38(0x42),_0x64eb52[_0x5f38(0x46)]);}const _0x59cdc0=await _0x64eb52[_0x5f38(0x44)](makeDeveloperRequest,_0x442510,{'method':_0x4a9319,'headers':headers,..._0x2f89aa?{'body':JSON[_0x5f38(0x27)](_0x2f89aa)}:{}}),_0xd54509=await _0x59cdc0['json']();debug&&_0x64eb52[_0x5f38(0x47)](logDebug,_0x64eb52[_0x5f38(0x48)],{'status':_0x59cdc0[_0x5f38(0x2a)],'data':_0xd54509});if(!_0x59cdc0['ok']){var _0x12d193,_0x25e67c,_0x1f86a0;const _0x4226f0=_0x64eb52['KvglX'](_0x59cdc0[_0x5f38(0x2a)],0x191)||_0x64eb52[_0x5f38(0x49)](_0x59cdc0['status'],0x193)?_0x64eb52[_0x5f38(0x4a)]:_0x64eb52['tvhKF'](_0x59cdc0['status'],0x190)?_0x64eb52[_0x5f38(0x4b)]:_0x64eb52[_0x5f38(0x4c)](_0x59cdc0[_0x5f38(0x2a)],0x1f4)?_0x64eb52[_0x5f38(0x4d)]:'unknown_error';throw new ApiError(((_0x12d193=_0xd54509[_0x5f38(0x31)])===null||_0x64eb52[_0x5f38(0x4e)](_0x12d193,void 0x0)?void 0x0:_0x12d193['message'])||_0x64eb52[_0x5f38(0x4f)],_0x4226f0,(_0x25e67c=_0xd54509[_0x5f38(0x31)])===null||_0x64eb52[_0x5f38(0x4e)](_0x25e67c,void 0x0)?void 0x0:_0x25e67c[_0x5f38(0x5)],(_0x1f86a0=_0xd54509['error'])===null||_0x64eb52[_0x5f38(0x50)](_0x1f86a0,void 0x0)?void 0x0:_0x1f86a0[_0x5f38(0x36)]);}return _0xd54509;}catch(_0x1da59e){if(_0x64eb52['RgoWE']!==_0x64eb52['RgoWE'])return{'isValid':![],'message':_0x453b5c['message']};else{if(_0x1da59e instanceof ApiError)throw _0x1da59e;if(_0x1da59e[_0x5f38(0x3)]===_0x5f38(0x15))throw new ApiError(_0x64eb52[_0x5f38(0x51)],_0x5f38(0x16));debug&&_0x64eb52['DtvoM'](logDebug,_0x64eb52[_0x5f38(0x52)],{'endpoint':_0x442510,'method':_0x4a9319,'error':_0x1da59e[_0x5f38(0x32)]||_0x64eb52[_0x5f38(0x53)]});throw new ApiError(_0x1da59e[_0x5f38(0x32)]||_0x64eb52[_0x5f38(0x54)],_0x64eb52[_0x5f38(0x55)]);}}};export const validateCredentials=async(_0x347b0f,_0xe9c8bc={'debug':![]})=>{const _0x41fa35={'TlQIm':function(_0x473a17,_0x504ecb,_0x1cdab9,_0x4425ff){return _0x473a17(_0x504ecb,_0x1cdab9,_0x4425ff);},'LRNpv':_0x5f38(0x56),'LaUkq':_0x5f38(0x57),'jsVJA':_0x5f38(0x58),'uzuWs':function(_0xa3dc04,_0x46524d){return _0xa3dc04===_0x46524d;}};try{if('XKpAE'===_0x41fa35['LaUkq'])return _0x41fa35['TlQIm'](_0x1caed8,_0x41fa35[_0x5f38(0x59)],'PUT',{'data':{'platforms':_0x1a0230},'debug':_0x56c588[_0x5f38(0x39)]});else{var _0x331396,_0xe259d0;const _0x484124=await _0x41fa35[_0x5f38(0x5a)](makeUserApiRequest,_0x41fa35[_0x5f38(0x5b)],'POST',{'data':{'username':_0x347b0f},'debug':_0xe9c8bc[_0x5f38(0x39)]});return{'isValid':_0x484124[_0x5f38(0x5c)]&&_0x41fa35[_0x5f38(0x5d)](_0x41fa35['uzuWs'](_0x331396=_0x484124['data'],null)||_0x41fa35[_0x5f38(0x5d)](_0x331396,void 0x0)?void 0x0:_0x331396[_0x5f38(0x5e)],!![]),'message':(_0xe259d0=_0x484124[_0x5f38(0x31)])===null||_0xe259d0===void 0x0?void 0x0:_0xe259d0[_0x5f38(0x32)]};}}catch(_0x3868f8){return{'isValid':![],'message':_0x3868f8['message']};}};export const createAccount=async(_0x5e1aaa,_0x5754fb={'debug':![]})=>{const _0x285efa={'EXhxT':function(_0x4e8e72,_0x1dce27,_0x468de5,_0x368474){return _0x4e8e72(_0x1dce27,_0x468de5,_0x368474);},'CsRrj':_0x5f38(0x5f)};return _0x285efa[_0x5f38(0x60)](makeDeveloperApiRequest,_0x285efa[_0x5f38(0x61)],'POST',{'data':{'username':_0x5e1aaa[_0x5f38(0x62)],'platforms':_0x5e1aaa['platforms']},'debug':_0x5754fb[_0x5f38(0x39)]});};export const authenticate=async(_0x3fb3d6,_0x2bb32c={'debug':![]})=>{const _0x1e6213={'QhUUe':function(_0x35cea4,_0x449e7a,_0x4c932f,_0x144bf0){return _0x35cea4(_0x449e7a,_0x4c932f,_0x144bf0);},'DDWtW':'auth/login'};return _0x1e6213[_0x5f38(0x63)](makeUserApiRequest,_0x1e6213[_0x5f38(0x64)],'POST',{'data':{'username':_0x3fb3d6['username'],'pin':_0x3fb3d6['userPin']},'debug':_0x2bb32c['debug']});};export const refreshToken=async(_0x4dd3ae,_0x5c4a2f={'debug':![]})=>{const _0xeb734a={'ucApd':function(_0x1bff33,_0x2c36f1,_0x2926f5,_0x4a50cd){return _0x1bff33(_0x2c36f1,_0x2926f5,_0x4a50cd);},'EXjEc':'auth/refresh'};return _0xeb734a[_0x5f38(0x65)](makeUserApiRequest,_0xeb734a[_0x5f38(0x66)],'POST',{'data':{'refreshToken':_0x4dd3ae},'debug':_0x5c4a2f[_0x5f38(0x39)]});};export const getPlatformData=async(_0x47c134,_0x36d69e={'debug':![]})=>{const _0x37a5fb={'RsAGj':function(_0x5ef3b4,_0x4cefb5,_0x22436e,_0x187f86){return _0x5ef3b4(_0x4cefb5,_0x22436e,_0x187f86);}};return _0x37a5fb[_0x5f38(0x67)](makeUserApiRequest,_0x5f38(0x68)+_0x47c134+_0x5f38(0x69),'GET',{'debug':_0x36d69e[_0x5f38(0x39)]});};export const getUserProfile=async(_0x4efc4e={'debug':![]})=>{const _0x451789={'KdJbB':function(_0x5109b1,_0x32c6de,_0x34d55a,_0x27dd22){return _0x5109b1(_0x32c6de,_0x34d55a,_0x27dd22);},'BvzXT':_0x5f38(0x6a)};return _0x451789[_0x5f38(0x6b)](makeUserApiRequest,_0x451789[_0x5f38(0x6c)],'GET',{'debug':_0x4efc4e[_0x5f38(0x39)]});};export const updatePlatformConnections=async(_0x2ec876,_0x32da83={'debug':![]})=>{const _0x1edd8d={'uvGgp':function(_0x1d0f28,_0x226e5e,_0x39b401,_0x2b9e17){return _0x1d0f28(_0x226e5e,_0x39b401,_0x2b9e17);},'ldNvm':_0x5f38(0x56)};return _0x1edd8d[_0x5f38(0x6d)](makeUserApiRequest,_0x1edd8d[_0x5f38(0x6e)],'PUT',{'data':{'platforms':_0x2ec876},'debug':_0x32da83[_0x5f38(0x39)]});};export const storePIN=async(_0xd64986,_0x4764e2={})=>{const _0x27a32e={'YsBJR':function(_0x4dca54){return _0x4dca54();},'tGSeH':_0x5f38(0x6f),'EwZMM':function(_0x588b92,_0x5358be,_0x4010f3,_0xf75e23){return _0x588b92(_0x5358be,_0x4010f3,_0xf75e23);},'qQSMi':_0x5f38(0x70)},{debug:debug=![],username:_0x3e32f0}=_0x4764e2,_0x3b86b0=_0x3e32f0||_0x27a32e[_0x5f38(0x71)](extractUsernameFromJWT);if(!_0x3b86b0)throw new ApiError(_0x27a32e[_0x5f38(0x72)],_0x5f38(0x41));return _0x27a32e['EwZMM'](makeUserApiRequest,_0x27a32e[_0x5f38(0x73)],'POST',{'data':{'username':_0x3b86b0,'pin':_0xd64986},'debug':debug});};function _0x5f38(_0x200cd9,_0x5f38df){_0x200cd9=_0x200cd9-0x0;const _0x239191=_0x200c();let _0x227e75=_0x239191[_0x200cd9];return _0x227e75;}function _0x200c(){const _0x1dd3df=['2|3|1|4|0','ApiError','UyAnf','name','wEpWq','code','type','fetch','isConnected','Developer\x20API\x20Request','[REDACTED]','auth/refresh','zIvfU','No\x20network\x20connection\x20available','network_error','User\x20API\x20Request','validation_error','server_error','unknown_error','API\x20request\x20failed','TgehM','AbortError','timeout_error','User\x20API\x20Error','ZZoYQ','oQubn','gTFDy','OzYXv','PPJIe','sAxyd','EdzBy','WfxsK','CjRpb','bUVCs','Sevqc','sTRrk','EORXH','KXJND','LapzM','stringify','json','wqkUC','status','oVthq','nQeIM','TVZwY','DxsKu','ZLCuD','pCSpo','error','message','RYdui','NQSsf','oWzAZ','details','ExzuJ','YWKOq','debug','xdvfs','cjiea','zsVzo','An\x20unexpected\x20error\x20occurred','qiQYW','IwiNn','Developer\x20API\x20Response','auth_error','Request\x20timed\x20out','wHKDE','DtvoM','KYaMT','FcwWP','ydEBQ','QJvCB','tvhKF','MshRa','rmdpo','kklZK','PjvAr','ajNgQ','UVpAc','Ubpst','RDNTn','mSGtb','yQfvI','CHBGF','gqxxL','user/platforms','ohiHV','auth/validate','LRNpv','TlQIm','jsVJA','success','uzuWs','isValid','auth/register','EXhxT','CsRrj','username','QhUUe','DDWtW','ucApd','EXjEc','RsAGj','platforms/','/data','user/profile','KdJbB','BvzXT','uvGgp','ldNvm','No\x20username\x20available\x20-\x20either\x20provide\x20username\x20or\x20ensure\x20JWT\x20token\x20is\x20valid','store-pin/mobile','YsBJR','tGSeH','qQSMi','ujdix','LkJrK'];_0x200c=function(){return _0x1dd3df;};return _0x200c();}export const getCurrentUserToken=async()=>{const _0x2f523d={'ujdix':function(_0x4988ae){return _0x4988ae();}};return await _0x2f523d[_0x5f38(0x74)](getJWT);};export const isCurrentUserAuthenticated=()=>{const _0x46094d={'LkJrK':function(_0x244d63){return _0x244d63();}};return _0x46094d[_0x5f38(0x75)](isUserAuthenticated);};
|
|
1
|
+
import NetInfo from'@react-native-community/netinfo';import{logDebug}from'./debugHelper';import{getJWT,makeUserRequest,makeDeveloperRequest,isUserAuthenticated,extractUsernameFromJWT}from'../services/apiKeyService';export class ApiError extends Error{constructor(_0x112d2b,_0x312717,_0x29edae,_0x18c484){const _0x20f33c={'IzQnL':_0x3b69(0x0)};super(_0x112d2b),this['type']=_0x312717,this[_0x3b69(0x1)]=_0x29edae,this[_0x3b69(0x2)]=_0x18c484,this[_0x3b69(0x3)]=_0x20f33c[_0x3b69(0x4)];}}const checkNetworkConnection=async()=>{const _0x149587=await NetInfo['fetch']();return _0x149587[_0x3b69(0x5)]===!![];},makeUserApiRequest=async(_0x46ce76,_0x14d278,_0x50af9c={})=>{const _0x4c73f5={'MXTyi':function(_0x431ce3){return _0x431ce3();},'Hzrmh':function(_0x1d8feb,_0x136ebc,_0x96c738,_0x1063d2){return _0x1d8feb(_0x136ebc,_0x96c738,_0x1063d2);},'BZHEn':'No\x20username\x20available\x20-\x20either\x20provide\x20username\x20or\x20ensure\x20JWT\x20token\x20is\x20valid','uSkGY':_0x3b69(0x6),'zViTm':_0x3b69(0x7),'pCvUz':function(_0x57c7ef){return _0x57c7ef();},'wdSPt':function(_0x25b7d5,_0x18351d){return _0x25b7d5===_0x18351d;},'aERrY':_0x3b69(0x8),'zTEFO':_0x3b69(0x9),'hxPLQ':function(_0x47098d){return _0x47098d();},'SLeHV':function(_0x2228e3,_0x390bc6,_0xbb7d39){return _0x2228e3(_0x390bc6,_0xbb7d39);},'Porjc':_0x3b69(0xa),'llPVH':_0x3b69(0xb),'isCal':function(_0x2a6a63,_0x45df72){return _0x2a6a63||_0x45df72;},'ZjWqT':function(_0x2bf958,_0x28f7d8){return _0x2bf958!==_0x28f7d8;},'OsObV':_0x3b69(0xc),'WxTpv':_0x3b69(0xd),'fWQbm':function(_0x5007ae,_0x1181ee,_0x3ebb27){return _0x5007ae(_0x1181ee,_0x3ebb27);},'bqYBP':'User\x20API\x20Response','VhjSx':function(_0x2c965d,_0x226da6){return _0x2c965d===_0x226da6;},'YKvkt':_0x3b69(0xe),'GGlSg':function(_0x5f2009,_0x54dcb4){return _0x5f2009===_0x54dcb4;},'bFnBr':_0x3b69(0xf),'YZTKh':_0x3b69(0x10),'ntRPo':'API\x20request\x20failed','hrfvI':function(_0x2a7505,_0xc1db8b){return _0x2a7505===_0xc1db8b;},'QkkHy':function(_0x35a177,_0x1a03c5){return _0x35a177===_0x1a03c5;},'GOBVX':_0x3b69(0x11),'wlqeu':_0x3b69(0x12),'gHqOT':_0x3b69(0x13),'tlseH':'Request\x20timed\x20out','WnLzo':function(_0x3323ff,_0x3f61e5,_0x2946a2){return _0x3323ff(_0x3f61e5,_0x2946a2);},'ahekH':'User\x20API\x20Error','GQtym':_0x3b69(0x14),'OsNmI':'An\x20unexpected\x20error\x20occurred'},{data:_0x18cefd,headers:headers={},debug:debug=![]}=_0x50af9c;try{const _0x89ad75=await _0x4c73f5['pCvUz'](checkNetworkConnection);if(!_0x89ad75){if(_0x4c73f5[_0x3b69(0x15)](_0x4c73f5[_0x3b69(0x16)],_0x4c73f5['aERrY']))throw new ApiError(_0x4c73f5[_0x3b69(0x17)],_0x4c73f5[_0x3b69(0x18)]);else return _0x4c73f5['MXTyi'](_0x4b327f);}if(!_0x4c73f5[_0x3b69(0x19)](isUserAuthenticated))throw new ApiError(_0x3b69(0x1a),_0x3b69(0x6));debug&&_0x4c73f5[_0x3b69(0x1b)](logDebug,_0x4c73f5[_0x3b69(0x1c)],{'endpoint':_0x46ce76,'method':_0x14d278,'headers':{...headers,'Authorization':_0x4c73f5[_0x3b69(0x1d)]},'data':_0x4c73f5[_0x3b69(0x1e)](_0x18cefd,null)});const _0x130de7=await _0x4c73f5[_0x3b69(0x1b)](makeUserRequest,_0x46ce76,{'method':_0x14d278,'headers':headers,..._0x18cefd?{'body':JSON[_0x3b69(0x1f)](_0x18cefd)}:{}}),_0x5efbc5=await _0x130de7['json']();if(debug){if(_0x4c73f5[_0x3b69(0x20)](_0x4c73f5[_0x3b69(0x21)],_0x4c73f5[_0x3b69(0x22)]))_0x4c73f5['fWQbm'](logDebug,_0x4c73f5['bqYBP'],{'status':_0x130de7['status'],'data':_0x5efbc5});else throw new _0x1ddce7('No\x20network\x20connection\x20available',_0x3b69(0x7));}if(!_0x130de7['ok']){if(_0x4c73f5[_0x3b69(0x23)](_0x4c73f5[_0x3b69(0x24)],_0x4c73f5[_0x3b69(0x24)])){var _0xefa8d3,_0x525acd,_0x23dc15;const _0x632aee=_0x4c73f5[_0x3b69(0x25)](_0x130de7['status'],0x191)||_0x4c73f5['wdSPt'](_0x130de7['status'],0x193)?_0x4c73f5['uSkGY']:_0x130de7[_0x3b69(0x26)]===0x190?_0x4c73f5[_0x3b69(0x27)]:_0x130de7['status']>=0x1f4?_0x4c73f5[_0x3b69(0x28)]:'unknown_error';throw new ApiError((_0x4c73f5[_0x3b69(0x25)](_0xefa8d3=_0x5efbc5[_0x3b69(0x29)],null)||_0x4c73f5[_0x3b69(0x25)](_0xefa8d3,void 0x0)?void 0x0:_0xefa8d3[_0x3b69(0x2a)])||_0x4c73f5[_0x3b69(0x2b)],_0x632aee,_0x4c73f5['hrfvI'](_0x525acd=_0x5efbc5[_0x3b69(0x29)],null)||_0x4c73f5[_0x3b69(0x2c)](_0x525acd,void 0x0)?void 0x0:_0x525acd[_0x3b69(0x1)],_0x4c73f5[_0x3b69(0x2d)](_0x23dc15=_0x5efbc5[_0x3b69(0x29)],null)||_0x23dc15===void 0x0?void 0x0:_0x23dc15['details']);}else return _0x4c73f5['Hzrmh'](_0xb3525b,_0x3b69(0x2e)+_0xfe7997+'/data','GET',{'debug':_0x10a0c6[_0x3b69(0x2f)]});}return _0x5efbc5;}catch(_0xa70140){if(_0xa70140 instanceof ApiError){if(_0x4c73f5[_0x3b69(0x2c)](_0x4c73f5[_0x3b69(0x30)],_0x4c73f5[_0x3b69(0x30)]))throw _0xa70140;else throw new _0x4980ea(_0x4c73f5[_0x3b69(0x31)],_0x4c73f5[_0x3b69(0x32)]);}if(_0x4c73f5['wdSPt'](_0xa70140[_0x3b69(0x3)],_0x4c73f5[_0x3b69(0x33)])){if(_0x4c73f5[_0x3b69(0x34)]!==_0x4c73f5['gHqOT'])throw new _0x12c9a6(_0x3b69(0x9),_0x4c73f5[_0x3b69(0x18)]);else throw new ApiError(_0x4c73f5[_0x3b69(0x35)],'timeout_error');}debug&&_0x4c73f5[_0x3b69(0x36)](logDebug,_0x4c73f5[_0x3b69(0x37)],{'endpoint':_0x46ce76,'method':_0x14d278,'error':_0xa70140['message']||_0x4c73f5[_0x3b69(0x38)]});throw new ApiError(_0xa70140[_0x3b69(0x2a)]||_0x4c73f5[_0x3b69(0x39)],'unknown_error');}},makeDeveloperApiRequest=async(_0x24b3d1,_0x26cbc4,_0x429861={})=>{const _0x562f59={'ZpPbw':function(_0x411531,_0x5797e7,_0x4e012a,_0x1472e1){return _0x411531(_0x5797e7,_0x4e012a,_0x1472e1);},'rikyQ':'auth/login','CBeal':_0x3b69(0x3a),'tFzuT':function(_0x27908b,_0x475c42){return _0x27908b===_0x475c42;},'pQHHd':'auth_error','PMqhi':_0x3b69(0xf),'IjSXA':_0x3b69(0x10),'AwbdE':_0x3b69(0x3b),'lfVWG':function(_0x31975e,_0x28a7c1){return _0x31975e===_0x28a7c1;},'gjtQZ':function(_0x5eaf2e,_0x484a9d){return _0x5eaf2e===_0x484a9d;},'hctYr':function(_0x349dc7,_0x4e869f){return _0x349dc7===_0x4e869f;},'Sluqf':function(_0x2f912c){return _0x2f912c();},'Ctydp':_0x3b69(0x9),'SYxWU':_0x3b69(0x7),'qBhdK':function(_0x4cf183,_0xcbb860,_0x43822e){return _0x4cf183(_0xcbb860,_0x43822e);},'fwYfY':_0x3b69(0x3c),'OuDlp':_0x3b69(0xb),'CpkZo':function(_0x43dadc,_0x172b7d){return _0x43dadc||_0x172b7d;},'rvrdm':function(_0x21388a,_0x34b886){return _0x21388a===_0x34b886;},'UeRut':'NHyHh','dowDz':_0x3b69(0x3d),'JhhpT':function(_0x1a9ea8,_0x3e4bcb){return _0x1a9ea8>=_0x3e4bcb;},'HSXfx':function(_0x2e6d80,_0x335682){return _0x2e6d80===_0x335682;},'TIaNJ':'API\x20request\x20failed','dyqcN':_0x3b69(0x3e),'ItPIR':function(_0x5cbde7,_0x33de6b){return _0x5cbde7 instanceof _0x33de6b;},'ipzpF':function(_0x55c96f,_0x49247f){return _0x55c96f!==_0x49247f;},'jNrlX':_0x3b69(0x3f),'WOyBJ':_0x3b69(0x40),'ltjCf':_0x3b69(0x41),'OeWpB':_0x3b69(0x42),'ljsnL':function(_0x41cb52,_0x158514,_0x504609){return _0x41cb52(_0x158514,_0x504609);},'mXMmD':_0x3b69(0x43)},{data:_0x482c5f,headers:headers={},debug:debug=![]}=_0x429861;try{const _0x37228b=await _0x562f59['Sluqf'](checkNetworkConnection);if(!_0x37228b)throw new ApiError(_0x562f59['Ctydp'],_0x562f59['SYxWU']);debug&&_0x562f59[_0x3b69(0x44)](logDebug,_0x562f59[_0x3b69(0x45)],{'endpoint':_0x24b3d1,'method':_0x26cbc4,'headers':{...headers,'Authorization':_0x562f59[_0x3b69(0x46)]},'data':_0x562f59[_0x3b69(0x47)](_0x482c5f,null)});const _0x3a1848=await makeDeveloperRequest(_0x24b3d1,{'method':_0x26cbc4,'headers':headers,..._0x482c5f?{'body':JSON['stringify'](_0x482c5f)}:{}}),_0x460c9d=await _0x3a1848[_0x3b69(0x48)]();if(debug){if(_0x562f59[_0x3b69(0x49)](_0x562f59[_0x3b69(0x4a)],_0x562f59[_0x3b69(0x4b)]))return _0x562f59[_0x3b69(0x4c)](_0x1f7735,_0x562f59[_0x3b69(0x4d)],'POST',{'data':{'username':_0x5f0ebc[_0x3b69(0x4e)],'pin':_0x3b3174[_0x3b69(0x4f)]},'debug':_0x522ee9[_0x3b69(0x2f)]});else _0x562f59['qBhdK'](logDebug,_0x3b69(0x50),{'status':_0x3a1848[_0x3b69(0x26)],'data':_0x460c9d});}if(!_0x3a1848['ok']){var _0x2b658c,_0x506ba8,_0x11b0bc;const _0x1a4f76=_0x3a1848['status']===0x191||_0x562f59['tFzuT'](_0x3a1848[_0x3b69(0x26)],0x193)?_0x562f59['pQHHd']:_0x3a1848[_0x3b69(0x26)]===0x190?'validation_error':_0x562f59[_0x3b69(0x51)](_0x3a1848['status'],0x1f4)?_0x562f59[_0x3b69(0x52)]:_0x3b69(0x3b);throw new ApiError(((_0x2b658c=_0x460c9d[_0x3b69(0x29)])===null||_0x562f59[_0x3b69(0x53)](_0x2b658c,void 0x0)?void 0x0:_0x2b658c['message'])||_0x562f59[_0x3b69(0x54)],_0x1a4f76,_0x562f59[_0x3b69(0x55)](_0x506ba8=_0x460c9d[_0x3b69(0x29)],null)||_0x562f59[_0x3b69(0x56)](_0x506ba8,void 0x0)?void 0x0:_0x506ba8[_0x3b69(0x1)],(_0x11b0bc=_0x460c9d[_0x3b69(0x29)])===null||_0x11b0bc===void 0x0?void 0x0:_0x11b0bc[_0x3b69(0x2)]);}return _0x460c9d;}catch(_0x39c9e7){if(_0x562f59[_0x3b69(0x57)]!==_0x562f59[_0x3b69(0x57)])return _0x562f59[_0x3b69(0x4c)](_0x5c350f,_0x562f59['CBeal'],'POST',{'data':{'username':_0x2fdad9[_0x3b69(0x4e)],'platforms':_0x463e52[_0x3b69(0x58)]},'debug':_0x1ef45c[_0x3b69(0x2f)]});else{if(_0x562f59[_0x3b69(0x59)](_0x39c9e7,ApiError)){if(_0x562f59[_0x3b69(0x5a)](_0x562f59['jNrlX'],_0x562f59[_0x3b69(0x5b)]))throw _0x39c9e7;else{var _0x787321,_0x204ad5,_0x5c5ef9;const _0x15799e=_0x562f59['tFzuT'](_0x52d271[_0x3b69(0x26)],0x191)||_0x562f59[_0x3b69(0x5c)](_0x1ca9f1['status'],0x193)?_0x562f59[_0x3b69(0x5d)]:_0x562f59[_0x3b69(0x5c)](_0x33255d[_0x3b69(0x26)],0x190)?_0x562f59[_0x3b69(0x5e)]:_0x54e2f8[_0x3b69(0x26)]>=0x1f4?_0x562f59[_0x3b69(0x52)]:_0x562f59['AwbdE'];throw new _0x24040f((_0x562f59[_0x3b69(0x55)](_0x787321=_0x11a9ec[_0x3b69(0x29)],null)||_0x562f59[_0x3b69(0x5c)](_0x787321,void 0x0)?void 0x0:_0x787321[_0x3b69(0x2a)])||_0x3b69(0x5f),_0x15799e,(_0x204ad5=_0x25b73a[_0x3b69(0x29)])===null||_0x562f59[_0x3b69(0x56)](_0x204ad5,void 0x0)?void 0x0:_0x204ad5[_0x3b69(0x1)],_0x562f59[_0x3b69(0x55)](_0x5c5ef9=_0x28687e[_0x3b69(0x29)],null)||_0x562f59[_0x3b69(0x60)](_0x5c5ef9,void 0x0)?void 0x0:_0x5c5ef9[_0x3b69(0x2)]);}}if(_0x39c9e7[_0x3b69(0x3)]===_0x3b69(0x12))throw new ApiError(_0x562f59[_0x3b69(0x61)],_0x562f59[_0x3b69(0x62)]);debug&&_0x562f59[_0x3b69(0x63)](logDebug,_0x562f59[_0x3b69(0x64)],{'endpoint':_0x24b3d1,'method':_0x26cbc4,'error':_0x39c9e7[_0x3b69(0x2a)]||_0x3b69(0x14)});throw new ApiError(_0x39c9e7[_0x3b69(0x2a)]||'An\x20unexpected\x20error\x20occurred',_0x562f59[_0x3b69(0x65)]);}}};export const validateCredentials=async(_0xd6f858,_0x5b42f1={'debug':![]})=>{const _0x2605fd={'rYAwE':_0x3b69(0x66),'glZqZ':function(_0x194773,_0x5d2ef9,_0x26f5a2,_0x3eb27a){return _0x194773(_0x5d2ef9,_0x26f5a2,_0x3eb27a);},'gtlhR':function(_0x4a9c92,_0x134cf7){return _0x4a9c92===_0x134cf7;},'PiFWr':function(_0x4d331f,_0x4ade3c){return _0x4d331f===_0x4ade3c;},'IOHdD':function(_0x5557ca,_0x1e440e){return _0x5557ca===_0x1e440e;},'NyXdZ':_0x3b69(0x67)};try{if(_0x3b69(0x66)!==_0x2605fd[_0x3b69(0x68)])throw _0x500715;else{var _0x183e7b,_0xe14d17;const _0x34989f=await _0x2605fd['glZqZ'](makeUserApiRequest,_0x3b69(0x69),'POST',{'data':{'username':_0xd6f858},'debug':_0x5b42f1[_0x3b69(0x2f)]});return{'isValid':_0x34989f[_0x3b69(0x6a)]&&_0x2605fd[_0x3b69(0x6b)](_0x2605fd[_0x3b69(0x6b)](_0x183e7b=_0x34989f['data'],null)||_0x2605fd['PiFWr'](_0x183e7b,void 0x0)?void 0x0:_0x183e7b[_0x3b69(0x6c)],!![]),'message':_0x2605fd[_0x3b69(0x6d)](_0xe14d17=_0x34989f[_0x3b69(0x29)],null)||_0x2605fd[_0x3b69(0x6e)](_0xe14d17,void 0x0)?void 0x0:_0xe14d17[_0x3b69(0x2a)]};}}catch(_0x7bdf34){return _0x3b69(0x67)===_0x2605fd[_0x3b69(0x6f)]?{'isValid':![],'message':_0x7bdf34[_0x3b69(0x2a)]}:{'isValid':![],'message':_0x37f5a0[_0x3b69(0x2a)]};}};export const createAccount=async(_0x447cbc,_0x307aaf={'debug':![]})=>{const _0x43a832={'wVokT':_0x3b69(0x3a)};return makeDeveloperApiRequest(_0x43a832[_0x3b69(0x70)],'POST',{'data':{'username':_0x447cbc['username'],'platforms':_0x447cbc[_0x3b69(0x58)]},'debug':_0x307aaf[_0x3b69(0x2f)]});};export const authenticate=async(_0x530f50,_0x261653={'debug':![]})=>{const _0x59399a={'VOZln':'auth/login'};return makeUserApiRequest(_0x59399a[_0x3b69(0x71)],'POST',{'data':{'username':_0x530f50[_0x3b69(0x4e)],'pin':_0x530f50[_0x3b69(0x4f)]},'debug':_0x261653['debug']});};export const refreshToken=async(_0x1af7bb,_0x5e29c2={'debug':![]})=>{const _0x11f4a8={'TgvuD':function(_0x17ebe0,_0x5f49b5,_0x174070,_0x519da4){return _0x17ebe0(_0x5f49b5,_0x174070,_0x519da4);},'PhPnV':'auth/refresh'};return _0x11f4a8[_0x3b69(0x72)](makeUserApiRequest,_0x11f4a8['PhPnV'],'POST',{'data':{'refreshToken':_0x1af7bb},'debug':_0x5e29c2[_0x3b69(0x2f)]});};export const getPlatformData=async(_0x266fdf,_0x2154e7={'debug':![]})=>{return makeUserApiRequest(_0x3b69(0x2e)+_0x266fdf+_0x3b69(0x73),'GET',{'debug':_0x2154e7[_0x3b69(0x2f)]});};export const getUserProfile=async(_0x300cc0={'debug':![]})=>{return makeUserApiRequest(_0x3b69(0x74),'GET',{'debug':_0x300cc0[_0x3b69(0x2f)]});};export const updatePlatformConnections=async(_0x1b599c,_0x1313eb={'debug':![]})=>{return makeUserApiRequest(_0x3b69(0x75),'PUT',{'data':{'platforms':_0x1b599c},'debug':_0x1313eb[_0x3b69(0x2f)]});};export const storePIN=async(_0xb92947,_0x497167={})=>{const _0x5b460f={'FAzCl':_0x3b69(0x76),'JNhkw':_0x3b69(0x6),'lswoS':function(_0x58a2eb,_0x5b4eb1,_0x5edced,_0x1862fb){return _0x58a2eb(_0x5b4eb1,_0x5edced,_0x1862fb);}},{debug:debug=![],username:_0x41a141}=_0x497167,_0x4ff419=_0x41a141||extractUsernameFromJWT();if(!_0x4ff419)throw new ApiError(_0x5b460f['FAzCl'],_0x5b460f[_0x3b69(0x77)]);return _0x5b460f[_0x3b69(0x78)](makeUserApiRequest,_0x3b69(0x79),'POST',{'data':{'username':_0x4ff419,'pin':_0xb92947},'debug':debug});};function _0x3b69(_0x311d37,_0x3b6938){_0x311d37=_0x311d37-0x0;const _0x1c06e1=_0x311d();let _0x5c7105=_0x1c06e1[_0x311d37];return _0x5c7105;}export const getCurrentUserToken=async()=>{const _0xa855e7={'NaDoJ':function(_0x3ce384){return _0x3ce384();}};return await _0xa855e7['NaDoJ'](getJWT);};function _0x311d(){const _0xe4e68d=['ApiError','code','details','name','IzQnL','isConnected','auth_error','network_error','oGQPa','No\x20network\x20connection\x20available','User\x20API\x20Request','[REDACTED]','rLUIc','YiMfx','fhQXR','validation_error','server_error','vgRKl','AbortError','Tjmno','Unknown\x20error','wdSPt','aERrY','zTEFO','zViTm','hxPLQ','User\x20not\x20authenticated.\x20Please\x20verify\x20email\x20first.','SLeHV','Porjc','llPVH','isCal','stringify','ZjWqT','OsObV','WxTpv','VhjSx','YKvkt','GGlSg','status','bFnBr','YZTKh','error','message','ntRPo','QkkHy','hrfvI','platforms/','debug','GOBVX','BZHEn','uSkGY','wlqeu','gHqOT','tlseH','WnLzo','ahekH','GQtym','OsNmI','auth/register','unknown_error','Developer\x20API\x20Request','vcTIN','NaTLV','rtVIW','GJIqG','Request\x20timed\x20out','timeout_error','Developer\x20API\x20Error','qBhdK','fwYfY','OuDlp','CpkZo','json','rvrdm','UeRut','dowDz','ZpPbw','rikyQ','username','userPin','Developer\x20API\x20Response','JhhpT','IjSXA','HSXfx','TIaNJ','lfVWG','gjtQZ','dyqcN','platforms','ItPIR','ipzpF','WOyBJ','tFzuT','pQHHd','PMqhi','API\x20request\x20failed','hctYr','ltjCf','OeWpB','ljsnL','mXMmD','AwbdE','utpem','xEZZL','rYAwE','auth/validate','success','gtlhR','isValid','IOHdD','PiFWr','NyXdZ','wVokT','VOZln','TgvuD','/data','user/profile','user/platforms','No\x20username\x20available\x20-\x20either\x20provide\x20username\x20or\x20ensure\x20JWT\x20token\x20is\x20valid','JNhkw','lswoS','store-pin/mobile','kDQQr'];_0x311d=function(){return _0xe4e68d;};return _0x311d();}export const isCurrentUserAuthenticated=()=>{const _0x4fa847={'kDQQr':function(_0x31a58f){return _0x31a58f();}};return _0x4fa847[_0x3b69(0x7a)](isUserAuthenticated);};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{initializePlatformAuthService}from'../services/platformAuthService';export const executeOnairosFlow=async _0x6277a2=>{const _0x39102d={'OpyMC':function(_0x16c40a,_0x1cf9a3){return _0x16c40a(_0x1cf9a3);},'otHlS':_0x4bb8(0x0),'llZex':_0x4bb8(0x1),'yBvMZ':_0x4bb8(0x2),'liYAn':_0x4bb8(0x3),'xZXeN':function(_0x6d39ba){return _0x6d39ba();},'LlbXy':_0x4bb8(0x4)};try{console[_0x4bb8(0x5)](_0x4bb8(0x6)),await _0x39102d[_0x4bb8(0x7)](initializePlatformAuthService);const {UniversalOnboarding:_0x476cb1}=await import(_0x4bb8(0x8)),React=await import('react');return new Promise((_0x2bf36f,_0x5bad05)=>{const _0x239bc={'zDhVO':_0x39102d[_0x4bb8(0x9)],'YaOOO':function(_0x1b47ec){return _0x1b47ec();}};let _0xb9639c=null;const _0x50298d=(_0x1e961e,_0x26eaef,_0x30430f)=>{console[_0x4bb8(0x5)](_0x239bc[_0x4bb8(0xa)]),_0xb9639c&&_0xb9639c['close']&&_0xb9639c[_0x4bb8(0xb)](),_0x6277a2[_0x4bb8(0xc)]&&_0x6277a2[_0x4bb8(0xc)](_0x1e961e,_0x26eaef,_0x30430f),_0x239bc[_0x4bb8(0xd)](_0x2bf36f);},_0x5dbfe2=_0x5927d0=>{console['log'](_0x4bb8(0xe),_0x5927d0),_0xb9639c&&_0xb9639c[_0x4bb8(0xb)]&&_0xb9639c[_0x4bb8(0xb)](),_0x6277a2[_0x4bb8(0xf)]&&_0x6277a2[_0x4bb8(0xf)](_0x5927d0),_0x39102d[_0x4bb8(0x10)](_0x5bad05,new Error(_0x5927d0||_0x39102d[_0x4bb8(0x11)]));},_0x23240c=React['createElement'](_0x476cb1,{'visible':!![],'onClose':()=>_0x5dbfe2('User\x20closed\x20the\x20modal'),'AppName':_0x6277a2['AppName'],'requestData':_0x6277a2[_0x4bb8(0x12)],'returnLink':_0x6277a2[_0x4bb8(0x13)],'onComplete':_0x50298d,'preferredPlatform':_0x6277a2[_0x4bb8(0x14)],'debug':_0x6277a2[_0x4bb8(0x15)],'testMode':_0x6277a2[_0x4bb8(0x16)]});_0xb9639c=_0x23240c,console[_0x4bb8(0x5)](_0x39102d[_0x4bb8(0x17)]);});}catch(_0x20947b){if('ftBHh'!==_0x39102d[_0x4bb8(0x18)]){_0x2deb78[_0x4bb8(0x19)](_0x39102d['liYAn'],_0x2875a2);throw _0x2a4431;}else{console[_0x4bb8(0x19)](_0x39102d[_0x4bb8(0x1a)],_0x20947b);throw _0x20947b;}}};function _0x4bb8(_0x414163,_0x4bb869){_0x414163=_0x414163-0x0;const _0xa011f2=_0x4141();let _0x3b9244=_0xa011f2[_0x414163];return _0x3b9244;}export const startOnairosFlow=async _0x9aaf9d=>{const _0x2d512e={'vlWWa':'Pre-check\x20failed','Xrrng':function(_0x767f4d,_0x2ae4ae){return _0x767f4d===_0x2ae4ae;},'CBHLj':'ctkTi','tfjnz':function(_0x1f477d,_0x2f2938){return _0x1f477d!==_0x2f2938;},'ZKlvo':'IbZpL','rNFvR':'xapRC','vvXoR':_0x4bb8(0x1b)};if(_0x9aaf9d[_0x4bb8(0x1c)]){if(_0x2d512e[_0x4bb8(0x1d)](_0x2d512e[_0x4bb8(0x1e)],_0x2d512e[_0x4bb8(0x1e)])){const _0x1f3126=await _0x9aaf9d[_0x4bb8(0x1c)]();if(!_0x1f3126){if(_0x2d512e['tfjnz'](_0x2d512e['ZKlvo'],_0x2d512e['rNFvR'])){console[_0x4bb8(0x5)](_0x2d512e['vvXoR']);_0x9aaf9d['onRejection']&&_0x9aaf9d[_0x4bb8(0xf)](_0x2d512e[_0x4bb8(0x1f)]);return;}else{_0x35debb[_0x4bb8(0x5)](_0x4bb8(0x1b));_0x529924[_0x4bb8(0xf)]&&_0x3ae83c[_0x4bb8(0xf)](_0x4bb8(0x20));return;}}}else _0x5cf655[_0x4bb8(0xf)](_0x2d512e[_0x4bb8(0x1f)]);}return executeOnairosFlow(_0x9aaf9d);};function _0x4141(){const _0x4a5a13=['Onairos\x20flow\x20was\x20rejected','✅\x20Onairos\x20flow\x20completed\x20successfully','📱\x20Onairos\x20modal\x20should\x20be\x20displayed','❌\x20Failed\x20to\x20execute\x20Onairos\x20flow:','ftBHh','log','🚀\x20Starting\x20Onairos\x20flow\x20programmatically...','xZXeN','../components/UniversalOnboarding','llZex','zDhVO','close','onResolved','YaOOO','❌\x20Onairos\x20flow\x20rejected:','onRejection','OpyMC','otHlS','requestData','returnLink','preferredPlatform','debug','testMode','yBvMZ','LlbXy','error','liYAn','❌\x20Pre-check\x20failed,\x20not\x20starting\x20Onairos\x20flow','preCheck','Xrrng','CBHLj','vlWWa','Pre-check\x20failed'];_0x4141=function(){return _0x4a5a13;};return _0x4141();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const DEFAULT_RETRY_OPTIONS={'maxRetries':0x3,'baseDelay':0x3e8,'maxDelay':0x1388,'exponentialBackoff':!![],'enableLogging':![],'shouldRetry':(_0x1bd3c4,_0x593b9c)=>{const _0x1c4a6b={'aSslq':function(_0x594839,_0x2e9094){return _0x594839-_0x2e9094;},'kDZvQ':function(_0x188005,_0x4b422d){return _0x188005>=_0x4b422d;},'LPggC':function(_0x49758d,_0x5ab6c4){return _0x49758d!==_0x5ab6c4;},'XTDmO':'cXgcp','QjIFs':function(_0x267e7c,_0x139caf){return _0x267e7c===_0x139caf;},'sMmVG':_0x147d(0x0),'fQNyp':_0x147d(0x1),'YPTeA':_0x147d(0x2),'sSWeu':_0x147d(0x3),'rypXr':'timeout','MwqNa':function(_0x2cb8d9,_0x4f08a5){return _0x2cb8d9>=_0x4f08a5;},'fRlyk':_0x147d(0x4)};if(_0x1c4a6b['kDZvQ'](_0x1bd3c4[_0x147d(0x5)],0x190)&&_0x1bd3c4[_0x147d(0x5)]<0x1f4&&_0x1bd3c4[_0x147d(0x5)]!==0x198&&_0x1c4a6b[_0x147d(0x6)](_0x1bd3c4['status'],0x1ad))return _0x1c4a6b[_0x147d(0x7)]===_0x147d(0x8)?![]:{'reachable':![],'error':_0x1c20cb[_0x147d(0x9)],'duration':_0x1c4a6b[_0x147d(0xa)](_0x20634f[_0x147d(0xb)](),_0x545971)};if(_0x1c4a6b[_0x147d(0xc)](_0x1bd3c4[_0x147d(0xd)],_0x1c4a6b[_0x147d(0xe)])||_0x1bd3c4[_0x147d(0x9)]['includes'](_0x1c4a6b[_0x147d(0xf)])||_0x1bd3c4[_0x147d(0x9)][_0x147d(0x10)](_0x1c4a6b[_0x147d(0x11)])||_0x1bd3c4[_0x147d(0x9)]['includes'](_0x1c4a6b[_0x147d(0x12)])||_0x1bd3c4[_0x147d(0x9)]['includes'](_0x1c4a6b[_0x147d(0x13)])||_0x1c4a6b[_0x147d(0x14)](_0x1bd3c4[_0x147d(0x5)],0x1f4))return!![];if(_0x1bd3c4['message'][_0x147d(0x10)](_0x147d(0x15))||_0x1bd3c4['message'][_0x147d(0x10)](_0x1c4a6b[_0x147d(0x16)]))return!![];return![];}};export async function withRetry(_0xf2185b,_0x46fbcb={}){const _0x200792={'dozgh':function(_0x366e3c,_0x365f0e){return _0x366e3c<=_0x365f0e;},'fUuyH':function(_0x41fc24,_0x36c6c8){return _0x41fc24>_0x36c6c8;},'gMamV':function(_0x48968e){return _0x48968e();},'mBxuN':function(_0x1896be,_0xb29be0){return _0x1896be!==_0xb29be0;},'TPWod':_0x147d(0x17),'QIQqz':_0x147d(0x18),'QjwTY':function(_0x2d5282,_0x5e8467){return _0x2d5282*_0x5e8467;},'NJiVz':function(_0x24f05a,_0x51fd7f){return _0x24f05a-_0x51fd7f;},'rWKnZ':function(_0x57d9a6,_0x4a27fa){return _0x57d9a6+_0x4a27fa;},'bKxtZ':_0x147d(0x19)},_0x93ef8b={...DEFAULT_RETRY_OPTIONS,..._0x46fbcb},_0x58de1a=Date[_0x147d(0xb)]();let _0x51c150=null;for(let _0x3e9d96=0x1;_0x200792['dozgh'](_0x3e9d96,_0x93ef8b['maxRetries']+0x1);_0x3e9d96++){try{_0x93ef8b[_0x147d(0x1a)]&&_0x200792[_0x147d(0x1b)](_0x3e9d96,0x1)&&console[_0x147d(0x1c)]('🔄\x20Retry\x20attempt\x20'+_0x3e9d96+'/'+(_0x93ef8b['maxRetries']+0x1));const _0xc6e936=await _0x200792[_0x147d(0x1d)](_0xf2185b);return{'success':!![],'data':_0xc6e936,'attempts':_0x3e9d96,'totalDuration':Date[_0x147d(0xb)]()-_0x58de1a};}catch(_0x370739){_0x51c150=_0x370739;const _0x1b55dc=_0x93ef8b['shouldRetry']?_0x93ef8b['shouldRetry'](_0x370739,_0x3e9d96):!![];if(_0x3e9d96>_0x93ef8b[_0x147d(0x1e)]||!_0x1b55dc){_0x93ef8b[_0x147d(0x1a)]&&console[_0x147d(0x1f)]('❌\x20All\x20retry\x20attempts\x20exhausted\x20or\x20error\x20not\x20retryable:\x20'+_0x370739[_0x147d(0x9)]);break;}let _0x320489=_0x93ef8b[_0x147d(0x20)];if(_0x93ef8b['exponentialBackoff']){if(_0x200792[_0x147d(0x21)](_0x200792['TPWod'],_0x200792[_0x147d(0x22)]))_0x320489=Math[_0x147d(0x23)](_0x200792[_0x147d(0x24)](_0x93ef8b[_0x147d(0x20)],Math[_0x147d(0x25)](0x2,_0x200792[_0x147d(0x26)](_0x3e9d96,0x1))),_0x93ef8b[_0x147d(0x27)]);else return![];}const _0x399de7=_0x200792[_0x147d(0x24)](_0x200792[_0x147d(0x24)](Math[_0x147d(0x28)](),0.1),_0x320489);_0x320489=Math[_0x147d(0x29)](_0x200792['rWKnZ'](_0x320489,_0x399de7)),_0x93ef8b[_0x147d(0x2a)]&&_0x93ef8b[_0x147d(0x2a)](_0x370739,_0x3e9d96,_0x320489),_0x93ef8b[_0x147d(0x1a)]&&console[_0x147d(0x1c)](_0x147d(0x2b)+_0x320489+_0x147d(0x2c)+_0x3e9d96+'/'+(_0x93ef8b['maxRetries']+0x1)+')'),await new Promise(_0x5403f8=>setTimeout(()=>_0x5403f8(),_0x320489));}}return{'success':![],'error':_0x51c150||new Error(_0x200792[_0x147d(0x2d)]),'attempts':_0x93ef8b['maxRetries']+0x1,'totalDuration':_0x200792[_0x147d(0x26)](Date[_0x147d(0xb)](),_0x58de1a)};}function _0x147d(_0x59ee6b,_0x147d23){_0x59ee6b=_0x59ee6b-0x0;const _0x29295c=_0x59ee();let _0x398376=_0x29295c[_0x59ee6b];return _0x398376;}export const API_RETRY_OPTIONS={'maxRetries':0x3,'baseDelay':0x3e8,'maxDelay':0x1388,'exponentialBackoff':!![],'shouldRetry':(_0x1e653b,_0xc99d24)=>{const _0x37f7a9={'toyBq':function(_0x3502c0,_0x9d2d87){return _0x3502c0===_0x9d2d87;},'LQBqM':function(_0x416a89,_0x1ec1b7){return _0x416a89===_0x1ec1b7;},'DYdLC':function(_0x346f06,_0xdf41f6){return _0x346f06!==_0xdf41f6;},'SuoGL':'zeLny','lzXOv':function(_0x32f8a6,_0x52c847){return _0x32f8a6===_0x52c847;},'GatBf':function(_0x5bba3a,_0x362f84){return _0x5bba3a>=_0x362f84;},'HCTHI':function(_0x2655f1,_0x39068d){return _0x2655f1===_0x39068d;},'nxflk':'AbortError','rtwjN':_0x147d(0x2e),'vDrwC':_0x147d(0x1),'cwiqt':_0x147d(0x2),'zJfId':_0x147d(0x15),'ipdOr':function(_0x44bc80,_0x2d0a48){return _0x44bc80!==_0x2d0a48;},'ApaLq':_0x147d(0x2f),'YfbhU':'coVWm'};if(_0x37f7a9[_0x147d(0x30)](_0x1e653b['status'],0x191)||_0x37f7a9[_0x147d(0x30)](_0x1e653b[_0x147d(0x5)],0x193))return![];if(_0x37f7a9['LQBqM'](_0x1e653b[_0x147d(0x5)],0x190)||_0x1e653b['status']===0x194&&!_0x1e653b[_0x147d(0x9)][_0x147d(0x10)]('validation\x20endpoint')){if(_0x37f7a9[_0x147d(0x31)](_0x37f7a9[_0x147d(0x32)],_0x37f7a9[_0x147d(0x32)]))_0x1f9218[_0x147d(0x1f)](_0x147d(0x33)+_0x370a7a['message']);else return![];}if(_0x37f7a9['lzXOv'](_0x1e653b[_0x147d(0x5)],0x1ad))return _0xc99d24<=0x2;if(_0x37f7a9['GatBf'](_0x1e653b[_0x147d(0x5)],0x1f4))return!![];if(_0x37f7a9[_0x147d(0x34)](_0x1e653b[_0x147d(0xd)],_0x37f7a9[_0x147d(0x35)])||_0x1e653b[_0x147d(0x9)][_0x147d(0x10)](_0x37f7a9[_0x147d(0x36)])||_0x1e653b[_0x147d(0x9)][_0x147d(0x10)](_0x37f7a9[_0x147d(0x37)])||_0x1e653b[_0x147d(0x9)][_0x147d(0x10)](_0x37f7a9['cwiqt'])||_0x1e653b[_0x147d(0x9)][_0x147d(0x10)](_0x147d(0x3)))return!![];if(_0x1e653b['message']['includes'](_0x37f7a9['zJfId'])||_0x1e653b[_0x147d(0x9)][_0x147d(0x10)](_0x147d(0x4))||_0x1e653b[_0x147d(0x9)]['includes'](_0x147d(0x38)))return _0x37f7a9[_0x147d(0x39)](_0x37f7a9['ApaLq'],_0x37f7a9[_0x147d(0x3a)])?!![]:![];return![];},'onRetry':(_0x5acb72,_0x1f9ad7,_0x403d19)=>{console[_0x147d(0x3b)](_0x147d(0x3c)+_0x1f9ad7+_0x147d(0x3d)+_0x403d19+'ms:\x20'+_0x5acb72['message']);}};export const NETWORK_RETRY_OPTIONS={'maxRetries':0x2,'baseDelay':0x7d0,'maxDelay':0x1f40,'exponentialBackoff':!![],'shouldRetry':(_0x3d423d,_0x220521)=>{const _0x3507f7={'JvkNH':_0x147d(0x1),'nEPxc':_0x147d(0x3),'JGgIp':function(_0x28d59e,_0xa9522){return _0x28d59e===_0xa9522;},'omyjs':_0x147d(0x0)};return _0x3d423d[_0x147d(0x9)][_0x147d(0x10)](_0x3507f7[_0x147d(0x3e)])||_0x3d423d[_0x147d(0x9)]['includes'](_0x3507f7[_0x147d(0x3f)])||_0x3d423d[_0x147d(0x9)][_0x147d(0x10)](_0x147d(0x40))||_0x3507f7[_0x147d(0x41)](_0x3d423d[_0x147d(0xd)],_0x3507f7[_0x147d(0x42)]);}};function _0x59ee(){const _0x517032=['AbortError','Network\x20request\x20failed','fetch','ENOTFOUND','Unexpected\x20character','status','LPggC','XTDmO','cXgcp','message','aSslq','now','QjIFs','name','sMmVG','fQNyp','includes','YPTeA','sSWeu','rypXr','MwqNa','JSON\x20Parse\x20error','fRlyk','qbrmR','EiVGH','Unknown\x20error','enableLogging','fUuyH','log','gMamV','maxRetries','error','baseDelay','mBxuN','QIQqz','min','QjwTY','pow','NJiVz','maxDelay','random','floor','onRetry','⏳\x20Waiting\x20','ms\x20before\x20retry\x20(attempt\x20','bKxtZ','timeout','aoCkZ','toyBq','DYdLC','SuoGL','❌\x20All\x20retry\x20attempts\x20exhausted\x20or\x20error\x20not\x20retryable:\x20','HCTHI','nxflk','rtwjN','vDrwC','HTML\x20page\x20instead\x20of\x20JSON','ipdOr','YfbhU','warn','⚠️\x20API\x20call\x20failed\x20(attempt\x20','),\x20retrying\x20in\x20','JvkNH','nEPxc','DNS','JGgIp','omyjs','gFWCh','VRDzV','success','itKUR','foOhf','data','Kdisy','OnairosReactNative/HealthCheck','GUAqX','mVPsg','UfyaS','LInIj','abort','signal','gaTtj','stSMu','bJjtv','OGTMZ','PXKrE','XJyXO'];_0x59ee=function(){return _0x517032;};return _0x59ee();}export async function fetchWithRetry(_0x4d8e75,_0x14f5d5={},_0x49825b=API_RETRY_OPTIONS){const _0x195766={'foOhf':function(_0x562688,_0x40e1da){return _0x562688-_0x40e1da;},'VRDzV':function(_0x1907dd,_0x14baea,_0x5f12ae){return _0x1907dd(_0x14baea,_0x5f12ae);},'itKUR':_0x147d(0x43)},_0xeb6ebe=await _0x195766[_0x147d(0x44)](withRetry,()=>fetch(_0x4d8e75,_0x14f5d5),_0x49825b);if(!_0xeb6ebe[_0x147d(0x45)]){if(_0x195766[_0x147d(0x46)]===_0x195766['itKUR'])throw _0xeb6ebe[_0x147d(0x1f)];else _0xbed015=_0x190ef2['min'](_0x42da66[_0x147d(0x20)]*_0x341b89['pow'](0x2,_0x195766[_0x147d(0x47)](_0x4af109,0x1)),_0x2df2b0[_0x147d(0x27)]);}return _0xeb6ebe[_0x147d(0x48)];}export async function healthCheck(_0xd364a3,_0x28829d=0x1388){const _0x16a91b={'OGTMZ':_0x147d(0x1),'PXKrE':_0x147d(0x3),'ERCiF':_0x147d(0x40),'xZRJw':function(_0xb14758,_0x3d9014){return _0xb14758===_0x3d9014;},'XJyXO':_0x147d(0x0),'mVPsg':function(_0x21e58f,_0x45258b){return _0x21e58f===_0x45258b;},'UfyaS':_0x147d(0x49),'LInIj':function(_0x306ecd,_0x1248a3,_0x494883){return _0x306ecd(_0x1248a3,_0x494883);},'gaTtj':_0x147d(0x4a),'stSMu':function(_0x20affa,_0x111595){return _0x20affa(_0x111595);},'bJjtv':_0x147d(0x4b)},_0x6d9f39=Date[_0x147d(0xb)]();try{if(_0x16a91b[_0x147d(0x4c)](_0x16a91b[_0x147d(0x4d)],_0x16a91b[_0x147d(0x4d)])){const _0x4d6bb1=new AbortController(),_0x47b3f1=_0x16a91b[_0x147d(0x4e)](setTimeout,()=>_0x4d6bb1[_0x147d(0x4f)](),_0x28829d),_0x117eef=await _0x16a91b[_0x147d(0x4e)](fetch,_0xd364a3,{'method':'GET','signal':_0x4d6bb1[_0x147d(0x50)],'headers':{'User-Agent':_0x16a91b[_0x147d(0x51)]}});return _0x16a91b[_0x147d(0x52)](clearTimeout,_0x47b3f1),{'reachable':!![],'status':_0x117eef[_0x147d(0x5)],'duration':Date[_0x147d(0xb)]()-_0x6d9f39};}else return!![];}catch(_0x2c4d4c){return _0x16a91b['mVPsg'](_0x16a91b[_0x147d(0x53)],_0x147d(0x4b))?{'reachable':![],'error':_0x2c4d4c[_0x147d(0x9)],'duration':Date[_0x147d(0xb)]()-_0x6d9f39}:_0x244ccb[_0x147d(0x9)][_0x147d(0x10)](_0x16a91b[_0x147d(0x54)])||_0x5c3567[_0x147d(0x9)][_0x147d(0x10)](_0x16a91b[_0x147d(0x55)])||_0x4a9e0a['message']['includes'](_0x16a91b['ERCiF'])||_0x16a91b['xZRJw'](_0x3fa692[_0x147d(0xd)],_0x16a91b[_0x147d(0x56)]);}}
|
|
1
|
+
export const DEFAULT_RETRY_OPTIONS={'maxRetries':0x3,'baseDelay':0x3e8,'maxDelay':0x1388,'exponentialBackoff':!![],'enableLogging':![],'shouldRetry':(_0x4fc533,_0x32bf40)=>{const _0x2f2711={'aHuIu':function(_0x19cd4d,_0x778427){return _0x19cd4d>=_0x778427;},'tmgRB':function(_0x48e2b0,_0x165a06){return _0x48e2b0!==_0x165a06;},'npsVa':_0x55cf(0x0),'dvYpi':_0x55cf(0x1),'IsLTz':function(_0x8756cf,_0x124559){return _0x8756cf===_0x124559;},'sKljD':_0x55cf(0x2),'pqtgu':_0x55cf(0x3),'YUYOO':_0x55cf(0x4),'hYFKb':_0x55cf(0x5)};if(_0x2f2711[_0x55cf(0x6)](_0x4fc533[_0x55cf(0x7)],0x190)&&_0x4fc533[_0x55cf(0x7)]<0x1f4&&_0x2f2711['tmgRB'](_0x4fc533['status'],0x198)&&_0x2f2711[_0x55cf(0x8)](_0x4fc533['status'],0x1ad))return _0x2f2711[_0x55cf(0x9)]===_0x2f2711['dvYpi']?_0x101bd7<=0x2:![];if(_0x2f2711[_0x55cf(0xa)](_0x4fc533[_0x55cf(0xb)],_0x55cf(0xc))||_0x4fc533[_0x55cf(0xd)][_0x55cf(0xe)](_0x2f2711[_0x55cf(0xf)])||_0x4fc533[_0x55cf(0xd)][_0x55cf(0xe)](_0x2f2711[_0x55cf(0x10)])||_0x4fc533[_0x55cf(0xd)]['includes'](_0x55cf(0x11))||_0x4fc533['message']['includes'](_0x2f2711[_0x55cf(0x12)])||_0x2f2711[_0x55cf(0x6)](_0x4fc533[_0x55cf(0x7)],0x1f4))return!![];if(_0x4fc533[_0x55cf(0xd)][_0x55cf(0xe)](_0x55cf(0x13))||_0x4fc533[_0x55cf(0xd)][_0x55cf(0xe)](_0x2f2711[_0x55cf(0x14)]))return!![];return![];}};export async function withRetry(_0x39d93c,_0x40ec8f={}){const _0x35c147={'nDHlf':function(_0x42620d,_0x39b0a7){return _0x42620d>=_0x39b0a7;},'jgpru':function(_0x33c0ee,_0x3063a7){return _0x33c0ee<_0x3063a7;},'XCeln':function(_0x244250,_0x56dcfa){return _0x244250!==_0x56dcfa;},'PCHLj':function(_0x2ebf7c,_0x66fcf7){return _0x2ebf7c!==_0x66fcf7;},'yszTm':_0x55cf(0xc),'pBKkj':_0x55cf(0x2),'lzSMV':'fetch','DCvzG':_0x55cf(0x4),'iFCcF':_0x55cf(0x13),'RDCPD':_0x55cf(0x5),'duOAY':function(_0x3f9887,_0x25045f){return _0x3f9887+_0x25045f;},'inKLT':function(_0x2edcda,_0x3d8dca){return _0x2edcda===_0x3d8dca;},'gpctv':'yVojq','cwjuN':'WrHtK','xmmbR':function(_0x5758b6,_0x4af191){return _0x5758b6===_0x4af191;},'KydsS':_0x55cf(0x15),'qAVXV':function(_0x547634,_0x6075c3){return _0x547634===_0x6075c3;},'isSlX':'KgDkx','XOFZL':_0x55cf(0x16),'WoiVx':function(_0xef522b,_0x3d7683){return _0xef522b+_0x3d7683;},'LTRjq':function(_0x429bcb,_0x4d9864){return _0x429bcb-_0x4d9864;},'xjtHB':function(_0xb3f4e2,_0x2e5342){return _0xb3f4e2>_0x2e5342;},'mYFSw':function(_0x68a365,_0xf13032){return _0x68a365===_0xf13032;},'TrGDg':_0x55cf(0x17),'LAadz':function(_0x1130af,_0x538acc){return _0x1130af*_0x538acc;},'AmbgX':function(_0x2d5884,_0x28c917){return _0x2d5884-_0x28c917;},'Bawxx':function(_0x44e102,_0x4d3f5f){return _0x44e102*_0x4d3f5f;},'WsBAF':_0x55cf(0x18),'xKsKc':_0x55cf(0x19),'NRRiy':function(_0x4d88c0,_0xc6eac2){return _0x4d88c0-_0xc6eac2;}},_0xe05555={...DEFAULT_RETRY_OPTIONS,..._0x40ec8f},_0x1b6ae4=Date[_0x55cf(0x1a)]();let _0x567e32=null;for(let _0x28ee8f=0x1;_0x28ee8f<=_0x35c147[_0x55cf(0x1b)](_0xe05555[_0x55cf(0x1c)],0x1);_0x28ee8f++){if(_0x35c147[_0x55cf(0x1d)](_0x35c147[_0x55cf(0x1e)],_0x35c147[_0x55cf(0x1f)]))throw _0x3f8928[_0x55cf(0x20)];else try{if(_0x35c147['xmmbR'](_0x35c147[_0x55cf(0x21)],_0x35c147[_0x55cf(0x21)])){if(_0xe05555['enableLogging']&&_0x28ee8f>0x1){if(_0x35c147[_0x55cf(0x22)](_0x35c147[_0x55cf(0x23)],_0x35c147[_0x55cf(0x24)]))return![];else console[_0x55cf(0x25)](_0x55cf(0x26)+_0x28ee8f+'/'+_0x35c147['WoiVx'](_0xe05555[_0x55cf(0x1c)],0x1));}const _0x16b1e5=await _0x39d93c();return{'success':!![],'data':_0x16b1e5,'attempts':_0x28ee8f,'totalDuration':_0x35c147['LTRjq'](Date[_0x55cf(0x1a)](),_0x1b6ae4)};}else return!![];}catch(_0xbb157a){_0x567e32=_0xbb157a;const _0x632707=_0xe05555[_0x55cf(0x27)]?_0xe05555[_0x55cf(0x27)](_0xbb157a,_0x28ee8f):!![];if(_0x35c147[_0x55cf(0x28)](_0x28ee8f,_0xe05555[_0x55cf(0x1c)])||!_0x632707){if(_0xe05555[_0x55cf(0x29)]){if(_0x35c147[_0x55cf(0x2a)](_0x35c147[_0x55cf(0x2b)],_0x35c147[_0x55cf(0x2b)]))console['error'](_0x55cf(0x2c)+_0xbb157a[_0x55cf(0xd)]);else{if(_0x35c147['nDHlf'](_0x284057[_0x55cf(0x7)],0x190)&&_0x35c147[_0x55cf(0x2d)](_0x5c5d81[_0x55cf(0x7)],0x1f4)&&_0x35c147[_0x55cf(0x2e)](_0x1a2e8b[_0x55cf(0x7)],0x198)&&_0x35c147[_0x55cf(0x2f)](_0x4cc98d[_0x55cf(0x7)],0x1ad))return![];if(_0x5475ae[_0x55cf(0xb)]===_0x35c147['yszTm']||_0x3d7a3a[_0x55cf(0xd)][_0x55cf(0xe)](_0x35c147['pBKkj'])||_0x3fff75[_0x55cf(0xd)][_0x55cf(0xe)](_0x35c147['lzSMV'])||_0x7407cc[_0x55cf(0xd)][_0x55cf(0xe)]('ENOTFOUND')||_0x56b404[_0x55cf(0xd)][_0x55cf(0xe)](_0x35c147[_0x55cf(0x30)])||_0x4d6e18[_0x55cf(0x7)]>=0x1f4)return!![];if(_0x5db9b0[_0x55cf(0xd)]['includes'](_0x35c147[_0x55cf(0x31)])||_0x699e34[_0x55cf(0xd)][_0x55cf(0xe)](_0x35c147['RDCPD']))return!![];return![];}}break;}let _0x353614=_0xe05555['baseDelay'];_0xe05555[_0x55cf(0x32)]&&(_0x353614=Math[_0x55cf(0x33)](_0x35c147[_0x55cf(0x34)](_0xe05555['baseDelay'],Math[_0x55cf(0x35)](0x2,_0x35c147[_0x55cf(0x36)](_0x28ee8f,0x1))),_0xe05555[_0x55cf(0x37)]));const _0xb6e149=_0x35c147[_0x55cf(0x38)](Math[_0x55cf(0x39)](),0.1)*_0x353614;_0x353614=Math['floor'](_0x353614+_0xb6e149);if(_0xe05555[_0x55cf(0x3a)]){if(_0x35c147[_0x55cf(0x3b)]!==_0x35c147[_0x55cf(0x3b)])return![];else _0xe05555[_0x55cf(0x3a)](_0xbb157a,_0x28ee8f,_0x353614);}_0xe05555[_0x55cf(0x29)]&&console[_0x55cf(0x25)](_0x55cf(0x3c)+_0x353614+_0x55cf(0x3d)+_0x28ee8f+'/'+(_0xe05555[_0x55cf(0x1c)]+0x1)+')'),await new Promise(_0x3b5222=>setTimeout(()=>_0x3b5222(),_0x353614));}}return{'success':![],'error':_0x567e32||new Error(_0x35c147[_0x55cf(0x3e)]),'attempts':_0x35c147['WoiVx'](_0xe05555[_0x55cf(0x1c)],0x1),'totalDuration':_0x35c147[_0x55cf(0x3f)](Date['now'](),_0x1b6ae4)};}function _0x55cf(_0x3b8612,_0x55cf75){_0x3b8612=_0x3b8612-0x0;const _0x59693e=_0x3b86();let _0x80e996=_0x59693e[_0x3b8612];return _0x80e996;}export const API_RETRY_OPTIONS={'maxRetries':0x3,'baseDelay':0x3e8,'maxDelay':0x1388,'exponentialBackoff':!![],'shouldRetry':(_0x1745b4,_0x2bb225)=>{const _0x9ee3fe={'wEDAI':function(_0x21bfb0,_0x4a1e8a){return _0x21bfb0===_0x4a1e8a;},'aaXwG':function(_0x36d296,_0x594276){return _0x36d296===_0x594276;},'QAlAi':_0x55cf(0x40),'HmdDD':function(_0xe20674,_0x196c08){return _0xe20674>=_0x196c08;},'vXsGH':function(_0x50561f,_0x578a74){return _0x50561f===_0x578a74;},'hBqMo':'AbortError','qpuNJ':'Network\x20request\x20failed','ScuvV':_0x55cf(0x3),'oggWB':_0x55cf(0x11),'qecSV':_0x55cf(0x5),'ODXJW':'HTML\x20page\x20instead\x20of\x20JSON','kJLCq':_0x55cf(0x41)};if(_0x1745b4[_0x55cf(0x7)]===0x191||_0x9ee3fe['wEDAI'](_0x1745b4[_0x55cf(0x7)],0x193))return![];if(_0x9ee3fe[_0x55cf(0x42)](_0x1745b4[_0x55cf(0x7)],0x190)||_0x9ee3fe[_0x55cf(0x43)](_0x1745b4[_0x55cf(0x7)],0x194)&&!_0x1745b4['message'][_0x55cf(0xe)](_0x9ee3fe[_0x55cf(0x44)]))return![];if(_0x9ee3fe[_0x55cf(0x42)](_0x1745b4[_0x55cf(0x7)],0x1ad))return _0x2bb225<=0x2;if(_0x9ee3fe[_0x55cf(0x45)](_0x1745b4['status'],0x1f4))return!![];if(_0x9ee3fe[_0x55cf(0x46)](_0x1745b4[_0x55cf(0xb)],_0x9ee3fe[_0x55cf(0x47)])||_0x1745b4[_0x55cf(0xd)][_0x55cf(0xe)](_0x55cf(0x4))||_0x1745b4[_0x55cf(0xd)][_0x55cf(0xe)](_0x9ee3fe[_0x55cf(0x48)])||_0x1745b4[_0x55cf(0xd)][_0x55cf(0xe)](_0x9ee3fe[_0x55cf(0x49)])||_0x1745b4[_0x55cf(0xd)][_0x55cf(0xe)](_0x9ee3fe[_0x55cf(0x4a)]))return!![];if(_0x1745b4[_0x55cf(0xd)]['includes'](_0x55cf(0x13))||_0x1745b4[_0x55cf(0xd)][_0x55cf(0xe)](_0x9ee3fe['qecSV'])||_0x1745b4[_0x55cf(0xd)][_0x55cf(0xe)](_0x9ee3fe[_0x55cf(0x4b)]))return _0x9ee3fe[_0x55cf(0x43)]('yAaIz',_0x9ee3fe['kJLCq'])?!![]:!![];return![];},'onRetry':(_0x15f25a,_0x4478fa,_0x22e590)=>{console[_0x55cf(0x4c)](_0x55cf(0x4d)+_0x4478fa+_0x55cf(0x4e)+_0x22e590+'ms:\x20'+_0x15f25a[_0x55cf(0xd)]);}};function _0x3b86(){const _0x578091=['jxlZG','BDQgK','Network\x20request\x20failed','fetch','timeout','Unexpected\x20character','aHuIu','status','tmgRB','npsVa','IsLTz','name','AbortError','message','includes','sKljD','pqtgu','ENOTFOUND','YUYOO','JSON\x20Parse\x20error','hYFKb','aZwKa','UCFRB','IMuvU','bxDgM','Unknown\x20error','now','duOAY','maxRetries','inKLT','gpctv','cwjuN','error','KydsS','qAVXV','isSlX','XOFZL','log','🔄\x20Retry\x20attempt\x20','shouldRetry','xjtHB','enableLogging','mYFSw','TrGDg','❌\x20All\x20retry\x20attempts\x20exhausted\x20or\x20error\x20not\x20retryable:\x20','jgpru','XCeln','PCHLj','DCvzG','iFCcF','exponentialBackoff','min','LAadz','pow','AmbgX','maxDelay','Bawxx','random','onRetry','WsBAF','⏳\x20Waiting\x20','ms\x20before\x20retry\x20(attempt\x20','xKsKc','NRRiy','validation\x20endpoint','JMUAY','aaXwG','wEDAI','QAlAi','HmdDD','vXsGH','hBqMo','qpuNJ','ScuvV','oggWB','ODXJW','warn','⚠️\x20API\x20call\x20failed\x20(attempt\x20','),\x20retrying\x20in\x20','DNS','wxKRQ','ekhXi','hBPJy','success','data','oTliV','OnairosReactNative/HealthCheck','HzpYQ','RBeBc','MWVBs','abort','HFwxr','PzSRl','jOrNg','xcTHD'];_0x3b86=function(){return _0x578091;};return _0x3b86();}export const NETWORK_RETRY_OPTIONS={'maxRetries':0x2,'baseDelay':0x7d0,'maxDelay':0x1f40,'exponentialBackoff':!![],'shouldRetry':(_0x350d6c,_0x20f5be)=>{const _0x11299d={'wxKRQ':_0x55cf(0x2),'ekhXi':'ENOTFOUND','fNNaz':_0x55cf(0x4f),'PdRIf':function(_0x475758,_0x420c6d){return _0x475758===_0x420c6d;},'hBPJy':'AbortError'};return _0x350d6c['message'][_0x55cf(0xe)](_0x11299d[_0x55cf(0x50)])||_0x350d6c[_0x55cf(0xd)][_0x55cf(0xe)](_0x11299d[_0x55cf(0x51)])||_0x350d6c[_0x55cf(0xd)]['includes'](_0x11299d['fNNaz'])||_0x11299d['PdRIf'](_0x350d6c[_0x55cf(0xb)],_0x11299d[_0x55cf(0x52)]);}};export async function fetchWithRetry(_0x5374a3,_0x45ecb2={},_0x971a97=API_RETRY_OPTIONS){const _0x1ff80a=await withRetry(()=>fetch(_0x5374a3,_0x45ecb2),_0x971a97);if(!_0x1ff80a[_0x55cf(0x53)])throw _0x1ff80a[_0x55cf(0x20)];return _0x1ff80a[_0x55cf(0x54)];}export async function healthCheck(_0x2113a4,_0x5e665b=0x1388){const _0x556d83={'RBeBc':_0x55cf(0x55),'JqKZX':'lgbPt','MWVBs':function(_0x287180,_0x3f70a9,_0x37f974){return _0x287180(_0x3f70a9,_0x37f974);},'HFwxr':_0x55cf(0x56),'cqHRn':function(_0xebc32f,_0x58a1b4){return _0xebc32f(_0x58a1b4);},'PzSRl':function(_0xa0ab40,_0x15bf51){return _0xa0ab40-_0x15bf51;},'oBIyl':function(_0x37bb3f,_0x428d02){return _0x37bb3f!==_0x428d02;},'jOrNg':'etbOp','xcTHD':_0x55cf(0x57)},_0x54879f=Date[_0x55cf(0x1a)]();try{if(_0x556d83[_0x55cf(0x58)]!==_0x556d83['JqKZX']){const _0x578a52=new AbortController(),_0x43035e=_0x556d83[_0x55cf(0x59)](setTimeout,()=>_0x578a52[_0x55cf(0x5a)](),_0x5e665b),_0xf97608=await fetch(_0x2113a4,{'method':'GET','signal':_0x578a52['signal'],'headers':{'User-Agent':_0x556d83[_0x55cf(0x5b)]}});return _0x556d83['cqHRn'](clearTimeout,_0x43035e),{'reachable':!![],'status':_0xf97608[_0x55cf(0x7)],'duration':_0x556d83[_0x55cf(0x5c)](Date[_0x55cf(0x1a)](),_0x54879f)};}else _0x10476a[_0x55cf(0x25)]('🔄\x20Retry\x20attempt\x20'+_0x950bd0+'/'+(_0x4c0342[_0x55cf(0x1c)]+0x1));}catch(_0x64b96){return _0x556d83['oBIyl'](_0x556d83[_0x55cf(0x5d)],_0x556d83[_0x55cf(0x5e)])?{'reachable':![],'error':_0x64b96[_0x55cf(0xd)],'duration':Date[_0x55cf(0x1a)]()-_0x54879f}:!![];}}
|
|
@@ -4,4 +4,4 @@ var __ONAIROS_REQ_REGISTRY__ = [
|
|
|
4
4
|
require('react-native-keychain')
|
|
5
5
|
];
|
|
6
6
|
function __ONAIROS_REQ_FUNC__(i) { return __ONAIROS_REQ_REGISTRY__[i]; }
|
|
7
|
-
function _0x198d(_0x1dbb08,_0x198df5){_0x1dbb08=_0x1dbb08-0x0;const _0x3aa664=_0x1dbb();let _0x1d9caa=_0x3aa664[_0x1dbb08];return _0x1d9caa;}import{Platform}from'react-native';import{STORAGE_KEYS}from'../constants';import AsyncStorage from'@react-native-async-storage/async-storage';function _0x1dbb(){const _0x1851ed=['onairos_jwt_token','mock','Error\x20deleting\x20credentials:','function','IzQhk','getGenericPassword','vJpzO','error','default','WCsnC','ndnEy','oTVCm','service','mSGef','warn','PmbbW','TAhWI','DdbWW','cbFHQ','Keychain\x20access\x20failed,\x20using\x20mock\x20storage','tysTS','QufZg','resetGenericPassword','parse','password','BoWpz','LTanR','MyRxZ','Username\x20is\x20required\x20for\x20storing\x20credentials','rQJYD','frZYy','Error\x20storing\x20credentials:','alphx','CFHcz','WdvQi','username','kdHnq','web','HyvuP','CDhXv','accessControl','ACCESS_CONTROL','BIOMETRY_ANY_OR_DEVICE_PASSCODE','accessible','ACCESSIBLE','WHEN_UNLOCKED','stringify','RcEHT','tUHgO','YMLey','indexOf','charAt','LzLiN','oNFuc','rPKYf','fromCharCode','zFVlv','StsJW','Error\x20getting\x20credentials:','tDOJY','credentials','Error\x20checking\x20credentials:','QAGLk','tWFUu','bCXGH','yjbMw','faquX','toString','substring','dev_','❌\x20Failed\x20to\x20retrieve\x20JWT\x20token:','bxtVA','ZyaOQ','XWMrc','gYPTc','Uulqx','BtgzZ','XHOnz','OpVKS','oPZdu','SlEqW','getItem','Error\x20verifying\x20credentials:','KqbWm','jcaah','uovMz','🗑️\x20JWT\x20token\x20cleared','uGbid','❌\x20Failed\x20to\x20clear\x20JWT\x20token:','removeItem','qnAOe','moAKK','OqBjS','ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/','VBsCZ','UBVeT','myinr','yhxXk','AHlcx','RaZQc','IsaNb','qIDnp','jKHGK','ALukg','hXwkZ','AQxLn','qTdGx','split','length','ERxmh','xplTm','❌\x20Failed\x20to\x20decode\x20JWT\x20payload:','exp','floor','MOZAd','cOlzy','aaSJd'];_0x1dbb=function(){return _0x1851ed;};return _0x1dbb();}const JWT_TOKEN_KEY=_0x198d(0x0),mockStorage={};let Keychain=null;try{Keychain=__ONAIROS_REQ_FUNC__(0x0);}catch(_0x5af925){console['warn']('react-native-keychain module not available, using mock storage'),Keychain={'ACCESS_CONTROL':{'BIOMETRY_ANY_OR_DEVICE_PASSCODE':_0x198d(0x1)},'ACCESSIBLE':{'WHEN_UNLOCKED':_0x198d(0x1)},'getGenericPassword':async()=>null,'setGenericPassword':async()=>!![],'resetGenericPassword':async()=>!![]};}const isKeychainAvailable=()=>{const _0x1fd51c={'CCgwv':_0x198d(0x2),'IzQhk':function(_0x37e04a,_0xb26294){return _0x37e04a===_0xb26294;},'JLVWW':_0x198d(0x3),'TytzT':'zYIdJ'};try{return Keychain&&_0x1fd51c[_0x198d(0x4)](typeof Keychain[_0x198d(0x5)],_0x1fd51c['JLVWW']);}catch(_0x51ffff){return _0x1fd51c['IzQhk'](_0x198d(0x6),_0x1fd51c['TytzT'])?(_0x38592d[_0x198d(0x7)](_0x1fd51c['CCgwv'],_0x345969),![]):![];}},safeGetGenericPassword=async _0x532bae=>{const _0x2d25b1={'IjGty':'Error\x20storing\x20credentials:','WCsnC':function(_0x563842){return _0x563842();},'mlUik':function(_0x3e6449,_0x555d32){return _0x3e6449!==_0x555d32;},'oTVCm':function(_0xda481d,_0x45abf2){return _0xda481d===_0x45abf2;},'mSGef':_0x198d(0x8),'QmvhE':'Keychain\x20access\x20failed,\x20using\x20mock\x20storage','PmbbW':function(_0xf0ef7,_0xe3ed97){return _0xf0ef7===_0xe3ed97;},'TAhWI':function(_0x26899c,_0x2b12af){return _0x26899c===_0x2b12af;}};try{if(_0x2d25b1[_0x198d(0x9)](isKeychainAvailable))return await Keychain[_0x198d(0x5)](_0x532bae);else{if(_0x2d25b1['mlUik'](_0x198d(0xa),_0x198d(0xa)))return _0x29e846['error'](_0x2d25b1['IjGty'],_0x11dae9),![];else{const _0x3e4ccc=(_0x532bae===null||_0x2d25b1[_0x198d(0xb)](_0x532bae,void 0x0)?void 0x0:_0x532bae[_0x198d(0xc)])||_0x2d25b1[_0x198d(0xd)];return mockStorage[_0x3e4ccc]||null;}}}catch(_0x52fe97){console[_0x198d(0xe)](_0x2d25b1['QmvhE'],_0x52fe97);const _0x4201b9=(_0x2d25b1[_0x198d(0xf)](_0x532bae,null)||_0x2d25b1[_0x198d(0x10)](_0x532bae,void 0x0)?void 0x0:_0x532bae[_0x198d(0xc)])||_0x198d(0x8);return mockStorage[_0x4201b9]||null;}},safeSetGenericPassword=async(_0x18394f,_0x2246eb,_0x3389cb)=>{const _0x25e9b2={'bTVfs':function(_0x52419b,_0x83edfd){return _0x52419b===_0x83edfd;},'DdbWW':'default','qRqlg':'Keychain\x20access\x20failed,\x20using\x20mock\x20storage','BSQzk':function(_0x13f8a6,_0x13eac9){return _0x13f8a6===_0x13eac9;}};try{if(isKeychainAvailable())return await Keychain['setGenericPassword'](_0x18394f,_0x2246eb,_0x3389cb);else{const _0x422f9e=(_0x25e9b2['bTVfs'](_0x3389cb,null)||_0x25e9b2['bTVfs'](_0x3389cb,void 0x0)?void 0x0:_0x3389cb['service'])||_0x25e9b2[_0x198d(0x11)];return mockStorage[_0x422f9e]={'username':_0x18394f,'password':_0x2246eb},!![];}}catch(_0x51a07b){console[_0x198d(0xe)](_0x25e9b2['qRqlg'],_0x51a07b);const _0x1ea3f4=(_0x25e9b2['BSQzk'](_0x3389cb,null)||_0x3389cb===void 0x0?void 0x0:_0x3389cb[_0x198d(0xc)])||_0x25e9b2[_0x198d(0x11)];return mockStorage[_0x1ea3f4]={'username':_0x18394f,'password':_0x2246eb},!![];}},safeResetGenericPassword=async _0x114ff1=>{const _0x3fa0be={'tysTS':function(_0x42621e,_0x18990a){return _0x42621e===_0x18990a;},'QufZg':_0x198d(0x12),'JYuET':function(_0x13b040){return _0x13b040();},'BoWpz':_0x198d(0x13),'LTanR':function(_0x10f06b,_0x42a79c){return _0x10f06b===_0x42a79c;},'MyRxZ':_0x198d(0x8)};try{if(_0x3fa0be[_0x198d(0x14)](_0x3fa0be[_0x198d(0x15)],_0x3fa0be[_0x198d(0x15)])){if(_0x3fa0be['JYuET'](isKeychainAvailable))return await Keychain[_0x198d(0x16)](_0x114ff1);else{const _0x54d170=(_0x3fa0be['tysTS'](_0x114ff1,null)||_0x114ff1===void 0x0?void 0x0:_0x114ff1[_0x198d(0xc)])||_0x198d(0x8);return delete mockStorage[_0x54d170],!![];}}else return _0x1f35c5[_0x198d(0x17)](_0x41202b[_0x198d(0x18)]);}catch(_0x3b20bb){console[_0x198d(0xe)](_0x3fa0be[_0x198d(0x19)],_0x3b20bb);const _0x38ba2d=(_0x3fa0be[_0x198d(0x14)](_0x114ff1,null)||_0x3fa0be[_0x198d(0x1a)](_0x114ff1,void 0x0)?void 0x0:_0x114ff1[_0x198d(0xc)])||_0x3fa0be[_0x198d(0x1b)];return delete mockStorage[_0x38ba2d],!![];}};export const storeCredentials=async _0x4ccc3f=>{const _0x22f2e5={'LzLiN':function(_0x5090e2,_0x1d99d5){return _0x5090e2+_0x1d99d5;},'oNFuc':function(_0xce61af,_0x34d2c1){return _0xce61af|_0x34d2c1;},'rPKYf':function(_0x7371a0,_0xa7a04c){return _0x7371a0<<_0xa7a04c;},'zFVlv':function(_0x67c493,_0x5d736c){return _0x67c493&_0x5d736c;},'StsJW':function(_0x13dc7d,_0x21a695){return _0x13dc7d>>_0x21a695;},'kdHnq':function(_0x1e363e,_0x5295e1){return _0x1e363e!==_0x5295e1;},'aFMxB':function(_0x2c56c9,_0x41665a){return _0x2c56c9&_0x41665a;},'SeJyL':function(_0x11303e,_0x51f938){return _0x11303e>>_0x51f938;},'juxBL':function(_0x39f7f1,_0x50fca9){return _0x39f7f1&_0x50fca9;},'alphx':function(_0x22c1f7){return _0x22c1f7();},'CFHcz':function(_0xa3d6d0,_0x40ab31){return _0xa3d6d0===_0x40ab31;},'WdvQi':function(_0x37b27a,_0x22b021){return _0x37b27a===_0x22b021;},'RhFtW':_0x198d(0x1c),'dQBJX':function(_0x3b23d6,_0x2aced1){return _0x3b23d6===_0x2aced1;},'HyvuP':_0x198d(0x1d),'CDhXv':_0x198d(0x1e),'TOWby':function(_0x1bf186,_0x4660d3){return _0x1bf186!==_0x4660d3;},'RcEHT':'Sedum','tUHgO':'uprza','YMLey':_0x198d(0x1f)};try{const _0x5488d3=await _0x22f2e5[_0x198d(0x20)](getCredentials),_0xf262f9={..._0x5488d3,..._0x4ccc3f,'createdAt':(_0x22f2e5[_0x198d(0x21)](_0x5488d3,null)||_0x22f2e5[_0x198d(0x22)](_0x5488d3,void 0x0)?void 0x0:_0x5488d3['createdAt'])||Date['now']()},_0x2c55d8=_0xf262f9[_0x198d(0x23)];if(!_0x2c55d8)throw new Error(_0x22f2e5['RhFtW']);const _0x47e949={'service':STORAGE_KEYS['credentials']};return _0x22f2e5[_0x198d(0x24)](Platform['OS'],_0x198d(0x25))&&isKeychainAvailable()&&(_0x22f2e5['dQBJX'](_0x22f2e5[_0x198d(0x26)],_0x22f2e5[_0x198d(0x27)])?(_0x50ddc4[_0x198d(0x28)]=Keychain[_0x198d(0x29)][_0x198d(0x2a)],_0x557461[_0x198d(0x2b)]=Keychain[_0x198d(0x2c)][_0x198d(0x2d)]):(_0x47e949[_0x198d(0x28)]=Keychain[_0x198d(0x29)][_0x198d(0x2a)],_0x47e949[_0x198d(0x2b)]=Keychain[_0x198d(0x2c)][_0x198d(0x2d)])),await safeSetGenericPassword(_0x2c55d8,JSON[_0x198d(0x2e)](_0xf262f9),_0x47e949),!![];}catch(_0x1da261){if(_0x22f2e5['TOWby'](_0x22f2e5[_0x198d(0x2f)],_0x22f2e5[_0x198d(0x30)]))return console[_0x198d(0x7)](_0x22f2e5[_0x198d(0x31)],_0x1da261),![];else{const _0x3bd002=_0x5534ea[_0x198d(0x32)](_0x5700c9[_0x198d(0x33)](_0x5f3d4f)),_0x37f5b3=_0x2633af[_0x198d(0x32)](_0x720cc[_0x198d(0x33)](_0x2642fa+0x1)),_0x3a4f30=_0x43e869[_0x198d(0x32)](_0x269ea2[_0x198d(0x33)](_0x22f2e5[_0x198d(0x34)](_0x1f486a,0x2))),_0x368333=_0x528c9d[_0x198d(0x32)](_0x212e0c['charAt'](_0x56fb4e+0x3)),_0x561a87=_0x22f2e5[_0x198d(0x35)](_0x3bd002<<0x12|_0x37f5b3<<0xc,_0x22f2e5[_0x198d(0x36)](_0x3a4f30,0x6))|_0x368333;_0x12dd8d+=_0x17ec14[_0x198d(0x37)](_0x22f2e5[_0x198d(0x38)](_0x22f2e5[_0x198d(0x39)](_0x561a87,0x10),0xff));if(_0x22f2e5['kdHnq'](_0x3a4f30,0x40))_0x4fe511+=_0x49ec51['fromCharCode'](_0x22f2e5['aFMxB'](_0x22f2e5['SeJyL'](_0x561a87,0x8),0xff));if(_0x22f2e5[_0x198d(0x24)](_0x368333,0x40))_0x18fa97+=_0x3a9ae6['fromCharCode'](_0x22f2e5['juxBL'](_0x561a87,0xff));}}};export const getCredentials=async()=>{const _0x2987e9={'cYqHa':function(_0x43bddf,_0x316efe){return _0x43bddf(_0x316efe);}};try{const _0x50cb39=await _0x2987e9['cYqHa'](safeGetGenericPassword,{'service':STORAGE_KEYS['credentials']});if(_0x50cb39)return JSON['parse'](_0x50cb39[_0x198d(0x18)]);return null;}catch(_0x2b0fcf){return console['error'](_0x198d(0x3a),_0x2b0fcf),null;}};export const hasCredentials=async()=>{const _0x5e5dd7={'tDOJY':function(_0x4dcbd2,_0x1c56ca){return _0x4dcbd2(_0x1c56ca);}};try{const _0x3f2706=await _0x5e5dd7[_0x198d(0x3b)](safeGetGenericPassword,{'service':STORAGE_KEYS[_0x198d(0x3c)]});return!!_0x3f2706;}catch(_0x396213){return console[_0x198d(0x7)](_0x198d(0x3d),_0x396213),![];}};export const deleteCredentials=async()=>{const _0x2729a0={'bCXGH':_0x198d(0x3e),'CPLfZ':function(_0x4d209d,_0x485bc9){return _0x4d209d(_0x485bc9);},'yjbMw':_0x198d(0x3f),'XvNCF':_0x198d(0x2)};try{return _0x2729a0[_0x198d(0x40)]===_0x2729a0[_0x198d(0x40)]?(await _0x2729a0['CPLfZ'](safeResetGenericPassword,{'service':STORAGE_KEYS[_0x198d(0x3c)]}),!![]):(_0x13780a['error']('❌\x20Failed\x20to\x20check\x20JWT\x20token:',_0x1dd9e2),![]);}catch(_0x3b22a7){if(_0x198d(0x3f)!==_0x2729a0[_0x198d(0x41)]){if(!_0x1b104c())return!![];return!![];}else return console[_0x198d(0x7)](_0x2729a0['XvNCF'],_0x3b22a7),![];}};export const updateCredentials=async _0x866efa=>{const _0x4a413c={'faquX':function(_0x441eb2,_0x3b5049){return _0x441eb2(_0x3b5049);}};return _0x4a413c[_0x198d(0x42)](storeCredentials,_0x866efa);};export const generateDeviceUsername=()=>{const _0x3e5c1a=Math['random']()[_0x198d(0x43)](0x24)[_0x198d(0x44)](0x2,0xa);return _0x198d(0x45)+_0x3e5c1a;};export const verifyCredentials=async _0x58eed5=>{const _0x178276={'BtgzZ':_0x198d(0x46),'SlEqW':_0x198d(0x3d),'XWMrc':function(_0x501ed9,_0x2ca5be){return _0x501ed9===_0x2ca5be;},'gYPTc':'JGdOg','XHOnz':_0x198d(0x47),'OpVKS':_0x198d(0x48),'oPZdu':'Error\x20verifying\x20credentials:'};try{if(!isKeychainAvailable())return _0x178276[_0x198d(0x49)](_0x178276[_0x198d(0x4a)],_0x198d(0x4b))?(_0x4c448c[_0x198d(0x7)](_0x178276[_0x198d(0x4c)],_0x5ace08),null):!![];return!![];}catch(_0x72865b){return _0x178276[_0x198d(0x4d)]!==_0x178276[_0x198d(0x4e)]?(console[_0x198d(0x7)](_0x178276[_0x198d(0x4f)],_0x72865b),![]):(_0x4df67c[_0x198d(0x7)](_0x178276[_0x198d(0x50)],_0x3f638d),![]);}};export const getJWT=async()=>{const _0x51d9bc={'xYtia':'❌\x20Failed\x20to\x20retrieve\x20JWT\x20token:'};try{const _0x45b3b2=await AsyncStorage[_0x198d(0x51)](JWT_TOKEN_KEY);return _0x45b3b2;}catch(_0x49a0bb){return console['error'](_0x51d9bc['xYtia'],_0x49a0bb),null;}};export const hasJWT=async()=>{const _0x19316d={'vREkF':function(_0x29ddd7){return _0x29ddd7();},'uovMz':_0x198d(0x52),'jcaah':_0x198d(0x53)};try{const _0x33e7c0=await AsyncStorage[_0x198d(0x51)](JWT_TOKEN_KEY);return!!_0x33e7c0;}catch(_0x56ab97){if(_0x198d(0x53)!==_0x19316d[_0x198d(0x54)])try{if(!_0x19316d['vREkF'](_0x45c752))return!![];return!![];}catch(_0x26acbc){return _0x4edd33['error'](_0x19316d[_0x198d(0x55)],_0x26acbc),![];}else return console[_0x198d(0x7)]('❌\x20Failed\x20to\x20check\x20JWT\x20token:',_0x56ab97),![];}};export const clearJWT=async()=>{const _0x28eb2c={'iPFAW':function(_0x3d2885,_0x17302e){return _0x3d2885(_0x17302e);},'qnAOe':_0x198d(0x56),'moAKK':_0x198d(0x57),'OqBjS':_0x198d(0x58)};try{return await AsyncStorage[_0x198d(0x59)](JWT_TOKEN_KEY),console['log'](_0x28eb2c[_0x198d(0x5a)]),!![];}catch(_0x1e2c1a){return _0x28eb2c[_0x198d(0x5b)]==='uGbid'?(console['error'](_0x28eb2c[_0x198d(0x5c)],_0x1e2c1a),![]):_0x28eb2c['iPFAW'](_0x4f5f59,_0x3773ee);}};const base64Decode=_0x13e3e3=>{const _0x31fa00={'hXwkZ':_0x198d(0x3a),'VBsCZ':function(_0x38928e,_0x54496e){return _0x38928e%_0x54496e;},'UBVeT':_0x198d(0x5d),'myinr':function(_0x481792,_0x266160){return _0x481792<_0x266160;},'yhxXk':'cwYsN','DbZCT':'kjBko','AHlcx':function(_0x13a9b0,_0x16a490){return _0x13a9b0+_0x16a490;},'RaZQc':function(_0x5cf4f4,_0x3990d1){return _0x5cf4f4|_0x3990d1;},'XcSKy':function(_0x4ffab4,_0x515609){return _0x4ffab4|_0x515609;},'IsaNb':function(_0x1fcddf,_0x469d96){return _0x1fcddf<<_0x469d96;},'HyJTw':function(_0x54a719,_0x2a4af2){return _0x54a719<<_0x2a4af2;},'qIDnp':function(_0x3c89dc,_0x1f0b0a){return _0x3c89dc&_0x1f0b0a;},'SuHAx':function(_0x32628f,_0x5d0c14){return _0x32628f>>_0x5d0c14;},'jKHGK':function(_0xb92fbf,_0x252c41){return _0xb92fbf!==_0x252c41;},'niJPn':function(_0x1c296a,_0x3f3d1c){return _0x1c296a>>_0x3f3d1c;},'ALukg':function(_0x3cdd51,_0x28ad4c){return _0x3cdd51&_0x28ad4c;}};while(_0x31fa00[_0x198d(0x5e)](_0x13e3e3['length'],0x4)){_0x13e3e3+='=';}const _0xcb6c57=_0x31fa00[_0x198d(0x5f)];let _0x5a5095='';for(let _0x20f109=0x0;_0x31fa00[_0x198d(0x60)](_0x20f109,_0x13e3e3['length']);_0x20f109+=0x4){if(_0x31fa00[_0x198d(0x61)]!==_0x31fa00['DbZCT']){const _0x38d4fe=_0xcb6c57[_0x198d(0x32)](_0x13e3e3[_0x198d(0x33)](_0x20f109)),_0x269c52=_0xcb6c57[_0x198d(0x32)](_0x13e3e3[_0x198d(0x33)](_0x20f109+0x1)),_0x4c9f64=_0xcb6c57[_0x198d(0x32)](_0x13e3e3[_0x198d(0x33)](_0x20f109+0x2)),_0x2d50ce=_0xcb6c57[_0x198d(0x32)](_0x13e3e3['charAt'](_0x31fa00[_0x198d(0x62)](_0x20f109,0x3))),_0x44a7e4=_0x31fa00[_0x198d(0x63)](_0x31fa00[_0x198d(0x63)](_0x31fa00['XcSKy'](_0x38d4fe<<0x12,_0x31fa00[_0x198d(0x64)](_0x269c52,0xc)),_0x31fa00['HyJTw'](_0x4c9f64,0x6)),_0x2d50ce);_0x5a5095+=String['fromCharCode'](_0x31fa00[_0x198d(0x65)](_0x31fa00['SuHAx'](_0x44a7e4,0x10),0xff));if(_0x31fa00[_0x198d(0x66)](_0x4c9f64,0x40))_0x5a5095+=String[_0x198d(0x37)](_0x31fa00[_0x198d(0x65)](_0x31fa00['niJPn'](_0x44a7e4,0x8),0xff));if(_0x31fa00['jKHGK'](_0x2d50ce,0x40))_0x5a5095+=String[_0x198d(0x37)](_0x31fa00[_0x198d(0x67)](_0x44a7e4,0xff));}else return _0x3651f8[_0x198d(0x7)](_0x31fa00[_0x198d(0x68)],_0x3ea925),null;}return _0x5a5095;};export const getJWTPayload=async()=>{const _0x223f95={'qTdGx':function(_0x2144fa){return _0x2144fa();},'ERxmh':function(_0xf134d,_0x2441d7){return _0xf134d(_0x2441d7);},'xplTm':_0x198d(0x69)};try{const _0x1ee002=await _0x223f95[_0x198d(0x6a)](getJWT);if(!_0x1ee002)return null;const _0x2dc509=_0x1ee002[_0x198d(0x6b)]('.');if(_0x2dc509[_0x198d(0x6c)]!==0x3)return null;const _0x458e8d=_0x223f95[_0x198d(0x6d)](base64Decode,_0x2dc509[0x1]),_0x1d1749=JSON[_0x198d(0x17)](_0x458e8d);return _0x1d1749;}catch(_0x49667b){if(_0x223f95[_0x198d(0x6e)]===_0x223f95[_0x198d(0x6e)])return console[_0x198d(0x7)](_0x198d(0x6f),_0x49667b),null;else _0x26dc08+='=';}};export const isJWTExpired=async()=>{const _0x2902ef={'cOlzy':_0x198d(0x13),'MOZAd':function(_0x57b987,_0x1e2473){return _0x57b987===_0x1e2473;},'neRKk':function(_0x5d07a2,_0x12a35b){return _0x5d07a2/_0x12a35b;},'aaSJd':'❌\x20Failed\x20to\x20check\x20JWT\x20expiration:'};try{const _0x17b270=await getJWTPayload();if(!_0x17b270||!_0x17b270[_0x198d(0x70)])return!![];const _0x5712a8=Math[_0x198d(0x71)](_0x2902ef['neRKk'](Date['now'](),0x3e8));return _0x17b270['exp']<_0x5712a8;}catch(_0x5e6f9e){if(_0x2902ef[_0x198d(0x72)]('vGbce','GoNnN')){_0x398641[_0x198d(0xe)](_0x2902ef[_0x198d(0x73)],_0x5f1265);const _0x459e99=(_0x2902ef[_0x198d(0x72)](_0x3f90ce,null)||_0x2902ef[_0x198d(0x72)](_0x2d8393,void 0x0)?void 0x0:_0x72c49e[_0x198d(0xc)])||'default';return delete _0x24f000[_0x459e99],!![];}else return console[_0x198d(0x7)](_0x2902ef[_0x198d(0x74)],_0x5e6f9e),!![];}};
|
|
7
|
+
import{Platform}from'react-native';import{STORAGE_KEYS}from'../constants';import AsyncStorage from'@react-native-async-storage/async-storage';const JWT_TOKEN_KEY=_0x10cf(0x0),mockStorage={};let Keychain=null;function _0x1184(){const _0x393114=['onairos_jwt_token','warn','mock','cCNQl','function','ArVqx','tPREN','equEv','Bfywi','getGenericPassword','TPKsK','default','dEAOy','kFnUC','GwNXW','siWQJ','service','uiuCK','MoFvv','pKsHC','Cflyv','Keychain\x20access\x20failed,\x20using\x20mock\x20storage','ecIOT','wVcHe','ekObk','setGenericPassword','OynSC','TgGJE','WUWcw','qLdqr','QBqFB','bvtYw','Error\x20deleting\x20credentials:','JpmKA','Bgece','jXngQ','kQmYX','resetGenericPassword','ssmon','SRGzk','hgNDi','error','dDkSr','RUNBG','dXkwY','Username\x20is\x20required\x20for\x20storing\x20credentials','web','Error\x20storing\x20credentials:','jfwTe','tQZfS','createdAt','now','username','fqJvc','credentials','lkPaw','DSglu','MFATm','QAYSt','accessControl','BIOMETRY_ANY_OR_DEVICE_PASSCODE','accessible','WHEN_UNLOCKED','indexOf','charAt','vYncP','LSYDg','oxTsu','peoKU','IQFee','ZpByu','fTBhx','fromCharCode','YoAIL','VpyxT','stringify','❌\x20Failed\x20to\x20clear\x20JWT\x20token:','TaRax','GVMVg','OqQyd','Error\x20getting\x20credentials:','SjXcp','pOGiL','uBwfx','PHVYm','parse','password','cIXaT','XoGZR','VVQQz','YMmZg','Yrdvt','vnQuj','pghyT','QCEei','ZAsLg','SyDcY','QNCyQ','yboWb','cpXcv','DqKhx','random','toString','dev_','yRACM','aNhwe','gJtVm','zjXaY','ZaTvD','Xnzch','FgZfK','dcyRC','Error\x20verifying\x20credentials:','KzXHq','❌\x20Failed\x20to\x20retrieve\x20JWT\x20token:','whBux','getItem','zVmBM','SufCg','VCTLn','❌\x20Failed\x20to\x20check\x20JWT\x20token:','EsOVi','QHCpP','Fezrq','Wjhmv','🗑️\x20JWT\x20token\x20cleared','GNKDn','ACCESS_CONTROL','ACCESSIBLE','removeItem','log','xAldE','ikhvW','length','HSmjq','lUtPH','biRhm','hydpF','Tirfc','OIQOo','QwFpU','fPXkV','PRrQT','sIVbe','hTcSj','zuCmJ','XmRKH','ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/','cLwqN','XHbPd','jquGy','uhrXM','TamIL','BEcMb','OnByC','GORIu','pXIUt','ODMMC','❌\x20Failed\x20to\x20decode\x20JWT\x20payload:','split','hTYiH','ydRLQ','HwvuN','❌\x20Failed\x20to\x20check\x20JWT\x20expiration:','mLsaV','vfWNl','OmYJJ','MyqfS','exp','qhORu','mVeCV','EdaBB','LSHXH','vBnHV','cckwE'];_0x1184=function(){return _0x393114;};return _0x1184();}try{Keychain=__ONAIROS_REQ_FUNC__(0x0);}catch(_0x250430){console[_0x10cf(0x1)]('react-native-keychain module not available, using mock storage'),Keychain={'ACCESS_CONTROL':{'BIOMETRY_ANY_OR_DEVICE_PASSCODE':_0x10cf(0x2)},'ACCESSIBLE':{'WHEN_UNLOCKED':'mock'},'getGenericPassword':async()=>null,'setGenericPassword':async()=>!![],'resetGenericPassword':async()=>!![]};}const isKeychainAvailable=()=>{const _0x4bc5cb={'tPREN':function(_0x39e5db){return _0x39e5db();},'equEv':'Error\x20verifying\x20credentials:','ArVqx':_0x10cf(0x3),'Bfywi':function(_0x4b298b,_0x67114e){return _0x4b298b===_0x67114e;},'pwzzq':_0x10cf(0x4)};try{if(_0x10cf(0x3)!==_0x4bc5cb[_0x10cf(0x5)])try{if(!_0x4bc5cb[_0x10cf(0x6)](_0x2da08a))return!![];return!![];}catch(_0x17c09d){return _0xfd4189['error'](_0x4bc5cb[_0x10cf(0x7)],_0x17c09d),![];}else return Keychain&&_0x4bc5cb[_0x10cf(0x8)](typeof Keychain[_0x10cf(0x9)],_0x4bc5cb['pwzzq']);}catch(_0x19c062){return![];}},safeGetGenericPassword=async _0x49704b=>{const _0xfa10bb={'kFnUC':function(_0x46411c,_0x4216d8){return _0x46411c(_0x4216d8);},'RMzUi':function(_0x1ff477){return _0x1ff477();},'dEAOy':function(_0x1aa557,_0x465441){return _0x1aa557===_0x465441;},'QnZlI':_0x10cf(0xa),'HJGLr':function(_0x25960c,_0x2c7605){return _0x25960c===_0x2c7605;},'GwNXW':function(_0x36ccf5,_0x225d6c){return _0x36ccf5===_0x225d6c;},'siWQJ':_0x10cf(0xb)};try{if(_0xfa10bb['RMzUi'](isKeychainAvailable))return _0xfa10bb[_0x10cf(0xc)](_0xfa10bb['QnZlI'],_0x10cf(0xa))?await Keychain[_0x10cf(0x9)](_0x49704b):_0xfa10bb[_0x10cf(0xd)](_0x2165d3,_0x49cd8d);else{const _0x5b2cc7=(_0xfa10bb['HJGLr'](_0x49704b,null)||_0xfa10bb[_0x10cf(0xe)](_0x49704b,void 0x0)?void 0x0:_0x49704b['service'])||_0xfa10bb[_0x10cf(0xf)];return mockStorage[_0x5b2cc7]||null;}}catch(_0x2a01fd){console[_0x10cf(0x1)]('Keychain\x20access\x20failed,\x20using\x20mock\x20storage',_0x2a01fd);const _0x556ff6=(_0x49704b===null||_0x49704b===void 0x0?void 0x0:_0x49704b[_0x10cf(0x10)])||'default';return mockStorage[_0x556ff6]||null;}},safeSetGenericPassword=async(_0x4d63e1,_0x464fdd,_0x1c51b2)=>{const _0x20e0fb={'wVcHe':function(_0x322725,_0x2a48ac){return _0x322725===_0x2a48ac;},'efRuM':_0x10cf(0x4),'WUWcw':function(_0x7598eb,_0x29099f){return _0x7598eb===_0x29099f;},'qLdqr':_0x10cf(0xb),'ecIOT':_0x10cf(0x11),'ekObk':function(_0x21b89e){return _0x21b89e();},'czBUU':_0x10cf(0x12),'pDwvR':function(_0x37c7a9,_0x10f86b){return _0x37c7a9===_0x10f86b;},'OynSC':_0x10cf(0x13),'TgGJE':_0x10cf(0x14),'QBqFB':function(_0x1a3671,_0x24ba1f){return _0x1a3671===_0x24ba1f;},'bvtYw':_0x10cf(0x15)};try{if(_0x20e0fb['ecIOT']!==_0x20e0fb[_0x10cf(0x16)])return Keychain&&_0x20e0fb[_0x10cf(0x17)](typeof Keychain[_0x10cf(0x9)],_0x20e0fb['efRuM']);else{if(_0x20e0fb[_0x10cf(0x18)](isKeychainAvailable)){if(_0x10cf(0x12)===_0x20e0fb['czBUU'])return await Keychain[_0x10cf(0x19)](_0x4d63e1,_0x464fdd,_0x1c51b2);else{_0x5ba02b[_0x10cf(0x1)](_0x10cf(0x15),_0x17977a);const _0x40e330=(_0x20e0fb[_0x10cf(0x17)](_0x51de20,null)||_0x20e0fb['WUWcw'](_0xac67de,void 0x0)?void 0x0:_0x467cfe[_0x10cf(0x10)])||_0x20e0fb['qLdqr'];return _0x29ba40[_0x40e330]||null;}}else{if(_0x20e0fb['pDwvR'](_0x20e0fb[_0x10cf(0x1a)],_0x20e0fb[_0x10cf(0x1b)])){const _0x22560a=(_0x20e0fb[_0x10cf(0x1c)](_0x2ab7db,null)||_0x20e0fb[_0x10cf(0x1c)](_0x26e03f,void 0x0)?void 0x0:_0x3a4b72['service'])||_0x20e0fb[_0x10cf(0x1d)];return _0x32afce[_0x22560a]={'username':_0x272982,'password':_0x2ce7c8},!![];}else{const _0x1943f7=(_0x20e0fb[_0x10cf(0x1e)](_0x1c51b2,null)||_0x1c51b2===void 0x0?void 0x0:_0x1c51b2[_0x10cf(0x10)])||_0x20e0fb[_0x10cf(0x1d)];return mockStorage[_0x1943f7]={'username':_0x4d63e1,'password':_0x464fdd},!![];}}}}catch(_0x19865c){console[_0x10cf(0x1)](_0x20e0fb[_0x10cf(0x1f)],_0x19865c);const _0x2bd9a4=(_0x1c51b2===null||_0x20e0fb['pDwvR'](_0x1c51b2,void 0x0)?void 0x0:_0x1c51b2['service'])||_0x20e0fb[_0x10cf(0x1d)];return mockStorage[_0x2bd9a4]={'username':_0x4d63e1,'password':_0x464fdd},!![];}},safeResetGenericPassword=async _0x506d9d=>{const _0x10fe45={'kQmYX':_0x10cf(0x15),'jXngQ':function(_0x18c7e6,_0x225884){return _0x18c7e6===_0x225884;},'hgNDi':_0x10cf(0xb),'dDkSr':_0x10cf(0x20),'ssmon':function(_0x23b2bc,_0x2565c0){return _0x23b2bc===_0x2565c0;},'fhBYE':'UDhKs','SRGzk':_0x10cf(0x21),'wjqpq':function(_0x4a6955,_0x55e1fc){return _0x4a6955===_0x55e1fc;},'DdYgx':function(_0x5f2487,_0x34c856){return _0x5f2487===_0x34c856;},'RUNBG':_0x10cf(0x22),'dXkwY':function(_0x213dcd,_0x2e33c3){return _0x213dcd===_0x2e33c3;},'rqJEW':function(_0x2b6704,_0xf6247c){return _0x2b6704===_0xf6247c;}};try{if(isKeychainAvailable()){if(_0x10fe45[_0x10cf(0x23)](_0x10fe45['fhBYE'],'LUqTu')){_0xed7d08['warn'](_0x10fe45[_0x10cf(0x24)],_0x2674f6);const _0x26af76=(_0x10fe45['jXngQ'](_0x22e159,null)||_0x10fe45['jXngQ'](_0x23b82a,void 0x0)?void 0x0:_0x57ee35[_0x10cf(0x10)])||_0x10fe45['hgNDi'];return delete _0x54b1e1[_0x26af76],!![];}else return await Keychain[_0x10cf(0x25)](_0x506d9d);}else{if(_0x10fe45[_0x10cf(0x26)](_0x10cf(0x21),_0x10fe45[_0x10cf(0x27)])){const _0x14c77a=(_0x506d9d===null||_0x10fe45['wjqpq'](_0x506d9d,void 0x0)?void 0x0:_0x506d9d[_0x10cf(0x10)])||_0x10fe45[_0x10cf(0x28)];return delete mockStorage[_0x14c77a],!![];}else return _0x435da8[_0x10cf(0x29)](_0x10fe45[_0x10cf(0x2a)],_0x2b970e),![];}}catch(_0x1af5c4){if(_0x10fe45['DdYgx'](_0x10cf(0x22),_0x10fe45[_0x10cf(0x2b)])){console[_0x10cf(0x1)](_0x10cf(0x15),_0x1af5c4);const _0x2eb3cd=(_0x10fe45[_0x10cf(0x2c)](_0x506d9d,null)||_0x10fe45['rqJEW'](_0x506d9d,void 0x0)?void 0x0:_0x506d9d['service'])||_0x10fe45[_0x10cf(0x28)];return delete mockStorage[_0x2eb3cd],!![];}else{_0x4d2614['warn'](_0x10fe45['kQmYX'],_0x131ebe);const _0x5815f5=(_0x10fe45['ssmon'](_0x143782,null)||_0x10fe45[_0x10cf(0x23)](_0x19f82a,void 0x0)?void 0x0:_0x59285a['service'])||'default';return _0x16b6d9[_0x5815f5]={'username':_0x2d507b,'password':_0x325aa8},!![];}}};export const storeCredentials=async _0x580c8a=>{const _0x8aeb4a={'vYncP':function(_0x1a72a8,_0x50f434){return _0x1a72a8+_0x50f434;},'LSYDg':function(_0x215868,_0x32c833){return _0x215868+_0x32c833;},'oxTsu':function(_0x53f84e,_0x112d5b){return _0x53f84e|_0x112d5b;},'peoKU':function(_0x354eb4,_0x280b3a){return _0x354eb4|_0x280b3a;},'IQFee':function(_0x412e13,_0x2c9c4e){return _0x412e13<<_0x2c9c4e;},'ZpByu':function(_0x1b6a14,_0x110b11){return _0x1b6a14<<_0x110b11;},'fTBhx':function(_0x5b7b32,_0x290b0c){return _0x5b7b32<<_0x290b0c;},'dFDUE':function(_0x4133d9,_0x4c03ff){return _0x4133d9>>_0x4c03ff;},'lflGd':function(_0x441cdf,_0x5c5c12){return _0x441cdf!==_0x5c5c12;},'YoAIL':function(_0x1fac09,_0x509175){return _0x1fac09&_0x509175;},'VpyxT':function(_0x11caf8,_0x536b6c){return _0x11caf8>>_0x536b6c;},'SBfSL':function(_0x2f085d,_0x265299){return _0x2f085d!==_0x265299;},'jfwTe':function(_0x54b697){return _0x54b697();},'tQZfS':function(_0x4af5d8,_0x4a99da){return _0x4af5d8===_0x4a99da;},'fqJvc':_0x10cf(0x2d),'lkPaw':function(_0x3955d1,_0x3748ec){return _0x3955d1!==_0x3748ec;},'remhS':_0x10cf(0x2e),'DSglu':function(_0x248934){return _0x248934();},'MFATm':function(_0x32100f,_0x5380ab){return _0x32100f===_0x5380ab;},'cgIBw':_0x10cf(0x2f)};try{const _0x5614d6=await _0x8aeb4a[_0x10cf(0x30)](getCredentials),_0x22502e={..._0x5614d6,..._0x580c8a,'createdAt':(_0x8aeb4a[_0x10cf(0x31)](_0x5614d6,null)||_0x8aeb4a[_0x10cf(0x31)](_0x5614d6,void 0x0)?void 0x0:_0x5614d6[_0x10cf(0x32)])||Date[_0x10cf(0x33)]()},_0x10bfab=_0x22502e[_0x10cf(0x34)];if(!_0x10bfab)throw new Error(_0x8aeb4a[_0x10cf(0x35)]);const _0x5a0696={'service':STORAGE_KEYS[_0x10cf(0x36)]};if(_0x8aeb4a[_0x10cf(0x37)](Platform['OS'],_0x8aeb4a['remhS'])&&_0x8aeb4a[_0x10cf(0x38)](isKeychainAvailable)){if(_0x8aeb4a[_0x10cf(0x39)](_0x10cf(0x3a),'QAYSt'))_0x5a0696[_0x10cf(0x3b)]=Keychain['ACCESS_CONTROL'][_0x10cf(0x3c)],_0x5a0696[_0x10cf(0x3d)]=Keychain['ACCESSIBLE'][_0x10cf(0x3e)];else{const _0x2b95c5=_0x4f65c8[_0x10cf(0x3f)](_0x39dfec['charAt'](_0x490099)),_0x27e4fb=_0x4adc20[_0x10cf(0x3f)](_0x47ee64[_0x10cf(0x40)](_0x8aeb4a['vYncP'](_0x29284d,0x1))),_0x5e5224=_0x300436[_0x10cf(0x3f)](_0x390916[_0x10cf(0x40)](_0x8aeb4a[_0x10cf(0x41)](_0x324749,0x2))),_0x27e950=_0x5b7e53['indexOf'](_0x2bc602['charAt'](_0x8aeb4a[_0x10cf(0x42)](_0x46ed0b,0x3))),_0x35cd3c=_0x8aeb4a[_0x10cf(0x43)](_0x8aeb4a[_0x10cf(0x44)](_0x8aeb4a[_0x10cf(0x43)](_0x8aeb4a[_0x10cf(0x45)](_0x2b95c5,0x12),_0x8aeb4a[_0x10cf(0x46)](_0x27e4fb,0xc)),_0x8aeb4a[_0x10cf(0x47)](_0x5e5224,0x6)),_0x27e950);_0x23a2b8+=_0x193ccd['fromCharCode'](_0x8aeb4a['dFDUE'](_0x35cd3c,0x10)&0xff);if(_0x8aeb4a['lflGd'](_0x5e5224,0x40))_0x2544fa+=_0x2d252c[_0x10cf(0x48)](_0x8aeb4a[_0x10cf(0x49)](_0x8aeb4a[_0x10cf(0x4a)](_0x35cd3c,0x8),0xff));if(_0x8aeb4a['SBfSL'](_0x27e950,0x40))_0x47ef07+=_0x5b7469[_0x10cf(0x48)](_0x8aeb4a[_0x10cf(0x49)](_0x35cd3c,0xff));}}return await safeSetGenericPassword(_0x10bfab,JSON[_0x10cf(0x4b)](_0x22502e),_0x5a0696),!![];}catch(_0x161f46){return console[_0x10cf(0x29)](_0x8aeb4a['cgIBw'],_0x161f46),![];}};export const getCredentials=async()=>{const _0x552935={'cIXaT':'❌\x20Failed\x20to\x20decode\x20JWT\x20payload:','ujVID':_0x10cf(0x4c),'SjXcp':function(_0x2defd6,_0x389f02){return _0x2defd6!==_0x389f02;},'uBwfx':_0x10cf(0x4d),'PHVYm':function(_0x24202d,_0x2520fc){return _0x24202d(_0x2520fc);},'jOyaI':_0x10cf(0x4e),'oIzWP':_0x10cf(0x4f),'XoGZR':_0x10cf(0x50)};try{if(_0x552935[_0x10cf(0x51)](_0x10cf(0x52),_0x552935[_0x10cf(0x53)])){const _0x42370f=await _0x552935[_0x10cf(0x54)](safeGetGenericPassword,{'service':STORAGE_KEYS[_0x10cf(0x36)]});if(_0x42370f)return _0x552935['jOyaI']!==_0x552935['oIzWP']?JSON[_0x10cf(0x55)](_0x42370f[_0x10cf(0x56)]):(_0x257456[_0x10cf(0x29)](_0x552935[_0x10cf(0x57)],_0x3c8a77),null);return null;}else return _0x455f63[_0x10cf(0x29)](_0x552935['ujVID'],_0x4c1c97),![];}catch(_0x524004){return console[_0x10cf(0x29)](_0x552935[_0x10cf(0x58)],_0x524004),null;}};export const hasCredentials=async()=>{const _0x5cc808={'FJSzZ':function(_0x2a9baa,_0x22f643){return _0x2a9baa(_0x22f643);},'VVQQz':'Error\x20checking\x20credentials:'};try{const _0x385b7d=await _0x5cc808['FJSzZ'](safeGetGenericPassword,{'service':STORAGE_KEYS[_0x10cf(0x36)]});return!!_0x385b7d;}catch(_0x216c4f){return console[_0x10cf(0x29)](_0x5cc808[_0x10cf(0x59)],_0x216c4f),![];}};export const deleteCredentials=async()=>{const _0x3fef93={'SyDcY':function(_0x4ccc2b){return _0x4ccc2b();},'DqKhx':'❌\x20Failed\x20to\x20check\x20JWT\x20expiration:','vnQuj':function(_0x142279,_0x41c45d){return _0x142279!==_0x41c45d;},'pghyT':_0x10cf(0x5a),'QCEei':_0x10cf(0x5b),'ZAsLg':function(_0x519a2b,_0x5ab40b){return _0x519a2b(_0x5ab40b);},'cpXcv':_0x10cf(0x20)};try{if(_0x3fef93[_0x10cf(0x5c)](_0x3fef93[_0x10cf(0x5d)],_0x3fef93[_0x10cf(0x5e)]))return await _0x3fef93[_0x10cf(0x5f)](safeResetGenericPassword,{'service':STORAGE_KEYS[_0x10cf(0x36)]}),!![];else{if(!_0x3fef93[_0x10cf(0x60)](_0x2ce808))return!![];return!![];}}catch(_0x39e4a3){return _0x3fef93[_0x10cf(0x5c)](_0x10cf(0x61),_0x10cf(0x62))?(console['error'](_0x3fef93[_0x10cf(0x63)],_0x39e4a3),![]):(_0x549813[_0x10cf(0x29)](_0x3fef93[_0x10cf(0x64)],_0x2f7fe4),!![]);}};export const updateCredentials=async _0x489616=>{const _0x3176ac={'adIrn':function(_0x366016,_0x139e84){return _0x366016(_0x139e84);}};return _0x3176ac['adIrn'](storeCredentials,_0x489616);};export const generateDeviceUsername=()=>{const _0x3aa5c1=Math[_0x10cf(0x65)]()[_0x10cf(0x66)](0x24)['substring'](0x2,0xa);return _0x10cf(0x67)+_0x3aa5c1;};function _0x10cf(_0x11845d,_0x10cf16){_0x11845d=_0x11845d-0x0;const _0x44ac41=_0x1184();let _0x4467f7=_0x44ac41[_0x11845d];return _0x4467f7;}export const verifyCredentials=async _0x140600=>{const _0x58240d={'KzXHq':'mock','gJtVm':_0x10cf(0x68),'zjXaY':function(_0x440f59){return _0x440f59();},'ZaTvD':function(_0x123115,_0x5d41c7){return _0x123115===_0x5d41c7;},'Xnzch':_0x10cf(0x69),'FgZfK':'Vagzw'};try{if(_0x58240d[_0x10cf(0x6a)]==='LzPyf')return![];else{if(!_0x58240d[_0x10cf(0x6b)](isKeychainAvailable))return _0x58240d[_0x10cf(0x6c)](_0x58240d[_0x10cf(0x6d)],_0x58240d[_0x10cf(0x6d)])?!![]:_0x41f01b[_0x10cf(0x55)](_0x30bb91[_0x10cf(0x56)]);return!![];}}catch(_0x57231b){if(_0x58240d[_0x10cf(0x6e)]!==_0x10cf(0x6f))return console[_0x10cf(0x29)](_0x10cf(0x70),_0x57231b),![];else _0x30838d[_0x10cf(0x1)]('react-native-keychain module not available, using mock storage'),Keychain={'ACCESS_CONTROL':{'BIOMETRY_ANY_OR_DEVICE_PASSCODE':_0x58240d[_0x10cf(0x71)]},'ACCESSIBLE':{'WHEN_UNLOCKED':'mock'},'getGenericPassword':async()=>null,'setGenericPassword':async()=>!![],'resetGenericPassword':async()=>!![]};}};export const getJWT=async()=>{const _0x492f8f={'VCTLn':_0x10cf(0x72),'zVmBM':function(_0x3fd55e,_0x2aeeac){return _0x3fd55e===_0x2aeeac;},'SufCg':_0x10cf(0x73)};try{const _0x3d3871=await AsyncStorage[_0x10cf(0x74)](JWT_TOKEN_KEY);return _0x3d3871;}catch(_0x598199){return _0x492f8f[_0x10cf(0x75)](_0x492f8f[_0x10cf(0x76)],_0x492f8f['SufCg'])?(console[_0x10cf(0x29)](_0x492f8f[_0x10cf(0x77)],_0x598199),null):(_0x7a7dff['error'](_0x492f8f[_0x10cf(0x77)],_0x34767d),null);}};export const hasJWT=async()=>{const _0x6b791d={'EsOVi':function(_0x3e00cb,_0x2140e7){return _0x3e00cb!==_0x2140e7;},'QHCpP':'oJdpJ','Fezrq':_0x10cf(0x78)};try{if(_0x6b791d[_0x10cf(0x79)](_0x6b791d[_0x10cf(0x7a)],_0x6b791d[_0x10cf(0x7a)]))_0x1d145c+='=';else{const _0x5ebc14=await AsyncStorage[_0x10cf(0x74)](JWT_TOKEN_KEY);return!!_0x5ebc14;}}catch(_0x17e21d){return console[_0x10cf(0x29)](_0x6b791d[_0x10cf(0x7b)],_0x17e21d),![];}};export const clearJWT=async()=>{const _0x2da794={'TXjzK':function(_0x5508c9,_0x590f1e){return _0x5508c9%_0x590f1e;},'HSmjq':function(_0xeb36b8,_0x13d525){return _0xeb36b8<_0x13d525;},'lUtPH':function(_0x3a68ac,_0x421b54){return _0x3a68ac+_0x421b54;},'biRhm':function(_0xab1ad6,_0xc124e){return _0xab1ad6|_0xc124e;},'hydpF':function(_0x2c0940,_0x356e7e){return _0x2c0940|_0x356e7e;},'Tirfc':function(_0x2717ff,_0x56f135){return _0x2717ff<<_0x56f135;},'OIQOo':function(_0x2c4c07,_0x2d6e5a){return _0x2c4c07<<_0x2d6e5a;},'QwFpU':function(_0x1ee1bc,_0x556220){return _0x1ee1bc<<_0x556220;},'lqQDy':function(_0x4728e9,_0x30f65e){return _0x4728e9&_0x30f65e;},'fPXkV':function(_0x983236,_0x513a23){return _0x983236>>_0x513a23;},'PRrQT':function(_0x11ba58,_0x57f62c){return _0x11ba58!==_0x57f62c;},'sIVbe':function(_0x17f1c7,_0x36fe48){return _0x17f1c7&_0x36fe48;},'hTcSj':function(_0x1d2467,_0x4ce3f5){return _0x1d2467!==_0x4ce3f5;},'zuCmJ':function(_0x2a032c,_0x1429e9){return _0x2a032c&_0x1429e9;},'GNKDn':function(_0x3eb0f4,_0x85356e){return _0x3eb0f4===_0x85356e;},'ypnFx':_0x10cf(0x7c),'xAldE':_0x10cf(0x7d),'ktWmo':'rkrGY','XmRKH':_0x10cf(0x4c)};try{if(_0x2da794[_0x10cf(0x7e)]('oMSqt',_0x2da794['ypnFx']))_0x5ebb46[_0x10cf(0x3b)]=Keychain[_0x10cf(0x7f)][_0x10cf(0x3c)],_0xc32c65['accessible']=Keychain[_0x10cf(0x80)][_0x10cf(0x3e)];else return await AsyncStorage[_0x10cf(0x81)](JWT_TOKEN_KEY),console[_0x10cf(0x82)](_0x2da794[_0x10cf(0x83)]),!![];}catch(_0x1833fc){if(_0x2da794[_0x10cf(0x7e)](_0x10cf(0x84),_0x2da794['ktWmo'])){while(_0x2da794['TXjzK'](_0xf21651[_0x10cf(0x85)],0x4)){_0x5896f0+='=';}const _0x223617='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';let _0x5b57a4='';for(let _0x585edc=0x0;_0x2da794[_0x10cf(0x86)](_0x585edc,_0x1ee752[_0x10cf(0x85)]);_0x585edc+=0x4){const _0x4a1d15=_0x223617[_0x10cf(0x3f)](_0x459477[_0x10cf(0x40)](_0x585edc)),_0x480034=_0x223617[_0x10cf(0x3f)](_0x53abde[_0x10cf(0x40)](_0x2da794[_0x10cf(0x87)](_0x585edc,0x1))),_0x1e8c0d=_0x223617[_0x10cf(0x3f)](_0x485dd9[_0x10cf(0x40)](_0x2da794['lUtPH'](_0x585edc,0x2))),_0x591eff=_0x223617['indexOf'](_0x1a6aab['charAt'](_0x2da794['lUtPH'](_0x585edc,0x3))),_0x704d75=_0x2da794[_0x10cf(0x88)](_0x2da794[_0x10cf(0x89)](_0x2da794[_0x10cf(0x88)](_0x2da794[_0x10cf(0x8a)](_0x4a1d15,0x12),_0x2da794[_0x10cf(0x8b)](_0x480034,0xc)),_0x2da794[_0x10cf(0x8c)](_0x1e8c0d,0x6)),_0x591eff);_0x5b57a4+=_0x5dbe26[_0x10cf(0x48)](_0x2da794['lqQDy'](_0x2da794[_0x10cf(0x8d)](_0x704d75,0x10),0xff));if(_0x2da794[_0x10cf(0x8e)](_0x1e8c0d,0x40))_0x5b57a4+=_0x27cbcd['fromCharCode'](_0x2da794[_0x10cf(0x8f)](_0x2da794[_0x10cf(0x8d)](_0x704d75,0x8),0xff));if(_0x2da794[_0x10cf(0x90)](_0x591eff,0x40))_0x5b57a4+=_0x4e6f1f[_0x10cf(0x48)](_0x2da794[_0x10cf(0x91)](_0x704d75,0xff));}return _0x5b57a4;}else return console['error'](_0x2da794[_0x10cf(0x92)],_0x1833fc),![];}};const base64Decode=_0x324f87=>{const _0x13f5d1={'GbScJ':function(_0xcbe670,_0x3e74ad){return _0xcbe670===_0x3e74ad;},'ODMMC':_0x10cf(0x4),'cLwqN':function(_0x431b2d,_0x53954b){return _0x431b2d%_0x53954b;},'XHbPd':_0x10cf(0x93),'BupSV':function(_0x83db3,_0x1c0ece){return _0x83db3<_0x1c0ece;},'mmxFe':'jquGy','uhrXM':function(_0x130442,_0x58c18f){return _0x130442+_0x58c18f;},'TamIL':function(_0x3060f8,_0x56153c){return _0x3060f8|_0x56153c;},'BEcMb':function(_0x3388de,_0x4b0a21){return _0x3388de|_0x4b0a21;},'OnByC':function(_0x2ef881,_0x22d7a4){return _0x2ef881<<_0x22d7a4;},'MqJXD':function(_0x4f4502,_0x4ed971){return _0x4f4502<<_0x4ed971;},'GORIu':function(_0x365aa4,_0x3bf518){return _0x365aa4&_0x3bf518;},'pXIUt':function(_0x1a30ab,_0x4a1a58){return _0x1a30ab>>_0x4a1a58;},'ZIdZl':function(_0x187751,_0x52a6a8){return _0x187751!==_0x52a6a8;}};while(_0x13f5d1[_0x10cf(0x94)](_0x324f87[_0x10cf(0x85)],0x4)){_0x324f87+='=';}const _0x244d4c=_0x13f5d1[_0x10cf(0x95)];let _0xef72f9='';for(let _0x57b812=0x0;_0x13f5d1['BupSV'](_0x57b812,_0x324f87[_0x10cf(0x85)]);_0x57b812+=0x4){if(_0x13f5d1['mmxFe']===_0x10cf(0x96)){const _0x24b8bc=_0x244d4c[_0x10cf(0x3f)](_0x324f87['charAt'](_0x57b812)),_0x40532d=_0x244d4c['indexOf'](_0x324f87[_0x10cf(0x40)](_0x13f5d1['uhrXM'](_0x57b812,0x1))),_0x3ffa44=_0x244d4c[_0x10cf(0x3f)](_0x324f87[_0x10cf(0x40)](_0x57b812+0x2)),_0x4c76c6=_0x244d4c[_0x10cf(0x3f)](_0x324f87['charAt'](_0x13f5d1[_0x10cf(0x97)](_0x57b812,0x3))),_0x2a52d4=_0x13f5d1[_0x10cf(0x98)](_0x13f5d1[_0x10cf(0x98)](_0x13f5d1[_0x10cf(0x99)](_0x13f5d1[_0x10cf(0x9a)](_0x24b8bc,0x12),_0x13f5d1['MqJXD'](_0x40532d,0xc)),_0x3ffa44<<0x6),_0x4c76c6);_0xef72f9+=String[_0x10cf(0x48)](_0x13f5d1['GORIu'](_0x2a52d4>>0x10,0xff));if(_0x3ffa44!==0x40)_0xef72f9+=String[_0x10cf(0x48)](_0x13f5d1[_0x10cf(0x9b)](_0x13f5d1[_0x10cf(0x9c)](_0x2a52d4,0x8),0xff));if(_0x13f5d1['ZIdZl'](_0x4c76c6,0x40))_0xef72f9+=String[_0x10cf(0x48)](_0x13f5d1[_0x10cf(0x9b)](_0x2a52d4,0xff));}else try{return Keychain&&_0x13f5d1['GbScJ'](typeof Keychain[_0x10cf(0x9)],_0x13f5d1[_0x10cf(0x9d)]);}catch(_0x172030){return![];}}return _0xef72f9;};export const getJWTPayload=async()=>{const _0x428874={'XdcWV':function(_0x217641,_0x1380ed){return _0x217641(_0x1380ed);},'hTYiH':_0x10cf(0x9e)};try{const _0x5a9c89=await getJWT();if(!_0x5a9c89)return null;const _0x3e3adb=_0x5a9c89[_0x10cf(0x9f)]('.');if(_0x3e3adb[_0x10cf(0x85)]!==0x3)return null;const _0xbccc8a=_0x428874['XdcWV'](base64Decode,_0x3e3adb[0x1]),_0x376583=JSON[_0x10cf(0x55)](_0xbccc8a);return _0x376583;}catch(_0x3e45c5){return console[_0x10cf(0x29)](_0x428874[_0x10cf(0xa0)],_0x3e45c5),null;}};export const isJWTExpired=async()=>{const _0x53eb7d={'OmYJJ':'❌\x20Failed\x20to\x20check\x20JWT\x20token:','EdaBB':function(_0x193ef9,_0x2393cb){return _0x193ef9===_0x2393cb;},'LSHXH':function(_0x1c98cc,_0x1d12fa){return _0x1c98cc===_0x1d12fa;},'vBnHV':_0x10cf(0xb),'mLsaV':function(_0x48e726,_0x381e59){return _0x48e726!==_0x381e59;},'vfWNl':_0x10cf(0xa1),'MyqfS':function(_0x42a24f){return _0x42a24f();},'qhORu':function(_0x3eda13,_0x4d7d2b){return _0x3eda13<_0x4d7d2b;},'mVeCV':_0x10cf(0xa2),'cckwE':_0x10cf(0xa3)};try{if(_0x53eb7d[_0x10cf(0xa4)](_0x53eb7d[_0x10cf(0xa5)],_0x53eb7d[_0x10cf(0xa5)]))return _0x439ec7[_0x10cf(0x29)](_0x53eb7d[_0x10cf(0xa6)],_0x19746a),![];else{const _0xb6f341=await _0x53eb7d[_0x10cf(0xa7)](getJWTPayload);if(!_0xb6f341||!_0xb6f341[_0x10cf(0xa8)])return!![];const _0x47fdb5=Math['floor'](Date[_0x10cf(0x33)]()/0x3e8);return _0x53eb7d[_0x10cf(0xa9)](_0xb6f341[_0x10cf(0xa8)],_0x47fdb5);}}catch(_0x35d299){if(_0x53eb7d['mLsaV'](_0x10cf(0xa2),_0x53eb7d[_0x10cf(0xaa)])){const _0x2a00c5=(_0x53eb7d[_0x10cf(0xab)](_0x4a3a19,null)||_0x53eb7d[_0x10cf(0xac)](_0x294621,void 0x0)?void 0x0:_0x5e753c[_0x10cf(0x10)])||_0x53eb7d[_0x10cf(0xad)];return _0x32c481[_0x2a00c5]||null;}else return console[_0x10cf(0x29)](_0x53eb7d[_0x10cf(0xae)],_0x35d299),!![];}};
|