Files
discord-decomp/sources/stores/billing/BillingInfoStore.tsx
T
2026-07-27 16:20:00 +03:00

166 lines
7.6 KiB
TypeScript

/* Metro module 3804; source: stores/billing/BillingInfoStore.tsx; dependencies: [6, 7, 15, 17, 18, 661, 566, 694, 2] */
function _fun29212(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#29212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3931:6, offset: 0x00fbd40f, size: 639 bytes, params: 8, frame: 24
const closure = function() {
env0_11 = false;
};
const closure2 = function() {
env0_6 = undefined;
};
const closure3 = function() {
env0_14 = false;
};
const closure4 = function() {
env0_15 = true;
};
const closure5 = function() {
env0_15 = false;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).FallbackCurrencyCountry;
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
let value = _fun29221(Store);
value.displayName = 'BillingInfoStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{BILLING_PAYMENT_SOURCE_CREATE_START: function() {
env0_11 = true;
}, BILLING_PAYMENT_SOURCE_CREATE_SUCCESS: closure, BILLING_PAYMENT_SOURCE_CREATE_FAIL: closure,
STRIPE_TOKEN_FAILURE: closure, BILLING_PAYMENT_SOURCE_REMOVE_START: function() {
env0_13 = true;
}, BILLING_PAYMENT_SOURCE_REMOVE_SUCCESS: function() {
env0_13 = false;
}, BILLING_PAYMENT_SOURCE_REMOVE_FAIL: function({error}) {
env0_13 = false;
env0_17 = error;
}, BILLING_PAYMENT_SOURCE_REMOVE_CLEAR_ERROR: function() {
env0_17 = null;
}, BILLING_PAYMENT_SOURCE_UPDATE_START: function() {
env0_12 = true;
}, BILLING_PAYMENT_SOURCE_UPDATE_SUCCESS: function() {
env0_12 = false;
}, BILLING_PAYMENT_SOURCE_UPDATE_FAIL: function({error}) {
env0_12 = false;
env0_16 = error;
}, BILLING_PAYMENT_SOURCE_UPDATE_CLEAR_ERROR: function() {
env0_16 = null;
}, BILLING_PAYMENT_SOURCES_FETCH_START: function(a0) {
env0_6 = a0.request;
}, BILLING_PAYMENT_SOURCES_FETCH_SUCCESS: closure2, BILLING_PAYMENT_SOURCES_FETCH_FAIL: closure2,
BILLING_SUBSCRIPTION_FETCH_START: function() {
env0_14 = true;
}, BILLING_SUBSCRIPTION_FETCH_SUCCESS: closure3, BILLING_SUBSCRIPTION_FETCH_FAIL: closure3,
BILLING_SUBSCRIPTION_UPDATE_START: closure4, BILLING_SUBSCRIPTION_CANCEL_START: closure4,
BILLING_SUBSCRIPTION_UPDATE_SUCCESS: closure5, BILLING_SUBSCRIPTION_UPDATE_FAIL: closure5,
BILLING_SUBSCRIPTION_CANCEL_FAIL: closure5, BILLING_SUBSCRIPTION_CANCEL_SUCCESS: closure5,
BILLING_IP_COUNTRY_CODE_FETCH_START: function(a0) {
env0_8 = a0.request;
}, BILLING_SET_IP_COUNTRY_CODE: function(a0) {
env0_7 = a0.countryCode;
}, BILLING_IP_COUNTRY_CODE_FAILURE: function() {
env0_7 = null;
env0_18 = true;
}, BILLING_IP_LOCATION_FETCH_START: function(a0) {
env0_10 = a0.request;
}, BILLING_SET_IP_LOCATION: function(a0) {
env0_9 = a0.location;
}, BILLING_IP_LOCATION_FAILURE: function() {
env0_9 = null;
env0_19 = true;
}, LOGOUT: function() {
env0_6 = undefined;
env0_8 = undefined;
env0_7 = undefined;
env0_18 = false;
env0_9 = undefined;
env0_19 = false;
env0_10 = undefined;
env0_17 = null;
env0_16 = null;
}, CONNECTION_OPEN: CONNECTION_OPEN_29259});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/billing/BillingInfoStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_29213() { // fn#29213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3931:182, offset: 0x00fbd68e, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_29213_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun29221(a0) { // fn#29221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3931:671, offset: 0x00fbd72b, size: 479 bytes, params: 2, frame: 16
const closure = BillingInfoStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'isBusy', get: get_29223}, {key: 'isUpdatingPaymentSource', get: get_29224},
{key: 'isRemovingPaymentSource', get: get_29225}, {key: 'isSyncing', get: function() {
return this.isPaymentSourceFetching || this.isSubscriptionFetching;
}}, {key: 'isSubscriptionFetching', get: get_29227}, {key: 'isPaymentSourceFetching', get: get_29228},
{key: 'editSourceError', get: get_29229}, {key: 'removeSourceError', get: get_29230},
{key: 'ipCountryCodeLoaded', get: get_29231}, {key: 'ipCountryCode', get: get_29232},
{key: 'ipCountryCodeRequest', get: get_29233}, {key: 'ipLocationLoaded', get: get_29234}, {key: 'ipLocation',
get: get_29235}, {key: 'ipLocationRequest', get: get_29236}, {key: 'ipLocationHasError', get: get_29237},
{key: 'ipCountryCodeWithFallback', get: get_29238}, {key: 'ipCountryCodeHasError', get: get_29239},
{key: 'paymentSourcesFetchRequest', get: get_29240}]);
}
function CONNECTION_OPEN_29259({countryCode}) { // fn#29259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3931:4442, offset: 0x00fbdb53, size: 26 bytes, params: 2, frame: 2
if (countryCode == null) {
}
}
function BillingInfoStore() { // fn#29222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3931:683, offset: 0x00fbd90a, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, BillingInfoStore);
const value3 = env1_3(BillingInfoStore);
return env1_2(this, _isNativeReflectConstruct_29213() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function get_29223() { // fn#29223, offset: 0x00fbd97b, size: 30 bytes, params: 1, frame: 3
let r0 = env1_11 || env1_12;
r0 = !r0 ? env1_15 : r0;
r0 = !r0 ? env1_13 : r0;
return r0;
}
function get_29231() { // fn#29231, offset: 0x00fbd9bc, size: 15 bytes, params: 1, frame: 2
return env1_7 !== undefined;
}
function get_29234() { // fn#29234, offset: 0x00fbd9dd, size: 15 bytes, params: 1, frame: 2
return env1_9 !== undefined;
}
function get_29238() { // fn#29238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3931:1844, offset: 0x00fbd9f5, size: 25 bytes, params: 1, frame: 3
return env1_7 ?? FallbackCurrencyCountry;
}