2026-10-12 16:32:48 +00:00
|
|
|
// Module ID: 17360
|
|
|
|
|
// Function ID: 17361
|
2026-10-07 22:43:51 +00:00
|
|
|
// Name: useChannelAppFrameTeardown
|
2026-10-12 16:32:48 +00:00
|
|
|
// Dependencies: [19, 2065, 4750, 10807, 10802, 1085, 558, 576, 504, 10821, 2]
|
2026-10-07 22:43:51 +00:00
|
|
|
|
2026-10-12 16:32:48 +00:00
|
|
|
// Module 17360 (useChannelAppFrameTeardown)
|
2026-10-07 22:43:51 +00:00
|
|
|
import Constants from "Constants" /* 1085 */;
|
2026-10-12 16:32:48 +00:00
|
|
|
import FramesConstants from "FramesConstants" /* 10802 */;
|
|
|
|
|
import leaveFrame from "leaveFrame" /* 10821 */;
|
2026-10-07 22:43:51 +00:00
|
|
|
import react from "react" /* 19 */;
|
2026-10-12 16:32:48 +00:00
|
|
|
import ChannelStore from "ChannelStore" /* 2065 */;
|
|
|
|
|
import PermissionStore from "PermissionStore" /* 4750 */;
|
|
|
|
|
import FramesStore from "FramesStore" /* 10807 */;
|
2026-10-07 22:43:51 +00:00
|
|
|
import ReactCompilerGating from "ReactCompilerGating" /* 558 */;
|
|
|
|
|
import size from "module_2" /* 2 */;
|
|
|
|
|
|
|
|
|
|
const require = globalThis.__r;
|
2026-10-12 16:32:48 +00:00
|
|
|
let _require, dependencyMap;
|
2026-10-07 22:43:51 +00:00
|
|
|
|
|
|
|
|
const getFrameSurfaceForChannel = FramesConstants.getFrameSurfaceForChannel;
|
|
|
|
|
const Permissions = Constants.Permissions;
|
2026-10-12 16:32:48 +00:00
|
|
|
let tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? (function useChannelAppFrameTeardown(id) {
|
|
|
|
|
let closure_1;
|
|
|
|
|
let fn;
|
|
|
|
|
let items2;
|
2026-10-07 22:43:51 +00:00
|
|
|
let tmp11;
|
|
|
|
|
let tmp12;
|
|
|
|
|
let tmp5;
|
|
|
|
|
let tmp8;
|
|
|
|
|
const tmp = id;
|
2026-10-12 16:32:48 +00:00
|
|
|
let tmp2 = dependencyMap;
|
|
|
|
|
let obj = id(576);
|
2026-10-07 22:43:51 +00:00
|
|
|
const cResult = obj.c(10);
|
|
|
|
|
id = undefined;
|
|
|
|
|
if (id != null) {
|
|
|
|
|
id = id.id;
|
|
|
|
|
}
|
|
|
|
|
if (cResult[0] !== id) {
|
|
|
|
|
let tmp6 = null;
|
|
|
|
|
if (null != id) {
|
|
|
|
|
let tmp7 = getFrameSurfaceForChannel;
|
|
|
|
|
tmp6 = getFrameSurfaceForChannel(id);
|
|
|
|
|
}
|
|
|
|
|
cResult[0] = id;
|
|
|
|
|
cResult[1] = tmp6;
|
|
|
|
|
tmp5 = tmp6;
|
|
|
|
|
} else {
|
|
|
|
|
tmp5 = cResult[1];
|
|
|
|
|
}
|
2026-10-12 16:32:48 +00:00
|
|
|
dependencyMap = tmp5;
|
2026-10-07 22:43:51 +00:00
|
|
|
if (cResult[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
|
|
|
const items = [ChannelStore, PermissionStore];
|
|
|
|
|
cResult[2] = items;
|
|
|
|
|
tmp8 = items;
|
|
|
|
|
} else {
|
|
|
|
|
tmp8 = cResult[2];
|
|
|
|
|
}
|
|
|
|
|
if (cResult[3] !== id) {
|
2026-10-12 16:32:48 +00:00
|
|
|
class C {
|
|
|
|
|
constructor() {
|
|
|
|
|
const channel = ChannelStore.getChannel(id);
|
|
|
|
|
const canResult = null != channel && PermissionStore.can(Permissions.VIEW_CHANNEL, channel);
|
|
|
|
|
return canResult;
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-10-07 22:43:51 +00:00
|
|
|
const items1 = [id];
|
|
|
|
|
cResult[3] = id;
|
2026-10-12 16:32:48 +00:00
|
|
|
cResult[4] = C;
|
2026-10-07 22:43:51 +00:00
|
|
|
cResult[5] = items1;
|
|
|
|
|
tmp12 = items1;
|
2026-10-12 16:32:48 +00:00
|
|
|
tmp11 = C;
|
2026-10-07 22:43:51 +00:00
|
|
|
} else {
|
2026-10-12 16:32:48 +00:00
|
|
|
class C {
|
|
|
|
|
constructor() {
|
|
|
|
|
const channel = ChannelStore.getChannel(id);
|
|
|
|
|
const canResult = null != channel && PermissionStore.can(Permissions.VIEW_CHANNEL, channel);
|
|
|
|
|
return canResult;
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-10-07 22:43:51 +00:00
|
|
|
tmp12 = cResult[5];
|
|
|
|
|
}
|
2026-10-12 16:32:48 +00:00
|
|
|
const tmpResult = tmp(504);
|
|
|
|
|
const stateFromStores = tmpResult.useStateFromStores(tmp8, tmp11, tmp12);
|
2026-10-07 22:43:51 +00:00
|
|
|
if (cResult[6] === stateFromStores) {
|
2026-10-12 16:32:48 +00:00
|
|
|
class C {
|
|
|
|
|
constructor() {
|
|
|
|
|
const channel = ChannelStore.getChannel(id);
|
|
|
|
|
const canResult = null != channel && PermissionStore.can(Permissions.VIEW_CHANNEL, channel);
|
|
|
|
|
return canResult;
|
|
|
|
|
}
|
2026-10-07 22:43:51 +00:00
|
|
|
}
|
2026-10-12 16:32:48 +00:00
|
|
|
const effect = stateFromStores.useEffect(fn, items2);
|
2026-10-07 22:43:51 +00:00
|
|
|
}
|
2026-10-12 16:32:48 +00:00
|
|
|
fn = function _() {
|
2026-10-07 22:43:51 +00:00
|
|
|
if (null != closure_1) {
|
|
|
|
|
const tmp2 = stateFromStores;
|
|
|
|
|
if (!tmp2) {
|
|
|
|
|
const framesForSurface = FramesStore.getFramesForSurface(tmp);
|
|
|
|
|
for (const item10010 of framesForSurface) {
|
2026-10-12 16:32:48 +00:00
|
|
|
let obj = leaveFrame;
|
2026-10-07 22:43:51 +00:00
|
|
|
let leaveFrameResult = obj.leaveFrame(item10010.id);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
2026-10-12 16:32:48 +00:00
|
|
|
items2 = [tmp5, stateFromStores];
|
2026-10-07 22:43:51 +00:00
|
|
|
cResult[6] = stateFromStores;
|
|
|
|
|
cResult[7] = tmp5;
|
2026-10-12 16:32:48 +00:00
|
|
|
cResult[8] = fn;
|
2026-10-07 22:43:51 +00:00
|
|
|
cResult[9] = items2;
|
2026-10-12 16:32:48 +00:00
|
|
|
}) : (function useChannelAppFrameTeardown(id) {
|
|
|
|
|
let memo;
|
2026-10-07 22:43:51 +00:00
|
|
|
let stateFromStores;
|
|
|
|
|
_require = id;
|
|
|
|
|
id = undefined;
|
|
|
|
|
if (id != null) {
|
|
|
|
|
id = id.id;
|
|
|
|
|
}
|
|
|
|
|
const items = [id];
|
2026-10-12 16:32:48 +00:00
|
|
|
memo = memo.useMemo(() => {
|
2026-10-07 22:43:51 +00:00
|
|
|
let tmp2 = null;
|
|
|
|
|
if (null != id) {
|
|
|
|
|
tmp2 = getFrameSurfaceForChannel(tmp);
|
|
|
|
|
}
|
|
|
|
|
return tmp2;
|
|
|
|
|
}, items);
|
|
|
|
|
let obj = require("get initialized");
|
2026-10-12 16:32:48 +00:00
|
|
|
const items1 = [stateFromStores, PermissionStore];
|
2026-10-07 22:43:51 +00:00
|
|
|
const items2 = [id];
|
|
|
|
|
stateFromStores = obj.useStateFromStores(items1, () => {
|
|
|
|
|
const channel = ChannelStore.getChannel(id);
|
|
|
|
|
const canResult = null != channel && PermissionStore.can(Permissions.VIEW_CHANNEL, channel);
|
|
|
|
|
return canResult;
|
|
|
|
|
}, items2);
|
|
|
|
|
const items3 = [memo, stateFromStores];
|
2026-10-12 16:32:48 +00:00
|
|
|
const effect = memo.useEffect(() => {
|
2026-10-07 22:43:51 +00:00
|
|
|
if (null != memo) {
|
|
|
|
|
const tmp2 = stateFromStores;
|
|
|
|
|
if (!tmp2) {
|
|
|
|
|
const framesForSurface = FramesStore.getFramesForSurface(tmp);
|
|
|
|
|
for (const item10010 of framesForSurface) {
|
2026-10-12 16:32:48 +00:00
|
|
|
let obj = leaveFrame;
|
2026-10-07 22:43:51 +00:00
|
|
|
let leaveFrameResult = obj.leaveFrame(item10010.id);
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, items3);
|
|
|
|
|
});
|
|
|
|
|
const result = size.fileFinishedImporting("modules/frames/useChannelAppFrameTeardown.tsx");
|
|
|
|
|
|
|
|
|
|
export default tmp2;
|