This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,76 @@
// Metro module 12166 (f12167).
import UserApplicationIdentityStore from "./UserApplicationIdentityStore";
import { Endpoints, QueryIds } from "../../Constants";
import Dispatcher from "../../Dispatcher";
import { HTTP } from "../../_bundle/sendRequest";
import SentryUtils_native from "../../utils/SentryUtils.native";
import { createFetchStore } from "../../_bundle/Module589";
let c8396_6 = {
fetchUserApplicationIdentitiesWithProfiles: async (userId, signal) => {
let c27261_2;
let c27261_3 = 0;
let c30504_0, c30504_1;
try {
c30504_0 = void 0;
Dispatcher.dispatch({
type: "USER_APPLICATION_IDENTITY_FETCH_USER_START",
userId
});
c27261_3 = 1;
c30504_0 = await HTTP.get({
url: Endpoints.USER_APPLICATION_IDENTITIES(userId),
query: {
with_profiles: true
},
rejectWithError: true,
signal
});
Dispatcher.dispatch({
type: "USER_APPLICATION_IDENTITY_FETCH_USER_SUCCESS",
userId,
identities: c30504_0.body.identities
});
c27261_3 = 0;
} catch ($e) {
const r26 = $e;
let r8 = r26;
c27261_2 = r26;
if (c27261_3 !== 0) {
while (true) {
try {
const r84 = c27261_2;
c27261_3 = 0;
c30504_1 = r84;
Dispatcher.dispatch({
type: "USER_APPLICATION_IDENTITY_FETCH_USER_FAILURE",
userId
});
SentryUtils_native.captureException(c30504_1);
throw c30504_1;
} catch (r80) {
r8 = r80;
c27261_2 = r80;
if (c27261_3 === 0) {
break;
}
}
}
}
throw r8;
}
},
updateApplicationIdentityConfig: async (c19692_0, c19692_1, body) => {
await HTTP.patch({
url: Endpoints.SELF_APPLICATION_IDENTITY_CONFIG(c19692_0, c19692_1),
body,
rejectWithError: true
});
}
};
const fetchStore = createFetchStore(UserApplicationIdentityStore, {
getQueryId: QueryIds.USER_APPLICATION_IDENTITIES,
get: (a0) => UserApplicationIdentityStore.getUserIdentities(a0),
load: (a0) => c8396_6.fetchUserApplicationIdentitiesWithProfiles(a0)
});
export default c8396_6;
export { fetchStore as useUserApplicationIdentities };
@@ -0,0 +1,57 @@
// Metro module 4872 (f4873).
import { getIsRiotSocialSDKMigrationEnabled, useIsRiotSocialSDKMigrationEnabled, battlenetSocialSDKMigrationExperiment } from "../application_account_linking/experiments/socialSDKMigration";
let c3003_2;
const r13 = {
RIOT_GAMES: "1443033465766281327",
BATTLENET: "1356665549089800303"
};
const r20 = [{
applicationId: r13.RIOT_GAMES,
getMigrationExperimentEnabled: (a0) => getIsRiotSocialSDKMigrationEnabled({
location: a0
}),
useMigrationExperimentEnabled: (a0) => useIsRiotSocialSDKMigrationEnabled({
location: a0
})
}];
c3003_2 = [{
applicationId: r13.RIOT_GAMES,
getMigrationExperimentEnabled: (a0) => getIsRiotSocialSDKMigrationEnabled({
location: a0
}),
useMigrationExperimentEnabled: (a0) => useIsRiotSocialSDKMigrationEnabled({
location: a0
})
}, {
applicationId: r13.BATTLENET,
getMigrationExperimentEnabled: (a0) => battlenetSocialSDKMigrationExperiment.getConfig({
location: a0
}).enabled,
useMigrationExperimentEnabled: (a0) => battlenetSocialSDKMigrationExperiment.useConfig({
location: a0
}).enabled
}];
const r33 = [{
applicationId: r13.RIOT_GAMES,
getMigrationExperimentEnabled: (a0) => getIsRiotSocialSDKMigrationEnabled({
location: a0
}),
useMigrationExperimentEnabled: (a0) => useIsRiotSocialSDKMigrationEnabled({
location: a0
})
}, {
applicationId: r13.BATTLENET,
getMigrationExperimentEnabled: (a0) => battlenetSocialSDKMigrationExperiment.getConfig({
location: a0
}).enabled,
useMigrationExperimentEnabled: (a0) => battlenetSocialSDKMigrationExperiment.useConfig({
location: a0
}).enabled
}];
export { r13 as ApplicationIdentityConnections };
export { r20 as APPLICATION_IDENTITY_CONNECTIONS_ALLOWED_APPLICATIONS };
export { c3003_2 as APPLICATION_IDENTITY_CONNECTIONS_SCREEN_APPLICATIONS };
export { r33 as APPLICATION_IDENTITY_CONNECTIONS_INCENTIVIZED_APPLICATIONS };
export function getMigratedApplicationIdentityConnectionsScreenApplications(c14491_0) {
return c3003_2.filter((item) => item.getMigrationExperimentEnabled(c14491_0)).map((item) => item.applicationId);
}
@@ -0,0 +1,14 @@
// Metro module 16724 (f16725).
import { useUserApplicationIdentities } from "./UserApplicationIdentityActionCreators";
import AutomaticLifecycleManager from "../../lib/AutomaticLifecycleManager";
const handleUserApplicationIdentityGatewayEvent = function handleUserApplicationIdentityGatewayEvent(a0) {
useUserApplicationIdentities.refetch(a0.user_id);
};
class UserApplicationIdentityManager extends AutomaticLifecycleManager {
actions = {
USER_APPLICATION_IDENTITY_UPDATE: handleUserApplicationIdentityGatewayEvent,
USER_APPLICATION_IDENTITY_REMOVE: handleUserApplicationIdentityGatewayEvent
};
}
const userApplicationIdentityManager = new UserApplicationIdentityManager();
export default userApplicationIdentityManager;
@@ -0,0 +1,72 @@
// Metro module 12165 (f12166).
import Module589 from "../../_bundle/Module589";
import Dispatcher from "../../Dispatcher";
function $mk89368() {
return (a0) => [a0.application_id, a0];
}
let c8395_0 = {
NOT_FETCHED: "NOT_FETCHED",
FETCHING: "FETCHING",
FETCHED: "FETCHED"
};
let c8395_1 = new Map();
let c8395_2 = new Map();
class UserApplicationIdentityStore extends Module589.Store {
getUserIdentities(a0) {
let r7 = c8395_1.get(a0)?.identities;
if (r7 == null) {
r7 = null;
}
return r7;
}
getUserIdentityByApplication(a0, a1) {
const r7 = c8395_1.get(a0);
let r8 = r7 == null ? void 0 : r7.byApplication.get(a1);
if (r8 == null) {
r8 = null;
}
return r8;
}
getFetchState(a0) {
let r5 = c8395_2.get(a0);
if (r5 == null) {
r5 = c8395_0.NOT_FETCHED;
}
return r5;
}
isFetchingUser(a0) {
return this.getFetchState(a0) === c8395_0.FETCHING;
}
}
const userApplicationIdentityStore = new UserApplicationIdentityStore(Dispatcher, {
USER_APPLICATION_IDENTITY_FETCH_USER_START: function handleFetchUserStart(a0) {
c8395_2.set(a0.userId, c8395_0.FETCHING);
},
USER_APPLICATION_IDENTITY_FETCH_USER_SUCCESS: function handleFetchUserSuccess(a0) {
c8395_2.set(a0.userId, c8395_0.FETCHED);
const { userId, identities } = a0;
c8395_1.set(userId, {
identities,
byApplication: new Map(identities.map($mk89368()))
});
c8395_2.set(userId, c8395_0.FETCHED);
},
USER_APPLICATION_IDENTITY_FETCH_USER_FAILURE: function handleFetchUserFailure(a0) {
c8395_2.set(a0.userId, c8395_0.FETCHED);
},
USER_APPLICATION_IDENTITY_REMOVE: function handleRemoveIdentity(a0) {
const r12 = c8395_1.get(a0.user_id);
if (r12 == null) {
return false;
}
const user_id = a0.user_id;
const identities = r12.identities.filter((identity) => identity.application_id !== a0.application_id);
c8395_1.set(user_id, {
identities,
byApplication: new Map(identities.map($mk89368()))
});
c8395_2.set(user_id, c8395_0.FETCHED);
}
});
export default userApplicationIdentityStore;
export { c8395_0 as FetchState };
@@ -0,0 +1,22 @@
// Metro module 12189 (f12190).
import { useMemo } from "react";
import { APPLICATION_IDENTITY_CONNECTIONS_ALLOWED_APPLICATIONS } from "../UserApplicationIdentityConstants";
import { useUserApplicationIdentities } from "../UserApplicationIdentityActionCreators";
export default function useConnectionFilteredAppIdentities(a0, r1 = {}) {
const includeHidden2 = r1.includeHidden;
const includeHidden = includeHidden2 !== void 0 && includeHidden2;
const userApplicationIdentities = useUserApplicationIdentities(a0);
const { isLoading, data } = userApplicationIdentities;
return {
isLoading,
filteredAppIdentities: useMemo(() => {
let r3 = data;
if (data == null) {
r3 = [];
}
return r3.filter((a0) => {
return APPLICATION_IDENTITY_CONNECTIONS_ALLOWED_APPLICATIONS.some((item) => item.applicationId === a0.application_id && item.getMigrationExperimentEnabled("useConnectionFilteredAppIdentities")) && a0.profile != null && a0.profile.username != null && (a0.profile.connection_visible === true || includeHidden);
});
}, [data, includeHidden])
};
};