decord/source/modules/activities/utils/useTransitionToConnectedActivityInVoice.tsx
github-actions 67d978d9fb chore: update source for alpha 346.0
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9672_m.js (378.6 MB)
2026-09-07 16:44:02 +00:00

145 lines
5.1 KiB
TypeScript

// Module ID: 17053
// Function ID: 17054
// Name: useTransitionToConnectedActivityInVoice
// Dependencies: [5, 19, 1957, 2011, 1074, 4189, 9531, 9550, 9540, 1109, 2]
// Exports: default
// Module 17053 (useTransitionToConnectedActivityInVoice)
import closure_3 from "asyncGeneratorStep" /* 5 */;
import closure_4 from "noop" /* 19 */;
import closure_5 from "ensureGuildLoaded" /* 1957 */;
import closure_6 from "handleConnectionOpen" /* 2011 */;
import { ComponentActions } from "ME" /* 1074 */;
const require = arg1;
const result = require("set").fileFinishedImporting("modules/activities/utils/useTransitionToConnectedActivityInVoice.tsx");
export default function useTransitionToConnectedActivityInVoice(onTransition) {
onTransition = onTransition.onTransition;
const items = [onTransition];
const effect = React.useEffect(() => {
function handler() {
const self = this;
const apply = _handler.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
}
function _handler() {
const self = this;
const tmp = closure_2_3((arg0) => {
closure_0 = arg0;
c3 = 0;
c4 = 0;
const iter = (function*(arg0) {
if (c4 === 2) {
c4 = 3;
HermesBuiltin.throwTypeError();
} else if (tmp4 === 3) {
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
return { value: "HermesInternal", done: null };
}
} else {
try {
c4 = 2;
if (0 === guild_id) {
if (arg0 === 1) {
c4 = 3;
throw arg1;
} else if (arg0 === 2) {
c4 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
guild_id = tmp5;
let callback = tmp2;
let location;
location = location.location;
callback = undefined;
guild_id = undefined;
guild_id = undefined;
guild_id = 1;
c4 = 1;
return { value: "PX_16", done: true };
}
} else {
if (1 === tmp5) {
if (arg0 === 1) {
c4 = 3;
throw arg1;
} else if (arg0 === 2) {
c4 = 3;
obj1 = { value: null, done: true };
obj1[0] = arg1;
return obj1;
} else {
callback = closure_2_0(closure_2_2[5]).getEmbeddedActivityLocationChannelId(location);
if (null != callback) {
if (callback(closure_2_2[6])(callback)) {
if (closure_2_6.getVoiceChannelId() !== callback) {
const obj2 = { channelId: null };
obj2[0] = callback;
guild_id = 2;
c4 = 1;
const obj3 = { value: null, done: false };
obj3[0] = callback(closure_2_2[7])(obj2);
return obj3;
}
}
}
c4 = 3;
return { value: "HermesInternal", done: null };
}
} else if (arg0 === 1) {
c4 = 3;
throw arg1;
} else if (arg0 === 2) {
c4 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
}
guild_id = closure_2_5.getChannel(callback);
guild_id = undefined;
if (guild_id != null) {
guild_id = guild_id.guild_id;
}
const _setTimeout = setTimeout;
const timerId = setTimeout(() => { ... }, 0);
}
} catch (tmp25) {
c4 = tmp;
throw tmp25;
}
}
})();
iter.next();
return iter;
});
closure_1 = tmp;
const apply = tmp.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
}
let ComponentDispatch = onTransition(closure_1_2[9]).ComponentDispatch;
const subscription = ComponentDispatch.subscribe(closure_1_7.OPEN_EMBEDDED_ACTIVITY, handler);
return () => {
const ComponentDispatch = onTransition(closure_2_2[9]).ComponentDispatch;
ComponentDispatch.unsubscribe(closure_2_7.OPEN_EMBEDDED_ACTIVITY, handler);
};
}, items);
};