2026-10-12 16:32:48 +00:00
|
|
|
// Module ID: 13618
|
|
|
|
|
// Function ID: 13619
|
2026-09-18 19:45:33 +00:00
|
|
|
// Name: ClipsExperiment
|
2026-10-12 16:32:48 +00:00
|
|
|
// Dependencies: [2012, 1390, 1392, 5117, 1453, 558, 576, 504, 4769, 1382, 2]
|
|
|
|
|
// Exports: areClipsAvailable, isClientClipsCapable, isScreenshotKeybindEnabled, isUserPremiumTypeForClipsEarlyAccess, useScreenshotKeybindEnabled
|
2026-09-18 19:45:33 +00:00
|
|
|
|
2026-10-12 16:32:48 +00:00
|
|
|
// Module 13618 (ClipsExperiment)
|
2026-10-02 13:37:24 +00:00
|
|
|
import react from "react" /* 576 */;
|
2026-10-12 16:32:48 +00:00
|
|
|
import PlatformUtilsAll from "PlatformUtils" /* 1382 */;
|
|
|
|
|
import PremiumConstants from "PremiumConstants" /* 1392 */;
|
|
|
|
|
import PremiumUtilsDefault from "PremiumUtils" /* 4769 */;
|
|
|
|
|
import Constants from "Constants" /* 5117 */;
|
|
|
|
|
import MediaEngineStore from "MediaEngineStore" /* 2012 */;
|
|
|
|
|
import UserStore from "UserStore" /* 1390 */;
|
|
|
|
|
import ApexExperiment from "ApexExperiment" /* 1453 */;
|
2026-10-02 13:37:24 +00:00
|
|
|
import ReactCompilerGating from "ReactCompilerGating" /* 558 */;
|
2026-10-01 14:13:23 +00:00
|
|
|
import size from "module_2" /* 2 */;
|
2026-09-18 19:45:33 +00:00
|
|
|
|
2026-10-12 16:32:48 +00:00
|
|
|
let tmp2;
|
|
|
|
|
|
2026-10-01 14:13:23 +00:00
|
|
|
let obj2;
|
2026-10-02 13:37:24 +00:00
|
|
|
let tmp;
|
|
|
|
|
const get_initialized = tmp(504);
|
2026-10-01 14:13:23 +00:00
|
|
|
const PremiumTypes = PremiumConstants.PremiumTypes;
|
2026-10-12 16:32:48 +00:00
|
|
|
const Features = Constants.Features;
|
2026-10-01 14:13:23 +00:00
|
|
|
let obj = { kind: "user", name: "2026-03-clips-experiment", defaultConfig: { enableClips: false, ignorePlatformRestriction: false }, variations: obj2 };
|
|
|
|
|
obj2 = { 1: null, 2: { enableClips: true, ignorePlatformRestriction: false } };
|
|
|
|
|
obj2[2] = { enableClips: true, ignorePlatformRestriction: true };
|
|
|
|
|
const apexExperiment = ApexExperiment.createApexExperiment(obj);
|
2026-10-12 16:32:48 +00:00
|
|
|
function isUserPremiumTypeForClipsEarlyAccess(premiumType) {
|
|
|
|
|
premiumType = undefined;
|
|
|
|
|
const isPremiumAtLeast = PremiumUtilsDefault.isPremiumAtLeast;
|
|
|
|
|
PremiumUtilsDefault;
|
|
|
|
|
if (premiumType != null) {
|
|
|
|
|
premiumType = premiumType.premiumType;
|
|
|
|
|
}
|
|
|
|
|
return isPremiumAtLeast(premiumType, PremiumTypes.TIER_2);
|
|
|
|
|
}
|
|
|
|
|
function isClientClipsCapable(MediaEngineStore) {
|
|
|
|
|
let ignorePlatformRestriction = apexExperiment.getConfig({ location: "isClipsClientCapable" }).ignorePlatformRestriction;
|
|
|
|
|
const mediaEngine = MediaEngineStore.getMediaEngine();
|
|
|
|
|
if (!ignorePlatformRestriction) {
|
|
|
|
|
const obj2 = PlatformUtilsAll;
|
|
|
|
|
ignorePlatformRestriction = obj2.isDesktop() && mediaEngine.supports(Features.CLIPS) && mediaEngine.hasClipsV3Support();
|
|
|
|
|
const isDesktopResult = obj2.isDesktop() && mediaEngine.supports(Features.CLIPS) && mediaEngine.hasClipsV3Support();
|
|
|
|
|
}
|
|
|
|
|
return ignorePlatformRestriction;
|
|
|
|
|
}
|
|
|
|
|
const tmp3 = ReactCompilerGating.isReactCompilerEnabled() ? (function useIsClipsAvailable() {
|
2026-10-02 13:37:24 +00:00
|
|
|
let TIER_2;
|
|
|
|
|
let first;
|
2026-10-12 16:32:48 +00:00
|
|
|
let tmp10;
|
|
|
|
|
let tmp11;
|
|
|
|
|
let tmp14;
|
2026-10-02 13:37:24 +00:00
|
|
|
const obj = react;
|
|
|
|
|
const cResult = obj.c(4);
|
|
|
|
|
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
|
2026-10-12 16:32:48 +00:00
|
|
|
let ignorePlatformRestriction = apexExperiment.getConfig({ location: "isClipsClientCapable" }).ignorePlatformRestriction;
|
|
|
|
|
const mediaEngine = MediaEngineStore.getMediaEngine();
|
|
|
|
|
if (!ignorePlatformRestriction) {
|
|
|
|
|
const obj3 = PlatformUtilsAll;
|
|
|
|
|
ignorePlatformRestriction = obj3.isDesktop() && mediaEngine.supports(Features.CLIPS) && mediaEngine.hasClipsV3Support();
|
|
|
|
|
const isDesktopResult = obj3.isDesktop() && mediaEngine.supports(Features.CLIPS) && mediaEngine.hasClipsV3Support();
|
|
|
|
|
}
|
|
|
|
|
cResult[0] = ignorePlatformRestriction;
|
|
|
|
|
first = ignorePlatformRestriction;
|
2026-09-18 19:45:33 +00:00
|
|
|
} else {
|
2026-10-02 13:37:24 +00:00
|
|
|
first = cResult[0];
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
2026-10-02 13:37:24 +00:00
|
|
|
if (cResult[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
|
|
|
const items = [UserStore];
|
2026-10-12 16:32:48 +00:00
|
|
|
class C {
|
|
|
|
|
constructor() {
|
|
|
|
|
currentUser = closure_1_5.getCurrentUser();
|
|
|
|
|
tmp2 = closure_1_1(closure_1_3[8]);
|
|
|
|
|
premiumType = undefined;
|
|
|
|
|
isPremiumAtLeast = tmp2.isPremiumAtLeast;
|
|
|
|
|
if (currentUser != null) {
|
|
|
|
|
premiumType = currentUser.premiumType;
|
|
|
|
|
}
|
|
|
|
|
return isPremiumAtLeast(premiumType, closure_1_6.TIER_2);
|
2026-10-02 13:37:24 +00:00
|
|
|
}
|
2026-10-12 16:32:48 +00:00
|
|
|
}
|
2026-10-02 13:37:24 +00:00
|
|
|
cResult[1] = items;
|
2026-10-12 16:32:48 +00:00
|
|
|
cResult[2] = C;
|
|
|
|
|
tmp11 = C;
|
|
|
|
|
tmp10 = items;
|
2026-10-02 13:37:24 +00:00
|
|
|
} else {
|
2026-10-12 16:32:48 +00:00
|
|
|
tmp10 = cResult[1];
|
|
|
|
|
tmp11 = cResult[2];
|
2026-10-02 13:37:24 +00:00
|
|
|
}
|
|
|
|
|
const tmpResult = get_initialized;
|
2026-10-12 16:32:48 +00:00
|
|
|
const stateFromStores = tmpResult.useStateFromStores(tmp10, tmp11);
|
2026-10-02 13:37:24 +00:00
|
|
|
if (cResult[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
|
|
|
const config = apexExperiment.getConfig({ location: "useEnableClips" });
|
2026-10-12 16:32:48 +00:00
|
|
|
class C {
|
|
|
|
|
constructor() {
|
|
|
|
|
currentUser = closure_1_5.getCurrentUser();
|
|
|
|
|
tmp2 = closure_1_1(closure_1_3[8]);
|
|
|
|
|
premiumType = undefined;
|
|
|
|
|
isPremiumAtLeast = tmp2.isPremiumAtLeast;
|
|
|
|
|
if (currentUser != null) {
|
|
|
|
|
premiumType = currentUser.premiumType;
|
|
|
|
|
}
|
|
|
|
|
return isPremiumAtLeast(premiumType, closure_1_6.TIER_2);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
tmp14 = config;
|
2026-10-02 13:37:24 +00:00
|
|
|
} else {
|
2026-10-12 16:32:48 +00:00
|
|
|
tmp14 = cResult[3];
|
2026-10-02 13:37:24 +00:00
|
|
|
}
|
2026-10-12 16:32:48 +00:00
|
|
|
return (tmp14.enableClips || stateFromStores) && first;
|
|
|
|
|
}) : (function useIsClipsAvailable() {
|
2026-10-01 14:13:23 +00:00
|
|
|
let TIER_2;
|
2026-10-12 16:32:48 +00:00
|
|
|
let ignorePlatformRestriction = apexExperiment.getConfig({ location: "isClipsClientCapable" }).ignorePlatformRestriction;
|
|
|
|
|
const mediaEngine = MediaEngineStore.getMediaEngine();
|
|
|
|
|
const obj = apexExperiment;
|
|
|
|
|
if (!ignorePlatformRestriction) {
|
|
|
|
|
const obj3 = PlatformUtilsAll;
|
|
|
|
|
ignorePlatformRestriction = obj3.isDesktop() && mediaEngine.supports(Features.CLIPS) && mediaEngine.hasClipsV3Support();
|
|
|
|
|
const isDesktopResult = obj3.isDesktop() && mediaEngine.supports(Features.CLIPS) && mediaEngine.hasClipsV3Support();
|
|
|
|
|
}
|
2026-09-18 19:45:33 +00:00
|
|
|
const items = [UserStore];
|
2026-10-12 16:32:48 +00:00
|
|
|
const obj4 = get_initialized;
|
|
|
|
|
const stateFromStores = obj4.useStateFromStores(items, () => {
|
2026-09-18 19:45:33 +00:00
|
|
|
currentUser = currentUser.getCurrentUser();
|
|
|
|
|
let premiumType;
|
2026-10-01 14:13:23 +00:00
|
|
|
const isPremiumAtLeast = PremiumUtilsDefault.isPremiumAtLeast;
|
|
|
|
|
PremiumUtilsDefault;
|
2026-09-18 19:45:33 +00:00
|
|
|
if (currentUser != null) {
|
|
|
|
|
premiumType = currentUser.premiumType;
|
|
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
return isPremiumAtLeast(premiumType, TIER_2.TIER_2);
|
2026-09-18 19:45:33 +00:00
|
|
|
});
|
2026-10-12 16:32:48 +00:00
|
|
|
const tmp6 = (obj.getConfig({ location: "useEnableClips" }).enableClips || stateFromStores) && ignorePlatformRestriction;
|
|
|
|
|
return tmp6;
|
2026-10-02 13:37:24 +00:00
|
|
|
});
|
|
|
|
|
const result = size.fileFinishedImporting("modules/clips/ClipsExperiment.tsx");
|
|
|
|
|
|
|
|
|
|
export const ClipsExperiment = apexExperiment;
|
|
|
|
|
export const areClipsAvailable = function areClipsAvailable() {
|
2026-10-12 16:32:48 +00:00
|
|
|
let ignorePlatformRestriction = apexExperiment.getConfig({ location: "isClipsClientCapable" }).ignorePlatformRestriction;
|
|
|
|
|
const mediaEngine = MediaEngineStore.getMediaEngine();
|
|
|
|
|
const obj = apexExperiment;
|
|
|
|
|
if (!ignorePlatformRestriction) {
|
|
|
|
|
const obj3 = PlatformUtilsAll;
|
|
|
|
|
ignorePlatformRestriction = obj3.isDesktop() && mediaEngine.supports(Features.CLIPS) && mediaEngine.hasClipsV3Support();
|
|
|
|
|
const isDesktopResult = obj3.isDesktop() && mediaEngine.supports(Features.CLIPS) && mediaEngine.hasClipsV3Support();
|
|
|
|
|
}
|
|
|
|
|
if (ignorePlatformRestriction) {
|
2026-10-02 13:37:24 +00:00
|
|
|
const currentUser = UserStore.getCurrentUser();
|
|
|
|
|
let premiumType;
|
2026-10-12 16:32:48 +00:00
|
|
|
const isPremiumAtLeast = PremiumUtilsDefault.isPremiumAtLeast;
|
2026-10-02 13:37:24 +00:00
|
|
|
PremiumUtilsDefault;
|
|
|
|
|
if (currentUser != null) {
|
|
|
|
|
premiumType = currentUser.premiumType;
|
|
|
|
|
}
|
2026-10-12 16:32:48 +00:00
|
|
|
const tmp13 = isPremiumAtLeast(premiumType, PremiumTypes.TIER_2) || obj.getConfig({ location: "areClipsEnabled" }).enableClips;
|
|
|
|
|
return tmp13;
|
2026-10-02 13:37:24 +00:00
|
|
|
} else {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2026-09-26 17:57:22 +00:00
|
|
|
};
|
2026-10-02 13:37:24 +00:00
|
|
|
export const useIsClipsAvailable = tmp3;
|
|
|
|
|
export { isUserPremiumTypeForClipsEarlyAccess };
|
2026-09-18 19:45:33 +00:00
|
|
|
export function isScreenshotKeybindEnabled() {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
export function useScreenshotKeybindEnabled() {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2026-10-12 16:32:48 +00:00
|
|
|
export { isClientClipsCapable };
|