109 lines
6.7 KiB
TypeScript
109 lines
6.7 KiB
TypeScript
/* Metro module 13573; source: modules/quests/native/QuestDock/QuestDockGestureContext.tsx; dependencies: [31, 13570, 6528, 13572, 7553, 33, 8142, 1478, 13574, 4017, 5176, 13571, 1585, 11534, 2] */
|
|
function _fun103170(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13763:6, offset: 0x0225add6, size: 404 bytes, params: 8, frame: 24
|
|
var object2;
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = importAll(31) /* metro dependency 31 */;
|
|
const questDockStore = importDefault(13570) /* metro dependency 13570: QuestDockStore */;
|
|
const QuestDockMode = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
|
|
const questDockConstantsModule = require(13572) /* metro dependency 13572: QuestDockConstants */;
|
|
const env0_6 = questDockConstantsModule.QUEST_DOCK_COLLAPSED_HEIGHT;
|
|
const env0_7 = questDockConstantsModule.QUEST_DOCK_EXPANDED_HEIGHT;
|
|
const env0_8 = (require(7553) /* metro dependency 7553: YouBarConstants */).useYouBarHorizontalMargin;
|
|
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
|
|
const createContext = value.createContext;
|
|
object2 = {};
|
|
const reanimatedHelperTypesModule = require(8142) /* metro dependency 8142: ReanimatedHelperTypes */;
|
|
let createFakeSharedValue = reanimatedHelperTypesModule.createFakeSharedValue;
|
|
object2.questDockWrapperSpecs = Reflect.apply(createFakeSharedValue, reanimatedHelperTypesModule, [{'width': 0,
|
|
'height': 0, 'x': 0, 'y': 0, 'prevDeltaY': 0}]);
|
|
object2.windowDimensions = reanimatedHelperTypesModule.createFakeSharedValue({'width': 0, 'height': 0,
|
|
'maxContentHeight': 0, 'landscape': false});
|
|
const value5 = reanimatedHelperTypesModule;
|
|
createFakeSharedValue = value5.createFakeSharedValue;
|
|
const COLLAPSED = QuestDockMode.COLLAPSED;
|
|
object2.activeQuestDockMode = Reflect.apply(createFakeSharedValue, value5, [COLLAPSED]);
|
|
object2.minExpandedContentHeight = reanimatedHelperTypesModule.createFakeSharedValue(0);
|
|
const context = Reflect.apply(createContext, value, [object2]);
|
|
value = value.memo(QuestDockGestureContextProviderInner);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockGestureContext.tsx');
|
|
exports.QuestDockGestureContext = context;
|
|
exports.QuestDockGestureContextProvider = value;
|
|
}
|
|
|
|
function QuestDockGestureContextProviderInner(a0) { // fn#103171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13763:611, offset: 0x0225af6a, size: 650 bytes, params: 2, frame: 29
|
|
var r10;
|
|
var r8;
|
|
var moduleValue6;
|
|
var moduleValue7;
|
|
let binding = env0_3;
|
|
const useMemo = binding.useMemo;
|
|
const getWindowDimensions = (require(1478) /* metro dependency 1478: useWindowDimensionsNative */).getWindowDimensions;
|
|
const value2 = Reflect.apply(useMemo, binding, [getWindowDimensions, []]);
|
|
const value3 = (require(13574) /* metro dependency 13574: useTabsVisible */).useMainTabsHeight({'enabled': true,
|
|
'ignoreQuestDock': true});
|
|
const env0_1 = binding.useRef(value3);
|
|
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
|
let useSharedValue = reanimatedRexportModule.useSharedValue;
|
|
let width = value2.width;
|
|
const value4 = Reflect.apply(useSharedValue, reanimatedRexportModule, [{width: width, height: value2.height,
|
|
landscape: value2.width > value2.height, maxContentHeight: value2.height - value3}]);
|
|
const value5 = (require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled('QuestDockGestureContext');
|
|
const value6 = useYouBarHorizontalMargin();
|
|
const moduleValue4 = reanimatedRexportModule;
|
|
useSharedValue = moduleValue4.useSharedValue;
|
|
const questDockUtilsModule = require(13571) /* metro dependency 13571: QuestDockUtils */;
|
|
const getQuestDockCollapsedWidth = questDockUtilsModule.getQuestDockCollapsedWidth;
|
|
width = value2.width;
|
|
if (value5) {
|
|
r10 = value6;
|
|
} else {
|
|
moduleValue6 = require(1585) /* metro dependency 1585: useSafeAreaInsetsNative */;
|
|
r10 = moduleValue6.getSafeAreaInsets().left;
|
|
}
|
|
if (value5) {
|
|
r8 = value6;
|
|
} else {
|
|
moduleValue7 = require(1585) /* metro dependency 1585: useSafeAreaInsetsNative */;
|
|
r8 = moduleValue7.getSafeAreaInsets().right;
|
|
}
|
|
const QUEST_DOCK_COLLAPSED_HEIGHT2 = value5 ? -8 : QUEST_DOCK_COLLAPSED_HEIGHT;
|
|
const value8 = Reflect.apply(useSharedValue, moduleValue4, [{width: Reflect.apply(getQuestDockCollapsedWidth,
|
|
questDockUtilsModule, [width, r10, r8]), height: QUEST_DOCK_COLLAPSED_HEIGHT, x: 0,
|
|
y: QUEST_DOCK_COLLAPSED_HEIGHT2, prevDeltaY: 0}]);
|
|
var env0_3 = value8;
|
|
const moduleValue8 = reanimatedRexportModule;
|
|
useSharedValue = moduleValue8.useSharedValue;
|
|
const moduleValue9 = questDockUtilsModule;
|
|
const value9 = Reflect.apply(useSharedValue, moduleValue8,
|
|
[moduleValue9.isSoftDismissed(QuestDockStore.questDockSoftDismissedAt) ? QuestDockMode.SOFT_DISMISSED : QuestDockMode.COLLAPSED]);
|
|
const value10 = reanimatedRexportModule.useSharedValue(QUEST_DOCK_EXPANDED_HEIGHT);
|
|
binding = env0_3;
|
|
binding.useEffect(_fun103172, [value3]);
|
|
binding.useEffect(_fun103173, [value4]);
|
|
const value11 = binding.useMemo(_fun103175, [value4, value8, value9, value10]);
|
|
const Provider = env0_10.Provider;
|
|
return (
|
|
<Provider value={value11}>
|
|
{a0.children}
|
|
</Provider>
|
|
);
|
|
}
|
|
|
|
function _fun103173() { // fn#103173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13763:1334, offset: 0x0225b1f4, size: 41 bytes, params: 1, frame: 11
|
|
var environment;
|
|
const value = environment.__proto__;
|
|
return (importDefault(11534) /* metro dependency 11534: subscribeToWindowDimensionsNative */)(_fun103174);
|
|
}
|
|
|
|
function _fun103175() { // fn#103175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13763:1466, offset: 0x0225b264, size: 43 bytes, params: 1, frame: 3
|
|
return {windowDimensions: env0_2, questDockWrapperSpecs: env0_3, activeQuestDockMode: env0_4,
|
|
minExpandedContentHeight: env0_5};
|
|
}
|
|
|
|
function _fun103174({width, height}) { // fn#103174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13763:1348, offset: 0x0225b21d, size: 71 bytes, params: 2, frame: 15
|
|
env1_2.set({width: width, height: height, landscape: width > height, maxContentHeight: height - env1_1.current});
|
|
}
|
|
|