decord/source/modules/rpc/server/events/subscriptionHelpers.tsx

140 lines
4.6 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 13647
// Function ID: 13648
2026-07-20 16:05:17 +00:00
// Name: getInitialSubscriptionPayload
2026-08-05 07:35:12 +00:00
// Dependencies: [1371, 10478, 7054, 676, 4280, 10526, 4800, 13610, 7077, 2]
2026-07-20 16:05:17 +00:00
// Exports: getInitialSubscriptionPayload
2026-08-05 07:35:12 +00:00
// Module 13647 (getInitialSubscriptionPayload)
2026-07-29 08:29:29 +00:00
import participantFromServer from "participantFromServer";
import map from "map";
import initializeState from "initializeState";
2026-07-23 10:11:24 +00:00
import { RPCEvents } from "ME";
import items3 from "items3";
2026-07-20 16:05:17 +00:00
2026-07-23 10:11:24 +00:00
let closure_6;
2026-07-29 08:29:29 +00:00
let error;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
({ ActivityLayoutMode: closure_6, ActivityScreenOrientation: error } = items3);
const result = require("initializeState").fileFinishedImporting("modules/rpc/server/events/subscriptionHelpers.tsx");
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
export const getInitialSubscriptionPayload = function getInitialSubscriptionPayload(closure_1, participantFromServer, c3) {
if (RPCEvents.ACTIVITY_PIP_MODE_UPDATE === participantFromServer) {
const application4 = closure_1.application;
2026-07-20 16:05:17 +00:00
let id;
2026-07-29 08:29:29 +00:00
if (application4 != null) {
2026-07-20 16:05:17 +00:00
id = application4.id;
}
let layoutModeForApp = null;
if (null != id) {
layoutModeForApp = store.getLayoutModeForApp(id);
}
let tmp40 = null;
if (null != layoutModeForApp) {
2026-07-29 08:29:29 +00:00
let obj = { is_pip_mode: null };
obj[0] = layoutModeForApp !== constants.FOCUSED;
2026-07-20 16:05:17 +00:00
tmp40 = obj;
}
return tmp40;
2026-07-29 08:29:29 +00:00
} else if (tmp.ACTIVITY_LAYOUT_MODE_UPDATE === participantFromServer) {
const application3 = closure_1.application;
2026-07-20 16:05:17 +00:00
let id1;
2026-07-29 08:29:29 +00:00
if (application3 != null) {
2026-07-20 16:05:17 +00:00
id1 = application3.id;
}
let layoutModeForApp1 = null;
if (null != id1) {
layoutModeForApp1 = store.getLayoutModeForApp(id1);
}
let tmp35 = null;
if (null != layoutModeForApp1) {
2026-07-29 08:29:29 +00:00
obj = { layout_mode: null };
obj[0] = layoutModeForApp1;
2026-07-20 16:05:17 +00:00
tmp35 = obj;
}
return tmp35;
2026-07-29 08:29:29 +00:00
} else if (tmp.FRAME_LAYOUT_MODE_UPDATE === participantFromServer) {
const application2 = closure_1.application;
2026-07-20 16:05:17 +00:00
let id2;
2026-07-29 08:29:29 +00:00
if (application2 != null) {
2026-07-20 16:05:17 +00:00
id2 = application2.id;
}
let tmp26 = null;
if (null != id2) {
2026-07-23 10:11:24 +00:00
connectedFrame = connectedFrame.getConnectedFrame();
2026-07-20 16:05:17 +00:00
let layoutMode;
2026-07-29 08:29:29 +00:00
if (connectedFrame != null) {
2026-07-20 16:05:17 +00:00
layoutMode = connectedFrame.layoutMode;
}
tmp26 = layoutMode;
}
let tmp30 = null;
if (null != tmp26) {
2026-07-29 08:29:29 +00:00
const obj1 = { layout_mode: null };
obj1[0] = tmp26;
2026-07-20 16:05:17 +00:00
tmp30 = obj1;
}
return tmp30;
2026-07-29 08:29:29 +00:00
} else if (tmp.THERMAL_STATE_UPDATE === participantFromServer) {
2026-08-05 07:35:12 +00:00
const thermalState = require(10526) /* useThermalState */.getThermalState();
2026-07-20 16:05:17 +00:00
let tmp23 = null;
2026-08-05 07:35:12 +00:00
if (thermalState !== require(10526) /* useThermalState */.ThermalStates.UNHANDLED) {
2026-07-29 08:29:29 +00:00
let obj2 = { thermal_state: null };
obj2[0] = thermalState;
2026-07-20 16:05:17 +00:00
tmp23 = obj2;
}
return tmp23;
2026-07-29 08:29:29 +00:00
} else if (tmp.ORIENTATION_UPDATE === participantFromServer) {
2026-08-05 07:35:12 +00:00
let obj3 = require(4800) /* getIsScreenLandscape */;
2026-07-29 08:29:29 +00:00
obj3 = { screen_orientation: null };
obj3[0] = obj3.getIsScreenLandscape() ? closure_7.LANDSCAPE : closure_7.PORTRAIT;
2026-07-20 16:05:17 +00:00
return obj3;
2026-07-29 08:29:29 +00:00
} else if (tmp.ACTIVITY_INSTANCE_PARTICIPANTS_UPDATE === participantFromServer) {
2026-08-05 07:35:12 +00:00
obj2 = require(13610) /* activityInstanceConnectedParticipants */;
2026-07-20 16:05:17 +00:00
return obj2.activityInstanceConnectedParticipants();
2026-07-29 08:29:29 +00:00
} else if (tmp.QUEST_ENROLLMENT_STATUS_UPDATE === participantFromServer) {
const quest_id = c3.quest_id;
2026-07-20 16:05:17 +00:00
if (quest_id) {
2026-07-23 10:11:24 +00:00
quest = quest.getQuest(quest_id);
2026-08-05 07:35:12 +00:00
obj = require(7077) /* getApplicationIdsByTaskTypes */;
2026-07-20 16:05:17 +00:00
const activityApplicationId = obj.getActivityApplicationId(quest);
2026-07-29 08:29:29 +00:00
let tmp11 = null;
2026-07-20 16:05:17 +00:00
if (null != quest) {
2026-07-29 08:29:29 +00:00
tmp11 = null;
2026-07-20 16:05:17 +00:00
if (null != activityApplicationId) {
2026-07-29 08:29:29 +00:00
const application = closure_1.application;
2026-07-20 16:05:17 +00:00
let id3;
2026-07-29 08:29:29 +00:00
if (application != null) {
2026-07-20 16:05:17 +00:00
id3 = application.id;
}
2026-07-29 08:29:29 +00:00
tmp11 = null;
2026-07-20 16:05:17 +00:00
if (activityApplicationId === id3) {
2026-07-29 08:29:29 +00:00
const obj4 = { quest_id: null, is_enrolled: null, enrolled_at: null };
obj4[0] = quest_id;
2026-07-20 16:05:17 +00:00
const userStatus = quest.userStatus;
let enrolledAt;
2026-07-29 08:29:29 +00:00
if (userStatus != null) {
2026-07-20 16:05:17 +00:00
enrolledAt = userStatus.enrolledAt;
}
2026-07-29 08:29:29 +00:00
obj4[1] = null != enrolledAt;
2026-07-20 16:05:17 +00:00
const userStatus2 = quest.userStatus;
let enrolledAt1;
2026-07-29 08:29:29 +00:00
if (userStatus2 != null) {
2026-07-20 16:05:17 +00:00
enrolledAt1 = userStatus2.enrolledAt;
}
2026-07-29 08:29:29 +00:00
if (enrolledAt1 == null) {
enrolledAt1 = null;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj4[2] = enrolledAt1;
tmp11 = obj4;
2026-07-20 16:05:17 +00:00
}
}
}
2026-07-29 08:29:29 +00:00
return tmp11;
2026-07-20 16:05:17 +00:00
} else {
return null;
}
} else {
return null;
}
};