decord/alpha/source/components_native/QRCode.tsx

118 lines
4.7 KiB
TypeScript
Raw Permalink Normal View History

2026-10-12 06:59:38 +00:00
// Module ID: 8734
// Function ID: 8735
// Name: components_native/QRCode
2026-10-12 06:59:38 +00:00
// Dependencies: [109, 19, 17, 21, 5092, 587, 4827, 8735, 5365, 6157, 8749, 8372, 2]
2026-07-20 16:05:17 +00:00
2026-10-12 06:59:38 +00:00
// Module 8734 (components_native/QRCode)
2026-10-03 08:58:59 +00:00
import nativeDefault from "native" /* 587 */;
2026-10-10 08:08:14 +00:00
import native from "native" /* 4827 */;
2026-10-12 06:59:38 +00:00
import FastImageDefault from "FastImage" /* 6157 */;
import QRCodeDefault from "QRCode" /* 8735 */;
import AssetRegistry from "AssetRegistry" /* 8749 */;
import _objectWithoutProperties from "_objectWithoutProperties" /* 109 */;
2026-10-03 08:58:59 +00:00
import react from "react" /* 19 */;
import react_native from "react-native" /* 17 */;
import Fragment from "Fragment" /* 21 */;
2026-10-10 08:08:14 +00:00
import createStyles from "createStyles" /* 5092 */;
2026-10-03 08:58:59 +00:00
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
2026-10-03 08:58:59 +00:00
let hasOwnProperty;
let metroImportAll;
let metroImportDefault;
let metroRequire;
let obj2;
2026-10-09 10:00:15 +00:00
let tmp10;
2026-10-03 08:58:59 +00:00
let tmp7;
2026-10-10 08:08:14 +00:00
const VisualEffectViewDefault = tmp7(5365);
2026-10-12 06:59:38 +00:00
const VisualEffectViewThemedDefault = tmp10(8372);
2026-07-23 10:11:24 +00:00
let closure_3 = ["style", "text", "blur", "accessibilityLabel"];
2026-10-09 10:00:15 +00:00
({ View: hasOwnProperty, StyleSheet: metroRequire } = react_native);
({ jsx: metroImportDefault, jsxs: metroImportAll } = Fragment);
2026-10-03 08:58:59 +00:00
let obj = { qrCode: obj2, qrCodeContainer: { display: "flex", alignSelf: "flex-start", alignItems: "center", justifyContent: "center", position: "relative" }, qrCodeOverlay: { display: "flex", alignItems: "center", justifyContent: "center" }, "size-40": { width: 40, height: 40 }, "size-60": { width: 60, height: 60 } };
obj2 = { display: "flex", alignSelf: "flex-start", padding: nativeDefault.space.PX_8, borderRadius: nativeDefault.radii.xs };
2026-10-09 10:00:15 +00:00
const React4 = createStyles.createLegacyClassComponentStyles(obj);
2026-10-03 08:58:59 +00:00
let obj3 = { SIZE_40: "SIZE_40", SIZE_60: "SIZE_60" };
const frozen = Object.freeze({ [obj3.SIZE_40]: "size-40", [obj3.SIZE_60]: "size-60" });
const PureComponent = react.PureComponent;
2026-07-29 08:29:29 +00:00
class QRCode extends PureComponent {
2026-10-03 08:58:59 +00:00
render() {
let blur;
let items;
let items1;
let obj2;
let style;
let text;
let tmp6;
const props = this.props;
const accessibilityLabel = props.accessibilityLabel;
({ style, text, blur } = props);
2026-10-09 10:00:15 +00:00
const tmp = closure_9(this.context);
2026-10-03 08:58:59 +00:00
const tmp2 = _objectWithoutProperties(props, closure_3);
let tmp3Result = null;
const obj = { accessible: null != accessibilityLabel, accessibilityRole: "image", accessibilityLabel, style: items, children: tmp6(hasOwnProperty, obj2) };
items = [tmp.qrCode, { backgroundColor: tmp2.bgColor }, style];
obj2 = { style: { position: "relative", width: tmp2.size, height: tmp2.size }, children: items1 };
obj3 = { value: text, level: "M" };
const tmp9 = QRCodeDefault;
const merged = Object.assign(tmp2);
2026-10-09 10:00:15 +00:00
items1 = [metroImportDefault(tmp9, obj3), ];
tmp6 = metroImportAll;
2026-10-03 08:58:59 +00:00
if (blur) {
2026-10-09 10:00:15 +00:00
const obj4 = { style: metroRequire.absoluteFill, blurTheme: "dark" };
2026-10-03 08:58:59 +00:00
tmp3Result = tmp3(VisualEffectViewDefault, obj4);
}
items1[1] = tmp3Result;
2026-10-09 10:00:15 +00:00
return metroImportDefault(hasOwnProperty, obj);
2026-07-29 08:29:29 +00:00
}
2026-10-03 08:58:59 +00:00
}
const prototype = QRCode.prototype;
QRCode.contextType = native.ThemeContext;
2026-07-29 08:29:29 +00:00
QRCode.defaultProps = { size: 128, bgColor: "#ffffff", fgColor: "#000000" };
2026-10-03 08:58:59 +00:00
const PureComponent2 = react.PureComponent;
2026-07-29 08:29:29 +00:00
class QRCodeWithOverlay extends PureComponent2 {
2026-10-03 08:58:59 +00:00
render() {
let items;
let items1;
let obj4;
2026-10-09 10:00:15 +00:00
let tmp12;
const tmp = closure_9(this.context);
2026-10-03 08:58:59 +00:00
const props = this.props;
let SIZE_40 = props.overlaySize;
const blur = props.blur;
const tmp2 = frozen;
if (SIZE_40 == null) {
SIZE_40 = obj3.SIZE_40;
}
const obj = { style: tmp.qrCodeContainer, children: items };
const obj2 = { blur: false };
const tmp4 = tmp2[SIZE_40];
const merged = Object.assign(this.props);
2026-10-09 10:00:15 +00:00
items = [metroImportDefault(QRCode, obj2), , ];
obj3 = { style: items1, children: metroImportDefault(tmp12, obj4) };
items1 = [tmp.qrCodeOverlay, metroRequire.absoluteFill];
2026-10-03 08:58:59 +00:00
obj4 = { style: tmp[tmp4], source: AssetRegistry };
2026-10-09 10:00:15 +00:00
tmp12 = FastImageDefault;
items[1] = metroImportDefault(hasOwnProperty, obj3);
2026-10-03 08:58:59 +00:00
let tmp7Result = null;
2026-10-09 10:00:15 +00:00
const tmp5 = metroImportAll;
2026-10-03 08:58:59 +00:00
const tmp6 = hasOwnProperty;
2026-10-09 10:00:15 +00:00
const tmp7 = metroImportDefault;
const tmp9 = metroRequire;
2026-10-03 08:58:59 +00:00
if (blur) {
const obj5 = { style: tmp9.absoluteFill };
tmp7Result = tmp7(VisualEffectViewThemedDefault, obj5);
}
items[2] = tmp7Result;
return tmp5(tmp6, obj);
2026-07-20 16:05:17 +00:00
}
2026-10-03 08:58:59 +00:00
}
const prototype2 = QRCodeWithOverlay.prototype;
QRCodeWithOverlay.contextType = native.ThemeContext;
2026-07-29 08:29:29 +00:00
QRCodeWithOverlay.defaultProps = { size: 144, bgColor: "#ffffff", fgColor: "#000000" };
const result = size.fileFinishedImporting("components_native/QRCode.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default QRCode;
2026-10-03 08:58:59 +00:00
export const QRCodeOverlaySizes = obj3;
2026-07-20 16:05:17 +00:00
export const QR_CODE_OVERLAY_SIZE_MAP = frozen;
2026-07-29 08:29:29 +00:00
export { QRCodeWithOverlay };