Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4975.js (118.4 MB)
233 lines
8 KiB
TypeScript
233 lines
8 KiB
TypeScript
// Module ID: 10279
|
|
// Function ID: 10280
|
|
// Name: VolumeSlider
|
|
// Dependencies: [109, 19, 17, 4815, 21, 1368, 4790, 558, 568, 580, 4494, 10280, 5261, 1119, 8586, 5353, 2]
|
|
|
|
// Module 10279 (VolumeSlider)
|
|
import nativeDefault from "native" /* 580 */;
|
|
import useToken from "useToken" /* 4494 */;
|
|
import PerceptualVolumeUtils from "PerceptualVolumeUtils" /* 5261 */;
|
|
import VoiceNormalIcon from "VoiceNormalIcon" /* 5353 */;
|
|
import _modDef8586 from "module_8586" /* 8586 */;
|
|
import VoiceXIcon from "VoiceXIcon" /* 10280 */;
|
|
import _objectWithoutProperties from "_objectWithoutProperties" /* 109 */;
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
const require = globalThis.__r;
|
|
|
|
require = fn;
|
|
let closure_3 = ["style", "maxTrackTintColor", "value", "maxVolume", "onValueChange", "onResponderGrant", "accessibilityLabel"];
|
|
const View = fn(17).View;
|
|
let closure_6 = fn(4815).MAX_EMBEDDED_VOLUME_PERCEPTUAL;
|
|
const jsxProd = fn(21);
|
|
({ jsx: closure_7, jsxs: closure_8 } = jsxProd);
|
|
const PlatformUtils = fn(1368);
|
|
let num = 16;
|
|
if (PlatformUtils.isAndroid()) {
|
|
num = 0;
|
|
}
|
|
const createStyles = fn(4790);
|
|
let closure_9 = createStyles.createStyles({ volumerSlider: { flexDirection: "row", alignItems: "center" }, leftIcon: { marginRight: num }, rightIcon: { marginLeft: num }, volumerSliderNative: { flex: 1, marginVertical: -10, backgroundColor: "transparent" } });
|
|
const ReactCompilerGating = fn(558);
|
|
const size = fn(2);
|
|
let result = size.fileFinishedImporting("components_native/common/VolumeSlider.tsx");
|
|
|
|
export default ReactCompilerGating.isReactCompilerEnabled() ? ((arg0) => {
|
|
const cResult = require("c").c(38);
|
|
if (cResult[0] !== arg0) {
|
|
({ style, maxTrackTintColor, value, maxVolume, onValueChange } = arg0);
|
|
_require = onValueChange;
|
|
({ onResponderGrant, accessibilityLabel } = arg0);
|
|
const tmp13 = _objectWithoutProperties(arg0, closure_3);
|
|
cResult[0] = arg0;
|
|
cResult[1] = accessibilityLabel;
|
|
cResult[2] = onResponderGrant;
|
|
cResult[3] = onValueChange;
|
|
cResult[4] = tmp13;
|
|
cResult[5] = style;
|
|
cResult[6] = maxTrackTintColor;
|
|
cResult[7] = maxVolume;
|
|
cResult[8] = value;
|
|
let tmp10 = value;
|
|
let tmp9 = maxVolume;
|
|
let PRIMARY_400 = maxTrackTintColor;
|
|
let tmp8 = style;
|
|
let tmp7 = tmp13;
|
|
let tmp5 = onResponderGrant;
|
|
let tmp4 = accessibilityLabel;
|
|
} else {
|
|
tmp4 = cResult[1];
|
|
tmp5 = cResult[2];
|
|
_require = cResult[3];
|
|
tmp7 = cResult[4];
|
|
tmp8 = cResult[5];
|
|
PRIMARY_400 = cResult[6];
|
|
tmp9 = cResult[7];
|
|
tmp10 = cResult[8];
|
|
}
|
|
if (undefined === PRIMARY_400) {
|
|
PRIMARY_400 = nativeDefault.unsafe_rawColors.PRIMARY_400;
|
|
}
|
|
if (undefined === tmp9) {
|
|
tmp9 = closure_6;
|
|
}
|
|
const tmp15 = closure_9();
|
|
const obj = require("c");
|
|
let minTrackColor = tmp7.minTrackColor;
|
|
if (minTrackColor == null) {
|
|
minTrackColor = tmpResult.useToken(nativeDefault.colors.BACKGROUND_BRAND);
|
|
}
|
|
if (cResult[9] === tmp8) {
|
|
if (cResult[12] !== tmp15.leftIcon) {
|
|
const obj2 = { style: tmp15.leftIcon };
|
|
const tmp20 = closure_7(tmp(10280).VoiceXIcon, obj2);
|
|
cResult[12] = tmp15.leftIcon;
|
|
cResult[13] = tmp20;
|
|
}
|
|
if (cResult[14] !== tmp10) {
|
|
const result = tmp(5261).amplitudeToPerceptual(tmp10);
|
|
cResult[14] = tmp10;
|
|
cResult[15] = result;
|
|
let tmp21 = result;
|
|
const tmpResult2 = tmp(5261);
|
|
} else {
|
|
tmp21 = cResult[15];
|
|
}
|
|
if (cResult[16] !== tmp4) {
|
|
let stringResult = tmp4;
|
|
if (tmp4 == null) {
|
|
const intl = tmp(1119).intl;
|
|
stringResult = intl.string(tmp(1119).t.xPHVBs);
|
|
}
|
|
cResult[16] = tmp4;
|
|
cResult[17] = stringResult;
|
|
let tmp23 = stringResult;
|
|
} else {
|
|
tmp23 = cResult[17];
|
|
}
|
|
if (cResult[18] !== tmp6) {
|
|
class L {
|
|
constructor(arg0) {
|
|
obj = closure_0(closure_2[12]);
|
|
return closure_0(obj.perceptualToAmplitude(arg0));
|
|
}
|
|
}
|
|
cResult[18] = tmp6;
|
|
cResult[19] = L;
|
|
} else {
|
|
class L {
|
|
constructor(arg0) {
|
|
obj = closure_0(closure_2[12]);
|
|
return closure_0(obj.perceptualToAmplitude(arg0));
|
|
}
|
|
}
|
|
}
|
|
if (cResult[20] !== tmp5) {
|
|
class L {
|
|
constructor(arg0) {
|
|
obj = closure_0(closure_2[12]);
|
|
return closure_0(obj.perceptualToAmplitude(arg0));
|
|
}
|
|
}
|
|
if (tmp5 == null) {
|
|
class L {
|
|
constructor(arg0) {
|
|
obj = closure_0(closure_2[12]);
|
|
return closure_0(obj.perceptualToAmplitude(arg0));
|
|
}
|
|
}
|
|
if (obj5.isAndroid()) {
|
|
class L {
|
|
constructor(arg0) {
|
|
obj = closure_0(closure_2[12]);
|
|
return closure_0(obj.perceptualToAmplitude(arg0));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
cResult[20] = tmp5;
|
|
cResult[21] = tmp27;
|
|
} else {
|
|
class L {
|
|
constructor(arg0) {
|
|
obj = closure_0(closure_2[12]);
|
|
return closure_0(obj.perceptualToAmplitude(arg0));
|
|
}
|
|
}
|
|
}
|
|
if (cResult[22] === PRIMARY_400) {
|
|
class L {
|
|
constructor(arg0) {
|
|
obj = closure_0(closure_2[12]);
|
|
return closure_0(obj.perceptualToAmplitude(arg0));
|
|
}
|
|
}
|
|
}
|
|
const obj3 = { style: tmp15.volumerSliderNative, value: tmp21, minimumValue: 0, maximumValue: tmp9, minimumTrackTintColor: minTrackColor, maximumTrackTintColor: PRIMARY_400, accessibilityLabel: tmp23, onValueChange: tmp25, onResponderGrant: tmp26 };
|
|
const tmp31 = closure_7(_modDef8586, obj3);
|
|
cResult[22] = PRIMARY_400;
|
|
cResult[23] = tmp9;
|
|
cResult[24] = minTrackColor;
|
|
cResult[25] = tmp15.volumerSliderNative;
|
|
cResult[26] = tmp21;
|
|
cResult[27] = tmp23;
|
|
cResult[28] = tmp25;
|
|
cResult[29] = tmp26;
|
|
cResult[30] = tmp31;
|
|
}
|
|
const items = [tmp15.volumerSlider, tmp8];
|
|
cResult[9] = tmp8;
|
|
cResult[10] = tmp15.volumerSlider;
|
|
cResult[11] = items;
|
|
}) : ((maxTrackTintColor) => {
|
|
let PRIMARY_400 = maxTrackTintColor.maxTrackTintColor;
|
|
if (PRIMARY_400 === undefined) {
|
|
PRIMARY_400 = nativeDefault.unsafe_rawColors.PRIMARY_400;
|
|
}
|
|
({ maxVolume, value } = maxTrackTintColor);
|
|
if (maxVolume === undefined) {
|
|
maxVolume = closure_6;
|
|
}
|
|
({ onValueChange: require, onResponderGrant, accessibilityLabel } = maxTrackTintColor);
|
|
const merged = Object.assign(maxTrackTintColor, Object.assign({ style: 0, maxTrackTintColor: 0, value: 0, maxVolume: 0, onValueChange: 0, onResponderGrant: 0, accessibilityLabel: 0 }));
|
|
const tmp4 = closure_9();
|
|
let minTrackColor = merged.minTrackColor;
|
|
if (minTrackColor == null) {
|
|
minTrackColor = obj.useToken(nativeDefault.colors.BACKGROUND_BRAND);
|
|
}
|
|
const obj2 = { style: null, children: null };
|
|
const items = [tmp4.volumerSlider, maxTrackTintColor.style];
|
|
obj2.style = items;
|
|
const items1 = [closure_7(VoiceXIcon.VoiceXIcon, { style: tmp4.leftIcon }), , ];
|
|
const obj4 = { style: tmp4.volumerSliderNative, value: null, minimumValue: 0, maximumValue: null, minimumTrackTintColor: null, maximumTrackTintColor: null, accessibilityLabel: null, onValueChange: null, onResponderGrant: null };
|
|
obj = useToken;
|
|
const obj3 = { style: tmp4.leftIcon };
|
|
const tmp8 = closure_8;
|
|
const tmp9 = View;
|
|
const tmp7Result = _modDef8586;
|
|
obj4.value = PerceptualVolumeUtils.amplitudeToPerceptual(value);
|
|
obj4.maximumValue = maxVolume;
|
|
obj4.minimumTrackTintColor = minTrackColor;
|
|
obj4.maximumTrackTintColor = PRIMARY_400;
|
|
if (accessibilityLabel == null) {
|
|
const intl = tmp5(1119).intl;
|
|
accessibilityLabel = intl.string(tmp5(1119).t.xPHVBs);
|
|
}
|
|
obj4.accessibilityLabel = accessibilityLabel;
|
|
obj4.onValueChange = function onValueChange(arg0) {
|
|
return _require(PerceptualVolumeUtils.perceptualToAmplitude(arg0));
|
|
};
|
|
if (onResponderGrant == null) {
|
|
let fn;
|
|
if (tmp5Result2.isAndroid()) {
|
|
fn = () => true;
|
|
}
|
|
onResponderGrant = fn;
|
|
tmp5Result2 = tmp5(1368);
|
|
}
|
|
obj4.onResponderGrant = onResponderGrant;
|
|
items1[1] = closure_7(tmp7Result, obj4);
|
|
items1[2] = closure_7(VoiceNormalIcon.VoiceNormalIcon, { style: tmp4.rightIcon });
|
|
obj2.children = items1;
|
|
return tmp8(tmp9, obj2);
|
|
});
|