555 lines
19 KiB
TypeScript
555 lines
19 KiB
TypeScript
// Module ID: 12468
|
|
// Function ID: 12469
|
|
// Name: onCreateGuild
|
|
// Dependencies: [5, 19, 17, 4303, 673, 12469, 7762, 21, 5465, 12262, 9065, 12470, 12506, 695, 500, 5503, 12445, 1219, 12472, 12474, 12123, 1233, 12477, 12478, 12507, 12489, 6016, 2]
|
|
// Exports: default
|
|
|
|
// Module 12468 (onCreateGuild)
|
|
import getSystemLocale from "getSystemLocale" /* 1233 */;
|
|
import NavigationStack from "NavigationStack" /* 6016 */;
|
|
import closure_3 from "asyncGeneratorStep" /* 5 */;
|
|
import closure_4 from "noop" /* 19 */;
|
|
import { Keyboard } from "get ActivityIndicator" /* 17 */;
|
|
import closure_6 from "initialize" /* 4303 */;
|
|
import ME from "ME" /* 673 */;
|
|
import { GuildTemplateId } from "GuildTemplateId" /* 12469 */;
|
|
import NUXGuildTemplatesAnalytics from "NUXGuildTemplatesAnalytics" /* 7762 */;
|
|
import { jsx } from "jsxProd" /* 21 */;
|
|
|
|
require = arg1;
|
|
function onCreateGuild() {
|
|
const self = this;
|
|
const apply = _onCreateGuild.apply;
|
|
if (typeof apply === "unknown") {
|
|
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
|
|
} else {
|
|
applyArgumentsResult = apply(self, arguments);
|
|
}
|
|
return applyArgumentsResult;
|
|
}
|
|
function _onCreateGuild() {
|
|
const self = this;
|
|
const tmp = callback((arg0) => {
|
|
closure_0 = arg0;
|
|
c3 = 0;
|
|
c4 = 0;
|
|
return (function*(arg0) {
|
|
if (c4 === 2) {
|
|
c4 = 3;
|
|
HermesBuiltin.throwTypeError();
|
|
} else if (tmp4 === 3) {
|
|
if (arg0 === 1) {
|
|
throw arg1;
|
|
} else if (arg0 === 2) {
|
|
obj = { value: null, done: true };
|
|
obj[0] = arg1;
|
|
return obj;
|
|
} else {
|
|
return { value: "HermesInternal", done: null };
|
|
}
|
|
} else {
|
|
try {
|
|
c4 = 2;
|
|
if (0 === c3) {
|
|
if (arg0 === 1) {
|
|
c4 = 3;
|
|
throw arg1;
|
|
} else if (arg0 === 2) {
|
|
c4 = 3;
|
|
obj = { value: null, done: true };
|
|
obj[0] = arg1;
|
|
return obj;
|
|
} else {
|
|
dependencyMap = tmp5;
|
|
const callback2 = tmp2;
|
|
obj1 = closure_1_1(closure_1_2[8]);
|
|
c3 = 1;
|
|
c4 = 1;
|
|
obj1 = { value: null, done: false };
|
|
obj1[0] = obj1.transitionToGuildSync(callback);
|
|
return obj1;
|
|
}
|
|
} else if (arg0 === 1) {
|
|
c4 = 3;
|
|
throw arg1;
|
|
} else if (arg0 === 2) {
|
|
c4 = 3;
|
|
obj = { value: null, done: true };
|
|
obj[0] = arg1;
|
|
return obj;
|
|
} else {
|
|
const guildProgress = callback(12262).createGuildProgress(callback);
|
|
callback2(9065)();
|
|
const obj6 = callback(12262);
|
|
const result = callback2(12470).closeCreateGuildOnboardingModal();
|
|
const obj7 = callback2(12470);
|
|
const result1 = callback(12506).showInstantInviteModal(callback);
|
|
const obj8 = callback(12506);
|
|
const obj2 = { flow_type: null, from_step: null, to_step: "modal_closed" };
|
|
obj2[0] = constants2.GUILD_CREATE_MODAL;
|
|
obj2[1] = constants3.CREATE_SERVER;
|
|
callback2(695).track(constants.USER_FLOW_TRANSITION, obj2);
|
|
c4 = 3;
|
|
return { value: "HermesInternal", done: null };
|
|
}
|
|
} catch (tmp9) {
|
|
c4 = tmp;
|
|
throw tmp9;
|
|
}
|
|
}
|
|
})();
|
|
});
|
|
closure_16 = tmp;
|
|
const apply = tmp.apply;
|
|
if (typeof apply === "unknown") {
|
|
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
|
|
} else {
|
|
applyArgumentsResult = apply(self, arguments);
|
|
}
|
|
return applyArgumentsResult;
|
|
}
|
|
function _onCreateServer() {
|
|
const self = this;
|
|
const tmp = callback((arg0, arg1, arg2) => {
|
|
closure_0 = arg0;
|
|
closure_1 = arg1;
|
|
closure_2 = arg2;
|
|
c4 = 0;
|
|
c3 = 0;
|
|
return (function*(arg0, arg1, arg2) {
|
|
if (c3 === 2) {
|
|
c3 = 3;
|
|
HermesBuiltin.throwTypeError();
|
|
} else if (tmp3 === 3) {
|
|
if (arg0 === 1) {
|
|
throw arg1;
|
|
} else if (arg0 === 2) {
|
|
obj = { value: null, done: true };
|
|
obj[0] = arg1;
|
|
return obj;
|
|
} else {
|
|
return { value: "HermesInternal", done: null };
|
|
}
|
|
} else {
|
|
try {
|
|
c3 = 2;
|
|
if (0 === c4) {
|
|
if (arg0 === 1) {
|
|
c3 = 3;
|
|
throw arg1;
|
|
} else if (arg0 === 2) {
|
|
c3 = 3;
|
|
obj = { value: null, done: true };
|
|
obj[0] = arg1;
|
|
return obj;
|
|
} else {
|
|
let arr = closure_0;
|
|
if (id.id !== closure_1_10.CREATE) {
|
|
c4 = 1;
|
|
c3 = 1;
|
|
obj1 = { value: null, done: false };
|
|
obj1[0] = closure_1_15(tmp14);
|
|
return obj1;
|
|
} else {
|
|
const obj2 = { guildId: null };
|
|
obj2[0] = tmp14;
|
|
arr = arr.push(closure_1_11.CHANNEL_PROMPT, obj2);
|
|
}
|
|
}
|
|
} else if (arg0 === 1) {
|
|
c3 = 3;
|
|
throw arg1;
|
|
} else if (arg0 === 2) {
|
|
c3 = 3;
|
|
obj = { value: null, done: true };
|
|
obj[0] = arg1;
|
|
return obj;
|
|
}
|
|
c3 = 3;
|
|
return { value: "HermesInternal", done: null };
|
|
} catch (tmp8) {
|
|
c3 = tmp;
|
|
throw tmp8;
|
|
}
|
|
}
|
|
})();
|
|
});
|
|
closure_17 = tmp;
|
|
const apply = tmp.apply;
|
|
if (typeof apply === "unknown") {
|
|
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
|
|
} else {
|
|
applyArgumentsResult = apply(self, arguments);
|
|
}
|
|
return applyArgumentsResult;
|
|
}
|
|
({ AnalyticEvents: error, AnalyticsSections: closure_8, NOOP: c9 } = ME);
|
|
({ CreateGuildModalStates: unpackModuleId, GuildTemplateTriggers: closure_12, NUXGuildTemplatesAnalytics: map1 } = NUXGuildTemplatesAnalytics);
|
|
let obj = { impression_group: require("encodeProperties").ImpressionGroups.GUILD_ADD_FLOW };
|
|
let result = require("set").fileFinishedImporting("modules/nuf/native/components/NUFGuildTemplates.tsx");
|
|
|
|
export default function NUFGuildTemplates() {
|
|
obj = {
|
|
screens: React.useMemo(() => {
|
|
obj = {};
|
|
obj = {
|
|
impressionName: callback(500).ImpressionNames.GUILD_ADD_LANDING,
|
|
impressionProperties: closure_18,
|
|
fullscreen: true,
|
|
headerTitle() {
|
|
return null;
|
|
},
|
|
headerLeft: null,
|
|
render: null
|
|
};
|
|
let obj2 = callback(5503);
|
|
obj[4] = obj2.getHeaderCloseButton(() => {
|
|
callback(12445).trackNUFStep(constants2.STEP_GUILD_TEMPLATE, constants2.STEP_FRIEND_LIST, { skip: true });
|
|
obj = callback(12445);
|
|
callback(1219).transitionTo(fallbackRoute.fallbackRoute);
|
|
const obj2 = callback(1219);
|
|
const result = callback2(12470).closeCreateGuildOnboardingModal();
|
|
});
|
|
obj[5] = function render() {
|
|
return callback3(callback2(12472), { trigger: constants.NUF });
|
|
};
|
|
obj[constants.GUILD_TEMPLATES] = obj;
|
|
obj = {
|
|
impressionName: callback(500).ImpressionNames.GUILD_ADD_INTENT_SELECTION,
|
|
impressionProperties: closure_18,
|
|
fullscreen: true,
|
|
headerTitle() {
|
|
return null;
|
|
},
|
|
render(guildTemplate) {
|
|
return callback3(callback2(12474), { guildTemplate: guildTemplate.guildTemplate, trigger: constants.NUF });
|
|
}
|
|
};
|
|
obj[constants.CREATION_INTENT] = obj;
|
|
obj[constants.CREATE_SERVER] = {
|
|
impressionName: callback(500).ImpressionNames.GUILD_ADD_CUSTOMIZE,
|
|
impressionProperties: closure_18,
|
|
fullscreen: true,
|
|
headerTitle() {
|
|
return null;
|
|
},
|
|
render(arg0, arg1) {
|
|
const callback = arg0;
|
|
const callback2 = arg1;
|
|
obj = {};
|
|
const merged = Object.assign(arg0);
|
|
obj.onCreate = function onCreate(guild) {
|
|
return (function onCreateServer(closure_1, id, guildTemplate) {
|
|
const self = this;
|
|
const apply = closure_17.apply;
|
|
if (typeof apply === "unknown") {
|
|
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
|
|
} else {
|
|
applyArgumentsResult = apply(self, arguments);
|
|
}
|
|
return applyArgumentsResult;
|
|
})(closure_1, guild.guild.id, guildTemplate.guildTemplate);
|
|
};
|
|
const intl = callback(1233).intl;
|
|
obj.customTitle = intl.string(callback(1233).t["5HZu07"]);
|
|
return callback3(callback2(12123), obj);
|
|
}
|
|
};
|
|
obj2 = {
|
|
impressionName: callback(500).ImpressionNames.GUILD_ADD_JOIN,
|
|
impressionProperties: closure_18,
|
|
fullscreen: true,
|
|
headerTitle() {
|
|
return null;
|
|
},
|
|
render() {
|
|
obj = { location: "Onboarding Join Guild Modal", onClose: callback2(12470).closeCreateGuildModal };
|
|
return callback3(callback2(12477), obj);
|
|
}
|
|
};
|
|
obj[constants.JOIN_SERVER] = obj2;
|
|
obj1 = {
|
|
impressionName: callback(500).ImpressionNames.GUILD_ADD_CUSTOMIZE,
|
|
impressionProperties: closure_18,
|
|
fullscreen: true,
|
|
headerTitle() {
|
|
return null;
|
|
},
|
|
render(arg0, arg1) {
|
|
const callback = arg0;
|
|
const callback2 = arg1;
|
|
obj = {};
|
|
const merged = Object.assign(arg0);
|
|
obj.onCreate = function onCreate(guild) {
|
|
return (function onCreateServer(closure_1, id, guildTemplate) {
|
|
const self = this;
|
|
const apply = closure_17.apply;
|
|
if (typeof apply === "unknown") {
|
|
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
|
|
} else {
|
|
applyArgumentsResult = apply(self, arguments);
|
|
}
|
|
return applyArgumentsResult;
|
|
})(closure_1, guild.guild.id, guildTemplate.guildTemplate);
|
|
};
|
|
const intl = callback(1233).intl;
|
|
obj.customTitle = intl.string(callback(1233).t["5HZu07"]);
|
|
return callback3(callback2(12123), obj);
|
|
}
|
|
};
|
|
obj[constants.ACCEPT_INVITE] = {
|
|
impressionName: callback(500).ImpressionNames.GUILD_ADD_ACCEPT_INVITE,
|
|
impressionProperties: closure_18,
|
|
fullscreen: true,
|
|
headerTitle() {
|
|
return null;
|
|
},
|
|
headerLeft() {
|
|
return null;
|
|
},
|
|
render(code) {
|
|
obj = { code: code.code, onPressClose: callback2(12470).closeCreateGuildModal };
|
|
return callback3(callback2(12478), obj);
|
|
}
|
|
};
|
|
const obj3 = {
|
|
impressionName: callback(500).ImpressionNames.GUILD_ADD_ACCEPT_INVITE,
|
|
impressionProperties: closure_18,
|
|
fullscreen: true,
|
|
headerTitle() {
|
|
return null;
|
|
},
|
|
headerLeft() {
|
|
return null;
|
|
},
|
|
render(code) {
|
|
obj = { code: code.code, onPressClose: callback2(12470).closeCreateGuildModal };
|
|
return callback3(callback2(12478), obj);
|
|
}
|
|
};
|
|
obj[constants.CHANNEL_PROMPT] = {
|
|
impressionName: callback(500).ImpressionNames.GUILD_ADD_CHANNEL_PROMPT,
|
|
impressionProperties: closure_18,
|
|
fullscreen: true,
|
|
headerTitle() {
|
|
return null;
|
|
},
|
|
render(guildId) {
|
|
guildId = guildId.guildId;
|
|
obj = {
|
|
hasSkip: true,
|
|
hasBack: false,
|
|
onCancel: closure_9,
|
|
onSuccess() {
|
|
return closure_1_15(guildId);
|
|
},
|
|
guildId,
|
|
buttonText: null
|
|
};
|
|
const intl = guildId(1233).intl;
|
|
obj[5] = intl.string(guildId(1233).t["uHXB+F"]);
|
|
return callback3(callback2(12507), obj);
|
|
}
|
|
};
|
|
const obj5 = { impressionName: "Array", impressionProperties: true, fullscreen: true, ignoreKeyboard: null, headerTitle: null, headerLeft: null, render: true };
|
|
obj5[1] = closure_18;
|
|
obj5[4] = function headerTitle() {
|
|
return null;
|
|
};
|
|
obj5[5] = function headerLeft() {
|
|
return null;
|
|
};
|
|
obj5[6] = function render() {
|
|
return callback3(callback2(12489), { isNestedNavigator: true });
|
|
};
|
|
obj[constants.JOIN_STUDENT_HUB] = obj5;
|
|
return obj;
|
|
}, []),
|
|
onWillFocus: Keyboard.dismiss,
|
|
headerBackTitle: null,
|
|
initialRouteName: null
|
|
};
|
|
let intl = getSystemLocale.intl;
|
|
obj[2] = intl.string(getSystemLocale.t["13/7kX"]);
|
|
obj[3] = constants.GUILD_TEMPLATES;
|
|
return jsx(NavigationStack.Navigator, {
|
|
screens: React.useMemo(() => {
|
|
obj = {};
|
|
obj = {
|
|
impressionName: callback(500).ImpressionNames.GUILD_ADD_LANDING,
|
|
impressionProperties: closure_18,
|
|
fullscreen: true,
|
|
headerTitle() {
|
|
return null;
|
|
},
|
|
headerLeft: null,
|
|
render: null
|
|
};
|
|
let obj2 = callback(5503);
|
|
obj[4] = obj2.getHeaderCloseButton(() => {
|
|
callback(12445).trackNUFStep(constants2.STEP_GUILD_TEMPLATE, constants2.STEP_FRIEND_LIST, { skip: true });
|
|
obj = callback(12445);
|
|
callback(1219).transitionTo(fallbackRoute.fallbackRoute);
|
|
const obj2 = callback(1219);
|
|
const result = callback2(12470).closeCreateGuildOnboardingModal();
|
|
});
|
|
obj[5] = function render() {
|
|
return callback3(callback2(12472), { trigger: constants.NUF });
|
|
};
|
|
obj[constants.GUILD_TEMPLATES] = obj;
|
|
obj = {
|
|
impressionName: callback(500).ImpressionNames.GUILD_ADD_INTENT_SELECTION,
|
|
impressionProperties: closure_18,
|
|
fullscreen: true,
|
|
headerTitle() {
|
|
return null;
|
|
},
|
|
render(guildTemplate) {
|
|
return callback3(callback2(12474), { guildTemplate: guildTemplate.guildTemplate, trigger: constants.NUF });
|
|
}
|
|
};
|
|
obj[constants.CREATION_INTENT] = obj;
|
|
obj[constants.CREATE_SERVER] = {
|
|
impressionName: callback(500).ImpressionNames.GUILD_ADD_CUSTOMIZE,
|
|
impressionProperties: closure_18,
|
|
fullscreen: true,
|
|
headerTitle() {
|
|
return null;
|
|
},
|
|
render(arg0, arg1) {
|
|
const callback = arg0;
|
|
const callback2 = arg1;
|
|
obj = {};
|
|
const merged = Object.assign(arg0);
|
|
obj.onCreate = function onCreate(guild) {
|
|
return (function onCreateServer(closure_1, id, guildTemplate) {
|
|
const self = this;
|
|
const apply = closure_17.apply;
|
|
if (typeof apply === "unknown") {
|
|
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
|
|
} else {
|
|
applyArgumentsResult = apply(self, arguments);
|
|
}
|
|
return applyArgumentsResult;
|
|
})(closure_1, guild.guild.id, guildTemplate.guildTemplate);
|
|
};
|
|
const intl = callback(1233).intl;
|
|
obj.customTitle = intl.string(callback(1233).t["5HZu07"]);
|
|
return callback3(callback2(12123), obj);
|
|
}
|
|
};
|
|
obj2 = {
|
|
impressionName: callback(500).ImpressionNames.GUILD_ADD_JOIN,
|
|
impressionProperties: closure_18,
|
|
fullscreen: true,
|
|
headerTitle() {
|
|
return null;
|
|
},
|
|
render() {
|
|
obj = { location: "Onboarding Join Guild Modal", onClose: callback2(12470).closeCreateGuildModal };
|
|
return callback3(callback2(12477), obj);
|
|
}
|
|
};
|
|
obj[constants.JOIN_SERVER] = obj2;
|
|
obj1 = {
|
|
impressionName: callback(500).ImpressionNames.GUILD_ADD_CUSTOMIZE,
|
|
impressionProperties: closure_18,
|
|
fullscreen: true,
|
|
headerTitle() {
|
|
return null;
|
|
},
|
|
render(arg0, arg1) {
|
|
const callback = arg0;
|
|
const callback2 = arg1;
|
|
obj = {};
|
|
const merged = Object.assign(arg0);
|
|
obj.onCreate = function onCreate(guild) {
|
|
return (function onCreateServer(closure_1, id, guildTemplate) {
|
|
const self = this;
|
|
const apply = closure_17.apply;
|
|
if (typeof apply === "unknown") {
|
|
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
|
|
} else {
|
|
applyArgumentsResult = apply(self, arguments);
|
|
}
|
|
return applyArgumentsResult;
|
|
})(closure_1, guild.guild.id, guildTemplate.guildTemplate);
|
|
};
|
|
const intl = callback(1233).intl;
|
|
obj.customTitle = intl.string(callback(1233).t["5HZu07"]);
|
|
return callback3(callback2(12123), obj);
|
|
}
|
|
};
|
|
obj[constants.ACCEPT_INVITE] = {
|
|
impressionName: callback(500).ImpressionNames.GUILD_ADD_ACCEPT_INVITE,
|
|
impressionProperties: closure_18,
|
|
fullscreen: true,
|
|
headerTitle() {
|
|
return null;
|
|
},
|
|
headerLeft() {
|
|
return null;
|
|
},
|
|
render(code) {
|
|
obj = { code: code.code, onPressClose: callback2(12470).closeCreateGuildModal };
|
|
return callback3(callback2(12478), obj);
|
|
}
|
|
};
|
|
const obj3 = {
|
|
impressionName: callback(500).ImpressionNames.GUILD_ADD_ACCEPT_INVITE,
|
|
impressionProperties: closure_18,
|
|
fullscreen: true,
|
|
headerTitle() {
|
|
return null;
|
|
},
|
|
headerLeft() {
|
|
return null;
|
|
},
|
|
render(code) {
|
|
obj = { code: code.code, onPressClose: callback2(12470).closeCreateGuildModal };
|
|
return callback3(callback2(12478), obj);
|
|
}
|
|
};
|
|
obj[constants.CHANNEL_PROMPT] = {
|
|
impressionName: callback(500).ImpressionNames.GUILD_ADD_CHANNEL_PROMPT,
|
|
impressionProperties: closure_18,
|
|
fullscreen: true,
|
|
headerTitle() {
|
|
return null;
|
|
},
|
|
render(guildId) {
|
|
guildId = guildId.guildId;
|
|
obj = {
|
|
hasSkip: true,
|
|
hasBack: false,
|
|
onCancel: closure_9,
|
|
onSuccess() {
|
|
return closure_1_15(guildId);
|
|
},
|
|
guildId,
|
|
buttonText: null
|
|
};
|
|
const intl = guildId(1233).intl;
|
|
obj[5] = intl.string(guildId(1233).t["uHXB+F"]);
|
|
return callback3(callback2(12507), obj);
|
|
}
|
|
};
|
|
const obj5 = { impressionName: "Array", impressionProperties: true, fullscreen: true, ignoreKeyboard: null, headerTitle: null, headerLeft: null, render: true };
|
|
obj5[1] = closure_18;
|
|
obj5[4] = function headerTitle() {
|
|
return null;
|
|
};
|
|
obj5[5] = function headerLeft() {
|
|
return null;
|
|
};
|
|
obj5[6] = function render() {
|
|
return callback3(callback2(12489), { isNestedNavigator: true });
|
|
};
|
|
obj[constants.JOIN_STUDENT_HUB] = obj5;
|
|
return obj;
|
|
}, []),
|
|
onWillFocus: Keyboard.dismiss,
|
|
headerBackTitle: null,
|
|
initialRouteName: null
|
|
});
|
|
};
|