252 lines
15 KiB
TypeScript
252 lines
15 KiB
TypeScript
/* Metro module 15643; source: modules/parent_tools/native/RestrictedHoursModal.tsx; dependencies: [57, 31, 27, 1878, 33, 4501, 697, 5461, 1585, 15644, 566, 4017, 4504, 1244, 2224, 6258, 15645, 3868, 4573, 5280, 15646, 5076, 15642, 4571, 10121, 2] */
|
|
function _fun119785(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:6, offset: 0x025194ba, size: 634 bytes, params: 8, frame: 28
|
|
var object2;
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
|
const env0_4 = importAll(31) /* metro dependency 31 */;
|
|
let value = require(27) /* metro dependency 27 */;
|
|
const StyleSheet = value.StyleSheet;
|
|
const env0_5 = value.View;
|
|
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_7 = value.jsx;
|
|
const env0_8 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object2 = {};
|
|
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
|
object2.container = {'flex': 1, 'justifyContent': 'center', 'alignItems': 'center', paddingHorizontal: PX_24};
|
|
const object6 = {};
|
|
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
|
|
object6['zIndex'] = 0;
|
|
object6['backgroundColor'] = 'rgb(0, 3, 40)';
|
|
object2.backgroundFill = object6;
|
|
const object7 = {};
|
|
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
|
|
object7['zIndex'] = 1;
|
|
object2.assetLayers = object7;
|
|
const object8 = {};
|
|
copyDataProperties(object8, StyleSheet.absoluteFillObject, undefined);
|
|
object2.sunbeamGradient = object8;
|
|
object2.riveContainer = {'width': '100%', 'maxWidth': 523, 'height': 300};
|
|
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object2.content = {'alignItems': 'center', 'width': '100%', 'gap': null, 'zIndex': 2, gap: PX_16};
|
|
object2.description = {textAlign: 'center'};
|
|
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
|
object2.footer = {'position': 'absolute', 'bottom': null, 'alignSelf': 'center', 'zIndex': 2, bottom: PX_32};
|
|
const object10 = {};
|
|
copyDataProperties(object10, StyleSheet.absoluteFillObject, undefined);
|
|
object10['zIndex'] = 10;
|
|
object10['justifyContent'] = 'center';
|
|
object10['alignItems'] = 'center';
|
|
object10['backgroundColor'] = 'rgb(0, 3, 40)';
|
|
object2.logoutBlockingLayer = object10;
|
|
const env0_10 = Reflect.apply(createStyles, value, [object2]);
|
|
object2 = {MAIN: 'main'};
|
|
object2 = {code: 'function RestrictedHoursModalTsx1(){const{backgroundOpacity}=this.__closure;return{opacity:backgroundOpacity.get()};}'};
|
|
object2 = {code: 'function RestrictedHoursModalTsx2(){const{gradientOpacity}=this.__closure;return{opacity:gradientOpacity.get()};}'};
|
|
object2 = {code: 'function RestrictedHoursModalTsx3(){const{contentOpacity,contentScale}=this.__closure;return{opacity:contentOpacity.get(),transform:[{scale:contentScale.get()}]};}'};
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/RestrictedHoursModal.tsx');
|
|
exports.default = RestrictedHoursModal;
|
|
}
|
|
|
|
function RestrictedHoursLogoutBlockingLayer({visible}) { // fn#119786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:898, offset: 0x02519734, size: 119 bytes, params: 2, frame: 18
|
|
const styles = useStyles();
|
|
return visible ? <View style={styles.logoutBlockingLayer} pointerEvents="auto" accessibilityLiveRegion="polite">{((ActivityIndicator) => <ActivityIndicator size="large" />)((require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator)}</View> : null;
|
|
}
|
|
|
|
function RestrictedHoursScreen({onLogin, logoutRequestInFlight}) { // fn#119787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:1554, offset: 0x025197ab, size: 1290 bytes, params: 2, frame: 35
|
|
var object2;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const styles = useStyles();
|
|
const {top, bottom} = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
|
|
const value3 = (importDefault(15644) /* metro dependency 15644: useFormattedEndTime */)();
|
|
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun119788);
|
|
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
|
const value6 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
|
const value7 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
|
const value8 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0.9);
|
|
value8.useEffect(_fun119789, [value5, value6, value7, value8]);
|
|
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
|
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
|
let closure = RestrictedHoursScreenM;
|
|
closure.__closure = {backgroundOpacity: value5};
|
|
closure.__workletHash = 17073775693336;
|
|
closure.__initData = env0_12;
|
|
const value9 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
|
const moduleValue7 = reanimatedRexportModule;
|
|
useAnimatedStyle = moduleValue7.useAnimatedStyle;
|
|
closure = RestrictedHoursScreenO;
|
|
closure.__closure = {gradientOpacity: value6};
|
|
closure.__workletHash = 16592270370139;
|
|
closure.__initData = env0_13;
|
|
const value10 = Reflect.apply(useAnimatedStyle, moduleValue7, [closure]);
|
|
const moduleValue8 = reanimatedRexportModule;
|
|
useAnimatedStyle = moduleValue8.useAnimatedStyle;
|
|
closure = RestrictedHoursScreenZ;
|
|
closure.__closure = {contentOpacity: value7, contentScale: value8};
|
|
closure.__workletHash = 15616799997783;
|
|
closure.__initData = env0_14;
|
|
const value11 = Reflect.apply(useAnimatedStyle, moduleValue8, [closure]);
|
|
const r24 = value3 != null ? intl.format((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).VfqJvY,
|
|
{endTime: value3}) : intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).abikhN);
|
|
const ModalScreen = (require(6258) /* metro dependency 6258: ModalScreenNative */).ModalScreen;
|
|
object2 = {backgroundColor: env0_9};
|
|
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
|
const items5 = [styles.container];
|
|
items5[1] = {paddingTop: top, paddingBottom: bottom};
|
|
items5[2] = value9;
|
|
const items2 = [<View style={styles.backgroundFill} pointerEvents="none" />];
|
|
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
|
const items3 = [styles.assetLayers, value10];
|
|
const Image = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).Image;
|
|
items2[1] = <View3 style={items3} pointerEvents="none"><Image source={require(15645) /* metro dependency 15645 */} resizeMode="cover" style={styles.sunbeamGradient} /></View3>;
|
|
const View4 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
|
const items4 = [styles.content, value11];
|
|
const TeenScreenTimeRive = (require(3868) /* metro dependency 3868: native */).TeenScreenTimeRive;
|
|
const view = <View style={styles.riveContainer}><TeenScreenTimeRive artboard="Teen Screen Time Illo" stateMachine="State Machine 1" /></View>;
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
items2[2] = <View4 style={items4}>{view}<Text variant="text-lg/medium" color="text-overlay-light" style={styles.description}>{r24}</Text></View4>;
|
|
items2[3] = <View style={styles.footer}><Text variant="text-sm/medium" color="text-subtle" style={styles.description}>{intl.format((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).iqeKDz,
|
|
{username: value4, loginHook: loginHook})}</Text></View>;
|
|
return (
|
|
<ModalScreen {...object2}>
|
|
<View2 style={items5}>
|
|
{items2}
|
|
</View2>
|
|
<RestrictedHoursLogoutBlockingLayer visible={logoutRequestInFlight} />
|
|
</ModalScreen>
|
|
);
|
|
}
|
|
|
|
function RestrictedHoursModal() { // fn#119794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:3988, offset: 0x02519f18, size: 294 bytes, params: 1, frame: 20
|
|
const value2 = (importDefault(15646) /* metro dependency 15646: useIsInRestrictedHours */)();
|
|
const env0_1 = env0_4.useRef(false);
|
|
const env0_2 = env0_4.useRef(true);
|
|
env0_4.useEffect(_fun119795, []);
|
|
const [property, env0_3] = env0_3Binding(env0_4.useState(false), 2);
|
|
const value6 = RestrictedHoursModalUseScreens(env0_4.useCallback(_fun119800, []), property);
|
|
env0_4.useEffect(_fun119802, [value2]);
|
|
(importDefault(4571) /* metro dependency 4571: useBackPressHandler */)(function() {
|
|
return true;
|
|
});
|
|
const Modal = (require(10121) /* metro dependency 10121: ModalNative */).Modal;
|
|
const MAIN = env0_11.MAIN;
|
|
return <Modal screens={value6} initialRouteName={MAIN} />;
|
|
}
|
|
|
|
function _fun119788() { // fn#119788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:1710, offset: 0x02519cb5, size: 49 bytes, params: 1, frame: 11
|
|
const value = environment.__proto__;
|
|
const username = UserStore.getCurrentUser()?.username;
|
|
return username ?? '';
|
|
}
|
|
|
|
function _fun119789() { // fn#119789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:1925, offset: 0x02519ce6, size: 484 bytes, params: 1, frame: 31
|
|
let binding = env0_1;
|
|
let set = binding.set;
|
|
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
|
let withTiming = timingModule.withTiming;
|
|
let object2 = {duration: 3000};
|
|
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
|
object2.easing = Easing.bezier(0.24, 0.27, 0.58, 1);
|
|
Reflect.apply(set, binding, [Reflect.apply(withTiming, timingModule, [1, object2])]);
|
|
binding = env0_2;
|
|
set = binding.set;
|
|
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
|
let withDelay = reanimatedRexportModule.withDelay;
|
|
const moduleValue3 = timingModule;
|
|
withTiming = moduleValue3.withTiming;
|
|
object2 = {duration: 1500};
|
|
object2.easing = Easing.bezier(0, 0, 1, 1);
|
|
Reflect.apply(set, binding, [Reflect.apply(withDelay, reanimatedRexportModule, [1500, Reflect.apply(withTiming,
|
|
moduleValue3, [1, object2])])]);
|
|
binding = env0_3;
|
|
set = binding.set;
|
|
const moduleValue4 = reanimatedRexportModule;
|
|
withDelay = moduleValue4.withDelay;
|
|
const moduleValue5 = timingModule;
|
|
withTiming = moduleValue5.withTiming;
|
|
object2 = {duration: 1000};
|
|
object2.easing = Easing.bezier(0.1, 0.24, 0.32, 1);
|
|
Reflect.apply(set, binding, [Reflect.apply(withDelay, moduleValue4, [2000, Reflect.apply(withTiming, moduleValue5,
|
|
[1, object2])])]);
|
|
binding = env0_4;
|
|
set = binding.set;
|
|
const value = reanimatedRexportModule;
|
|
withDelay = value.withDelay;
|
|
const moduleValue6 = timingModule;
|
|
withTiming = moduleValue6.withTiming;
|
|
object2 = {duration: 1000};
|
|
object2.easing = Easing.bezier(0.1, 0.24, 0.32, 1);
|
|
Reflect.apply(set, binding, [Reflect.apply(withDelay, value, [2000, Reflect.apply(withTiming, moduleValue6, [1,
|
|
object2])])]);
|
|
}
|
|
|
|
function loginHook(a0, a1) { // fn#119793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:3737, owner: RestrictedHoursScreen.loginHook, offset: 0x02519eca, size: 78 bytes, params: 3, frame: 15
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
return (
|
|
<Text
|
|
variant="text-sm/normal"
|
|
color="text-link"
|
|
onPress={onLogin}
|
|
key={a1}
|
|
>
|
|
{a0}
|
|
</Text>
|
|
);
|
|
}
|
|
|
|
function _fun119795() { // fn#119795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:4080, offset: 0x0251a03e, size: 26 bytes, params: 1, frame: 2
|
|
env0_2.current = true;
|
|
return _fun119796;
|
|
}
|
|
|
|
function RestrictedHoursModalUseScreens(a0, a1) { // fn#119797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:4169, owner: RestrictedHoursModal.useScreens, offset: 0x0251a058, size: 74 bytes, params: 3, frame: 15
|
|
var environment;
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const value = environment.__proto__;
|
|
return (require(5280) /* metro dependency 5280: NavigatorNative */).useNavigatorScreens(_fun119798, [a0, a1]);
|
|
}
|
|
|
|
function _fun119800() { // fn#119800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:4379, offset: 0x0251a100, size: 102 bytes, params: 1, frame: 12
|
|
var environment;
|
|
var value;
|
|
if (!env0_1.current) {
|
|
env0_1.current = true;
|
|
env0_3(true);
|
|
value = environment.__proto__;
|
|
value = importDefault(5076) /* metro dependency 5076: AuthenticationActionCreators */;
|
|
value = value.logout('restricted_hours');
|
|
value.finally(_fun119801);
|
|
}
|
|
}
|
|
|
|
function _fun119802() { // fn#119802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:4530, offset: 0x0251a190, size: 61 bytes, params: 1, frame: 11
|
|
var value;
|
|
if (!(env0_0 || env0_1.current)) {
|
|
value = environment.__proto__;
|
|
value = require(15642) /* metro dependency 15642: RestrictedHoursActionCreatorsNative */;
|
|
value.closeRestrictedHoursModal();
|
|
}
|
|
}
|
|
|
|
function _fun119798() { // fn#119798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:4231, offset: 0x0251a0a2, size: 50 bytes, params: 1, frame: 4
|
|
const MAIN = env2_11.MAIN;
|
|
return {[MAIN]: {'headerShown': false, 'gestureEnabled': false, render: render_119799}};
|
|
}
|
|
|
|
function _fun119801() { // fn#119801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:4460, offset: 0x0251a166, size: 42 bytes, params: 1, frame: 11
|
|
if (env1_2.current) {
|
|
env1_1.current = false;
|
|
env1_3(false);
|
|
}
|
|
}
|
|
|
|
function render_119799() { // fn#119799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:4287, offset: 0x0251a0d4, size: 44 bytes, params: 1, frame: 14
|
|
return <RestrictedHoursScreen onLogin={env1_0} logoutRequestInFlight={require} />;
|
|
}
|
|
|