decord/stable/source/modules/vibegrations/native/VibegrationsDebugLogsTab.tsx
2026-10-06 22:12:49 +00:00

946 lines
32 KiB
TypeScript

// Module ID: 16411
// Function ID: 16412
// Name: VibegrationsDebugLogsTab
// Dependencies: [32, 19, 17, 8492, 21, 4837, 588, 558, 576, 16412, 10604, 6631, 16413, 4833, 1127, 3718, 5436, 5918, 1619, 504, 16414, 9060, 9061, 6472, 16415, 16416, 8176, 2]
// Module 16411 (VibegrationsDebugLogsTab)
import react_native from "react-native" /* 17 */;
import react2 from "react" /* 576 */;
import nativeDefault from "native" /* 588 */;
import _modDef3718 from "module_3718" /* 3718 */;
import Text_Text from "Text/Text" /* 4833 */;
import VibegrationsDebugJson from "VibegrationsDebugJson" /* 16412 */;
import VibegrationsDebugFormat from "VibegrationsDebugFormat" /* 16413 */;
import VibegrationsDebugLabels from "VibegrationsDebugLabels" /* 16414 */;
import _slicedToArray_mod from "_slicedToArray" /* 32 */;
import react from "react" /* 19 */;
import VibegrationsProjectStore_mod from "VibegrationsProjectStore" /* 8492 */;
import Fragment from "Fragment" /* 21 */;
import createStyles_mod from "createStyles" /* 4837 */;
import ReactCompilerGating_mod from "ReactCompilerGating" /* 558 */;
import size from "module_2" /* 2 */;
let onToggle, projectId, set, showSource;
let c9;
let metroImportAll;
let metroImportDefault;
let obj2;
let obj3;
let obj4;
let obj5;
let obj6;
function keyOf(key) {
return String(key.key);
}
let _slicedToArray = _slicedToArray_mod;
const View = react_native.View;
let VibegrationsProjectStore = VibegrationsProjectStore_mod;
({ jsx: metroImportDefault, jsxs: metroImportAll, Fragment: c9 } = Fragment);
let createStyles = createStyles_mod;
let obj = { list: obj2, header: obj3, row: obj4, rowHead: obj5, badge: { textTransform: "uppercase" }, jsonToggle: obj6 };
obj2 = { paddingHorizontal: nativeDefault.space.PX_16 };
createStyles = createStyles.createStyles;
obj3 = { gap: nativeDefault.space.PX_12, paddingBottom: nativeDefault.space.PX_12 };
obj4 = { gap: nativeDefault.space.PX_4, paddingBottom: nativeDefault.space.PX_8 };
obj5 = { flexDirection: "row", alignItems: "baseline", gap: nativeDefault.space.PX_8 };
obj6 = { flexDirection: "row", alignItems: "center", gap: nativeDefault.space.PX_4, alignSelf: "flex-start" };
let closure_10 = createStyles(obj);
let memo = react.memo;
let ReactCompilerGating = ReactCompilerGating_mod;
let closure_11 = memo(ReactCompilerGating.isReactCompilerEnabled() ? ((arg0) => {
let ChevronSmallRightIcon;
let entry;
let expanded;
let intl;
let intl2;
let items;
let items2;
let items4;
let logKey;
let obj11;
let obj6;
let row;
let rowHead;
let tmp12;
let tmp5;
let tmp7;
let tmp9;
const obj = react2;
const cResult = obj.c(38);
({ entry, logKey } = arg0);
({ showSource, expanded, onToggle } = arg0);
const tmp4 = closure_10();
if (cResult[0] !== entry.message) {
const tmpResult = VibegrationsDebugJson;
const extractLogJsonResult = tmpResult.extractLogJson(entry.message);
cResult[0] = entry.message;
cResult[1] = extractLogJsonResult;
tmp5 = extractLogJsonResult;
} else {
tmp5 = cResult[1];
}
let str = "text-default";
if ("error" === entry.level) {
str = "text-feedback-critical";
}
if (expanded) {
ChevronSmallRightIcon = tmp(10604).ChevronSmallDownIcon;
} else {
ChevronSmallRightIcon = tmp(6631).ChevronSmallRightIcon;
}
({ row, rowHead } = tmp4);
if (cResult[2] !== entry.ts) {
const tmpResult2 = VibegrationsDebugFormat;
const formatClockTimeResult = tmpResult2.formatClockTime(entry.ts);
cResult[2] = entry.ts;
cResult[3] = formatClockTimeResult;
tmp7 = formatClockTimeResult;
} else {
tmp7 = cResult[3];
}
if (cResult[4] !== tmp7) {
const obj2 = { variant: "text-xs/normal", color: "text-subtle", children: tmp7 };
const tmp11 = metroImportDefault(Text_Text.Text, obj2);
cResult[4] = tmp7;
cResult[5] = tmp11;
tmp9 = tmp11;
} else {
tmp9 = cResult[5];
}
if (cResult[6] !== entry.level) {
const level = entry.level;
let str2 = "text-feedback-critical";
if ("error" !== level) {
let str3 = "text-muted";
if ("warn" === level) {
str3 = "text-feedback-warning";
}
str2 = str3;
}
cResult[6] = entry.level;
cResult[7] = str2;
tmp12 = str2;
} else {
tmp12 = cResult[7];
}
if (cResult[8] === entry.level) {
if (cResult[9] === tmp4.badge) {
let tmp13;
if (cResult[10] === tmp12) {
tmp13 = cResult[11];
}
if (cResult[12] === entry.source) {
if (cResult[13] === showSource) {
let tmp15;
if (cResult[14] === tmp4.badge) {
tmp15 = cResult[15];
}
if (cResult[16] === entry.kind) {
let tmp19;
if (cResult[17] === tmp4.badge) {
tmp19 = cResult[18];
}
if (cResult[19] === tmp4.rowHead) {
if (cResult[20] === tmp9) {
if (cResult[21] === tmp13) {
if (cResult[22] === tmp15) {
let tmp23;
let tmp31Result;
if (cResult[23] === tmp19) {
tmp23 = cResult[24];
}
if (cResult[25] === ChevronSmallRightIcon) {
if (cResult[26] === entry.message) {
if (cResult[27] === expanded) {
if (cResult[28] === tmp5) {
if (cResult[29] === logKey) {
if (cResult[30] === str) {
if (cResult[31] === metroImportDefault) {
let tmp27;
if (cResult[32] === tmp4.jsonToggle) {
tmp27 = cResult[33];
}
if (cResult[34] === tmp4.row) {
if (cResult[35] === tmp23) {
let tmp38;
if (cResult[36] === tmp27) {
tmp38 = cResult[37];
}
return tmp38;
}
}
const obj3 = { style: row, children: items };
items = [tmp23, tmp27];
const tmp41 = metroImportAll(View, obj3);
cResult[34] = tmp4.row;
cResult[35] = tmp23;
cResult[36] = tmp27;
cResult[37] = tmp41;
tmp38 = tmp41;
}
}
}
}
}
}
}
if (null != tmp5) {
let wkbYxG;
let tmp33 = null;
const tmp32 = React4;
if ("" !== tmp5.prefix) {
const obj4 = { variant: "text-xs/normal", color: str, selectable: true, children: tmp5.prefix };
tmp33 = metroImportDefault(tmp(4833).Text, obj4);
}
const items1 = [tmp33, , ];
const obj5 = {
style: tmp4.jsonToggle,
accessibilityRole: "button",
accessibilityState: obj6,
accessibilityLabel: intl2.string(_modDef3718.ehmgbH),
onPress() {
return onToggle(logKey);
},
children: items2
};
obj6 = { expanded };
const PressableOpacity = tmp(5436).PressableOpacity;
intl2 = tmp(1127).intl;
const obj7 = { size: "xs", color: nativeDefault.colors.TEXT_MUTED };
items2 = [metroImportDefault(ChevronSmallRightIcon, obj7), ];
const items3 = [tmp5.marker, " ", ];
const Text2 = tmp(4833).Text;
const intl3 = tmp(1127).intl;
const formatToPlainString = intl3.formatToPlainString;
if ("[\u2026]" === tmp5.marker) {
wkbYxG = tmp35(3718).lXkB6Z;
} else {
wkbYxG = tmp35(3718).wkbYxG;
}
const obj8 = { variant: "text-xs/medium", color: "text-muted", children: items3 };
const obj9 = { count: tmp5.size };
items3[2] = formatToPlainString(wkbYxG, obj9);
items2[1] = metroImportAll(Text2, obj8);
items1[1] = metroImportAll(PressableOpacity, obj5);
let tmp36Result = null;
if (expanded) {
const obj10 = { variant: "primary", children: metroImportDefault(Text_Text.Text, obj11) };
const Card = tmp(5918).Card;
obj11 = { variant: "text-xs/normal", color: str, selectable: true, children: tmp5.pretty };
tmp36Result = tmp36(Card, obj10);
}
const obj12 = { children: items1 };
items1[2] = tmp36Result;
tmp31Result = tmp31(tmp32, obj12);
} else {
const obj13 = { variant: "text-xs/normal", color: str, selectable: true, children: entry.message };
tmp31Result = metroImportDefault(tmp(4833).Text, obj13);
}
cResult[25] = ChevronSmallRightIcon;
cResult[26] = entry.message;
cResult[27] = expanded;
cResult[28] = tmp5;
cResult[29] = logKey;
cResult[30] = str;
cResult[31] = metroImportDefault;
cResult[32] = tmp4.jsonToggle;
cResult[33] = tmp31Result;
tmp27 = tmp31Result;
}
}
}
}
const obj14 = { style: rowHead, children: items4 };
items4 = [tmp9, tmp13, tmp15, tmp19];
const tmp26 = metroImportAll(View, obj14);
cResult[19] = tmp4.rowHead;
cResult[20] = tmp9;
cResult[21] = tmp13;
cResult[22] = tmp15;
cResult[23] = tmp19;
cResult[24] = tmp26;
tmp23 = tmp26;
}
let tmp20 = null;
if (null != entry.kind) {
const obj15 = { variant: "text-xxs/semibold", color: "text-feedback-critical", style: tmp4.badge, children: intl.string(_modDef3718.GO6JcR) };
const Text = tmp(4833).Text;
intl = tmp(1127).intl;
tmp20 = metroImportDefault(Text, obj15);
}
cResult[16] = entry.kind;
cResult[17] = tmp4.badge;
cResult[18] = tmp20;
tmp19 = tmp20;
}
}
let tmp17 = null;
if (showSource) {
tmp17 = null;
if (null != entry.source) {
const obj16 = { variant: "text-xxs/semibold", color: "text-subtle", style: tmp4.badge, children: entry.source };
tmp17 = metroImportDefault(tmp(4833).Text, obj16);
}
}
cResult[12] = entry.source;
cResult[13] = showSource;
cResult[14] = tmp4.badge;
cResult[15] = tmp17;
tmp15 = tmp17;
}
}
const obj17 = { variant: "text-xxs/semibold", color: tmp12, style: tmp4.badge, children: entry.level };
const tmp14 = metroImportDefault(Text_Text.Text, obj17);
cResult[8] = entry.level;
cResult[9] = tmp4.badge;
cResult[10] = tmp12;
cResult[11] = tmp14;
tmp13 = tmp14;
}) : ((entry) => {
let ChevronSmallRightIcon;
let expanded;
let intl;
let intl2;
let items1;
let items2;
let items4;
let obj14;
let obj9;
let tmp6;
let tmp6Result;
let tmp9Result7;
entry = entry.entry;
({ logKey: importDefault, expanded, onToggle: dependencyMap } = entry);
showSource = entry.showSource;
const tmp = closure_10();
const items = [entry.message];
const memo = react.useMemo(() => {
const obj = VibegrationsDebugJson;
return obj.extractLogJson(entry.message);
}, items);
let str = "text-default";
if ("error" === entry.level) {
str = "text-feedback-critical";
}
if (expanded) {
ChevronSmallRightIcon = tmp3(10604).ChevronSmallDownIcon;
tmp6 = tmp3;
} else {
ChevronSmallRightIcon = tmp3(6631).ChevronSmallRightIcon;
tmp6 = tmp3;
}
let obj = { style: tmp.row, children: items2 };
const obj2 = { style: tmp.rowHead, children: items1 };
const obj3 = { variant: "text-xs/normal", color: "text-subtle", children: tmp6Result.formatClockTime(entry.ts) };
const Text = tmp6(4833).Text;
tmp6Result = tmp6(16413);
items1 = [onToggle(Text, obj3), , , ];
const level = entry.level;
let str2 = "text-feedback-critical";
const Text2 = tmp6(4833).Text;
if ("error" !== level) {
let str3 = "text-muted";
if ("warn" === level) {
str3 = "text-feedback-warning";
}
str2 = str3;
}
const obj4 = { variant: "text-xxs/semibold", color: str2, style: tmp.badge, children: entry.level };
items1[1] = onToggle(Text2, obj4);
let tmp9Result = null;
if (showSource) {
tmp9Result = null;
if (null != entry.source) {
const obj5 = { variant: "text-xxs/semibold", color: "text-subtle", style: tmp.badge, children: entry.source };
tmp9Result = tmp9(tmp6(4833).Text, obj5);
}
}
items1[2] = tmp9Result;
let tmp9Result4 = null;
if (null != entry.kind) {
const obj6 = { variant: "text-xxs/semibold", color: "text-feedback-critical", style: tmp.badge, children: intl.string(_modDef3718.GO6JcR) };
const Text3 = tmp6(4833).Text;
intl = tmp6(1127).intl;
tmp9Result4 = tmp9(Text3, obj6);
}
items1[3] = tmp9Result4;
items2 = [closure_8(View, obj2), ];
if (null != memo) {
let wkbYxG;
let tmp9Result5 = null;
const tmp14 = closure_9;
if ("" !== memo.prefix) {
const obj7 = { variant: "text-xs/normal", color: str, selectable: true, children: memo.prefix };
tmp9Result5 = tmp9(tmp6(4833).Text, obj7);
}
const items3 = [tmp9Result5, , ];
const obj8 = {
style: tmp.jsonToggle,
accessibilityRole: "button",
accessibilityState: obj9,
accessibilityLabel: intl2.string(_modDef3718.ehmgbH),
onPress() {
return dependencyMap(importDefault);
},
children: items4
};
obj9 = { expanded };
const PressableOpacity = tmp6(5436).PressableOpacity;
intl2 = tmp6(1127).intl;
const obj10 = { size: "xs", color: nativeDefault.colors.TEXT_MUTED };
items4 = [onToggle(ChevronSmallRightIcon, obj10), ];
const items5 = [memo.marker, " ", ];
const Text4 = tmp6(4833).Text;
const intl3 = tmp6(1127).intl;
const formatToPlainString = intl3.formatToPlainString;
if ("[\u2026]" === memo.marker) {
wkbYxG = tmp16(3718).lXkB6Z;
} else {
wkbYxG = tmp16(3718).wkbYxG;
}
const obj11 = { variant: "text-xs/medium", color: "text-muted", children: items5 };
const obj12 = { count: memo.size };
items5[2] = formatToPlainString(wkbYxG, obj12);
items4[1] = closure_8(Text4, obj11);
items3[1] = closure_8(PressableOpacity, obj8);
let tmp9Result6 = null;
if (expanded) {
const obj13 = { variant: "primary", children: onToggle(tmp6(4833).Text, obj14) };
const Card = tmp6(5918).Card;
obj14 = { variant: "text-xs/normal", color: str, selectable: true, children: memo.pretty };
tmp9Result6 = tmp9(Card, obj13);
}
const obj15 = { children: items3 };
items3[2] = tmp9Result6;
tmp9Result7 = tmp7(tmp14, obj15);
} else {
const obj16 = { variant: "text-xs/normal", color: str, selectable: true, children: entry.message };
tmp9Result7 = tmp9(tmp6(4833).Text, obj16);
}
items2[1] = tmp9Result7;
return closure_8(View, obj);
}));
ReactCompilerGating = ReactCompilerGating_mod;
let tmp5 = ReactCompilerGating.isReactCompilerEnabled() ? ((projectId) => {
let DEBUG_LOG_FILTERS;
let closure_2;
let closure_3;
let closure_6;
let first;
let first1;
let intl;
let intl2;
let items4;
let str;
let tmp10;
let tmp12;
let tmp13;
let tmp19;
let tmp20;
let tmp8;
let tmp9;
let tmp = projectId;
let obj = projectId(576);
const cResult = obj.c(42);
projectId = projectId.projectId;
const tmp4 = closure_10();
let tmp5 = first1;
const bottom = first1(1619)().bottom;
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
let tmp7 = VibegrationsProjectStore;
const items = [VibegrationsProjectStore];
cResult[0] = items;
first = items;
} else {
first = cResult[0];
}
if (cResult[1] !== projectId) {
const fn = function y() {
return VibegrationsProjectStore.getLogs(projectId);
};
const items1 = [projectId];
cResult[1] = projectId;
cResult[2] = fn;
cResult[3] = items1;
tmp9 = items1;
tmp8 = fn;
} else {
tmp8 = cResult[2];
tmp9 = cResult[3];
}
let tmpResult = tmp(504);
const stateFromStores = tmpResult.useStateFromStores(first, tmp8, tmp9);
if (cResult[4] === Symbol.for("react.memo_cache_sentinel")) {
const items2 = [VibegrationsProjectStore];
cResult[4] = items2;
tmp10 = items2;
} else {
tmp10 = cResult[4];
}
if (cResult[5] !== projectId) {
const fn2 = function _() {
return VibegrationsProjectStore.getHistoryState(projectId, "logs");
};
const items3 = [projectId];
cResult[5] = projectId;
cResult[6] = fn2;
cResult[7] = items3;
tmp13 = items3;
tmp12 = fn2;
} else {
tmp12 = cResult[6];
tmp13 = cResult[7];
}
const tmpResult3 = tmp(504);
const stateFromStores1 = tmpResult3.useStateFromStores(tmp10, tmp12, tmp13);
[first1, dependencyMap] = showSource.useState("all");
[str, tmp19] = showSource.useState("");
const obj4 = showSource;
const tmp15 = _slicedToArray;
if (cResult[8] === Symbol.for("react.memo_cache_sentinel")) {
let obj2 = {
pageWidth: 0,
items: DEBUG_LOG_FILTERS.map((id) => {
let obj2;
const obj = { id, label: obj2.debugLogFilterLabel(id), page: null };
obj2 = projectId(closure_2[20]);
return obj;
}),
onSetActiveIndex(arg0) {
let str = VibegrationsDebugLabels.DEBUG_LOG_FILTERS[arg0];
const tmp = closure_2;
if (str == null) {
str = "all";
}
return tmp(str);
}
};
DEBUG_LOG_FILTERS = tmp(16414).DEBUG_LOG_FILTERS;
cResult[8] = obj2;
tmp20 = obj2;
} else {
tmp20 = cResult[8];
}
const tmpResult4 = tmp(9060);
const segmentedControlState = tmpResult4.useSegmentedControlState(tmp20);
if (cResult[9] === first1) {
if (cResult[10] === stateFromStores) {
let tmp25;
let tmp28;
showSource = tmp24;
const _Symbol = Symbol;
if (cResult[13] === Symbol.for("react.memo_cache_sentinel")) {
class M {
constructor() {
set = new Set();
return set;
}
}
cResult[13] = M;
tmp25 = M;
} else {
class M {
constructor() {
set = new Set();
return set;
}
}
}
const tmp15Result = tmp15(obj4.useState(tmp25), 2);
const first2 = tmp15Result[0];
VibegrationsProjectStore = tmp15Result[1];
const _Symbol2 = Symbol;
if (cResult[14] === Symbol.for("react.memo_cache_sentinel")) {
class J {
constructor(arg0) {
closure_0 = projectId;
tmp = closure_6((items) => {
set = new Set(items);
const tmp = closure_0;
if (!set.delete(closure_0)) {
set.add(tmp);
}
return set;
});
return;
}
}
cResult[14] = J;
tmp28 = J;
} else {
class J {
constructor(arg0) {
closure_0 = projectId;
tmp = closure_6((items) => {
set = new Set(items);
const tmp = closure_0;
if (!set.delete(closure_0)) {
set.add(tmp);
}
return set;
});
return;
}
}
}
J = tmp28;
if (cResult[15] === first2) {
let tmp30;
let tmp32;
class J {
constructor(arg0) {
closure_0 = projectId;
tmp = closure_6((items) => {
set = new Set(items);
const tmp = closure_0;
if (!set.delete(closure_0)) {
set.add(tmp);
}
return set;
});
return;
}
}
if (cResult[18] !== segmentedControlState) {
class J {
constructor(arg0) {
closure_0 = projectId;
tmp = closure_6((items) => {
set = new Set(items);
const tmp = closure_0;
if (!set.delete(closure_0)) {
set.add(tmp);
}
return set;
});
return;
}
}
const obj3 = { state: segmentedControlState, variant: "experimental_Small" };
const tmp31 = J(tmp(9061).SegmentedControl, obj3);
cResult[18] = segmentedControlState;
cResult[19] = tmp31;
tmp30 = tmp31;
} else {
class J {
constructor(arg0) {
closure_0 = projectId;
tmp = closure_6((items) => {
set = new Set(items);
const tmp = closure_0;
if (!set.delete(closure_0)) {
set.add(tmp);
}
return set;
});
return;
}
}
}
const _Symbol3 = Symbol;
if (cResult[20] === Symbol.for("react.memo_cache_sentinel")) {
class J {
constructor(arg0) {
closure_0 = projectId;
tmp = closure_6((items) => {
set = new Set(items);
const tmp = closure_0;
if (!set.delete(closure_0)) {
set.add(tmp);
}
return set;
});
return;
}
}
const obj5 = { accessibilityLabel: intl.string(tmp5(3718)["MX4vr/"]), placeholder: intl2.string(tmp5(3718)["MX4vr/"]), size: "sm", onChange: tmp19 };
const SearchField = tmp(6472).SearchField;
intl = tmp(1127).intl;
intl2 = tmp(1127).intl;
const tmp33 = J(SearchField, obj5);
cResult[20] = tmp33;
tmp32 = tmp33;
} else {
class J {
constructor(arg0) {
closure_0 = projectId;
tmp = closure_6((items) => {
set = new Set(items);
const tmp = closure_0;
if (!set.delete(closure_0)) {
set.add(tmp);
}
return set;
});
return;
}
}
}
if (cResult[21] === stateFromStores1) {
class J {
constructor(arg0) {
closure_0 = projectId;
tmp = closure_6((items) => {
set = new Set(items);
const tmp = closure_0;
if (!set.delete(closure_0)) {
set.add(tmp);
}
return set;
});
return;
}
}
if (cResult[24] === tmp4.header) {
class J {
constructor(arg0) {
closure_0 = projectId;
tmp = closure_6((items) => {
set = new Set(items);
const tmp = closure_0;
if (!set.delete(closure_0)) {
set.add(tmp);
}
return set;
});
return;
}
}
}
const obj6 = { style: tmp4.header, children: items4 };
items4 = [tmp30, tmp32, tmp35];
cResult[24] = tmp4.header;
const tmp41 = closure_8(first2, obj6);
class A {
constructor(item) {
item = item.item;
const obj = { entry: item.log, logKey: item.key, showSource, expanded: first2.has(item.key), onToggle: J };
return metroImportDefault(closure_11, obj);
}
}
cResult[26] = tmp35;
cResult[27] = tmp41;
}
const obj7 = { state: stateFromStores1, hasRows: stateFromStores.length > 0 };
cResult[21] = stateFromStores1;
const tmp37 = J(tmp(16415).VibegrationsHistoryNotice, obj7);
class A {
constructor(item) {
item = item.item;
const obj = { entry: item.log, logKey: item.key, showSource, expanded: first2.has(item.key), onToggle: J };
return metroImportDefault(closure_11, obj);
}
}
cResult[22] = stateFromStores.length > 0;
cResult[23] = tmp37;
}
class A {
constructor(item) {
item = item.item;
const obj = { entry: item.log, logKey: item.key, showSource, expanded: first2.has(item.key), onToggle: J };
return metroImportDefault(closure_11, obj);
}
}
cResult[15] = first2;
cResult[16] = "all" === first1;
cResult[17] = A;
}
}
const str2 = str.trim();
_slicedToArray = str2.toLowerCase();
const found = stateFromStores.filter((log) => {
const obj = VibegrationsDebugLabels;
let isRenderableLogResult = obj.isRenderableLog(log.log);
if (isRenderableLogResult) {
let tmp5 = "all" === first1;
if (!tmp5) {
const tmpResult = VibegrationsDebugFormat;
tmp5 = tmpResult.debugLogEnv(log.log.source) === tmp4;
}
if (tmp5) {
let tmp7 = "" === closure_3;
if (!tmp7) {
const str3 = log.log.message;
const formatted = str3.toLowerCase();
let hasItem = formatted.includes(tmp6);
if (!hasItem) {
const level = log.log.level;
hasItem = level.includes(tmp6);
}
if (!hasItem) {
let flag;
if (log.log.source != null) {
const formatted1 = str4.toLowerCase();
flag = formatted1.includes(tmp6);
}
if (flag == null) {
flag = false;
}
hasItem = flag;
}
tmp7 = hasItem;
}
tmp5 = tmp7;
}
isRenderableLogResult = tmp5;
}
return isRenderableLogResult;
});
cResult[9] = first1;
cResult[10] = stateFromStores;
cResult[11] = str;
cResult[12] = found;
}) : ((projectId) => {
let DEBUG_LOG_FILTERS;
let closure_3;
let closure_7;
let first;
let first1;
let first2;
let intl;
let intl2;
let intl3;
let intl4;
let intl5;
let items6;
let items7;
let tmp10;
let tmp19Result;
projectId = projectId.projectId;
let stateFromStores;
first = undefined;
_slicedToArray = undefined;
first1 = undefined;
first2 = undefined;
let tmp = closure_10();
const tmp4 = projectId;
const bottom = stateFromStores(first[18])().bottom;
let obj = projectId(first[19]);
const items = [first2];
const items1 = [projectId];
stateFromStores = obj.useStateFromStores(items, () => VibegrationsProjectStore.getLogs(projectId), items1);
let obj2 = projectId(first[19]);
const items2 = [first2];
const items3 = [projectId];
const stateFromStores1 = obj2.useStateFromStores(items2, () => VibegrationsProjectStore.getHistoryState(projectId, "logs"), items3);
[first, _slicedToArray] = first1.useState("all");
[first1, tmp10] = first1.useState("");
const obj3 = {
pageWidth: 0,
items: DEBUG_LOG_FILTERS.map((id) => {
let obj2;
const obj = { id, label: obj2.debugLogFilterLabel(id), page: null };
obj2 = projectId(first[20]);
return obj;
}),
onSetActiveIndex(arg0) {
let str = VibegrationsDebugLabels.DEBUG_LOG_FILTERS[arg0];
const tmp = closure_3;
if (str == null) {
str = "all";
}
return tmp(str);
}
};
const useSegmentedControlState = projectId(first[21]).useSegmentedControlState;
projectId(first[21]);
DEBUG_LOG_FILTERS = projectId(first[20]).DEBUG_LOG_FILTERS;
const items4 = [stateFromStores, first, first1];
const segmentedControlState = useSegmentedControlState(obj3);
showSource = tmp14;
const memo = first1.useMemo(() => {
const str = first1.trim();
let closure_0 = str.toLowerCase();
return stateFromStores.filter((log) => {
const obj = VibegrationsDebugLabels;
let isRenderableLogResult = obj.isRenderableLog(log.log);
if (isRenderableLogResult) {
let tmp5 = "all" === first;
if (!tmp5) {
const tmpResult = VibegrationsDebugFormat;
tmp5 = tmpResult.debugLogEnv(log.log.source) === tmp4;
}
if (tmp5) {
let tmp7 = "" === closure_0;
if (!tmp7) {
const str3 = log.log.message;
const formatted = str3.toLowerCase();
let hasItem = formatted.includes(tmp6);
if (!hasItem) {
const level = log.log.level;
hasItem = level.includes(tmp6);
}
if (!hasItem) {
let flag;
if (log.log.source != null) {
const formatted1 = str4.toLowerCase();
flag = formatted1.includes(tmp6);
}
if (flag == null) {
flag = false;
}
hasItem = flag;
}
tmp7 = hasItem;
}
tmp5 = tmp7;
}
isRenderableLogResult = tmp5;
}
return isRenderableLogResult;
});
}, items4);
[first2, onToggle] = first1.useState(() => {
set = new Set();
return set;
});
onToggle = first1.useCallback((arg0) => {
let closure_0 = arg0;
let tmp = closure_7((items) => {
set = new Set(items);
const tmp = closure_0;
if (!set.delete(closure_0)) {
set.add(tmp);
}
return set;
});
}, []);
const items5 = ["all" === first, first2, onToggle];
const callback1 = first1.useCallback((item) => {
item = item.item;
const obj = { entry: item.log, logKey: item.key, showSource, expanded: first2.has(item.key), onToggle: metroImportDefault };
return metroImportDefault(closure_11, obj);
}, items5);
const obj4 = { style: tmp.header, children: items6 };
items6 = [onToggle(projectId(first[22]).SegmentedControl, { state: segmentedControlState, variant: "experimental_Small" }), , ];
const obj5 = { accessibilityLabel: intl.string(stateFromStores(first[15])["MX4vr/"]), placeholder: intl2.string(stateFromStores(first[15])["MX4vr/"]), size: "sm", onChange: tmp10 };
const SearchField = projectId(first[23]).SearchField;
intl = projectId(first[14]).intl;
intl2 = projectId(first[14]).intl;
items6[1] = onToggle(SearchField, obj5);
const obj6 = { state: stateFromStores1, hasRows: stateFromStores.length > 0 };
items6[2] = onToggle(projectId(first[24]).VibegrationsHistoryNotice, obj6);
const tmp20 = onToggle(showSource, obj4);
if (0 === stateFromStores.length) {
const obj7 = { state: stateFromStores1, emptyTitle: intl4.string(stateFromStores(first[15]).mcFyYc), emptyBody: intl5.string(stateFromStores(first[15]).RNN8pX) };
const VibegrationsHistoryPlaceholder = tmp4(tmp3[24]).VibegrationsHistoryPlaceholder;
intl4 = tmp4(tmp3[14]).intl;
intl5 = tmp4(tmp3[14]).intl;
tmp19Result = tmp19(VibegrationsHistoryPlaceholder, obj7);
} else {
const obj8 = { children: intl3.string(stateFromStores(first[15]).oIJbFa) };
const DebugNote = tmp4(tmp3[25]).DebugNote;
intl3 = tmp4(tmp3[14]).intl;
tmp19Result = tmp19(DebugNote, obj8);
}
const obj9 = { data: memo, keyExtractor: keyOf, renderItem: callback1, extraData: callback1, ListHeaderComponent: tmp20, ListEmptyComponent: tmp19Result, contentContainerStyle: items7, keyboardShouldPersistTaps: "handled" };
items7 = [tmp.list, ];
const obj10 = { paddingBottom: stateFromStores(first[6]).space.PX_16 + bottom };
const FlashList = tmp4(tmp3[26]).FlashList;
items7[1] = obj10;
return onToggle(FlashList, obj9);
});
const result = size.fileFinishedImporting("modules/vibegrations/native/VibegrationsDebugLogsTab.tsx");
export default tmp5;