Merge branch 'master' into feat/sellout-app

This commit is contained in:
Christopher Gjelten authored and GitHub committed 2020-10-18 22:08:56 +02:00
commit 771ad147d7
46 files changed
+4495 -587

No files matched your search

+2
View File
@@ -42,6 +42,7 @@
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/preset-env": "^7.4.5",
"@babel/preset-react": "^7.0.0",
"@types/enzyme": "^3.10.7",
"@types/node": "^14.11.5",
"@types/react": "^16.9.51",
"@types/react-dom": "^16.9.8",
@@ -68,6 +69,7 @@
"scripts": {
"start": "react-scripts start",
"watch": "cra-build-watch --disable-chunks --build-path ../resources/html --output-filename dev.js",
"format": "prettier --write src/**/*.{js,jsx,ts,tsx,json,css,scss,md}",
"build": "react-scripts build",
"build:resources": "cross-env NODE_ENV=production webpack --config webpack/webpack.resources.js --color -p --progress --hide-modules --display-optimization-bailout",
"test": "react-scripts test --watchAll=false --testMatch **/src/**/*.test.[jt]s?(x)",
-1
View File
@@ -1 +0,0 @@
/// <reference types="react-scripts" />
@@ -4,13 +4,12 @@ import { Button, TextField } from "@material-ui/core";
import Nui from "../../../os/nui-events/utils/Nui";
import List from "@material-ui/core/List";
import ListItem from "@material-ui/core/ListItem";
import Modal from '../../../ui/components/Modal';
import { useModal } from '../hooks/useModal';
import ClearIcon from '@material-ui/icons/Clear';
import PersonIcon from '@material-ui/icons/Person';
import PhoneIcon from '@material-ui/icons/Phone';
import AccountCircleIcon from '@material-ui/icons/AccountCircle';
import Modal from "../../../ui/components/Modal";
import { useModal } from "../hooks/useModal";
import ClearIcon from "@material-ui/icons/Clear";
import PersonIcon from "@material-ui/icons/Person";
import PhoneIcon from "@material-ui/icons/Phone";
import AccountCircleIcon from "@material-ui/icons/AccountCircle";
const useStyles = makeStyles((theme: Theme) => ({
button: {
@@ -26,32 +25,32 @@ const useStyles = makeStyles((theme: Theme) => ({
height: "20%",
},
clearButton: {
width: '10%',
position: 'absolute',
right: 0
width: "10%",
position: "absolute",
right: 0,
},
textInputField: {
fontSize: 20,
borderBottomColor: 'red'
borderBottomColor: "red",
},
addBtn: {
margin: 'auto',
margin: "auto",
fontSize: 16,
width: 150,
background: "#2196f3",
marginBottom: 10,
padding: 8
padding: 8,
},
cancelBtn: {
margin: 'auto',
margin: "auto",
width: 150,
background: "#232323",
marginBottom: 20,
padding: 8
padding: 8,
},
icons: {
marginRight: 5
}
marginRight: 5,
},
}));
export const AddContactModal = () => {
@@ -69,25 +68,27 @@ export const AddContactModal = () => {
Nui.send("contacts:add", {
name,
number,
avatar
avatar,
});
console.log(name, number, avatar);
}
};
const _handleClose = () => {
setShowModal(false)
}
setShowModal(false);
};
return (
<Modal visible={showModal} handleClose={_handleClose}>
<Button onClick={_handleClose} className={classes.clearButton}><ClearIcon /></Button>
<Button onClick={_handleClose} className={classes.clearButton}>
<ClearIcon />
</Button>
<List style={{ marginTop: 30 }}>
<ListItem>
<PersonIcon className={classes.icons} />
<TextField
value={name}
inputProps={{ className: classes.textInputField}}
inputProps={{ className: classes.textInputField }}
onChange={(e) => setName(e.target.value)}
fullWidth
variant="standard"
@@ -98,7 +99,7 @@ export const AddContactModal = () => {
<PhoneIcon className={classes.icons} />
<TextField
value={number}
inputProps={{ className: classes.textInputField}}
inputProps={{ className: classes.textInputField }}
onChange={(e) => setNumber(e.target.value)}
fullWidth
placeholder="Number"
@@ -110,7 +111,7 @@ export const AddContactModal = () => {
<AccountCircleIcon className={classes.icons} />
<TextField
value={avatar}
inputProps={{ className: classes.textInputField}}
inputProps={{ className: classes.textInputField }}
onChange={(e) => setAvatar(e.target.value)}
fullWidth
placeholder="Avatar URL"
@@ -118,8 +119,10 @@ export const AddContactModal = () => {
type="text"
/>
</ListItem>
</List>
<Button className={classes.addBtn} onClick={addContact}>Add Contact</Button>
</List>
<Button className={classes.addBtn} onClick={addContact}>
Add Contact
</Button>
</Modal>
);
};
@@ -1,9 +1,9 @@
import React from 'react'
import React from "react";
import { makeStyles, createStyles, Theme } from "@material-ui/core/styles";
import Paper from "@material-ui/core/Paper";
import ContactsIcon from "@material-ui/icons/Contacts";
const useStyles = makeStyles((theme: Theme) =>
const useStyles = makeStyles((theme: Theme) =>
createStyles({
root: {
height: "60px",
@@ -21,12 +21,11 @@ const useStyles = makeStyles((theme: Theme) =>
})
);
export const ContactTitle = () => {
const classes = useStyles();
return (
<Paper className={classes.root} square variant="outlined" elevation={24}>
<ContactsIcon className={classes.icon} />
</Paper>
)
}
);
};
@@ -6,14 +6,13 @@ import { AppContent } from "../../../ui/components/AppContent";
import { ContactList } from "./List/ContactList";
import { useApp } from "../../../os/apps/hooks/useApps";
import { AddContactModal } from "./ContactModal";
import { useModal } from '../hooks/useModal';
import { useModal } from "../hooks/useModal";
import { SearchContacts } from "./List/SearchContacts";
import PersonAddIcon from '@material-ui/icons/PersonAdd'
import Fab from '@material-ui/core/Fab';
import { useContactModal } from '../hooks/useContactModal';
const useStyles = makeStyles((theme: Theme) =>
const useStyles = makeStyles((theme: Theme) =>
createStyles({
backgroundModal: {
background: "black",
@@ -26,7 +25,7 @@ const useStyles = makeStyles((theme: Theme) =>
zIndex: 5,
},
absolute: {
position: 'sticky',
position: "sticky",
bottom: theme.spacing(2),
left: theme.spacing(3),
},
@@ -34,7 +33,6 @@ const useStyles = makeStyles((theme: Theme) =>
);
export const ContactsApp = () => {
const classes = useStyles();
const { showModal, setShowModal } = useModal();
const contacts = useApp("CONTACTS");
@@ -44,16 +42,19 @@ export const ContactsApp = () => {
setShowModal(true);
};
return (
<AppWrapper id="contact-app">
<AppTitle app={contacts}></AppTitle>
<SearchContacts />
<AddContactModal/>
<AddContactModal />
<div className={showModal ? classes.backgroundModal : undefined} />
<AppContent>
<ContactList />
<Fab onClick={openModal} style={{backgroundColor: '#2196f3', color: '#fff'}} className={classes.absolute}>
<Fab
onClick={openModal}
style={{ backgroundColor: "#2196f3", color: "#fff" }}
className={classes.absolute}
>
<PersonAddIcon />
</Fab>
</AppContent>
@@ -14,7 +14,7 @@ import {
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faPen } from "@fortawesome/free-solid-svg-icons";
import { useFilteredContacts } from '../../hooks/useFilteredContacts';
import { useFilteredContacts } from "../../hooks/useFilteredContacts";
import PhoneIcon from "@material-ui/icons/Phone";
import ChatIcon from "@material-ui/icons/Chat";
@@ -42,9 +42,7 @@ const useStyles = makeStyles((theme) => ({
export const ContactList = () => {
const classes = useStyles()
const { filteredContacts } = useFilteredContacts();
const { showContactModal, setShowContactModal } = useContactModal();
@@ -1,95 +1,97 @@
import React, { useState } from 'react'
import React, { useState } from "react";
import { InputBase } from "@material-ui/core";
import SearchIcon from '@material-ui/icons/Search';
import { createStyles, fade, Theme, makeStyles } from '@material-ui/core/styles';
import SearchIcon from "@material-ui/icons/Search";
import {
createStyles,
fade,
Theme,
makeStyles,
} from "@material-ui/core/styles";
import { useFilteredContacts } from '../../hooks/useFilteredContacts';
import { useFilteredContacts } from "../../hooks/useFilteredContacts";
const useStyles = makeStyles((theme: Theme) =>
const useStyles = makeStyles((theme: Theme) =>
createStyles({
bg: {
backgroundColor: "#232323",
display: 'flex',
display: "flex",
height: 60,
justifyContent: 'center',
alignItems: 'center'
justifyContent: "center",
alignItems: "center",
},
textFieldInput: {
fontSize: 20
fontSize: 20,
},
inputRoot: {
color: '#fff',
fontSize: 18
color: "#fff",
fontSize: 18,
},
inputInput: {
padding: theme.spacing(1, 4, 1, 4),
// vertical padding + font size from searchIcon
transition: theme.transitions.create('width'),
width: '100%',
[theme.breakpoints.up('sm')]: {
width: '13ch',
'&:focus': {
width: '20ch',
transition: theme.transitions.create("width"),
width: "100%",
[theme.breakpoints.up("sm")]: {
width: "13ch",
"&:focus": {
width: "20ch",
},
},
},
search: {
position: 'relative',
position: "relative",
borderRadius: theme.shape.borderRadius,
backgroundColor: fade(theme.palette.common.white, 0.15),
'&:hover': {
"&:hover": {
backgroundColor: fade(theme.palette.common.white, 0.25),
},
marginLeft: 0,
width: '100%',
[theme.breakpoints.up('sm')]: {
width: "100%",
[theme.breakpoints.up("sm")]: {
marginLeft: theme.spacing(1),
width: 'auto',
width: "auto",
},
},
searchIcon: {
padding: theme.spacing(0, 0.5),
height: '100%',
position: 'absolute',
pointerEvents: 'none',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
height: "100%",
position: "absolute",
pointerEvents: "none",
display: "flex",
alignItems: "center",
justifyContent: "center",
},
})
);
export const SearchContacts = () => {
const { setFilteredContacts } = useFilteredContacts();
const classes = useStyles();
const [ searchValue, setSearchValue ] = useState('')
const [searchValue, setSearchValue] = useState("");
const handleChange = (e) => {
setSearchValue(e.target.value)
setFilteredContacts(e.target.value)
}
setSearchValue(e.target.value);
setFilteredContacts(e.target.value);
};
return (
<div className={classes.bg}>
<div className={classes.search}>
<div className={classes.searchIcon}>
<SearchIcon style={{ color: '#fff' }} />
<SearchIcon style={{ color: "#fff" }} />
</div>
<InputBase
onChange={handleChange}
placeholder="Search contacts..."
classes={{
root: classes.inputRoot,
input: classes.inputInput
input: classes.inputInput,
}}
inputProps={{ 'aria-label': 'search' }}
inputProps={{ "aria-label": "search" }}
/>
</div>
</div>
)
}
);
};
+2 -2
View File
@@ -6,8 +6,8 @@ export const contactsState = {
default: [],
}),
showModal: atom({
key: 'showModal',
default: false
key: "showModal",
default: false,
}),
filterContacts: atom({
key: 'filterContacts',
@@ -1,7 +1,9 @@
import { useRecoilState } from 'recoil';
import { contactsState } from './state';
import { useRecoilState } from "recoil";
import { contactsState } from "./state";
export const useFilteredContacts = () => {
const [ filteredContacts, setFilteredContacts ] = useRecoilState(contactsState.filterContacts);
const [filteredContacts, setFilteredContacts] = useRecoilState(
contactsState.filterContacts
);
return { filteredContacts, setFilteredContacts };
}
};
+4 -4
View File
@@ -1,7 +1,7 @@
import { useRecoilState } from 'recoil';
import { contactsState } from './state';
import { useRecoilState } from "recoil";
import { contactsState } from "./state";
export const useModal = () => {
const [ showModal, setShowModal ] = useRecoilState(contactsState.showModal);
const [showModal, setShowModal] = useRecoilState(contactsState.showModal);
return { showModal, setShowModal };
}
};
@@ -0,0 +1,47 @@
import React from "react";
import { shallow } from "enzyme";
import TwitterNotification from "./TwitterNotification";
jest.mock("react-i18next", () => ({
useTranslation: () => ({ t: (key) => key }),
}));
jest.mock("../../../../os/phone/hooks/usePhone", () => ({
usePhone: jest.fn().mockReturnValue({
config: {
twitter: {
showNotifications: true,
},
},
}),
}));
jest.mock("../../hooks/useTwitterNotification", () => ({
useTwitterNotification: jest.fn().mockReturnValue({
notification: {
profile_name: "test",
message: "test message",
},
}),
}));
describe("TwitterNotification", () => {
let wrapper;
beforeEach(() => {
wrapper = shallow(<TwitterNotification />);
});
it("renders", () => {
expect(wrapper).toBeDefined();
});
it("renders profile name", () => {
expect(wrapper.find(".makeStyles-profileName-5").text()).toEqual("@test");
});
it("renders message", () => {
expect(wrapper.find(".makeStyles-message-7").text()).toEqual(
"test message"
);
});
});
@@ -0,0 +1,88 @@
import React, { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import { makeStyles, createStyles, Theme } from "@material-ui/core/styles";
import TwitterIcon from "@material-ui/icons/Twitter";
import { useTwitterNotification } from "../../hooks/useTwitterNotification";
import Notification from "../../../../ui/components/Notification";
import { usePhone } from "../../../../os/phone/hooks/usePhone";
const useStyles = makeStyles((theme: Theme) =>
createStyles({
content: {
padding: theme.spacing(2),
overflowY: "hidden",
},
title: {
display: "flex",
flexFlow: "row nowrap",
justifyContent: "space-between",
alignItems: "center",
},
titleLeft: {
display: "flex",
flexFlow: "row nowrap",
justifyContent: "flex-start",
alignItems: "center",
},
icon: {
marginTop: "3px",
marginRight: "5px",
},
profileName: {
marginBottom: "3px",
},
justNow: {
fontSize: "18px",
fontStyle: "italic",
paddingRight: "3px",
},
message: {
fontSize: "16px",
overflow: "hidden",
display: "-webkit-box",
WebkitLineClamp: 2,
WebkitBoxOrient: "vertical",
},
})
);
function TwitterNotification() {
const classes = useStyles();
const { t } = useTranslation();
const [visible, setVisible] = useState(false);
const { notification } = useTwitterNotification();
const { config } = usePhone();
useEffect(() => {
if (notification) {
setVisible(true);
}
}, [notification?.id]);
if (!config?.twitter.showNotifications || !notification) return null;
const profileName = `@${notification.profile_name?.trim()}`;
return (
<Notification
key={notification.id}
open={visible}
handleClose={() => setVisible(false)}
>
<div className={classes.content}>
<div className={classes.title}>
<div className={classes.titleLeft}>
<div className={classes.icon}>
<TwitterIcon />
</div>
<div className={classes.profileName}>{profileName}</div>
</div>
<div className={classes.justNow}>{t("APPS_TWITTER_JUST_NOW")}</div>
</div>
<div className={classes.message}>{notification.message}</div>
</div>
</Notification>
);
}
export default TwitterNotification;
+4
View File
@@ -37,4 +37,8 @@ export const twitterState = {
key: "updateProfileSuccess",
default: null,
}),
notification: atom({
key: "notification",
default: null,
}),
};
@@ -0,0 +1,13 @@
import { useRecoilValue } from "recoil";
import { Tweet } from "../interfaces";
import { twitterState } from "./state";
interface ITwitterNotification {
notification: Tweet | null;
}
export const useTwitterNotification = (): ITwitterNotification => {
const notification = useRecoilValue<Tweet | null>(twitterState.notification);
return { notification };
};
@@ -41,6 +41,7 @@ export const useTwitterService = () => {
const setCreateSuccess = useSetRecoilState(
twitterState.createTweetSuccessful
);
const setNotification = useSetRecoilState(twitterState.notification);
const _setProfile = (profile) => {
setProfile(profile);
@@ -55,6 +56,10 @@ export const useTwitterService = () => {
setCreateLoading(false);
};
const _setNotification = (tweet) => {
setNotification(tweet);
};
const _setTweets = (tweets) => {
setTweets(tweets.map(processTweet));
};
@@ -69,4 +74,5 @@ export const useTwitterService = () => {
useNuiEvent(APP_TWITTER, "fetchTweetsFiltered", _setFilteredTweets);
useNuiEvent(APP_TWITTER, "createTweetLoading", setCreateLoading);
useNuiEvent(APP_TWITTER, "createTweetResult", _setCreateSuccess);
useNuiEvent(APP_TWITTER, "createTweetBroadcast", _setNotification);
};
+10
View File
@@ -0,0 +1,10 @@
export interface Tweet {
id: number;
profile_name?: string;
avatar_url?: string;
message: string;
createdAt?: string;
updatedAt?: string;
images?: string;
likes?: number;
}
+5 -3
View File
@@ -1,16 +1,18 @@
import "@babel/polyfill";
import React from "react";
import ReactDOM from "react-dom";
import { HashRouter } from "react-router-dom";
import { RecoilRoot } from "recoil";
import "./main.css";
import Phone from "./Phone";
import * as serviceWorker from "./serviceWorker";
import { HashRouter } from "react-router-dom";
import { RecoilRoot } from "recoil";
import TwitterNotification from "./apps/twitter/components/notification/TwitterNotification";
ReactDOM.render(
<HashRouter>
<RecoilRoot>
<TwitterNotification />
<Phone />
</RecoilRoot>
</HashRouter>,
+1
View File
@@ -20,6 +20,7 @@
"APPS_TWITTER_SUBMIT_IMAGE": "Add Media",
"APPS_TWITTER_CLOSE_IMAGE": "Close",
"APPS_TWITTER_CLOSE": "Close",
"APPS_TWITTER_JUST_NOW": "Just now",
"APPS_TWITTER_SEARCH_TWEETS": "Search for tweets",
"APPS_TWITTER_SEARCH_TWEETS_PLACEHOLDER": "Search by profile name or message",
"APPS_TWITTER_TWEET_MESSAGE_CHAR_LIMIT": "Message is over the character limit",
+7 -4
View File
@@ -1,6 +1,6 @@
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
@@ -10,10 +10,13 @@ body {
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
monospace;
}
a, a:visited, a:hover, a:active {
a,
a:visited,
a:hover,
a:active {
text-decoration: none;
}
+8 -3
View File
@@ -10,8 +10,13 @@ import {
amber,
} from "@material-ui/core/colors";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faAd, faPlaneArrival, faPhoneAlt, faLandmark } from "@fortawesome/free-solid-svg-icons";
import { faTwitter } from '@fortawesome/free-brands-svg-icons'
import {
faAd,
faPlaneArrival,
faPhoneAlt,
faLandmark,
} from "@fortawesome/free-solid-svg-icons";
import { faTwitter } from "@fortawesome/free-brands-svg-icons";
import ContactsIcon from "@material-ui/icons/Contacts";
import SettingsIcon from "@material-ui/icons/Settings";
@@ -90,7 +95,7 @@ const appsState = atom({
{
id: "TWITTER",
nameLocale: "APPS_TWITTER",
icon: <FontAwesomeIcon icon={faTwitter} fixedWidth size="xs"/>,
icon: <FontAwesomeIcon icon={faTwitter} fixedWidth size="xs" />,
backgroundColor: blue[600],
color: common.white,
path: "/twitter",
+7
View File
@@ -1,4 +1,5 @@
interface TwitterConfig {
showNotifications: boolean;
generateProfileNameFromUsers: boolean;
characterLimit: number;
allowEdtiableProfileName: boolean;
@@ -8,6 +9,11 @@ interface TwitterConfig {
maxImages: number;
}
interface NotificationConfig {
horizontal: "left" | "center" | "right";
vertical: "bottom" | "top";
}
export interface ServerConfig {
Locale: string;
KeyTogglePhone: number;
@@ -18,4 +24,5 @@ export interface ServerConfig {
DestoryChance: number;
DestroyPhoneReCheck: number;
twitter: TwitterConfig;
notificationPosition: NotificationConfig;
}
File renamed without changes.
+47
View File
@@ -0,0 +1,47 @@
import React from "react";
import { ThemeProvider } from "@material-ui/core";
import Paper from "@material-ui/core/Paper";
import Snackbar from "@material-ui/core/Snackbar";
import Fade from "@material-ui/core/Fade";
import { makeStyles } from "@material-ui/core/styles";
import { useSettings } from "../../apps/settings/hooks/useSettings";
import { usePhone } from "../../os/phone/hooks/usePhone";
const useStyles = makeStyles({
paper: {
width: "350px",
height: "100px",
opacity: "0.93",
},
snackBar: {
zIndex: -5, // we want this to appear behind other active NUI events...probably
},
});
function Notification({ children, handleClose, open }) {
const classes = useStyles();
const { currentTheme } = useSettings();
const { config } = usePhone();
if (!config) return null;
const { horizontal, vertical } = config.notificationPosition;
return (
<ThemeProvider theme={currentTheme()}>
<Snackbar
className={classes.snackBar}
anchorOrigin={{ horizontal, vertical }}
ClickAwayListenerProps={{ onClickAway: () => null }}
onClose={handleClose}
open={open}
TransitionComponent={Fade}
autoHideDuration={6000}
>
<Paper className={classes.paper}>{children}</Paper>
</Snackbar>
</ThemeProvider>
);
}
export default Notification;
+15
View File
@@ -1762,6 +1762,21 @@
dependencies:
"@babel/types" "^7.3.0"
"@types/cheerio@*":
version "0.22.22"
resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.22.tgz#ae71cf4ca59b8bbaf34c99af7a5d6c8894988f5f"
integrity sha512-05DYX4zU96IBfZFY+t3Mh88nlwSMtmmzSYaQkKN48T495VV1dkHSah6qYyDTN5ngaS0i0VonH37m+RuzSM0YiA==
dependencies:
"@types/node" "*"
"@types/enzyme@^3.10.7":
version "3.10.7"
resolved "https://registry.yarnpkg.com/@types/enzyme/-/enzyme-3.10.7.tgz#ebdf3b972d293095e09af479e36c772025285e3a"
integrity sha512-J+0wduPGAkzOvW7sr6hshGv1gBI3WXLRTczkRKzVPxLP3xAkYxZmvvagSBPw8Z452fZ8TGUxCmAXcb44yLQksw==
dependencies:
"@types/cheerio" "*"
"@types/react" "*"
"@types/eslint-visitor-keys@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d"
+6
View File
@@ -0,0 +1,6 @@
module.exports = {
presets: [
['@babel/preset-env', {targets: {node: 'current'}}],
'@babel/preset-typescript',
],
};
+7 -8
View File
@@ -1,15 +1,14 @@
import { ESX } from '../client/client';
import events from '../utils/events';
import { ESX } from "../client/client";
import events from "../utils/events";
onNet(events.CONTACTS_SEND_CONTACTS, (contacts: any) => {
SendNuiMessage(
JSON.stringify({
app: 'CONTACTS',
method: 'setContacts',
data: contacts
app: "CONTACTS",
method: "setContacts",
data: contacts,
})
)
);
});
RegisterNuiCallbackType(events.CONTACTS_ADD_CONTACT);
@@ -18,7 +17,7 @@ on(`__cfx_nui:${events.CONTACTS_ADD_CONTACT}`, (data: any) => {
const number = data.number;
const avatar = data.avatar;
emitNet(events.CONTACTS_ADD_CONTACT, number, display, avatar);
setTimeout(() => {
emitNet(events.CONTACTS_GET_CONTACTS)
}, 500)
+255 -168
View File
@@ -1,128 +1,213 @@
import { ESX } from "../client/client";
import config from '../utils/config';
import { Delay } from '../utils/fivem';
import events from '../utils/events';
import config from "../utils/config";
import { Delay } from "../utils/fivem";
import events from "../utils/events";
RegisterCommand('phone:close', (source: any, args: string[], raw: any) => {
phoneCloseAnim()
SetNuiFocus(false, false)
RegisterCommand(
"phone:close",
(source: any, args: string[], raw: any) => {
phoneCloseAnim();
SetNuiFocus(false, false);
SendNuiMessage(
JSON.stringify({
app: "PHONE",
method: "setVisibility",
data: false
data: false,
})
)
}, false);
);
},
false
);
let prop = 0
let isPhoneOpen = false
let propCreated = false
let phoneModel = "prop_amb_phone" // Refered to in newphoneProp function. Requires custom phone being streamed.
let prop = 0;
let isPhoneOpen = false;
let propCreated = false;
let phoneModel = "prop_amb_phone"; // Refered to in newphoneProp function. Requires custom phone being streamed.
const newPhoneProp = async () => { //Function for creating the phone prop
deletePhone() //deletes the already existing prop before creating another.
if (!propCreated) {
RequestModel(phoneModel)
while (!HasModelLoaded(phoneModel)) {
await Delay(1)
console.log("MODEL HASNT LOADED")
}
const playerPed = PlayerPedId()
const [x, y, z] = GetEntityCoords(playerPed, true);
prop = CreateObject(GetHashKey(phoneModel), x, y, z + 0.2, true, true, true)
//prop = CreateObject(GetHashKey(phoneModel), 1.0, 1.0, 1.0, 1, 1, 0)
const boneIndex = GetPedBoneIndex(playerPed, 28422)
AttachEntityToEntity(prop, playerPed, boneIndex, 0.0, 0.0, 0.0, 0.0, 0.0, -.0, true, true, false, true, 1.0, true); //-- Attaches the phone to the player.
propCreated = true
console.log("prop created")
const newPhoneProp = async () => {
//Function for creating the phone prop
deletePhone(); //deletes the already existing prop before creating another.
if (!propCreated) {
RequestModel(phoneModel);
while (!HasModelLoaded(phoneModel)) {
await Delay(1);
console.log("MODEL HASNT LOADED");
}
else if (propCreated) {
console.log("prop already created")
}
}
function deletePhone() { //-- Triggered in newphoneProp function. Only way to destory the prop correctly.
if (prop != 0) {
const playerPed = PlayerPedId();
const [x, y, z] = GetEntityCoords(playerPed, true);
prop = CreateObject(
GetHashKey(phoneModel),
x,
y,
z + 0.2,
true,
true,
true
);
//prop = CreateObject(GetHashKey(phoneModel), 1.0, 1.0, 1.0, 1, 1, 0)
const boneIndex = GetPedBoneIndex(playerPed, 28422);
AttachEntityToEntity(
prop,
playerPed,
boneIndex,
0.0,
0.0,
0.0,
0.0,
0.0,
-0.0,
true,
true,
false,
true,
1.0,
true
); //-- Attaches the phone to the player.
propCreated = true;
console.log("prop created");
} else if (propCreated) {
console.log("prop already created");
}
};
function deletePhone() {
//-- Triggered in newphoneProp function. Only way to destory the prop correctly.
if (prop != 0) {
//Citizen.invokeNative(0xAE3CBE5BF394C9C9 , Citizen.pointerValueIntInitialized(prop))
DeleteEntity(prop);
prop = 0
propCreated = false
console.log("prop destroyed")
prop = 0;
propCreated = false;
console.log("prop destroyed");
}
}
async function loadAnimDict(dict: any) { //-- Loads the animation dict. Used in the anim functions.
while (!HasAnimDictLoaded(dict)) {
RequestAnimDict(dict)
await Delay(100)
async function loadAnimDict(dict: any) {
//-- Loads the animation dict. Used in the anim functions.
while (!HasAnimDictLoaded(dict)) {
RequestAnimDict(dict);
await Delay(100);
}
}
async function phoneOpenAnim() { //Phone Open Animation
console.log("phoneOpenAnim") //Left for testing purposes.
const flag = 50 //https://runtime.fivem.net/doc/natives/?_0xEA47FE3719165B94
deletePhone() //Deleting before creating a new phone where itll be deleted again.
if (IsPedInAnyVehicle(GetPlayerPed(-1), true)) { //-- true refers to at get in.
const dict = 'anim@cellphone@in_car@ps'
async function phoneOpenAnim() {
//Phone Open Animation
console.log("phoneOpenAnim"); //Left for testing purposes.
const flag = 50; //https://runtime.fivem.net/doc/natives/?_0xEA47FE3719165B94
deletePhone(); //Deleting before creating a new phone where itll be deleted again.
if (IsPedInAnyVehicle(GetPlayerPed(-1), true)) {
//-- true refers to at get in.
const dict = "anim@cellphone@in_car@ps";
ClearPedTasks(GetPlayerPed(-1))
await loadAnimDict(dict)
TaskPlayAnim(GetPlayerPed(-1), dict, 'cellphone_text_in', 8.0, -1, -1, flag, 0, false, false, false)
await Delay(300) //Gives time for animation starts before creating the phone
await newPhoneProp() //Creates the phone and attaches it.
}
else { //While not in a vehicle it will use this dict.
const dict = 'cellphone@'
ClearPedTasks(GetPlayerPed(-1));
await loadAnimDict(dict);
TaskPlayAnim(
GetPlayerPed(-1),
dict,
"cellphone_text_in",
8.0,
-1,
-1,
flag,
0,
false,
false,
false
);
await Delay(300); //Gives time for animation starts before creating the phone
await newPhoneProp(); //Creates the phone and attaches it.
} else {
//While not in a vehicle it will use this dict.
const dict = "cellphone@";
ClearPedTasks(GetPlayerPed(-1))
await loadAnimDict(dict)
TaskPlayAnim(GetPlayerPed(-1), dict, 'cellphone_text_in', 8.0, -1, -1, flag, 0, false, false, false)
await Delay(300) //Gives time for animation starts before creating the phone
await newPhoneProp() //Creates the phone and attaches it.
}
ClearPedTasks(GetPlayerPed(-1));
await loadAnimDict(dict);
TaskPlayAnim(
GetPlayerPed(-1),
dict,
"cellphone_text_in",
8.0,
-1,
-1,
flag,
0,
false,
false,
false
);
await Delay(300); //Gives time for animation starts before creating the phone
await newPhoneProp(); //Creates the phone and attaches it.
}
}
async function phoneCloseAnim() { //Phone Close Animation
console.log("phoneCloseAnim") //Left for testing purposes.
const flag = 50 //https://runtime.fivem.net/doc/natives/?_0xEA47FE3719165B94
const anim = 'cellphone_text_out'
if (IsPedInAnyVehicle(GetPlayerPed(-1), true)) { //true refers to at get in.
const dict = 'anim@cellphone@in_car@ps'
StopAnimTask(GetPlayerPed(-1), dict, 'cellphone_text_in', 1.0) //Stop the pull out animation
deletePhone() //Deletes the prop early incase they get out of the vehicle.
await Delay(250) //lets it get to a certain point
loadAnimDict(dict) //loads the new animation
TaskPlayAnim(GetPlayerPed(-1), dict, anim, 8.0, -1, -1, flag, 0, false, false, false) //puts phone into pocket
await Delay(200) //waits until the phone is in the pocket
StopAnimTask(GetPlayerPed(-1), dict, anim, 1.0) //clears the animation
}
else { //While not in a vehicle it will use this dict.
const dict = 'cellphone@'
async function phoneCloseAnim() {
//Phone Close Animation
console.log("phoneCloseAnim"); //Left for testing purposes.
const flag = 50; //https://runtime.fivem.net/doc/natives/?_0xEA47FE3719165B94
const anim = "cellphone_text_out";
if (IsPedInAnyVehicle(GetPlayerPed(-1), true)) {
//true refers to at get in.
const dict = "anim@cellphone@in_car@ps";
StopAnimTask(GetPlayerPed(-1), dict, 'cellphone_text_in', 1.0) //Stop the pull out animation
await Delay(100) //lets it get to a certain point
loadAnimDict(dict) //loads the new animation
TaskPlayAnim(GetPlayerPed(-1), dict, anim, 8.0, -1, -1, flag, 0, false, false, false) //puts phone into pocket
await Delay(200) //waits until the phone is in the pocket
StopAnimTask(GetPlayerPed(-1), dict, anim, 1.0) //clears the animation
deletePhone() //Deletes the prop.
}
StopAnimTask(GetPlayerPed(-1), dict, "cellphone_text_in", 1.0); //Stop the pull out animation
deletePhone(); //Deletes the prop early incase they get out of the vehicle.
await Delay(250); //lets it get to a certain point
loadAnimDict(dict); //loads the new animation
TaskPlayAnim(
GetPlayerPed(-1),
dict,
anim,
8.0,
-1,
-1,
flag,
0,
false,
false,
false
); //puts phone into pocket
await Delay(200); //waits until the phone is in the pocket
StopAnimTask(GetPlayerPed(-1), dict, anim, 1.0); //clears the animation
} else {
//While not in a vehicle it will use this dict.
const dict = "cellphone@";
StopAnimTask(GetPlayerPed(-1), dict, "cellphone_text_in", 1.0); //Stop the pull out animation
await Delay(100); //lets it get to a certain point
loadAnimDict(dict); //loads the new animation
TaskPlayAnim(
GetPlayerPed(-1),
dict,
anim,
8.0,
-1,
-1,
flag,
0,
false,
false,
false
); //puts phone into pocket
await Delay(200); //waits until the phone is in the pocket
StopAnimTask(GetPlayerPed(-1), dict, anim, 1.0); //clears the animation
deletePhone(); //Deletes the prop.
}
}
async function carryingPhone(cb: any) {
if (ESX === null) return cb(0);
ESX.TriggerServerCallback('phone:getItemAmount', (qtty: number) => {
cb(qtty > 0);
}, 'phone');
ESX.TriggerServerCallback(
"phone:getItemAmount",
(qtty: number) => {
cb(qtty > 0);
},
"phone"
);
}
function noPhone() {
if (ESX === null) return;
ESX.ShowNotification('Oi Mate, No El Telephono')
if (ESX === null) return;
ESX.ShowNotification("Oi Mate, No El Telephono");
}
function sendPhoneConfig() {
@@ -130,26 +215,25 @@ function sendPhoneConfig() {
JSON.stringify({
app: "PHONE",
method: "phoneConfig",
data: config
data: config,
})
)
);
}
setTick(() => {
if (IsControlJustPressed(1, config.KeyTogglePhone)) {
Phone();
}
})
});
async function Phone() {
if (config.PhoneAsItem) {
console.log("CONFIG ON")
console.log("CONFIG ON");
carryingPhone(async (carryingPhone: any) => {
if (carryingPhone) {
if (!isPhoneOpen) {
isPhoneOpen = true
await phoneOpenAnim()
isPhoneOpen = true;
await phoneOpenAnim();
emitNet(events.CONTACTS_GET_CONTACTS);
emitNet(events.SELLOUT_FETCH_LISTING);
emitNet('phone:getCredentials') // Gets the credentials. Will eventually most likely only get the phone number and name, idk.
@@ -159,35 +243,33 @@ async function Phone() {
JSON.stringify({
app: "PHONE",
method: "setVisibility",
data: true
data: true,
})
)
sendPhoneConfig()
SetNuiFocus(true, true)
}
else {
isPhoneOpen = false
await phoneCloseAnim()
SendNuiMessage( //Hides phone
);
sendPhoneConfig();
SetNuiFocus(true, true);
} else {
isPhoneOpen = false;
await phoneCloseAnim();
SendNuiMessage(
//Hides phone
JSON.stringify({
app: "PHONE",
method: "setVisibility",
data: false
data: false,
})
)
SetNuiFocus(false, false)
);
SetNuiFocus(false, false);
}
}
else {
} else {
noPhone();
}
})
}
else if (!config.PhoneAsItem) {
console.log("CONFIG OFF")
if (!isPhoneOpen) {
isPhoneOpen = true
await phoneOpenAnim()
});
} else if (!config.PhoneAsItem) {
console.log("CONFIG OFF");
if (!isPhoneOpen) {
isPhoneOpen = true;
await phoneOpenAnim();
emitNet(events.CONTACTS_GET_CONTACTS);
emitNet(events.SELLOUT_FETCH_LISTING);
emitNet('phone:getCredentials')
@@ -197,93 +279,98 @@ async function Phone() {
JSON.stringify({
app: "PHONE",
method: "setVisibility",
data: true
data: true,
})
)
sendPhoneConfig()
SetNuiFocus(true, true)
}
else {
isPhoneOpen = false
await phoneCloseAnim()
SendNuiMessage( //Hides phone
);
sendPhoneConfig();
SetNuiFocus(true, true);
} else {
isPhoneOpen = false;
await phoneCloseAnim();
SendNuiMessage(
//Hides phone
JSON.stringify({
app: "PHONE",
method: "setVisibility",
data: false
data: false,
})
)
SetNuiFocus(false, false)
);
SetNuiFocus(false, false);
}
}
}
RegisterCommand(
"phone",
() => {
//-- Toggles Phone
Phone();
},
false
);
RegisterCommand('phone', () => { //-- Toggles Phone
Phone()
}, false)
RegisterNuiCallbackType('phone:close');
RegisterNuiCallbackType("phone:close");
on(`__cfx_nui:phone:close`, () => {
Phone();
}) // Called for when the phone is closed via the UI.
}); // Called for when the phone is closed via the UI.
AddEventHandler('onResourceStop', function(resource: string) {
AddEventHandler("onResourceStop", function (resource: string) {
if (resource === GetCurrentResourceName()) {
SendNuiMessage(
JSON.stringify({
app: 'PHONE',
method: 'setVisibility',
data: false
app: "PHONE",
method: "setVisibility",
data: false,
})
)
SetNuiFocus(false, false)
deletePhone() //Deletes the phone incase it was attached.
ClearPedTasks(GetPlayerPed(-1)) //Leave here until launch as it'll fix any stuck animations.
);
SetNuiFocus(false, false);
deletePhone(); //Deletes the phone incase it was attached.
ClearPedTasks(GetPlayerPed(-1)); //Leave here until launch as it'll fix any stuck animations.
}
})
});
//
//Phone Destory When Wet
//
function countPhone(cb: any) {
if (ESX === null) return cb(0)
ESX.TriggerServerCallback('phone:getItemAmount', (qtty: number) => {
cb(qtty > 0);
}, 'phone');
if (ESX === null) return cb(0);
ESX.TriggerServerCallback(
"phone:getItemAmount",
(qtty: number) => {
cb(qtty > 0);
},
"phone"
);
}
let destroyedPhone = false
let destroyedPhone = false;
setTick(async () => {
while (config.SwimDestroy) {
await Delay(config.RunRate * 1000);
if (IsPedSwimming(PlayerPedId())) {
let chance = Math.floor((Math.random() * 100) + 1);
let chance = Math.floor(Math.random() * 100 + 1);
if (chance <= config.DestoryChance) {
countPhone((countPhone: boolean) => {
if (countPhone) {
ESX.ShowNotification('Your phone is ruined from the water!')
destroyedPhone = true
ESX.ShowNotification("Your phone is ruined from the water!");
destroyedPhone = true;
}
})
});
}
if (destroyedPhone) {
await Delay(config.DestroyPhoneReCheck * 60000)
await Delay(config.DestroyPhoneReCheck * 60000);
}
}
}
}
})
});
onNet('phone:sendCredentials', (number: string) => {
onNet("phone:sendCredentials", (number: string) => {
SendNuiMessage(
JSON.stringify({
app: "SIMCARD",
method: "setNumber",
data: number
data: number,
})
)
});
);
});
+30 -26
View File
@@ -1,87 +1,91 @@
import events from '../utils/events';
import { sendTwitterMessage } from '../utils/messages';
import events from "../utils/events";
import { sendTwitterMessage } from "../utils/messages";
/**
* Twitter get or create profile
*/
RegisterNuiCallbackType(events.TWITTER_GET_OR_CREATE_PROFILE);
on(`__cfx_nui:${events.TWITTER_GET_OR_CREATE_PROFILE}`, () => {
emitNet(events.TWITTER_GET_OR_CREATE_PROFILE);
emitNet(events.TWITTER_GET_OR_CREATE_PROFILE);
});
onNet(events.TWITTER_GET_OR_CREATE_PROFILE_SUCCESS, (profile: any) => {
sendTwitterMessage(events.TWITTER_GET_OR_CREATE_PROFILE_SUCCESS, profile);
sendTwitterMessage(events.TWITTER_GET_OR_CREATE_PROFILE_SUCCESS, profile);
});
onNet(events.TWITTER_GET_OR_CREATE_PROFILE_FAILURE, () => {
sendTwitterMessage(events.TWITTER_GET_OR_CREATE_PROFILE_FAILURE);
sendTwitterMessage(events.TWITTER_GET_OR_CREATE_PROFILE_FAILURE);
});
/**
* Twitter update profile
*/
RegisterNuiCallbackType(events.TWITTER_UPDATE_PROFILE);
on(`__cfx_nui:${events.TWITTER_UPDATE_PROFILE}`, (data: string) => {
sendTwitterMessage(events.TWITTER_UPDATE_PROFILE_LOADING, true);
emitNet(events.TWITTER_UPDATE_PROFILE, data);
sendTwitterMessage(events.TWITTER_UPDATE_PROFILE_LOADING, true);
emitNet(events.TWITTER_UPDATE_PROFILE, data);
});
onNet(events.TWITTER_UPDATE_PROFILE_RESULT, (result: boolean) => {
sendTwitterMessage(events.TWITTER_UPDATE_PROFILE_RESULT, result);
emitNet(events.TWITTER_GET_OR_CREATE_PROFILE);
sendTwitterMessage(events.TWITTER_UPDATE_PROFILE_RESULT, result);
emitNet(events.TWITTER_GET_OR_CREATE_PROFILE);
});
/**
* Twitter fetch tweets
*/
RegisterNuiCallbackType(events.TWITTER_FETCH_TWEETS);
on(`__cfx_nui:${events.TWITTER_FETCH_TWEETS}`, () => {
emitNet(events.TWITTER_FETCH_TWEETS);
emitNet(events.TWITTER_FETCH_TWEETS);
});
onNet(events.TWITTER_FETCH_TWEETS_SUCCESS, (tweets: any) => {
sendTwitterMessage(events.TWITTER_FETCH_TWEETS_SUCCESS, tweets);
sendTwitterMessage(events.TWITTER_FETCH_TWEETS_SUCCESS, tweets);
});
onNet(events.TWITTER_FETCH_TWEETS_FAILURE, () => {
sendTwitterMessage(events.TWITTER_FETCH_TWEETS_FAILURE);
sendTwitterMessage(events.TWITTER_FETCH_TWEETS_FAILURE);
});
/**
* Twitter fetch filtered tweets
*/
RegisterNuiCallbackType(events.TWITTER_FETCH_TWEETS_FILTERED);
on(`__cfx_nui:${events.TWITTER_FETCH_TWEETS_FILTERED}`, (searchValue: string) => {
on(
`__cfx_nui:${events.TWITTER_FETCH_TWEETS_FILTERED}`,
(searchValue: string) => {
emitNet(events.TWITTER_FETCH_TWEETS_FILTERED, searchValue);
});
}
);
onNet(events.TWITTER_FETCH_TWEETS_FILTERED_SUCCESS, (tweets: any) => {
sendTwitterMessage(events.TWITTER_FETCH_TWEETS_FILTERED_SUCCESS, tweets);
sendTwitterMessage(events.TWITTER_FETCH_TWEETS_FILTERED_SUCCESS, tweets);
});
onNet(events.TWITTER_FETCH_TWEETS_FILTERED_FAILURE, () => {
sendTwitterMessage(events.TWITTER_FETCH_TWEETS_FILTERED_FAILURE);
sendTwitterMessage(events.TWITTER_FETCH_TWEETS_FILTERED_FAILURE);
});
/**
* Twitter create tweet
*/
RegisterNuiCallbackType(events.TWITTER_CREATE_TWEET);
on(`__cfx_nui:${events.TWITTER_CREATE_TWEET}`, (data: string) => {
sendTwitterMessage(events.TWITTER_CREATE_TWEET_LOADING, true);
emitNet(events.TWITTER_CREATE_TWEET, data);
sendTwitterMessage(events.TWITTER_CREATE_TWEET_LOADING, true);
emitNet(events.TWITTER_CREATE_TWEET, data);
});
onNet(events.TWITTER_CREATE_TWEET_RESULT, (result: boolean) => {
sendTwitterMessage(events.TWITTER_CREATE_TWEET_RESULT, result);
emitNet(events.TWITTER_FETCH_TWEETS);
sendTwitterMessage(events.TWITTER_CREATE_TWEET_RESULT, result);
emitNet(events.TWITTER_FETCH_TWEETS);
});
onNet(events.TWITTER_CREATE_TWEET_FAILURE, () => {
sendTwitterMessage(events.TWITTER_CREATE_TWEET_FAILURE);
sendTwitterMessage(events.TWITTER_CREATE_TWEET_FAILURE);
});
onNet(events.TWITTER_CREATE_TWEET_BROADCAST, (tweet: any) => {
sendTwitterMessage(events.TWITTER_CREATE_TWEET_BROADCAST, tweet);
});
/**
@@ -89,5 +93,5 @@ onNet(events.TWITTER_CREATE_TWEET_FAILURE, () => {
*/
RegisterNuiCallbackType(events.TWITTER_TOGGLE_LIKE);
on(`__cfx_nui:${events.TWITTER_TOGGLE_LIKE}`, (tweetId: number) => {
emitNet(events.TWITTER_TOGGLE_LIKE, tweetId);
});
emitNet(events.TWITTER_TOGGLE_LIKE, tweetId);
});
+2 -2
View File
@@ -8,6 +8,6 @@ export let ESX: ESXClient = null;
setTick(() => {
while (ESX === null) {
emit('esx:getSharedObject', (obj: ESXClient) => ESX = obj);
emit("esx:getSharedObject", (obj: ESXClient) => (ESX = obj));
}
});
});
+1 -1
View File
@@ -10,7 +10,7 @@
"target": "es6",
"allowJs": true,
"lib": ["es2017"],
"types": ["@citizenfx/client", "@types/node"],
"types": ["@citizenfx/client", "@types/node", "jest"],
"moduleResolution": "node",
"resolveJsonModule": true,
"esModuleInterop": true
+9 -9
View File
@@ -1,14 +1,14 @@
!function(e){var t={};function a(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=245)}([function(e,t,a){"use strict";e.exports=a(432)},function(e,t,a){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}a.d(t,"a",(function(){return n}))},function(e,t,a){e.exports=a(442)()},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(37);function r(e,t){if(null==e)return{};var a,r,i=Object(n.a)(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)a=o[r],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}},function(e,t,a){"use strict";e.exports=a(441)},function(e,t,a){var n=a(14),r=a(25),i=a(42),o=a(39),u=a(47),s=function(e,t,a){var l,f,d,c,_=e&s.F,h=e&s.G,g=e&s.S,m=e&s.P,F=e&s.B,p=h?n:g?n[t]||(n[t]={}):(n[t]||{}).prototype,b=h?r:r[t]||(r[t]={}),y=b.prototype||(b.prototype={});for(l in h&&(a=t),a)d=((f=!_&&p&&void 0!==p[l])?p:a)[l],c=F&&f?u(d,n):m&&"function"==typeof d?u(Function.call,d):d,p&&o(p,l,d,e&s.U),b[l]!=d&&i(b,l,c),m&&y[l]!=d&&(y[l]=d)};n.core=r,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},function(e,t,a){"use strict";function n(e){var t,a,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(a=n(e[t]))&&(r&&(r+=" "),r+=a);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}t.a=function(){for(var e,t,a=0,r="";a<arguments.length;)(e=arguments[a++])&&(t=n(e))&&(r&&(r+=" "),r+=t);return r}},function(e,t,a){"use strict";var n=a(1),r=a(3),i=a(0),o=a.n(i),u=(a(2),a(84)),s=a.n(u),l=a(496),f=a(495),d=a(494),c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(a){var i=t.defaultTheme,u=t.withTheme,c=void 0!==u&&u,_=t.name,h=Object(r.a)(t,["defaultTheme","withTheme","name"]);var g=_,m=Object(l.a)(e,Object(n.a)({defaultTheme:i,Component:a,name:_||a.displayName,classNamePrefix:g},h)),F=o.a.forwardRef((function(e,t){e.classes;var u,s=e.innerRef,l=Object(r.a)(e,["classes","innerRef"]),h=m(Object(n.a)(Object(n.a)({},a.defaultProps),e)),g=l;return("string"==typeof _||c)&&(u=Object(d.a)()||i,_&&(g=Object(f.a)({theme:u,name:_,props:l})),c&&!g.theme&&(g.theme=u)),o.a.createElement(a,Object(n.a)({ref:s||t,classes:h},g))}));return s()(F,a),F}},_=a(62);t.a=function(e,t){return c(e,Object(n.a)({defaultTheme:_.a},t))}},,function(e,t,a){"use strict";function n(e,t){return function(){return null}}a.r(t),a.d(t,"chainPropTypes",(function(){return n})),a.d(t,"deepmerge",(function(){return r.a})),a.d(t,"elementAcceptingRef",(function(){return s})),a.d(t,"elementTypeAcceptingRef",(function(){return l})),a.d(t,"exactProp",(function(){return f})),a.d(t,"formatMuiErrorMessage",(function(){return d.a})),a.d(t,"getDisplayName",(function(){return p})),a.d(t,"HTMLElementType",(function(){return b})),a.d(t,"ponyfillGlobal",(function(){return y})),a.d(t,"refType",(function(){return k}));var r=a(154),i=a(2),o=a.n(i);var u=(o.a.element,function(){return null});u.isRequired=(o.a.element.isRequired,function(){return null});var s=u;var l=(i.elementType,function(){return null});a(24),a(1);function f(e){return e}var d=a(109),c=a(34),_=a(58),h=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function g(e){var t="".concat(e).match(h);return t&&t[1]||""}function m(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.displayName||e.name||g(e)||t}function F(e,t,a){var n=m(t);return e.displayName||(""!==n?"".concat(a,"(").concat(n,")"):a)}function p(e){if(null!=e){if("string"==typeof e)return e;if("function"==typeof e)return m(e,"Component");if("object"===Object(c.a)(e))switch(e.$$typeof){case _.ForwardRef:return F(e,e.render,"ForwardRef");case _.Memo:return F(e,e.type,"memo");default:return}}}function b(e,t,a,n,r){return null}var y="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),k=o.a.oneOfType([o.a.func,o.a.object])},function(e,t,a){"use strict";a.dLine truncated
!function(e){var t={};function a(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=245)}([function(e,t,a){"use strict";e.exports=a(432)},function(e,t,a){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}a.d(t,"a",(function(){return n}))},function(e,t,a){e.exports=a(442)()},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(37);function r(e,t){if(null==e)return{};var a,r,i=Object(n.a)(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)a=o[r],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}},function(e,t,a){"use strict";e.exports=a(436)},function(e,t,a){var n=a(14),r=a(25),i=a(42),o=a(39),u=a(47),s=function(e,t,a){var l,f,d,c,_=e&s.F,h=e&s.G,g=e&s.S,m=e&s.P,F=e&s.B,p=h?n:g?n[t]||(n[t]={}):(n[t]||{}).prototype,b=h?r:r[t]||(r[t]={}),y=b.prototype||(b.prototype={});for(l in h&&(a=t),a)d=((f=!_&&p&&void 0!==p[l])?p:a)[l],c=F&&f?u(d,n):m&&"function"==typeof d?u(Function.call,d):d,p&&o(p,l,d,e&s.U),b[l]!=d&&i(b,l,c),m&&y[l]!=d&&(y[l]=d)};n.core=r,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},function(e,t,a){"use strict";function n(e){var t,a,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(a=n(e[t]))&&(r&&(r+=" "),r+=a);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}t.a=function(){for(var e,t,a=0,r="";a<arguments.length;)(e=arguments[a++])&&(t=n(e))&&(r&&(r+=" "),r+=t);return r}},function(e,t,a){"use strict";var n=a(1),r=a(3),i=a(0),o=a.n(i),u=(a(2),a(85)),s=a.n(u),l=a(497),f=a(496),d=a(495),c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(a){var i=t.defaultTheme,u=t.withTheme,c=void 0!==u&&u,_=t.name,h=Object(r.a)(t,["defaultTheme","withTheme","name"]);var g=_,m=Object(l.a)(e,Object(n.a)({defaultTheme:i,Component:a,name:_||a.displayName,classNamePrefix:g},h)),F=o.a.forwardRef((function(e,t){e.classes;var u,s=e.innerRef,l=Object(r.a)(e,["classes","innerRef"]),h=m(Object(n.a)(Object(n.a)({},a.defaultProps),e)),g=l;return("string"==typeof _||c)&&(u=Object(d.a)()||i,_&&(g=Object(f.a)({theme:u,name:_,props:l})),c&&!g.theme&&(g.theme=u)),o.a.createElement(a,Object(n.a)({ref:s||t,classes:h},g))}));return s()(F,a),F}},_=a(62);t.a=function(e,t){return c(e,Object(n.a)({defaultTheme:_.a},t))}},,function(e,t,a){"use strict";function n(e,t){return function(){return null}}a.r(t),a.d(t,"chainPropTypes",(function(){return n})),a.d(t,"deepmerge",(function(){return r.a})),a.d(t,"elementAcceptingRef",(function(){return s})),a.d(t,"elementTypeAcceptingRef",(function(){return l})),a.d(t,"exactProp",(function(){return f})),a.d(t,"formatMuiErrorMessage",(function(){return d.a})),a.d(t,"getDisplayName",(function(){return p})),a.d(t,"HTMLElementType",(function(){return b})),a.d(t,"ponyfillGlobal",(function(){return y})),a.d(t,"refType",(function(){return k}));var r=a(153),i=a(2),o=a.n(i);var u=(o.a.element,function(){return null});u.isRequired=(o.a.element.isRequired,function(){return null});var s=u;var l=(i.elementType,function(){return null});a(24),a(1);function f(e){return e}var d=a(110),c=a(34),_=a(58),h=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function g(e){var t="".concat(e).match(h);return t&&t[1]||""}function m(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.displayName||e.name||g(e)||t}function F(e,t,a){var n=m(t);return e.displayName||(""!==n?"".concat(a,"(").concat(n,")"):a)}function p(e){if(null!=e){if("string"==typeof e)return e;if("function"==typeof e)return m(e,"Component");if("object"===Object(c.a)(e))switch(e.$$typeof){case _.ForwardRef:return F(e,e.render,"ForwardRef");case _.Memo:return F(e,e.type,"memo");default:return}}}function b(e,t,a,n,r){return null}var y="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),k=o.a.oneOfType([o.a.func,o.a.object])},function(e,t,a){"use strict";a.dLine truncated
/*!
* Font Awesome Free 5.15.1 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
*/
function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function u(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},n=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(a).filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})))),n.forEach((function(t){o(e,t,a[t])}))}return e}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=[],n=!0,r=!1,i=void 0;try{for(var o,u=e[Symbol.iterator]();!(n=(o=u.next()).done)&&(a.push(o.value),!t||a.length!==t);n=!0);}catch(e){r=!0,i=e}finally{try{n||null==u.return||u.return()}finally{if(r)throw i}}return a}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}a.d(t,"a",(function(){return Ee})),a.d(t,"b",(function(){return we}));var l=function(){},f={},d={},c={mark:l,measure:l};try{"undefined"!=typeof window&&(f=window),"undefined"!=typeof document&&(d=document),"undefined"!=typeof MutationObserver&&MutationObserver,"undefined"!=typeof performance&&(c=performance)}catch(e){}var _=(f.navigator||{}).userAgent,h=void 0===_?"":_,g=f,m=d,F=c,p=(g.document,!!m.documentElement&&!!m.head&&"function"==typeof m.addEventListener&&"function"==typeof m.createElement),b=(~h.indexOf("MSIE")||h.indexOf("Trident/"),function(){try{}catch(e){return!1}}(),[1,2,3,4,5,6,7,8,9,10]),y=b.concat([11,12,13,14,15,16,17,18,19,20]),k={GROUP:"group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},v=(["xs","sm","lg","fw","ul","li","border","pull-left","pull-right","spin","pulse","rotate-90","rotate-180","rotate-270","flip-horizontal","flip-vertical","flip-both","stack","stack-1x","stack-2x","inverse","layers","layers-text","layers-counter",k.GROUP,k.SWAP_OPACITY,k.PRIMARY,k.SECONDARY].concat(b.map((function(e){return"".concat(e,"x")}))).concat(y.map((function(e){return"w-".concat(e)}))),g.FontAwesomeConfig||{});if(m&&"function"==typeof m.querySelector){[["data-family-prefix","familyPrefix"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]].forEach((function(e){var t=s(e,2),a=t[0],n=t[1],r=function(e){return""===e||"false"!==e&&("true"===e||e)}(function(e){var t=m.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}(a));null!=r&&(v[n]=r)}))}var w=u({},{familyPrefix:"fa",replacementClass:"svg-inline--fa",autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0},v);w.autoReplaceSvg||(w.observeMutations=!1);var E=u({},w);g.FontAwesomeConfig=E;var D=g||{};D.___FONT_AWESOME___||(D.___FONT_AWESOME___={}),D.___FONT_AWESOME___.styles||(D.___FONT_AWESOME___.styles={}),D.___FONT_AWESOME___.hooks||(D.___FONT_AWESOME___.hooks={}),D.___FONT_AWESOME___.shims||(D.___FONT_AWESOME___.shims=[]);var x=D.___FONT_AWESOME___,C=[];p&&((m.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(m.readyState)||m.addEventListener("DOMContentLoaded",(function e(){m.removeEventListener("DOMContentLoaded",e),1,C.map((function(e){return e()}))})));var j,S=function(){},O=void 0!==e&&void 0!==e.process&&"function"==typeof e.process.emit,B=void 0===n?setTimeout:n,q=[];function T(){for(var e=0;e<q.length;e++)q[e][0](q[e][1]);q=[],j=!1}function A(e,t){q.push([e,t]),j||(j=!0,B(T,0))}function P(e){var t=e.owner,a=t._state,n=t._data,r=e[a],i=e.then;if("function"==typeof r){a="fulfilled";try{n=r(n)}catch(e){L(i,e)}}R(i,n)||("fulfilled"===a&&M(i,n),"rejected"===a&&L(i,n))}function R(e,t){var a;try{if(e===t)throw new TypeError("A promises callback cannot return that same promise.");if(t&&("function"==typeof t||"object"===r(t))){var n=t.then;if("function"==typeof n)return n.call(t,(function(n){a||(a=!0,t===n?N(e,n):M(e,n))}),(function(t){a||(a=!0,L(e,t))})),!0}}catch(t){return a||L(e,t),!0}return!1}function M(e,t){e!==t&&R(e,t)||N(e,t)}function N(e,t){"pending"===e._state&&(e._state="settled",e._data=t,A(z,e))}function L(e,t){"pending"===e._state&&(e._state="settled",e._data=t,A(W,e))}function I(e){e._then=e._then.forEach(P)}function z(e){e._state="fulfilled",I(e)}function W(t){Line truncated
function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function u(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},n=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(a).filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})))),n.forEach((function(t){o(e,t,a[t])}))}return e}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=[],n=!0,r=!1,i=void 0;try{for(var o,u=e[Symbol.iterator]();!(n=(o=u.next()).done)&&(a.push(o.value),!t||a.length!==t);n=!0);}catch(e){r=!0,i=e}finally{try{n||null==u.return||u.return()}finally{if(r)throw i}}return a}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}a.d(t,"a",(function(){return Ee})),a.d(t,"b",(function(){return we}));var l=function(){},f={},d={},c={mark:l,measure:l};try{"undefined"!=typeof window&&(f=window),"undefined"!=typeof document&&(d=document),"undefined"!=typeof MutationObserver&&MutationObserver,"undefined"!=typeof performance&&(c=performance)}catch(e){}var _=(f.navigator||{}).userAgent,h=void 0===_?"":_,g=f,m=d,F=c,p=(g.document,!!m.documentElement&&!!m.head&&"function"==typeof m.addEventListener&&"function"==typeof m.createElement),b=(~h.indexOf("MSIE")||h.indexOf("Trident/"),function(){try{}catch(e){return!1}}(),[1,2,3,4,5,6,7,8,9,10]),y=b.concat([11,12,13,14,15,16,17,18,19,20]),k={GROUP:"group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},v=(["xs","sm","lg","fw","ul","li","border","pull-left","pull-right","spin","pulse","rotate-90","rotate-180","rotate-270","flip-horizontal","flip-vertical","flip-both","stack","stack-1x","stack-2x","inverse","layers","layers-text","layers-counter",k.GROUP,k.SWAP_OPACITY,k.PRIMARY,k.SECONDARY].concat(b.map((function(e){return"".concat(e,"x")}))).concat(y.map((function(e){return"w-".concat(e)}))),g.FontAwesomeConfig||{});if(m&&"function"==typeof m.querySelector){[["data-family-prefix","familyPrefix"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]].forEach((function(e){var t=s(e,2),a=t[0],n=t[1],r=function(e){return""===e||"false"!==e&&("true"===e||e)}(function(e){var t=m.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}(a));null!=r&&(v[n]=r)}))}var w=u({},{familyPrefix:"fa",replacementClass:"svg-inline--fa",autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0},v);w.autoReplaceSvg||(w.observeMutations=!1);var E=u({},w);g.FontAwesomeConfig=E;var D=g||{};D.___FONT_AWESOME___||(D.___FONT_AWESOME___={}),D.___FONT_AWESOME___.styles||(D.___FONT_AWESOME___.styles={}),D.___FONT_AWESOME___.hooks||(D.___FONT_AWESOME___.hooks={}),D.___FONT_AWESOME___.shims||(D.___FONT_AWESOME___.shims=[]);var x=D.___FONT_AWESOME___,C=[];p&&((m.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(m.readyState)||m.addEventListener("DOMContentLoaded",(function e(){m.removeEventListener("DOMContentLoaded",e),1,C.map((function(e){return e()}))})));var j,S=function(){},O=void 0!==e&&void 0!==e.process&&"function"==typeof e.process.emit,B=void 0===n?setTimeout:n,q=[];function T(){for(var e=0;e<q.length;e++)q[e][0](q[e][1]);q=[],j=!1}function A(e,t){q.push([e,t]),j||(j=!0,B(T,0))}function P(e){var t=e.owner,a=t._state,n=t._data,r=e[a],i=e.then;if("function"==typeof r){a="fulfilled";try{n=r(n)}catch(e){L(i,e)}}R(i,n)||("fulfilled"===a&&M(i,n),"rejected"===a&&L(i,n))}function R(e,t){var a;try{if(e===t)throw new TypeError("A promises callback cannot return that same promise.");if(t&&("function"==typeof t||"object"===r(t))){var n=t.then;if("function"==typeof n)return n.call(t,(function(n){a||(a=!0,t===n?N(e,n):M(e,n))}),(function(t){a||(a=!0,L(e,t))})),!0}}catch(t){return a||L(e,t),!0}return!1}function M(e,t){e!==t&&R(e,t)||N(e,t)}function N(e,t){"pending"===e._state&&(e._state="settled",e._data=t,A(z,e))}function L(e,t){"pending"===e._state&&(e._state="settled",e._data=t,A(W,e))}function I(e){e._then=e._then.forEach(P)}function z(e){e._state="fulfilled",I(e)}function W(t){Line truncated
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},a=0;a<10;a++)t["_"+String.fromCharCode(a)]=a;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var a,u,s=o(e),l=1;l<arguments.length;l++){for(var f in a=Object(arguments[l]))r.call(a,f)&&(s[f]=a[f]);if(n){u=n(a);for(var d=0;d<u.length;d++)i.call(a,u[d])&&(s[u[d]]=a[u[d]])}}return s}},function(e,t,a){"use strict";var n=a(1),r=a(3),i=a(0),o=(a(2),a(6)),u=a(7),s=a(10),l=i.forwardRef((function(e,t){var a=e.children,u=e.classes,l=e.className,f=e.color,d=void 0===f?"inherit":f,c=e.component,_=void 0===c?"svg":c,h=e.fontSize,g=void 0===h?"default":h,m=e.htmlColor,F=e.titleAccess,p=e.viewBox,b=void 0===p?"0 0 24 24":p,y=Object(r.a)(e,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return i.createElement(_,Object(n.a)({className:Object(o.a)(u.root,l,"inherit"!==d&&u["color".concat(Object(s.a)(d))],"default"!==g&&u["fontSize".concat(Object(s.a)(g))]),focusable:"false",viewBox:b,color:m,"aria-hidden":!F||void 0,role:F?"img":void 0,ref:t},y),a,F?i.createElement("title",null,F):null)}));l.muiName="SvgIcon",t.a=Object(u.a)((function(e){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:e.typography.pxToRem(24),transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter})},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(35)}}}),{name:"MuiSvgIcon"})(l)},function(e,t){var a,n,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function u(e){if(a===setTimeout)return setTimeout(e,0);if((a===i||!a)&&setTimeout)return a=setTimeout,setTimeout(e,0);try{return a(e,0)}catch(t){try{return a.call(null,e,0)}catch(t){return a.call(this,e,0)}}}!function(){try{a="function"==typeof setTimeout?setTimeout:i}catch(e){a=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var s,l=[],f=!1,d=-1;function c(){f&&s&&(f=!1,s.length?l=s.concat(l):d=-1,l.length&&_())}function _(){if(!f){var e=u(c);f=!0;for(var t=l.length;t;){for(s=l,l=[];++d<t;)s&&s[d].run();d=-1,t=l.length}s=null,f=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function g(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var a=1;a<arguments.length;a++)t[a-1]=arguments[a];l.push(new h(e,t)),1!==l.length||f||u(_)},h.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=g,r.addListener=g,r.once=g,r.off=g,r.removeListener=g,r.removeAllListeners=g,r.emit=g,r.prependListener=g,r.prependOnceListener=g,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t,a){"use strict";a.r(t);var n=a(199);a.d(t,"default",(function(){return n.a}))},function(e){e.exports=JSON.parse('{"translation":{"COMING_SOON":"Coming soon...","APPS_DIALER":"Phone","APPS_CONTACTS":"Contacts","APPS_MESSAGES":"Messages","APPS_CALCULATOR":"Calculator","APPS_SETTINGS":"Settings","APPS_BANK":"WhoDis Banking","APPS_EXAMPLE":"Example app","APPS_BANK_DEPOSIT":"Deposit","APPS_BANK_WITHDRAW":"Withdraw","APPS_BANK_TRANSFER":"Transfer","APPS_SETTINGS_OPTIONS_WALLPAPER":"Wallpaper","APPS_SETTINGS_OPTIONS_FRAME":"Frame","APPS_TWITTER":"Twitter","APPS_TWITTER_TWEET":"Tweet","APPS_TWITTER_TWEET_MESSAGE_PLACEHOLDER":"What\'s happening?","APPS_TWITTER_IMAGE_PLACEHOLDER":"A link to your image or gif","APPS_TWITTER_SUBMIT_IMAGE":"Add Media","APPS_TWITTER_CLOSE_IMAGE":"Close","APPS_TWITTER_CLOSE":"Close","APPS_TWITTER_SEARCH_TWEETS":"Search for tweets","APPS_TWITTER_SEARCH_TWEETS_PLACEHOLDER":"Search by profile name or message","APPS_TWITTER_TWEET_MESSAGE_CHAR_Line truncated
*/var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},a=0;a<10;a++)t["_"+String.fromCharCode(a)]=a;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var a,u,s=o(e),l=1;l<arguments.length;l++){for(var f in a=Object(arguments[l]))r.call(a,f)&&(s[f]=a[f]);if(n){u=n(a);for(var d=0;d<u.length;d++)i.call(a,u[d])&&(s[u[d]]=a[u[d]])}}return s}},function(e,t,a){"use strict";var n=a(1),r=a(3),i=a(0),o=(a(2),a(6)),u=a(7),s=a(10),l=i.forwardRef((function(e,t){var a=e.children,u=e.classes,l=e.className,f=e.color,d=void 0===f?"inherit":f,c=e.component,_=void 0===c?"svg":c,h=e.fontSize,g=void 0===h?"default":h,m=e.htmlColor,F=e.titleAccess,p=e.viewBox,b=void 0===p?"0 0 24 24":p,y=Object(r.a)(e,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return i.createElement(_,Object(n.a)({className:Object(o.a)(u.root,l,"inherit"!==d&&u["color".concat(Object(s.a)(d))],"default"!==g&&u["fontSize".concat(Object(s.a)(g))]),focusable:"false",viewBox:b,color:m,"aria-hidden":!F||void 0,role:F?"img":void 0,ref:t},y),a,F?i.createElement("title",null,F):null)}));l.muiName="SvgIcon",t.a=Object(u.a)((function(e){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:e.typography.pxToRem(24),transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter})},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(35)}}}),{name:"MuiSvgIcon"})(l)},function(e,t){var a,n,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function u(e){if(a===setTimeout)return setTimeout(e,0);if((a===i||!a)&&setTimeout)return a=setTimeout,setTimeout(e,0);try{return a(e,0)}catch(t){try{return a.call(null,e,0)}catch(t){return a.call(this,e,0)}}}!function(){try{a="function"==typeof setTimeout?setTimeout:i}catch(e){a=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var s,l=[],f=!1,d=-1;function c(){f&&s&&(f=!1,s.length?l=s.concat(l):d=-1,l.length&&_())}function _(){if(!f){var e=u(c);f=!0;for(var t=l.length;t;){for(s=l,l=[];++d<t;)s&&s[d].run();d=-1,t=l.length}s=null,f=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function g(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var a=1;a<arguments.length;a++)t[a-1]=arguments[a];l.push(new h(e,t)),1!==l.length||f||u(_)},h.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=g,r.addListener=g,r.once=g,r.off=g,r.removeListener=g,r.removeAllListeners=g,r.emit=g,r.prependListener=g,r.prependOnceListener=g,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t,a){"use strict";a.r(t);var n=a(198);a.d(t,"default",(function(){return n.a}))},function(e){e.exports=JSON.parse('{"translation":{"COMING_SOON":"Coming soon...","APPS_DIALER":"Phone","APPS_CONTACTS":"Contacts","APPS_MESSAGES":"Messages","APPS_CALCULATOR":"Calculator","APPS_SETTINGS":"Settings","APPS_BANK":"WhoDis Banking","APPS_EXAMPLE":"Example app","APPS_BANK_DEPOSIT":"Deposit","APPS_BANK_WITHDRAW":"Withdraw","APPS_BANK_TRANSFER":"Transfer","APPS_SETTINGS_OPTIONS_WALLPAPER":"Wallpaper","APPS_SETTINGS_OPTIONS_FRAME":"Frame","APPS_TWITTER":"Twitter","APPS_TWITTER_TWEET":"Tweet","APPS_TWITTER_TWEET_MESSAGE_PLACEHOLDER":"What\'s happening?","APPS_TWITTER_IMAGE_PLACEHOLDER":"A link to your image or gif","APPS_TWITTER_SUBMIT_IMAGE":"Add Media","APPS_TWITTER_CLOSE_IMAGE":"Close","APPS_TWITTER_CLOSE":"Close","APPS_TWITTER_JUST_NOW":"Just now","APPS_TWITTER_SEARCH_TWEETS":"Search for tweets","APPS_TWITTER_SEARCH_TWEETS_PLACEHOLDER":"Search by profile name or messageLine truncated
/** @license React v16.13.1
* react.production.min.js
*
@@ -16,7 +16,7 @@ object-assign
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var n=a(198),r="function"==typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,u=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,l=r?Symbol.for("react.profiler"):60114,f=r?Symbol.for("react.provider"):60109,d=r?Symbol.for("react.context"):60110,c=r?Symbol.for("react.forward_ref"):60112,_=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,m="function"==typeof Symbol&&Symbol.iterator;function F(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=1;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b={};function y(e,t,a){this.props=e,this.context=t,this.refs=b,this.updater=a||p}function k(){}function v(e,t,a){this.props=e,this.context=t,this.refs=b,this.updater=a||p}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(F(85));this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},k.prototype=y.prototype;var w=v.prototype=new k;w.constructor=v,n(w,y.prototype),w.isPureReactComponent=!0;var E={current:null},D=Object.prototype.hasOwnProperty,x={key:!0,ref:!0,__self:!0,__source:!0};function C(e,t,a){var n,r={},o=null,u=null;if(null!=t)for(n in void 0!==t.ref&&(u=t.ref),void 0!==t.key&&(o=""+t.key),t)D.call(t,n)&&!x.hasOwnProperty(n)&&(r[n]=t[n]);var s=arguments.length-2;if(1===s)r.children=a;else if(1<s){for(var l=Array(s),f=0;f<s;f++)l[f]=arguments[f+2];r.children=l}if(e&&e.defaultProps)for(n in s=e.defaultProps)void 0===r[n]&&(r[n]=s[n]);return{$$typeof:i,type:e,key:o,ref:u,props:r,_owner:E.current}}function j(e){return"object"==typeof e&&null!==e&&e.$$typeof===i}var S=/\/+/g,O=[];function B(e,t,a,n){if(O.length){var r=O.pop();return r.result=e,r.keyPrefix=t,r.func=a,r.context=n,r.count=0,r}return{result:e,keyPrefix:t,func:a,context:n,count:0}}function q(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>O.length&&O.push(e)}function T(e,t,a){return null==e?0:function e(t,a,n,r){var u=typeof t;"undefined"!==u&&"boolean"!==u||(t=null);var s=!1;if(null===t)s=!0;else switch(u){case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case i:case o:s=!0}}if(s)return n(r,t,""===a?"."+A(t,0):a),1;if(s=0,a=""===a?".":a+":",Array.isArray(t))for(var l=0;l<t.length;l++){var f=a+A(u=t[l],l);s+=e(u,f,n,r)}else if(null===t||"object"!=typeof t?f=null:f="function"==typeof(f=m&&t[m]||t["@@iterator"])?f:null,"function"==typeof f)for(t=f.call(t),l=0;!(u=t.next()).done;)s+=e(u=u.value,f=a+A(u,l++),n,r);else if("object"===u)throw n=""+t,Error(F(31,"[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n,""));return s}(e,"",t,a)}function A(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function P(e,t){e.func.call(e.context,t,e.count++)}function R(e,t,a){var n=e.result,r=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?M(e,n,a,(function(e){return e})):null!=e&&(j(e)&&(e=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,r+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(S,"$&/")+"/")+a)),n.push(e))}function M(e,t,a,n,r){var i="";null!=a&&(i=(""+a).replace(S,"$&/")+"/"),T(e,R,t=B(t,i,n,r)),q(t)}var N={current:null};function L(){var e=N.current;if(null===e)throw Error(F(321));return e}var I={ReactCurrentDispatcher:N,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:E,IsSomeRendererActing:{current:!1},assign:n};t.Children={map:function(e,t,a){if(null==e)return e;var n=[];return M(e,n,null,t,a),n},forEach:function(e,t,a){if(null==e)return e;T(e,P,t=B(null,null,t,a)),q(t)},count:function(e){return T(e,(function(){return null}),null)},toArray:function(e){var t=[];return M(e,t,null,(function(e){return e})),t},only:function(e){if(!j(e))throw Error(F(143));return e}},t.Component=y,t.Fragment=u,t.Profiler=l,t.PureComponent=v,t.StrictMode=s,t.Suspense=_,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=I,t.cloneElement=function(e,t,a){if(null==e)throw Error(F(267,e));var r=n({},e.props),o=e.key,u=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(u=t.ref,s=E.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(f in t)D.call(t,f)&&!x.hasOwnProperty(f)&&(r[f]=void 0===t[f]&&void 0!==l?l[f]:t[f])}var f=arguments.length-2;if(1===f)r.children=a;else if(1<f){l=Array(f);for(var d=0;d<f;d++)l[d]=arguments[d+2];r.children=l}return{$$typeof:i,tLine truncated
*/var n=a(197),r="function"==typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,u=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,l=r?Symbol.for("react.profiler"):60114,f=r?Symbol.for("react.provider"):60109,d=r?Symbol.for("react.context"):60110,c=r?Symbol.for("react.forward_ref"):60112,_=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,m="function"==typeof Symbol&&Symbol.iterator;function F(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=1;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b={};function y(e,t,a){this.props=e,this.context=t,this.refs=b,this.updater=a||p}function k(){}function v(e,t,a){this.props=e,this.context=t,this.refs=b,this.updater=a||p}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(F(85));this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},k.prototype=y.prototype;var w=v.prototype=new k;w.constructor=v,n(w,y.prototype),w.isPureReactComponent=!0;var E={current:null},D=Object.prototype.hasOwnProperty,x={key:!0,ref:!0,__self:!0,__source:!0};function C(e,t,a){var n,r={},o=null,u=null;if(null!=t)for(n in void 0!==t.ref&&(u=t.ref),void 0!==t.key&&(o=""+t.key),t)D.call(t,n)&&!x.hasOwnProperty(n)&&(r[n]=t[n]);var s=arguments.length-2;if(1===s)r.children=a;else if(1<s){for(var l=Array(s),f=0;f<s;f++)l[f]=arguments[f+2];r.children=l}if(e&&e.defaultProps)for(n in s=e.defaultProps)void 0===r[n]&&(r[n]=s[n]);return{$$typeof:i,type:e,key:o,ref:u,props:r,_owner:E.current}}function j(e){return"object"==typeof e&&null!==e&&e.$$typeof===i}var S=/\/+/g,O=[];function B(e,t,a,n){if(O.length){var r=O.pop();return r.result=e,r.keyPrefix=t,r.func=a,r.context=n,r.count=0,r}return{result:e,keyPrefix:t,func:a,context:n,count:0}}function q(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>O.length&&O.push(e)}function T(e,t,a){return null==e?0:function e(t,a,n,r){var u=typeof t;"undefined"!==u&&"boolean"!==u||(t=null);var s=!1;if(null===t)s=!0;else switch(u){case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case i:case o:s=!0}}if(s)return n(r,t,""===a?"."+A(t,0):a),1;if(s=0,a=""===a?".":a+":",Array.isArray(t))for(var l=0;l<t.length;l++){var f=a+A(u=t[l],l);s+=e(u,f,n,r)}else if(null===t||"object"!=typeof t?f=null:f="function"==typeof(f=m&&t[m]||t["@@iterator"])?f:null,"function"==typeof f)for(t=f.call(t),l=0;!(u=t.next()).done;)s+=e(u=u.value,f=a+A(u,l++),n,r);else if("object"===u)throw n=""+t,Error(F(31,"[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n,""));return s}(e,"",t,a)}function A(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function P(e,t){e.func.call(e.context,t,e.count++)}function R(e,t,a){var n=e.result,r=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?M(e,n,a,(function(e){return e})):null!=e&&(j(e)&&(e=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,r+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(S,"$&/")+"/")+a)),n.push(e))}function M(e,t,a,n,r){var i="";null!=a&&(i=(""+a).replace(S,"$&/")+"/"),T(e,R,t=B(t,i,n,r)),q(t)}var N={current:null};function L(){var e=N.current;if(null===e)throw Error(F(321));return e}var I={ReactCurrentDispatcher:N,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:E,IsSomeRendererActing:{current:!1},assign:n};t.Children={map:function(e,t,a){if(null==e)return e;var n=[];return M(e,n,null,t,a),n},forEach:function(e,t,a){if(null==e)return e;T(e,P,t=B(null,null,t,a)),q(t)},count:function(e){return T(e,(function(){return null}),null)},toArray:function(e){var t=[];return M(e,t,null,(function(e){return e})),t},only:function(e){if(!j(e))throw Error(F(143));return e}},t.Component=y,t.Fragment=u,t.Profiler=l,t.PureComponent=v,t.StrictMode=s,t.Suspense=_,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=I,t.cloneElement=function(e,t,a){if(null==e)throw Error(F(267,e));var r=n({},e.props),o=e.key,u=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(u=t.ref,s=E.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(f in t)D.call(t,f)&&!x.hasOwnProperty(f)&&(r[f]=void 0===t[f]&&void 0!==l?l[f]:t[f])}var f=arguments.length-2;if(1===f)r.children=a;else if(1<f){l=Array(f);for(var d=0;d<f;d++)l[d]=arguments[d+2];r.children=l}return{$$typeof:i,tLine truncated
/** @license React v16.13.1
* react-dom.production.min.js
*
@@ -24,7 +24,7 @@ object-assign
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var n=a(0),r=a(198),i=a(434);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=1;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!n)throw Error(o(227));function u(e,t,a,n,r,i,o,u,s){var l=Array.prototype.slice.call(arguments,3);try{t.apply(a,l)}catch(e){this.onError(e)}}var s=!1,l=null,f=!1,d=null,c={onError:function(e){s=!0,l=e}};function _(e,t,a,n,r,i,o,f,d){s=!1,l=null,u.apply(c,arguments)}var h=null,g=null,m=null;function F(e,t,a){var n=e.type||"unknown-event";e.currentTarget=m(a),function(e,t,a,n,r,i,u,c,h){if(_.apply(this,arguments),s){if(!s)throw Error(o(198));var g=l;s=!1,l=null,f||(f=!0,d=g)}}(n,t,void 0,e),e.currentTarget=null}var p=null,b={};function y(){if(p)for(var e in b){var t=b[e],a=p.indexOf(e);if(!(-1<a))throw Error(o(96,e));if(!v[a]){if(!t.extractEvents)throw Error(o(97,e));for(var n in v[a]=t,a=t.eventTypes){var r=void 0,i=a[n],u=t,s=n;if(w.hasOwnProperty(s))throw Error(o(99,s));w[s]=i;var l=i.phasedRegistrationNames;if(l){for(r in l)l.hasOwnProperty(r)&&k(l[r],u,s);r=!0}else i.registrationName?(k(i.registrationName,u,s),r=!0):r=!1;if(!r)throw Error(o(98,n,e))}}}}function k(e,t,a){if(E[e])throw Error(o(100,e));E[e]=t,D[e]=t.eventTypes[a].dependencies}var v=[],w={},E={},D={};function x(e){var t,a=!1;for(t in e)if(e.hasOwnProperty(t)){var n=e[t];if(!b.hasOwnProperty(t)||b[t]!==n){if(b[t])throw Error(o(102,t));b[t]=n,a=!0}}a&&y()}var C=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),j=null,S=null,O=null;function B(e){if(e=g(e)){if("function"!=typeof j)throw Error(o(280));var t=e.stateNode;t&&(t=h(t),j(e.stateNode,e.type,t))}}function q(e){S?O?O.push(e):O=[e]:S=e}function T(){if(S){var e=S,t=O;if(O=S=null,B(e),t)for(e=0;e<t.length;e++)B(t[e])}}function A(e,t){return e(t)}function P(e,t,a,n,r){return e(t,a,n,r)}function R(){}var M=A,N=!1,L=!1;function I(){null===S&&null===O||(R(),T())}function z(e,t,a){if(L)return e(t,a);L=!0;try{return M(e,t,a)}finally{L=!1,I()}}var W=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,V=Object.prototype.hasOwnProperty,H={},U={};function G(e,t,a,n,r,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=n,this.attributeNamespace=r,this.mustUseProperty=a,this.propertyName=e,this.type=t,this.sanitizeURL=i}var $={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){$[e]=new G(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];$[t]=new G(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){$[e]=new G(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){$[e]=new G(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){$[e]=new G(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){$[e]=new G(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){$[e]=new G(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){$[e]=new G(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){$[e]=new G(e,5,!1,e.toLowerCase(),null,!1)}));var K=/[\-:]([a-z])/g;function Y(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-rLine truncated
*/var n=a(0),r=a(197),i=a(434);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=1;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!n)throw Error(o(227));function u(e,t,a,n,r,i,o,u,s){var l=Array.prototype.slice.call(arguments,3);try{t.apply(a,l)}catch(e){this.onError(e)}}var s=!1,l=null,f=!1,d=null,c={onError:function(e){s=!0,l=e}};function _(e,t,a,n,r,i,o,f,d){s=!1,l=null,u.apply(c,arguments)}var h=null,g=null,m=null;function F(e,t,a){var n=e.type||"unknown-event";e.currentTarget=m(a),function(e,t,a,n,r,i,u,c,h){if(_.apply(this,arguments),s){if(!s)throw Error(o(198));var g=l;s=!1,l=null,f||(f=!0,d=g)}}(n,t,void 0,e),e.currentTarget=null}var p=null,b={};function y(){if(p)for(var e in b){var t=b[e],a=p.indexOf(e);if(!(-1<a))throw Error(o(96,e));if(!v[a]){if(!t.extractEvents)throw Error(o(97,e));for(var n in v[a]=t,a=t.eventTypes){var r=void 0,i=a[n],u=t,s=n;if(w.hasOwnProperty(s))throw Error(o(99,s));w[s]=i;var l=i.phasedRegistrationNames;if(l){for(r in l)l.hasOwnProperty(r)&&k(l[r],u,s);r=!0}else i.registrationName?(k(i.registrationName,u,s),r=!0):r=!1;if(!r)throw Error(o(98,n,e))}}}}function k(e,t,a){if(E[e])throw Error(o(100,e));E[e]=t,D[e]=t.eventTypes[a].dependencies}var v=[],w={},E={},D={};function x(e){var t,a=!1;for(t in e)if(e.hasOwnProperty(t)){var n=e[t];if(!b.hasOwnProperty(t)||b[t]!==n){if(b[t])throw Error(o(102,t));b[t]=n,a=!0}}a&&y()}var C=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),j=null,S=null,O=null;function B(e){if(e=g(e)){if("function"!=typeof j)throw Error(o(280));var t=e.stateNode;t&&(t=h(t),j(e.stateNode,e.type,t))}}function q(e){S?O?O.push(e):O=[e]:S=e}function T(){if(S){var e=S,t=O;if(O=S=null,B(e),t)for(e=0;e<t.length;e++)B(t[e])}}function A(e,t){return e(t)}function P(e,t,a,n,r){return e(t,a,n,r)}function R(){}var M=A,N=!1,L=!1;function I(){null===S&&null===O||(R(),T())}function z(e,t,a){if(L)return e(t,a);L=!0;try{return M(e,t,a)}finally{L=!1,I()}}var W=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,V=Object.prototype.hasOwnProperty,H={},U={};function G(e,t,a,n,r,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=n,this.attributeNamespace=r,this.mustUseProperty=a,this.propertyName=e,this.type=t,this.sanitizeURL=i}var $={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){$[e]=new G(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];$[t]=new G(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){$[e]=new G(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){$[e]=new G(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){$[e]=new G(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){$[e]=new G(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){$[e]=new G(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){$[e]=new G(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){$[e]=new G(e,5,!1,e.toLowerCase(),null,!1)}));var K=/[\-:]([a-z])/g;function Y(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-rLine truncated
/** @license React v0.19.1
* scheduler.production.min.js
*
@@ -32,7 +32,7 @@ object-assign
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var n,r,i,o,u;if("undefined"==typeof window||"function"!=typeof MessageChannel){var s=null,l=null,f=function(){if(null!==s)try{var e=t.unstable_now();s(!0,e),s=null}catch(e){throw setTimeout(f,0),e}},d=Date.now();t.unstable_now=function(){return Date.now()-d},n=function(e){null!==s?setTimeout(n,0,e):(s=e,setTimeout(f,0))},r=function(e,t){l=setTimeout(e,t)},i=function(){clearTimeout(l)},o=function(){return!1},u=t.unstable_forceFrameRate=function(){}}else{var c=window.performance,_=window.Date,h=window.setTimeout,g=window.clearTimeout;if("undefined"!=typeof console){var m=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof m&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof c&&"function"==typeof c.now)t.unstable_now=function(){return c.now()};else{var F=_.now();t.unstable_now=function(){return _.now()-F}}var p=!1,b=null,y=-1,k=5,v=0;o=function(){return t.unstable_now()>=v},u=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):k=0<e?Math.floor(1e3/e):5};var w=new MessageChannel,E=w.port2;w.port1.onmessage=function(){if(null!==b){var e=t.unstable_now();v=e+k;try{b(!0,e)?E.postMessage(null):(p=!1,b=null)}catch(e){throw E.postMessage(null),e}}else p=!1},n=function(e){b=e,p||(p=!0,E.postMessage(null))},r=function(e,a){y=h((function(){e(t.unstable_now())}),a)},i=function(){g(y),y=-1}}function D(e,t){var a=e.length;e.push(t);e:for(;;){var n=a-1>>>1,r=e[n];if(!(void 0!==r&&0<j(r,t)))break e;e[n]=t,e[a]=r,a=n}}function x(e){return void 0===(e=e[0])?null:e}function C(e){var t=e[0];if(void 0!==t){var a=e.pop();if(a!==t){e[0]=a;e:for(var n=0,r=e.length;n<r;){var i=2*(n+1)-1,o=e[i],u=i+1,s=e[u];if(void 0!==o&&0>j(o,a))void 0!==s&&0>j(s,o)?(e[n]=s,e[u]=a,n=u):(e[n]=o,e[i]=a,n=i);else{if(!(void 0!==s&&0>j(s,a)))break e;e[n]=s,e[u]=a,n=u}}}return t}return null}function j(e,t){var a=e.sortIndex-t.sortIndex;return 0!==a?a:e.id-t.id}var S=[],O=[],B=1,q=null,T=3,A=!1,P=!1,R=!1;function M(e){for(var t=x(O);null!==t;){if(null===t.callback)C(O);else{if(!(t.startTime<=e))break;C(O),t.sortIndex=t.expirationTime,D(S,t)}t=x(O)}}function N(e){if(R=!1,M(e),!P)if(null!==x(S))P=!0,n(L);else{var t=x(O);null!==t&&r(N,t.startTime-e)}}function L(e,a){P=!1,R&&(R=!1,i()),A=!0;var n=T;try{for(M(a),q=x(S);null!==q&&(!(q.expirationTime>a)||e&&!o());){var u=q.callback;if(null!==u){q.callback=null,T=q.priorityLevel;var s=u(q.expirationTime<=a);a=t.unstable_now(),"function"==typeof s?q.callback=s:q===x(S)&&C(S),M(a)}else C(S);q=x(S)}if(null!==q)var l=!0;else{var f=x(O);null!==f&&r(N,f.startTime-a),l=!1}return l}finally{q=null,T=n,A=!1}}function I(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var z=u;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){P||A||(P=!0,n(L))},t.unstable_getCurrentPriorityLevel=function(){return T},t.unstable_getFirstCallbackNode=function(){return x(S)},t.unstable_next=function(e){switch(T){case 1:case 2:case 3:var t=3;break;default:t=T}var a=T;T=t;try{return e()}finally{T=a}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=z,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var a=T;T=e;try{return t()}finally{T=a}},t.unstable_scheduleCallback=function(e,a,o){var u=t.unstable_now();if("object"==typeof o&&null!==o){var s=o.delay;s="number"==typeof s&&0<s?u+s:u,o="number"==typeof o.timeout?o.timeout:I(e)}else o=I(e),s=u;return e={id:B++,callback:a,priorityLevel:e,startTime:s,expirationTime:o=s+o,sortIndex:-1},s>u?(e.sortIndex=s,D(O,e),null===x(S)&&e===x(O)&&(R?i():R=!0,r(N,s-u))):(e.sortIndex=o,D(S,e),P||A||(P=!0,n(L))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();M(e);var a=x(S);return a!==q&&null!==q&&null!==a&&null!==a.callback&&a.startTime<=e&&a.expirationTime<q.expirationTime||o()},t.unstable_wrapCallback=function(e){var t=T;return function(){var a=T;T=t;try{return e.apply(this,arguments)}finally{T=a}}}},function(e,t,a){var n=a(437);"string"==typeof n&&(n=[[e.i,n,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};a(83)(n,r);n.locals&&(e.exports=n.locals)},function(e,t,a){(e.exports=a(82)(!1)).push([e.i,"body {\r\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\r\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\r\n sans-serif;\r\n -webkit-font-smoothLine truncated
*/var n,r,i,o,u;if("undefined"==typeof window||"function"!=typeof MessageChannel){var s=null,l=null,f=function(){if(null!==s)try{var e=t.unstable_now();s(!0,e),s=null}catch(e){throw setTimeout(f,0),e}},d=Date.now();t.unstable_now=function(){return Date.now()-d},n=function(e){null!==s?setTimeout(n,0,e):(s=e,setTimeout(f,0))},r=function(e,t){l=setTimeout(e,t)},i=function(){clearTimeout(l)},o=function(){return!1},u=t.unstable_forceFrameRate=function(){}}else{var c=window.performance,_=window.Date,h=window.setTimeout,g=window.clearTimeout;if("undefined"!=typeof console){var m=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof m&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof c&&"function"==typeof c.now)t.unstable_now=function(){return c.now()};else{var F=_.now();t.unstable_now=function(){return _.now()-F}}var p=!1,b=null,y=-1,k=5,v=0;o=function(){return t.unstable_now()>=v},u=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):k=0<e?Math.floor(1e3/e):5};var w=new MessageChannel,E=w.port2;w.port1.onmessage=function(){if(null!==b){var e=t.unstable_now();v=e+k;try{b(!0,e)?E.postMessage(null):(p=!1,b=null)}catch(e){throw E.postMessage(null),e}}else p=!1},n=function(e){b=e,p||(p=!0,E.postMessage(null))},r=function(e,a){y=h((function(){e(t.unstable_now())}),a)},i=function(){g(y),y=-1}}function D(e,t){var a=e.length;e.push(t);e:for(;;){var n=a-1>>>1,r=e[n];if(!(void 0!==r&&0<j(r,t)))break e;e[n]=t,e[a]=r,a=n}}function x(e){return void 0===(e=e[0])?null:e}function C(e){var t=e[0];if(void 0!==t){var a=e.pop();if(a!==t){e[0]=a;e:for(var n=0,r=e.length;n<r;){var i=2*(n+1)-1,o=e[i],u=i+1,s=e[u];if(void 0!==o&&0>j(o,a))void 0!==s&&0>j(s,o)?(e[n]=s,e[u]=a,n=u):(e[n]=o,e[i]=a,n=i);else{if(!(void 0!==s&&0>j(s,a)))break e;e[n]=s,e[u]=a,n=u}}}return t}return null}function j(e,t){var a=e.sortIndex-t.sortIndex;return 0!==a?a:e.id-t.id}var S=[],O=[],B=1,q=null,T=3,A=!1,P=!1,R=!1;function M(e){for(var t=x(O);null!==t;){if(null===t.callback)C(O);else{if(!(t.startTime<=e))break;C(O),t.sortIndex=t.expirationTime,D(S,t)}t=x(O)}}function N(e){if(R=!1,M(e),!P)if(null!==x(S))P=!0,n(L);else{var t=x(O);null!==t&&r(N,t.startTime-e)}}function L(e,a){P=!1,R&&(R=!1,i()),A=!0;var n=T;try{for(M(a),q=x(S);null!==q&&(!(q.expirationTime>a)||e&&!o());){var u=q.callback;if(null!==u){q.callback=null,T=q.priorityLevel;var s=u(q.expirationTime<=a);a=t.unstable_now(),"function"==typeof s?q.callback=s:q===x(S)&&C(S),M(a)}else C(S);q=x(S)}if(null!==q)var l=!0;else{var f=x(O);null!==f&&r(N,f.startTime-a),l=!1}return l}finally{q=null,T=n,A=!1}}function I(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var z=u;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){P||A||(P=!0,n(L))},t.unstable_getCurrentPriorityLevel=function(){return T},t.unstable_getFirstCallbackNode=function(){return x(S)},t.unstable_next=function(e){switch(T){case 1:case 2:case 3:var t=3;break;default:t=T}var a=T;T=t;try{return e()}finally{T=a}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=z,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var a=T;T=e;try{return t()}finally{T=a}},t.unstable_scheduleCallback=function(e,a,o){var u=t.unstable_now();if("object"==typeof o&&null!==o){var s=o.delay;s="number"==typeof s&&0<s?u+s:u,o="number"==typeof o.timeout?o.timeout:I(e)}else o=I(e),s=u;return e={id:B++,callback:a,priorityLevel:e,startTime:s,expirationTime:o=s+o,sortIndex:-1},s>u?(e.sortIndex=s,D(O,e),null===x(S)&&e===x(O)&&(R?i():R=!0,r(N,s-u))):(e.sortIndex=o,D(S,e),P||A||(P=!0,n(L))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();M(e);var a=x(S);return a!==q&&null!==q&&null!==a&&null!==a.callback&&a.startTime<=e&&a.expirationTime<q.expirationTime||o()},t.unstable_wrapCallback=function(e){var t=T;return function(){var a=T;T=t;try{return e.apply(this,arguments)}finally{T=a}}}},function(e,t,a){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var r=n(a(0)),i=n(a(18));function o(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class u{constructor(e){o(this,"key",void 0),this.key=e}}class s extends u{}class l extends u{}var f={AbstractRecoilValue:u,Re Line truncated
/** @license React v16.13.1
* react-is.production.min.js
*
@@ -40,15 +40,15 @@ object-assign
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,u=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,f=n?Symbol.for("react.context"):60110,d=n?Symbol.for("react.async_mode"):60111,c=n?Symbol.for("react.concurrent_mode"):60111,_=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,g=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,F=n?Symbol.for("react.lazy"):60116,p=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,k=n?Symbol.for("react.scope"):60119;function v(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case d:case c:case o:case s:case u:case h:return e;default:switch(e=e&&e.$$typeof){case f:case _:case F:case m:case l:return e;default:return t}}case i:return t}}}function w(e){return v(e)===c}t.AsyncMode=d,t.ConcurrentMode=c,t.ContextConsumer=f,t.ContextProvider=l,t.Element=r,t.ForwardRef=_,t.Fragment=o,t.Lazy=F,t.Memo=m,t.Portal=i,t.Profiler=s,t.StrictMode=u,t.Suspense=h,t.isAsyncMode=function(e){return w(e)||v(e)===d},t.isConcurrentMode=w,t.isContextConsumer=function(e){return v(e)===f},t.isContextProvider=function(e){return v(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return v(e)===_},t.isFragment=function(e){return v(e)===o},t.isLazy=function(e){return v(e)===F},t.isMemo=function(e){return v(e)===m},t.isPortal=function(e){return v(e)===i},t.isProfiler=function(e){return v(e)===s},t.isStrictMode=function(e){return v(e)===u},t.isSuspense=function(e){return v(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===c||e===s||e===u||e===h||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===F||e.$$typeof===m||e.$$typeof===l||e.$$typeof===f||e.$$typeof===_||e.$$typeof===b||e.$$typeof===y||e.$$typeof===k||e.$$typeof===p)},t.typeOf=v},function(e,t){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},function(e,t,a){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(r.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new i(r.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},a(452),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,a(108))},function(e,t,a){(function(e,t){!function(e,a){"use strict";if(!e.setImmediate){var n,r,i,o,u,s=1,l={},f=!1,d=e.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(e);c=c&&c.setTimeout?c:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick((function(){h(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,a=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=a,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){h(e.data)},n=function(e){i.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(r=d.documentElement,n=function(e){var t=d.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):n=function(e){setTimeout(h,0,e)}:(o="setImmediate$"+Math.random()+"$",u=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&h(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",u,!1):e.attachEvent("onmessage",u),n=function(t){e.postMessage(o+t,"*")}),c.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),a=0;a<t.length;a++)t[a]=arguments[a+1];var r={callback:e,args:t};return l[s]=r,n(s),s++},c.clearImmediate=_}function _(e){delete l[e]}function h(e){if(f)setTimeout(h,0,e);else{var t=l[e];if(t){f=!0;try{!function(e){var t=e.callback,a=e.args;switch(a.length){case 0:t();break;case 1:t(a[0]);break;case 2:t(a[0],a[1]);break;case 3:t(a[0],a[1],a[2]);break;default:t.apply(void 0,a)}}(t)}finally{_(e),f=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,a(108),a(200))},function(e,t,a){var n=a(454);"stLine truncated
*/var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,u=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,f=n?Symbol.for("react.context"):60110,d=n?Symbol.for("react.async_mode"):60111,c=n?Symbol.for("react.concurrent_mode"):60111,_=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,g=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,F=n?Symbol.for("react.lazy"):60116,p=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,k=n?Symbol.for("react.scope"):60119;function v(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case d:case c:case o:case s:case u:case h:return e;default:switch(e=e&&e.$$typeof){case f:case _:case F:case m:case l:return e;default:return t}}case i:return t}}}function w(e){return v(e)===c}t.AsyncMode=d,t.ConcurrentMode=c,t.ContextConsumer=f,t.ContextProvider=l,t.Element=r,t.ForwardRef=_,t.Fragment=o,t.Lazy=F,t.Memo=m,t.Portal=i,t.Profiler=s,t.StrictMode=u,t.Suspense=h,t.isAsyncMode=function(e){return w(e)||v(e)===d},t.isConcurrentMode=w,t.isContextConsumer=function(e){return v(e)===f},t.isContextProvider=function(e){return v(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return v(e)===_},t.isFragment=function(e){return v(e)===o},t.isLazy=function(e){return v(e)===F},t.isMemo=function(e){return v(e)===m},t.isPortal=function(e){return v(e)===i},t.isProfiler=function(e){return v(e)===s},t.isStrictMode=function(e){return v(e)===u},t.isSuspense=function(e){return v(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===c||e===s||e===u||e===h||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===F||e.$$typeof===m||e.$$typeof===l||e.$$typeof===f||e.$$typeof===_||e.$$typeof===b||e.$$typeof===y||e.$$typeof===k||e.$$typeof===p)},t.typeOf=v},function(e,t){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},function(e,t,a){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(r.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new i(r.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},a(452),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,a(109))},function(e,t,a){(function(e,t){!function(e,a){"use strict";if(!e.setImmediate){var n,r,i,o,u,s=1,l={},f=!1,d=e.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(e);c=c&&c.setTimeout?c:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick((function(){h(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,a=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=a,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){h(e.data)},n=function(e){i.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(r=d.documentElement,n=function(e){var t=d.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):n=function(e){setTimeout(h,0,e)}:(o="setImmediate$"+Math.random()+"$",u=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&h(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",u,!1):e.attachEvent("onmessage",u),n=function(t){e.postMessage(o+t,"*")}),c.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),a=0;a<t.length;a++)t[a]=arguments[a+1];var r={callback:e,args:t};return l[s]=r,n(s),s++},c.clearImmediate=_}function _(e){delete l[e]}function h(e){if(f)setTimeout(h,0,e);else{var t=l[e];if(t){f=!0;try{!function(e){var t=e.callback,a=e.args;switch(a.length){case 0:t();break;case 1:t(a[0]);break;case 2:t(a[0],a[1]);break;case 3:t(a[0],a[1],a[2]);break;default:t.apply(void 0,a)}}(t)}finally{_(e),f=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,a(109),a(199))},function(e,t,a){var n=a(454);"stLine truncated
/*!
* Font Awesome Free 5.15.1 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
*/var Cr=r.createContext({}),jr=r.forwardRef((function(e,t){var a=e.children,n=e.classes,i=e.className,o=e.disableTypography,u=void 0!==o&&o,s=e.inset,l=void 0!==s&&s,f=e.primary,d=e.primaryTypographyProps,c=e.secondary,_=e.secondaryTypographyProps,h=Object(Gt.a)(e,["children","classes","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"]),g=r.useContext(Cr).dense,m=null!=f?f:a;null==m||m.type===aa||u||(m=r.createElement(aa,Object(he.a)({variant:g?"body2":"body1",className:n.primary,component:"span",display:"block"},d),m));var F=c;return null==F||F.type===aa||u||(F=r.createElement(aa,Object(he.a)({variant:"body2",className:n.secondary,color:"textSecondary",display:"block"},_),F)),r.createElement("div",Object(he.a)({className:Object($t.a)(n.root,i,g&&n.dense,l&&n.inset,m&&F&&n.multiline),ref:t},h),m,F)})),Sr=Object(Qt.a)({root:{flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},multiline:{marginTop:6,marginBottom:6},dense:{},inset:{paddingLeft:56},primary:{},secondary:{}},{name:"MuiListItemText"})(jr),Or=a(209),Br=a.n(Or),qr=a(210),Tr=a.n(qr),Ar=r.forwardRef((function(e,t){var a=e.children,n=e.classes,i=e.className,o=e.component,u=void 0===o?"ul":o,s=e.dense,l=void 0!==s&&s,f=e.disablePadding,d=void 0!==f&&f,c=e.subheader,_=Object(Gt.a)(e,["children","classes","className","component","dense","disablePadding","subheader"]),h=r.useMemo((function(){return{dense:l}}),[l]);return r.createElement(Cr.Provider,{value:h},r.createElement(u,Object(he.a)({className:Object($t.a)(n.root,i,l&&n.dense,!d&&n.padding,c&&n.subheader),ref:t},_),c,a))})),Pr=Object(Qt.a)({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(Ar),Rr=function(){return(Rr=Object.assign||function(e){for(var t,a=1,n=arguments.length;a<n;a++)for(var r in t=arguments[a])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},Mr=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(a[n[r]]=e[n[r]])}return a},Nr=function(e){var t=Mr(e,[]);return i.a.createElement(Pr,Rr({"aria-label":"list"},t),t.children)};function Lr(e,t){return r.isValidElement(e)&&-1!==t.indexOf(e.type.muiName)}var Ir="undefined"==typeof window?r.useEffect:r.useLayoutEffect,zr=r.forwardRef((function(e,t){var a=e.alignItems,n=void 0===a?"center":a,i=e.autoFocus,u=void 0!==i&&i,s=e.button,l=void 0!==s&&s,f=e.children,d=e.classes,c=e.className,_=e.component,h=e.ContainerComponent,g=void 0===h?"li":h,m=e.ContainerProps,F=(m=void 0===m?{}:m).className,p=Object(Gt.a)(m,["className"]),b=e.dense,y=void 0!==b&&b,k=e.disabled,v=void 0!==k&&k,w=e.disableGutters,E=void 0!==w&&w,D=e.divider,x=void 0!==D&&D,C=e.focusVisibleClassName,j=e.selected,S=void 0!==j&&j,O=Object(Gt.a)(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),B=r.useContext(Cr),q={dense:y||B.dense||!1,alignItems:n},T=r.useRef(null);Ir((function(){u&&T.current&&T.current.focus()}),[u]);var A=r.Children.toArray(f),P=A.length&&Lr(A[A.length-1],["ListItemSecondaryAction"]),R=Ba(r.useCallback((function(e){T.current=o.findDOMNode(e)}),[]),t),M=Object(he.a)({className:Object($t.a)(d.root,c,q.dense&&d.dense,!E&&d.gutters,x&&d.divider,v&&d.disabled,l&&d.button,"center"!==n&&d.alignItemsFlexStart,P&&d.secondaryAction,S&&d.selected),disabled:v},O),N=_||"li";return l&&(M.component=_||"div",M.focusVisibleClassName=Object($t.a)(d.focusVisible,C),N=Fn),P?(N=M.component||_?N:"div","li"===g&&("li"===N?N="div":"li"===M.component&&(M.component="div")),r.createElement(Cr.Provider,{value:q},r.createElement(g,Object(he.a)({className:Object($t.a)(d.container,F),ref:R},p),r.createElement(N,M,A),A.pop()))):r.createElement(Cr.Provider,{value:q},r.createElement(N,Object(he.a)({ref:R},M),A))})),Wr=Object(Qt.a)((function(e){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoLine truncated
*/var wr=r.createContext({}),Er=r.forwardRef((function(e,t){var a=e.children,n=e.classes,i=e.className,o=e.disableTypography,u=void 0!==o&&o,s=e.inset,l=void 0!==s&&s,f=e.primary,c=e.primaryTypographyProps,_=e.secondary,h=e.secondaryTypographyProps,g=Object(ta.a)(e,["children","classes","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"]),m=r.useContext(wr).dense,F=null!=f?f:a;null==F||F.type===da||u||(F=r.createElement(da,Object(d.a)({variant:m?"body2":"body1",className:n.primary,component:"span",display:"block"},c),F));var p=_;return null==p||p.type===da||u||(p=r.createElement(da,Object(d.a)({variant:"body2",className:n.secondary,color:"textSecondary",display:"block"},h),p)),r.createElement("div",Object(d.a)({className:Object(aa.a)(n.root,i,m&&n.dense,l&&n.inset,F&&p&&n.multiline),ref:t},g),F,p)})),Dr=Object(ua.a)({root:{flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},multiline:{marginTop:6,marginBottom:6},dense:{},inset:{paddingLeft:56},primary:{},secondary:{}},{name:"MuiListItemText"})(Er),xr=a(208),Cr=a.n(xr),jr=a(209),Sr=a.n(jr),Or=r.forwardRef((function(e,t){var a=e.children,n=e.classes,i=e.className,o=e.component,u=void 0===o?"ul":o,s=e.dense,l=void 0!==s&&s,f=e.disablePadding,c=void 0!==f&&f,_=e.subheader,h=Object(ta.a)(e,["children","classes","className","component","dense","disablePadding","subheader"]),g=r.useMemo((function(){return{dense:l}}),[l]);return r.createElement(wr.Provider,{value:g},r.createElement(u,Object(d.a)({className:Object(aa.a)(n.root,i,l&&n.dense,!c&&n.padding,_&&n.subheader),ref:t},h),_,a))})),Br=Object(ua.a)({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(Or),qr=function(){return(qr=Object.assign||function(e){for(var t,a=1,n=arguments.length;a<n;a++)for(var r in t=arguments[a])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},Tr=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(a[n[r]]=e[n[r]])}return a},Ar=function(e){var t=Tr(e,[]);return i.a.createElement(Br,qr({"aria-label":"list"},t),t.children)};function Pr(e,t){return r.isValidElement(e)&&-1!==t.indexOf(e.type.muiName)}var Rr="undefined"==typeof window?r.useEffect:r.useLayoutEffect,Mr=r.forwardRef((function(e,t){var a=e.alignItems,n=void 0===a?"center":a,i=e.autoFocus,u=void 0!==i&&i,s=e.button,l=void 0!==s&&s,f=e.children,c=e.classes,_=e.className,h=e.component,g=e.ContainerComponent,m=void 0===g?"li":g,F=e.ContainerProps,p=(F=void 0===F?{}:F).className,b=Object(ta.a)(F,["className"]),y=e.dense,k=void 0!==y&&y,v=e.disabled,w=void 0!==v&&v,E=e.disableGutters,D=void 0!==E&&E,x=e.divider,C=void 0!==x&&x,j=e.focusVisibleClassName,S=e.selected,O=void 0!==S&&S,B=Object(ta.a)(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),q=r.useContext(wr),T={dense:k||q.dense||!1,alignItems:n},A=r.useRef(null);Rr((function(){u&&A.current&&A.current.focus()}),[u]);var P=r.Children.toArray(f),R=P.length&&Pr(P[P.length-1],["ListItemSecondaryAction"]),M=Ia(r.useCallback((function(e){A.current=o.findDOMNode(e)}),[]),t),N=Object(d.a)({className:Object(aa.a)(c.root,_,T.dense&&c.dense,!D&&c.gutters,C&&c.divider,w&&c.disabled,l&&c.button,"center"!==n&&c.alignItemsFlexStart,R&&c.secondaryAction,O&&c.selected),disabled:w},B),L=h||"li";return l&&(N.component=h||"div",N.focusVisibleClassName=Object(aa.a)(c.focusVisible,j),L=xn),R?(L=N.component||h?L:"div","li"===m&&("li"===L?L="div":"li"===N.component&&(N.component="div")),r.createElement(wr.Provider,{value:T},r.createElement(m,Object(d.a)({className:Object(aa.a)(c.container,p),ref:M},b),r.createElement(L,N,P),P.pop()))):r.createElement(wr.Provider,{value:T},r.createElement(L,Object(d.a)({ref:M},N),P))})),Nr=Object(ua.a)((function(e){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:Line truncated
/**
* A better abstraction over CSS.
*
* @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present
* @website https://github.com/cssinjs/jss
* @license MIT
*/var Ee=Date.now(),De="fnValues"+Ee,xe="fnStyle"+ ++Ee;var Ce=function(){return{onCreateRule:function(e,t,a){if("function"!=typeof t)return null;var n=g(e,{},a);return n[xe]=t,n},onProcessStyle:function(e,t){if(De in t||xe in t)return e;var a={};for(var n in e){var r=e[n];"function"==typeof r&&(delete e[n],a[n]=r)}return t[De]=a,e},onUpdate:function(e,t,a,n){var r=t,i=r[xe];i&&(r.style=i(e)||{});var o=r[De];if(o)for(var u in o)r.prop(u,o[u](e),n)}}},je="@global",Se=function(){function e(e,t,a){for(var n in this.type="global",this.at=je,this.rules=void 0,this.options=void 0,this.key=void 0,this.isProcessed=!1,this.key=e,this.options=a,this.rules=new X(Object(r.a)({},a,{parent:this})),t)this.rules.add(n,t[n]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,a){var n=this.rules.add(e,t,a);return this.options.jss.plugins.onProcessRule(n),n},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(){return this.rules.toString()},e}(),Oe=function(){function e(e,t,a){this.type="global",this.at=je,this.options=void 0,this.rule=void 0,this.isProcessed=!1,this.key=void 0,this.key=e,this.options=a;var n=e.substr("@global ".length);this.rule=a.jss.createRule(n,t,Object(r.a)({},a,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),Be=/\s*,\s*/g;function qe(e,t){for(var a=e.split(Be),n="",r=0;r<a.length;r++)n+=t+" "+a[r].trim(),a[r+1]&&(n+=", ");return n}var Te=function(){return{onCreateRule:function(e,t,a){if(!e)return null;if(e===je)return new Se(e,t,a);if("@"===e[0]&&"@global "===e.substr(0,"@global ".length))return new Oe(e,t,a);var n=a.parent;return n&&("global"===n.type||n.options.parent&&"global"===n.options.parent.type)&&(a.scoped=!1),!1===a.scoped&&(a.selector=e),null},onProcessRule:function(e){"style"===e.type&&(function(e){var t=e.options,a=e.style,n=a?a[je]:null;if(n){for(var i in n)t.sheet.addRule(i,n[i],Object(r.a)({},t,{selector:qe(i,e.selector)}));delete a[je]}}(e),function(e){var t=e.options,a=e.style;for(var n in a)if("@"===n[0]&&n.substr(0,je.length)===je){var i=qe(n.substr(je.length),e.selector);t.sheet.addRule(i,a[n],Object(r.a)({},t,{selector:i})),delete a[n]}}(e))}}},Ae=/\s*,\s*/g,Pe=/&/g,Re=/\$([\w-]+)/g;var Me=function(){function e(e,t){return function(a,n){var r=e.getRule(n)||t&&t.getRule(n);return r?(r=r).selector:n}}function t(e,t){for(var a=t.split(Ae),n=e.split(Ae),r="",i=0;i<a.length;i++)for(var o=a[i],u=0;u<n.length;u++){var s=n[u];r&&(r+=", "),r+=-1!==s.indexOf("&")?s.replace(Pe,o):o+" "+s}return r}function a(e,t,a){if(a)return Object(r.a)({},a,{index:a.index+1});var n=e.options.nestingLevel;n=void 0===n?1:n+1;var i=Object(r.a)({},e.options,{nestingLevel:n,index:t.indexOf(e)+1});return delete i.name,i}return{onProcessStyle:function(n,i,o){if("style"!==i.type)return n;var u,s,l=i,f=l.options.parent;for(var d in n){var c=-1!==d.indexOf("&"),_="@"===d[0];if(c||_){if(u=a(l,f,u),c){var h=t(d,l.selector);s||(s=e(f,o)),h=h.replace(Re,s),f.addRule(h,n[d],Object(r.a)({},u,{selector:h}))}else _&&f.addRule(d,{},u).addRule(l.key,n[d],{selector:l.selector});delete n[d]}}return n}}},Ne=/[A-Z]/g,Le=/^ms-/,Ie={};function ze(e){return"-"+e.toLowerCase()}var We=function(e){if(Ie.hasOwnProperty(e))return Ie[e];var t=e.replace(Ne,ze);return Ie[e]=Le.test(t)?"-"+t:t};function Ve(e){var t={};for(var a in e){t[0===a.indexOf("--")?a:We(a)]=e[a]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(Ve):t.fallbacks=Ve(e.fallbacks)),t}var He=function(){return{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=Ve(e[t]);return e}return Ve(e)},onChangeValue:function(e,t,a){if(0===t.indexOf("--"))return e;var n=We(t);return t===n?e:(a.prop(n,e),null)}}},Ue=Fe&&CSS?CSS.px:"px",Ge=Fe&&CSS?CSS.ms:"ms",$e=Fe&&CSS?CSS.percent:"%";function Ke(e){var t=/(-[a-z])/g,a=function(e){return e[1].toUpperCase()},n={};for(var r in e)n[r]=e[r],n[r.replace(t,a)]=e[r];return n}var Ye=Ke({"animation-delay":Ge,"animation-duration":Ge,"background-position":Ue,"background-position-x":Ue,"background-position-y":Ue,"background-size":Ue,border:Ue,"border-bottom":Ue,"border-bottom-left-radius":Ue,"border-bottom-right-radius":Ue,"border-bottom-width":Ue,"border-left":Ue,"border-left-width":Ue,"border-radius":Ue,"border-right":Ue,"border-right-width":Ue,"border-top":Ue,"border-top-left-radius":Ue,"border-top-right-radius":Ue,"border-top-width":Ue,"border-width":Ue,margin:Ue,"margin-bottom":Ue,"margin-left":Ue,"margin-right":Ue,"margin-top":Ue,padding:Ue,"padding-bottom":Ue,"padding-left":Ue,"padding-right":Ue,"padding-top":Ue,"mask-position-x":Ue,"mask-position-y":Ue,"mask-size":Ue,height:Ue,width:Ue,"min-height":Ue,"max-height":Ue,"min-width":Ue,"max-width":Ue,bottom:Ue,left:Ue,top:Ue,right:Ue,"box-shadow":Ue,"text-shadow":Ue,"column-gap":Ue,"column-rule":Ue,"column-rule-width":Ue,"column-width":Ue,"font-size":Ue,"font-size-delta":Ue,"letter-spacing":Ue,"text-iLine truncated
*/var Ee=Date.now(),De="fnValues"+Ee,xe="fnStyle"+ ++Ee;var Ce=function(){return{onCreateRule:function(e,t,a){if("function"!=typeof t)return null;var n=g(e,{},a);return n[xe]=t,n},onProcessStyle:function(e,t){if(De in t||xe in t)return e;var a={};for(var n in e){var r=e[n];"function"==typeof r&&(delete e[n],a[n]=r)}return t[De]=a,e},onUpdate:function(e,t,a,n){var r=t,i=r[xe];i&&(r.style=i(e)||{});var o=r[De];if(o)for(var u in o)r.prop(u,o[u](e),n)}}},je="@global",Se=function(){function e(e,t,a){for(var n in this.type="global",this.at=je,this.rules=void 0,this.options=void 0,this.key=void 0,this.isProcessed=!1,this.key=e,this.options=a,this.rules=new X(Object(r.a)({},a,{parent:this})),t)this.rules.add(n,t[n]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,a){var n=this.rules.add(e,t,a);return this.options.jss.plugins.onProcessRule(n),n},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(){return this.rules.toString()},e}(),Oe=function(){function e(e,t,a){this.type="global",this.at=je,this.options=void 0,this.rule=void 0,this.isProcessed=!1,this.key=void 0,this.key=e,this.options=a;var n=e.substr("@global ".length);this.rule=a.jss.createRule(n,t,Object(r.a)({},a,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),Be=/\s*,\s*/g;function qe(e,t){for(var a=e.split(Be),n="",r=0;r<a.length;r++)n+=t+" "+a[r].trim(),a[r+1]&&(n+=", ");return n}var Te=function(){return{onCreateRule:function(e,t,a){if(!e)return null;if(e===je)return new Se(e,t,a);if("@"===e[0]&&"@global "===e.substr(0,"@global ".length))return new Oe(e,t,a);var n=a.parent;return n&&("global"===n.type||n.options.parent&&"global"===n.options.parent.type)&&(a.scoped=!1),!1===a.scoped&&(a.selector=e),null},onProcessRule:function(e){"style"===e.type&&(function(e){var t=e.options,a=e.style,n=a?a[je]:null;if(n){for(var i in n)t.sheet.addRule(i,n[i],Object(r.a)({},t,{selector:qe(i,e.selector)}));delete a[je]}}(e),function(e){var t=e.options,a=e.style;for(var n in a)if("@"===n[0]&&n.substr(0,je.length)===je){var i=qe(n.substr(je.length),e.selector);t.sheet.addRule(i,a[n],Object(r.a)({},t,{selector:i})),delete a[n]}}(e))}}},Ae=/\s*,\s*/g,Pe=/&/g,Re=/\$([\w-]+)/g;var Me=function(){function e(e,t){return function(a,n){var r=e.getRule(n)||t&&t.getRule(n);return r?(r=r).selector:n}}function t(e,t){for(var a=t.split(Ae),n=e.split(Ae),r="",i=0;i<a.length;i++)for(var o=a[i],u=0;u<n.length;u++){var s=n[u];r&&(r+=", "),r+=-1!==s.indexOf("&")?s.replace(Pe,o):o+" "+s}return r}function a(e,t,a){if(a)return Object(r.a)({},a,{index:a.index+1});var n=e.options.nestingLevel;n=void 0===n?1:n+1;var i=Object(r.a)({},e.options,{nestingLevel:n,index:t.indexOf(e)+1});return delete i.name,i}return{onProcessStyle:function(n,i,o){if("style"!==i.type)return n;var u,s,l=i,f=l.options.parent;for(var d in n){var c=-1!==d.indexOf("&"),_="@"===d[0];if(c||_){if(u=a(l,f,u),c){var h=t(d,l.selector);s||(s=e(f,o)),h=h.replace(Re,s),f.addRule(h,n[d],Object(r.a)({},u,{selector:h}))}else _&&f.addRule(d,{},u).addRule(l.key,n[d],{selector:l.selector});delete n[d]}}return n}}},Ne=/[A-Z]/g,Le=/^ms-/,Ie={};function ze(e){return"-"+e.toLowerCase()}var We=function(e){if(Ie.hasOwnProperty(e))return Ie[e];var t=e.replace(Ne,ze);return Ie[e]=Le.test(t)?"-"+t:t};function Ve(e){var t={};for(var a in e){t[0===a.indexOf("--")?a:We(a)]=e[a]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(Ve):t.fallbacks=Ve(e.fallbacks)),t}var He=function(){return{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=Ve(e[t]);return e}return Ve(e)},onChangeValue:function(e,t,a){if(0===t.indexOf("--"))return e;var n=We(t);return t===n?e:(a.prop(n,e),null)}}},Ue=Fe&&CSS?CSS.px:"px",Ge=Fe&&CSS?CSS.ms:"ms",$e=Fe&&CSS?CSS.percent:"%";function Ke(e){var t=/(-[a-z])/g,a=function(e){return e[1].toUpperCase()},n={};for(var r in e)n[r]=e[r],n[r.replace(t,a)]=e[r];return n}var Ye=Ke({"animation-delay":Ge,"animation-duration":Ge,"background-position":Ue,"background-position-x":Ue,"background-position-y":Ue,"background-size":Ue,border:Ue,"border-bottom":Ue,"border-bottom-left-radius":Ue,"border-bottom-right-radius":Ue,"border-bottom-width":Ue,"border-left":Ue,"border-left-width":Ue,"border-radius":Ue,"border-right":Ue,"border-right-width":Ue,"border-top":Ue,"border-top-left-radius":Ue,"border-top-right-radius":Ue,"border-top-width":Ue,"border-width":Ue,margin:Ue,"margin-bottom":Ue,"margin-left":Ue,"margin-right":Ue,"margin-top":Ue,padding:Ue,"padding-bottom":Ue,"padding-left":Ue,"padding-right":Ue,"padding-top":Ue,"mask-position-x":Ue,"mask-position-y":Ue,"mask-size":Ue,height:Ue,width:Ue,"min-height":Ue,"max-height":Ue,"min-width":Ue,"max-width":Ue,bottom:Ue,left:Ue,top:Ue,right:Ue,"box-shadow":Ue,"text-shadow":Ue,"column-gap":Ue,"column-rule":Ue,"column-rule-width":Ue,"column-width":Ue,"font-size":Ue,"font-size-delta":Ue,"letter-spacing":Ue,"text-iLine truncated
+10 -3
View File
@@ -7,28 +7,35 @@
"author": "",
"scripts": {
"build": "webpack --mode production",
"format": "prettier --write \"src/**/*.ts\"",
"watch": "webpack --mode development --watch true"
"format": "prettier --write \"./**/*.ts\"",
"watch": "webpack --mode development --watch true",
"test": "jest"
},
"license": "MIT",
"private": false,
"dependencies": {
"@citizenfx/client": "^1.0.2792-1",
"@citizenfx/server": "^1.0.2792-1",
"@types/node": "^14.0.27",
"@types/node": "^14.11.10",
"connection-string-parser": "^1.0.3",
"fivem-esx-js": "^0.1.12",
"fivem-js": "^1.3.1",
"mysql2": "^2.2.5"
},
"devDependencies": {
"@babel/preset-env": "^7.12.1",
"@babel/preset-typescript": "^7.12.1",
"@types/jest": "^26.0.14",
"@typescript-eslint/eslint-plugin": "^3.8.0",
"@typescript-eslint/parser": "^4.4.0",
"eslint": "^7.6.0",
"eslint-config-prettier": "^6.11.0",
"eslint-loader": "^4.0.2",
"husky": "^4.3.0",
"jest": "^26.5.3",
"prettier": "^2.0.5",
"remove-files-webpack-plugin": "^1.4.3",
"ts-jest": "^26.4.1",
"ts-loader": "^8.0.2",
"typescript": "^3.9.7",
"webpack": "^4.44.1",
+60 -16
View File
@@ -1,22 +1,66 @@
import mysql from 'mysql2/promise';
import mysql from "mysql2/promise";
import { ConnectionStringParser } from "connection-string-parser";
import {
CONNECTION_STRING,
DEFAULT_PORT,
parseSemiColonFormat,
getServerHost,
getUserId,
getPassword,
} from "./db_utils";
const CONNECTION_STRING = 'mysql_connection_string';
// we require set mysql_connection_string "mysql://root:password@localhost/es_extended?charset=utf8mb4" to be set in the config
// we require set mysql_connection_string to be set in the config
const mysqlConnectionString = GetConvar(CONNECTION_STRING, null);
if (mysqlConnectionString === null) {
throw new Error(`No connection string provided. make sure ${CONNECTION_STRING} is set in your config.`)
if (mysqlConnectionString === null) {
throw new Error(
`No connection string provided. make sure "${CONNECTION_STRING} is set in your config.`
);
}
const connectionStringParser = new ConnectionStringParser({ scheme: 'mysql', hosts: []});
const connectionOjbect = connectionStringParser .parse(mysqlConnectionString);
/**
* Most fivem servers utilize fivem-mysql-async (https://brouznouf.github.io/fivem-mysql-async/) and
* define a environment variable "mysql_connection_string" in their configurations. We will try to
* maintain backwards compatibility with this.
*
* fivem-mysql-async allows for two different connection string formats defined here:
* https://brouznouf.github.io/fivem-mysql-async/config/ and we need to handle both of them.
*/
export function generateConnectionPool() {
if (mysqlConnectionString.includes("database=")) {
// This is checking for this format:
// set mysql_connection_string "server=127.0.0.1;database=es_extended;userid=user;password=pass"
const config = parseSemiColonFormat(mysqlConnectionString);
return mysql.createPool({
host: getServerHost(config),
user: getUserId(config),
port: config.port ? parseInt(config.port) : DEFAULT_PORT,
password: getPassword(config),
database: config.database,
waitForConnections: true,
connectionLimit: 10,
queueLimit: 0,
});
} else {
// This is checking for this format:
// set mysql_connection_string "mysql://root:[email protected]/es_extended?charset=utf8mb4"
const connectionStringParser = new ConnectionStringParser({
scheme: "mysql",
hosts: [],
});
const connectionOjbect = connectionStringParser.parse(
mysqlConnectionString
);
export const pool = mysql.createPool({
host: connectionOjbect.hosts[0].host,
user: connectionOjbect.username,
password: connectionOjbect.password,
database: connectionOjbect.endpoint,
waitForConnections: true,
connectionLimit: 10,
queueLimit: 0
});
return mysql.createPool({
host: connectionOjbect.hosts[0].host,
user: connectionOjbect.username,
password: connectionOjbect.password,
database: connectionOjbect.endpoint,
waitForConnections: true,
connectionLimit: 10,
queueLimit: 0,
});
}
}
export const pool = generateConnectionPool();
+94
View File
@@ -0,0 +1,94 @@
import * as db from "./db_utils";
const t = "test value";
describe("parseSemiColonFormat", () => {
it("Raises a error with invalid string", () => {
expect(() => db.parseSemiColonFormat("no_variables_here")).toThrowError();
});
it("Correctly parses configuration options", () => {
const test =
"server=127.0.0.1;database=es_extended;userid=user;password=pass";
const result = db.parseSemiColonFormat(test);
expect(result.server).toEqual("127.0.0.1");
expect(result.database).toEqual("es_extended");
expect(result.userid).toEqual("user");
expect(result.password).toEqual("pass");
});
});
describe("getServerHost", () => {
it("returns default", () => {
expect(db.getServerHost({})).toEqual(db.DEFAULT_HOST);
});
it("Correctly returns host", () => {
expect(db.getServerHost({ host: t })).toEqual(t);
});
it("Correctly returns server", () => {
expect(db.getServerHost({ server: t })).toEqual(t);
});
it("Correctly returns data source", () => {
expect(db.getServerHost({ "data source": t })).toEqual(t);
});
it("Correctly returns datasource", () => {
expect(db.getServerHost({ datasource: t })).toEqual(t);
});
it("Correctly returns addr", () => {
expect(db.getServerHost({ addr: t })).toEqual(t);
});
it("Correctly returns address", () => {
expect(db.getServerHost({ address: t })).toEqual(t);
});
});
describe("getUserId", () => {
it("returns default", () => {
expect(db.getUserId({})).toEqual(db.DEFAULT_USER);
});
it("Correctly returns user", () => {
expect(db.getUserId({ user: t })).toEqual(t);
});
it("Correctly returns user id", () => {
expect(db.getUserId({ "user id": t })).toEqual(t);
});
it("Correctly returns userid", () => {
expect(db.getUserId({ userid: t })).toEqual(t);
});
it("Correctly returns user name", () => {
expect(db.getUserId({ "user name": t })).toEqual(t);
});
it("Correctly returns username", () => {
expect(db.getUserId({ username: t })).toEqual(t);
});
it("Correctly returns uid", () => {
expect(db.getUserId({ uid: t })).toEqual(t);
});
});
describe("getPassword", () => {
it("returns default", () => {
expect(() => db.getPassword({})).toThrowError();
});
it("Correctly returns password", () => {
expect(db.getPassword({ password: t })).toEqual(t);
});
it("Correctly returns pwd", () => {
expect(db.getPassword({ pwd: t })).toEqual(t);
});
});
+71
View File
@@ -0,0 +1,71 @@
export const CONNECTION_STRING = "mysql_connection_string";
export const DEFAULT_PORT = 3306;
export const DEFAULT_HOST = "localhost";
export const DEFAULT_USER = "root";
interface Map {
[key: string]: string;
}
/**
* parse the connection string from the format server=127.0.0.1;database=es_extended;userid=user;password=pass
* @param connectionString - mysql_connection_string value
*/
export function parseSemiColonFormat(connectionString: string): Map {
const parts = connectionString.split(";");
if (parts.length === 1) {
throw new Error(
`Connection string ${connectionString} is in the incorrect format.`
);
}
return parts.reduce((connectionInfo: Map, part) => {
const [key, value] = part.split("=");
connectionInfo[key] = value;
return connectionInfo;
}, {});
}
/**
* allowed variable names: host | server | data source | datasource | addr | address
* @param config - database config variables parsed from mysql_connection_string
*/
export function getServerHost(config: Map): string {
return (
config.host ||
config.server ||
config["data source"] ||
config.datasource ||
config.addr ||
config.address ||
DEFAULT_HOST
);
}
/**
* allowed variable names: user | user id | userid | user name | username | uid
* @param config - database config variables parsed from mysql_connection_string
*/
export function getUserId(config: Map): string {
return (
config.user ||
config["user id"] ||
config.userid ||
config["user name"] ||
config.username ||
config.uid ||
DEFAULT_USER
);
}
/**
* allowed variable names: password | pwd
* @param config - database config variables parsed from mysql_connection_string
*/
export function getPassword(config: Map): string {
const password = config.password || config.pwd;
if (!password) {
throw new Error("Password is a required field");
}
return password;
}
+2 -2
View File
@@ -8,6 +8,6 @@ import './sv_sellout';
export let ESX: ESXServer = null;
emit('esx:getSharedObject', (obj: ESXServer) => ESX = obj);
emit("esx:getSharedObject", (obj: ESXServer) => (ESX = obj));
export const getSource = () => parseInt(source);
export const getSource = () => parseInt(source);
+17 -12
View File
@@ -1,21 +1,27 @@
import { ESX } from './server';
import { pool } from './db';
import events from '../utils/events';
import { ESX } from "./server";
import { pool } from "./db";
import events from "../utils/events";
interface Contacts {
display: string;
number: string;
}
async function fetchAllContacts(identifier: string) : Promise<Contacts[]> {
async function fetchAllContacts(identifier: string): Promise<Contacts[]> {
const query = "SELECT * FROM npwd_phone_contacts WHERE identifier = ?";
const [ results ] = await pool.query(query, [identifier]);
const [results] = await pool.query(query, [identifier]);
const contacts = <Contacts[]>results;
return contacts;
}
async function addContact(identifier: string, number: string, display: string, avatar: string):Promise<any> {
const query = "INSERT INTO npwd_phone_contacts (identifier, number, display, avatar) VALUES (?, ?, ?, ?)"
async function addContact(
identifier: string,
number: string,
display: string,
avatar: string
): Promise<any> {
const query =
"INSERT INTO npwd_phone_contacts (identifier, number, display, avatar) VALUES (?, ?, ?, ?)";
await pool.query(query, [identifier, number, display, avatar]);
}
@@ -27,9 +33,8 @@ onNet(events.CONTACTS_GET_CONTACTS, async () => {
const _identifier = xPlayer.getIdentifier();
const contacts = await fetchAllContacts(_identifier);
emitNet(events.CONTACTS_SEND_CONTACTS, _source, contacts)
} catch(error) {
emitNet(events.CONTACTS_SEND_CONTACTS, _source, contacts);
} catch (error) {
console.log("Failed to fetch contacts: ", error);
}
})
@@ -44,5 +49,5 @@ onNet(events.CONTACTS_ADD_CONTACT, (number: string, display: string, avatar: str
} catch(error) {
console.log("Failed to add contact: ", error);
}
});
});
+9 -9
View File
@@ -1,5 +1,5 @@
import { ESX } from './server';
import { pool } from './db';
import { ESX } from "./server";
import { pool } from "./db";
//db = DatabaseConfig //helper variable for use in server function
@@ -13,22 +13,22 @@ interface Credentials {
phone_number: string;
}
async function getCredentials(identifier: string) : Promise<string> {
async function getCredentials(identifier: string): Promise<string> {
const query = "SELECT phone_number FROM users WHERE identifier = ?";
const [ result ] = await pool.query(query, [identifier]);
const [result] = await pool.query(query, [identifier]);
const number = <Credentials[]>result;
if (number.length === 0) return "###-####";
return number[0].phone_number;
}
onNet('phone:getCredentials', async () => {
onNet("phone:getCredentials", async () => {
try {
const _source = (global as any).source;
const xPlayer = ESX.GetPlayerFromId(_source);
const _identifier = xPlayer.getIdentifier();
const number = await getCredentials(_identifier);
emitNet('phone:sendCredentials', _source, number)
emitNet("phone:sendCredentials", _source, number);
} catch (error) {
console.log('Failed to get number. ', error);
};
});
console.log("Failed to get number. ", error);
}
});
+161 -131
View File
@@ -1,33 +1,33 @@
import { pool } from './db';
import { ESX, getSource } from './server';
import events from '../utils/events';
import config from '../utils/config';
import { pool } from "./db";
import { ESX, getSource } from "./server";
import events from "../utils/events";
import config from "../utils/config";
interface Profile {
id: number;
profile_name: string;
identifier: string;
avatar_url?: string;
bio?: string;
location?: string;
job?: string;
createdAt: string;
updatedAt: string;
id: number;
profile_name: string;
identifier: string;
avatar_url?: string;
bio?: string;
location?: string;
job?: string;
createdAt: string;
updatedAt: string;
}
interface ProfileName {
profile_name: string;
profile_name: string;
}
interface Tweet {
id: number;
profile_name?: string;
avatar_url?: string;
message: string;
createdAt?: string;
updatedAt?: string;
images?: string;
likes?: number;
id: number;
profile_name?: string;
avatar_url?: string;
message: string;
createdAt?: string;
updatedAt?: string;
images?: string;
likes?: number;
}
/**
@@ -35,7 +35,7 @@ interface Tweet {
* @param profileId - twitter profile id of the player
*/
async function fetchAllTweets(profileId: number): Promise<Tweet[]> {
const query = `
const query = `
SELECT
npwd_twitter_profiles.profile_name,
npwd_twitter_profiles.avatar_url,
@@ -49,9 +49,9 @@ async function fetchAllTweets(profileId: number): Promise<Tweet[]> {
ORDER BY npwd_twitter_tweets.createdAt DESC
LIMIT 100
`;
const [ results ] = await pool.query(query, [profileId]);
const tweets = <Tweet[]>results;
return tweets;
const [results] = await pool.query(query, [profileId]);
const tweets = <Tweet[]>results;
return tweets;
}
/**
@@ -60,9 +60,12 @@ async function fetchAllTweets(profileId: number): Promise<Tweet[]> {
* @param profileId - twitter profile id of the player
* @param searchValue - value to search
*/
async function fetchTweetsFiltered(profileId: number, searchValue: string): Promise<Tweet[]> {
const parameterizedSearchValue = `%${searchValue}%`;
const query = `
async function fetchTweetsFiltered(
profileId: number,
searchValue: string
): Promise<Tweet[]> {
const parameterizedSearchValue = `%${searchValue}%`;
const query = `
SELECT
npwd_twitter_profiles.profile_name,
npwd_twitter_profiles.avatar_url,
@@ -76,22 +79,46 @@ async function fetchTweetsFiltered(profileId: number, searchValue: string): Prom
ORDER BY npwd_twitter_tweets.createdAt DESC
LIMIT 100
`;
const [ results ] = await pool.query(query, [profileId, parameterizedSearchValue, parameterizedSearchValue]);
const tweets = <Tweet[]>results;
return tweets;
const [results] = await pool.query(query, [
profileId,
parameterizedSearchValue,
parameterizedSearchValue,
]);
const tweets = <Tweet[]>results;
return tweets;
}
/**
* Creates a tweet in the database
* Creates a tweet in the database and then retrieves the tweet
* @param identifier - player identifier
* @param tweet - tweet to be created
*/
async function createTweet(identifier: string, tweet: Tweet): Promise<any> {
const query = `
async function createTweet(identifier: string, tweet: Tweet): Promise<Tweet> {
const query = `
INSERT INTO npwd_twitter_tweets (identifier, message, images)
VALUES (?, ?, ?)
`
await pool.query(query, [identifier, tweet.message, tweet.images])
`;
const [results] = await pool.query(query, [
identifier,
tweet.message,
tweet.images,
]);
const insertData = <any>results;
const insertId = insertData.insertId;
const resultQuery = `
SELECT
npwd_twitter_profiles.profile_name,
npwd_twitter_profiles.avatar_url,
npwd_twitter_tweets.*
FROM npwd_twitter_tweets
LEFT OUTER JOIN npwd_twitter_profiles ON npwd_twitter_tweets.identifier = npwd_twitter_profiles.identifier
WHERE npwd_twitter_tweets.id = ?
`;
const [createResults] = await pool.query(resultQuery, [insertId]);
const tweets = <Tweet[]>createResults;
return tweets[0];
}
/**
@@ -99,14 +126,14 @@ async function createTweet(identifier: string, tweet: Tweet): Promise<any> {
* @param identifier - player identifier
*/
async function getProfile(identifier: string): Promise<Profile | null> {
const query = `
const query = `
SELECT * FROM npwd_twitter_profiles
WHERE identifier = ?
LIMIT 1
`;
const [ results ] = await pool.query(query, [identifier]);
const profiles = <Profile[]>results;
return profiles.length > 0 ? profiles[0] : null;
const [results] = await pool.query(query, [identifier]);
const profiles = <Profile[]>results;
return profiles.length > 0 ? profiles[0] : null;
}
/**
@@ -114,19 +141,19 @@ async function getProfile(identifier: string): Promise<Profile | null> {
* @param identifier - player's identifier
*/
async function generateProfileName(identifier: string): Promise<string> {
const defaultProfileName = '';
if (!config.twitter.generateProfileNameFromUsers) return defaultProfileName;
const defaultProfileName = "";
if (!config.twitter.generateProfileNameFromUsers) return defaultProfileName;
const query = `
const query = `
SELECT CONCAT(firstname, '_', lastname) AS profile_name
FROM users
WHERE identifier = ? LIMIT 1
`
const [ results ] = await pool.query(query, [identifier]);
const profileNames = <ProfileName[]>results;
`;
const [results] = await pool.query(query, [identifier]);
const profileNames = <ProfileName[]>results;
if (profileNames.length === 0) return defaultProfileName;
return profileNames[0].profile_name;
if (profileNames.length === 0) return defaultProfileName;
return profileNames[0].profile_name;
}
/**
@@ -135,13 +162,13 @@ async function generateProfileName(identifier: string): Promise<string> {
* @param identifier - player's identifier
*/
async function createDefaultProfile(identifier: string): Promise<Profile> {
const profileName = await generateProfileName(identifier);
const query = `
const profileName = await generateProfileName(identifier);
const query = `
INSERT INTO npwd_twitter_profiles (identifier, profile_name)
VALUES (?, ?)
`
const [ result ] = await pool.execute(query, [identifier, profileName]);
return getProfile(identifier);
`;
const [result] = await pool.execute(query, [identifier, profileName]);
return getProfile(identifier);
}
/**
@@ -150,25 +177,25 @@ async function createDefaultProfile(identifier: string): Promise<Profile> {
* @param identifier - player's identifier
*/
async function getOrCreateProfile(identifier: string): Promise<Profile> {
const profile = await getProfile(identifier);
return profile || await createDefaultProfile(identifier);
const profile = await getProfile(identifier);
return profile || (await createDefaultProfile(identifier));
}
async function updateProfile(identifier: string, profile: Profile) {
const { avatar_url, profile_name, bio, location, job } = profile;
const query = `
const { avatar_url, profile_name, bio, location, job } = profile;
const query = `
UPDATE npwd_twitter_profiles
SET avatar_url = ?, profile_name = ?, bio = ?, location = ?, job = ?
WHERE identifier = ?
`
await pool.execute(query, [
avatar_url,
profile_name,
bio,
location,
job,
identifier
]);
`;
await pool.execute(query, [
avatar_url,
profile_name,
bio,
location,
job,
identifier,
]);
}
/**
@@ -177,11 +204,11 @@ async function updateProfile(identifier: string, profile: Profile) {
* @param tweetId - primary key of the tweet being liked
*/
async function createLike(profileId: number, tweetId: number): Promise<void> {
const query = `
const query = `
INSERT INTO npwd_twitter_likes (profile_id, tweet_id)
VALUES (?, ?)
`
await pool.execute(query, [profileId, tweetId]);
`;
await pool.execute(query, [profileId, tweetId]);
}
/**
@@ -190,11 +217,11 @@ async function createLike(profileId: number, tweetId: number): Promise<void> {
* @param tweetId - primary key of the tweet to remove the like from
*/
async function deleteLike(profileId: number, tweetId: number): Promise<void> {
const query = `
const query = `
DELETE FROM npwd_twitter_likes
WHERE profile_id = ? AND tweet_id = ?
`
await pool.execute(query, [profileId, tweetId]);
`;
await pool.execute(query, [profileId, tweetId]);
}
/**
@@ -202,83 +229,86 @@ async function deleteLike(profileId: number, tweetId: number): Promise<void> {
* @param profileId - primary key of the profile to check
* @param tweetId - primary key of the tweet to check
*/
async function doesLikeExist(profileId: number, tweetId: number): Promise<boolean> {
const query = `
async function doesLikeExist(
profileId: number,
tweetId: number
): Promise<boolean> {
const query = `
SELECT * FROM npwd_twitter_likes
WHERE profile_id = ? AND tweet_id = ?
LIMIT 1
`
const [ results ] = await pool.query(query, [profileId, tweetId]);
const likes = <any[]>results;
return likes.length > 0;
`;
const [results] = await pool.query(query, [profileId, tweetId]);
const likes = <any[]>results;
return likes.length > 0;
}
onNet(events.TWITTER_GET_OR_CREATE_PROFILE, async () => {
try {
const identifier = ESX.GetPlayerFromId(getSource()).getIdentifier();
const profile = await getOrCreateProfile(identifier)
emitNet(events.TWITTER_GET_OR_CREATE_PROFILE_SUCCESS, getSource(), profile);
} catch (e) {
emitNet(events.TWITTER_GET_OR_CREATE_PROFILE_FAILURE, getSource());
}
try {
const identifier = ESX.GetPlayerFromId(getSource()).getIdentifier();
const profile = await getOrCreateProfile(identifier);
emitNet(events.TWITTER_GET_OR_CREATE_PROFILE_SUCCESS, getSource(), profile);
} catch (e) {
emitNet(events.TWITTER_GET_OR_CREATE_PROFILE_FAILURE, getSource());
}
});
onNet(events.TWITTER_UPDATE_PROFILE, async (profile: Profile) => {
try {
const identifier = ESX.GetPlayerFromId(getSource()).getIdentifier();
await updateProfile(identifier, profile)
emitNet(events.TWITTER_UPDATE_PROFILE_RESULT, getSource(), true);
} catch (e) {
emitNet(events.TWITTER_UPDATE_PROFILE_RESULT, getSource(), false);
}
try {
const identifier = ESX.GetPlayerFromId(getSource()).getIdentifier();
await updateProfile(identifier, profile);
emitNet(events.TWITTER_UPDATE_PROFILE_RESULT, getSource(), true);
} catch (e) {
emitNet(events.TWITTER_UPDATE_PROFILE_RESULT, getSource(), false);
}
});
onNet(events.TWITTER_FETCH_TWEETS, async () => {
try {
const identifier = ESX.GetPlayerFromId(getSource()).getIdentifier();
const profile = await getProfile(identifier);
const tweets = await fetchAllTweets(profile.id);
emitNet(events.TWITTER_FETCH_TWEETS_SUCCESS, getSource(), tweets);
} catch (e) {
emitNet(events.TWITTER_FETCH_TWEETS_FAILURE, getSource());
}
try {
const identifier = ESX.GetPlayerFromId(getSource()).getIdentifier();
const profile = await getProfile(identifier);
const tweets = await fetchAllTweets(profile.id);
emitNet(events.TWITTER_FETCH_TWEETS_SUCCESS, getSource(), tweets);
} catch (e) {
emitNet(events.TWITTER_FETCH_TWEETS_FAILURE, getSource());
}
});
onNet(events.TWITTER_FETCH_TWEETS_FILTERED, async (searchValue: string) => {
try {
const identifier = ESX.GetPlayerFromId(getSource()).getIdentifier();
const profile = await getProfile(identifier);
const tweets = await fetchTweetsFiltered(profile.id, searchValue);
emitNet(events.TWITTER_FETCH_TWEETS_FILTERED_SUCCESS, getSource(), tweets);
} catch (e) {
emitNet(events.TWITTER_FETCH_TWEETS_FILTERED_FAILURE, getSource());
}
try {
const identifier = ESX.GetPlayerFromId(getSource()).getIdentifier();
const profile = await getProfile(identifier);
const tweets = await fetchTweetsFiltered(profile.id, searchValue);
emitNet(events.TWITTER_FETCH_TWEETS_FILTERED_SUCCESS, getSource(), tweets);
} catch (e) {
emitNet(events.TWITTER_FETCH_TWEETS_FILTERED_FAILURE, getSource());
}
});
onNet(events.TWITTER_CREATE_TWEET, async (tweet: Tweet) => {
try {
const identifier = ESX.GetPlayerFromId(getSource()).getIdentifier();
await createTweet(identifier, tweet);
emitNet(events.TWITTER_CREATE_TWEET_RESULT, getSource(), true);
} catch (e) {
emitNet(events.TWITTER_CREATE_TWEET_RESULT, getSource(), false);
}
try {
const identifier = ESX.GetPlayerFromId(getSource()).getIdentifier();
const createdTweet = await createTweet(identifier, tweet);
emitNet(events.TWITTER_CREATE_TWEET_RESULT, getSource(), true);
emitNet(events.TWITTER_CREATE_TWEET_BROADCAST, -1, createdTweet);
} catch (e) {
emitNet(events.TWITTER_CREATE_TWEET_RESULT, getSource(), false);
}
});
onNet(events.TWITTER_TOGGLE_LIKE, async (tweetId: number) => {
try {
const identifier = ESX.GetPlayerFromId(getSource()).getIdentifier();
const profile = await getOrCreateProfile(identifier)
const likeExists = await doesLikeExist(profile.id, tweetId);
if (likeExists) {
await deleteLike(profile.id, tweetId);
} else {
await createLike(profile.id, tweetId);
}
emitNet(events.TWITTER_TOGGLE_LIKE_SUCCESS, getSource());
} catch (e) {
emitNet(events.TWITTER_TOGGLE_LIKE_FAILURE, getSource());
try {
const identifier = ESX.GetPlayerFromId(getSource()).getIdentifier();
const profile = await getOrCreateProfile(identifier);
const likeExists = await doesLikeExist(profile.id, tweetId);
if (likeExists) {
await deleteLike(profile.id, tweetId);
} else {
await createLike(profile.id, tweetId);
}
});
emitNet(events.TWITTER_TOGGLE_LIKE_SUCCESS, getSource());
} catch (e) {
emitNet(events.TWITTER_TOGGLE_LIKE_FAILURE, getSource());
}
});
+1 -1
View File
@@ -10,7 +10,7 @@
"target": "es6",
"allowJs": false,
"lib": ["es2017"],
"types": ["@citizenfx/server", "@types/node"],
"types": ["@citizenfx/server", "@types/node", "jest"],
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
+2 -2
View File
@@ -1,3 +1,3 @@
export default {
TWITTER: 'TWITTER',
}
TWITTER: "TWITTER",
};
+27 -20
View File
@@ -1,23 +1,30 @@
export default {
Locale: 'en',
KeyTogglePhone: 288,
KeyTakeCall: 38,
PhoneAsItem: false,
Locale: "en",
KeyTogglePhone: 288,
KeyTakeCall: 38,
PhoneAsItem: false,
// destroy phone
SwimDestroy: false,
RunRate: 10,
DestoryChance: 100,
DestroyPhoneReCheck: 3,
// destroy phone
SwimDestroy: false,
RunRate: 10,
DestoryChance: 100,
DestroyPhoneReCheck: 3,
// twitter app
twitter: {
generateProfileNameFromUsers: true,
characterLimit: 240,
allowEdtiableProfileName: true,
enableAvatars: true,
enableEmojis: true,
enableImages: true,
maxImages: 3,
}
};
// notification settings
notificationPosition: {
horizontal: 'right', // left, center, right
vertical: 'bottom', // bottom, top
},
// twitter app
twitter: {
showNotifications: true,
generateProfileNameFromUsers: true,
characterLimit: 240,
allowEdtiableProfileName: true,
enableAvatars: true,
enableEmojis: true,
enableImages: true,
maxImages: 3,
},
};
+22 -21
View File
@@ -1,24 +1,25 @@
export default {
// Twitter
TWITTER_FETCH_TWEETS: 'phone:fetchTweets',
TWITTER_FETCH_TWEETS_SUCCESS: 'fetchTweets',
TWITTER_FETCH_TWEETS_FAILURE: 'fetchTweetsFailed',
TWITTER_FETCH_TWEETS_FILTERED: 'phone:fetchTweetsFiltered',
TWITTER_FETCH_TWEETS_FILTERED_SUCCESS: 'fetchTweetsFiltered',
TWITTER_FETCH_TWEETS_FILTERED_FAILURE: 'fetchTweetsFilteredFailed',
TWITTER_GET_OR_CREATE_PROFILE: 'phone:getOrCreateTwitterProfile',
TWITTER_GET_OR_CREATE_PROFILE_SUCCESS: 'getOrCreateTwitterProfile',
TWITTER_GET_OR_CREATE_PROFILE_FAILURE: 'getOrCreateTwitterProfileFailed',
TWITTER_UPDATE_PROFILE: 'phone:updateTwitterProfile',
TWITTER_UPDATE_PROFILE_LOADING: 'updateProfileLoading',
TWITTER_UPDATE_PROFILE_RESULT: 'updateProfileResult',
TWITTER_CREATE_TWEET: 'phone:createTweet',
TWITTER_CREATE_TWEET_LOADING: 'createTweetLoading',
TWITTER_CREATE_TWEET_RESULT: 'createTweetResult',
TWITTER_CREATE_TWEET_FAILURE: 'createTweetResultFailed',
TWITTER_TOGGLE_LIKE: 'phone:toggleLike',
TWITTER_TOGGLE_LIKE_SUCCESS: 'toggleLikeSuccess',
TWITTER_TOGGLE_LIKE_FAILURE: 'toggleLikeFailed',
// Twitter
TWITTER_FETCH_TWEETS: "phone:fetchTweets",
TWITTER_FETCH_TWEETS_SUCCESS: "fetchTweets",
TWITTER_FETCH_TWEETS_FAILURE: "fetchTweetsFailed",
TWITTER_FETCH_TWEETS_FILTERED: "phone:fetchTweetsFiltered",
TWITTER_FETCH_TWEETS_FILTERED_SUCCESS: "fetchTweetsFiltered",
TWITTER_FETCH_TWEETS_FILTERED_FAILURE: "fetchTweetsFilteredFailed",
TWITTER_GET_OR_CREATE_PROFILE: "phone:getOrCreateTwitterProfile",
TWITTER_GET_OR_CREATE_PROFILE_SUCCESS: "getOrCreateTwitterProfile",
TWITTER_GET_OR_CREATE_PROFILE_FAILURE: "getOrCreateTwitterProfileFailed",
TWITTER_UPDATE_PROFILE: "phone:updateTwitterProfile",
TWITTER_UPDATE_PROFILE_LOADING: "updateProfileLoading",
TWITTER_UPDATE_PROFILE_RESULT: "updateProfileResult",
TWITTER_CREATE_TWEET: "phone:createTweet",
TWITTER_CREATE_TWEET_LOADING: "createTweetLoading",
TWITTER_CREATE_TWEET_RESULT: "createTweetResult",
TWITTER_CREATE_TWEET_BROADCAST: "createTweetBroadcast",
TWITTER_CREATE_TWEET_FAILURE: "createTweetResultFailed",
TWITTER_TOGGLE_LIKE: "phone:toggleLike",
TWITTER_TOGGLE_LIKE_SUCCESS: "toggleLikeSuccess",
TWITTER_TOGGLE_LIKE_FAILURE: "toggleLikeFailed",
// Contacts
CONTACTS_SEND_CONTACTS: 'phone:sendContacts',
@@ -31,4 +32,4 @@ export default {
SELLOUT_ADD_LISTING: 'phone:addListing',
SELLOUT_FETCH_LISTING: 'phone:fetchAllListing',
SELLOUT_SEND_LISTING: 'phone:sendAllListings'
}
}
+1 -1
View File
@@ -1,2 +1,2 @@
// https://forum.cfx.re/t/typescript-vs-lua-questions/612483/11
export const Delay = (ms: number) => new Promise(res => setTimeout(res, ms));
export const Delay = (ms: number) => new Promise((res) => setTimeout(res, ms));
+9 -7
View File
@@ -1,13 +1,15 @@
import apps from './apps';
import apps from "./apps";
function sendMessage(app: string, method: string, data: any) {
return SendNuiMessage(JSON.stringify({
app,
method,
data,
}))
return SendNuiMessage(
JSON.stringify({
app,
method,
data,
})
);
}
export function sendTwitterMessage(method: string, data: any = {}) {
return sendMessage(apps.TWITTER, method, data);
return sendMessage(apps.TWITTER, method, data);
}
+3341 -44
View File
File diff suppressed because it is too large. Load diff