218 lines
10 KiB
React
218 lines
10 KiB
React
/* Metro module 1212; source: unknown; dependencies: [6, 7, 15, 17, 18, 31, 27, 1205, 1009, 1206, 1207, 1209, 1210, 1211] */
|
|
function _fun13439(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#13439, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1339:6, offset: 0x00deaf49, size: 285 bytes, params: 8, frame: 20
|
|
var closure;
|
|
let value = this;
|
|
let env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let env0_2 = importDefault(6) /* metro dependency 6 */;
|
|
let env0_3 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_4 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
|
let value2 = importAll(31) /* metro dependency 31 */;
|
|
const value3 = require(27) /* metro dependency 27 */;
|
|
const env0_8 = value3.Appearance;
|
|
const env0_9 = value3.Image;
|
|
const env0_10 = value3.Text;
|
|
const env0_11 = value3.TouchableOpacity;
|
|
if (!(value && value.__awaiter)) {
|
|
closure = function(a0, a1, a2, a3) {
|
|
var r2;
|
|
var value = a2;
|
|
var env0_0 = a0;
|
|
var env0_1 = a1;
|
|
var env0_2 = value;
|
|
var env0_3 = a3;
|
|
r2 = value || global.Promise;
|
|
value = Object.create(r2.prototype, {constructor: {value: r2}});
|
|
var value2 = new r2(_fun13444);
|
|
return value2 instanceof Object ? value2 : value;
|
|
};
|
|
}
|
|
const Component = value2.Component;
|
|
value = _fun13456(Component);
|
|
exports.getCapturedScreenshot = getCapturedScreenshot;
|
|
exports.ScreenshotButton = value;
|
|
}
|
|
|
|
function _isNativeReflectConstruct_13440() { // fn#13440, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1339:223, offset: 0x00deb066, size: 94 bytes, params: 1, frame: 18
|
|
var Boolean;
|
|
var prototype;
|
|
var valueOf;
|
|
var call;
|
|
var Reflect;
|
|
var construct;
|
|
var closure;
|
|
var value;
|
|
var error;
|
|
try {
|
|
Boolean = global.Boolean;
|
|
prototype = Boolean.prototype;
|
|
valueOf = prototype.valueOf;
|
|
call = valueOf.call;
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
Boolean = global.Boolean;
|
|
closure = function() {
|
|
};
|
|
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
|
value = Reflect.apply(call, valueOf, [value]);
|
|
var result = !value;
|
|
} catch (error) {
|
|
}
|
|
return (_isNativeReflectConstruct_13440_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun13443(a0, a1, a2, a3) { // fn#13443, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1339:472, offset: 0x00deb0c4, size: 75 bytes, params: 5, frame: 12
|
|
let value = a2;
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_3 = a3;
|
|
let r2 = value || global.Promise;
|
|
value = Object.create(r2.prototype, {constructor: {value: r2}});
|
|
r2 = new r2(_fun13444);
|
|
return r2 instanceof Object ? r2 : value;
|
|
}
|
|
|
|
function takeScreenshot() { // fn#13450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1339:825, offset: 0x00deb1f4, size: 28 bytes, params: 1, frame: 14
|
|
return env0_13(undefined, undefined, undefined, _fun13452);
|
|
}
|
|
|
|
function _fun13456(a0) { // fn#13456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1339:1131, offset: 0x00deb30f, size: 114 bytes, params: 2, frame: 16
|
|
const closure = ScreenshotButton;
|
|
env0_6(closure, a0);
|
|
return env0_3(closure, [{key: 'componentDidMount', value: function() {
|
|
var env0_0 = this;
|
|
this._themeListener = Appearance.addChangeListener(_fun13459);
|
|
}}, {key: 'componentWillUnmount', value: function() {
|
|
if (this._themeListener) {
|
|
this._themeListener.remove();
|
|
}
|
|
}}, {key: 'render', value: value_13461}]);
|
|
}
|
|
|
|
function getCapturedScreenshot() { // fn#13462, offset: 0x00deb682, size: 15 bytes, params: 1, frame: 3
|
|
return env0_12;
|
|
}
|
|
|
|
function _fun13444(a0, a1) { // fn#13444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1339:518, offset: 0x00deb10f, size: 98 bytes, params: 3, frame: 16
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const closure = step_13447;
|
|
const value2 = importAll.apply(env0_0, require || []);
|
|
closure(value2.next());
|
|
}
|
|
|
|
function* _fun13452() { // fn#13452, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1339:882, offset: 0x00deb219, size: 72 bytes, params: 1, frame: 14
|
|
var environment;
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
env2_0(env2_1[7]).hideScreenshotButton();
|
|
global.setTimeout(_fun13453, 100);
|
|
}
|
|
}
|
|
|
|
function ScreenshotButton(a0) { // fn#13457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1339:1143, offset: 0x00deb381, size: 145 bytes, params: 2, frame: 20
|
|
const value = environment.__proto__;
|
|
env1_2(this, ScreenshotButton);
|
|
const items2 = [a0];
|
|
const value3 = env1_5(ScreenshotButton);
|
|
const value6 = env1_4(this, _isNativeReflectConstruct_13440() ? global.Reflect.construct(value3, items2,
|
|
env1_5(this).constructor) : value3.apply(this, items2));
|
|
(require(1206) /* metro dependency 1206 */).lazyLoadFeedbackIntegration();
|
|
return value6;
|
|
}
|
|
|
|
function value_13458() { // fn#13458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1339:1491, offset: 0x00deb412, size: 42 bytes, params: 1, frame: 12
|
|
this._themeListener = Appearance.addChangeListener(_fun13459);
|
|
}
|
|
|
|
function value_13461() { // fn#13461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1339:1742, offset: 0x00deb43c, size: 582 bytes, params: 1, frame: 26
|
|
const value2 = undefined;
|
|
const theme = (require(1207) /* metro dependency 1207 */).getTheme();
|
|
let Object = global.Object;
|
|
let assign = Object.assign;
|
|
const Object2 = global.Object;
|
|
const value5 = Reflect.apply(assign, Object, [Object2.assign({},
|
|
(require(1209) /* metro dependency 1209 */).defaultScreenshotButtonConfiguration), this.props]);
|
|
const object3 = {};
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
const Object3 = global.Object;
|
|
const assign3 = Object3.assign;
|
|
const moduleValue2 = require(1210) /* metro dependency 1210 */;
|
|
const value6 = Reflect.apply(assign3, Object3, [{},
|
|
moduleValue2.defaultScreenshotButtonStyles(theme).triggerButton]);
|
|
let styles = this.props.styles;
|
|
object3.triggerButton = Reflect.apply(assign, Object, [value6,
|
|
styles === null || value2 === styles ? value2 : styles.triggerButton]);
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
const Object4 = global.Object;
|
|
const assign4 = Object4.assign;
|
|
const moduleValue3 = moduleValue2;
|
|
const value7 = Reflect.apply(assign4, Object4, [{}, moduleValue3.defaultScreenshotButtonStyles(theme).triggerText]);
|
|
styles = this.props.styles;
|
|
object3.triggerText = Reflect.apply(assign, Object, [value7,
|
|
styles === null || value2 === styles ? value2 : styles.triggerText]);
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
const Object5 = global.Object;
|
|
const assign5 = Object5.assign;
|
|
const moduleValue4 = moduleValue2;
|
|
const value8 = Reflect.apply(assign5, Object5, [{}, moduleValue4.defaultScreenshotButtonStyles(theme).triggerIcon]);
|
|
styles = this.props.styles;
|
|
object3.triggerIcon = Reflect.apply(assign, Object, [value8,
|
|
styles === null || value2 === styles ? value2 : styles.triggerIcon]);
|
|
const binding = env1_7;
|
|
const createElement = binding.createElement;
|
|
const object5 = {};
|
|
object5.style = object3.triggerButton;
|
|
object5.onPress = takeScreenshot;
|
|
object5.accessibilityLabel = value5.triggerAriaLabel;
|
|
const createElement2 = binding.createElement;
|
|
const object6 = {};
|
|
object6.uri = (require(1211) /* metro dependency 1211 */).screenshotIcon;
|
|
return Reflect.apply(createElement, binding, [TouchableOpacity, object5, Reflect.apply(createElement2, binding,
|
|
[Image, {source: object6, style: object3.triggerIcon}]), binding.createElement(Text,
|
|
{style: object3.triggerText, testID: 'sentry-feedback-screenshot-button'}, value5.triggerLabel)]);
|
|
}
|
|
|
|
function step_13447(a0) { // fn#13447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1339:646, offset: 0x00deb171, size: 77 bytes, params: 2, frame: 14
|
|
var value;
|
|
if (a0.done) {
|
|
env0_0(a0.value);
|
|
} else {
|
|
value = a0.value;
|
|
value = step_13447Adopt(value);
|
|
value.then(fulfilled_13445, rejected_13446);
|
|
}
|
|
}
|
|
|
|
function _fun13453() { // fn#13453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1339:937, offset: 0x00deb261, size: 28 bytes, params: 1, frame: 14
|
|
return env3_13(undefined, undefined, undefined, _fun13455);
|
|
}
|
|
|
|
function step_13447Adopt(a0) { // fn#13448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1339:681, owner: step_13447.adopt, offset: 0x00deb1be, size: 54 bytes, params: 2, frame: 12
|
|
const value = a0;
|
|
return value instanceof env2_2 ? value : new env2_2(_fun13449);
|
|
}
|
|
|
|
function* _fun13455() { // fn#13455, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1339:979, offset: 0x00deb286, size: 137 bytes, params: 1, frame: 16
|
|
if (true) {
|
|
value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
|
|
var NATIVE = env5_0(env5_1[8]).NATIVE;
|
|
yield NATIVE.captureScreenshot();
|
|
var value3 = undefined;
|
|
if (false) {
|
|
return value3;
|
|
}
|
|
env5_12 = value3 && value3.length > 0 ? value3[0] : 'ErrorCapturingScreenshot';
|
|
env5_0(env5_1[7]).showFeedbackWidget();
|
|
}
|
|
}
|
|
|