Files
discord-decomp/sources/modules/gplay/native/GPlayManager.android.tsx
T
2026-07-28 01:06:53 +03:00

3614 lines
175 KiB
TypeScript

/* Metro module 7297; source: modules/gplay/native/GPlayManager.android.tsx; dependencies: [5, 31, 27, 7038, 7039, 1226, 3808, 5140, 7255, 5141, 661, 4095, 1880, 33, 3, 694, 7298, 1225, 5143, 3738, 7299, 3817, 4223, 683, 4496, 1244, 7301, 1962, 5080, 7028, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Dispatcher from '../../../Dispatcher.tsx'; /* Metro dependency 694 */
import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import SubscriptionStore from '../../../stores/billing/SubscriptionStore.tsx'; /* Metro dependency 3808 */
import IAPStoreAndroid from '../../../stores/native/IAPStore.android.tsx'; /* Metro dependency 5140 */
import GiftPromotionStore from '../../premium/gifting/GiftPromotionStore.tsx'; /* Metro dependency 7038 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PremiumConstantsModule from '../../premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
import * as PaymentConstantsModule from '../../payments/PaymentConstants.tsx'; /* Metro dependency 4095 */
import * as GPlayAnalyticsStoreModule from './GPlayAnalyticsStore.tsx'; /* Metro dependency 7255 */
import * as GPlayActionCreatorsModule from '../../../actions/native/GPlayActionCreators.tsx'; /* Metro dependency 7298 */
function _fun58859(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#58859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7475:6, offset: 0x016d8665, size: 635 bytes, params: 8, frame: 20
const env0_0 = require;
const handlePurchaseUpdated = function() {
return _handlePurchaseUpdated.apply(this, arguments);
};
const handleDowngradeCommand = function() {
return _handleDowngradeCommand.apply(this, arguments);
};
const fetchAndAlertActiveSubscription = function() {
return _fetchAndAlertActiveSubscription.apply(this, arguments);
};
const handleAppStateUpdated = function() {
return _handleAppStateUpdated.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
ReactModule;
let value = ReactNativeModule;
const NativeEventEmitter = value.NativeEventEmitter;
const NativeModules = value.NativeModules;
value = require(7039) /* metro dependency 7039: PremiumPlanPurchasedStore */;
const env0_5 = value.setPaymentSuccess;
const env0_6 = value.showOldPaymentFlowSuccess;
value = require(5141) /* metro dependency 5141: Constants */;
const env0_11 = value.GPlayConnectionState;
const env0_12 = value.GPlayDowngradeCommand;
value = require(661) /* metro dependency 661: Constants */;
const env0_13 = value.AnalyticEvents;
const env0_14 = value.AppStates;
value = importDefault(3) /* metro dependency 3: Logger */;
value = new value('GPlayManager.android');
const BillingManager = NativeModules.BillingManager;
const nativeEventEmitter = new NativeEventEmitter(BillingManager);
const object2 = {giftInfoOptionsCache: {}, initialize: initialize_58889, terminate: terminate};
(FileImportTrackerModule).fileFinishedImporting('modules/gplay/native/GPlayManager.android.tsx');
exports.default = object2;
function handleConnectionStateUpdated({connectionState}) { // fn#58860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7475:582, offset: 0x016d88e0, size: 125 bytes, params: 2, frame: 15
var value;
const defaultImport = Dispatcher;
defaultImport.dispatch({type: 'GPLAY_UPDATE_CONNECTION_STATE', connectionState: connectionState});
const CONNECTED = GPlayConnectionState.CONNECTED;
if (connectionState === CONNECTED) {
value = require(7298) /* metro dependency 7298: GPlayActionCreators */;
value = value.loadUserCountry();
value.finally(_fun58861);
}
function _fun58861() { // fn#58861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7475:770, offset: 0x016d895d, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (GPlayActionCreatorsModule).loadSkus();
}
}
function handlePurchaseStateUpdated({billingResult, isActivePurchase}) { // fn#58862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7475:796, offset: 0x016d8982, size: 74 bytes, params: 2, frame: 15
Dispatcher.dispatch({type: 'GPLAY_UPDATE_PURCHASE_STATE', billingResult: billingResult,
isActivePurchase: isActivePurchase});
}
function _handlePurchaseUpdated() { // fn#58864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7475:1046, offset: 0x016d89cc, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun58866).apply(this, arguments);
async function _fun58866(a0) { // fn#58866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7475:1113, offset: 0x016d8a0e, size: 2094 bytes, params: 2, frame: 34
var r9;
var skuId;
var r18;
var r5;
var value;
var value2;
var purchase;
var value3;
var value4;
var value5;
var binding;
var isPurchasingProduct;
var productId;
var getState;
var analyticsByProductId;
var property;
var property2;
var value6;
var v3;
var purchaseToken;
var value7;
var getGiftOptionsForKey;
var value8;
var value9;
var dispatch;
var object;
var object2;
var binding2;
var property3;
var value10;
var property4;
var value11;
var SubscriptionProductIds;
var includes;
var value12;
var binding3;
var property5;
var value13;
var value14;
var subtract;
var property6;
var value15;
var DRAFT_ORDER_LOOKBACK_DAYS;
var value16;
var toISOString;
var value17;
var property7;
var value18;
var getPlanIdForGift;
var value19;
var value20;
var property8;
var value21;
var binding4;
var property9;
var value22;
var getOrders;
var DRAFT;
var value23;
var value24;
var value25;
var length;
var value26;
var warn;
var property10;
var id;
var info;
var binding5;
var property11;
var value27;
var markOrderAsSigningInProgress;
var value28;
var value29;
var value30;
var error;
var binding6;
var property12;
var value31;
var captureBillingException;
var object3;
var object4;
var error2;
var message;
var HermesInternal;
var concat;
var value32;
var binding7;
var property13;
var value33;
var verifyPurchase;
var value34;
var value35;
var value36;
var value37;
var value38;
var binding8;
var property14;
var value39;
var value40;
var binding9;
var property15;
var value41;
var value42;
var binding10;
var property16;
var value43;
var value44;
var binding11;
var property17;
var value45;
var sendPaymentCompleteAnalytics;
var value46;
var value47;
var pendingDowngrade;
var value48;
var isActive;
var binding12;
var property18;
var value49;
var fetchSubscriptions;
var subscriptions;
var value50;
var value51;
var value52;
var value53;
var value54;
var binding13;
var property19;
var value55;
var property20;
var value56;
var subscriptions2;
var value57;
var value58;
var binding14;
var property21;
var value59;
var object5;
var error3;
var value60;
var property22;
var value61;
var property23;
var value62;
var track;
var GPLAY_PURCHASE_FAILED;
var value63;
exceptionLanding321: while (true) {
value = undefined;
value2 = false;
if (value2) {
return value;
}
purchase = a0.purchase;
value = undefined;
await value;
value3 = undefined;
value4 = false;
if (value4) {
return value3;
}
value5 = environment.__proto__.__proto__;
binding = env2_9;
isPurchasingProduct = binding.isPurchasingProduct;
productId = purchase.productId;
if (!Reflect.apply(isPurchasingProduct, binding, [productId])) {
binding = env2_10;
getState = binding.getState;
analyticsByProductId = Reflect.apply(getState, binding, []).analyticsByProductId;
productId = purchase.productId;
property = analyticsByProductId[productId];
binding = env2_21;
productId = purchase.productId;
property2 = binding[productId];
binding = env2_1;
value6 = binding(env2_2[17]);
v3 = value6.v3;
purchaseToken = purchase.purchaseToken;
value7 = Reflect.apply(v3, value6, [purchaseToken]);
if (property2 != null) {
binding = env2_1;
value9 = binding(env2_2[15]);
dispatch = value9.dispatch;
object = {type: 'GIFT_PROMOTION_GIFT_OPTIONS_CACHE_ACTION', key: value7};
object2 = {};
copyDataProperties(object2, property2, undefined);
object.giftOptions = object2;
Reflect.apply(dispatch, value9, [object]);
r9 = property2;
} else {
binding = env2_4;
getGiftOptionsForKey = binding.getGiftOptionsForKey;
value8 = Reflect.apply(getGiftOptionsForKey, binding, [value7]);
r9 = value8;
}
reducibleJoin8: while (true) {
reduciblePort320: while (true) {
exceptionLanding264: while (true) {
try {
try {
binding = env2_1;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
break reducibleJoin8;
}
try {
binding = env2_0;
} catch (error) {
break exceptionLanding321;
}
try {
binding14 = env2_2;
} catch (error) {
break exceptionLanding321;
}
try {
property21 = binding14[21];
} catch (error) {
break exceptionLanding321;
}
try {
value59 = binding(property21);
} catch (error) {
break exceptionLanding321;
}
try {
captureBillingException = value59.captureBillingException;
} catch (error) {
break exceptionLanding321;
}
try {
object = {};
} catch (error) {
break exceptionLanding321;
}
try {
object5 = {};
} catch (error) {
break exceptionLanding321;
}
try {
productId = purchase.productId;
} catch (error) {
break exceptionLanding321;
}
try {
object5.productId = productId;
} catch (error) {
break exceptionLanding321;
}
try {
object.tags = object5;
} catch (error) {
break exceptionLanding321;
}
try {
Reflect.apply(captureBillingException, value59, [error, object]);
} catch (error) {
break exceptionLanding321;
}
try {
binding = env2_18;
} catch (error) {
break exceptionLanding321;
}
try {
error3 = binding.error;
} catch (error) {
break exceptionLanding321;
}
try {
productId = purchase.productId;
} catch (error) {
break exceptionLanding321;
}
try {
message = error.message;
} catch (error) {
break exceptionLanding321;
}
try {
HermesInternal = global.HermesInternal;
} catch (error) {
break exceptionLanding321;
}
try {
concat = HermesInternal.concat;
} catch (error) {
break exceptionLanding321;
}
try {
value60 = '[handlePurchaseUpdated] Error verifying purchase ' + productId + ': ' + message;
} catch (error) {
break exceptionLanding321;
}
try {
Reflect.apply(error3, binding, [value60]);
} catch (error) {
break exceptionLanding321;
}
try {
binding = env2_1;
} catch (error) {
break exceptionLanding321;
}
try {
property22 = binding14[15];
} catch (error) {
break exceptionLanding321;
}
try {
value61 = binding(property22);
} catch (error) {
break exceptionLanding321;
}
try {
dispatch = value61.dispatch;
} catch (error) {
break exceptionLanding321;
}
try {
object = {};
} catch (error) {
break exceptionLanding321;
}
try {
object.type = 'GPLAY_PURCHASE_VERIFICATION_FAILED';
} catch (error) {
break exceptionLanding321;
}
try {
productId = purchase.productId;
} catch (error) {
break exceptionLanding321;
}
try {
object.productId = productId;
} catch (error) {
break exceptionLanding321;
}
try {
Reflect.apply(dispatch, value61, [object]);
} catch (error) {
break exceptionLanding321;
}
try {
property23 = binding14[23];
} catch (error) {
break exceptionLanding321;
}
try {
value62 = binding(property23);
} catch (error) {
break exceptionLanding321;
}
try {
track = value62.track;
} catch (error) {
break exceptionLanding321;
}
try {
binding = env2_13;
} catch (error) {
break exceptionLanding321;
}
try {
GPLAY_PURCHASE_FAILED = binding.GPLAY_PURCHASE_FAILED;
} catch (error) {
break exceptionLanding321;
}
try {
object = {};
} catch (error) {
break exceptionLanding321;
}
try {
copyDataProperties(object, property, undefined);
} catch (error) {
break exceptionLanding321;
}
try {
object['location'] = 'handlePurchaseUpdated';
} catch (error) {
break exceptionLanding321;
}
try {
productId = purchase.productId;
} catch (error) {
break exceptionLanding321;
}
try {
object['product_id'] = productId;
} catch (error) {
break exceptionLanding321;
}
try {
purchaseToken = purchase.purchaseToken;
} catch (error) {
break exceptionLanding321;
}
try {
object['purchase_token'] = purchaseToken;
} catch (error) {
break exceptionLanding321;
}
try {
message = error.message;
} catch (error) {
break exceptionLanding321;
}
try {
object['error'] = message;
} catch (error) {
break exceptionLanding321;
}
try {
Reflect.apply(track, value62, [GPLAY_PURCHASE_FAILED, object]);
} catch (error) {
break exceptionLanding321;
}
break reduciblePort320;
}
binding = env2_1;
value63 = binding(env2_2[15]);
dispatch = value63.dispatch;
productId = purchase.productId;
Reflect.apply(dispatch, value63, [{type: 'GPLAY_VERIFICATION_END', productId: productId}]);
return value;
}
try {
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
property3 = binding2[15];
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
value10 = binding(property3);
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
dispatch = value10.dispatch;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
object = {};
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
object.type = 'GPLAY_VERIFICATION_START';
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
productId = purchase.productId;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
object.productId = productId;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
Reflect.apply(dispatch, value10, [object]);
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
property4 = binding2[18];
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
value11 = binding(property4);
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
SubscriptionProductIds = value11.SubscriptionProductIds;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
includes = SubscriptionProductIds.includes;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
productId = purchase.productId;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
value12 = Reflect.apply(includes, SubscriptionProductIds, [productId]);
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
reducibleJoin144: while (true) {
reduciblePort143: while (true) {
exceptionLanding116: while (true) {
if (value12) {
break reduciblePort143;
}
try {
try {
try {
binding = env2_1;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
binding3 = env2_2;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
property5 = binding3[19];
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
value13 = binding(property5);
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
value14 = value13();
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
subtract = value14.subtract;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
property6 = binding3[20];
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
value15 = binding(property6);
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
DRAFT_ORDER_LOOKBACK_DAYS = value15.DRAFT_ORDER_LOOKBACK_DAYS;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
value16 = Reflect.apply(subtract, value14, [DRAFT_ORDER_LOOKBACK_DAYS, 'days']);
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
toISOString = value16.toISOString;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
value17 = Reflect.apply(toISOString, value16, []);
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
property7 = binding3[18];
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
value18 = binding(property7);
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
getPlanIdForGift = value18.getPlanIdForGift;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
productId = purchase.productId;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
value19 = Reflect.apply(getPlanIdForGift, value18, [productId]);
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
value20 = value19 != null;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
reducibleJoin61: while (true) {
if (value20) {
try {
try {
try {
binding = env2_16;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
property8 = binding[value19];
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
value21 = property8 == null;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
reducibleJoin60: while (true) {
if (value21) {
skuId = value;
break reducibleJoin60;
}
try {
try {
try {
skuId = property8.skuId;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
break reducibleJoin60;
}
r18 = skuId;
break reducibleJoin61;
}
r18 = value;
break reducibleJoin61;
}
try {
try {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
binding4 = env2_2;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
property9 = binding4[20];
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
value22 = binding(property9);
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
getOrders = value22.getOrders;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
object = {};
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
binding = env2_15;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
DRAFT = binding.DRAFT;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
object.status = DRAFT;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
object.createdAfter = value17;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
object.skuId = r18;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
value23 = Reflect.apply(getOrders, value22, [object]);
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
await value23;
try {
try {
try {
value24 = undefined;
value25 = false;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
if (value25) {
value = env2_1(env2_2[15]);
value.dispatch({type: 'GPLAY_VERIFICATION_END', productId: purchase.productId});
return value24;
}
try {
try {
try {
length = value24.length;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
value26 = length > 0;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
if (value26) {
try {
try {
try {
property10 = value24[0];
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
id = property10.id;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
binding = env2_18;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
info = binding.info;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
object = {};
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
object.orderId = id;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
productId = purchase.productId;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
object.productId = productId;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
object.skuId = r18;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
Reflect.apply(info, binding,
['[handlePurchaseUpdated] Signing order from backend query',
object]);
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
binding5 = env2_2;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
property11 = binding5[20];
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
value27 = binding(property11);
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
markOrderAsSigningInProgress = value27.markOrderAsSigningInProgress;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
value28 = Reflect.apply(markOrderAsSigningInProgress, value27, [id]);
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
await value28;
try {
try {
try {
value29 = undefined;
value30 = false;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
reducibleJoin113: while (true) {
if (value30) {
value = env2_1(env2_2[15]);
value.dispatch({type: 'GPLAY_VERIFICATION_END', productId: purchase.productId});
return value29;
}
break reducibleJoin113;
}
} else {
try {
try {
try {
binding = env2_18;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
warn = binding.warn;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
object = {};
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
productId = purchase.productId;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
object.productId = productId;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
object.skuId = r18;
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
try {
Reflect.apply(warn, binding,
['[handlePurchaseUpdated] No draft order found for signing',
object]);
} catch (error) {
break exceptionLanding116;
}
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
}
break reduciblePort143;
}
try {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
binding6 = env2_2;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
property12 = binding6[21];
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
value31 = binding(property12);
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
captureBillingException = value31.captureBillingException;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
object = {};
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
object3 = {};
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
object3.source = 'GPlayManager_handlePurchaseUpdated_sign';
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
object.tags = object3;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
object4 = {};
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
productId = purchase.productId;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
object4.productId = productId;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
object.extra = object4;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
Reflect.apply(captureBillingException, value31, [error, object]);
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
binding = env2_18;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
error2 = binding.error;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
message = error.message;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
HermesInternal = global.HermesInternal;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
concat = HermesInternal.concat;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
value32 = '[handlePurchaseUpdated] Failed to find or sign order: ' + message;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
Reflect.apply(error2, binding, [value32]);
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
break reduciblePort143;
}
try {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
break reducibleJoin144;
}
try {
try {
binding7 = env2_2;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
property13 = binding7[16];
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
value33 = binding(property13);
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
verifyPurchase = value33.verifyPurchase;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
value34 = Reflect.apply(verifyPurchase, value33, [purchase, r9]);
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
await value34;
try {
try {
value35 = undefined;
value36 = false;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
if (value36) {
value = env2_1(env2_2[15]);
value.dispatch({type: 'GPLAY_VERIFICATION_END', productId: purchase.productId});
return value35;
}
try {
try {
value37 = value35 != null;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
reducibleJoin158: while (true) {
if (value37) {
try {
try {
value38 = r9 != null;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
r5 = value38;
break reducibleJoin158;
}
r5 = value37;
break reducibleJoin158;
}
reducibleJoin173: while (true) {
if (r5) {
try {
try {
binding = env2_1;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
binding8 = env2_2;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
property14 = binding8[15];
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
value39 = binding(property14);
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
dispatch = value39.dispatch;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
object = {};
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
object.type = 'GIFT_PROMOTION_GIFT_OPTIONS_CLEAR_CACHE_ACTION';
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
object.key = value7;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
Reflect.apply(dispatch, value39, [object]);
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
binding = env2_21;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
productId = purchase.productId;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
delete binding[productId];
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
break reducibleJoin173;
}
break reducibleJoin173;
}
try {
try {
value40 = value35 == null;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
reducibleJoin187: while (true) {
if (value40) {
break reducibleJoin187;
}
try {
try {
binding = env2_1;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
binding9 = env2_2;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
property15 = binding9[15];
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
value41 = binding(property15);
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
dispatch = value41.dispatch;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
object = {};
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
object.type = 'GPLAY_PURCHASE_VERIFIED';
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
productId = purchase.productId;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
object.productId = productId;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
Reflect.apply(dispatch, value41, [object]);
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
break reducibleJoin187;
}
try {
try {
value42 = value35 == null;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
reducibleJoin322: while (true) {
reducibleJoin223: while (true) {
if (value42) {
try {
try {
value47 = value35 == null;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
if (!value47) {
try {
try {
pendingDowngrade = value35.pendingDowngrade;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
value48 = pendingDowngrade != null;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
reducibleJoin221: while (true) {
if (value48) {
try {
try {
binding = env2_1;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
binding13 = env2_2;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
property19 = binding13[15];
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
value55 = binding(property19);
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
dispatch = value55.dispatch;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
object = {};
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
object.type = 'GPLAY_UPDATE_PENDING_DOWNGRADE';
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
pendingDowngrade = value35.pendingDowngrade;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
object.pendingDowngrade = pendingDowngrade;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
Reflect.apply(dispatch, value55, [object]);
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
property20 = binding13[22];
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
value56 = binding(property20);
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
fetchSubscriptions = value56.fetchSubscriptions;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
subscriptions2 = Reflect.apply(fetchSubscriptions, value56, []);
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
await subscriptions2;
try {
try {
value57 = undefined;
value58 = false;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
if (value58) {
value = env2_1(env2_2[15]);
value.dispatch({type: 'GPLAY_VERIFICATION_END', productId: purchase.productId});
return value57;
}
binding = env2_1;
value63 = binding(env2_2[15]);
dispatch = value63.dispatch;
productId = purchase.productId;
Reflect.apply(dispatch, value63, [{type: 'GPLAY_VERIFICATION_END',
productId: productId}]);
break reducibleJoin322;
}
break reducibleJoin221;
}
}
try {
try {
isActive = purchase.isActive;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
break reducibleJoin223;
}
try {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
binding10 = env2_2;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
property16 = binding10[18];
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
value43 = binding(property16);
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
SubscriptionProductIds = value43.SubscriptionProductIds;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
includes = SubscriptionProductIds.includes;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
productId = purchase.productId;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
value44 = Reflect.apply(includes, SubscriptionProductIds, [productId]);
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
if (value44) {
try {
try {
value47 = value35 == null;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
reducibleJoin261: while (true) {
reducibleJoin223: while (true) {
if (value47) {
try {
try {
isActive = purchase.isActive;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
break reducibleJoin223;
}
try {
try {
pendingDowngrade = value35.pendingDowngrade;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
value48 = pendingDowngrade != null;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
if (value48) {
try {
try {
binding = env2_1;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
binding13 = env2_2;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
property19 = binding13[15];
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
value55 = binding(property19);
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
dispatch = value55.dispatch;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
object = {};
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
object.type = 'GPLAY_UPDATE_PENDING_DOWNGRADE';
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
pendingDowngrade = value35.pendingDowngrade;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
object.pendingDowngrade = pendingDowngrade;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
Reflect.apply(dispatch, value55, [object]);
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
property20 = binding13[22];
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
value56 = binding(property20);
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
fetchSubscriptions = value56.fetchSubscriptions;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
subscriptions2 = Reflect.apply(fetchSubscriptions, value56, []);
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
await subscriptions2;
try {
try {
value57 = undefined;
value58 = false;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
if (value58) {
value = env2_1(env2_2[15]);
value.dispatch({type: 'GPLAY_VERIFICATION_END', productId: purchase.productId});
return value57;
}
break reducibleJoin261;
}
try {
try {
isActive = purchase.isActive;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
break reducibleJoin223;
}
if (isActive) {
try {
try {
binding = env2_34;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
value52 = binding();
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
await value52;
try {
try {
value53 = undefined;
value54 = false;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
if (value54) {
value = env2_1(env2_2[15]);
value.dispatch({type: 'GPLAY_VERIFICATION_END', productId: purchase.productId});
return value53;
}
break reducibleJoin261;
}
try {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
binding12 = env2_2;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
property18 = binding12[22];
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
value49 = binding(property18);
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
fetchSubscriptions = value49.fetchSubscriptions;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
subscriptions = Reflect.apply(fetchSubscriptions, value49, []);
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
await subscriptions;
try {
try {
value50 = undefined;
value51 = false;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
if (value51) {
value = env2_1(env2_2[15]);
value.dispatch({type: 'GPLAY_VERIFICATION_END', productId: purchase.productId});
return value50;
}
break reducibleJoin261;
}
} else {
try {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
binding11 = env2_2;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
property17 = binding11[16];
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
value45 = binding(property17);
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
sendPaymentCompleteAnalytics = value45.sendPaymentCompleteAnalytics;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
Reflect.apply(sendPaymentCompleteAnalytics, value45, [purchase]);
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
binding = env2_18;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
info = binding.info;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
productId = purchase.productId;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
HermesInternal = global.HermesInternal;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
concat = HermesInternal.concat;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
value46 = '[handlePurchaseUpdated] One Time Purchase verified and consumed: ' + productId;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
Reflect.apply(info, binding, [value46]);
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
}
binding = env2_1;
value63 = binding(env2_2[15]);
dispatch = value63.dispatch;
productId = purchase.productId;
Reflect.apply(dispatch, value63, [{type: 'GPLAY_VERIFICATION_END', productId: productId}]);
break reducibleJoin322;
}
if (isActive) {
try {
try {
binding = env2_34;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
value52 = binding();
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
await value52;
try {
try {
value53 = undefined;
value54 = false;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
reducibleJoin261: while (true) {
if (value54) {
value = env2_1(env2_2[15]);
value.dispatch({type: 'GPLAY_VERIFICATION_END', productId: purchase.productId});
return value53;
}
break reducibleJoin261;
}
} else {
try {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
binding12 = env2_2;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
property18 = binding12[22];
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
value49 = binding(property18);
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
fetchSubscriptions = value49.fetchSubscriptions;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
try {
try {
subscriptions = Reflect.apply(fetchSubscriptions, value49, []);
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
await subscriptions;
try {
try {
value50 = undefined;
value51 = false;
} catch (error) {
break exceptionLanding264;
}
} catch (error) {
break exceptionLanding321;
}
reducibleJoin261: while (true) {
if (value51) {
value = env2_1(env2_2[15]);
value.dispatch({type: 'GPLAY_VERIFICATION_END', productId: purchase.productId});
return value50;
}
break reducibleJoin261;
}
}
binding = env2_1;
value63 = binding(env2_2[15]);
dispatch = value63.dispatch;
productId = purchase.productId;
Reflect.apply(dispatch, value63, [{type: 'GPLAY_VERIFICATION_END', productId: productId}]);
break reducibleJoin322;
}
}
return value;
}
env2_1(env2_2[15]).dispatch({type: 'GPLAY_VERIFICATION_END', productId: purchase.productId});
throw error;
}
}
function _handleDowngradeCommand() { // fn#58868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7475:3583, offset: 0x016d923c, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun58870).apply(this, arguments);
async function _fun58870({downgradeCommand}) { // fn#58870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7475:3652, offset: 0x016d927e, size: 159 bytes, params: 2, frame: 16
var environment;
if (false) {
return undefined;
}
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const EXECUTE = env2_12.EXECUTE;
if (EXECUTE === downgradeCommand) {
await executePendingDowngrade();
return undefined;
}
const CLEAR = env2_12.CLEAR;
if (CLEAR === downgradeCommand) {
env2_33();
return undefined;
}
const Error = global.Error;
value = 'Invalid downgrade state ' + downgradeCommand;
const value4 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error(value);
throw error instanceof Object ? error : value4;
function executePendingDowngrade() { // fn#58871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7475:3715, offset: 0x016d931d, size: 30 bytes, params: 1, frame: 13
return env3_32.apply(this, arguments);
}
}
}
function _executePendingDowngrade() { // fn#58872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7475:3962, offset: 0x016d933b, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun58874).apply(this, arguments);
function* _fun58874() { // fn#58874, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7475:4033, offset: 0x016d9374, size: 613 bytes, params: 1, frame: 25
var newSubscriptionSkuId;
var purchaseToken;
var value;
var value2;
var value3;
var binding;
var getPendingDowngrade;
var value4;
var binding2;
var property;
var value5;
var dispatch;
var object;
var value6;
var downgradeSubscription;
var value7;
var value8;
var value9;
var value10;
var value11;
var value12;
var error;
var binding3;
var value13;
var captureBillingException;
var binding4;
var value14;
var show;
var value15;
var intl;
var string;
var value16;
var t;
var value17;
var value18;
var value19;
var LFFx5G;
var value20;
var value21;
var track;
var GPLAY_PURCHASE_FAILED;
var value22;
var value23;
var message;
var value24;
exceptionLanding92: while (true) {
value = undefined;
value2 = false;
if (value2) {
return value;
}
value = undefined;
value3 = environment.__proto__.__proto__;
binding = env2_9;
getPendingDowngrade = binding.getPendingDowngrade;
value4 = Reflect.apply(getPendingDowngrade, binding, []);
if (value4 != null) {
reducibleJoin3: while (true) {
reduciblePort90: while (true) {
exceptionLanding30: while (true) {
try {
try {
binding = env2_1;
} catch (error) {
break exceptionLanding30;
}
} catch (error) {
break exceptionLanding92;
}
break reducibleJoin3;
}
try {
binding = env2_0;
} catch (error) {
break exceptionLanding92;
}
try {
binding3 = env2_2;
} catch (error) {
break exceptionLanding92;
}
try {
property = binding3[21];
} catch (error) {
break exceptionLanding92;
}
try {
value13 = binding(property);
} catch (error) {
break exceptionLanding92;
}
try {
captureBillingException = value13.captureBillingException;
} catch (error) {
break exceptionLanding92;
}
try {
Reflect.apply(captureBillingException, value13, [error]);
} catch (error) {
break exceptionLanding92;
}
try {
binding4 = env2_1;
} catch (error) {
break exceptionLanding92;
}
try {
property = binding3[24];
} catch (error) {
break exceptionLanding92;
}
try {
value14 = binding4(property);
} catch (error) {
break exceptionLanding92;
}
try {
show = value14.show;
} catch (error) {
break exceptionLanding92;
}
try {
object = {};
} catch (error) {
break exceptionLanding92;
}
try {
property = binding3[25];
} catch (error) {
break exceptionLanding92;
}
try {
value15 = binding(property);
} catch (error) {
break exceptionLanding92;
}
try {
intl = value15.intl;
} catch (error) {
break exceptionLanding92;
}
try {
string = intl.string;
} catch (error) {
break exceptionLanding92;
}
try {
property = binding3[25];
} catch (error) {
break exceptionLanding92;
}
try {
value16 = binding(property);
} catch (error) {
break exceptionLanding92;
}
try {
t = value16.t;
} catch (error) {
break exceptionLanding92;
}
try {
property = t['U+H+kd'];
} catch (error) {
break exceptionLanding92;
}
try {
value17 = Reflect.apply(string, intl, [property]);
} catch (error) {
break exceptionLanding92;
}
try {
object.title = value17;
} catch (error) {
break exceptionLanding92;
}
try {
property = binding3[25];
} catch (error) {
break exceptionLanding92;
}
try {
value18 = binding(property);
} catch (error) {
break exceptionLanding92;
}
try {
intl = value18.intl;
} catch (error) {
break exceptionLanding92;
}
try {
string = intl.string;
} catch (error) {
break exceptionLanding92;
}
try {
property = binding3[25];
} catch (error) {
break exceptionLanding92;
}
try {
value19 = binding(property);
} catch (error) {
break exceptionLanding92;
}
try {
t = value19.t;
} catch (error) {
break exceptionLanding92;
}
try {
LFFx5G = t.LFFx5G;
} catch (error) {
break exceptionLanding92;
}
try {
value20 = Reflect.apply(string, intl, [LFFx5G]);
} catch (error) {
break exceptionLanding92;
}
try {
object.body = value20;
} catch (error) {
break exceptionLanding92;
}
try {
Reflect.apply(show, value14, [object]);
} catch (error) {
break exceptionLanding92;
}
try {
property = binding3[23];
} catch (error) {
break exceptionLanding92;
}
try {
value21 = binding4(property);
} catch (error) {
break exceptionLanding92;
}
try {
track = value21.track;
} catch (error) {
break exceptionLanding92;
}
try {
binding = env2_13;
} catch (error) {
break exceptionLanding92;
}
try {
GPLAY_PURCHASE_FAILED = binding.GPLAY_PURCHASE_FAILED;
} catch (error) {
break exceptionLanding92;
}
try {
object = {};
} catch (error) {
break exceptionLanding92;
}
try {
object.location = 'executePendingDowngrade';
} catch (error) {
break exceptionLanding92;
}
try {
value22 = value4 == null;
} catch (error) {
break exceptionLanding92;
}
reducibleJoin81: while (true) {
if (value22) {
newSubscriptionSkuId = value;
break reducibleJoin81;
}
try {
newSubscriptionSkuId = value4.newSubscriptionSkuId;
} catch (error) {
break exceptionLanding92;
}
break reducibleJoin81;
}
try {
object.product_id = newSubscriptionSkuId;
} catch (error) {
break exceptionLanding92;
}
try {
value23 = value4 == null;
} catch (error) {
break exceptionLanding92;
}
reducibleJoin86: while (true) {
if (value23) {
purchaseToken = value;
break reducibleJoin86;
}
try {
purchaseToken = value4.purchaseToken;
} catch (error) {
break exceptionLanding92;
}
break reducibleJoin86;
}
try {
object.purchase_token = purchaseToken;
} catch (error) {
break exceptionLanding92;
}
try {
message = error.message;
} catch (error) {
break exceptionLanding92;
}
try {
object.error = message;
} catch (error) {
break exceptionLanding92;
}
try {
Reflect.apply(track, value21, [GPLAY_PURCHASE_FAILED, object]);
} catch (error) {
break exceptionLanding92;
}
break reduciblePort90;
}
binding = env2_1;
value24 = binding(env2_2[15]);
dispatch = value24.dispatch;
Reflect.apply(dispatch, value24, [{'type': 'GPLAY_UPDATE_IS_DOWNGRADING', 'isDowngrading': false}]);
return value;
}
try {
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding30;
}
} catch (error) {
break exceptionLanding92;
}
try {
try {
property = binding2[15];
} catch (error) {
break exceptionLanding30;
}
} catch (error) {
break exceptionLanding92;
}
try {
try {
value5 = binding(property);
} catch (error) {
break exceptionLanding30;
}
} catch (error) {
break exceptionLanding92;
}
try {
try {
dispatch = value5.dispatch;
} catch (error) {
break exceptionLanding30;
}
} catch (error) {
break exceptionLanding92;
}
try {
try {
object = {'type': 'GPLAY_UPDATE_IS_DOWNGRADING', 'isDowngrading': true};
} catch (error) {
break exceptionLanding30;
}
} catch (error) {
break exceptionLanding92;
}
try {
try {
Reflect.apply(dispatch, value5, [object]);
} catch (error) {
break exceptionLanding30;
}
} catch (error) {
break exceptionLanding92;
}
try {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding30;
}
} catch (error) {
break exceptionLanding92;
}
try {
try {
property = binding2[16];
} catch (error) {
break exceptionLanding30;
}
} catch (error) {
break exceptionLanding92;
}
try {
try {
value6 = binding(property);
} catch (error) {
break exceptionLanding30;
}
} catch (error) {
break exceptionLanding92;
}
try {
try {
downgradeSubscription = value6.downgradeSubscription;
} catch (error) {
break exceptionLanding30;
}
} catch (error) {
break exceptionLanding92;
}
try {
try {
value7 = Reflect.apply(downgradeSubscription, value6, [value4]);
} catch (error) {
break exceptionLanding30;
}
} catch (error) {
break exceptionLanding92;
}
yield value7;
try {
try {
value8 = undefined;
value9 = false;
} catch (error) {
break exceptionLanding30;
}
} catch (error) {
break exceptionLanding92;
}
if (value9) {
value = env2_1(env2_2[15]);
value.dispatch({'type': 'GPLAY_UPDATE_IS_DOWNGRADING', 'isDowngrading': false});
return value8;
}
try {
try {
binding = env2_33;
} catch (error) {
break exceptionLanding30;
}
} catch (error) {
break exceptionLanding92;
}
try {
try {
binding();
} catch (error) {
break exceptionLanding30;
}
} catch (error) {
break exceptionLanding92;
}
try {
try {
binding = env2_34;
} catch (error) {
break exceptionLanding30;
}
} catch (error) {
break exceptionLanding92;
}
try {
try {
value10 = binding();
} catch (error) {
break exceptionLanding30;
}
} catch (error) {
break exceptionLanding92;
}
yield value10;
try {
try {
value11 = undefined;
value12 = false;
} catch (error) {
break exceptionLanding30;
}
} catch (error) {
break exceptionLanding92;
}
if (value12) {
value = env2_1(env2_2[15]);
value.dispatch({'type': 'GPLAY_UPDATE_IS_DOWNGRADING', 'isDowngrading': false});
return value11;
}
binding = env2_1;
value24 = binding(env2_2[15]);
dispatch = value24.dispatch;
Reflect.apply(dispatch, value24, [{'type': 'GPLAY_UPDATE_IS_DOWNGRADING', 'isDowngrading': false}]);
}
return value;
}
env2_1(env2_2[15]).dispatch({'type': 'GPLAY_UPDATE_IS_DOWNGRADING', 'isDowngrading': false});
throw error;
}
}
function clearPendingDowngrade() { // fn#58875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7475:4719, offset: 0x016d95d9, size: 51 bytes, params: 1, frame: 12
(Dispatcher).dispatch({'type': 'GPLAY_UPDATE_PENDING_DOWNGRADE',
'pendingDowngrade': null});
}
function _fetchAndAlertActiveSubscription() { // fn#58877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7475:4938, offset: 0x016d960c, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun58879).apply(this, arguments);
function* _fun58879() { // fn#58879, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7475:5025, offset: 0x016d9645, size: 204 bytes, params: 1, frame: 17
var environment;
var Error;
var binding2;
var intl;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_0;
var value3 = binding(env2_2[22]);
yield value3.fetchSubscriptions();
if (false) {
return undefined;
}
if (env2_8.getPremiumTypeSubscription() == null) {
Error = global.Error;
binding = env2_0;
binding2 = env2_2;
intl = binding(binding2[25]).intl;
throw new Error(intl.string(binding(binding2[25]).t.PjfUXe));
}
env2_5();
env2_6(_fun58880);
}
function _fun58880() { // fn#58880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7475:5185, offset: 0x016d9711, size: 52 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__.__proto__.__proto__;
value = env3_1(env3_2[24]);
value.openLazy({importer: importer_58881});
function importer_58881() { // fn#58881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7475:5218, offset: 0x016d9745, size: 62 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__.__proto__.__proto__.__proto__;
const binding = env4_0;
const binding2 = env4_2;
value = binding(binding2[27]);
value = value(binding2[26], binding2.paths);
return value.then(function({default: env0_0}) {
return _fun58883;
});
function _fun58882({default: env0_0}) { // fn#58882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7475:5252, offset: 0x016d9783, size: 21 bytes, params: 2, frame: 2
return _fun58883;
function _fun58883(a0) { // fn#58883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7475:5267, offset: 0x016d9798, size: 75 bytes, params: 2, frame: 15
const env0_0 = a0;
const binding = env6_17;
const binding2 = env0_0;
const object = {};
copyDataProperties(object, a0, undefined);
object['subscription'] = env3_0;
object['onClose'] = onClose_58884;
return binding(binding2, object);
function onClose_58884() { // fn#58884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7475:5303, offset: 0x016d97e3, size: 77 bytes, params: 1, frame: 14
let binding = env0_0;
binding.onClose();
binding = env7_1;
const binding2 = env7_2;
const value2 = binding(binding2[28]);
const popWithKey = value2.popWithKey;
const PREMIUM_KEY = env7_0(binding2[29]).PREMIUM_KEY;
Reflect.apply(popWithKey, value2, [PREMIUM_KEY]);
}
}
}
}
}
}
}
function _handleAppStateUpdated() { // fn#58886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7475:5483, offset: 0x016d9830, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun58888).apply(this, arguments);
async function _fun58888({state}) { // fn#58888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7475:5550, offset: 0x016d9872, size: 137 bytes, params: 2, frame: 14
var binding;
var isReady;
var isAuthenticated;
var ACTIVE;
var loadPurchases;
var purchases;
var value4;
var value5;
var error;
var open;
if (true) {
await undefined;
if (false) {
return undefined;
}
reduciblePort14: while (true) {
exceptionLanding13: while (true) {
value = environment.__proto__.__proto__;
binding = env2_9;
isReady = binding.isReady;
if (Reflect.apply(isReady, binding, [])) {
binding = env2_7;
isAuthenticated = binding.isAuthenticated;
if (Reflect.apply(isAuthenticated, binding, [])) {
ACTIVE = env2_14.ACTIVE;
if (state !== ACTIVE) {
break reduciblePort14;
}
try {
binding = env2_19;
} catch (error) {
break exceptionLanding13;
}
try {
loadPurchases = binding.loadPurchases;
} catch (error) {
break exceptionLanding13;
}
try {
purchases = Reflect.apply(loadPurchases, binding, []);
} catch (error) {
break exceptionLanding13;
}
await purchases;
try {
value4 = undefined;
value5 = false;
} catch (error) {
break exceptionLanding13;
}
if (value5) {
return value4;
}
break reduciblePort14;
}
break reduciblePort14;
}
break reduciblePort14;
}
binding = env2_19;
open = binding.open;
Reflect.apply(open, binding, []);
break reduciblePort14;
}
}
}
}
function initialize_58889() { // fn#58889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7475:5724, offset: 0x016d98fb, size: 169 bytes, params: 1, frame: 14
BillingManager.open();
const binding = env0_20;
env0_22 = binding.addListener('billing-manager-connection-state-updated', handleConnectionStateUpdated);
env0_23 = binding.addListener('billing-manager-purchase-state-updated', handlePurchaseStateUpdated);
env0_24 = binding.addListener('billing-manager-purchase-updated', handlePurchaseUpdated);
env0_25 = binding.addListener('billing-manager-downgrade-command', handleDowngradeCommand);
const defaultImport = Dispatcher;
defaultImport.subscribe('APP_STATE_UPDATE', handleAppStateUpdated);
}
function terminate() { // fn#58890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7475:6132, offset: 0x016d99a4, size: 135 bytes, params: 1, frame: 14
BillingManager.close();
let binding = env0_22;
if (binding != null) {
binding.remove();
}
binding = env0_23;
if (binding != null) {
binding.remove();
}
binding = env0_24;
if (binding != null) {
binding.remove();
}
binding = env0_25;
if (binding != null) {
binding.remove();
}
const defaultImport = Dispatcher;
defaultImport.unsubscribe('APP_STATE_UPDATE', handleAppStateUpdated);
}
}
global.__d(_fun58859, 7297, [5, 31, 27, 7038, 7039, 1226, 3808, 5140, 7255, 5141, 661, 4095, 1880, 33, 3, 694, 7298,
1225, 5143, 3738, 7299, 3817, 4223, 683, 4496, 1244, 7301, 1962, 5080, 7028,
2]) /* metro module 7297, dependencies: [5, 31, 27, 7038, 7039, 1226, 3808, 5140, 7255, 5141, 661, 4095, 1880, 33, 3, 694, 7298, 1225, 5143, 3738, 7299, 3817, 4223, 683, 4496, 1244, 7301, 1962, 5080, 7028, 2] */;