This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

File diff suppressed because it is too large. Load diff
@@ -1,54 +1,67 @@
/* Metro module 10109; source: modules/payments/native/NativePaymentContext.tsx; dependencies: [57, 31, 3807, 33, 7045, 7943, 6847, 10110, 566, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import SubscriptionPlanStore from '../../../stores/billing/SubscriptionPlanStore.tsx'; /* Metro dependency 3807 */
import NativePaymentHooksAndroid from './hooks/NativePaymentHooks.android.tsx'; /* Metro dependency 7943 */
import UseSubscriptionSelection from '../hooks/useSubscriptionSelection.tsx'; /* Metro dependency 10110 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
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 FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
function _fun78912(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10295:6, offset: 0x01e3baff, size: 224 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importDefault(57) /* metro dependency 57 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
const subscriptionPlanStore = importDefault(3807) /* metro dependency 3807: SubscriptionPlanStore */;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
let value = Module00057;
value = value((importDefault(7045) /* metro dependency 7045: ContextUtils */)(), 3);
const env0_6 = value[0];
const property = value[1];
const property2 = value[2];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/payments/native/NativePaymentContext.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/payments/native/NativePaymentContext.tsx');
exports.NativePaymentContextProvider = NativePaymentContextProvider;
exports.useNativeIAPPaymentContext = property;
exports.useForwardedNativePaymentContext = property2;
}
function NativePaymentContextProvider({children, skuIDs, activeSubscription}) { // fn#78913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10295:291, offset: 0x01e3bbdf, size: 261 bytes, params: 2, frame: 24
const {nativePaymentsConnected,
storeFront} = (NativePaymentHooksAndroid).useNativeIAPPayments();
ReactModule.useEffect(_fun78914, [storeFront, skuIDs]);
const {selectedPlanId,
setSelectedPlanId} = (UseSubscriptionSelection)();
const value4 = (FluxModule).useStateFromStores([SubscriptionPlanStore],
_fun78915, [selectedPlanId]);
const Provider = env0_6.Provider;
return (
<Provider
value={{
isReadyToPurchase: nativePaymentsConnected,
setSelectedPlanId: setSelectedPlanId,
selectedPlan: value4,
storeFront: storeFront,
activeSubscription: activeSubscription,
}}
>
{children}
</Provider>
);
function _fun78914() { // fn#78914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10295:466, offset: 0x01e3bce4, size: 98 bytes, params: 1, frame: 14
var value4;
var moduleValue;
if (!(storeFront == null || SubscriptionPlanStore.isFetchingForSKUs(skuIDs))) {
value4 = environment.__proto__;
moduleValue = require(6847) /* metro dependency 6847: SubscriptionPlanActionCreators */;
moduleValue.fetchSubscriptionPlansBySKUs(skuIDs, storeFront.country);
}
}
function NativePaymentContextProvider({children, skuIDs, activeSubscription}) { // fn#78913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10295:291, offset: 0x01e3bbdf, size: 261 bytes, params: 2, frame: 24
const {nativePaymentsConnected,
storeFront} = (importDefault(7943) /* metro dependency 7943: NativePaymentHooksAndroid */).useNativeIAPPayments();
env0_3.useEffect(_fun78914, [storeFront, skuIDs]);
const {selectedPlanId,
setSelectedPlanId} = (importDefault(10110) /* metro dependency 10110: useSubscriptionSelection */)();
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SubscriptionPlanStore],
_fun78915, [selectedPlanId]);
const Provider = env0_6.Provider;
return (
<Provider
value={{isReadyToPurchase: nativePaymentsConnected, setSelectedPlanId: setSelectedPlanId,
selectedPlan: value4, storeFront: storeFront, activeSubscription: activeSubscription}}
>
{children}
</Provider>
);
}
function _fun78915() { // fn#78915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10295:654, offset: 0x01e3bd46, size: 39 bytes, params: 1, frame: 12
const selectedPlanIdBinding = selectedPlanId;
const value2 = null;
return value2 != selectedPlanIdBinding ? SubscriptionPlanStore.get(selectedPlanId) : value2;
}
function _fun78914() { // fn#78914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10295:466, offset: 0x01e3bce4, size: 98 bytes, params: 1, frame: 14
var value4;
var moduleValue;
if (!(storeFront == null || SubscriptionPlanStore.isFetchingForSKUs(skuIDs))) {
value4 = environment.__proto__;
moduleValue = require(6847) /* metro dependency 6847: SubscriptionPlanActionCreators */;
moduleValue.fetchSubscriptionPlansBySKUs(skuIDs, storeFront.country);
}
}
function _fun78915() { // fn#78915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10295:654, offset: 0x01e3bd46, size: 39 bytes, params: 1, frame: 12
const selectedPlanIdBinding = selectedPlanId;
const value2 = null;
return value2 != selectedPlanIdBinding ? SubscriptionPlanStore.get(selectedPlanId) : value2;
}
global.__d(_fun78912, 10109, [57, 31, 3807, 33, 7045, 7943, 6847, 10110, 566,
2]) /* metro module 10109, dependencies: [57, 31, 3807, 33, 7045, 7943, 6847, 10110, 566, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,6 +1,12 @@
/* Metro module 7943; source: modules/payments/native/hooks/NativePaymentHooks.android.tsx; dependencies: [5, 57, 31, 5140, 3, 566, 22, 7298, 3817, 2] */
import Logger from '../../../debug/Logger.tsx'; /* Metro dependency 3 */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import IAPStoreAndroid from '../../../../stores/native/IAPStore.android.tsx'; /* Metro dependency 5140 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
function _fun63382(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8121:6, offset: 0x01b7dbb6, size: 326 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const notSupported = function() {
var Error = global.Error;
@@ -10,8 +16,8 @@ function _fun63382(global, require, importDefault, importAll, module, exports, d
var Error = global.Error;
throw new Error('Native hook not supported for android');
};
const closure = useNativeIAPPayments;
const closure2 = useGoogleSkuIds;
const useNativeIAPPayments2 = useNativeIAPPayments;
const useGoogleSkuIds2 = useGoogleSkuIds;
const closure3 = function(a0) {
var object = {};
object.resubscribeSubscription = notSupported;
@@ -37,213 +43,219 @@ function _fun63382(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const iapStoreAndroid = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
let value = importDefault(3) /* metro dependency 3: Logger */;
let value = Logger;
value = new value('NativePaymentHooks.android.tsx');
const env0_8 = {'nativePaymentsConnected': true, 'storeFront': null};
object2 = {useNativeIAPPayments: closure, useGoogleSkuIds: closure2, useCreateSubscription: closure5,
useCancelSubscription: closure4, useResubscribeSubscription: closure3};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/payments/native/hooks/NativePaymentHooks.android.tsx');
exports.default = object2;
exports.useNativeIAPPayments = closure;
exports.useGoogleSkuIds = closure2;
object = {useNativeIAPPayments: useNativeIAPPayments2, useGoogleSkuIds: useGoogleSkuIds2,
useCreateSubscription: closure5, useCancelSubscription: closure4, useResubscribeSubscription: closure3};
(FileImportTrackerModule).fileFinishedImporting('modules/payments/native/hooks/NativePaymentHooks.android.tsx');
exports.default = object;
exports.useNativeIAPPayments = useNativeIAPPayments2;
exports.useGoogleSkuIds = useGoogleSkuIds2;
exports.useResubscribeSubscription = closure3;
exports.useCancelSubscription = closure4;
exports.useCreateSubscription = closure5;
}
function useGoogleSkuIds(a0, a1) { // fn#63386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8121:447, offset: 0x01b7dd20, size: 191 bytes, params: 3, frame: 18
let env0_0 = a0;
const env0_1 = a1;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([IAPStoreAndroid], function() {
return IAPStoreAndroid.isFetchingGoogleSkus();
});
const env0_3 = env0_5.useRef([]);
const [property, env0_4] = env0_4Binding(env0_5.useState(null), 2);
env0_5.useEffect(function() {
var env0_0 = _fun63389;
_fun63392();
}, [a1, value2, a0]);
return {isFetchingGoogleSkus: value2, fetchError: property};
}
function _fun63388() { // fn#63388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8121:623, offset: 0x01b7ddf2, size: 27 bytes, params: 1, frame: 9
(function() {
return _fetch.apply(this, arguments);
})();
}
function _fetch() { // fn#63389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8121:628, offset: 0x01b7de0d, size: 51 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__.__proto__;
return env2_3(_fun63391).apply(this, arguments);
}
function* _fun63391() { // fn#63391, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8121:663, offset: 0x01b7de49, size: 318 bytes, params: 1, frame: 19
var binding;
var value3;
var value4;
var difference;
var current;
var value5;
var length;
var binding2;
var property;
var value6;
var loadInAppSkus;
var inAppSkus;
var value7;
var value8;
var binding3;
var binding4;
var value9;
var union;
var value10;
var error;
var error2;
var captureBillingException;
if (true) {
value = environment.__proto__.__proto__.__proto__;
reducibleJoin3: while (true) {
if (importDefault) {
binding = env3_3;
binding.current = [];
break reducibleJoin3;
}
break reducibleJoin3;
}
reduciblePort32: while (true) {
exceptionLanding31: while (true) {
value3 = environment.__proto__.__proto__.__proto__.__proto__;
binding = env4_1;
value4 = binding(env4_2[6]);
difference = value4.difference;
current = env3_3.current;
value5 = Reflect.apply(difference, value4, [require, current]);
if (dependencyMap) {
break reduciblePort32;
}
if (importDefault) {
break reduciblePort32;
}
length = require.length;
if (length === 0) {
break reduciblePort32;
}
length = value5.length;
if (length === 0) {
break reduciblePort32;
}
try {
binding = env4_0;
} catch (error) {
break exceptionLanding31;
}
try {
binding2 = env4_2;
} catch (error) {
break exceptionLanding31;
}
try {
property = binding2[7];
} catch (error) {
break exceptionLanding31;
}
try {
value6 = binding(property);
} catch (error) {
break exceptionLanding31;
}
try {
loadInAppSkus = value6.loadInAppSkus;
} catch (error) {
break exceptionLanding31;
}
try {
inAppSkus = Reflect.apply(loadInAppSkus, value6, [value5]);
} catch (error) {
break exceptionLanding31;
}
yield inAppSkus;
try {
value7 = undefined;
value8 = false;
} catch (error) {
break exceptionLanding31;
}
if (value8) {
return value7;
}
try {
binding = env3_3;
} catch (error) {
break exceptionLanding31;
}
try {
binding3 = env4_1;
} catch (error) {
break exceptionLanding31;
}
try {
binding4 = env4_2;
} catch (error) {
break exceptionLanding31;
}
try {
property = binding4[6];
} catch (error) {
break exceptionLanding31;
}
try {
value9 = binding3(property);
} catch (error) {
break exceptionLanding31;
}
try {
union = value9.union;
} catch (error) {
break exceptionLanding31;
}
try {
current = binding.current;
} catch (error) {
break exceptionLanding31;
}
try {
value10 = Reflect.apply(union, value9, [current, value5]);
} catch (error) {
break exceptionLanding31;
}
try {
binding.current = value10;
} catch (error) {
break exceptionLanding31;
}
try {
binding = env3_4;
} catch (error) {
break exceptionLanding31;
}
try {
binding(null);
} catch (error) {
break exceptionLanding31;
}
break reduciblePort32;
}
binding = env4_7;
error2 = binding.error;
Reflect.apply(error2, binding, ['Unable to fetch product IDs from google play store: ', error]);
env3_4('Unable to fetch');
binding = env4_0;
value = binding(env4_2[8]);
captureBillingException = value.captureBillingException;
Reflect.apply(captureBillingException, value, [error]);
break reduciblePort32;
}
function useNativeIAPPayments() { // fn#63385, offset: 0x00c539ad, size: 9 bytes, params: 1, frame: 1
return env0_8;
}
function useGoogleSkuIds(a0, a1) { // fn#63386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8121:447, offset: 0x01b7dd20, size: 191 bytes, params: 3, frame: 18
let env0_0 = a0;
const env0_1 = a1;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([IAPStoreAndroid], function() {
return IAPStoreAndroid.isFetchingGoogleSkus();
});
const env0_3 = ReactModule.useRef([]);
const [property, env0_4] = env0_4Binding(ReactModule.useState(null), 2);
ReactModule.useEffect(function() {
var env0_0 = _fun63389;
_fun63392();
}, [a1, value2, a0]);
return {isFetchingGoogleSkus: value2, fetchError: property};
function _fun63388() { // fn#63388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8121:623, offset: 0x01b7ddf2, size: 27 bytes, params: 1, frame: 9
(function() {
return _fetch.apply(this, arguments);
})();
function _fetch() { // fn#63389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8121:628, offset: 0x01b7de0d, size: 51 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__.__proto__;
return env2_3(_fun63391).apply(this, arguments);
function* _fun63391() { // fn#63391, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8121:663, offset: 0x01b7de49, size: 318 bytes, params: 1, frame: 19
var binding;
var value3;
var value4;
var difference;
var current;
var value5;
var length;
var binding2;
var property;
var value6;
var loadInAppSkus;
var inAppSkus;
var value7;
var value8;
var binding3;
var binding4;
var value9;
var union;
var value10;
var error;
var error2;
var captureBillingException;
if (true) {
value = environment.__proto__.__proto__.__proto__;
reducibleJoin3: while (true) {
if (importDefault) {
binding = env3_3;
binding.current = [];
break reducibleJoin3;
}
break reducibleJoin3;
}
reduciblePort32: while (true) {
exceptionLanding31: while (true) {
value3 = environment.__proto__.__proto__.__proto__.__proto__;
binding = env4_1;
value4 = binding(env4_2[6]);
difference = value4.difference;
current = env3_3.current;
value5 = Reflect.apply(difference, value4, [require, current]);
if (dependencyMap) {
break reduciblePort32;
}
if (importDefault) {
break reduciblePort32;
}
length = require.length;
if (length === 0) {
break reduciblePort32;
}
length = value5.length;
if (length === 0) {
break reduciblePort32;
}
try {
binding = env4_0;
} catch (error) {
break exceptionLanding31;
}
try {
binding2 = env4_2;
} catch (error) {
break exceptionLanding31;
}
try {
property = binding2[7];
} catch (error) {
break exceptionLanding31;
}
try {
value6 = binding(property);
} catch (error) {
break exceptionLanding31;
}
try {
loadInAppSkus = value6.loadInAppSkus;
} catch (error) {
break exceptionLanding31;
}
try {
inAppSkus = Reflect.apply(loadInAppSkus, value6, [value5]);
} catch (error) {
break exceptionLanding31;
}
yield inAppSkus;
try {
value7 = undefined;
value8 = false;
} catch (error) {
break exceptionLanding31;
}
if (value8) {
return value7;
}
try {
binding = env3_3;
} catch (error) {
break exceptionLanding31;
}
try {
binding3 = env4_1;
} catch (error) {
break exceptionLanding31;
}
try {
binding4 = env4_2;
} catch (error) {
break exceptionLanding31;
}
try {
property = binding4[6];
} catch (error) {
break exceptionLanding31;
}
try {
value9 = binding3(property);
} catch (error) {
break exceptionLanding31;
}
try {
union = value9.union;
} catch (error) {
break exceptionLanding31;
}
try {
current = binding.current;
} catch (error) {
break exceptionLanding31;
}
try {
value10 = Reflect.apply(union, value9, [current, value5]);
} catch (error) {
break exceptionLanding31;
}
try {
binding.current = value10;
} catch (error) {
break exceptionLanding31;
}
try {
binding = env3_4;
} catch (error) {
break exceptionLanding31;
}
try {
binding(null);
} catch (error) {
break exceptionLanding31;
}
break reduciblePort32;
}
binding = env4_7;
error2 = binding.error;
Reflect.apply(error2, binding, ['Unable to fetch product IDs from google play store: ', error]);
env3_4('Unable to fetch');
binding = env4_0;
value = binding(env4_2[8]);
captureBillingException = value.captureBillingException;
Reflect.apply(captureBillingException, value, [error]);
break reduciblePort32;
}
}
}
}
function fetch_63392() { // fn#63392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8121:1008, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return _fetch.apply(this, arguments);
}
}
}
}
global.__d(_fun63382, 7943, [5, 57, 31, 5140, 3, 566, 22, 7298, 3817,
2]) /* metro module 7943, dependencies: [5, 57, 31, 5140, 3, 566, 22, 7298, 3817, 2] */;
@@ -1,44 +1,45 @@
/* Metro module 7673; source: modules/payments/native/hooks/useOrderContext.tsx; dependencies: [57, 31, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
function _fun61304(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7851:6, offset: 0x01b3ad29, size: 123 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(57) /* metro dependency 57 */;
const env0_1 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/payments/native/hooks/useOrderContext.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/payments/native/hooks/useOrderContext.tsx');
exports.useOrderContext = useOrderContext;
}
function useOrderContext(a0) { // fn#61305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7851:217, offset: 0x01b3ada4, size: 116 bytes, params: 2, frame: 16
const value = Module00057(ReactModule.useState(a0), 2);
return ReactModule.useMemo(_fun61308, [value[0], value[1], ReactModule.useCallback(_fun61306, [])]);
function _fun61306(a0) { // fn#61306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7851:325, offset: 0x01b3ae18, size: 30 bytes, params: 2, frame: 11
const env0_0 = a0;
ReactModule(_fun61307);
function _fun61307(a0) { // fn#61307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7851:332, offset: 0x01b3ae36, size: 45 bytes, params: 2, frame: 13
var r0;
var object;
const value = a0;
if (value == null) {
r0 = value;
} else {
object = {};
copyDataProperties(object, value, undefined);
object['revision'] = env0_0;
r0 = object;
}
return r0;
}
function useOrderContext(a0) { // fn#61305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7851:217, offset: 0x01b3ada4, size: 116 bytes, params: 2, frame: 16
const binding = env0_1;
const value = env0_0(binding.useState(a0), 2);
return binding.useMemo(_fun61308, [value[0], value[1], binding.useCallback(_fun61306, [])]);
}
}
function _fun61306(a0) { // fn#61306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7851:325, offset: 0x01b3ae18, size: 30 bytes, params: 2, frame: 11
const env0_0 = a0;
env0_1(_fun61307);
}
function _fun61308() { // fn#61308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7851:389, offset: 0x01b3ae63, size: 144 bytes, params: 1, frame: 7
const value2 = undefined;
return {order: Module00057, setOrder: ReactModule, setRevision: env0_2, orderId: Module00057 == null ? value2 : Module00057.id,
orderLineItemId: Module00057 == null || Module00057.order_line_items == null || Module00057.order_line_items[0] == null ? value2 : Module00057.order_line_items[0].id,
revision: Module00057 == null ? value2 : Module00057.revision};
}
function _fun61308() { // fn#61308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7851:389, offset: 0x01b3ae63, size: 144 bytes, params: 1, frame: 7
const binding = env0_0;
const value2 = undefined;
return {order: binding, setOrder: env0_1, setRevision: env0_2, orderId: binding == null ? value2 : env0_0.id,
orderLineItemId: env0_0 == null || env0_0.order_line_items == null || env0_0.order_line_items[0] == null ? value2 : env0_0.order_line_items[0].id,
revision: env0_0 == null ? value2 : env0_0.revision};
}
function _fun61307(a0) { // fn#61307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7851:332, offset: 0x01b3ae36, size: 45 bytes, params: 2, frame: 13
var r0;
var object2;
const value = a0;
if (value == null) {
r0 = value;
} else {
object2 = {};
copyDataProperties(object2, value, undefined);
object2['revision'] = env0_0;
r0 = object2;
}
return r0;
}
global.__d(_fun61304, 7673, [57, 31, 2]) /* metro module 7673, dependencies: [57, 31, 2] */;
@@ -1,167 +1,198 @@
/* Metro module 7023; source: modules/payments/native/utils/BillingStandaloneNativeUtils.tsx; dependencies: [4095, 661, 3, 4247, 7024, 1581, 676, 3853, 2] */
import Logger from '../../../debug/Logger.tsx'; /* Metro dependency 3 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as MetaQuestUtilsAndroidModule from '../../../device/MetaQuestUtils.android.tsx'; /* Metro dependency 1581 */
import * as PaymentConstantsModule from '../../PaymentConstants.tsx'; /* Metro dependency 4095 */
import * as BillingStandaloneUtilsModule from '../../utils/BillingStandaloneUtils.tsx'; /* Metro dependency 7024 */
function _fun55652(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7201:6, offset: 0x013ad0c0, size: 217 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(4095) /* metro dependency 4095: PaymentConstants */).CustomCheckoutFlow;
const env0_4 = (require(661) /* metro dependency 661: Constants */).Routes;
let value = importDefault(3) /* metro dependency 3: Logger */;
let value = Logger;
value = new value('BillingStandaloneNativeUtils');
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/payments/native/utils/BillingStandaloneNativeUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/payments/native/utils/BillingStandaloneNativeUtils.tsx');
exports.goToStandalonePremiumCheckoutFromMobileApp = goToStandalonePremiumCheckoutFromMobileApp;
exports.goToStandaloneNitroManagementFromMobileApp = goToStandaloneNitroManagementFromMobileApp;
exports.goToStandaloneGuildBoostCheckoutFromMobileApp = goToStandaloneGuildBoostCheckoutFromMobileApp;
}
function emitMWRCSentryErrorOnFailure(a0, a1, a2) { // fn#55653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7201:220, offset: 0x013ad199, size: 332 bytes, params: 4, frame: 23
var r4;
var r5;
var r72;
var item3;
var value3;
var value4;
var binding;
var error;
var value5;
var property;
var moduleValue;
var captureMobileWebRedirectCheckoutSentryError;
var Error;
var prototype;
var value6;
var value7;
var object2;
var moduleValue2;
var value8;
var value9;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value = undefined;
const value2 = item2 === value;
const r7 = value2 ? value : item;
if (value2) {
r4 = item2;
r5 = value2;
r72 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r4 = item3;
r5 = value3;
function emitMWRCSentryErrorOnFailure(a0, a1, a2) { // fn#55653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7201:220, offset: 0x013ad199, size: 332 bytes, params: 4, frame: 23
var r4;
var r5;
var r72;
var item3;
var value3;
var value4;
var binding;
var error;
var value5;
var property;
var moduleValue;
var captureMobileWebRedirectCheckoutSentryError;
var Error;
var prototype;
var value6;
var value7;
var object;
var moduleValue2;
var value8;
var value9;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value = undefined;
const value2 = item2 === value;
const r7 = value2 ? value : item;
if (value2) {
r4 = item2;
r5 = value2;
r72 = value;
} else {
r4 = item3;
r5 = value3;
r72 = item;
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r4 = item3;
r5 = value3;
r72 = value;
} else {
r4 = item3;
r5 = value3;
r72 = item;
}
}
if (!r5) {
r4.return();
}
const object3 = {destination_url: r72, load_id: a2};
try {
value4 = environment;
binding = env0_5;
error = binding.error;
value5 = 'Failed to open mobile web popout to ' + r72 + ', error response: ';
Reflect.apply(error, binding, [value5, r7]);
property = dependencyMap[3];
moduleValue = require(property);
captureMobileWebRedirectCheckoutSentryError = moduleValue.captureMobileWebRedirectCheckoutSentryError;
Error = global.Error;
prototype = Error.prototype;
value6 = Object.create(prototype, {constructor: {value: Error}});
error = new Error('Mobile web redirect checkout mobile app to web popout failed');
value7 = error instanceof Object ? error : value6;
object = {failure_response: r7};
copyDataProperties(object, object3, undefined);
Reflect.apply(captureMobileWebRedirectCheckoutSentryError, moduleValue, [value7, a1, {extra: object}]);
} catch (error) {
moduleValue2 = require(dependencyMap[3]);
captureMobileWebRedirectCheckoutSentryError = moduleValue2.captureMobileWebRedirectCheckoutSentryError;
Error = global.Error;
prototype = Error.prototype;
value8 = Object.create(prototype, {constructor: {value: Error}});
error = new Error('Mobile web redirect checkout mobile app to web popout failed');
value9 = error instanceof Object ? error : value8;
Reflect.apply(captureMobileWebRedirectCheckoutSentryError, moduleValue2, [value9, a1, {extra: object3}]);
}
return value;
}
if (!r5) {
r4.return();
function goToStandalonePremiumCheckoutFromMobileApp(a0, a1, a2, a3) { // fn#55654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7201:744, offset: 0x013ad2e5, size: 189 bytes, params: 5, frame: 19
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_3 = a3;
const goToStandalonePremiumCheckout = BillingStandaloneUtilsModule.goToStandalonePremiumCheckout;
const isMetaQuest2 = (MetaQuestUtilsAndroidModule).isMetaQuest();
const object = {};
copyDataProperties(object, a1, undefined);
if (isMetaQuest2) {
object['flowType'] = CustomCheckoutFlow.META_QUEST_WEB_REDIRECT_CHECKOUT;
} else {
object['deepLinkType'] = (require(676) /* metro dependency 676: ConstantsIOS */).LinkingTypes.MOBILE_WEB_REDIRECT_CHECKOUT;
}
return Reflect.apply(goToStandalonePremiumCheckout, BillingStandaloneUtilsModule, [object, _fun55655, _fun55656]);
function _fun55655(a0, a1) { // fn#55655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7201:994, offset: 0x013ad3a2, size: 96 bytes, params: 3, frame: 15
const searchParams = a1.searchParams;
searchParams.append('handoff_token', a0.body.handoff_token);
let value = environment.__proto__;
value = importDefault(3853) /* metro dependency 3853: Linking */;
value.openURLExternally(a1.href);
importDefault(a0, a1);
}
function _fun55656(a0) { // fn#55656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7201:1106, offset: 0x013ad402, size: 73 bytes, params: 2, frame: 17
const value = copyRestArgs(0, undefined);
const emitMWRCSentryErrorOnFailureBinding = emitMWRCSentryErrorOnFailure;
emitMWRCSentryErrorOnFailureBinding(value, env0_0, require.loadId);
const items2 = [];
arraySpread(items2, value, 0, emitMWRCSentryErrorOnFailureBinding);
apply(importAll, items2, undefined, emitMWRCSentryErrorOnFailureBinding);
}
}
const object4 = {destination_url: r72, load_id: a2};
try {
value4 = environment;
binding = env0_5;
error = binding.error;
value5 = 'Failed to open mobile web popout to ' + r72 + ', error response: ';
Reflect.apply(error, binding, [value5, r7]);
property = dependencyMap[3];
moduleValue = require(property);
captureMobileWebRedirectCheckoutSentryError = moduleValue.captureMobileWebRedirectCheckoutSentryError;
Error = global.Error;
prototype = Error.prototype;
value6 = Object.create(prototype, {constructor: {value: Error}});
error = new Error('Mobile web redirect checkout mobile app to web popout failed');
value7 = error instanceof Object ? error : value6;
object2 = {failure_response: r7};
copyDataProperties(object2, object4, undefined);
Reflect.apply(captureMobileWebRedirectCheckoutSentryError, moduleValue, [value7, a1, {extra: object2}]);
} catch (error) {
moduleValue2 = require(dependencyMap[3]);
captureMobileWebRedirectCheckoutSentryError = moduleValue2.captureMobileWebRedirectCheckoutSentryError;
Error = global.Error;
prototype = Error.prototype;
value8 = Object.create(prototype, {constructor: {value: Error}});
error = new Error('Mobile web redirect checkout mobile app to web popout failed');
value9 = error instanceof Object ? error : value8;
Reflect.apply(captureMobileWebRedirectCheckoutSentryError, moduleValue2, [value9, a1, {extra: object4}]);
function goToStandaloneNitroManagementFromMobileApp(a0, {loadId}, a2, a3) { // fn#55657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7201:1216, offset: 0x013ad44b, size: 183 bytes, params: 5, frame: 21
const env0_0 = a0;
const env0_2 = a2;
const env0_3 = a3;
return BillingStandaloneUtilsModule.goToBillingStandalonePageWithHandoff((require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */).isMetaQuest() ? Routes.BILLING_MANAGE_SUBSCRIPTION_WITH_FLOW_TYPE(CustomCheckoutFlow.META_QUEST_WEB_REDIRECT_CHECKOUT,
loadId) : Routes.BILLING_MANAGE_SUBSCRIPTION_WITH_DEEP_LINK((require(676) /* metro dependency 676: ConstantsIOS */).LinkingTypes.MOBILE_WEB_REDIRECT_CHECKOUT,
loadId), _fun55658, _fun55659);
function _fun55658(a0, a1) { // fn#55658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7201:1542, offset: 0x013ad3a2, size: 96 bytes, params: 3, frame: 15
const searchParams = a1.searchParams;
searchParams.append('handoff_token', a0.body.handoff_token);
let value = environment.__proto__;
value = importDefault(3853) /* metro dependency 3853: Linking */;
value.openURLExternally(a1.href);
importDefault(a0, a1);
}
function _fun55659(a0) { // fn#55659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7201:1654, offset: 0x013ad502, size: 67 bytes, params: 2, frame: 17
const value = copyRestArgs(0, undefined);
const emitMWRCSentryErrorOnFailureBinding = emitMWRCSentryErrorOnFailure;
emitMWRCSentryErrorOnFailureBinding(value, env0_0, loadId);
const items2 = [];
arraySpread(items2, value, 0, emitMWRCSentryErrorOnFailureBinding);
apply(importAll, items2, undefined, emitMWRCSentryErrorOnFailureBinding);
}
}
return value;
}
function goToStandalonePremiumCheckoutFromMobileApp(a0, a1, a2, a3) { // fn#55654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7201:744, offset: 0x013ad2e5, size: 189 bytes, params: 5, frame: 19
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_3 = a3;
const billingStandaloneUtilsModule = require(7024) /* metro dependency 7024: BillingStandaloneUtils */;
const goToStandalonePremiumCheckout = billingStandaloneUtilsModule.goToStandalonePremiumCheckout;
const isMetaQuest2 = (require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */).isMetaQuest();
const object2 = {};
copyDataProperties(object2, a1, undefined);
if (isMetaQuest2) {
object2['flowType'] = CustomCheckoutFlow.META_QUEST_WEB_REDIRECT_CHECKOUT;
} else {
object2['deepLinkType'] = (require(676) /* metro dependency 676: ConstantsIOS */).LinkingTypes.MOBILE_WEB_REDIRECT_CHECKOUT;
function goToStandaloneGuildBoostCheckoutFromMobileApp(a0, a1, a2, a3, a4) { // fn#55660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7201:1760, offset: 0x013ad545, size: 218 bytes, params: 6, frame: 20
const env0_0 = a0;
const env0_1 = a2;
const env0_2 = a3;
const env0_3 = a4;
const value2 = undefined;
const MOBILE_WEB_REDIRECT_CHECKOUT = MetaQuestUtilsAndroidModule.isMetaQuest() ? value2 : (require(676) /* metro dependency 676: ConstantsIOS */).LinkingTypes.MOBILE_WEB_REDIRECT_CHECKOUT;
const META_QUEST_WEB_REDIRECT_CHECKOUT = MetaQuestUtilsAndroidModule.isMetaQuest() ? CustomCheckoutFlow.META_QUEST_WEB_REDIRECT_CHECKOUT : value2;
return BillingStandaloneUtilsModule.goToBillingStandalonePageWithHandoff(Routes.BILLING_STANDALONE_GUILD_BOOST_CHECKOUT_PAGE(a1,
MOBILE_WEB_REDIRECT_CHECKOUT, a2, META_QUEST_WEB_REDIRECT_CHECKOUT), _fun55661, _fun55662);
function _fun55661(a0, a1) { // fn#55661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7201:2086, offset: 0x013ad3a2, size: 96 bytes, params: 3, frame: 15
const searchParams = a1.searchParams;
searchParams.append('handoff_token', a0.body.handoff_token);
let value = environment.__proto__;
value = importDefault(3853) /* metro dependency 3853: Linking */;
value.openURLExternally(a1.href);
importAll(a0, a1);
}
function _fun55662(a0) { // fn#55662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7201:2198, offset: 0x013ad502, size: 67 bytes, params: 2, frame: 17
const value = copyRestArgs(0, undefined);
const emitMWRCSentryErrorOnFailureBinding = emitMWRCSentryErrorOnFailure;
let binding = env0_0;
emitMWRCSentryErrorOnFailureBinding(value, binding, importDefault);
binding = env0_3;
const items2 = [];
arraySpread(items2, value, 0, emitMWRCSentryErrorOnFailureBinding);
apply(binding, items2, undefined, emitMWRCSentryErrorOnFailureBinding);
}
}
return Reflect.apply(goToStandalonePremiumCheckout, billingStandaloneUtilsModule, [object2, _fun55655, _fun55656]);
}
function goToStandaloneNitroManagementFromMobileApp(a0, {loadId}, a2, a3) { // fn#55657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7201:1216, offset: 0x013ad44b, size: 183 bytes, params: 5, frame: 21
const env0_0 = a0;
const env0_2 = a2;
const env0_3 = a3;
const billingStandaloneUtilsModule = require(7024) /* metro dependency 7024: BillingStandaloneUtils */;
return billingStandaloneUtilsModule.goToBillingStandalonePageWithHandoff((require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */).isMetaQuest() ? Routes.BILLING_MANAGE_SUBSCRIPTION_WITH_FLOW_TYPE(CustomCheckoutFlow.META_QUEST_WEB_REDIRECT_CHECKOUT,
loadId) : Routes.BILLING_MANAGE_SUBSCRIPTION_WITH_DEEP_LINK((require(676) /* metro dependency 676: ConstantsIOS */).LinkingTypes.MOBILE_WEB_REDIRECT_CHECKOUT,
loadId), _fun55658, _fun55659);
}
function goToStandaloneGuildBoostCheckoutFromMobileApp(a0, a1, a2, a3, a4) { // fn#55660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7201:1760, offset: 0x013ad545, size: 218 bytes, params: 6, frame: 20
const env0_0 = a0;
const env0_1 = a2;
const env0_2 = a3;
const env0_3 = a4;
const value2 = undefined;
const metaQuestUtilsAndroidModule = require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */;
const MOBILE_WEB_REDIRECT_CHECKOUT = metaQuestUtilsAndroidModule.isMetaQuest() ? value2 : (require(676) /* metro dependency 676: ConstantsIOS */).LinkingTypes.MOBILE_WEB_REDIRECT_CHECKOUT;
const moduleValue2 = metaQuestUtilsAndroidModule;
const META_QUEST_WEB_REDIRECT_CHECKOUT = moduleValue2.isMetaQuest() ? CustomCheckoutFlow.META_QUEST_WEB_REDIRECT_CHECKOUT : value2;
const billingStandaloneUtilsModule = require(7024) /* metro dependency 7024: BillingStandaloneUtils */;
return billingStandaloneUtilsModule.goToBillingStandalonePageWithHandoff(Routes.BILLING_STANDALONE_GUILD_BOOST_CHECKOUT_PAGE(a1,
MOBILE_WEB_REDIRECT_CHECKOUT, a2, META_QUEST_WEB_REDIRECT_CHECKOUT), _fun55661, _fun55662);
}
function _fun55655(a0, a1) { // fn#55655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7201:994, offset: 0x013ad3a2, size: 96 bytes, params: 3, frame: 15
const searchParams = a1.searchParams;
searchParams.append('handoff_token', a0.body.handoff_token);
let value = environment.__proto__;
value = importDefault(3853) /* metro dependency 3853: Linking */;
value.openURLExternally(a1.href);
importDefault(a0, a1);
}
function _fun55656(a0) { // fn#55656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7201:1106, offset: 0x013ad402, size: 73 bytes, params: 2, frame: 17
const value = copyRestArgs(0, undefined);
const emitMWRCSentryErrorOnFailureBinding = emitMWRCSentryErrorOnFailure;
emitMWRCSentryErrorOnFailureBinding(value, env0_0, require.loadId);
const items2 = [];
arraySpread(items2, value, 0, emitMWRCSentryErrorOnFailureBinding);
apply(importAll, items2, undefined, emitMWRCSentryErrorOnFailureBinding);
}
function _fun55659(a0) { // fn#55659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7201:1654, offset: 0x013ad502, size: 67 bytes, params: 2, frame: 17
const value = copyRestArgs(0, undefined);
const emitMWRCSentryErrorOnFailureBinding = emitMWRCSentryErrorOnFailure;
emitMWRCSentryErrorOnFailureBinding(value, env0_0, loadId);
const items2 = [];
arraySpread(items2, value, 0, emitMWRCSentryErrorOnFailureBinding);
apply(importAll, items2, undefined, emitMWRCSentryErrorOnFailureBinding);
}
global.__d(_fun55652, 7023, [4095, 661, 3, 4247, 7024, 1581, 676, 3853,
2]) /* metro module 7023, dependencies: [4095, 661, 3, 4247, 7024, 1581, 676, 3853, 2] */;
File diff suppressed because it is too large. Load diff