decord/beta/source/utils/native/ChangeLogUtils.tsx
github-actions e7a050048e chore: update source for beta 347.7
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4943.js (118.4 MB)
2026-09-21 19:31:18 +00:00

491 lines
16 KiB
TypeScript

// Module ID: 8358
// Function ID: 8359
// Name: utils/ChangeLogUtils
// Dependencies: [19, 17, 21, 4758, 580, 5660, 5208, 4754, 558, 568, 7223, 8359, 1933, 2]
// Module 8358 (utils/ChangeLogUtils)
import c from "c" /* 568 */;
import nativeDefault from "native" /* 580 */;
import _modDef1933 from "module_1933" /* 1933 */;
import Text_Text from "Text/Text" /* 4754 */;
import noop from "module_19" /* 19 */;
import CustomMarkup from "CustomMarkup" /* 5208 */;
require = fn;
get_ActivityIndicator = fn(17);
({ View: c3, Image: closure_4 } = get_ActivityIndicator);
const jsx = fn(21).jsx;
const createStyles = fn(4758);
let obj2 = { link: { color: nativeDefault.colors.TEXT_LINK }, list: { marginBottom: 10 }, image: { alignSelf: "center", flex: 1 }, container: null, text: null };
let obj3 = { color: nativeDefault.colors.TEXT_LINK };
obj2.container = { borderLeftWidth: 2, paddingLeft: 8, marginBottom: 10, borderLeftColor: fn(5660).DARK_PRIMARY_500_LIGHT_PRIMARY_300 };
const obj4 = { borderLeftWidth: 2, paddingLeft: 8, marginBottom: 10, borderLeftColor: fn(5660).DARK_PRIMARY_500_LIGHT_PRIMARY_300 };
obj2.text = { fontSize: 14, lineHeight: 18, marginBottom: 8, color: nativeDefault.colors.TEXT_MUTED };
let closure_6 = createStyles.createStyles(obj2);
const rules = CustomMarkup.createRules({});
let ReactCompilerGating = fn(558);
let closure_8 = ReactCompilerGating.isReactCompilerEnabled() ? ((arg0) => {
const cResult = c.c(10);
({ node, output, state, styling } = arg0);
const tmp2 = closure_6();
if (cResult[0] === node.content) {
if (cResult[1] === output) {
if (cResult[2] === state) {
let tmp7 = cResult[3];
}
if (cResult[4] === node.target) {
if (cResult[5] === state.key) {
if (cResult[6] === tmp2.link) {
if (cResult[7] === styling.components.Link) {
if (cResult[8] === tmp7) {
let tmp10 = cResult[9];
}
return tmp10;
}
}
}
}
const obj2 = { className: tmp5, target: tmp6, children: tmp7 };
const tmp12 = <tmp3 key={tmp4} className={tmp5} target={tmp6}>{tmp7}</tmp3>;
cResult[4] = node.target;
cResult[5] = state.key;
cResult[6] = tmp2.link;
cResult[7] = styling.components.Link;
cResult[8] = tmp7;
cResult[9] = tmp12;
tmp10 = tmp12;
}
}
const obj3 = {};
const merged = Object.assign(state);
obj3.inLink = true;
const outputResult = output(node.content, obj3);
cResult[0] = node.content;
cResult[1] = output;
cResult[2] = state;
cResult[3] = outputResult;
tmp7 = outputResult;
}) : ((arg0) => {
({ node, state } = arg0);
({ output, styling } = arg0);
const obj = { className: closure_6().link, target: node.target, children: null };
const obj2 = {};
const merged = Object.assign(state);
obj2.inLink = true;
obj.children = output(node.content, obj2);
return jsx(styling.components.Link, { className: closure_6().link, target: node.target, children: null }, state.key);
});
ReactCompilerGating = fn(558);
let closure_9 = ReactCompilerGating.isReactCompilerEnabled() ? ((state) => {
const cResult = output(ListItem[9]).c(14);
({ node, output } = state);
state = state.state;
ListItem = state.styling;
const tmp2 = closure_6();
if (cResult[0] === node.items) {
if (cResult[1] === output) {
if (cResult[2] === state) {
if (cResult[3] === ListItem.components.ListItem) {
if (cResult[9] === tmp3) {
if (cResult[10] === state.key) {
if (cResult[11] === tmp2.list) {
if (cResult[12] === tmp6) {
let tmp10 = cResult[13];
}
return tmp10;
}
}
}
const obj2 = { style: tmp5, children: cResult[4] };
const tmp12 = <tmp3 key={tmp4} style={tmp5}>{cResult[4]}</tmp3>;
cResult[9] = tmp3;
cResult[10] = state.key;
cResult[11] = tmp2.list;
cResult[12] = cResult[4];
cResult[13] = tmp12;
tmp10 = tmp12;
}
}
}
}
if (cResult[5] === output) {
if (cResult[6] === state) {
if (cResult[7] === ListItem.components.ListItem) {
let tmp7 = cResult[8];
}
let items = node.items;
const mapped = items.map(tmp7);
node = node.items;
cResult[0] = node;
cResult[1] = output;
cResult[2] = state;
ListItem = ListItem.components.ListItem;
cResult[3] = ListItem;
cResult[4] = mapped;
}
}
const fn = function l(arg0, arg1) {
closure_0 = arg0;
return jsx(ListItem.components.ListItem, {
children(arg0) {
closure_0 = output;
closure_1 = state;
closure_2 = arg0;
const items = [];
length = [];
const item = closure_0.forEach((type, index) => {
if ("list" === type.type) {
if (closure_4.length > 0) {
const obj = { variant: "text-sm/normal" };
const merged = Object.assign(closure_2);
obj.children = closure_0(closure_4, closure_1);
items.push(closure_2_5(closure_0(styling[7]).Text, obj, -1));
closure_4 = [];
}
const obj2 = { children: closure_0(type, closure_1) };
items.push(closure_2_5(closure_2_3, obj2, index));
} else {
closure_4.push(type);
}
});
if (length.length > 0) {
const obj = { variant: "text-sm/normal" };
const merged = Object.assign(arg0);
obj.children = output(length, state);
items.push(jsx(Text_Text.Text, { variant: "text-sm/normal" }, -1));
length = [];
}
return items;
}
}, arg1);
};
cResult[5] = output;
cResult[6] = state;
cResult[7] = ListItem.components.ListItem;
cResult[8] = fn;
tmp7 = fn;
}) : ((styling) => {
({ output: require, state } = styling);
styling = styling.styling;
let List = styling.components.List;
if (!List) {
List = closure_3;
}
let obj = { style: closure_6().list, children: null };
let items = styling.node.items;
obj.children = items.map((item, index) => jsx(styling.components.ListItem, {
children(arg0) {
item = closure_2_0;
closure_1 = state;
closure_2 = arg0;
const items = [];
length = [];
item = item.forEach((type, index) => {
if ("list" === type.type) {
if (closure_4.length > 0) {
const obj = { variant: "text-sm/normal" };
const merged = Object.assign(closure_2);
obj.children = closure_0(closure_4, closure_1);
items.push(closure_2_5(closure_0(styling[7]).Text, obj, -1));
closure_4 = [];
}
const obj2 = { children: closure_0(type, closure_1) };
items.push(closure_2_5(closure_2_3, obj2, index));
} else {
closure_4.push(type);
}
});
if (length.length > 0) {
let obj = { variant: "text-sm/normal" };
let merged = Object.assign(arg0);
obj.children = closure_2_0(length, state);
items.push(jsx(Text_Text.Text, { variant: "text-sm/normal" }, -1));
length = [];
}
return items;
}
}, index));
return <List key={state.key} style={closure_6().list}>{null}</List>;
});
ReactCompilerGating = fn(558);
let closure_10 = ReactCompilerGating.isReactCompilerEnabled() ? ((styling) => {
const cResult = c.c(9);
({ node, output, state } = styling);
const tmp4 = closure_6();
const components = styling.styling.components;
let Paragraph;
if (components != null) {
Paragraph = components.Paragraph;
}
if (Paragraph == null) {
Paragraph = Text_Text.Text;
}
if (cResult[0] === node.content) {
if (cResult[1] === output) {
if (cResult[2] === state) {
let tmp8 = cResult[3];
}
if (cResult[4] === Paragraph) {
if (cResult[5] === state.key) {
if (cResult[6] === tmp4.text) {
if (cResult[7] === tmp8) {
let tmp10 = cResult[8];
}
return tmp10;
}
}
}
const obj2 = { variant: "text-sm/normal", style: tmp7, children: tmp8 };
const tmp12 = <Paragraph key={tmp6} variant="text-sm/normal" style={tmp7}>{tmp8}</Paragraph>;
cResult[4] = Paragraph;
cResult[5] = state.key;
cResult[6] = tmp4.text;
cResult[7] = tmp8;
cResult[8] = tmp12;
tmp10 = tmp12;
}
}
const outputResult = output(node.content, state);
cResult[0] = node.content;
cResult[1] = output;
cResult[2] = state;
cResult[3] = outputResult;
tmp8 = outputResult;
}) : ((state) => {
state = state.state;
({ node, output, styling } = state);
const components = styling.components;
let Paragraph;
if (components != null) {
Paragraph = components.Paragraph;
}
if (Paragraph == null) {
Paragraph = Text_Text.Text;
}
const tmp = closure_6();
return <Paragraph key={state.key} variant="text-sm/normal" style={closure_6().text}>{output(node.content, state)}</Paragraph>;
});
ReactCompilerGating = fn(558);
let closure_11 = ReactCompilerGating.isReactCompilerEnabled() ? ((arg0) => {
const cResult = c.c(11);
({ node, output, state } = arg0);
if (obj2.useManaTypeConsolidationExperiment("ChangeLogStrong")) {
let str;
if (state != null) {
str = state.textColor;
}
if (str == null) {
str = "text-default";
}
if (cResult[4] === node) {
if (cResult[5] === output) {
if (cResult[6] === state) {
let tmp8 = cResult[7];
}
if (cResult[8] === str) {
if (cResult[9] === tmp8) {
let tmp10 = cResult[10];
}
return tmp10;
}
const obj3 = { variant: "experimental/body-sm/semibold", color: str, children: tmp8 };
const tmp12 = jsx(tmp(4754).Text, { variant: "experimental/body-sm/semibold", color: str, children: tmp8 });
cResult[8] = str;
cResult[9] = tmp8;
cResult[10] = tmp12;
tmp10 = tmp12;
}
}
const smartOutputResult = tmp(8359).smartOutput(node, output, state);
cResult[4] = node;
cResult[5] = output;
cResult[6] = state;
cResult[7] = smartOutputResult;
tmp8 = smartOutputResult;
const tmpResult = tmp(8359);
} else {
if (cResult[0] === node) {
if (cResult[1] === output) {
if (cResult[2] === state) {
let tmp4 = cResult[3];
}
return tmp4;
}
}
const strong = rules.strong;
const reactResult = strong.react(node, output, state);
cResult[0] = node;
cResult[1] = output;
cResult[2] = state;
cResult[3] = reactResult;
tmp4 = reactResult;
}
}) : ((arg0) => {
({ node, output, state } = arg0);
if (obj.useManaTypeConsolidationExperiment("ChangeLogStrong")) {
let str;
if (state != null) {
str = state.textColor;
}
if (str == null) {
str = "text-default";
}
const obj2 = { variant: "experimental/body-sm/semibold", color: str, children: tmp(8359).smartOutput(node, output, state) };
let reactResult = jsx(tmp(4754).Text, { variant: "experimental/body-sm/semibold", color: str, children: tmp(8359).smartOutput(node, output, state) });
const tmpResult = tmp(8359);
} else {
const strong = rules.strong;
reactResult = strong.react(node, output, state);
}
return reactResult;
});
ReactCompilerGating = fn(558);
let closure_12 = ReactCompilerGating.isReactCompilerEnabled() ? ((arg0) => {
const cResult = c.c(8);
({ node, state } = arg0);
const tmp3 = closure_6();
if (cResult[0] !== node.target) {
const sanitizeUrlResult = _modDef1933.sanitizeUrl(node.target);
cResult[0] = node.target;
cResult[1] = sanitizeUrlResult;
let tmp4 = sanitizeUrlResult;
} else {
tmp4 = cResult[1];
}
if (cResult[2] !== tmp4) {
const obj3 = { uri: tmp4 };
cResult[2] = tmp4;
cResult[3] = obj3;
let tmp7 = obj3;
} else {
tmp7 = cResult[3];
}
if (cResult[4] === state.key) {
if (cResult[5] === tmp3.image) {
if (cResult[6] === tmp7) {
let tmp8 = cResult[7];
}
return tmp8;
}
}
const tmp9 = <React4 key={state.key} style={tmp3.image} source={tmp7} />;
cResult[4] = state.key;
cResult[5] = tmp3.image;
cResult[6] = tmp7;
cResult[7] = tmp9;
tmp8 = tmp9;
}) : ((arg0) => {
({ node, state } = arg0);
const obj = { style: closure_6().image, source: null };
const obj2 = { uri: _modDef1933.sanitizeUrl(node.target) };
obj.source = obj2;
return <React4 key={state.key} style={closure_6().image} source={null} />;
});
ReactCompilerGating = fn(558);
let closure_13 = ReactCompilerGating.isReactCompilerEnabled() ? ((arg0) => {
const cResult = c.c(11);
({ node, output, state } = arg0);
const tmp4 = closure_6();
if (cResult[0] === node.content) {
if (cResult[1] === output) {
if (cResult[2] === state) {
let tmp8 = cResult[3];
}
if (cResult[4] === tmp4.text) {
if (cResult[5] === tmp8) {
let tmp10 = cResult[6];
}
if (cResult[7] === state.key) {
if (cResult[8] === tmp4.container) {
if (cResult[9] === tmp10) {
let tmp13 = cResult[10];
}
return tmp13;
}
}
const obj2 = { style: tmp6, children: tmp10 };
const tmp16 = <React3 key={tmp5} style={tmp6}>{tmp10}</React3>;
cResult[7] = state.key;
cResult[8] = tmp4.container;
cResult[9] = tmp10;
cResult[10] = tmp16;
tmp13 = tmp16;
}
const obj3 = { variant: "text-sm/normal", style: tmp7, children: tmp8 };
const tmp12 = jsx(Text_Text.Text, { variant: "text-sm/normal", style: tmp7, children: tmp8 });
cResult[4] = tmp4.text;
cResult[5] = tmp8;
cResult[6] = tmp12;
tmp10 = tmp12;
}
}
const outputResult = output(node.content, state);
cResult[0] = node.content;
cResult[1] = output;
cResult[2] = state;
cResult[3] = outputResult;
tmp8 = outputResult;
}) : ((state) => {
state = state.state;
({ node, output } = state);
const tmp = closure_6();
const obj = { style: tmp.container, children: jsx(Text_Text.Text, { variant: "text-sm/normal", style: tmp.text, children: output(node.content, state) }) };
return <React3 key={state.key} style={tmp.container}>{jsx(Text_Text.Text, { variant: "text-sm/normal", style: tmp.text, children: output(node.content, state) })}</React3>;
});
const size = fn(2);
const result = size.fileFinishedImporting("utils/native/ChangeLogUtils.tsx");
export const baseRules = rules;
export const customRules = {
link(inlineStoreParams) {
const styling = inlineStoreParams;
return {
react(node, output, state) {
return <closure_8 accessibilityRole="link" node={arg0} output={arg1} state={arg2} styling={styling} />;
}
};
},
lheading(dependencyMap) {
return {
react(className, fn, key) {
return jsx(dependencyMap.components.LHeading, { className: className.className, children: fn(className.content, key) }, key.key);
}
};
},
heading(dependencyMap) {
return {
react(className, fn, key) {
return jsx(dependencyMap.components.Heading, { className: className.className, level: className.level, children: fn(className.content, key) }, key.key);
}
};
},
list(styling) {
return {
react(node, output, state) {
return <closure_9 node={arg0} output={arg1} state={arg2} styling={styling} />;
}
};
},
image: {
react(node, output, state) {
return <closure_12 node={arg0} output={arg1} state={arg2} />;
}
},
blockQuote: {
react(node, output, state) {
return <closure_13 node={arg0} output={arg1} state={arg2} />;
}
},
strong: {
react(node, output, state) {
return <closure_11 key={arg2.key} node={arg0} output={arg1} state={arg2} />;
}
},
paragraph(dependencyMap) {
return {
react(node, output, state) {
return <closure_10 node={arg0} output={arg1} state={arg2} styling={dependencyMap} />;
}
};
}
};