346 lines
19 KiB
React
346 lines
19 KiB
React
/* Metro module 5270; source: unknown; dependencies: [31, 27, 33, 116, 5271, 63, 44, 5273, 5274] */
|
|
import React from './module-00031-React.js'; /* Metro dependency 31 */
|
|
import Module00116 from './module-00116.js'; /* Metro dependency 116 */
|
|
import * as ReactNativeModule from './module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ReactModule from './module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from './module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
|
|
function _fun46856(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#46856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5448:6, offset: 0x011b1196, size: 336 bytes, params: 8, frame: 23
|
|
let value = this;
|
|
const env0_0 = require;
|
|
let Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const forwardRef = ReactModule.forwardRef;
|
|
React;
|
|
const Image = ReactNativeModule.Image;
|
|
const NativeModules = ReactNativeModule.NativeModules;
|
|
if (value && value.__rest) {
|
|
}
|
|
const env0_13 = (Module00116)({supportedCommands: ['goBack', 'goForward',
|
|
'reload', 'stopLoading', 'injectJavaScript', 'requestFocus', 'postMessage', 'clearFormData', 'clearCache',
|
|
'clearHistory', 'loadUrl']});
|
|
const env0_14 = Image.resolveAssetSource;
|
|
value = forwardRef(_fun46858);
|
|
const RNCWebView = NativeModules.RNCWebView;
|
|
const isFileUploadSupported2 = RNCWebView.isFileUploadSupported();
|
|
Object = global.Object;
|
|
exports.default = Object.assign(value, {isFileUploadSupported: isFileUploadSupported2});
|
|
function _fun46858(a0, a1) { // fn#46858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5448:851, offset: 0x011b12e6, size: 1459 bytes, params: 3, frame: 56
|
|
var r5;
|
|
var console;
|
|
const overScrollMode = a0.overScrollMode;
|
|
const value = 'always';
|
|
const value2 = undefined;
|
|
const r25 = value2 === overScrollMode ? value : overScrollMode;
|
|
const javaScriptEnabled = a0.javaScriptEnabled;
|
|
const r24 = value2 === javaScriptEnabled || javaScriptEnabled;
|
|
const thirdPartyCookiesEnabled = a0.thirdPartyCookiesEnabled;
|
|
const r23 = value2 === thirdPartyCookiesEnabled || thirdPartyCookiesEnabled;
|
|
const scalesPageToFit = a0.scalesPageToFit;
|
|
const r22 = value2 === scalesPageToFit || scalesPageToFit;
|
|
const allowsFullscreenVideo = a0.allowsFullscreenVideo;
|
|
const r21 = value2 !== allowsFullscreenVideo && allowsFullscreenVideo;
|
|
const allowFileAccess = a0.allowFileAccess;
|
|
const r20 = value2 !== allowFileAccess && allowFileAccess;
|
|
const saveFormDataDisabled = a0.saveFormDataDisabled;
|
|
const r19 = value2 !== saveFormDataDisabled && saveFormDataDisabled;
|
|
const cacheEnabled = a0.cacheEnabled;
|
|
const r18 = value2 === cacheEnabled || cacheEnabled;
|
|
const androidHardwareAccelerationDisabled = a0.androidHardwareAccelerationDisabled;
|
|
const r17 = value2 !== androidHardwareAccelerationDisabled && androidHardwareAccelerationDisabled;
|
|
const androidLayerType = a0.androidLayerType;
|
|
const r16 = value2 === androidLayerType ? 'none' : androidLayerType;
|
|
const originWhitelist = a0.originWhitelist;
|
|
const r31 = value2 !== originWhitelist ? originWhitelist : (require(5271) /* metro dependency 5271 */).defaultOriginWhitelist;
|
|
const setSupportMultipleWindows = a0.setSupportMultipleWindows;
|
|
const r15 = value2 === setSupportMultipleWindows || setSupportMultipleWindows;
|
|
const setBuiltInZoomControls = a0.setBuiltInZoomControls;
|
|
const r14 = value2 === setBuiltInZoomControls || setBuiltInZoomControls;
|
|
const setDisplayZoomControls = a0.setDisplayZoomControls;
|
|
const r13 = value2 !== setDisplayZoomControls && setDisplayZoomControls;
|
|
const nestedScrollEnabled = a0.nestedScrollEnabled;
|
|
const r12 = value2 !== nestedScrollEnabled && nestedScrollEnabled;
|
|
const startInLoadingState = a0.startInLoadingState;
|
|
const messagingWithWebViewKeyEnabled = a0.messagingWithWebViewKeyEnabled;
|
|
const onNavigationStateChange = a0.onNavigationStateChange;
|
|
const onLoadStart = a0.onLoadStart;
|
|
const onError = a0.onError;
|
|
const onLoad = a0.onLoad;
|
|
const onLoadEnd = a0.onLoadEnd;
|
|
const onLoadProgress = a0.onLoadProgress;
|
|
let onHttpError = a0.onHttpError;
|
|
let onRenderProcessGone = a0.onRenderProcessGone;
|
|
const onMessage = a0.onMessage;
|
|
const renderLoading = a0.renderLoading;
|
|
const renderError = a0.renderError;
|
|
const style = a0.style;
|
|
const containerStyle = a0.containerStyle;
|
|
const source = a0.source;
|
|
const nativeConfig = a0.nativeConfig;
|
|
let onShouldStartLoadWithRequest = a0.onShouldStartLoadWithRequest;
|
|
const value3 = env0_12(a0, ['overScrollMode', 'javaScriptEnabled', 'thirdPartyCookiesEnabled', 'scalesPageToFit',
|
|
'allowsFullscreenVideo', 'allowFileAccess', 'saveFormDataDisabled', 'cacheEnabled',
|
|
'androidHardwareAccelerationDisabled', 'androidLayerType', 'originWhitelist', 'setSupportMultipleWindows',
|
|
'setBuiltInZoomControls', 'setDisplayZoomControls', 'nestedScrollEnabled', 'startInLoadingState',
|
|
'messagingWithWebViewKeyEnabled', 'onNavigationStateChange', 'onLoadStart', 'onError', 'onLoad', 'onLoadEnd',
|
|
'onLoadProgress', 'onHttpError', 'onRenderProcessGone', 'onMessage', 'renderLoading', 'renderError', 'style',
|
|
'containerStyle', 'source', 'nativeConfig', 'onShouldStartLoadWithRequest']);
|
|
const current = useRef('WebViewMessageHandler'.concat(env0_15 + 1)).current;
|
|
const value5 = null;
|
|
const value6 = useRef(value5);
|
|
const value8 = (require(5271) /* metro dependency 5271 */).useWebWiewLogic({onNavigationStateChange: onNavigationStateChange,
|
|
onLoad: onLoad, onError: onError, onHttpErrorProp: onHttpError, onLoadEnd: onLoadEnd,
|
|
onLoadProgress: onLoadProgress, onLoadStart: onLoadStart, onRenderProcessGoneProp: onRenderProcessGone,
|
|
onMessageProp: onMessage, startInLoadingState: startInLoadingState, originWhitelist: r31,
|
|
onShouldStartLoadWithRequestProp: onShouldStartLoadWithRequest,
|
|
onShouldStartLoadWithRequestCallback: useCallback(_fun46859, [])});
|
|
const onLoadingStart = value8.onLoadingStart;
|
|
onShouldStartLoadWithRequest = value8.onShouldStartLoadWithRequest;
|
|
const onMessage2 = value8.onMessage;
|
|
const viewState = value8.viewState;
|
|
const setViewState = value8.setViewState;
|
|
const lastErrorEvent = value8.lastErrorEvent;
|
|
onHttpError = value8.onHttpError;
|
|
const onLoadingError = value8.onLoadingError;
|
|
const onLoadingFinish = value8.onLoadingFinish;
|
|
const onLoadingProgress = value8.onLoadingProgress;
|
|
onRenderProcessGone = value8.onRenderProcessGone;
|
|
useImperativeHandle(a1, function() {
|
|
return {goForward: _fun46861, goBack: _fun46862, reload: _fun46863, stopLoading: _fun46864,
|
|
postMessage: _fun46865,
|
|
injectJavaScript: _fun46866, requestFocus: _fun46867, clearFormData: _fun46868, clearCache: _fun46869,
|
|
clearHistory: _fun46870};
|
|
}, [setViewState, value6]);
|
|
useEffect(_fun46872, [current, useMemo(function() {
|
|
return {onShouldStartLoadWithRequest: onShouldStartLoadWithRequest, onMessage: onMessage};
|
|
}, [onMessage2, onShouldStartLoadWithRequest])]);
|
|
if (viewState === 'LOADING') {
|
|
r5 = (renderLoading || (require(5271) /* metro dependency 5271 */).defaultRenderLoading)();
|
|
} else if (viewState === 'ERROR') {
|
|
(importDefault(44) /* metro dependency 44 */)(value5 != lastErrorEvent,
|
|
'lastErrorEvent expected to be non-null');
|
|
r5 = (renderError || (require(5271) /* metro dependency 5271 */).defaultRenderError)(lastErrorEvent.domain,
|
|
lastErrorEvent.code, lastErrorEvent.description);
|
|
} else if (viewState === 'IDLE') {
|
|
r5 = value5;
|
|
} else {
|
|
console = global.console;
|
|
console.error('RNCWebView invalid state encountered: '.concat(viewState));
|
|
r5 = value5;
|
|
}
|
|
items2 = [(importDefault(5273) /* metro dependency 5273 */).container];
|
|
items2[1] = (importDefault(5273) /* metro dependency 5273 */).webView;
|
|
items2[2] = style;
|
|
const items3 = [(importDefault(5273) /* metro dependency 5273 */).container, containerStyle];
|
|
if (typeof source !== 'number' && source && 'method' in source) {
|
|
if (source.method !== 'POST') {
|
|
if (source.method === 'GET' && source.body) {
|
|
global.console.warn('WebView: `source.body` is not supported when using GET.');
|
|
}
|
|
} else if (source.headers) {
|
|
global.console.warn('WebView: `source.headers` is not supported when using POST.');
|
|
} else if (source.method === 'GET' && source.body) {
|
|
global.console.warn('WebView: `source.body` is not supported when using GET.');
|
|
}
|
|
}
|
|
const r7 = (value5 == nativeConfig ? value2 : nativeConfig.component) || (importDefault(5274) /* metro dependency 5274 */);
|
|
const Object = global.Object;
|
|
const assign = Object.assign;
|
|
const object = {};
|
|
object.messagingEnabled = typeof onMessage === 'function' || value5 != messagingWithWebViewKeyEnabled && messagingWithWebViewKeyEnabled;
|
|
object.messagingModuleName = current;
|
|
object.onLoadingError = onLoadingError;
|
|
object.onLoadingFinish = onLoadingFinish;
|
|
object.onLoadingProgress = onLoadingProgress;
|
|
object.onLoadingStart = onLoadingStart;
|
|
object.onHttpError = onHttpError;
|
|
object.onRenderProcessGone = onRenderProcessGone;
|
|
object.onMessage = onMessage2;
|
|
object.onShouldStartLoadWithRequest = onShouldStartLoadWithRequest;
|
|
object.ref = value6;
|
|
object.source = resolveAssetSource(source);
|
|
object.style = items2;
|
|
object.overScrollMode = r25;
|
|
object.javaScriptEnabled = r24;
|
|
object.thirdPartyCookiesEnabled = r23;
|
|
object.scalesPageToFit = r22;
|
|
object.allowsFullscreenVideo = r21;
|
|
object.allowFileAccess = r20;
|
|
object.saveFormDataDisabled = r19;
|
|
object.cacheEnabled = r18;
|
|
object.androidHardwareAccelerationDisabled = r17;
|
|
object.androidLayerType = r16;
|
|
object.setSupportMultipleWindows = r15;
|
|
object.setBuiltInZoomControls = r14;
|
|
object.setDisplayZoomControls = r13;
|
|
object.nestedScrollEnabled = r12;
|
|
return (
|
|
<View style={items3}>
|
|
{((Component) => <Component {...Reflect.apply(assign, Object, [{}, value3, object,
|
|
value5 == nativeConfig ? value2 : nativeConfig.props])} key="webViewKey" />)(r7)}
|
|
{r5}
|
|
</View>
|
|
);
|
|
function _fun46859(a0, a1, a2) { // fn#46859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5448:2587, offset: 0x011b1899, size: 79 bytes, params: 4, frame: 15
|
|
var value;
|
|
var binding;
|
|
if (a2) {
|
|
value = environment.__proto__;
|
|
NativeModules.RNCWebView.onShouldStartLoadWithRequestCallback(a0, a2);
|
|
} else if (a0) {
|
|
value = environment.__proto__;
|
|
binding = env1_13;
|
|
binding.loadUrl(env0_1.current, a1);
|
|
}
|
|
}
|
|
|
|
function _fun46860() { // fn#46860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5448:3238, offset: 0x011b18e8, size: 106 bytes, params: 1, frame: 3
|
|
return {goForward: goForward, goBack: goBack_46862, reload: reload_46863, stopLoading: stopLoading,
|
|
postMessage: postMessage, injectJavaScript: injectJavaScript_46866, requestFocus: requestFocus,
|
|
clearFormData: clearFormData, clearCache: clearCache_46869, clearHistory: clearHistory};
|
|
function goForward() { // fn#46861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5448:3266, offset: 0x011b1952, size: 32 bytes, params: 1, frame: 11
|
|
const binding = env2_13;
|
|
return binding.goForward(env1_1.current);
|
|
}
|
|
|
|
function goBack_46862() { // fn#46862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5448:3326, offset: 0x011b1972, size: 32 bytes, params: 1, frame: 11
|
|
const binding = env2_13;
|
|
return binding.goBack(env1_1.current);
|
|
}
|
|
|
|
function reload_46863() { // fn#46863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5448:3380, offset: 0x011b1992, size: 47 bytes, params: 1, frame: 12
|
|
setViewState('LOADING');
|
|
const binding = env2_13;
|
|
binding.reload(env1_1.current);
|
|
}
|
|
|
|
function stopLoading() { // fn#46864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5448:3446, offset: 0x011b19c1, size: 32 bytes, params: 1, frame: 11
|
|
const binding = env2_13;
|
|
return binding.stopLoading(env1_1.current);
|
|
}
|
|
|
|
function postMessage(a0) { // fn#46865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5448:3515, offset: 0x011b19e1, size: 36 bytes, params: 2, frame: 13
|
|
const binding = env2_13;
|
|
return binding.postMessage(env1_1.current, a0);
|
|
}
|
|
|
|
function injectJavaScript_46866(a0) { // fn#46866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5448:3592, offset: 0x011b1a05, size: 36 bytes, params: 2, frame: 13
|
|
const binding = env2_13;
|
|
return binding.injectJavaScript(env1_1.current, a0);
|
|
}
|
|
|
|
function requestFocus() { // fn#46867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5448:3675, offset: 0x011b1a29, size: 32 bytes, params: 1, frame: 11
|
|
const binding = env2_13;
|
|
return binding.requestFocus(env1_1.current);
|
|
}
|
|
|
|
function clearFormData() { // fn#46868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5448:3748, offset: 0x011b1a49, size: 32 bytes, params: 1, frame: 11
|
|
const binding = env2_13;
|
|
return binding.clearFormData(env1_1.current);
|
|
}
|
|
|
|
function clearCache_46869(a0) { // fn#46869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5448:3820, offset: 0x011b1a69, size: 36 bytes, params: 2, frame: 13
|
|
const binding = env2_13;
|
|
return binding.clearCache(env1_1.current, a0);
|
|
}
|
|
|
|
function clearHistory() { // fn#46870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5448:3891, offset: 0x011b1a8d, size: 32 bytes, params: 1, frame: 11
|
|
const binding = env2_13;
|
|
return binding.clearHistory(env1_1.current);
|
|
}
|
|
|
|
}
|
|
|
|
function _fun46872() { // fn#46872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5448:4050, offset: 0x011b1ac6, size: 50 bytes, params: 1, frame: 14
|
|
let value = environment.__proto__;
|
|
value = importDefault(63) /* metro dependency 63 */;
|
|
value.registerCallableModule(current, ReactModule.useImperativeHandle);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function _fun46857(a0, a1) { // fn#46857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5448:309, offset: 0x00d90b09, size: 244 bytes, params: 3, frame: 22
|
|
var r3;
|
|
var r10;
|
|
var r2;
|
|
var r1;
|
|
var propertyName;
|
|
var propertyName2;
|
|
var Object;
|
|
var prototype;
|
|
var hasOwnProperty;
|
|
var value2;
|
|
var indexOf;
|
|
var value3;
|
|
var ownPropertySymbols;
|
|
var length;
|
|
var value5;
|
|
var propertyIsEnumerable;
|
|
var value6;
|
|
var property;
|
|
var value7;
|
|
const object = {};
|
|
const value = 0;
|
|
for (propertyName in a0) {
|
|
Object = global.Object;
|
|
prototype = Object.prototype;
|
|
hasOwnProperty = prototype.hasOwnProperty;
|
|
value2 = hasOwnProperty.call(a0, propertyName);
|
|
if (!value2) {
|
|
r10 = value2;
|
|
continue;
|
|
}
|
|
indexOf = a1.indexOf;
|
|
value3 = Reflect.apply(indexOf, a1, [propertyName]) < value;
|
|
r10 = value3;
|
|
if (!r10) {
|
|
r3 = propertyName2;
|
|
continue;
|
|
}
|
|
object[propertyName] = a0[propertyName];
|
|
r3 = propertyName2;
|
|
}
|
|
if (a0 != null) {
|
|
Object = global.Object;
|
|
if (typeof Object.getOwnPropertySymbols === 'function') {
|
|
Object = global.Object;
|
|
ownPropertySymbols = Object.getOwnPropertySymbols(a0);
|
|
length = ownPropertySymbols.length;
|
|
if (value < length) {
|
|
r2 = value;
|
|
while (true) {
|
|
indexOf = a1.indexOf;
|
|
value5 = Reflect.apply(indexOf, a1, [ownPropertySymbols[r2]]) < value;
|
|
if (value5) {
|
|
Object = global.Object;
|
|
prototype = Object.prototype;
|
|
propertyIsEnumerable = prototype.propertyIsEnumerable;
|
|
value6 = propertyIsEnumerable.call(a0, ownPropertySymbols[r2]);
|
|
r1 = value6;
|
|
} else {
|
|
r1 = value5;
|
|
}
|
|
if (!r1) {
|
|
continue;
|
|
}
|
|
property = ownPropertySymbols[r2];
|
|
object[property] = a0[ownPropertySymbols[r2]];
|
|
value7 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
|
length = ownPropertySymbols.length;
|
|
if (value7 < length) {
|
|
r2 = value7;
|
|
continue;
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return object;
|
|
}
|
|
|
|
global.__d(_fun46856, 5270, [31, 27, 33, 116, 5271, 63, 44, 5273,
|
|
5274]) /* metro module 5270, dependencies: [31, 27, 33, 116, 5271, 63, 44, 5273, 5274] */;
|