Files
discord-decomp/sources/actions/SubscriptionPlanActionCreators.tsx
T
2026-07-27 16:20:00 +03:00

1282 lines
52 KiB
TypeScript

/* Metro module 6847; source: actions/SubscriptionPlanActionCreators.tsx; dependencies: [5, 3804, 661, 1880, 694, 4223, 507, 3817, 3825, 2] */
function _fun54023(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7025:6, offset: 0x0135ae31, size: 234 bytes, params: 8, frame: 20
let env0_0 = require;
const closure = function() {
return _fetchSubscriptionPlansForSKU.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const billingInfoStore = importDefault(3804) /* metro dependency 3804: BillingInfoStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).Endpoints;
const premiumConstantsModule = require(1880) /* metro dependency 1880: PremiumConstants */;
const env0_6 = premiumConstantsModule.ACTIVE_PREMIUM_SKUS;
const env0_7 = premiumConstantsModule.PremiumSubscriptionSKUs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('actions/SubscriptionPlanActionCreators.tsx');
exports.fetchSubscriptionPlansForSKU = closure;
exports.fetchSubscriptionPlansBySKUs = function(a0, a1) {
var env0_0 = a1;
var Promise = global.Promise;
return Promise.all(a0.filter(_fun54029).map(_fun54030));
};
exports.fetchPremiumSubscriptionPlans = fetchPremiumSubscriptionPlans;
exports.resetSubscriptionPlanData = resetSubscriptionPlanData;
}
function _fetchSubscriptionPlansForSKU() { // fn#54025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7025:299, offset: 0x0135af1b, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun54027).apply(this, arguments);
}
function fetchSubscriptionPlansBySKUs(a0, a1) { // fn#54028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7025:1312, offset: 0x0135b155, size: 63 bytes, params: 3, frame: 14
const env0_0 = a1;
const Promise = global.Promise;
const all = Promise.all;
const value = a0.filter(function(a0) {
return a0 !== PremiumSubscriptionSKUs.NONE;
});
return Reflect.apply(all, Promise, [value.map(function(a0) {
return fetchSubscriptionPlansForSKU(a0, require);
})]);
}
function fetchPremiumSubscriptionPlans(a0, a1, a2) { // fn#54031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7025:1479, offset: 0x0135b1c5, size: 81 bytes, params: 4, frame: 14
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const Promise = global.Promise;
const all = Promise.all;
const value = ACTIVE_PREMIUM_SKUS.filter(function(a0) {
return a0 !== PremiumSubscriptionSKUs.NONE;
});
return Reflect.apply(all, Promise, [value.map(_fun54033)]);
}
function resetSubscriptionPlanData() { // fn#54034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7025:1656, offset: 0x0135b239, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SUBSCRIPTION_PLANS_RESET'});
}
function* _fun54027(a0, a1, a2, a3, a4) { // fn#54027, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7025:380, offset: 0x0135af54, size: 513 bytes, params: 6, frame: 24
var object4;
var STORE_PUBLISHED_LISTINGS_SUBSCRIPTION_PLANS;
var value4;
var object3;
var value5;
var value6;
var value7;
var value8;
var ipCountryCodeLoaded;
var binding2;
var property;
var value9;
var fetchIpCountryCode;
var ipCountryCode;
var value10;
var value11;
var binding3;
var value12;
var HTTP;
var get;
var value13;
var value14;
var value15;
var binding4;
var value16;
var body;
var error;
var binding5;
var value17;
var binding6;
var prototype;
var value18;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let binding = env2_1;
binding(env2_2[4]).dispatch({type: 'SUBSCRIPTION_PLANS_FETCH', skuId: a0});
try {
object4 = {'url': null, 'oldFormErrors': true, 'rejectWithError': true, 'retries': 10};
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
binding = env2_5;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
STORE_PUBLISHED_LISTINGS_SUBSCRIPTION_PLANS = binding.STORE_PUBLISHED_LISTINGS_SUBSCRIPTION_PLANS;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
value4 = Reflect.apply(STORE_PUBLISHED_LISTINGS_SUBSCRIPTION_PLANS, binding, [a0]);
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
object4.url = value4;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
object3 = {};
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
value5 = a1 == null;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
if (!value5) {
try {
object3.country_code = a1;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
}
try {
value6 = a2 == null;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
if (!value6) {
try {
object3.payment_source_id = a2;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
}
try {
value7 = a3 == null;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
if (!value7) {
try {
object3.include_unpublished = a3;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
}
try {
value8 = a4 == null;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
if (!value8) {
try {
object3.revenue_surface = a4;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
}
try {
object4.query = object3;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
binding = env2_4;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
ipCountryCodeLoaded = binding.ipCountryCodeLoaded;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
if (ipCountryCodeLoaded) {
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
binding3 = env2_2;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
property = binding3[6];
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
value12 = binding(property);
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
HTTP = value12.HTTP;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
get = HTTP.get;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
value13 = Reflect.apply(get, HTTP, [object4]);
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
yield value13;
try {
value14 = undefined;
value15 = false;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
if (value15) {
return value14;
}
try {
binding = env2_1;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
binding4 = env2_2;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
property = binding4[4];
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
value16 = binding(property);
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
dispatch = value16.dispatch;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
object4 = {};
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
object4.type = 'SUBSCRIPTION_PLANS_FETCH_SUCCESS';
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
object4.skuId = a0;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
body = value14.body;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
object4.subscriptionPlans = body;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
Reflect.apply(dispatch, value16, [object4]);
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
body = value14.body;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
} else {
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
property = binding2[5];
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
value9 = binding(property);
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
fetchIpCountryCode = value9.fetchIpCountryCode;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
ipCountryCode = Reflect.apply(fetchIpCountryCode, value9, []);
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
yield ipCountryCode;
try {
value10 = undefined;
value11 = false;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
if (value11) {
return value10;
}
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
binding3 = env2_2;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
property = binding3[6];
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
value12 = binding(property);
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
HTTP = value12.HTTP;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
get = HTTP.get;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
value13 = Reflect.apply(get, HTTP, [object4]);
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
yield value13;
try {
value14 = undefined;
value15 = false;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
if (value15) {
return value14;
}
try {
binding = env2_1;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
binding4 = env2_2;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
property = binding4[4];
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
value16 = binding(property);
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
dispatch = value16.dispatch;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
object4 = {};
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
object4.type = 'SUBSCRIPTION_PLANS_FETCH_SUCCESS';
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
object4.skuId = a0;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
body = value14.body;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
object4.subscriptionPlans = body;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
Reflect.apply(dispatch, value16, [object4]);
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
try {
body = value14.body;
} catch (error) {
binding = env2_1;
binding5 = env2_2;
value17 = binding(binding5[4]);
value17.dispatch({type: 'SUBSCRIPTION_PLANS_FETCH_FAILURE', skuId: a0});
binding6 = env2_0;
value = binding6(binding5[7]);
value.captureBillingException(error);
value = binding(binding5[8]);
prototype = value.prototype;
value18 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value18;
value.message = 'Failed to fetch subscription plans for SKU ' + a0;
throw value;
}
}
return body;
}
function _fun54033(a0) { // fn#54033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7025:1575, offset: 0x0135b216, size: 35 bytes, params: 2, frame: 18
return fetchSubscriptionPlansForSKU(a0, env0_0, require, undefined, importDefault);
}