Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4975.js (118.4 MB)
341 lines
11 KiB
TypeScript
341 lines
11 KiB
TypeScript
// Module ID: 15273
|
|
// Function ID: 15274
|
|
// Name: QuestHomeSetting
|
|
// Dependencies: [32, 19, 11932, 5695, 21, 4790, 580, 558, 568, 1488, 4415, 7268, 15274, 15278, 2]
|
|
|
|
// Module 15273 (QuestHomeSetting)
|
|
import c from "c" /* 568 */;
|
|
import nativeDefault from "native" /* 580 */;
|
|
import useNavigation from "useNavigation" /* 1488 */;
|
|
import _mod4415 from "module_4415" /* 4415 */;
|
|
import useQuestHomeHeaderDefault from "useQuestHomeHeader" /* 15274 */;
|
|
import QuestHomeDefault from "QuestHome" /* 15278 */;
|
|
import _slicedToArray from "module_32" /* 32 */;
|
|
import noop from "module_19" /* 19 */;
|
|
import QuestHomeNavigationStore from "QuestHomeNavigationStore" /* 11932 */;
|
|
|
|
require = fn;
|
|
const QuestConstants = fn(5695);
|
|
({ QuestHomeSortMethods: metroRequire, getQuestHomeFilterOptionItem: closure_7 } = QuestConstants);
|
|
const jsx = fn(21).jsx;
|
|
const createStyles = fn(4790);
|
|
let obj2 = { container: { backgroundColor: nativeDefault.colors.BACKGROUND_BASE_LOWEST } };
|
|
let closure_9 = createStyles.createStyles(obj2);
|
|
let ReactCompilerGating = fn(558);
|
|
let closure_10 = ReactCompilerGating.isReactCompilerEnabled() ? (() => {
|
|
const cResult = c.c(3);
|
|
const navigation = useNavigation.useNavigation();
|
|
const obj3 = noop;
|
|
[tmp4, importDefault] = noop.useState(false);
|
|
if (cResult[0] !== navigation) {
|
|
const fn = function o() {
|
|
return navigation.addListener("transitionEnd", () => closure_1_1(true));
|
|
};
|
|
const items = [navigation];
|
|
cResult[0] = navigation;
|
|
cResult[1] = fn;
|
|
cResult[2] = items;
|
|
let tmp6 = items;
|
|
let tmp5 = fn;
|
|
} else {
|
|
tmp5 = cResult[1];
|
|
tmp6 = cResult[2];
|
|
}
|
|
const effect = obj3.useEffect(tmp5, tmp6);
|
|
return tmp4;
|
|
}) : (() => {
|
|
const navigation = useNavigation.useNavigation();
|
|
const tmp2 = _slicedToArray(noop.useState(false), 2);
|
|
closure_1 = tmp2[1];
|
|
const items = [navigation];
|
|
const effect = noop.useEffect(() => navigation.addListener("transitionEnd", () => closure_1_1(true)), items);
|
|
return tmp2[0];
|
|
});
|
|
let closure_11 = [];
|
|
ReactCompilerGating = fn(558);
|
|
let obj3 = { backgroundColor: nativeDefault.colors.BACKGROUND_BASE_LOWEST };
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/quests/native/QuestHomeSetting.tsx");
|
|
|
|
export default ReactCompilerGating.isReactCompilerEnabled() ? (() => {
|
|
const cResult = c.c(16);
|
|
const tmp3 = closure_9();
|
|
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
const fn = function l() {
|
|
let SUGGESTED = QuestHomeNavigationStore.getField("sort");
|
|
if (null == SUGGESTED) {
|
|
SUGGESTED = constants.SUGGESTED;
|
|
} else {
|
|
const _Object = Object;
|
|
const values = Object.values(constants);
|
|
}
|
|
return SUGGESTED;
|
|
};
|
|
cResult[0] = fn;
|
|
let first = fn;
|
|
} else {
|
|
first = cResult[0];
|
|
}
|
|
const tmp5 = _slicedToArray;
|
|
[tmp7, tmp8] = noop.useState(first);
|
|
const require = tmp8;
|
|
if (cResult[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
const fn2 = function v() {
|
|
const str = QuestHomeNavigationStore.getField("filter");
|
|
if (null == str) {
|
|
let found = closure_1_11;
|
|
} else {
|
|
const parts = str.split(",");
|
|
const mapped = parts.map((item) => closure_1_7(item));
|
|
found = mapped.filter((item) => null != item);
|
|
if (found.length <= 0) {
|
|
found = closure_1_11;
|
|
}
|
|
}
|
|
return found;
|
|
};
|
|
cResult[1] = fn2;
|
|
let tmp9 = fn2;
|
|
} else {
|
|
tmp9 = cResult[1];
|
|
}
|
|
const tmp6 = _slicedToArray(noop.useState(first), 2);
|
|
[tmp11, tmp12] = tmp5(noop.useState(tmp9), 2);
|
|
importDefault = tmp12;
|
|
if (cResult[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
class E {
|
|
constructor() {
|
|
obj = { equalityFn: closure_0(closure_2[10]).shallow, fireImmediately: true };
|
|
return closure_5.subscribe((self) => ({ sort: self.sort, filter: self.filter }), (self, self2) => {
|
|
if (self.sort !== self2.sort) {
|
|
let SUGGESTED = self.sort;
|
|
if (null == SUGGESTED) {
|
|
SUGGESTED = constants.SUGGESTED;
|
|
} else {
|
|
const _Object = Object;
|
|
const values = Object.values(constants);
|
|
}
|
|
closure_1_0(SUGGESTED);
|
|
}
|
|
if (self.filter !== self2.filter) {
|
|
if (null == self.filter) {
|
|
let found = closure_2_11;
|
|
} else {
|
|
const parts = str.split(",");
|
|
const mapped = parts.map((item) => closure_1_7(item));
|
|
found = mapped.filter((item) => null != item);
|
|
if (found.length <= 0) {
|
|
found = closure_2_11;
|
|
}
|
|
}
|
|
closure_1_1(found);
|
|
}
|
|
}, obj);
|
|
}
|
|
}
|
|
const items = [];
|
|
cResult[2] = E;
|
|
cResult[3] = items;
|
|
let tmp14 = items;
|
|
const tmp13 = E;
|
|
} else {
|
|
class E {
|
|
constructor() {
|
|
obj = { equalityFn: closure_0(closure_2[10]).shallow, fireImmediately: true };
|
|
return closure_5.subscribe((self) => ({ sort: self.sort, filter: self.filter }), (self, self2) => {
|
|
if (self.sort !== self2.sort) {
|
|
let SUGGESTED = self.sort;
|
|
if (null == SUGGESTED) {
|
|
SUGGESTED = constants.SUGGESTED;
|
|
} else {
|
|
const _Object = Object;
|
|
const values = Object.values(constants);
|
|
}
|
|
closure_1_0(SUGGESTED);
|
|
}
|
|
if (self.filter !== self2.filter) {
|
|
if (null == self.filter) {
|
|
let found = closure_2_11;
|
|
} else {
|
|
const parts = str.split(",");
|
|
const mapped = parts.map((item) => closure_1_7(item));
|
|
found = mapped.filter((item) => null != item);
|
|
if (found.length <= 0) {
|
|
found = closure_2_11;
|
|
}
|
|
}
|
|
closure_1_1(found);
|
|
}
|
|
}, obj);
|
|
}
|
|
}
|
|
tmp14 = cResult[3];
|
|
}
|
|
const effect = obj2.useEffect(tmp13, tmp14);
|
|
const tmp16 = closure_10();
|
|
if (cResult[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
class T {
|
|
constructor() {
|
|
tmp = closure_1(closure_11);
|
|
return;
|
|
}
|
|
}
|
|
cResult[4] = T;
|
|
const tmp17 = T;
|
|
} else {
|
|
class T {
|
|
constructor() {
|
|
tmp = closure_1(closure_11);
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
if (cResult[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
class O {
|
|
constructor() {
|
|
return () => {
|
|
closure_1_1(closure_1_2[11]).close();
|
|
closure_1_5.resetState();
|
|
};
|
|
}
|
|
}
|
|
const items1 = [];
|
|
cResult[5] = O;
|
|
cResult[6] = items1;
|
|
let tmp19 = items1;
|
|
const tmp18 = O;
|
|
} else {
|
|
class O {
|
|
constructor() {
|
|
return () => {
|
|
closure_1_1(closure_1_2[11]).close();
|
|
closure_1_5.resetState();
|
|
};
|
|
}
|
|
}
|
|
tmp19 = cResult[6];
|
|
}
|
|
const effect1 = obj2.useEffect(tmp18, tmp19);
|
|
const field = QuestHomeNavigationStore.useField("scrollToQuestId");
|
|
if (cResult[7] === tmp11) {
|
|
class O {
|
|
constructor() {
|
|
return () => {
|
|
closure_1_1(closure_1_2[11]).close();
|
|
closure_1_5.resetState();
|
|
};
|
|
}
|
|
}
|
|
useQuestHomeHeaderDefault(obj4);
|
|
if (cResult[10] === tmp16) {
|
|
class O {
|
|
constructor() {
|
|
return () => {
|
|
closure_1_1(closure_1_2[11]).close();
|
|
closure_1_5.resetState();
|
|
};
|
|
}
|
|
}
|
|
}
|
|
const obj3 = { containerStyle: tmp3.container, isNavigationComplete: tmp16, scrollToQuestId: field, sortMethod: tmp7, filters: tmp11, onClearFilters: tmp17 };
|
|
const tmp26 = jsx(QuestHomeDefault, { containerStyle: tmp3.container, isNavigationComplete: tmp16, scrollToQuestId: field, sortMethod: tmp7, filters: tmp11, onClearFilters: tmp17 });
|
|
cResult[10] = tmp16;
|
|
cResult[11] = field;
|
|
cResult[12] = tmp11;
|
|
cResult[13] = tmp7;
|
|
cResult[14] = tmp3.container;
|
|
cResult[15] = tmp26;
|
|
}
|
|
obj4 = { setSelectedSortMethod: tmp8, setSelectedFilters: tmp12, selectedFilters: tmp11, selectedSortMethod: tmp7 };
|
|
cResult[7] = tmp11;
|
|
cResult[8] = tmp7;
|
|
cResult[9] = obj4;
|
|
}) : (() => {
|
|
let tmp = closure_9();
|
|
[tmp3, tmp4] = noop.useState(() => {
|
|
let SUGGESTED = QuestHomeNavigationStore.getField("sort");
|
|
if (null == SUGGESTED) {
|
|
SUGGESTED = constants.SUGGESTED;
|
|
} else {
|
|
const _Object = Object;
|
|
const values = Object.values(constants);
|
|
}
|
|
return SUGGESTED;
|
|
});
|
|
const require = tmp4;
|
|
const tmp2 = _slicedToArray(noop.useState(() => {
|
|
let SUGGESTED = QuestHomeNavigationStore.getField("sort");
|
|
if (null == SUGGESTED) {
|
|
SUGGESTED = constants.SUGGESTED;
|
|
} else {
|
|
const _Object = Object;
|
|
const values = Object.values(constants);
|
|
}
|
|
return SUGGESTED;
|
|
}), 2);
|
|
[tmp6, tmp7] = noop.useState(() => {
|
|
const str = QuestHomeNavigationStore.getField("filter");
|
|
if (null == str) {
|
|
let found = closure_1_11;
|
|
} else {
|
|
const parts = str.split(",");
|
|
const mapped = parts.map((item) => closure_1_7(item));
|
|
found = mapped.filter((item) => null != item);
|
|
if (found.length <= 0) {
|
|
found = closure_1_11;
|
|
}
|
|
}
|
|
return found;
|
|
});
|
|
importDefault = tmp7;
|
|
const effect = noop.useEffect(() => QuestHomeNavigationStore.subscribe((self) => ({ sort: self.sort, filter: self.filter }), (self, self2) => {
|
|
if (self.sort !== self2.sort) {
|
|
let SUGGESTED = self.sort;
|
|
if (null == SUGGESTED) {
|
|
SUGGESTED = constants.SUGGESTED;
|
|
} else {
|
|
const _Object = Object;
|
|
const values = Object.values(constants);
|
|
}
|
|
closure_1_0(SUGGESTED);
|
|
}
|
|
if (self.filter !== self2.filter) {
|
|
if (null == self.filter) {
|
|
let found = closure_2_11;
|
|
} else {
|
|
const parts = str.split(",");
|
|
const mapped = parts.map((item) => closure_1_7(item));
|
|
found = mapped.filter((item) => null != item);
|
|
if (found.length <= 0) {
|
|
found = closure_2_11;
|
|
}
|
|
}
|
|
closure_1_1(found);
|
|
}
|
|
}, { equalityFn: _mod4415.shallow, fireImmediately: true }), []);
|
|
const tmp5 = _slicedToArray(noop.useState(() => {
|
|
const str = QuestHomeNavigationStore.getField("filter");
|
|
if (null == str) {
|
|
let found = closure_1_11;
|
|
} else {
|
|
const parts = str.split(",");
|
|
const mapped = parts.map((item) => closure_1_7(item));
|
|
found = mapped.filter((item) => null != item);
|
|
if (found.length <= 0) {
|
|
found = closure_1_11;
|
|
}
|
|
}
|
|
return found;
|
|
}), 2);
|
|
const callback = noop.useCallback(() => {
|
|
tmp7(closure_11);
|
|
}, []);
|
|
const effect1 = noop.useEffect(() => () => {
|
|
closure_1_1(closure_1_2[11]).close();
|
|
closure_1_5.resetState();
|
|
}, []);
|
|
const field = QuestHomeNavigationStore.useField("scrollToQuestId");
|
|
useQuestHomeHeaderDefault({ setSelectedSortMethod: tmp4, setSelectedFilters: tmp7, selectedFilters: tmp6, selectedSortMethod: tmp3 });
|
|
const tmp9 = closure_10();
|
|
return jsx(QuestHomeDefault, { containerStyle: tmp.container, isNavigationComplete: closure_10(), scrollToQuestId: field, sortMethod: tmp3, filters: tmp6, onClearFilters: callback });
|
|
});
|