{"version":3,"sources":["jsdelivr-header.js","/npm/react-chat-engine@1.11.28/src/components/Context/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/Utilities/timezone.js","/npm/react-chat-engine@1.11.28/src/components/Sockets/Socket/Socket4.js","/npm/react-chat-engine@1.11.28/src/actions/index.js","/npm/react-chat-engine@1.11.28/src/actions/auth.js","/npm/react-chat-engine@1.11.28/src/components/Sockets/Socket/getOrCreateSession.js","/npm/react-chat-engine@1.11.28/src/components/Sockets/Socket/index.js","/npm/react-chat-engine@1.11.28/src/components/Sockets/ChatSocket/ChatSocket.js","/npm/react-chat-engine@1.11.28/src/components/Sockets/ChatSocket/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatList/ChatLoader.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatList/NewChatForm/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatList/ChatCard/Loading.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/components/Effects/Boop/useBoop.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/components/Effects/Boop/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatList/ChatCard/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatList/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatFeed/Steps/AuthFail/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatFeed/Steps/CreateChat/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatFeed/Steps/IceBreaker/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatFeed/Triggers/RenderTrigger.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatFeed/ChatHeader/ChatListDrawer.js","/npm/react-chat-engine@1.11.28/node_modules/react-is/cjs/react-is.production.min.js","/npm/react-chat-engine@1.11.28/node_modules/react-is/cjs/react-is.development.js","/npm/react-chat-engine@1.11.28/node_modules/react-is/index.js","/npm/react-chat-engine@1.11.28/node_modules/object-assign/index.js","/npm/react-chat-engine@1.11.28/node_modules/prop-types/lib/ReactPropTypesSecret.js","/npm/react-chat-engine@1.11.28/node_modules/prop-types/checkPropTypes.js","/npm/react-chat-engine@1.11.28/node_modules/prop-types/factoryWithTypeCheckers.js","/npm/react-chat-engine@1.11.28/node_modules/prop-types/factoryWithThrowingShims.js","/npm/react-chat-engine@1.11.28/node_modules/prop-types/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatSettings/PeopleSettings/PersonRow/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatSettings/PeopleSettings/PersonForm/PersonOption/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatSettings/PeopleSettings/PersonForm/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatSettings/SettingsBlock/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatSettings/PeopleSettings/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatSettings/PhotosSettings/Thumbnail.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatSettings/PhotosSettings/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatSettings/OptionsSettings/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatSettings/ChatSettingsTop/TitleForm/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatSettings/ChatSettingsTop/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatSettings/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatFeed/ChatHeader/ChatSettingsDrawer.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatFeed/ChatHeader/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatFeed/Messages/DatePartition/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatFeed/Messages/Bubble/file.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatFeed/Messages/Bubble/Thumbnail.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatFeed/Messages/Bubble/FileView.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/Utilities/colorMapping.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/components/Avatar/Dot/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatFeed/Messages/Bubble/Body.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatFeed/Messages/Bubble/MyMessage.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatFeed/Messages/Bubble/TheirMessage.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatFeed/Messages/Bubble/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatFeed/Messages/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatFeed/IsTyping/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatFeed/NewMessageForm/isImage.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatFeed/NewMessageForm/FilePreview.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatFeed/NewMessageForm/FilesRow.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatFeed/NewMessageForm/Thumbnail.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatFeed/NewMessageForm/ImagesRow.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatFeed/NewMessageForm/AttachmentsInput.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatFeed/NewMessageForm/SendButton.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatFeed/NewMessageForm/NextQuill.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatFeed/NewMessageForm/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatFeed/ScrollDownBar/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatFeed/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/index.js","/npm/react-chat-engine@1.11.28/src/components/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/components/Button/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/components/Avatar/Avatar/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/components/Input/TextInput/index.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/components/Input/AutocompleteInput/index.js","/npm/react-chat-engine@1.11.28/src/actions/chats/getChats.js","/npm/react-chat-engine@1.11.28/src/actions/chats/newChat.js","/npm/react-chat-engine@1.11.28/src/actions/chats/getLatestChats.js","/npm/react-chat-engine@1.11.28/src/actions/chats/getChatsBefore.js","/npm/react-chat-engine@1.11.28/src/actions/chats/getOrCreateChat.js","/npm/react-chat-engine@1.11.28/src/actions/chats/getChat.js","/npm/react-chat-engine@1.11.28/src/actions/chats/editChat.js","/npm/react-chat-engine@1.11.28/src/actions/chats/deleteChat.js","/npm/react-chat-engine@1.11.28/src/actions/people/addPerson.js","/npm/react-chat-engine@1.11.28/src/actions/people/removePerson.js","/npm/react-chat-engine@1.11.28/src/actions/people/getOtherPeople.js","/npm/react-chat-engine@1.11.28/src/actions/people/getMyData.js","/npm/react-chat-engine@1.11.28/src/actions/people/editMyData.js","/npm/react-chat-engine@1.11.28/src/actions/people/leaveChat.js","/npm/react-chat-engine@1.11.28/src/actions/messages/getMessages.js","/npm/react-chat-engine@1.11.28/src/actions/messages/getLatestMessages.js","/npm/react-chat-engine@1.11.28/src/actions/messages/sendMessage.js","/npm/react-chat-engine@1.11.28/src/actions/messages/getMessage.js","/npm/react-chat-engine@1.11.28/src/actions/messages/editMessage.js","/npm/react-chat-engine@1.11.28/src/actions/messages/readMessage.js","/npm/react-chat-engine@1.11.28/src/actions/messages/deleteMessage.js","/npm/react-chat-engine@1.11.28/src/actions/typing/isTyping.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatFeed/MessageFormSocial/ImagesInput.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatFeed/MessageFormSocial/MessageInput.js","/npm/react-chat-engine@1.11.28/src/components/ChatEngine/ChatFeed/MessageFormSocial/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,qdCJa,kBAAoB,sBAEpB,kBAAoB,SAAC,GAChC,IAAA,EAAwB,eAAS,MAA1B,EAAP,EAAA,GAAa,EAAb,EAAA,GACA,EAA0B,eAAS,MAA5B,EAAP,EAAA,GAAc,EAAd,EAAA,GACA,EAAwC,eAAS,IAA1C,EAAP,EAAA,GAAqB,EAArB,EAAA,GACA,EAA0B,eAAS,MAA5B,EAAP,EAAA,GAAc,EAAd,EAAA,GACA,EAAgC,eAAS,IAAlC,EAAP,EAAA,GAAiB,EAAjB,EAAA,GACA,EAAoC,eAAS,MAAtC,EAAP,EAAA,GAAmB,EAAnB,EAAA,GACA,EAA0C,eAAS,IAA5C,EAAP,EAAA,GAAsB,EAAtB,EAAA,GACA,EAAgD,gBAAS,GAAlD,EAAP,EAAA,GAAyB,EAAzB,EAAA,GACA,EAA8C,gBAAS,GAEjD,EAAQ,CACZ,OACA,UACA,QACA,WACA,eACA,kBACA,QACA,WACA,WACA,cACA,aACA,gBACA,gBACA,mBACA,mBACA,sBACA,gBAnBF,EAAA,GAoBE,mBApBF,EAAA,IAuBA,OACE,6BAAC,kBAAkB,SAAnB,CAA4B,MAAO,GAChC,EAAM,SAGZ,E,ioBCzCM,SAAS,YAAY,EAAM,GAC9B,IAAK,EAAM,MAAO,GAGlB,EAAS,GAAkB,EAE3B,IAAM,GAHN,EAAO,EAAK,QAAQ,IAAK,MAGP,OAAO,EAAE,GACrB,EAAQ,EAAK,OAAO,EAAE,GACtB,EAAM,EAAK,OAAO,EAAE,GACpB,EAAO,EAAK,OAAO,GAAG,GACtB,EAAS,EAAK,OAAO,GAAG,GACxB,EAAS,EAAK,OAAO,GAAG,GAE1B,EAAI,IAAI,KAAQ,EAAZ,IAAoB,EAApB,IAA6B,EAA7B,IAAoC,EAAp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BACjB,OAAQ,UAER,SAAU,WACV,OAAQ,OACR,MAAO,OACP,OAAQ,MAEV,SAAU,CACR,MAAO,OACP,UAAW,iBACX,WAAY,Q","file":"/npm/react-chat-engine@1.11.28/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/react-chat-engine@1.11.28/dist/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import React, { useState, createContext } from 'react'\n\nexport const ChatEngineContext = createContext()\n\nexport const ChatEngineWrapper = (props) => {\n  const [conn, setConn] = useState(null)\n  const [creds, setCreds] = useState(null)\n  const [sessionToken, setSessionToken] = useState('')\n  const [chats, setChats] = useState(null)\n  const [messages, setMessages] = useState({})\n  const [activeChat, setActiveChat] = useState(null)\n  const [typingCounter, setTypingCounter] = useState({})\n  const [loadMoreMessages, setLoadMoreMessages] = useState(false)\n  const [isBottomVisible, setIsBottomVisible] = useState(false)\n\n  const value = {\n    conn,\n    setConn,\n    creds,\n    setCreds,\n    sessionToken,\n    setSessionToken,\n    chats,\n    setChats,\n    messages,\n    setMessages,\n    activeChat,\n    setActiveChat,\n    typingCounter,\n    setTypingCounter,\n    loadMoreMessages,\n    setLoadMoreMessages,\n    isBottomVisible,\n    setIsBottomVisible\n  }\n\n  return (\n    <ChatEngineContext.Provider value={value}>\n      {props.children}\n    </ChatEngineContext.Provider>\n  )\n}\n","export function getDateTime(date, offset) {\n    if (!date) return ''\n    \n    date = date.replace(' ', 'T')\n    offset = offset ? offset : 0\n\n    const year = date.substr(0,4)\n    const month = date.substr(5,2)\n    const day = date.substr(8,2)\n    const hour = date.substr(11,2)\n    const minute = date.substr(14,2)\n    const second = date.substr(17,2)\n    \n    var d = new Date(`${year}-${month}-${day}T${hour}:${minute}:${second}`)\n    d.setHours(d.getHours() + offset)\n    return d\n}\n\nconst options = { weekday: 'short', month: 'short', day: 'numeric', year: 'numeric' }\n\nexport function formatTime(dateTime) {\n    var time = dateTime.toLocaleString('en-US')\n    return time.split(' ')[1].slice(0, -3) + ' ' + time.slice(-2)\n}\n\nexport function formatDate(dateTime) {\n    return dateTime.toLocaleString('en-US', options)\n}\n\nexport function formatDateTime(dateTime) {\n    return formatTime(dateTime) + ', ' + formatDate(dateTime)\n}\n","import React, { useContext, useState, useEffect } from 'react'\n\nimport {\n  ChatEngineContext,\n  readMessage,\n  getLatestChats,\n  getLatestMessages\n} from 'react-chat-engine'\nimport { getDateTime } from '../../ChatEngine/Utilities/timezone'\n\nimport { WebSocket } from 'nextjs-websocket'\n\nlet socketRef = undefined\nlet pingIntervalID = 0\nlet timeIntervalID = 0\n\nconst pingInterval = 4000\nconst minLag = 15 * 1000\nconst initialLoadTime = Date.now() + 10 * 1000\n\nconst Socket = (props) => {\n  const [now, setNow] = useState(Date.now())\n  const [shouldPongBy, setShouldPongBy] = useState(Date.now() + minLag)\n\n  const {\n    conn,\n    sessionToken,\n    chats,\n    setChats,\n    messages,\n    setMessages,\n    activeChat,\n    setActiveChat,\n    typingCounter,\n    setTypingCounter,\n    isBottomVisible\n  } = useContext(ChatEngineContext)\n\n  //   useEffect(() => {\n  //     if (now > shouldPongBy) {\n  //       console.log('pingIntervalID', pingIntervalID)\n  //       console.log('timeIntervalID', timeIntervalID)\n  //       console.log('shouldPongBy', new Date(shouldPongBy).toLocaleString())\n  //       console.log('now', new Date(now).toLocaleString())\n  //       props.reRender && props.reRender()\n  //       setShouldPongBy(Date.now() + minLag)\n  //     }\n  //   }, [now, shouldPongBy])\n\n  useEffect(() => {\n    return () => {\n      clearInterval(pingIntervalID)\n      clearInterval(timeIntervalID)\n    }\n  }, [])\n\n  function sortChats(chats) {\n    return Object.values(chats).sort((a, b) => {\n      const aDate = a.last_message.created\n        ? getDateTime(a.last_message.created, props.offset)\n        : getDateTime(a.created, props.offset)\n      const bDate = b.last_message.created\n        ? getDateTime(b.last_message.created, props.offset)\n        : getDateTime(b.created, props.offset)\n      return new Date(bDate) - new Date(aDate)\n    })\n  }\n\n  function onConnect() {\n    // pingIntervalID = setInterval(() => {\n    //   try {\n    //     socketRef.sendMessage(JSON.stringify('ping'))\n    //   } catch (e) {\n    //     console.log('Socker error', e)\n    //   }\n    // }, pingInterval)\n    // timeIntervalID = setInterval(() => setNow(Date.now()), 1000)\n\n    // If this wasn't the first connection\n    if (\n      Date.now() > initialLoadTime ||\n      conn.renderChatFeed ||\n      conn.renderChatList\n    ) {\n      console.log('Refresh')\n      getLatestChats(conn, 25, (chats) => setChats(_.mapKeys(chats, 'id')))\n      getLatestMessages(conn, activeChat, 45, (id, list) => {\n        setMessages({ ...messages, ..._.mapKeys(list, 'created') })\n      })\n    }\n\n    props.onConnect && props.onConnect(conn)\n  }\n\n  function handleEditChat(chat) {\n    if (chats) {\n      const newChats = { ...chats }\n      newChats[chat.id] = chat\n      setChats(newChats)\n    }\n    props.onEditChat && props.onEditChat(chat)\n  }\n\n  async function handleEvent(event) {\n    const eventJSON = JSON.parse(event)\n    console.log('eventJSON.action', eventJSON.action)\n    if (eventJSON.action === 'pong') {\n      setShouldPongBy(Date.now() + minLag)\n    } else if (eventJSON.action === 'login_error') {\n      const sessionKey = `${props.projectID}/${props.userName}/${props.userSecret}`\n      localStorage.removeItem(sessionKey)\n      props.onFailAuth && props.onFailAuth(conn)\n    } else if (eventJSON.action === 'new_chat') {\n      const chat = eventJSON.data\n      if (chats) {\n        const newChats = { ...chats }\n        newChats[chat.id] = chat\n        setChats(newChats)\n        setActiveChat(chat.id)\n      }\n      props.onNewChat && props.onNewChat(eventJSON.data)\n    } else if (eventJSON.action === 'edit_chat') {\n      handleEditChat(eventJSON.data)\n    } else if (eventJSON.action === 'delete_chat') {\n      const chat = eventJSON.data\n      if (chats) {\n        chats[chat.id] = undefined\n        setChats(chats)\n        if (!_.isEmpty(chats)) {\n          const sortedChats = sortChats(chats)\n          setActiveChat(sortedChats[0] ? parseInt(sortedChats[0].id) : 0)\n        }\n      }\n      props.onDeleteChat && props.onDeleteChat(chat)\n    } else if (eventJSON.action === 'add_person') {\n      handleEditChat(eventJSON.data)\n      props.onAddPerson && props.onAddPerson(eventJSON.data)\n    } else if (eventJSON.action === 'remove_person') {\n      handleEditChat(eventJSON.data)\n      props.onRemovePerson && props.onRemovePerson(eventJSON.data)\n    } else if (eventJSON.action === 'new_message') {\n      const { id, message } = eventJSON.data\n      if (parseInt(id) === parseInt(activeChat)) {\n        const newMessages = { ...messages }\n        newMessages[message.created] = message\n        setMessages(newMessages)\n      }\n      if (message.sender_username !== props.userName && isBottomVisible) {\n        readMessage(conn, activeChat, message.id, (chat) =>\n          handleEditChat(chat)\n        )\n      }\n      props.onNewMessage && props.onNewMessage(id, message)\n    } else if (eventJSON.action === 'edit_message') {\n      const { id, message } = eventJSON.data\n      if (id === activeChat) {\n        messages[message.created] = message\n        setMessages(messages)\n      }\n      props.onEditMessage && props.onEditMessage(id, message)\n    } else if (eventJSON.action === 'delete_message') {\n      const { id, message } = eventJSON.data\n      if (id === activeChat) {\n        messages[message.created] = undefined\n        setMessages(messages)\n      }\n      props.onDeleteMessage && props.onDeleteMessage(id, message)\n    } else if (eventJSON.action === 'is_typing') {\n      const { id, person } = eventJSON.data\n      let newTypingCounter = { ...typingCounter }\n      newTypingCounter = {\n        ...newTypingCounter,\n        [id]: {\n          ...newTypingCounter[id],\n          [person]: Date.now()\n        }\n      }\n      setTypingCounter(newTypingCounter)\n      props.onTyping && props.onTyping(id, person)\n    }\n  }\n\n  const { development } = props\n  const wsStart = development ? 'ws://' : 'wss://'\n  const rootHost = development ? '127.0.0.1:8000' : 'api.chatengine.io'\n\n  if (!sessionToken || sessionToken === '') return <div />\n\n  return (\n    <WebSocket\n      url={`${wsStart}${rootHost}/person_v4/?session_token=${sessionToken}`}\n      reconnect={true}\n      reconnectIntervalInMilliSeconds={3000}\n      childRef={(ref) => (socketRef = ref)}\n      onOpen={onConnect}\n      onError={(e) => console.log('Socket Error', e)}\n      onMessage={handleEvent.bind(this)}\n      onClose={() => console.log('Socket Closed')}\n    />\n  )\n}\n\nexport default Socket\n","export function getApiUrl(props) { \n    if (props && props.development) {\n        return 'http://127.0.0.1:8000'\n    }\n    return 'https://api.chatengine.io'\n}\n","export function getHeaders(props) {\n  if (!props) {\n    return\n  } else if (props.chatID) {\n    return {\n      'public-key': props.publicKey ? props.publicKey : props.projectID,\n      'chat-id': props.chatID,\n      'access-key': props.chatAccessKey\n    }\n  } else {\n    return {\n      'Public-Key': props.publicKey ? props.publicKey : props.projectID,\n      'User-Name': props.userName,\n      'User-Secret': props.userPassword ? props.userPassword : props.userSecret\n    }\n  }\n}\n","import axios from 'axios'\nimport * as str from '../../../actions'\nimport { getHeaders } from '../../../actions/auth'\n\nexport function getOrCreateSession(props, callback, errorFunc) {\n  axios\n    .get(`${str.getApiUrl(props)}/users/me/session/`, {\n      headers: getHeaders(props)\n    })\n\n    .then((response) => {\n      callback && callback(response.data)\n    })\n\n    .catch((error) => {\n      console.log('Get or Create Session Error', error)\n      errorFunc && errorFunc(error)\n    })\n}\n","import React, { useState, useRef, useContext, useEffect } from 'react'\n\nimport SocketChild from './Socket4'\nimport { getOrCreateSession } from './getOrCreateSession'\nimport { ChatEngineContext } from 'react-chat-engine'\n\nconst Socket = (props) => {\n  const didMountRef = useRef(false)\n  const [isHidden, setIsHidden] = useState(false)\n  const { setConn, setCreds, setSessionToken } = useContext(ChatEngineContext)\n\n  useEffect(() => {\n    if (!didMountRef.current) {\n      didMountRef.current = true\n      getSession()\n    }\n  })\n\n  function getSession() {\n    const sessionKey = `${props.projectID}/${props.userName}/${props.userSecret}`\n\n    if (localStorage.getItem(sessionKey) !== null) {\n      setConn(props)\n      setCreds(props)\n      setSessionToken(localStorage.getItem(sessionKey))\n      console.log('Local fetch!')\n      return\n    }\n\n    getOrCreateSession(\n      props,\n      (data) => {\n        setConn(props)\n        setCreds(props)\n        setSessionToken(data.token)\n        localStorage.setItem(sessionKey, data.token)\n      },\n      (e) => {\n        if (e.response && e.response.status === 403) {\n          console.log(\n            `Your login credentials were not correct: \\n\n                        Project ID: ${props.projectID} \\n\n                        Username: ${props.userName} \\n\n                        User Secret: ${props.userSecret}\\n\n                        Double check these credentials to make sure they're correct.\\n\n                        If all three are correct, try resetting the username and secret in the Online Dashboard or Private API.`\n          )\n          setConn(undefined)\n          setCreds(undefined)\n          localStorage.removeItem(sessionKey)\n          props.onFailAuth && props.onFailAuth(props)\n        }\n        setTimeout(() => getSession(), 10 * 1000)\n      }\n    )\n  }\n\n  function reRender() {\n    setIsHidden(true)\n    setTimeout(() => setIsHidden(false), 100)\n  }\n\n  if (isHidden) return <div />\n\n  return <SocketChild {...props} reRender={() => reRender()} />\n}\n\nexport default Socket\n","import React, { useContext, useState, useEffect } from 'react'\n\nimport {\n  ChatEngineContext,\n  getChat,\n  getLatestMessages\n} from 'react-chat-engine'\n\nimport { WebSocket } from 'nextjs-websocket'\n\nimport _ from 'lodash'\n\nlet socketRef = undefined\nlet pingIntervalID = 0\nlet timeIntervalID = 0\n\nconst pingInterval = 4000\nconst minLag = 15 * 1000\nconst reconnect = Date.now() + 10 * 1000\n\nconst SocketChild = (props) => {\n  const [now, setNow] = useState(Date.now())\n  const [shouldPongBy, setShouldPongBy] = useState(Date.now() + minLag)\n\n  const {\n    conn,\n    setConn,\n    setCreds,\n    chats,\n    setChats,\n    messages,\n    setMessages,\n    activeChat,\n    setActiveChat,\n    typingCounter,\n    setTypingCounter\n  } = useContext(ChatEngineContext)\n\n  useEffect(() => {\n    if (now > shouldPongBy) {\n      console.log('shouldPongBy', shouldPongBy)\n      console.log('now', now)\n      props.reRender && props.reRender()\n      setShouldPongBy(Date.now() + minLag)\n    }\n  }, [now, shouldPongBy])\n  useEffect(() => {\n    return () => {\n      clearInterval(pingIntervalID)\n      clearInterval(timeIntervalID)\n    }\n  }, [])\n\n  // Common Context Handlers\n\n  function onEditChat(chat) {\n    if (chats) {\n      const newChats = { ...chats }\n      newChats[chat.id] = chat\n      setChats(newChats)\n    }\n\n    props.onEditChat && props.onEditChat(chat)\n  }\n\n  function onGetChat(chat) {\n    if (activeChat === null) {\n      setActiveChat(chat.id)\n    }\n\n    setChats(_.mapKeys([chat], 'id'))\n  }\n\n  function onConnect(conn) {\n    setConn(conn)\n    setCreds(conn)\n\n    // pingIntervalID = setInterval(() => {\n    //   try {\n    //     socketRef.sendMessage(JSON.stringify('ping'))\n    //   } catch (e) {\n    //     console.log('Socker error', e)\n    //   }\n    // }, pingInterval)\n\n    // timeIntervalID = setInterval(() => setNow(Date.now()), 1000)\n\n    getChat(conn, props.chatID, (chat) => onGetChat(chat))\n\n    if (Date.now() > reconnect) {\n      getLatestMessages(conn, props.chatID, 45, (id, list) => {\n        setMessages({ ...messages, ..._.mapKeys(list, 'created') })\n      })\n    }\n\n    props.onConnect && props.onConnect(conn)\n  }\n\n  // Socket Events\n\n  function handleEvent(event) {\n    const eventJSON = JSON.parse(event)\n\n    if (eventJSON.action === 'pong') {\n      setShouldPongBy(Date.now() + minLag)\n    } else if (eventJSON.action === 'login_error') {\n      console.log(\n        `Your chat auth credentials were not correct: \\n\n                Project ID: ${props.projectID} \\n\n                Chat ID: ${props.chatID} \\n\n                Access Key: ${props.chatAccessKey}\\n\n                Double check these credentials to make sure they're correct.\\n\n                If all three are correct, try resetting the username and secret in the Online Dashboard or Private API.`\n      )\n\n      setConn(undefined)\n      setCreds(undefined)\n\n      props.onFailAuth && props.onFailAuth(conn)\n    } else if (eventJSON.action === 'edit_chat') {\n      onEditChat(eventJSON.data)\n    } else if (eventJSON.action === 'delete_chat') {\n      const chat = eventJSON.data\n\n      if (chats) {\n        chats[chat.id] = undefined\n\n        setChats(chats)\n      }\n\n      props.onDeleteChat && props.onDeleteChat(chat)\n    } else if (eventJSON.action === 'add_person') {\n      onEditChat(eventJSON.data)\n\n      props.onAddPerson && props.onAddPerson(eventJSON.data)\n    } else if (eventJSON.action === 'remove_person') {\n      onEditChat(eventJSON.data)\n\n      props.onRemovePerson && props.onRemovePerson(eventJSON.data)\n    } else if (eventJSON.action === 'new_message') {\n      const { id, message } = eventJSON.data\n\n      if (id === activeChat) {\n        const newMessages = { ...messages }\n        newMessages[message.created] = message\n        setMessages(newMessages)\n      }\n\n      props.onNewMessage && props.onNewMessage(id, message)\n    } else if (eventJSON.action === 'edit_message') {\n      const { id, message } = eventJSON.data\n\n      if (id === activeChat) {\n        messages[message.created] = message\n        setMessages(messages)\n      }\n\n      props.onEditMessage && props.onEditMessage(id, message)\n    } else if (eventJSON.action === 'delete_message') {\n      const { id, message } = eventJSON.data\n\n      if (id === activeChat) {\n        messages[message.created] = undefined\n        setMessages(messages)\n      }\n\n      props.onDeleteMessage && props.onDeleteMessage(id, message)\n    } else if (eventJSON.action === 'is_typing') {\n      const { id, person } = eventJSON.data\n      let newTypingCounter = { ...typingCounter }\n      newTypingCounter = {\n        ...newTypingCounter,\n        [id]: {\n          ...newTypingCounter[id],\n          [person]: Date.now()\n        }\n      }\n\n      setTypingCounter(newTypingCounter)\n\n      props.onTyping && props.onTyping(id, person)\n    }\n  }\n\n  function onClose() {\n    props.reRender && props.reRender()\n  }\n\n  const { development, publicKey, projectID, chatID, chatAccessKey } = props\n  const wsStart = development ? 'ws://' : 'wss://'\n  const rootHost = development ? '127.0.0.1:8000' : 'api.chatengine.io'\n  const project = publicKey ? publicKey : projectID\n\n  return (\n    <WebSocket\n      reconnect={true}\n      childRef={(ref) => (socketRef = ref)}\n      url={`${wsStart}${rootHost}/chat/?projectID=${project}&chatID=${chatID}&accessKey=${chatAccessKey}`}\n      onOpen={onConnect.bind(this, props)}\n      onClose={onClose.bind(this)}\n      onError={(e) => console.log('Socket Error', e)}\n      onMessage={handleEvent.bind(this)}\n      reconnectIntervalInMilliSeconds={3000}\n    />\n  )\n}\n\nexport default SocketChild\n","import React, { useState } from 'react'\n\nimport SocketChild from './ChatSocket'\n\nconst ChatSocket = (props) => {\n  const [hide, setHide] = useState(false)\n\n  function reRender() {\n    setHide(true)\n    setTimeout(() => setHide(false), 100)\n  }\n\n  return (\n    <div>{!hide && <SocketChild {...props} reRender={() => reRender()} />}</div>\n  )\n}\n\nexport default ChatSocket\n","import React, { useState, useRef, useEffect } from 'react'\n\nimport { LoadingOutlined } from '@ant-design/icons'\n\nconst ChatLoader = props => {\n    function useOnScreen(ref) {\n        const [isIntersecting, setIntersecting] = useState(false)\n      \n        const observer = new IntersectionObserver(\n            ([entry]) => {\n                setIntersecting(entry.isIntersecting)\n                if (entry.isIntersecting) {\n                    props.onVisible()\n                }\n            }\n        )\n      \n        useEffect(() => {\n          observer.observe(ref.current)\n          // Remove the observer as soon as the component is unmounted\n          return () => { observer.disconnect() }\n        }, [])\n      \n        return isIntersecting\n    }\n  \n    const ref = useRef()\n    const isVisible = useOnScreen(ref)\n    \n    return (\n        <div ref={ref}>\n            <div style={{ textAlign: 'center', backgroundColor: '#e2e2e2', margin: '4px', borderRadius: '4px' }}>\n                <LoadingOutlined style={{ fontSize: '21px', padding: '24px' }} />\n            </div>\n        </div>\n    )\n}\n\nexport default ChatLoader","import React, { useState, useContext } from 'react'\n\nimport { CloseOutlined } from '@ant-design/icons'\n\nimport { ChatEngineContext } from '../../../Context'\n\nimport { newChat, Button, TextInput } from 'react-chat-engine'\n\nconst NewChatForm = (props) => {\n  const { conn } = useContext(ChatEngineContext)\n  const [value, setValue] = useState('')\n  const [selected, setSelected] = useState(false)\n  \n  function handleChange(event) {\n    setValue(event.target.value)\n  }\n\n  function handleSubmit(event) {\n    event.preventDefault()\n\n    if (conn && value.trim().length > 0) {\n      newChat(\n        conn,\n        { title: value },\n        () => setSelected(false)\n      )\n    }\n\n    setValue('')\n  }\n\n  return (\n    <div>\n      {\n        props.onClose && \n        <div style={{ height: '0px' }}>\n          <CloseOutlined\n            style={styles.closeIcon}\n            onClick={() => props.onClose()}\n          />\n        </div>\n      }\n\n      <div\n        className='ce-chat-form-container' \n        style={{\n          ...styles.newChatContainer,\n          ...{ marginLeft: props.onClose ? '40px' : '0px' }\n        }}\n      >\n        {\n          selected ?\n          <form onSubmit={handleSubmit.bind(this)}> \n              <TextInput \n                autoFocus\n                label='Chat Title'\n                value={value}\n                id='ce-new-chat-title-field'\n                onBlur={() => setSelected(false)}\n                style={{ width: '100%' }}\n                handleChange={(e) => handleChange(e)}\n              />\n          </form>:\n          <div>\n            <div style={{ height: '0px' }}>\n              <div style={{ fontWeight: '600', fontSize: '24px', position: 'relative', top: '4px', width: 'calc(100% - 48px)' }}>\n                My Chats\n              </div>\n            </div>\n\n            <div style={{ width: '100%', textAlign: 'right' }}>\n              <Button \n                icon='plus'\n                id='new-chat-plus-button'\n                onClick={() => setSelected(true)}\n              />\n            </div>\n          </div>\n        }\n      </div>\n    </div>\n  )\n}\n\nexport default NewChatForm\n\nconst styles = {\n  closeIcon: {\n    position: 'relative',\n    top: '26px',\n    left: '18px',\n    fontSize: '16px',\n  },\n  newChatContainer: { \n    padding: '16px 14px',\n    backgroundColor: 'white'\n  }\n}","import React from 'react'\n\nconst ChatCard = () => {\n    return (\n        <div \n            style={styles.chatContainer}\n            className='ce-chat-card ce-chat-card-loading'\n        >\n            <div \n                style={{...styles.titleText, ...{ animation: `spin 2s linear infinite` }}}\n                className='ce-chat-title-text'\n                id={`ce-chat-card-title-loading`}\n            >\n                <div \n                    className='ce-chat-card-loading-bar'\n                    style={{ \n                        ...styles.loadingBar,\n                        ...{ marginBottom: '8px', height: '16px', width: '100%' }\n                    }} \n                />\n            </div>\n\n            <div style={{ width: '100%' }} className='ce-chat-subtitle'>\n                <div style={styles.messageText} className='ce-chat-subtitle-text ce-chat-subtitle-message'>\n                    <div \n                        className='ce-chat-card-loading-bar'\n                        style={{ \n                            ...styles.loadingBar,\n                            ...{ width: '45%' }\n                        }} \n                    />\n                </div>\n\n                <div \n                    className='ce-chat-card-loading-bar'\n                    style={{ \n                        ...styles.loadingBar,\n                        ...{ float: 'right', marginTop: '6px', width: '20%' }\n                    }} \n                />\n            </div>\n        </div>\n    )\n}\n\nconst styles={\n    chatContainer: { \n        padding: '16px', \n        paddingBottom: '12px',\n        cursor: 'pointer'\n    },\n    titleText: { \n        fontWeight: '500',\n        paddingBottom: '4px', \n        whiteSpace: 'nowrap', \n        overflow: 'hidden' \n    },\n    messageText: {\n        width: '75%',\n        color: 'rgba(153, 153, 153, 1)', \n        fontSize: '14px', \n        whiteSpace: 'nowrap', \n        overflow: 'hidden',\n        display: 'inline-block'\n    },\n    loadingBar: {\n        borderRadius: '4px',\n        backgroundColor: '#e2e2e2', \n        height: '12px', \n        display: 'inline-block'\n    }\n}\n\nexport default ChatCard;\n","import React from 'react';\nimport { useSpring } from 'react-spring';\n\nexport default function useBoop({\n    x = 0,\n    y = 0,\n    rotation = 0,\n    scale = 1,\n    timing = 150,\n    springConfig = {\n        tension: 300,\n        friction: 10,\n    },\n    width = 'auto'\n}) {\n    const [isBooped, setIsBooped] = React.useState(false);\n    const style = useSpring({\n        display: 'inline-block',\n        backfaceVisibility: 'hidden',\n        transform: isBooped\n        ? `translate(${x}px, ${y}px)\n            rotate(${rotation}deg)\n            scale(${scale})`\n        : `translate(0px, 0px)\n            rotate(0deg)\n            scale(1)`,\n        config: springConfig,\n        width: width,\n    });\n    React.useEffect(() => {\n        if (!isBooped) { return; }\n        const timeoutId = window.setTimeout(() => {\n            setIsBooped(false);\n        }, timing);\n        return () => { window.clearTimeout(timeoutId); };\n    }, [isBooped]);\n    const trigger = React.useCallback(() => {\n        setIsBooped(true);\n    }, []);\n    return [style, trigger];\n}","import React from 'react';\nimport { animated } from 'react-spring';\nimport useBoop from './useBoop';\n\nconst Boop = ({ children, triggers=[], ...boopConfig }) => {\n  const [style, trigger] = useBoop(boopConfig);\n\n  function isTriggerPresent(trigger) {\n    return triggers.indexOf(trigger) !== -1\n  }\n\n  return (\n    <animated.span \n      style={style}\n      onClick={() => isTriggerPresent('onClick') && trigger()}\n      onMouseEnter={() => isTriggerPresent('onMouseEnter') && trigger()} \n      onMouseLeave={() => isTriggerPresent('onMouseLeave') && trigger()} \n    >\n      {children}\n    </animated.span>\n  );\n};\n\nexport default Boop","import React, { useContext } from 'react'\n\nimport { ChatEngineContext } from 'react-chat-engine'\n\nimport _ from 'lodash'\n\nimport Loading from './Loading'\n\nimport { Boop } from '../../components/Effects'\n\nimport { getDateTime } from '../../Utilities/timezone'\n\nconst { htmlToText } = require('html-to-text')\n\nconst ChatCard = props => {\n    const { chat } = props\n    const { conn, activeChat, setActiveChat } = useContext(ChatEngineContext)\n\n    if (_.isEmpty(chat) || props.loading) return <Loading />\n    if (!conn || conn === null) return <div/>\n\n    const extraStyle = activeChat === chat.id ? styles.activeChat : {}\n    const otherPerson = chat.people.find(person => conn.userName !== person.person.username);\n    const title = chat.is_direct_chat && otherPerson ? otherPerson.person.username : chat.title\n    \n    let lastMessage = htmlToText(chat.last_message.text, {})\n    if (!lastMessage) {\n        lastMessage = chat.last_message.attachments.length > 0 ?\n        `${chat.last_message.attachments.length} image${chat.last_message.attachments.length > 1 ? 's' : ''}` :\n        'Say hello!'\n    }\n\n    function didReadLastMessage(chat) {\n        let didReadLastMessage = true\n        chat.people.map(chat_person => {\n            if(conn.userName === chat_person.person.username) {\n                didReadLastMessage = chat.last_message.id === chat_person.last_read\n            }\n        })\n        return didReadLastMessage\n    }\n\n    function daySinceSent(date) {\n        if (!date) return ''\n        return getDateTime(date, conn.offset).toString().substr(4, 6)\n    }\n\n    return (\n        <Boop triggers={['onClick', 'onMouseEnter']} x={3} timing={60} width={'-webkit-fill-available'}>\n            <div \n                onClick={() => setActiveChat(chat.id)}\n                style={{ ...styles.chatContainer, ...extraStyle }}\n                className={`ce-chat-card ${activeChat === chat.id && 'ce-active-chat-card'}`}\n            >\n                <div \n                    style={ styles.titleText }\n                    className='ce-chat-title-text'\n                    id={`ce-chat-card-title-${title}`}\n                >\n                    <div \n                        style={{ \n                            width: !didReadLastMessage(chat) && 'calc(100% - 18px)', \n                            overflowX: 'hidden', \n                            display: 'inline-block' \n                        }}\n                    >\n                        { title }\n                    </div>\n                    \n                    {\n                        !didReadLastMessage(chat) &&\n                        <div \n                            className='ce-chat-unread-dot'\n                            style={{ \n                                marginTop: '5px',\n                                width: '12px',\n                                height: '12px',\n                                borderRadius: '6px',\n                                backgroundColor: '#1890ff',\n                                float: 'right', \n                                display: 'inline-block'\n                            }} \n                        />\n                    }\n                </div>\n\n                <div style={{ width: '100%' }} className='ce-chat-subtitle'>\n                    <div style={styles.messageText} className='ce-chat-subtitle-text ce-chat-subtitle-message'>\n                        { lastMessage }\n                    </div>\n\n                    <div \n                        className='ce-chat-subtitle-text ce-chat-subtitle-date'\n                        style={{ ...styles.messageText, ...{ textAlign: 'right', width: '25%' } }}\n                    >\n                        { daySinceSent(chat.last_message.created) }\n                    </div>\n                </div>\n            </div>\n        </Boop>\n    )\n}\n\nconst styles={\n    chatContainer: { \n        padding: '16px', \n        paddingBottom: '12px',\n        cursor: 'pointer'\n    },\n    titleText: { \n        fontWeight: '500',\n        paddingBottom: '4px', \n        whiteSpace: 'nowrap', \n        overflow: 'hidden' \n    },\n    messageText: {\n        width: '75%',\n        color: 'rgba(153, 153, 153, 1)', \n        fontSize: '14px', \n        whiteSpace: 'nowrap', \n        overflow: 'hidden',\n        display: 'inline-block'\n    },\n    activeChat: {\n        backgroundColor: '#d9d9d9',\n        border: '0px solid white',\n        borderRadius: '12px'\n    },\n}\n\nexport default ChatCard;\n","import React, { useContext, useEffect, useRef, useState } from 'react'\n\nimport { ChatEngineContext, getLatestChats, getChatsBefore } from 'react-chat-engine'\n\nimport { getDateTime } from '../Utilities/timezone'\n\nimport _ from 'lodash'\n\nimport ChatLoader from './ChatLoader'\nimport NewChatForm from './NewChatForm'\nimport ChatCard from './ChatCard'\n\nconst interval = 33\n\nconst ChatList = props => {\n    const didMountRef = useRef(false)\n    const [loadChats, setLoadChats] = useState(false) // true, false, or loading\n    const [hasMoreChats, setHasMoreChats] = useState(true)\n    const { conn, chats, setChats, setActiveChat } = useContext(ChatEngineContext)\n\n    const chatList = sortChats(\n        chats ? \n        Object.values(chats) : \n        [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}]\n    )\n\n    useEffect(() => {\n        if (!didMountRef.current) {\n            didMountRef.current = true\n\n            getLatestChats(\n                props, \n                interval, \n                (chats) => {\n                    onGetChats(chats)\n                    chats.length > 0 && setActiveChat(chats[0].id)\n                }\n            )\n        }\n    })\n\n    useEffect(() => {\n        if (!loadChats || loadChats === 'loading') return;\n        setLoadChats('loading')\n\n        const chatList = chats !== null ? sortChats(Object.values(chats)) : []\n        if (chatList.length > 0) {\n            const before = chatList[chatList.length - 1].created\n            getChatsBefore(props, before, interval, (chats) => onGetChats(chats))\n        }\n    }, [loadChats])\n\n    function sortChats(chats) {\n        return chats.sort((a, b) => { \n            const aDate = a.last_message && a.last_message.created ? getDateTime(a.last_message.created, props.offset) : getDateTime(a.created, props.offset)\n            const bDate = b.last_message && b.last_message.created ? getDateTime(b.last_message.created, props.offset) : getDateTime(b.created, props.offset)\n            return new Date(bDate) - new Date(aDate); \n        })\n    }\n\n    function onGetChats(chatList) {\n        setLoadChats(false)\n        const oldChats = chats !== null ? chats : {}\n        const newChats = _.mapKeys({...chatList}, 'id')\n        const allChats = {...oldChats, ...newChats}\n        setChats(allChats);\n        interval > chatList.length && setHasMoreChats(false);\n    }\n\n    function renderChats(chats) {\n        return chats.map((chat, index) => {\n            if (!chat) {\n                return <div key={`chat_${index}`} />\n\n            } else if (props.renderChatCard) {\n                return <div key={`chat_${index}`}>{props.renderChatCard(chat, index)}</div>\n                \n            } else {\n                return (\n                    <div \n                        key={`chat_${index}`}\n                        onClick={() => props.onChatClick && props.onChatClick(chat.id)}\n                    >\n                        <ChatCard chat={chat} />\n                    </div>\n                )\n            }\n        })\n    }\n\n    return (\n        <div style={styles.chatListContainer} className='ce-chat-list'>\n            <div style={styles.chatsContainer} className='ce-chats-container'>\n                { \n                    props.renderNewChatForm ? \n                    props.renderNewChatForm(conn) : \n                    <NewChatForm onClose={props.onClose ? () => props.onClose() : undefined} /> \n                }\n\n                { renderChats(chatList) } \n\n                { \n                    hasMoreChats && chatList.length > 0 &&\n                    <div>\n                        <ChatLoader \n                            onVisible={() => !loadChats && setLoadChats(true)} />\n                        <div style={{  height: '8px' }} />\n                    </div>\n                }\n            </div>\n        </div>\n    )\n}\n\nconst styles={\n    chatListContainer: { \n        height: '100%', \n        maxHeight: '100vh', \n        overflow: 'scroll', \n        overflowX: 'hidden',\n        borderRight: '1px solid #afafaf', \n        backgroundColor: 'white',\n        fontFamily: 'Avenir'\n    },\n    chatsContainer: { \n        width: '100%', \n        height: '100%',\n        backgroundColor: 'white', \n        borderRadius: '0px 0px 24px 24px'\n    },\n}\n\nexport default ChatList;\n","import React from 'react'\n\nconst AuthFail = (props) => {\n    const project = props.projectID ? props.projectID : props.publicKey\n    return (\n        <div\n            id='ce-login-fail-breaker' \n            style={{ width: '100%', textAlign: 'center', paddingTop: 'calc(50% - 112px)' }}\n        >\n            <div \n                id='ce-login-fail-text' \n                style={{ color: '#afafaf', fontWeight: '600', fontSize: '14px', marginBottom: '6px', marginRight: '32px', marginLeft: '32px' }}\n            >\n                Your credentials are incorrect. Make sure your Project ID, Username, and Password are correct <a href={`https://chatengine.io/projects/${project}`}>here</a>.\n            </div>\n\n            <img\n                id='ce-login-fail-gif' \n                style={{ width: '50%', maxWidth: '200px' }}\n                src='https://chat-engine-assets.s3.amazonaws.com/welcome_gifs/no.gif'\n                alt='chat-engine-login-fail'\n            />\n        </div>   \n    )\n}\n\nexport default AuthFail","import React from 'react'\n\nconst CreateChat = () => {\n    return (\n        <div\n            id='ce-ice-breaker' \n            style={{ width: '100%', textAlign: 'center', paddingTop: 'calc(43% - 112px)' }}\n        >\n            <div \n                id='ce-ice-breaker-text' \n                style={{ color: '#afafaf', fontWeight: '600', marginBottom: '6px' }}\n            >\n                Welcome!\n            </div>\n            <div \n                id='ce-ice-breaker-text' \n                style={{ color: '#afafaf' }}\n            >\n                Create a new chat to get started.\n            </div>\n\n            <img\n                id='ce-ice-breaker-gif' \n                style={{ width: '50%', maxWidth: '200px' }}\n                src='https://chat-engine-assets.s3.amazonaws.com/welcome_gifs/okay.gif'\n                alt='chat-engine-ice-breaker'\n            />\n        </div>   \n    )\n}\n\nexport default CreateChat\n","import React, { useContext } from 'react'\n\nimport { ChatEngineContext } from 'react-chat-engine'\n\nconst IceBreaker = () => {\n    const { activeChat }= useContext(ChatEngineContext)\n    const gifs = [\n        'https://chat-engine-assets.s3.amazonaws.com/welcome_gifs/peace.gif',\n        'https://chat-engine-assets.s3.amazonaws.com/welcome_gifs/thumbsup.gif',\n    ]\n    const gif = gifs[(activeChat ? activeChat : 0) % gifs.length]\n\n    return (\n        <div\n            id='ce-ice-breaker' \n            style={{ width: '100%', textAlign: 'center', paddingTop: 'calc(43% - 112px)' }}\n        >\n            <div \n                id='ce-ice-breaker-text' \n                style={{ color: '#afafaf', fontWeight: '600', fontSize: '14px', marginBottom: '6px' }}\n            >\n                No messages here yet...\n            </div>\n\n            <img\n                id='ce-ice-breaker-gif' \n                style={{ width: '50%', maxWidth: '200px' }}\n                src={gif}\n                alt='chat-engine-ice-breaker'\n            />\n        </div>   \n    )\n}\n\nexport default IceBreaker\n","import React, { useState, useRef, useEffect, useContext } from 'react'\n\nimport { ChatEngineContext } from '../../../Context'\n\nconst RenderTrigger = props => {\n    const { setLoadMoreMessages } = useContext(ChatEngineContext)\n\n    function useOnScreen(ref) {\n        const [isIntersecting, setIntersecting] = useState(false)\n      \n        const observer = new IntersectionObserver(\n            ([entry]) => {\n                setIntersecting(entry.isIntersecting)\n                \n                if (entry.isIntersecting) { \n                    props.onEnter && props.onEnter()\n                } else {\n                    props.onLeave && props.onLeave()\n                }\n            }\n        )\n      \n        useEffect(() => {\n          observer.observe(ref.current)\n          // Remove the observer as soon as the component is unmounted\n          return () => { observer.disconnect() }\n        }, [])\n      \n        return isIntersecting\n    }\n  \n    const ref = useRef()\n    const isVisible = useOnScreen(ref)\n    \n    return <div ref={ref} id={props.id}>{props.children}</div>\n}\n\nexport default RenderTrigger","import React, { useState, useContext } from 'react'\n\nimport { MenuOutlined } from '@ant-design/icons'\n\nimport { ChatEngineContext } from '../../../Context'\n\nimport ChatList from '../../ChatList'\n\nconst ChatListDrawer = props => {\n    const [isOpen, setIsOpen] = useState(false)\n    const context = useContext(ChatEngineContext)\n    const allProps = {...props, ...context.conn}\n\n    return (\n        <div> \n            <MenuOutlined\n                onClick={() => setIsOpen(true)}\n                style={{ color: 'rgb(24, 144, 255)', outline: 'none' }} \n            />\n\n            { \n                isOpen &&\n                <div style={styles.drawerContainer}>\n                    {\n                        context.conn !== null && context.conn.renderChatList ?\n                        context.conn.renderChatList(context) :\n                        <ChatList \n                            {...allProps} \n                            onClose={() => setIsOpen(false)} \n                            onChatClick={() => setIsOpen(false)} \n                        />\n                    }\n                </div>\n            }\n        </div>\n    )\n}\n\nexport default ChatListDrawer\n\nconst styles = {\n    drawerContainer: { \n        position: 'fixed',\n        zIndex: '1',\n        top: '0px',\n        left: '0px',\n        width: '100%',\n        height: '100%',\n        backgroundColor: 'white',\n        textAlign: 'left'\n    },\n    titleContainer: {\n        width: '100%',\n        padding: '24px 0px',\n        textAlign: 'center',\n        color: 'rgb(24, 144, 255)',\n    },\n    titleText: {\n        fontSize: '24px',\n        fontWeight: '600',\n    }\n}\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","/** @license React v16.13.1\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n\n\nif (process.env.NODE_ENV !== \"production\") {\n  (function() {\n'use strict';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n  return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n  type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n  if (typeof object === 'object' && object !== null) {\n    var $$typeof = object.$$typeof;\n\n    switch ($$typeof) {\n      case REACT_ELEMENT_TYPE:\n        var type = object.type;\n\n        switch (type) {\n          case REACT_ASYNC_MODE_TYPE:\n          case REACT_CONCURRENT_MODE_TYPE:\n          case REACT_FRAGMENT_TYPE:\n          case REACT_PROFILER_TYPE:\n          case REACT_STRICT_MODE_TYPE:\n          case REACT_SUSPENSE_TYPE:\n            return type;\n\n          default:\n            var $$typeofType = type && type.$$typeof;\n\n            switch ($$typeofType) {\n              case REACT_CONTEXT_TYPE:\n              case REACT_FORWARD_REF_TYPE:\n              case REACT_LAZY_TYPE:\n              case REACT_MEMO_TYPE:\n              case REACT_PROVIDER_TYPE:\n                return $$typeofType;\n\n              default:\n                return $$typeof;\n            }\n\n        }\n\n      case REACT_PORTAL_TYPE:\n        return $$typeof;\n    }\n  }\n\n  return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n  {\n    if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n      hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n      console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n    }\n  }\n\n  return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n  return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n  return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n  return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n  return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n  return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n  return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n  return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n  return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n  return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n  return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n  return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n  return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n  })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-is.production.min.js');\n} else {\n  module.exports = require('./cjs/react-is.development.js');\n}\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc');  // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n  var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n  var loggedTypeFailures = {};\n  var has = Function.call.bind(Object.prototype.hasOwnProperty);\n\n  printWarning = function(text) {\n    var message = 'Warning: ' + text;\n    if (typeof console !== 'undefined') {\n      console.error(message);\n    }\n    try {\n      // --- Welcome to debugging React ---\n      // This error was thrown as a convenience so that you can use this stack\n      // to find the callsite that caused this warning to fire.\n      throw new Error(message);\n    } catch (x) {}\n  };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n  if (process.env.NODE_ENV !== 'production') {\n    for (var typeSpecName in typeSpecs) {\n      if (has(typeSpecs, typeSpecName)) {\n        var error;\n        // Prop type validation may throw. In case they do, we don't want to\n        // fail the render phase where it didn't fail before. So we log it.\n        // After these have been cleaned up, we'll let them throw.\n        try {\n          // This is intentionally an invariant that gets caught. It's the same\n          // behavior as without this statement except with a better message.\n          if (typeof typeSpecs[typeSpecName] !== 'function') {\n            var err = Error(\n              (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n              'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'\n            );\n            err.name = 'Invariant Violation';\n            throw err;\n          }\n          error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n        } catch (ex) {\n          error = ex;\n        }\n        if (error && !(error instanceof Error)) {\n          printWarning(\n            (componentName || 'React class') + ': type specification of ' +\n            location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n            'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n            'You may have forgotten to pass an argument to the type checker ' +\n            'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n            'shape all require an argument).'\n          );\n        }\n        if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n          // Only monitor this failure once because there tends to be a lot of the\n          // same error.\n          loggedTypeFailures[error.message] = true;\n\n          var stack = getStack ? getStack() : '';\n\n          printWarning(\n            'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n          );\n        }\n      }\n    }\n  }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n  if (process.env.NODE_ENV !== 'production') {\n    loggedTypeFailures = {};\n  }\n}\n\nmodule.exports = checkPropTypes;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactIs = require('react-is');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar has = Function.call.bind(Object.prototype.hasOwnProperty);\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n  printWarning = function(text) {\n    var message = 'Warning: ' + text;\n    if (typeof console !== 'undefined') {\n      console.error(message);\n    }\n    try {\n      // --- Welcome to debugging React ---\n      // This error was thrown as a convenience so that you can use this stack\n      // to find the callsite that caused this warning to fire.\n      throw new Error(message);\n    } catch (x) {}\n  };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n  return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n  /* global Symbol */\n  var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n  var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n  /**\n   * Returns the iterator method function contained on the iterable object.\n   *\n   * Be sure to invoke the function with the iterable as context:\n   *\n   *     var iteratorFn = getIteratorFn(myIterable);\n   *     if (iteratorFn) {\n   *       var iterator = iteratorFn.call(myIterable);\n   *       ...\n   *     }\n   *\n   * @param {?object} maybeIterable\n   * @return {?function}\n   */\n  function getIteratorFn(maybeIterable) {\n    var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n    if (typeof iteratorFn === 'function') {\n      return iteratorFn;\n    }\n  }\n\n  /**\n   * Collection of methods that allow declaration and validation of props that are\n   * supplied to React components. Example usage:\n   *\n   *   var Props = require('ReactPropTypes');\n   *   var MyArticle = React.createClass({\n   *     propTypes: {\n   *       // An optional string prop named \"description\".\n   *       description: Props.string,\n   *\n   *       // A required enum prop named \"category\".\n   *       category: Props.oneOf(['News','Photos']).isRequired,\n   *\n   *       // A prop named \"dialog\" that requires an instance of Dialog.\n   *       dialog: Props.instanceOf(Dialog).isRequired\n   *     },\n   *     render: function() { ... }\n   *   });\n   *\n   * A more formal specification of how these methods are used:\n   *\n   *   type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n   *   decl := ReactPropTypes.{type}(.isRequired)?\n   *\n   * Each and every declaration produces a function with the same signature. This\n   * allows the creation of custom validation functions. For example:\n   *\n   *  var MyLink = React.createClass({\n   *    propTypes: {\n   *      // An optional string or URI prop named \"href\".\n   *      href: function(props, propName, componentName) {\n   *        var propValue = props[propName];\n   *        if (propValue != null && typeof propValue !== 'string' &&\n   *            !(propValue instanceof URI)) {\n   *          return new Error(\n   *            'Expected a string or an URI for ' + propName + ' in ' +\n   *            componentName\n   *          );\n   *        }\n   *      }\n   *    },\n   *    render: function() {...}\n   *  });\n   *\n   * @internal\n   */\n\n  var ANONYMOUS = '<<anonymous>>';\n\n  // Important!\n  // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n  var ReactPropTypes = {\n    array: createPrimitiveTypeChecker('array'),\n    bool: createPrimitiveTypeChecker('boolean'),\n    func: createPrimitiveTypeChecker('function'),\n    number: createPrimitiveTypeChecker('number'),\n    object: createPrimitiveTypeChecker('object'),\n    string: createPrimitiveTypeChecker('string'),\n    symbol: createPrimitiveTypeChecker('symbol'),\n\n    any: createAnyTypeChecker(),\n    arrayOf: createArrayOfTypeChecker,\n    element: createElementTypeChecker(),\n    elementType: createElementTypeTypeChecker(),\n    instanceOf: createInstanceTypeChecker,\n    node: createNodeChecker(),\n    objectOf: createObjectOfTypeChecker,\n    oneOf: createEnumTypeChecker,\n    oneOfType: createUnionTypeChecker,\n    shape: createShapeTypeChecker,\n    exact: createStrictShapeTypeChecker,\n  };\n\n  /**\n   * inlined Object.is polyfill to avoid requiring consumers ship their own\n   * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n   */\n  /*eslint-disable no-self-compare*/\n  function is(x, y) {\n    // SameValue algorithm\n    if (x === y) {\n      // Steps 1-5, 7-10\n      // Steps 6.b-6.e: +0 != -0\n      return x !== 0 || 1 / x === 1 / y;\n    } else {\n      // Step 6.a: NaN == NaN\n      return x !== x && y !== y;\n    }\n  }\n  /*eslint-enable no-self-compare*/\n\n  /**\n   * We use an Error-like object for backward compatibility as people may call\n   * PropTypes directly and inspect their output. However, we don't use real\n   * Errors anymore. We don't inspect their stack anyway, and creating them\n   * is prohibitively expensive if they are created too often, such as what\n   * happens in oneOfType() for any type before the one that matched.\n   */\n  function PropTypeError(message) {\n    this.message = message;\n    this.stack = '';\n  }\n  // Make `instanceof Error` still work for returned errors.\n  PropTypeError.prototype = Error.prototype;\n\n  function createChainableTypeChecker(validate) {\n    if (process.env.NODE_ENV !== 'production') {\n      var manualPropTypeCallCache = {};\n      var manualPropTypeWarningCount = 0;\n    }\n    function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n      componentName = componentName || ANONYMOUS;\n      propFullName = propFullName || propName;\n\n      if (secret !== ReactPropTypesSecret) {\n        if (throwOnDirectAccess) {\n          // New behavior only for users of `prop-types` package\n          var err = new Error(\n            'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n            'Use `PropTypes.checkPropTypes()` to call them. ' +\n            'Read more at http://fb.me/use-check-prop-types'\n          );\n          err.name = 'Invariant Violation';\n          throw err;\n        } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n          // Old behavior for people using React.PropTypes\n          var cacheKey = componentName + ':' + propName;\n          if (\n            !manualPropTypeCallCache[cacheKey] &&\n            // Avoid spamming the console because they are often not actionable except for lib authors\n            manualPropTypeWarningCount < 3\n          ) {\n            printWarning(\n              'You are manually calling a React.PropTypes validation ' +\n              'function for the `' + propFullName + '` prop on `' + componentName  + '`. This is deprecated ' +\n              'and will throw in the standalone `prop-types` package. ' +\n              'You may be seeing this warning due to a third-party PropTypes ' +\n              'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n            );\n            manualPropTypeCallCache[cacheKey] = true;\n            manualPropTypeWarningCount++;\n          }\n        }\n      }\n      if (props[propName] == null) {\n        if (isRequired) {\n          if (props[propName] === null) {\n            return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n          }\n          return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n        }\n        return null;\n      } else {\n        return validate(props, propName, componentName, location, propFullName);\n      }\n    }\n\n    var chainedCheckType = checkType.bind(null, false);\n    chainedCheckType.isRequired = checkType.bind(null, true);\n\n    return chainedCheckType;\n  }\n\n  function createPrimitiveTypeChecker(expectedType) {\n    function validate(props, propName, componentName, location, propFullName, secret) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== expectedType) {\n        // `propValue` being instance of, say, date/regexp, pass the 'object'\n        // check, but we can offer a more precise error message here rather than\n        // 'of type `object`'.\n        var preciseType = getPreciseType(propValue);\n\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createAnyTypeChecker() {\n    return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n  }\n\n  function createArrayOfTypeChecker(typeChecker) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (typeof typeChecker !== 'function') {\n        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n      }\n      var propValue = props[propName];\n      if (!Array.isArray(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n      }\n      for (var i = 0; i < propValue.length; i++) {\n        var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n        if (error instanceof Error) {\n          return error;\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createElementTypeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      if (!isValidElement(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createElementTypeTypeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      if (!ReactIs.isValidElementType(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createInstanceTypeChecker(expectedClass) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (!(props[propName] instanceof expectedClass)) {\n        var expectedClassName = expectedClass.name || ANONYMOUS;\n        var actualClassName = getClassName(props[propName]);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createEnumTypeChecker(expectedValues) {\n    if (!Array.isArray(expectedValues)) {\n      if (process.env.NODE_ENV !== 'production') {\n        if (arguments.length > 1) {\n          printWarning(\n            'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n            'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n          );\n        } else {\n          printWarning('Invalid argument supplied to oneOf, expected an array.');\n        }\n      }\n      return emptyFunctionThatReturnsNull;\n    }\n\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      for (var i = 0; i < expectedValues.length; i++) {\n        if (is(propValue, expectedValues[i])) {\n          return null;\n        }\n      }\n\n      var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n        var type = getPreciseType(value);\n        if (type === 'symbol') {\n          return String(value);\n        }\n        return value;\n      });\n      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createObjectOfTypeChecker(typeChecker) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (typeof typeChecker !== 'function') {\n        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n      }\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n      }\n      for (var key in propValue) {\n        if (has(propValue, key)) {\n          var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n          if (error instanceof Error) {\n            return error;\n          }\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createUnionTypeChecker(arrayOfTypeCheckers) {\n    if (!Array.isArray(arrayOfTypeCheckers)) {\n      process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n      return emptyFunctionThatReturnsNull;\n    }\n\n    for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n      var checker = arrayOfTypeCheckers[i];\n      if (typeof checker !== 'function') {\n        printWarning(\n          'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n          'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n        );\n        return emptyFunctionThatReturnsNull;\n      }\n    }\n\n    function validate(props, propName, componentName, location, propFullName) {\n      for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n        var checker = arrayOfTypeCheckers[i];\n        if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n          return null;\n        }\n      }\n\n      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createNodeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (!isNode(props[propName])) {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createShapeTypeChecker(shapeTypes) {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n      }\n      for (var key in shapeTypes) {\n        var checker = shapeTypes[key];\n        if (!checker) {\n          continue;\n        }\n        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n        if (error) {\n          return error;\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createStrictShapeTypeChecker(shapeTypes) {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n      }\n      // We need to check all keys in case some are required but missing from\n      // props.\n      var allKeys = assign({}, props[propName], shapeTypes);\n      for (var key in allKeys) {\n        var checker = shapeTypes[key];\n        if (!checker) {\n          return new PropTypeError(\n            'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n            '\\nBad object: ' + JSON.stringify(props[propName], null, '  ') +\n            '\\nValid keys: ' +  JSON.stringify(Object.keys(shapeTypes), null, '  ')\n          );\n        }\n        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n        if (error) {\n          return error;\n        }\n      }\n      return null;\n    }\n\n    return createChainableTypeChecker(validate);\n  }\n\n  function isNode(propValue) {\n    switch (typeof propValue) {\n      case 'number':\n      case 'string':\n      case 'undefined':\n        return true;\n      case 'boolean':\n        return !propValue;\n      case 'object':\n        if (Array.isArray(propValue)) {\n          return propValue.every(isNode);\n        }\n        if (propValue === null || isValidElement(propValue)) {\n          return true;\n        }\n\n        var iteratorFn = getIteratorFn(propValue);\n        if (iteratorFn) {\n          var iterator = iteratorFn.call(propValue);\n          var step;\n          if (iteratorFn !== propValue.entries) {\n            while (!(step = iterator.next()).done) {\n              if (!isNode(step.value)) {\n                return false;\n              }\n            }\n          } else {\n            // Iterator will provide entry [k,v] tuples rather than values.\n            while (!(step = iterator.next()).done) {\n              var entry = step.value;\n              if (entry) {\n                if (!isNode(entry[1])) {\n                  return false;\n                }\n              }\n            }\n          }\n        } else {\n          return false;\n        }\n\n        return true;\n      default:\n        return false;\n    }\n  }\n\n  function isSymbol(propType, propValue) {\n    // Native Symbol.\n    if (propType === 'symbol') {\n      return true;\n    }\n\n    // falsy value can't be a Symbol\n    if (!propValue) {\n      return false;\n    }\n\n    // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n    if (propValue['@@toStringTag'] === 'Symbol') {\n      return true;\n    }\n\n    // Fallback for non-spec compliant Symbols which are polyfilled.\n    if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n      return true;\n    }\n\n    return false;\n  }\n\n  // Equivalent of `typeof` but with special handling for array and regexp.\n  function getPropType(propValue) {\n    var propType = typeof propValue;\n    if (Array.isArray(propValue)) {\n      return 'array';\n    }\n    if (propValue instanceof RegExp) {\n      // Old webkits (at least until Android 4.0) return 'function' rather than\n      // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n      // passes PropTypes.object.\n      return 'object';\n    }\n    if (isSymbol(propType, propValue)) {\n      return 'symbol';\n    }\n    return propType;\n  }\n\n  // This handles more types than `getPropType`. Only used for error messages.\n  // See `createPrimitiveTypeChecker`.\n  function getPreciseType(propValue) {\n    if (typeof propValue === 'undefined' || propValue === null) {\n      return '' + propValue;\n    }\n    var propType = getPropType(propValue);\n    if (propType === 'object') {\n      if (propValue instanceof Date) {\n        return 'date';\n      } else if (propValue instanceof RegExp) {\n        return 'regexp';\n      }\n    }\n    return propType;\n  }\n\n  // Returns a string that is postfixed to a warning about an invalid type.\n  // For example, \"undefined\" or \"of type array\"\n  function getPostfixForTypeWarning(value) {\n    var type = getPreciseType(value);\n    switch (type) {\n      case 'array':\n      case 'object':\n        return 'an ' + type;\n      case 'boolean':\n      case 'date':\n      case 'regexp':\n        return 'a ' + type;\n      default:\n        return type;\n    }\n  }\n\n  // Returns class name of the object, if any.\n  function getClassName(propValue) {\n    if (!propValue.constructor || !propValue.constructor.name) {\n      return ANONYMOUS;\n    }\n    return propValue.constructor.name;\n  }\n\n  ReactPropTypes.checkPropTypes = checkPropTypes;\n  ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n  ReactPropTypes.PropTypes = ReactPropTypes;\n\n  return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n  function shim(props, propName, componentName, location, propFullName, secret) {\n    if (secret === ReactPropTypesSecret) {\n      // It is still safe when called from React.\n      return;\n    }\n    var err = new Error(\n      'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n      'Use PropTypes.checkPropTypes() to call them. ' +\n      'Read more at http://fb.me/use-check-prop-types'\n    );\n    err.name = 'Invariant Violation';\n    throw err;\n  };\n  shim.isRequired = shim;\n  function getShim() {\n    return shim;\n  };\n  // Important!\n  // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n  var ReactPropTypes = {\n    array: shim,\n    bool: shim,\n    func: shim,\n    number: shim,\n    object: shim,\n    string: shim,\n    symbol: shim,\n\n    any: shim,\n    arrayOf: getShim,\n    element: shim,\n    elementType: shim,\n    instanceOf: getShim,\n    node: shim,\n    objectOf: getShim,\n    oneOf: getShim,\n    oneOfType: getShim,\n    shape: getShim,\n    exact: getShim,\n\n    checkPropTypes: emptyFunctionWithReset,\n    resetWarningCache: emptyFunction\n  };\n\n  ReactPropTypes.PropTypes = ReactPropTypes;\n\n  return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n  var ReactIs = require('react-is');\n\n  // By explicitly using `prop-types` you are opting into new development behavior.\n  // http://fb.me/prop-types-in-prod\n  var throwOnDirectAccess = true;\n  module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n  // By explicitly using `prop-types` you are opting into new production behavior.\n  // http://fb.me/prop-types-in-prod\n  module.exports = require('./factoryWithThrowingShims')();\n}\n","import React, { useState } from 'react'\nimport PropTypes from 'prop-types'\n\nimport { removePerson } from 'react-chat-engine'\n\nimport { Avatar, Button } from 'react-chat-engine'\n\nconst PersonRow = props => {\n    const [selected, setSelected] = useState(false)\n\n    const { person, chat, conn } = props\n\n    if (!person || !chat) { return <div /> }\n\n    if (!conn || conn === null) return <div />\n\n    function onRemovePerson() {\n        removePerson(\n            props.conn,\n            props.chat.id,\n            props.person.username\n        )\n    }\n\n    function renderPersonText(person) {\n        if (person.first_name && person.first_name !== null) {\n            return `${person.first_name}${person.last_name ? ` ${person.last_name}` : ''}`\n        } else {\n            return person.username\n        }\n    }\n\n    return (\n        <div \n            className='ce-person-container'\n            onMouseEnter={() => setSelected(true)}\n            onMouseLeave={() => setSelected(false)}\n        >\n            <div \n                className='ce-person-avatar'\n                style={{ padding: '2px', height: '0px' }}\n            >\n                <Avatar \n                    avatar={person.avatar} \n                    username={person.username} \n                    is_online={person.is_online}\n                />\n            </div>\n\n            <div\n                className='ce-person-text'\n                style={{ paddingLeft: '52px', height: '44px', position: 'relative', top: '10px', fontSize: '15px' }}\n            >\n                { renderPersonText(person) }\n            </div>\n\n            {\n                selected && (conn.userName === chat.admin.username) && (person.username !== chat.admin.username) &&\n                <div\n                    className='ce-delete-chat' \n                    style={{ float: 'right', height: '0px', position: 'relative', bottom: '44px'}}\n                >\n                    <Button \n                        theme='danger'\n                        icon='delete'\n                        onClick={() => onRemovePerson()}\n                    />\n                </div>\n            }\n        </div>\n    )\n}\n\nexport default PersonRow\n\nPersonRow.propTypes = {\n    person: PropTypes.object.isRequired,\n    chat: PropTypes.object.isRequired,\n    conn: PropTypes.object,\n}","import React, { useState } from 'react'\nimport PropTypes from 'prop-types'\n\nimport { Avatar } from 'react-chat-engine'\n\n\nconst PersonOption = props => {\n    const [focused, setFocused] = useState(false)\n\n    const { avatar, username } = props.person \n\n    return (\n        <div \n            id={`ce-username-option-${username}`}\n            onMouseEnter={() => setFocused(true)}\n            onMouseLeave={() => setFocused(false)}\n            onClick={() => props.onClick && props.onClick()}\n            style={{ ...styles.option, ...{ backgroundColor: focused ? '#f5f5f5' : 'white'} }}\n        >\n            <div>\n                <Avatar username={username} avatar={avatar} />\n            </div>\n\n            <div style={{ display: 'flex', padding: '12px 4px' }}>\n                {props.person.username}\n            </div>\n        </div>\n    );\n}\n\nexport default PersonOption\n\nconst styles = {\n  option: {\n    padding: '4px 16px',\n    cursor: 'pointer',\n    fontSize: '15px',\n    display: 'flex'\n  },\n}\n\nPersonOption.propTypes = {\n    person: PropTypes.object.isRequired,\n}","import React, { useState } from 'react'\nimport PropTypes from 'prop-types'\n\nimport { addPerson, getOtherPeople } from 'react-chat-engine'\n\nimport { AutoCompleteInput } from 'react-chat-engine'\n\nimport PersonOption from './PersonOption'\n\nconst PersonForm = props => {\n  const [state, setState] = useState({\n    value: '',\n    others: []\n  })\n\n  function handleChange(value) {\n    setState({ ...state, value });\n  }\n\n  function invitePerson(name) {\n    addPerson(\n      props.conn,\n      props.chat.id,\n      name,\n      () => { \n        setState({ ...state, value: '' }); \n        getOthers(); \n      }\n    )\n  }\n\n  function getOthers() {\n    getOtherPeople(\n      props.conn,\n      props.chat.id,\n      (id, others) => setState({ ...state, others }),\n      () => {},\n    )\n  }\n\n  function renderOption(option) {\n    return <PersonOption person={option} onClick={() => invitePerson(option.username)} />\n  }\n\n  return (\n    <div style={{ marginBottom: '12px' }}>\n      <AutoCompleteInput \n        style={{ width: '100%' }}\n        label='Type a username'\n        value={state.value}\n        options={state.others}\n        onFocus={() => getOthers()}\n        handleChange={(value) => handleChange(value)} \n        renderOption={(option) => renderOption(option)}\n      />\n    </div>\n  )\n}\n\nexport default PersonForm\n\nPersonForm.propTypes = {\n  chat: PropTypes.object.isRequired,\n  conn: PropTypes.object.isRequired,\n}","import React, { useState } from 'react'\n\nimport { LeftOutlined } from '@ant-design/icons'\n\nconst SettingsBlock = (props) => {\n    const [collapsed, setCollapsed] = useState(true)\n    const [hovered, setHovered] = useState(false)\n\n    return (\n        <div style={{ borderTop: '1px solid #f0f0f0' }}>\n            <div \n                id={props.id}\n                className={props.className}\n                onMouseEnter={() => setHovered(true)}\n                onMouseLeave={() => setHovered(false)}\n                onClick={() => setCollapsed(!collapsed)}\n                style={{\n                    cursor: 'pointer',\n                    backgroundColor: hovered ? '#f0f0f0' : '#fff',\n                    transition: `background-color 100ms`,\n                }}\n            >\n                <div style={{ fontSize: '17px', padding: '12px', fontWeight: '600' }}>\n                    { props.label }\n                </div>\n\n                <LeftOutlined \n                    style={{\n                        float: 'right',\n                        position: 'relative',\n                        bottom: '30px',\n                        right: '12px',\n                        transform: collapsed ? `rotate(0deg)` : `rotate(-90deg)`,\n                        transition: `transform 100ms`,\n                    }} \n                /> \n            </div>\n\n            <div>\n                { !collapsed && props.children }\n            </div>\n        </div>\n    )\n}\n\nexport default SettingsBlock\n","import React, { useContext } from 'react'\n\nimport { ChatEngineContext } from 'react-chat-engine'\n\nimport PersonRow from './PersonRow'\nimport PersonForm from './PersonForm'\n\nimport SettingsBlock from '../SettingsBlock'\n\nconst PeopleSettings = () => {\n    const { conn, chats, activeChat } = useContext(ChatEngineContext)  \n    const chat = chats && chats[activeChat] \n\n    if (!chat || chat.is_direct_chat) { return <div /> }\n\n    function renderChatPeople(people, chat) {\n        return people.map((chatPerson, index) => {\n            return (\n                <PersonRow \n                    key={`person_${index}`} \n                    person={chatPerson.person}\n                    conn={conn} \n                    chat={chat} \n                />\n            )\n        })\n    }    \n\n    return (\n        <div \n            style={{ borderTop: '1px solid #f0f0f0' }}\n        >\n            <SettingsBlock\n                label='People'\n                className='ce-section-title-container ce-person-title-container'\n            >\n                <div>\n                    <div style={{ height: '12px' }} />\n\n                    { renderChatPeople(chat.people, chat) }\n\n                    <div style={{ height: '12px' }} />\n\n                    {\n                        conn && chat && conn.userName === chat.admin.username &&\n                        <PersonForm conn={conn} chat={chat} />\n                    }\n                </div>\n            </SettingsBlock>\n        </div>\n    )\n}\n\nexport default PeopleSettings\n","import React from 'react'\nimport PropTypes from 'prop-types'\n\nconst Thumbnail = props => {\n    const { attachment } = props \n\n    if (!attachment) { return <div /> }\n\n    return (\n        <div style={styles.container} className='ce-photo-thumbnail'>\n            <div style={{ paddingTop: '100%' }} />\n            \n            <img\n                alt={attachment.id}\n                style={styles.image}\n                src={attachment.file}\n                className='ce-photo-img'\n                id={`image-${attachment.id}`}\n            />\n        </div>\n    )\n}\n\nexport default Thumbnail\n\nconst styles = {\n    container: { \n        position: 'relative', \n        width: 'calc(33% - 8px)', \n        border: '1px solid white', \n        display: 'inline-block',\n        cursor: 'pointer'\n    },\n    image: {\n        top: '0px', \n        width: '100%', \n        height: '100%',\n        position: 'absolute',\n        objectFit: 'cover'\n    }\n}\n\nThumbnail.propTypes = {\n    attachment: PropTypes.object.isRequired,\n}","import React, { useContext } from 'react'\n\nimport { ChatEngineContext } from 'react-chat-engine'\n\nimport Thumbnail from './Thumbnail'\n\nimport SettingsBlock from '../SettingsBlock'\n\n\nconst PhotosSettings = () => {\n    const { chats, activeChat } = useContext(ChatEngineContext)  \n    const chat = chats && chats[activeChat] \n\n    if (!chat) return <div />\n\n    function renderPhotos(attachments) {\n        return attachments.map((attachment, index) => {\n            return <Thumbnail key={`person_${index}`} attachment={attachment} />\n        })\n    }\n\n    return (\n        <div style={{ borderTop: '1px solid #f0f0f0' }} className='ce-photo-section'>\n            <SettingsBlock\n                label='Photos'\n                className='ce-section-title-container ce-photo-title-container'\n            >\n                <div className='ce-photo-feed'>\n                    <div style={{ height: '12px' }} />\n\n                    { renderPhotos(chat.attachments) }\n                </div>\n            </SettingsBlock>\n        </div>\n    )\n}\n\nexport default PhotosSettings\n","import React, { useContext } from 'react'\n\nimport { Button, deleteChat, ChatEngineContext } from 'react-chat-engine'\n\nimport SettingsBlock from '../SettingsBlock'\n\nconst OptionsSettings = () => {\n    const { conn, chats, activeChat } = useContext(ChatEngineContext)  \n    const chat = chats && chats[activeChat] \n\n    if (!chat) return <div />\n\n    return (\n        <div style={{ borderTop: '1px solid #f0f0f0' }}>\n            <SettingsBlock \n                id='ce-options-drop-down'\n                label='Options'\n            >\n                <div>\n                    <div style={{ height: '8px' }} />\n\n                    <Button \n                        value=\"Delete\" \n                        theme='danger'\n                        icon='delete'\n                        id='ce-delete-chat-button'\n                        onClick={() => deleteChat(conn, chat.id, (data) => {})}\n                        style={{ width: '100%', marginBottom: '12px' }}\n                    />\n                </div>\n            </SettingsBlock>\n        </div>\n    )\n}\n\nexport default OptionsSettings\n","import React, { useState, useEffect, useRef } from 'react';\nimport PropTypes from 'prop-types'\n\nimport { editChat, TextInput } from 'react-chat-engine'\n\nconst NewMessageForm = props => {\n    const didMountRef = useRef(false)\n    const [state, setState] = useState({\n        activeChat: null,\n        value: ''\n    })\n  \n    function handleChange(event) {\n        setState({ ...state, value: event.target.value });\n    }\n  \n    function handleSubmit(event) {\n        event.preventDefault();\n\n        editChat(\n            props.conn, \n            props.chat.id,\n            {title: state.value},\n            (data) => {}\n        )\n    }\n\n    useEffect(() => {\n        if (!didMountRef.current) {\n            didMountRef.current = true\n\n        } else {\n            if(state.activeChat !== props.chat.id) {\n                setState({ \n                    ...state,\n                    value: props.chat.title,\n                    activeChat: props.chat.id\n                })\n            }\n        }\n    })\n\n    return (\n        <form onSubmit={(e) => handleSubmit(e)} className='ce-chat-title-form'>\n            <TextInput \n                label=\"Rename this Chat\" \n                value={state.value} \n                default={props.chat.title}\n                handleChange={(e) => handleChange(e)} \n                style={{ \n                    fontSize: '16px',\n                    fontWeight: '600',\n                    textAlign: 'center',\n                    border: '0px solid white',\n                    width: '100%',\n                }}\n            />\n        </form>\n    );\n}\n\nexport default NewMessageForm\n\nNewMessageForm.propTypes = {\n    chat: PropTypes.object.isRequired,\n}","import React, { useContext } from 'react'\n\nimport { Avatar, ChatEngineContext } from 'react-chat-engine'\n\nimport TitleForm from './TitleForm'\n\nconst ChatSettingsTop = () => {\n    const { conn, chats, activeChat } = useContext(ChatEngineContext)  \n    const chat = chats && chats[activeChat] \n    \n    if (!chat || !conn || conn === null) return <div />\n\n    const topPeople = chat.people.slice(0, 3)\n    const otherPerson = getOtherPerson(chat.people)\n\n    function renderOnePerson(people) {\n        return (\n            <div style={{ width: '100%', paddingTop: '14px' }}>\n                <div style={{ float: 'left', position: 'relative', left: 'calc(50% - 22px)' }}>\n                    <Avatar \n                        show_online={false} \n                        username={people[0].person.username} \n                        avatar={people[0].person.avatar}\n                    />\n                </div>\n            </div>\n        )\n    }\n\n    function renderTwoPeople(people) {\n        return (\n            <div style={{ width: '100%', paddingTop: '14px' }}>\n                <div style={{ float: 'left', position: 'relative', left: 'calc(50% - 22px - 15px)' }}>\n                    <Avatar \n                        show_online={false} \n                        username={people[0].person.username} \n                        avatar={people[0].person.avatar}\n                    />\n                </div>\n\n                <div style={{ float: 'left', position: 'relative', left: 'calc(50% - 44px - 22px + 15px)' }}>\n                    <Avatar \n                        show_online={false} \n                        username={people[1].person.username} \n                        avatar={people[1].person.avatar}\n                    />\n                </div>\n            </div>\n        )\n    }\n\n    function renderThreePeople(people) {\n        return (\n            <div style={{ width: '100%', paddingTop: '14px' }}>\n                <div style={{ float: 'left', position: 'relative', left: 'calc(50% - 22px - 24px)' }}>\n                    <Avatar \n                        show_online={false} \n                        username={people[0].person.username}\n                        avatar={people[0].person.avatar}\n                    />\n                </div>\n\n                <div style={{ float: 'left', position: 'relative', left: 'calc(50% - 24px - 44px)' }}>\n                    <Avatar \n                        show_online={false} \n                        username={people[1].person.username} \n                        avatar={people[1].person.avatar}\n                    />\n                </div>\n\n                <div style={{ float: 'left', position: 'relative', left: 'calc(50% - 22px - 44px - 44px + 24px)' }}>\n                    <Avatar \n                        show_online={false} \n                        username={people[2].person.username}\n                        avatar={people[2].person.avatar}\n                    />\n                </div>\n            </div>\n        )\n    }\n\n    function getOtherPerson(people) {\n        return people.find(person => person.person.username !== conn.userName);\n    }\n    \n    return (\n        <div className='ce-chat-settings-container'>\n            <div className='ce-chat-avatars-row'>\n                { topPeople.length === 1 && renderOnePerson(topPeople) }\n                \n                { chat.is_direct_chat && otherPerson && renderOnePerson([otherPerson]) }\n\n                { !chat.is_direct_chat && otherPerson && topPeople.length === 2 && renderTwoPeople(topPeople) }\n\n                { !chat.is_direct_chat && otherPerson && topPeople.length === 3 && renderThreePeople(topPeople) }\n            </div>\n\n            {\n                chat.is_direct_chat && otherPerson ?\n                <div style={{ \n                    paddingTop: '55px',\n                    paddingBottom: '7px',\n                    fontSize: '16px',\n                    fontWeight: '600',\n                    textAlign: 'center',\n                    border: '0px solid white',\n                    width: '100%',\n                }}>\n                    { otherPerson.person.username }\n                </div> :\n                <TitleForm chat={chat} conn={conn} />\n            }\n        </div>\n    )\n}\n\nexport default ChatSettingsTop\n","import React, { useContext } from 'react'\n\nimport { ChatEngineContext } from 'react-chat-engine'\n\nimport PeopleSettings from './PeopleSettings'\nimport PhotosSettings from './PhotosSettings'\nimport OptionsSettings from './OptionsSettings'\nimport ChatSettingsTop from './ChatSettingsTop'\n\nconst ChatSettings = props => {\n    const { conn, chats, activeChat } = useContext(ChatEngineContext)  \n    const chat = chats && chats[activeChat] \n\n    if (conn === null) return <div />\n\n    return (\n        <div style={styles.settingsContainer} className='ce-settings'>\n            <div style={{ width: '90%', paddingLeft: '5%' }} className='ce-settings-container'>\n                {\n                    props.renderChatSettingsTop ?\n                    props.renderChatSettingsTop(conn, chat) :\n                    <ChatSettingsTop />\n                }\n\n                {\n                    props.renderPeopleSettings ?\n                    props.renderPeopleSettings(conn, chat) :\n                    <PeopleSettings />\n                }\n\n                {\n                    props.renderPhotosSettings ?\n                    props.renderPhotosSettings(chat) :\n                    <PhotosSettings />\n                }\n\n                {\n                    conn && chat && conn.userName === chat.admin.username  &&\n                    <div>\n                        {\n                            props.renderOptionsSettings ?\n                            props.renderOptionsSettings(conn, chat) :\n                            <OptionsSettings />\n                        }\n                    </div>\n                }\n            </div>\n        </div>\n    )\n}\n\nexport default ChatSettings\n\nconst styles = {\n    settingsContainer: { \n        height: '100%',\n        overflow: 'scroll',\n        overflowX: 'hidden',\n        borderLeft: '1px solid #afafaf',\n        backgroundColor: 'white',\n        fontFamily: 'Avenir'\n    }\n}","import React, { useState, useContext } from 'react'\n\nimport { SettingOutlined, CloseOutlined } from '@ant-design/icons'\n\nimport { ChatEngineContext } from 'react-chat-engine'\n\nimport ChatSettings from '../../ChatSettings'\n\nconst ChatSettingsDrawer = props => {\n    const [isOpen, setIsOpen] = useState(false)\n    const context = useContext(ChatEngineContext)\n    const allProps = {...props, ...context.conn}\n\n    return (\n        <div> \n            <SettingOutlined\n                onClick={() => setIsOpen(true)}\n                style={{ color: 'rgb(24, 144, 255)', outline: 'none' }} \n            />\n\n            { \n                isOpen &&\n                <div style={styles.drawerContainer}>\n                    <CloseOutlined\n                        style={styles.closeIcon}\n                        onClick={() => setIsOpen(false)}\n                    />\n\n                    <div style={styles.titleContainer}>\n                        <div style={styles.titleText}>\n                            Chat Settings\n                        </div>\n                    </div>\n\n                    {\n                        context.conn !== null && context.conn.renderChatSettings ?\n                        context.conn.renderChatSettings(context) :\n                        <ChatSettings {...allProps} />\n                    }\n                </div>\n            }\n        </div>\n    );\n}\n\nexport default ChatSettingsDrawer\n\nconst styles = {\n    drawerContainer: { \n        position: 'fixed',\n        zIndex: '1',\n        top: '0px',\n        left: '0px',\n        width: '100%',\n        height: '100%',\n        backgroundColor: 'white',\n        textAlign: 'left'\n    },\n    closeIcon: {\n        position: 'absolute',\n        left: '28px',\n        top: '32px'\n    },\n    titleContainer: {\n        width: '100%',\n        padding: '24px 0px',\n        textAlign: 'center',\n        color: 'rgb(24, 144, 255)',\n    },\n    titleText: {\n        fontSize: '24px',\n        fontWeight: '600',\n    },\n}\n","import React, { useContext } from 'react'\n\nimport { ChatEngineContext } from 'react-chat-engine'\n\nimport ChatListDrawer from './ChatListDrawer'\nimport ChatSettingsDrawer from './ChatSettingsDrawer'\n\nimport { getDateTime, formatDateTime } from '../../Utilities/timezone'\n\nimport { LoadingOutlined } from '@ant-design/icons'\n\nimport { Row, Col } from 'react-grid-system'\n\nimport { setConfiguration } from 'react-grid-system';\n\nsetConfiguration({ maxScreenClass: 'xl', gutterWidth: 0 });\n\nconst ChatHeader = () => {\n    const { conn, chats, activeChat } = useContext(ChatEngineContext)\n\n    const chat = chats ? chats[activeChat] : undefined\n    const otherPerson = chat && conn && chat.people.find(person => person.person.username !== conn.userName)\n    const title = chat ? (chat.is_direct_chat && otherPerson ? otherPerson.person.username : chat.title) : undefined\n\n    var text = 'Say hello!'\n    if (!chat) {\n        text = 'Loading...'\n    } else if (chat.last_message.created && chat.last_message.created.length > 0) {\n        const dateTime = getDateTime(chat.last_message.created, conn ? conn.offset : undefined)\n        text = `Active ${formatDateTime(dateTime)}`\n    }\n\n    return (\n        <Row\n            className='ce-chat-title'\n            style={styles.titleSection}\n        >\n            <Col\n                xs={2}\n                sm={0}\n                style={{ ...styles.mobileOptiom, ...{ left: '6px' } }}\n                className='ce-chat-list-mobile-option'\n            >\n                <ChatListDrawer />\n            </Col>\n\n            <Col\n                xs={8}\n                sm={12}\n                style={styles.titleContainer}\n                className='ce-chat-title-container'\n            >\n                <div\n                    style={styles.titleText}\n                    className='ce-chat-title-text'\n                    id={`ce-chat-feed-title-${title}`}\n                >\n                    {title ? title : <LoadingOutlined />}\n                </div>\n\n                <div style={styles.subtitleText} className='ce-chat-subtitle-text'>{text}</div>\n            </Col>\n\n            <Col\n                xs={2}\n                sm={0}\n                style={{ ...styles.mobileOptiom, ...{ right: '6px' } }}\n                className='ce-chat-settings-mobile-option'\n            >\n                <ChatSettingsDrawer />\n            </Col>\n        </Row>\n    );\n}\n\nexport default ChatHeader\n\nconst styles = {\n    titleSection: {\n        position: 'absolute',\n        top: '0px',\n        width: '100%',\n        zIndex: '1',\n        backgroundColor: 'rgb(256, 256, 256, 0.92)',\n    },\n    mobileOptiom: {\n        width: '100%',\n        top: '32px',\n        textAlign: 'center',\n        color: 'rgb(24, 144, 255)',\n        overflow: 'hidden'\n    },\n    titleContainer: {\n        width: '100%',\n        padding: '18px 0px',\n        textAlign: 'center',\n        color: 'rgb(24, 144, 255)',\n        overflowX: 'hidden'\n    },\n    titleText: {\n        fontSize: '24px',\n        fontWeight: '600',\n    },\n    subtitleText: {\n        fontSize: '12px',\n    }\n}\n","import React from 'react'\nimport { getDateTime, formatDateTime } from '../../../Utilities/timezone'\n\nconst DatePartition = props => {\n    const { lastCreated, created } = props\n\n    function getDate(date) {\n        return date ? date.substr(0, 10) : null\n    }\n\n    const lastDate = getDate(lastCreated)\n    const thisDate = getDate(created)\n\n    if (lastCreated && lastDate === thisDate) return <div />\n\n    return (\n        <div style={styles.dateText} className='ce-message-date-text'>\n            { formatDateTime(getDateTime(created, props.offset)) }\n        </div>\n    )\n}\n\nexport default DatePartition\n\nconst styles = {\n    dateText: { \n        width: '100%', \n        textAlign: 'center',\n        paddingTop: '4px',\n        paddingBottom: '10px',\n        fontSize: '15px',\n        color: 'rgba(0, 0, 0, .40)'\n    }\n}","const images = ['jpg', 'jpeg', 'png', 'gif', 'tiff']\n\nexport const isImage = (fileName) => {\n    const dotSplit = fileName.split('.')\n    return dotSplit.length > 0 && images.indexOf(dotSplit[dotSplit.length - 1].toLowerCase()) !== -1\n}\n\nexport const getFileName = (fileUrl) => {\n    const slashSplit = fileUrl.split('/')\n    const nameAndHash = slashSplit[slashSplit.length - 1]\n    return nameAndHash.split('?')[0]\n}","import React, { useState } from 'react'\n\nimport { LoadingOutlined } from '@ant-design/icons'\n\nconst Thumbnail = props => {\n    const [hovered, setHovered] = useState(false)\n    const { attachment } = props\n    const style={ \n        ...styles.thumbnail, \n        ...{ border: hovered ? '1px solid #1890ff' : '1px solid #fff' } \n    }\n\n    if (!attachment) {\n        return (\n            <div style={styles.loadingContainer}>\n                <LoadingOutlined  style={{ color: 'white', padding: '4px', fontSize: '24px' }} />\n            </div>\n        )\n    }\n\n    return (\n        <img \n            onClick={() => window.open(attachment.file)}\n            onMouseEnter={() => setHovered(true)}\n            onMouseLeave={() => setHovered(false)}\n            src={attachment.file}\n            alt={'thumb-nail'}\n            style={style}\n        />\n    )\n}\n\nexport default Thumbnail\n\nconst styles = {\n    loadingContainer: {\n        width: '100%', \n        cursor: 'pointer',\n        textAlign: 'right', \n        display: 'inline-block', \n        objectFit: 'cover',\n        borderRadius: '0.3em',\n        marginRight: '2px',\n        marginBottom: '4px',\n        height: '30vw', \n        width: '30vw', \n        maxHeight: '200px',\n        maxWidth: '200px',\n        minHeight: '100px',\n        minWidth: '100px',\n        backgroundColor: '#d9d9d9',\n    },\n    thumbnail: { \n        width: '100%', \n        cursor: 'pointer',\n        textAlign: 'right', \n        display: 'inline', \n        objectFit: 'cover',\n        borderRadius: '0.3em',\n        paddingRight: '2px',\n\n        height: '30vw', \n        width: '30vw', \n        maxHeight: '200px',\n        maxWidth: '200px',\n        minHeight: '100px',\n        minWidth: '100px',\n    }\n}","import React, { useState } from 'react'\n\nimport { FileOutlined } from '@ant-design/icons'\n\nimport { getFileName } from './file'\n\nimport { LoadingOutlined } from '@ant-design/icons'\n\nconst FileView = props => {\n    const [hovered, setHovered] = useState(false)\n    const { attachment } = props\n    const style={ \n        ...styles.fileView, \n        ...{ \n            color: hovered ? '#1890ff' : '#434343',\n            border: hovered ? '1px solid #1890ff' : '1px solid #434343',\n        } \n    }\n\n    if (!attachment) {\n        return (\n            <div style={styles.loadingContainer}>\n                <LoadingOutlined  style={{ color: 'white', padding: '4px', fontSize: '24px' }} />\n            </div>\n        )\n    }\n\n    return (\n        <div \n            style={style} \n            onMouseEnter={() => setHovered(true)}\n            onMouseLeave={() => setHovered(false)}\n            onClick={() => window.open(attachment.file)}\n        >\n            <FileOutlined />{' '}{ getFileName(attachment.file) }\n        </div>\n    )\n}\n\nexport default FileView\n\nconst styles = {\n    loadingContainer: {\n        display: 'inline-block', \n        borderRadius: '14px',\n        marginRight: '2px',\n        height: '48px', \n        width: '136px', \n        marginBottom: '4px',\n        marginLeft: '4px',\n        backgroundColor: '#d9d9d9',\n    },\n    fileView: { \n        padding: '12px',\n        borderRadius: '14px',\n        display: 'inline-block',\n        marginBottom: '4px',\n        marginRight: '2px',\n        cursor: 'pointer',\n    }\n}","\n\nconst colors = [\n    '#D64045',\n    '#5B3000',\n    '#00CC99',\n    '#467599',\n    '#1D3354',\n    '#8F250C',\n    '#6153CC',\n    '#961D4E',\n    '#A29F15',\n    '#0CAADC',\n    '#FF5154',\n    '#FA7921',\n    '#688E26',\n    '#550527',\n    '#A10702',\n    '#FF1053',\n    '#6C6EA0',\n    '#100B00',\n]\n\nfunction stringToNumber(str){\n    let sum = 0\n    for (var i = 0; i < str.length; i++) {\n        sum = sum + (str.charCodeAt(i) * i) - 97\n    }\n    return sum\n}\n\nexport function stringToColor(str) {\n    if (!str) {\n        return 'black'\n    } else {\n        return colors[stringToNumber(str) % colors.length]\n    }\n}","import React, { Component } from 'react'\nimport PropTypes from 'prop-types'\n\nimport { stringToColor } from '../../../Utilities/colorMapping' \n\n\nexport default class Dot extends Component {\n    state = { avatar: '' }\n\n    updateImg() {\n        let { avatar } = this.props\n        avatar = avatar && avatar !== null ? avatar : ''\n        \n        if (avatar.split('?')[0] !== this.state.avatar.split('?')[0]) {\n            this.setState({ avatar })\n        }\n    }\n\n    componentDidMount() { this.updateImg() }\n\n    componentDidUpdate() { this.updateImg() }\n\n    render() {\n        const { username } = this.props\n        const color = stringToColor(username)\n        const customStyle = this.props.style ? this.props.style : {}\n        \n        return (\n            <div\n                className='ce-avatar-dot'\n                style={{\n                    ...styles.dot,\n                    ...customStyle,\n                    ...{\n                        backgroundColor: this.state.avatar ? 'white' : color,\n                        backgroundImage: this.state.avatar && `url(${this.state.avatar})`,\n                        backgroundRepeat: 'no-repeat',\n                        backgroundPosition: 'center',\n                        backgroundSize: '14px',\n                        // Size Animations\n                        width: this.props.visible ? '13px' : '0px',\n                        height: this.props.visible ? '13px' : '0px',\n                    }\n                }}\n            />\n        )\n    }\n}\n\nconst styles = {\n    dot: {\n        borderRadius: '13px',\n        textAlign: 'center',\n        // CSS Transitions\n        transition: \"all .33s ease\",\n        WebkitTransition: \"all .33s ease\",\n        MozTransition: \"all .33s ease\",\n    }\n}\n\nDot.propTypes = {\n    avatar: PropTypes.string,\n    username: PropTypes.string,\n    style: PropTypes.object,\n}","import React from 'react'\n\nconst Body = props => {\n    let text = props.text ? props.text : ''\n    text = text.replaceAll(\"<p>\", \"<div>\").replaceAll(\"</p>\", \"</div>\")\n    text = text.replaceAll(\"<a \", `<a style=\"color: ${ props.myMessage ? 'white' : '#1890ff' };\" `)\n\n    return (\n        <div className='ce_message' dangerouslySetInnerHTML={{ __html: text }} />\n    ) \n}\n\nexport default Body","import React, { useState, useContext } from 'react'\n\nimport { ChatEngineContext } from 'react-chat-engine'\n\nimport _ from 'lodash'\n\nimport { getFileName, isImage } from './file'\n\nimport Thumbnail from './Thumbnail'\nimport FileView from './FileView'\n\nimport Dot from '../../../components/Avatar/Dot'\nimport { getDateTime, formatTime } from '../../../Utilities/timezone'\n\nimport Body from './Body'\n\nimport { Row, Col, setConfiguration } from 'react-grid-system'\n\nsetConfiguration({ maxScreenClass: 'xl' })\n\nconst Message = props => {\n    const { conn } = useContext(ChatEngineContext)\n    const [hovered, setHovered] = useState(false)\n\n    function renderReads() {\n        const { chat, message } = props\n\n        if (!chat) { return <div /> }\n\n        return chat.people.map((chatPerson, index) => {\n            return (\n                <Dot\n                    key={`read_${index}`}\n                    avatar={chatPerson.person.avatar}\n                    username={chatPerson.person.username}\n                    visible={message.id === chatPerson.last_read}\n                    style={{ float: 'right', marginLeft: '4px' }}\n                />\n            )\n        })\n    }\n\n    function renderImages() {\n        const { message } = props\n        const attachments = message && message.attachments ? message.attachments : []\n        return attachments.map((attachment, index) => {\n            const fileName = getFileName(attachment.file ? attachment.file : attachment.name)\n            if (isImage(fileName)) {\n                return <Thumbnail attachment={attachment.file && attachment} key={`attachment_${index}`} />\n            } else {\n                return <div key={`attachment${index}`} />\n            }\n        })\n    }\n\n    function renderFiles() {\n        const { message } = props\n        const attachments = message && message.attachments ? message.attachments : []\n        return attachments.map((attachment, index) => {\n            const fileName = getFileName(attachment.file ? attachment.file : attachment.name)\n            if (!isImage(fileName)) {\n                return <FileView attachment={attachment.file && attachment} key={`attachment_${index}`} />\n            } else {\n                return <div key={`attachment${index}`} />\n            }\n        })\n    }\n\n    const { lastMessage, message, nextMessage } = props\n\n    if (!message) { return <div /> }\n\n    const attachments = message && message.attachments && message.attachments\n\n    const topRightRadius = !lastMessage || lastMessage.sender_username !== message.sender_username ? '1.3em' : '0.3em'\n    const bottomRightRadius = !nextMessage || nextMessage.sender_username !== message.sender_username ? '1.3em' : '0.3em'\n\n    const borderRadius = `1.3em ${topRightRadius} ${bottomRightRadius} 1.3em`\n    const paddingBottom = (!nextMessage || nextMessage.sender_username !== message.sender_username) ? '12px' : '2px'\n\n    return (\n        <div\n            className='ce-message-row ce-my-message'\n            style={{ width: '100%', textAlign: 'right', paddingBottom }}\n        >\n            <div\n                style={{ display: 'auto' }}\n                className='ce-my-message-attachments-container ce-my-message-images-container'\n            >\n                {renderImages()}\n            </div>\n\n            <div\n                style={{ display: 'auto' }}\n                className='ce-my-message-attachments-container ce-my-message-files-container'\n            >\n                {renderFiles()}\n            </div>\n\n            <Row\n                style={{ paddingRight: '2px' }}\n                className='ce-message-bubble-row ce-my-message-bubble-row'\n            >\n                <Col xs={12} sm={12} md={12}>\n                    <span \n                        className='ce-message-timestamp ce-my-message-timestamp'\n                        style={{\n                            ...styles.timeTag,\n                            ...{ opacity: hovered ? '1' : '0' }\n                        }}\n                    >\n                        {formatTime(getDateTime(message.created, conn !== null && conn.offset))}\n                    </span>\n\n                    {   // TODO: What is !attachments for?\n                        !attachments || message.text &&\n                        <div\n                            className={`\n                                ce-message-bubble \n                                ce-my-message-bubble \n                                ${props.sending && 'ce-my-message-sinding-bubble'}\n                            `}\n                            style={{ \n                                ...styles.myMessage, \n                                ...{ borderRadius },\n                                ...{ backgroundColor: props.sending ? '#40a9ff' : 'rgb(24, 144, 255)' }\n                            }}\n                            onMouseEnter={() => setHovered(true)}\n                            onMouseLeave={() => setHovered(false)}\n                        >\n                            <Body myMessage={true} text={message.text} />\n                        </div>\n                    }\n                </Col>\n\n                <Col xs={1} sm={2} md={3} />\n\n                <Col xs={12} className='ce-reads-row ce-my-reads-row'>\n                    {renderReads()}\n                </Col>\n            </Row>\n        </div>\n    )\n}\n\nexport default Message\n\nconst styles = {\n    myMessage: {\n        color: 'white',\n        cursor: 'pointer',\n        float: 'right', textAlign: 'left', // Stay right but render text\n        padding: '12px',\n        fontSize: '15px',\n        whiteSpace: 'pre-line',\n        overflowWrap: 'anywhere',\n        maxWidth: 'calc(100% - 100px)',\n        // CSS Transitions\n        transition: \"all .33s ease\",\n        WebkitTransition: \"all .33s ease\",\n        MozTransition: \"all .33s ease\",\n    },\n    timeTag: { \n        position: 'relative', \n        top: 'calc(50% - 12px)', \n        right: '8px', \n        fontSize: '14px', \n        color: 'rgb(24, 144, 255)',\n        // CSS Transitions\n        transition: \"all .15s ease\",\n        WebkitTransition: \"all .15s ease\",\n        MozTransition: \"all .15s ease\",\n    }\n}","import React, { useState, useContext } from 'react'\n\nimport { ChatEngineContext } from 'react-chat-engine'\n\nimport { getDateTime, formatTime } from '../../../Utilities/timezone'\n\nimport { getFileName, isImage } from './file'\n\nimport FileView from './FileView'\nimport Thumbnail from './Thumbnail'\n\nimport { Avatar, Dot } from 'react-chat-engine'\n\nimport Body from './Body'\n\nimport { Row, Col, setConfiguration } from 'react-grid-system'\n\nsetConfiguration({ maxScreenClass: 'xl' })\n\n\nconst TheirMessage = props => {\n    const { conn } = useContext(ChatEngineContext)\n    const [hovered, setHovered] = useState(false)\n\n    function renderReads() {\n        const { chat, message } = props\n\n        if (!chat) { return <div /> }\n\n        return chat.people.map((person, index) => {\n            return (\n                <Dot\n                    key={`read_${index}`}\n                    avatar={person.person.avatar}\n                    username={person.person.username}\n                    visible={message.id === person.last_read}\n                    style={{ float: 'left', marginLeft: '4px' }}\n                />\n            )\n        })\n    }\n\n    function renderImages() {\n        const { message } = props\n        const attachments = message && message.attachments ? message.attachments : []\n\n        return attachments.map((attachment, index) => {\n            const fileName = getFileName(attachment.file)\n            if (isImage(fileName)) {\n                return <Thumbnail attachment={attachment} key={`attachment_${index}`} />\n            } else {\n                return <div key={`attachment${index}`} />\n            }\n        })\n    }\n\n    function renderFiles() {\n        const { message } = props\n        const attachments = message && message.attachments ? message.attachments : []\n\n        return attachments.map((attachment, index) => {\n            const fileName = getFileName(attachment.file)\n            if (!isImage(fileName)) {\n                return <FileView attachment={attachment} key={`attachment_${index}`} />\n            } else {\n                return <div key={`attachment${index}`} />\n            }\n        })\n    }\n\n    const { lastMessage, message, nextMessage } = props\n\n    if (!message) { return <div /> }\n\n    const attachments = message && message.attachments && message.attachments\n\n    const topLeftRadius = !lastMessage || lastMessage.sender_username !== message.sender_username ? '1.3em' : '0.3em'\n    const bottomLeftRadius = !nextMessage || nextMessage.sender_username !== message.sender_username ? '1.3em' : '0.3em'\n\n    const borderRadius = `${topLeftRadius} 1.3em 1.3em ${bottomLeftRadius}`\n    const paddingBottom = !nextMessage || nextMessage.sender_username !== message.sender_username ? '12px' : '2px'\n\n    return (\n        <div\n            style={{ width: '100%', paddingBottom }}\n            className='ce-message-row ce-their-message'\n        >\n            {\n                (!lastMessage || lastMessage.sender_username !== message.sender_username) &&\n                <div style={styles.nameText} className='ce-their-message-sender'>\n                    {message.sender_username}\n                </div>\n            }\n\n            <Row style={{ paddingLeft: '2px' }} className='ce-their-message-row'>\n                <Col xs={12} sm={12} md={12}>\n                    <div style={{ height: '0px' }} className='ce-their-message-avatar'>\n                        {\n                            (!nextMessage || nextMessage.sender_username !== message.sender_username) &&\n                            <Avatar\n                                show_online={false}\n                                username={message.sender_username}\n                                avatar={message.sender && message.sender.avatar}\n                            />\n                        }\n                    </div>\n\n                    <div\n                        style={{ display: 'auto', paddingLeft: '50px' }}\n                        className='ce-their-message-attachments-container ce-their-message-images-container'\n                    >\n                        {renderImages()}\n                    </div>\n\n                    <div\n                        style={{ display: 'auto', paddingLeft: '50px' }}\n                        className='ce-their-message-attachments-container ce-their-message-files-container'\n                    >\n                        {renderFiles()}\n                    </div>\n\n                    {\n                        !attachments || message.text &&\n                        <div style={{ paddingLeft: '48px' }}>\n                            <div\n                                className='ce-message-bubble ce-their-message-bubble'\n                                style={{ ...styles.theirMessage, ...{ borderRadius } }}\n                                onMouseEnter={() => setHovered(true)}\n                                onMouseLeave={() => setHovered(false)}\n                            >\n                                <Body text={message.text} />\n                            </div>\n                        </div>\n                    }\n\n                    <span \n                        className='ce-message-timestamp ce-their-message-timestamp'\n                        style={{\n                            ...styles.timeTag,\n                            ...{ opacity: hovered ? '1' : '0' }\n                        }}\n                    >\n                        {formatTime(getDateTime(message.created, conn !== null && conn.offset))}\n                    </span>\n                </Col>\n\n                {/* Col is 9 to not slipp into RHS */}\n                <Col\n                    xs={9}\n                    style={{ marginLeft: '48px' }}\n                    className='ce-reads-row ce-their-reads-row'\n                >\n                    {renderReads()}\n                </Col>\n            </Row>\n        </div>\n    )\n}\n\nexport default TheirMessage\n\nconst styles = {\n    theirMessage: {\n        cursor: 'pointer',\n        color: 'black',\n        float: 'left',\n        padding: '12px',\n        fontSize: '15px',\n        whiteSpace: 'pre-line',\n        backgroundColor: '#f1f0f0',\n        overflowWrap: 'anywhere',\n        maxWidth: 'calc(100% - 100px)',\n        // CSS Transitions\n        transition: \"all .33s ease\",\n        WebkitTransition: \"all .33s ease\",\n        MozTransition: \"all .33s ease\",\n    },\n    nameText: {\n        paddingLeft: '62px',\n        paddingBottom: '2px',\n        color: 'rgba(0, 0, 0, .40)',\n        fontSize: '15px'\n    },\n    timeTag: { \n        position: 'relative', \n        top: 'calc(50% - 12px)', \n        left: '8px', \n        fontSize: '14px', \n        color: 'rgba(0, 0, 0, 0.4)',\n        // CSS Transitions\n        transition: \"all .15s ease\",\n        WebkitTransition: \"all .15s ease\",\n        MozTransition: \"all .15s ease\",\n    }\n}","import React, { useContext } from 'react'\n\nimport { ChatEngineContext } from '../../../../Context'\n\nimport DatePartition from '../DatePartition'\n\nimport MyMessage from './MyMessage'\nimport TheirMessage from './TheirMessage'\n\nconst Message = props => {\n    const { lastMessage, message, nextMessage, chat } = props\n\n    const { conn } = useContext(ChatEngineContext)\n\n    if (!message || !chat) { return <div /> }\n\n    if (!conn || conn === null) { return <div /> }\n\n    return (\n        <div className='ce-message-and-date'>\n            <DatePartition \n                lastCreated={lastMessage ? lastMessage.created : null} \n                created={message.created} \n                offset={conn.offset}\n            />\n\n            {\n                message.sender_username === conn.userName || message.sender_username === conn.senderUsername ?\n                <MyMessage \n                    chat={chat}\n                    conn={conn}\n                    sending={!message.id}\n                    lastMessage={lastMessage}\n                    message={message}\n                    nextMessage={nextMessage}\n                /> :\n                <TheirMessage \n                    chat={chat}\n                    conn={conn}\n                    lastMessage={lastMessage}\n                    message={message}\n                    nextMessage={nextMessage}\n                />\n            }\n        </div>\n    ) \n}\n\nexport default Message","import React, { useContext } from 'react'\n\nimport { ChatEngineContext } from '../../../Context'\n\nimport { RenderTrigger } from '../Triggers'\n\nimport MessageBubble from './Bubble/index'\n\nconst Messages = props => {\n    const {\n        conn,\n        chats,\n        messages,\n        activeChat,\n        setIsBottomVisible,\n    } = useContext(ChatEngineContext)\n\n    const chat = chats && chats[activeChat]\n    const keys = Object.keys(messages)\n\n    if (!conn || conn === null || !chat) return <div />\n\n    return keys.map((key, index) => {\n        const message = messages[key]\n        const lastMessageKey = index === 0 ? null : keys[index - 1]\n        const nextMessageKey = index === keys.length - 1 ? null : keys[index + 1]\n\n        if (props.renderMessageBubble) {\n            return (\n                <div key={`message_${index}`}>\n                    {/* Scroll down if the top of last msg is visible */}\n                    {\n                        index === keys.length - 1 &&\n                        <RenderTrigger\n                            id='ce-first-message-render-trigger'\n                            onEnter={() => setIsBottomVisible(true)}\n                            onLeave={() => setIsBottomVisible(false)}\n                        />\n                    }\n\n                    {\n                        props.renderMessageBubble(\n                            conn,\n                            chat,\n                            messages[lastMessageKey],\n                            message,\n                            messages[nextMessageKey]\n                        )\n                    }\n                </div>\n            )\n        }\n\n        return (\n            <div key={`message_${index}`} id={`ce-message-${message.id}`}>\n                {/* Scroll down if the top of last msg is visible */}\n                {\n                    index === keys.length - 1 &&\n                    <RenderTrigger\n                        id='ce-last-message-render-trigger'\n                        onEnter={() => setIsBottomVisible(true)}\n                        onLeave={() => setIsBottomVisible(false)}\n                    />\n                }\n\n                <MessageBubble\n                    chat={chat}\n                    message={message}\n                    lastMessage={messages[lastMessageKey]}\n                    nextMessage={messages[nextMessageKey]}\n                />\n            </div>\n        )\n    })\n}\nexport default Messages","import React, { useContext, useRef, useState, useEffect } from 'react'\n\nimport { ChatEngineContext } from '../../../Context'\n\nimport { stringToColor } from '../../Utilities/colorMapping'\n\nconst IsTyping = () => {\n    const didMountRef = useRef(false)\n    const [currentTime, setCurrentTime] = useState(Date.now())\n    const { conn, activeChat, typingCounter } = useContext(ChatEngineContext)\n    const typers = typingCounter && typingCounter[activeChat] ? typingCounter[activeChat] : []\n\n    useEffect(() => {\n        if (!didMountRef.current) {\n            didMountRef.current = true\n            setInterval(() => {\n                setCurrentTime(Date.now())\n            }, 1000) // Check time every second\n        }\n    })\n\n    if (!conn || conn === null) return <div />\n\n    return (\n        <div>\n            {\n                Object.keys(typers).map((username, index) => {\n                    if (conn.userName !== username && currentTime < typers[username] + 2000) {\n                        return (\n                            <div \n                                key={`typer_${index}`} \n                                className='ce-user-typing-text'\n                                style={{ color: stringToColor(username), padding: '2px', paddingLeft: '12px' }}\n                            >\n                                {`${username} is typing...`}\n                            </div>\n                        )\n\n                    } else {\n                        return <div key={`typer_${index}`} />\n                    }\n                })\n            }\n        </div>\n    )\n}\n\nexport default IsTyping","const images = ['jpg', 'jpeg', 'png', 'gif', 'tiff']\n\nexport const isImage = (fileName) => {\n    const dotSplit = fileName.split('.')\n    return dotSplit.length > 0 && images.indexOf(dotSplit[dotSplit.length - 1].toLowerCase()) !== -1\n}","import React, { useState } from 'react'\n\nimport { FileOutlined } from '@ant-design/icons'\n\nimport { CloseCircleTwoTone } from '@ant-design/icons'\n\nconst FilePreview = props => {\n    const [hovered, setHovered] = useState(false)\n\n    return (\n        <div \n            onMouseEnter={() => setHovered(true)}\n            onMouseLeave={() => setHovered(false)}\n            style={{\n                ...styles.filePreview,\n                ...{ paddingRight: hovered ? '6px' : '26px' }\n            }}\n        >\n            <FileOutlined />{' '}{ props.file && props.file.name } {' '}\n            \n            {\n                hovered &&\n                <CloseCircleTwoTone \n                    style={styles.closeIcon} \n                    onClick={() => props.onRemove && props.onRemove()}\n                />\n            }\n        </div>\n    )\n}\n\nexport default FilePreview\n\nconst styles = {\n    filePreview: { \n        padding: '12px', \n        display: 'inline-block', \n        position: \"relative\", \n        border: '1px solid #40a9ff',\n        color: '#434343',\n        borderRadius: '14px'\n    },\n    closeIcon: {\n    }\n}\n","import React from 'react'\n\nimport { isImage } from './isImage'\n\nimport FilePreview from './FilePreview'\n\nconst FilesRow = props => {\n    function renderFiles() {\n        return props.files.map((file, index) => {\n            if(!isImage(file.name)) {\n                return (\n                    <FilePreview \n                        file={file} \n                        key={`thumb_${index}`} \n                        onRemove={() => props.onRemove && props.onRemove(index)}\n                    />\n                )\n            } else { \n                return <div key={`no_file_${index}`} /> \n            }\n        })\n    }\n  \n    return (\n        <div \n            className='ce-message-files-row' \n            style={{ \n                width: '100%', \n                padding:  props.files.lenth > 0 ? '6px 16px' : '0px'\n            }}\n        >\n            { renderFiles() }\n        </div>\n    )\n}\n\nexport default FilesRow","import React, { useState, useEffect } from 'react'\n\nimport { CloseCircleTwoTone } from '@ant-design/icons'\n\nconst Thumbnail = props => {\n    const [hovered, setHovered] = useState(false)\n    const [blob, setBlob] = useState('')\n\n    useEffect(() => {\n      setBlob(URL.createObjectURL(props.file))\n    }, [props.file])\n    \n    return (\n        <div \n            style={{ padding: '6px', display: 'inline-block', position: \"relative\" }}\n            onMouseEnter={() => setHovered(true)}\n            onMouseLeave={() => setHovered(false)}\n        >\n            \n            <img\n                style={styles.imageSquare}\n                alt={props.file ? props.file.name : ''}\n                src={blob}\n            />\n\n            {\n                hovered &&\n                <CloseCircleTwoTone \n                    style={styles.closeIcon} \n                    onClick={() => props.onRemove && props.onRemove()}\n                />\n            }\n        </div>\n    )\n}\n\nexport default Thumbnail\n\nconst styles = {\n    imageSquare: { \n        height: '108px', \n        width: '108px', \n        border: '1px solid #afafaf',\n        borderRadius: '8px',\n        objectFit: 'cover',\n        display: 'inline',\n    },\n    closeIcon: {\n        position: 'absolute', \n        bottom: 'calc(100% - 32px)', \n        left: '96px', \n        width: '0px', \n        cursor: 'pointer'\n    }\n}\n","import React from 'react'\n\nimport Thumbnail from './Thumbnail'\n\nimport { isImage } from './isImage'\n\nconst ImagesRow = props => {\n    function renderFiles() {\n        return props.files.map((file, index) => {\n            if(isImage(file.name)) {\n                return (\n                    <Thumbnail \n                        file={file} \n                        key={`thumb_${index}`} \n                        onRemove={() => props.onRemove && props.onRemove(index)}\n                    />\n                )\n            } else { \n                return <div key={`no_thumb_${index}`} /> \n            }\n        })\n    }\n  \n    return (\n        <div\n            className='ce-message-images-row' \n            style={{ width: '100%', paddingLeft: '12px' }}\n        >\n            { renderFiles() }\n        </div>\n    )\n}\n\nexport default ImagesRow","import React, { useState } from 'react';\n\nimport { PaperClipOutlined } from '@ant-design/icons'\n\nconst AttachmentsInput = props => {\n    const [state, setState] = useState({\n        hovered: false,\n    })\n\n    function onSelect(event) {\n        const files = Array.from(event.target.files)\n        props.onSelectFiles &&  props.onSelectFiles(files)\n    }\n\n    return (\n        <form\n            className=\"uploader\"\n            encType=\"multipart/form-data\"\n            style={{ height: '0px' }}\n        >\n            <label\n                htmlFor=\"files\"\n                id='upload-document-button'\n            >\n                <PaperClipOutlined \n                    className='ce-attachment-icon'\n                    onMouseEnter={() => setState({ ...state, hovered: true })}\n                    onMouseLeave={() => setState({ ...state, hovered: false })}\n                    style={{\n                        ...styles.icon,\n                        ...{ color: state.hovered ? '#06c' : '#444' }\n                    }}\n                />\n            </label>\n\n            <input\n                multiple\n                id=\"files\"\n                style={{ visibility: \"hidden\" }}\n                type=\"file\"\n                onChange={(e) => onSelect(e)}\n                onClick={(e) => e.target.value = null}\n            />\n        </form>\n    );\n}\n\nconst styles = {\n    icon: {\n        background: 'none',\n        border: 'none',\n        cursor: 'pointer',\n        display: 'inline-block',\n        float: 'left',\n        height: '24px',\n        padding: '4px 5px',\n        width: '28px',\n    }\n}\n\nexport default AttachmentsInput\n","import React, { useState } from 'react'\n\nimport { ArrowUpOutlined } from '@ant-design/icons'\n\nconst SendButton = () => {\n    const [hover, setHover] = useState(false)\n\n    return (\n        <div style={{ height: \"0px\" }}>\n            <div \n                id=\"ce-send-message-button\"\n                onMouseEnter={() => setHover(true)}\n                onMouseLeave={() => setHover(false)}\n                style={{ \n                    cursor: 'pointer',\n                    backgroundColor: hover ? '#40a9ff' : '#1890ff',\n                    display: 'inline-block',\n                    padding: '5px 9px',\n                    borderRadius: '8px',\n                }}\n            >\n                <ArrowUpOutlined style={{ color: 'white' }} />\n            </div>\n        </div>\n    );\n}\n\nexport default SendButton\n","import React, {Component} from 'react'\n\nimport AttachmentsInput from './AttachmentsInput'\nimport SendButton from './SendButton'\n\nconst modules = {\n    toolbar: {\n        container: \"#toolbar\",\n    }\n}\n  \nconst formats = [\n    'bold', 'italic', 'underline', 'strike', 'code',\n    'list', 'bullet', 'indent',\n    'link', 'code',\n]\n\nexport default class FormHtmlEditor extends Component {\n    constructor(props) {\n        super(props)\n        if (document) {\n            this.quill = require('react-quill')\n        }\n    }\n\n    render() {\n        const Quill = this.quill\n        if (!Quill) return <div />\n    \n        return (\n            <div className='ce-quill-container'>\n                <Quill\n                    theme=\"snow\"\n                    modules={modules}\n                    formats={formats}\n                    value={this.props.value}\n                    onChange={this.props.onChange}\n                    onKeyDown={(e) => { if (e.keyCode === 13) { this.props.onSubmit() } }}\n                />\n\n                <div id=\"toolbar\">\n                    <button className=\"ql-bold\"></button>\n                    <button className=\"ql-italic\"></button>\n                    <button className=\"ql-underline\"></button>\n                    <button className=\"ql-strike\"></button>\n\n                    <button className=\"ql-code\"></button>\n                    <button className=\"ql-link\"></button>\n                    <AttachmentsInput \n                        onSelectFiles={(attachments) => this.props.onAttach(attachments)} \n                    />\n\n                    <div \n                        className='ce-send-button-container'\n                        onClick={this.props.onSubmit.bind(this)}\n                        style={{ position: 'absolute', right: '5px', bottom: '37px' }} \n                    >\n                        <SendButton />\n                    </div>\n                </div>\n\n                <style>{`\n                /*!\n                * Quill Editor v1.3.7\n                * https://quilljs.com/\n                * Copyright (c) 2014, Jason Chen\n                * Copyright (c) 2013, salesforce.com\n                */\n                .ql-container{box-sizing:border-box;font-family:Helvetica,Arial,sans-serif;font-size:13px;height:100%;margin:0;position:relative}.ql-container.ql-disabled .ql-tooltip{visibility:hidden}.ql-container.ql-disabled .ql-editor ul[data-checked]>li::before{pointer-events:none}.ql-clipboard{left:-100000px;height:1px;overflow-y:hidden;position:absolute;top:50%}.ql-clipboard p{margin:0;padding:0}.ql-editor{box-sizing:border-box;line-height:1.42;height:100%;outline:0;overflow-y:auto;padding:12px 15px;tab-size:4;-moz-tab-size:4;text-align:left;white-space:pre-wrap;word-wrap:break-word}.ql-editor>*{cursor:text}.ql-editor blockquote,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6,.ql-editor ol,.ql-editor p,.ql-editor pre,.ql-editor ul{margin:0;padding:0;counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol,.ql-editor ul{padding-left:1.5em}.ql-editor ol>li,.ql-editor ul>li{list-style-type:none}.ql-editor ul>li::before{content:{};}.ql-editor ul[data-checked=false]{pointer-events:none}.ql-editor ul[data-checked=false]>li *,.ql-editor ul[data-checked=true]>li *{pointer-events:all}.ql-editor ul[data-checked=false]>li::before,.ql-editor ul[data-checked=true]>li::before{color:#777;cursor:pointer;pointer-events:all}.ql-editor ul[data-checked=true]>li::before{content:{};}.ql-editor li:not(.ql-direction-rtl)::before{margin-left:-1.5em;margin-right:.3em;text-align:right}.ql-editor li.ql-direction-rtl::before{margin-left:.3em;margin-right:-1.5em}.ql-editor ol li:not(.ql-direction-rtl),.ql-editor ul li:not(.ql-direction-rtl){padding-left:1.5em}.ql-editor ol li.ql-direction-rtl,.ql-editor ul li.ql-direction-rtl{padding-right:1.5em}.ql-editor ol li{counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;counter-increment:list-0}.ql-editor ol li:before{content:counter(list-0,decimal) '. '}.ql-editor ol li.ql-indent-1{counter-increment:list-1}.ql-editor ol li.ql-indent-1:before{content:counter(list-1,lower-alpha) '. '}.ql-editor ol li.ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-2{counter-increment:list-2}.ql-editor ol li.ql-indent-2:before{content:counter(list-2,lower-roman) '. '}.ql-editor ol li.ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-3{counter-increment:list-3}.ql-editor ol li.ql-indent-3:before{content:counter(list-3,decimal) '. '}.ql-editor ol li.ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-4{counter-increment:list-4}.ql-editor ol li.ql-indent-4:before{content:counter(list-4,lower-alpha) '. '}.ql-editor ol li.ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-5{counter-increment:list-5}.ql-editor ol li.ql-indent-5:before{content:counter(list-5,lower-roman) '. '}.ql-editor ol li.ql-indent-5{counter-reset:list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-6{counter-increment:list-6}.ql-editor ol li.ql-indent-6:before{content:counter(list-6,decimal) '. '}.ql-editor ol li.ql-indent-6{counter-reset:list-7 list-8 list-9}.ql-editor ol li.ql-indent-7{counter-increment:list-7}.ql-editor ol li.ql-indent-7:before{content:counter(list-7,lower-alpha) '. '}.ql-editor ol li.ql-indent-7{counter-reset:list-8 list-9}.ql-editor ol li.ql-indent-8{counter-increment:list-8}.ql-editor ol li.ql-indent-8:before{content:counter(list-8,lower-roman) '. '}.ql-editor ol li.ql-indent-8{counter-reset:list-9}.ql-editor ol li.ql-indent-9{counter-increment:list-9}.ql-editor ol li.ql-indent-9:before{content:counter(list-9,decimal) '. '}.ql-editor .ql-indent-1:not(.ql-direction-rtl){padding-left:3em}.ql-editor li.ql-indent-1:not(.ql-direction-rtl){padding-left:4.5em}.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:3em}.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:4.5em}.ql-editor .ql-indent-2:not(.ql-direction-rtl){padding-left:6em}.ql-editor li.ql-indent-2:not(.ql-direction-rtl){padding-left:7.5em}.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:6em}.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:7.5em}.ql-editor .ql-indent-3:not(.ql-direction-rtl){padding-left:9em}.ql-editor li.ql-indent-3:not(.ql-direction-rtl){padding-left:10.5em}.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:9em}.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:10.5em}.ql-editor .ql-indent-4:not(.ql-direction-rtl){padding-left:12em}.ql-editor li.ql-indent-4:not(.ql-direction-rtl){padding-left:13.5em}.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:12em}.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:13.5em}.ql-editor .ql-indent-5:not(.ql-direction-rtl){padding-left:15em}.ql-editor li.ql-indent-5:not(.ql-direction-rtl){padding-left:16.5em}.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:15em}.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:16.5em}.ql-editor .ql-indent-6:not(.ql-direction-rtl){padding-left:18em}.ql-editor li.ql-indent-6:not(.ql-direction-rtl){padding-left:19.5em}.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:18em}.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:19.5em}.ql-editor .ql-indent-7:not(.ql-direction-rtl){padding-left:21em}.ql-editor li.ql-indent-7:not(.ql-direction-rtl){padding-left:22.5em}.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:21em}.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:22.5em}.ql-editor .ql-indent-8:not(.ql-direction-rtl){padding-left:24em}.ql-editor li.ql-indent-8:not(.ql-direction-rtl){padding-left:25.5em}.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:24em}.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:25.5em}.ql-editor .ql-indent-9:not(.ql-direction-rtl){padding-left:27em}.ql-editor li.ql-indent-9:not(.ql-direction-rtl){padding-left:28.5em}.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:27em}.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:28.5em}.ql-editor .ql-video{display:block;max-width:100%}.ql-editor .ql-video.ql-align-center{margin:0 auto}.ql-editor .ql-video.ql-align-right{margin:0 0 0 auto}.ql-editor .ql-bg-black{background-color:#000}.ql-editor .ql-bg-red{background-color:#e60000}.ql-editor .ql-bg-orange{background-color:#f90}.ql-editor .ql-bg-yellow{background-color:#ff0}.ql-editor .ql-bg-green{background-color:#008a00}.ql-editor .ql-bg-blue{background-color:#06c}.ql-editor .ql-bg-purple{background-color:#93f}.ql-editor .ql-color-white{color:#fff}.ql-editor .ql-color-red{color:#e60000}.ql-editor .ql-color-orange{color:#f90}.ql-editor .ql-color-yellow{color:#ff0}.ql-editor .ql-color-green{color:#008a00}.ql-editor .ql-color-blue{color:#06c}.ql-editor .ql-color-purple{color:#93f}.ql-editor .ql-font-serif{font-family:Georgia,Times New Roman,serif}.ql-editor .ql-font-monospace{font-family:Monaco,Courier New,monospace}.ql-editor .ql-size-small{font-size:.75em}.ql-editor .ql-size-large{font-size:1.5em}.ql-editor .ql-size-huge{font-size:2.5em}.ql-editor .ql-direction-rtl{direction:rtl;text-align:inherit}.ql-editor .ql-align-center{text-align:center}.ql-editor .ql-align-justify{text-align:justify}.ql-editor .ql-align-right{text-align:right}.ql-editor.ql-blank::before{color:rgba(0,0,0,.6);content:attr(data-placeholder);font-style:italic;left:15px;pointer-events:none;position:absolute;right:15px}.ql-snow .ql-toolbar:after,.ql-snow.ql-toolbar:after{clear:both;content:'';display:table}.ql-snow .ql-toolbar button,.ql-snow.ql-toolbar button{background:0 0;border:none;cursor:pointer;display:inline-block;float:left;height:24px;padding:3px 5px;width:28px}.ql-snow .ql-toolbar button svg,.ql-snow.ql-toolbar button svg{float:left;height:100%}.ql-snow .ql-toolbar button:active:hover,.ql-snow.ql-toolbar button:active:hover{outline:0}.ql-snow .ql-toolbar input.ql-image[type=file],.ql-snow.ql-toolbar input.ql-image[type=file]{display:none}.ql-snow .ql-toolbar .ql-picker-item.ql-selected,.ql-snow .ql-toolbar .ql-picker-item:hover,.ql-snow .ql-toolbar .ql-picker-label.ql-active,.ql-snow .ql-toolbar .ql-picker-label:hover,.ql-snow .ql-toolbar button.ql-active,.ql-snow .ql-toolbar button:focus,.ql-snow .ql-toolbar button:hover,.ql-snow.ql-toolbar .ql-picker-item.ql-selected,.ql-snow.ql-toolbar .ql-picker-item:hover,.ql-snow.ql-toolbar .ql-picker-label.ql-active,.ql-snow.ql-toolbar .ql-picker-label:hover,.ql-snow.ql-toolbar button.ql-active,.ql-snow.ql-toolbar button:focus,.ql-snow.ql-toolbar button:hover{color:#06c}.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:focus .ql-fill,.ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:hover .ql-fill,.ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar button:focus .ql-fill,.ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill,.ql-snow.ql-toolbar button:hover .ql-fill,.ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill{fill:#06c}.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-snow .ql-toolbar button.ql-active .ql-stroke,.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar button:focus .ql-stroke,.ql-snow .ql-toolbar button:focus .ql-stroke-miter,.ql-snow .ql-toolbar button:hover .ql-stroke,.ql-snow .ql-toolbar button:hover .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-snow.ql-toolbar button.ql-active .ql-stroke,.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar button:focus .ql-stroke,.ql-snow.ql-toolbar button:focus .ql-stroke-miter,.ql-snow.ql-toolbar button:hover .ql-stroke,.ql-snow.ql-toolbar button:hover .ql-stroke-miter{stroke:#06c}@media (pointer:coarse){.ql-snow .ql-toolbar button:hover:not(.ql-active),.ql-snow.ql-toolbar button:hover:not(.ql-active){color:#444}.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill{fill:#444}.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter{stroke:#444}}.ql-snow{box-sizing:border-box}.ql-snow *{box-sizing:border-box}.ql-snow .ql-hidden{display:none}.ql-snow .ql-out-bottom,.ql-snow .ql-out-top{visibility:hidden}.ql-snow .ql-tooltip{position:absolute;transform:translateY(10px)}.ql-snow .ql-tooltip a{cursor:pointer;text-decoration:none}.ql-snow .ql-tooltip.ql-flip{transform:translateY(-10px)}.ql-snow .ql-formats{display:inline-block;vertical-align:middle}.ql-snow .ql-formats:after{clear:both;content:'';display:table}.ql-snow .ql-stroke{fill:none;stroke:#444;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}.ql-snow .ql-stroke-miter{fill:none;stroke:#444;stroke-miterlimit:10;stroke-width:2}.ql-snow .ql-fill,.ql-snow .ql-stroke.ql-fill{fill:#444}.ql-snow .ql-empty{fill:none}.ql-snow .ql-even{fill-rule:evenodd}.ql-snow .ql-stroke.ql-thin,.ql-snow .ql-thin{stroke-width:1}.ql-snow .ql-transparent{opacity:.4}.ql-snow .ql-direction svg:last-child{display:none}.ql-snow .ql-direction.ql-active svg:last-child{display:inline}.ql-snow .ql-direction.ql-active svg:first-child{display:none}.ql-snow .ql-editor h1{font-size:2em}.ql-snow .ql-editor h2{font-size:1.5em}.ql-snow .ql-editor h3{font-size:1.17em}.ql-snow .ql-editor h4{font-size:1em}.ql-snow .ql-editor h5{font-size:.83em}.ql-snow .ql-editor h6{font-size:.67em}.ql-snow .ql-editor a{text-decoration:underline}.ql-snow .ql-editor blockquote{border-left:4px solid #ccc;margin-bottom:5px;margin-top:5px;padding-left:16px}.ql-snow .ql-editor code,.ql-snow .ql-editor pre{background-color:#f0f0f0;border-radius:3px}.ql-snow .ql-editor pre{white-space:pre-wrap;margin-bottom:5px;margin-top:5px;padding:5px 10px}.ql-snow .ql-editor code{font-size:85%;padding:2px 4px}.ql-snow .ql-editor pre.ql-syntax{background-color:#23241f;color:#f8f8f2;overflow:visible}.ql-snow .ql-editor img{max-width:100%}.ql-snow .ql-picker{color:#444;display:inline-block;float:left;font-size:14px;font-weight:500;height:24px;position:relative;vertical-align:middle}.ql-snow .ql-picker-label{cursor:pointer;display:inline-block;height:100%;padding-left:8px;padding-right:2px;position:relative;width:100%}.ql-snow .ql-picker-label::before{display:inline-block;line-height:22px}.ql-snow .ql-picker-options{background-color:#fff;display:none;min-width:100%;padding:4px 8px;position:absolute;white-space:nowrap}.ql-snow .ql-picker-options .ql-picker-item{cursor:pointer;display:block;padding-bottom:5px;padding-top:5px}.ql-snow .ql-picker.ql-expanded .ql-picker-label{color:#ccc;z-index:2}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill{fill:#ccc}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke{stroke:#ccc}.ql-snow .ql-picker.ql-expanded .ql-picker-options{display:block;margin-top:-1px;top:100%;z-index:1}.ql-snow .ql-color-picker,.ql-snow .ql-icon-picker{width:28px}.ql-snow .ql-color-picker .ql-picker-label,.ql-snow .ql-icon-picker .ql-picker-label{padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-label svg,.ql-snow .ql-icon-picker .ql-picker-label svg{right:4px}.ql-snow .ql-icon-picker .ql-picker-options{padding:4px 0}.ql-snow .ql-icon-picker .ql-picker-item{height:24px;width:24px;padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-options{padding:3px 5px;width:152px}.ql-snow .ql-color-picker .ql-picker-item{border:1px solid transparent;float:left;height:16px;margin:2px;padding:0;width:16px}.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg{position:absolute;margin-top:-9px;right:0;top:50%;width:18px}.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=''])::before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=''])::before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=''])::before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=''])::before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=''])::before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=''])::before{content:attr(data-label)}.ql-snow .ql-picker.ql-header{width:98px}.ql-snow .ql-picker.ql-header .ql-picker-item::before,.ql-snow .ql-picker.ql-header .ql-picker-label::before{content:'Normal'}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"1\"]::before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"1\"]::before{content:'Heading 1'}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"2\"]::before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"2\"]::before{content:'Heading 2'}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"3\"]::before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"3\"]::before{content:'Heading 3'}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"4\"]::before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"4\"]::before{content:'Heading 4'}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"5\"]::before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"5\"]::before{content:'Heading 5'}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"6\"]::before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\"6\"]::before{content:'Heading 6'}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"1\"]::before{font-size:2em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"2\"]::before{font-size:1.5em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"3\"]::before{font-size:1.17em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"4\"]::before{font-size:1em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"5\"]::before{font-size:.83em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\"6\"]::before{font-size:.67em}.ql-snow .ql-picker.ql-font{width:108px}.ql-snow .ql-picker.ql-font .ql-picker-item::before,.ql-snow .ql-picker.ql-font .ql-picker-label::before{content:'Sans Serif'}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]::before{content:'Serif'}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]::before{content:'Monospace'}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before{font-family:Georgia,Times New Roman,serif}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before{font-family:Monaco,Courier New,monospace}.ql-snow .ql-picker.ql-size{width:98px}.ql-snow .ql-picker.ql-size .ql-picker-item::before,.ql-snow .ql-picker.ql-size .ql-picker-label::before{content:'Normal'}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]::before{content:'Small'}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]::before{content:'Large'}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]::before{content:'Huge'}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before{font-size:10px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before{font-size:18px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before{font-size:32px}.ql-snow .ql-color-picker.ql-background .ql-picker-item{background-color:#fff}.ql-snow .ql-color-picker.ql-color .ql-picker-item{background-color:#000}.ql-toolbar.ql-snow{border:1px solid #ccc;box-sizing:border-box;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:8px}.ql-toolbar.ql-snow .ql-formats{margin-right:15px}.ql-toolbar.ql-snow .ql-picker-label{border:1px solid transparent}.ql-toolbar.ql-snow .ql-picker-options{border:1px solid transparent;box-shadow:rgba(0,0,0,.2) 0 2px 8px}.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label{border-color:#ccc}.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options{border-color:#ccc}.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover{border-color:#000}.ql-toolbar.ql-snow+.ql-container.ql-snow{border-top:0}.ql-snow .ql-tooltip{background-color:#fff;border:1px solid #ccc;box-shadow:0 0 5px #ddd;color:#444;padding:5px 12px;white-space:nowrap}.ql-snow .ql-tooltip::before{content:\"Visit URL:\";line-height:26px;margin-right:8px}.ql-snow .ql-tooltip input[type=text]{display:none;border:1px solid #ccc;font-size:13px;height:26px;margin:0;padding:3px 5px;width:170px}.ql-snow .ql-tooltip a.ql-preview{display:inline-block;max-width:200px;overflow-x:hidden;text-overflow:ellipsis;vertical-align:top}.ql-snow .ql-tooltip a.ql-action::after{border-right:1px solid #ccc;content:'Edit';margin-left:16px;padding-right:8px}.ql-snow .ql-tooltip a.ql-remove::before{content:'Remove';margin-left:8px}.ql-snow .ql-tooltip a{line-height:26px}.ql-snow .ql-tooltip.ql-editing a.ql-preview,.ql-snow .ql-tooltip.ql-editing a.ql-remove{display:none}.ql-snow .ql-tooltip.ql-editing input[type=text]{display:inline-block}.ql-snow .ql-tooltip.ql-editing a.ql-action::after{border-right:0;content:'Save';padding-right:0}.ql-snow .ql-tooltip[data-mode=link]::before{content:\"Enter link:\"}.ql-snow .ql-tooltip[data-mode=formula]::before{content:\"Enter formula:\"}.ql-snow .ql-tooltip[data-mode=video]::before{content:\"Enter video:\"}.ql-snow a{color:#06c}.ql-container.ql-snow{border:1px solid #ccc}\n                `}</style>\n            </div>\n        )\n    }\n}","import React, { useContext, useState, useEffect } from 'react'\n\nimport { sendMessage, isTyping, ChatEngineContext } from 'react-chat-engine'\n\nimport FilesRow from './FilesRow'\nimport ImagesRow from './ImagesRow'\n\nimport NextQuill from './NextQuill'\n\nconst NewMessageForm = () => {\n  const { \n    conn, \n    activeChat, \n    messages, \n    setMessages \n  } = useContext(ChatEngineContext)\n  \n  const [iter, setIter] = useState(0) // Forces attachments update\n  const [value, setValue] = useState('')\n  const [trigger, setTrigger] = useState(0)\n  const [attachments, setAttachments] = useState([])\n\n  function onRemove(index) {\n    const newAttachments = attachments\n    newAttachments.splice(index, 1)\n    setAttachments(newAttachments)\n    setIter(iter + 1)\n  }\n  \n  function handleChange(value) {\n    setValue(value)\n    setTrigger((trigger + 1) % 4)\n    if (trigger === 1) { conn && isTyping(conn, activeChat) }\n  }\n  \n  function handleSubmit() {\n    if (!conn) return \n\n    let text = value.trim()\n    if (text.length > 11 && text.slice(-11) === '<p><br></p>') { text = text.substr(0, text.length - 11) }\n\n    const custom_json = { sender_id: Date.now().toString() }\n    const sender_username = conn.userName ? conn.userName : conn.senderUsername\n    const created = new Date().toISOString().replace('T', ' ').replace('Z', `${Math.floor(Math.random() * 1000)}+00:00`)\n    const data = { text, attachments, custom_json, sender_username, chat: activeChat, created }\n\n    if (text.length > 0 || attachments.length > 0) {\n      sendMessage(conn, activeChat, data, () => {})\n    }\n\n    setValue('')\n    setAttachments([])\n\n    let newMessages = {...messages}\n    newMessages[data.created] = data\n    setMessages(newMessages)\n  }\n\n  return (\n    <div \n      id='msg-form-container'\n      style={styles.NewMessageFormContainer}\n      className='ce-message-form-container'\n    >\n      <ImagesRow files={attachments} onRemove={(i) => onRemove(i)} />\n\n      <FilesRow files={attachments} onRemove={(i) => onRemove(i)} />\n\n      <NextQuill\n        theme='snow'\n        value={value}\n        onChange={handleChange.bind(this)}\n        onSubmit={handleSubmit.bind(this)}\n        onAttach={setAttachments.bind(this)}\n      />\n    </div>\n  );\n}\n\nexport default NewMessageForm\n\nconst styles = {\n  NewMessageFormContainer: { \n    position: 'absolute', \n    bottom: '0px', \n    width: '100%', \n    backgroundColor: 'white',\n  },\n}","import React, { useContext, useState, useEffect, useRef } from 'react'\n\nimport { ChatEngineContext } from 'react-chat-engine'\n\nimport { CaretDownOutlined } from '@ant-design/icons'\n\nimport { animateScroll } from \"react-scroll\"\n\nconst ScrollDownBar = (props) => {\n    const didMountRef = useRef(false)\n    const [isVisible, setIsVisible] = useState(false)\n    const { conn, isBottomVisible } = useContext(ChatEngineContext)\n    const { chat } = props\n\n    useEffect(() => {\n        if (!didMountRef.current) {\n            didMountRef.current = true\n            setTimeout(\n                () => setIsVisible(true), \n                props.renderDelay ? props.renderDelay : 0\n            )\n        }\n    })\n\n    if (conn === null || !chat || chat === null) return <div />\n\n    let lastReadMessage = undefined\n    chat.people.map(person => {\n        if (person.person.username === conn.userName) {\n            lastReadMessage = person.last_read\n        }\n    })\n\n    if (\n        !isVisible ||\n        isBottomVisible ||\n        chat.last_message.id === undefined ||\n        chat.last_message.id === lastReadMessage\n    ) { return <div /> }\n\n    return (\n        <div\n            style={{\n                zIndex: '1',\n                bottom: '94px',\n                left: 'calc(50% - 78px)',\n                position: 'absolute',\n                fontSize: '15px',\n                padding: '10px 22px',\n                color: 'white',\n                backgroundColor: '#389e0d',\n                borderRadius: '1.3em',\n                cursor: 'pointer',\n            }}\n            id='ce-scroll-down-bar'\n            onClick={() => animateScroll.scrollToBottom({ duration: 333, containerId: \"ce-feed-container\" })}\n        >\n            <CaretDownOutlined />\n            {conn.userName ? ' Unread Messages' : ' Scroll to Bottom'}\n        </div>\n    )\n}\n\nexport default ScrollDownBar\n","import React, { useContext, useState, useEffect } from 'react'\n\nimport {\n  ChatEngineContext,\n  getLatestMessages,\n  readMessage\n} from 'react-chat-engine'\n\nimport { AuthFail, CreateChat, IceBreaker } from './Steps'\n\nimport { RenderTrigger } from './Triggers'\n\nimport ChatHeader from './ChatHeader'\nimport Messages from './Messages'\nimport IsTyping from './IsTyping'\nimport NewMessageForm from './NewMessageForm'\nimport ScrollDownBar from './ScrollDownBar'\n\nimport _ from 'lodash'\n\nimport { animateScroll } from 'react-scroll'\n\nconst initial = 45\nlet count = initial\nconst interval = 33\n\nconst ChatFeed = (props) => {\n  const [hasFetchedMessages, setHasFetchedMessages] = useState(false)\n  const [currentChat, setCurrentChat] = useState(null)\n  const {\n    conn,\n    chats,\n    setChats,\n    messages,\n    setMessages,\n    activeChat,\n    setActiveChat,\n    loadMoreMessages,\n    setLoadMoreMessages,\n    isBottomVisible,\n    typingCounter\n  } = useContext(ChatEngineContext)\n\n  const typers =\n    typingCounter && typingCounter[activeChat] ? typingCounter[activeChat] : []\n  const chat = chats && chats[currentChat]\n  const needsIceBreaker = hasFetchedMessages && _.isEmpty(messages)\n\n  function onReadMessage(chat) {\n    if (chats) {\n      const newChats = { ...chats }\n      newChats[chat.id] = chat\n      setChats(newChats)\n    }\n  }\n\n  function onGetMessages(chatId, messages, scrollDownTo) {\n    setHasFetchedMessages(true)\n    setMessages(_.mapKeys(messages, 'created'))\n\n    if (messages.length > 0) {\n      const message = messages[messages.length - 1]\n\n      if (props.userName && props.userName !== message.sender_username) {\n        readMessage(conn, chatId, message.id, (chat) => onReadMessage(chat))\n      }\n    }\n\n    if (scrollDownTo) {\n      animateScroll.scrollToBottom({ duration: 0, containerId: scrollDownTo })\n    }\n\n    props.onGetMessages && props.onGetMessages(chatId, messages)\n  }\n\n  function loadMessages(loadMoreMessages) {\n    // Message Loader triggers\n    if (loadMoreMessages) {\n      count = count + interval\n      setLoadMoreMessages(false)\n\n      getLatestMessages(conn, activeChat, count, (chatId, messages) =>\n        onGetMessages(chatId, messages, false)\n      )\n\n      // Active Chat passed by context\n    } else if (\n      conn &&\n      !props.activeChat &&\n      activeChat !== null &&\n      activeChat !== currentChat\n    ) {\n      count = initial\n      setCurrentChat(activeChat)\n\n      getLatestMessages(conn, activeChat, count, (chatId, messages) =>\n        onGetMessages(chatId, messages, 'ce-feed-container')\n      )\n\n      // Active Chat passed by props\n    } else if (conn && props.activeChat && props.activeChat !== currentChat) {\n      count = initial\n      setActiveChat(props.activeChat)\n      setCurrentChat(props.activeChat)\n\n      getLatestMessages(conn, props.activeChat, count, (chatId, messages) =>\n        onGetMessages(chatId, messages, 'ce-feed-container')\n      )\n    }\n  }\n\n  useEffect(() => {\n    loadMessages(false)\n  }, [conn, activeChat, currentChat])\n  useEffect(() => {\n    loadMessages(loadMoreMessages)\n  }, [loadMoreMessages])\n\n  function getMyLastMessage(userName, chat) {\n    let lastReadMessage = undefined\n    chat.people.map((person) => {\n      if (person.person.username === userName) {\n        lastReadMessage = person.last_read\n      }\n    })\n    return lastReadMessage\n  }\n\n  useEffect(() => {\n    // Scroll on new incoming messages\n    if (isBottomVisible && !_.isEmpty(messages)) {\n      setTimeout(() => {\n        animateScroll.scrollToBottom({\n          duration: 333,\n          containerId: 'ce-feed-container'\n        })\n      }, 100)\n\n      if (\n        getMyLastMessage(conn.userName, chat) &&\n        getMyLastMessage(conn.userName, chat) !== chat.last_message.id\n      ) {\n        readMessage(conn, currentChat, chat.last_message.id, (chat) =>\n          onReadMessage(chat)\n        )\n      }\n    }\n  }, [messages, isBottomVisible])\n\n  if (conn === undefined) {\n    return <AuthFail {...props} />\n  } else if (conn && chats !== null && _.isEmpty(chats)) {\n    return <CreateChat />\n  }\n\n  return (\n    <div\n      className='ce-chat-feed'\n      style={{ height: '100%', maxHeight: '100vh', backgroundColor: '#f0f0f0' }}\n    >\n      {props.renderChatHeader ? props.renderChatHeader(chat) : <ChatHeader />}\n\n      <div\n        id='ce-feed-container'\n        style={styles.feedContainer}\n        className='ce-chat-feed-container'\n      >\n        <div style={{ height: '88px' }} className='ce-feed-container-top' />\n\n        {Object.keys(messages).length > 0 && (\n          <RenderTrigger onEnter={() => setLoadMoreMessages(true)} />\n        )}\n\n        {needsIceBreaker &&\n          props.renderIceBreaker &&\n          props.renderIceBreaker(chat)}\n\n        {needsIceBreaker && !props.renderIceBreaker && <IceBreaker />}\n\n        <Messages {...props} />\n\n        {props.renderIsTyping ? props.renderIsTyping(typers) : <IsTyping />}\n\n        {props.renderScrollDownBar ? (\n          props.renderScrollDownBar(chat)\n        ) : (\n          <ScrollDownBar chat={chat} renderDelay={3000} />\n        )}\n\n        <div style={{ height: '86px' }} className='ce-feed-container-bottom' />\n      </div>\n\n      {props.renderNewMessageForm ? (\n        props.renderNewMessageForm(props, currentChat)\n      ) : (\n        <NewMessageForm />\n      )}\n    </div>\n  )\n}\n\nexport default ChatFeed\n\nconst styles = {\n  feedContainer: {\n    width: '100%',\n    height: '100%',\n    maxHeight: '100vh',\n    overflowX: 'hidden',\n    overflowY: 'scroll',\n    backgroundColor: 'white'\n  }\n}\n","import React, { useContext } from 'react'\n\nimport { ChatEngineContext } from '../Context'\n\nimport _ from 'lodash'\n\nimport { Socket } from '../Sockets'\n\nimport ChatList from './ChatList'\nimport ChatFeed from './ChatFeed'\nimport ChatSettings from './ChatSettings'\n\nimport { Row, Col } from 'react-grid-system'\nimport { setConfiguration } from 'react-grid-system'\n\n// TODO: One off imports for Teams tutorial\nimport { getLatestMessages } from 'react-chat-engine'\n\nsetConfiguration({ maxScreenClass: 'xl', gutterWidth: 0 })\n\nconst ChatEngine = (props) => {\n  const context = useContext(ChatEngineContext)\n  const { height } = props\n  const propsAndContext = { ...props, ...context }\n\n  return (\n    <div\n      className='ce-chat-engine'\n      style={{ textAlign: 'left', backgroundColor: 'white' }}\n    >\n      <Socket {...props} />\n\n      <Row className='ce-wrapper'>\n        <Col\n          xs={0}\n          sm={3}\n          style={{ height: height ? height : '' }}\n          className='ce-chat-list-column'\n        >\n          {props.renderChatList ? (\n            props.renderChatList(propsAndContext)\n          ) : (\n            <ChatList\n              {...propsAndContext}\n              // TODO: One off code for Teams tutorial\n              onChatClick={(chatID) => {\n                if (props.renderChatFeed) {\n                  getLatestMessages(props, chatID, 45, (id, list) => {\n                    context.setMessages({ ..._.mapKeys(list, 'created') })\n                  })\n                }\n              }}\n            />\n          )}\n        </Col>\n\n        <Col\n          xs={12}\n          sm={6}\n          style={{ height: height ? height : '' }}\n          className='ce-chat-feed-column'\n        >\n          {props.renderChatFeed ? (\n            props.renderChatFeed(propsAndContext)\n          ) : (\n            <ChatFeed {...propsAndContext} />\n          )}\n        </Col>\n\n        <Col\n          xs={0}\n          sm={3}\n          style={{ height: height ? height : '' }}\n          className='ce-settings-column'\n        >\n          {props.renderChatSettings ? (\n            props.renderChatSettings(props)\n          ) : (\n            <ChatSettings {...props} />\n          )}\n        </Col>\n      </Row>\n    </div>\n  )\n}\n\nexport default ChatEngine\n","import React, { useContext } from 'react'\n\nimport ChatEngine from './ChatEngine'\n\nimport { ChatEngineWrapper, ChatEngineContext } from './Context'\n\nconst ChatEngineApp = (props) => {\n    if (useContext(ChatEngineContext)) {\n        return <ChatEngine {...props} />\n    } else {\n        return <ChatEngineWrapper><ChatEngine {...props} /></ChatEngineWrapper>\n    }\n    \n}\n\nexport default ChatEngineApp\n","import React, { Component } from 'react'\nimport PropTypes from 'prop-types'\n\nimport { PlusOutlined, DeleteOutlined, UserAddOutlined } from '@ant-design/icons'\n\nexport default class Button extends Component {\n    state = {\n        hovered: false\n    }\n\n    render() {\n        const { value, icon, theme, style, id, type, onClick } = this.props\n\n        const customStyle = style ? style : {}\n        const hoverStyle = this.state.hovered ? styles.hoverButton : {}\n        const themeStyle = theme === 'danger' ? styles.dangerButton : styles.button\n\n        return (\n            <button \n                id={id}\n                type={type}\n                onClick={() => onClick && onClick()}\n                onMouseEnter={() => this.setState({ hovered: true })}\n                onMouseLeave={() => this.setState({ hovered: false })}\n                style={{ ...themeStyle, ...customStyle, ...hoverStyle }}\n                className={`ce-primary-button ${theme === 'danger' ? 'ce-danger-button' : ''}`}\n            >\n                { icon === 'plus' && <PlusOutlined /> }\n                { icon === 'delete'  && <DeleteOutlined /> }\n                { icon === 'user-add'  && <UserAddOutlined /> }\n\n                { value && icon ? ` ${value}` : value}  \n            </button>\n        )\n    }\n}\n\nconst styles = {\n    button: {\n        color: 'white',\n        border: 'none',\n        outline: 'none',\n        height: '36px',\n        fontSize: '15px',\n        cursor: 'pointer',\n        padding: '8px 16px',\n        borderRadius: '33px',\n        backgroundColor: '#1890ff'\n    },\n    dangerButton: {\n        color: 'red',\n        border: 'none',\n        outline: 'none',\n        height: '36px',\n        fontSize: '15px',\n        cursor: 'pointer',\n        padding: '8px 16px',\n        borderRadius: '33px',\n        backgroundColor: 'white',\n        border: '1px solid red',\n    },\n    hoverButton: {\n        opacity: '0.66',\n    }\n}\n\nButton.propTypes = {\n    value: PropTypes.string,\n    onClick: PropTypes.func,\n    style: PropTypes.object,\n    id: PropTypes.string,\n    icon: PropTypes.oneOf([undefined, 'plus', 'delete', 'user-add']),\n    theme: PropTypes.oneOf([undefined, 'danger']),\n    type: PropTypes.oneOf([undefined, 'submit']), \n}","import React, { Component } from 'react'\nimport PropTypes from 'prop-types'\n\nimport { stringToColor } from '../../../Utilities/colorMapping' \n\n\nexport default class Avatar extends Component {\n    state = { avatar: '' }  \n\n    updateImg() {\n        let { avatar } = this.props\n        avatar = avatar && avatar !== null ? avatar : ''\n        \n        if (avatar.split('?')[0] !== this.state.avatar.split('?')[0]) {\n            this.setState({ avatar })\n        }\n    }\n\n    componentDidMount() { this.updateImg() }\n\n    componentDidUpdate() { this.updateImg() }\n\n    render() {\n        const { username, is_online } = this.props\n        const customStyle = this.props.style ? this.props.style : {}\n        const text = username ? username.substring(0, 2).toUpperCase() : ''\n        const color = stringToColor(username)    \n                \n        return (\n            <div style={{ width: '48px', height: '48px' }}>\n                <div style={{ height: '0px' }}>\n                    <div \n                        className='ce-avatar'\n                        style={{ \n                            ...styles.avatar, \n                            ...customStyle, \n                            ...{ \n                                backgroundColor: this.state.avatar ? 'white' : color,\n                                backgroundImage: this.state.avatar && `url(${this.state.avatar})`,\n                                backgroundRepeat: 'no-repeat',\n                                backgroundPosition: 'center',\n                                backgroundSize: '48px',\n                            }\n                        }}\n                    >   \n                        <div \n                            className='ce-avatar-text'\n                            style={styles.avatarText}\n                        >\n                            { !this.state.avatar && text }\n                        </div>\n                    </div>\n                </div>\n\n                {\n                    this.props.show_online !== false && \n                    <div\n                        className='ce-avatar-status'\n                        style={{\n                            ...styles.status, \n                            ...{ backgroundColor: is_online ? '#52c41a' : '#f5222d' }\n                        }}\n                    />\n                }\n            </div>\n        )\n    }\n}\n\nconst styles = {\n    avatar: {\n        width: '44px',\n        height: '44px',\n        borderRadius: '22px',\n        color: 'white',\n        textAlign: 'center',\n    },\n    avatarText: {\n        color: 'white', \n        paddingTop: '12px', \n        fontSize: '15px', \n        fontWeight: '600'\n    },\n    status: { \n        width: '8px', \n        height: '8px', \n        borderRadius: '100%', \n        border: '2px solid white',   \n    }\n}\n\nAvatar.propTypes = {\n    avatar: PropTypes.string,\n    username: PropTypes.string,\n    style: PropTypes.object,\n    is_online: PropTypes.bool,\n    show_online: PropTypes.bool,\n}","import React, { Component } from 'react'\nimport PropTypes from 'prop-types'\n\n\nexport default class TextInput extends Component {\n    state = {\n        focused: false,\n        value: null\n    }\n\n    componentDidMount() {\n        const value = this.props.default\n        if(value) {\n            const event = {target: {value}}\n            this.props.handleChange(event)\n            this.setState({ value })\n        }\n    }\n\n    render() {\n        const customStyle = this.props.style ? this.props.style : {}\n        const defaultStyle = this.state.focused ? styles.focusInput : styles.input\n\n        return (\n            // NOTE: You may need to make a div the searchContainer to put icons in...\n            <input \n                id={this.props.id}\n                autoFocus={this.props.autoFocus}\n                className='ce-input ce-text-input'\n                value={this.props.value} \n                placeholder={this.props.label}\n                style={{ ...defaultStyle, ...customStyle }}\n                onBlur={() => {\n                    this.setState({ focused: false });\n                    this.props.onBlur && this.props.onBlur();\n                }}\n                onFocus={() => {\n                    this.setState({ focused: true });\n                    this.props.onFocus && this.props.onFocus();\n                }}\n                type={this.props.type ? this.props.type : \"text\" }\n                onChange={(e) => this.props.handleChange && this.props.handleChange(e)} \n            />\n        )\n    }\n}\n\nconst styles = {\n    input: {\n        // Sizes\n        height: '36px',\n        fontSize: '15px',\n        // Border\n        outline: 'none',\n        borderRadius: '24px',\n        border: '1px solid #d9d9d9',\n        // Padding and fixed width\n        padding: '0px 12px',\n        boxSizing: 'border-box',\n    },\n    focusInput: {\n        // Sizes\n        height: '36px',\n        fontSize: '15px',\n        // Border\n        outline: 'none',\n        borderRadius: '24px',\n        border: '1px solid #1890ff',\n        // Padding and fixed width\n        padding: '0px 12px',\n        boxSizing: 'border-box',\n    }\n}\n\nTextInput.propTypes = {\n    default: PropTypes.string,\n    value: PropTypes.string,\n    label: PropTypes.string,\n    type: PropTypes.oneOf(['text', 'password', 'number']),\n    autoFocus: PropTypes.bool,\n    id: PropTypes.string,\n    style: PropTypes.object,\n    handleChange: PropTypes.func,\n    onFocus: PropTypes.func,\n    onBlur: PropTypes.func,\n}\n","import React, { Component } from 'react'\nimport PropTypes from 'prop-types'\n\nimport { CloseOutlined } from '@ant-design/icons'\n\nexport default class AutoCompleteInput extends Component {\n    state = {\n        focused: false,\n        showAll: false,\n    }\n\n    onFocus() {\n        this.onChange('', true)\n        this.setState({ focused: true })\n        this.props.onFocus && this.props.onFocus()\n    }\n\n    onBlur() {\n        this.setState({ focused: false })\n        this.props.onBlur && this.props.onBlur()\n    }\n\n    onChange(value, showAll) {\n        this.setState({ showAll })\n        this.props.handleChange && this.props.handleChange(value)\n    }\n\n    getNames() {\n        let count = 0\n        const max = this.props.max ? this.props.max : 3\n        \n        const results = []\n\n        this.props.options.map(option => {\n            if (JSON.stringify(option).toLowerCase().indexOf(this.props.value.toLowerCase()) !== -1 && count < max) {\n                count = count + 1\n                results.push(option)\n            }\n        })\n        \n        return results\n    }\n\n\n    renderOptions() {\n        if(!this.props.value && !this.state.showAll) { return <div /> }\n\n        const results = this.getNames()\n\n        return results.map((option, index) => {\n            return (\n                <div key={`option_${index}`} className='ce-autocomplete-option'>\n                    { this.props.renderOption && this.props.renderOption(option) }\n\n                    { \n                        index === results.length - 1 && \n                        <div \n                            style={styles.close} \n                            className='ce-autocomplete-close'\n                            onClick={() => this.onChange('', false)}\n                        >\n                            <CloseOutlined />\n                        </div>\n                    }\n                </div>\n            )\n        })\n    }\n\n    render() {\n        const { options } = this.props\n        const customStyle = this.props.style ? this.props.style : {}\n        const defaultStyle = { ...styles.input, ...{ border: this.state.focused ? '1px solid #1890ff' : '1px solid #d9d9d9' } }\n\n        return (\n            <div>\n                <input \n                    id='ce-add-username-input'\n                    className='ce-input ce-autocomplete-input'\n                    value={this.props.value} \n                    placeholder={this.props.label}\n                    style={{ ...defaultStyle, ...customStyle }}\n                    type={this.props.type ? this.props.type : \"text\" }\n                    onBlur={() => this.onBlur()}\n                    onFocus={() => this.onFocus()}\n                    onChange={(e) => this.onChange(e.target.value, true)}\n                />\n\n                {\n                    options && options.length > 0 && this.state.showAll &&\n                    <div \n                        className='ce-autocomplete-options'\n                        style={{ borderRadius: '19px', border: '1px solid #afafaf', overflow: 'hidden' }}\n                    >\n                        { this.props.options && this.renderOptions() }\n                    </div>\n                }\n            </div>\n        )\n    }\n}\n\nconst styles = {\n    input: {\n        height: '36px',\n        fontSize: '15px',\n        outline: 'none',\n        borderRadius: '24px',\n        padding: '0px 12px',\n        boxSizing: 'border-box',\n        fontFamily: 'Avenir'\n    },\n    close: {\n        cursor: 'pointer',\n        textAlign: 'center',\n        padding: '8px 12px',\n        fontSize: '15px',\n        borderRadius: '24px',\n    }\n}\n\nAutoCompleteInput.propTypes = {\n    default: PropTypes.string,\n    value: PropTypes.string,\n    options: PropTypes.arrayOf(PropTypes.object),\n    max: PropTypes.number,\n    label: PropTypes.string,\n    type: PropTypes.oneOf(['text', 'number']),\n    style: PropTypes.object,\n    handleChange: PropTypes.func,\n    onFocus: PropTypes.func,\n    onBlur: PropTypes.func,\n}","import axios from 'axios'\nimport * as str from '../../actions'\nimport { getHeaders } from '../auth'\n\nexport function getChats(props, callback) {\n    axios.get(\n        `${str.getApiUrl(props)}/chats/`,\n        { headers: getHeaders(props) }\n    )\n\n    .then((response) => {\n        // Run hook in Axios on GET requests\n        props.onGetChats && props.onGetChats(response.data)\n\n        callback && callback(response.data)\n    })\n    \n    .catch((error) => {\n        console.log('Fetch Chats Error', error)\n    });\n}","import axios from 'axios'\nimport * as str from '../../actions'\nimport { getHeaders } from '../auth'\n\nexport function newChat(props, data, callback) {\n    axios.post(\n        `${str.getApiUrl(props)}/chats/`,\n        data, \n        { headers: getHeaders(props) }\n    )\n\n    .then((response) => {\n        callback && callback(response.data)\n    })\n    \n    .catch((error) => {\n        console.log('New Chat Error', error)\n    });\n}","import axios from 'axios'\nimport * as str from '../../actions'\nimport { getHeaders } from '../auth'\n\nexport function getLatestChats(props, count, callback) {\n    axios.get(\n        `${str.getApiUrl(props)}/chats/latest/${count}/`,\n        { headers: getHeaders(props) }\n    )\n\n    .then((response) => {\n        // Run hook in Axios on GET requests\n        props.onGetChats && props.onGetChats(response.data)\n\n        callback && callback(response.data)\n    })\n    \n    .catch((error) => {\n        console.log('Fetch Chats Error', error)\n    });\n}","import axios from 'axios'\nimport * as str from '../../actions'\nimport { getHeaders } from '../auth'\n\nexport function getChatsBefore(props, before, count, callback) {\n    axios.put(\n        `${str.getApiUrl(props)}/chats/latest/${count}/`,\n        { before },\n        { headers: getHeaders(props) }\n    )\n\n    .then((response) => {\n        // Run hook in Axios on GET requests\n        props.onGetChats && props.onGetChats(response.data)\n\n        callback && callback(response.data)\n    })\n    \n    .catch((error) => {\n        console.log('Fetch Chats Before Error', error)\n    });\n}","import axios from 'axios'\nimport * as str from '../../actions'\nimport { getHeaders } from '../auth'\n\nexport function getOrCreateChat(props, data, callback) {\n    axios.put(\n        `${str.getApiUrl(props)}/chats/`,\n        data,\n        { headers: getHeaders(props) }\n    )\n\n    .then((response) => {\n        callback && callback(response.data)\n    })\n    \n    .catch((error) => {\n        console.log('Get or Create Chat Error', error)\n    });\n}","import axios from 'axios'\nimport * as str from '../../actions'\nimport { getHeaders } from '../auth'\n\nexport function getChat(props, chatId, callback) {\n    axios.get(\n        `${str.getApiUrl(props)}/chats/${chatId}/`,\n        { headers: getHeaders(props) }\n    )\n\n    .then((response) => {\n        callback && callback(response.data)\n    })\n    \n    .catch((error) => {\n        console.log('Get Chat Error', error)\n    });\n}","import axios from 'axios'\nimport * as str from '../../actions'\nimport { getHeaders } from '../auth'\n\nexport function editChat(props, chatId, data, callback) {\n    axios.patch(\n        `${str.getApiUrl(props)}/chats/${chatId}/`,\n        data, \n        { headers: getHeaders(props) }\n    )\n\n    .then((response) => {\n        callback && callback(response.data)\n    })\n    \n    .catch((error) => {\n        console.log('Edit Chat Error', error)\n    });\n}","import axios from 'axios'\nimport * as str from '../../actions'\nimport { getHeaders } from '../auth'\n\nexport function deleteChat(props, chatId, callback) {\n    axios.delete(\n        `${str.getApiUrl(props)}/chats/${chatId}/`,\n        { headers: getHeaders(props) }\n    )\n\n    .then((response) => {\n        callback && callback(response.data)\n    })\n    \n    .catch((error) => {\n        console.log('Delete Chat Error', error)\n    });\n}","import axios from 'axios'\n\nimport * as str from '..'\nimport { getHeaders } from '../auth'\n\nexport function addPerson(props, chatId, userName, callback) {\n    axios.post(\n        `${str.getApiUrl(props)}/chats/${chatId}/people/`,\n        { username: userName },\n        { headers: getHeaders(props) }\n    )\n\n    .then((response) => {\n        callback && callback(response.data)\n    })\n    \n    .catch((error) => {\n        console.log('New Person Error', error)\n    });\n}","import axios from 'axios'\nimport * as str from '..'\nimport { getHeaders } from '../auth'\n\nexport function removePerson(props, chatId, userName, callback) {\n    axios.put(\n        `${str.getApiUrl(props)}/chats/${chatId}/people/`,\n        { username: userName },\n        { headers: getHeaders(props) }\n    )\n\n    .then((response) => {\n        callback && callback(response.data)\n    })\n    \n    .catch((error) => {\n        console.log('Delete Person Error', error)\n    });\n}","import axios from 'axios'\nimport * as str from '../../actions'\nimport { getHeaders } from '../auth'\n\nexport function getOtherPeople(props, chatId, successCallback, errorCallback) {\n    axios.get(\n        `${str.getApiUrl(props)}/chats/${chatId}/others/`,\n        { headers: getHeaders(props) }\n    )\n\n    .then((response) => {\n        // Run hook in Axios on GET requests\n        props.onGetOtherPeople && props.onGetOtherPeople(chatId, response.data)\n\n        successCallback && successCallback(chatId, response.data)\n    })\n    \n    .catch((error) => {\n        console.log('Fetch Other People Error', error)\n\n        errorCallback && errorCallback()\n    });\n}","import axios from 'axios'\n\nimport * as str from '..'\nimport { getHeaders } from '../auth'\n\nexport function getMyData(props, callback) {\n    axios.get(\n        `${str.getApiUrl(props)}/users/me/`,\n        { headers: getHeaders(props) }\n    )\n\n    .then((response) => {\n        callback && callback(response.data)\n    })\n    \n    .catch((error) => {\n        console.log('Get Myself Error', error)\n    });\n}","import axios from 'axios'\n\nimport * as str from '..'\nimport { getHeaders } from '../auth'\n\nexport function editMyData(props, data, callback) {\n    axios.patch(\n        `${str.getApiUrl(props)}/chats/me/`,\n        data,\n        { headers: getHeaders(props) }\n    )\n\n    .then((response) => {\n        callback && callback(response.data)\n    })\n    \n    .catch((error) => {\n        console.log('Edit Myself Error', error)\n    });\n}","import axios from 'axios'\nimport * as str from '..'\nimport { getHeaders } from '../auth'\n\nexport function leaveChat(props, chatId, callback) {\n    axios.delete(\n        `${str.getApiUrl(props)}/chats/${chatId}/people/`,\n        { headers: getHeaders(props)}\n    )\n\n    .then((response) => {\n        callback && callback(response.data)\n    })\n    \n    .catch((error) => {\n        console.log('Delete Person Error', error)\n    });\n}","import axios from 'axios'\nimport * as str from '../../actions'\nimport { getHeaders } from '../auth'\n\nexport function getMessages(props, chatId, callback) {\n    axios.get(\n        `${str.getApiUrl(props)}/chats/${chatId}/messages/`,\n        { headers: getHeaders(props) }\n    )\n\n    .then((response) => {\n        // Run hook in Axios on GET requests\n        props.onGetMessages && props.onGetMessages(chatId, response.data)\n\n        callback && callback(chatId, response.data)\n    })\n    \n    .catch((error) => {\n        console.log('Fetch Messages Error', error)\n    });\n}","import axios from 'axios'\nimport * as str from '../../actions'\nimport { getHeaders } from '../auth'\n\nexport function getLatestMessages(props, chatId, count, callback) {\n    if (!getHeaders(props)) return;\n\n    axios.get(\n        `${str.getApiUrl(props)}/chats/${chatId}/messages/latest/${count}/`,\n        { headers: getHeaders(props) }\n    )\n\n    .then((response) => {\n        props.onGetMessages && props.onGetMessages(chatId, response.data)\n\n        callback && callback(chatId, response.data)\n    })\n    \n    .catch((error) => {\n        console.log('Fetch Latest Messages Error', error)\n    });\n}","import axios from 'axios'\nimport * as str from '../../actions'\nimport { getHeaders } from '../auth'\n\nexport function sendMessage(props, chatId, data, callback) {\n    let formdata = new FormData()\n    \n    if (data.attachments) {\n        for (let i = 0; i < data.attachments.length; i++) { \n            formdata.append('attachments', data.attachments[i], data.attachments[i].name)\n        }\n    } else if (data.files) {\n        for (let i = 0; i < data.files.length; i++) { \n            formdata.append('attachments', data.files[i], data.files[i].name)\n        }\n    }\n\n    if (data.created) {\n        formdata.append('created', data.created)\n    }\n\n    formdata.append('text', data.text)\n    formdata.append('sender_username', data.sender_username)\n    formdata.append('custom_json', JSON.stringify(data.custom_json ? data.custom_json : {}))\n    \n    axios.post(\n        `${str.getApiUrl(props)}/chats/${chatId}/messages/`,\n        formdata,\n        { headers: getHeaders(props) }\n    )\n\n    .then((response) => {\n        callback && callback(response.data)\n    })\n    \n    .catch((error) => {\n        console.log('Send Messages Error', error)\n    });\n    \n}","import axios from 'axios'\nimport * as str from '../../actions'\nimport { getHeaders } from '../auth'\n\nexport function getMessage(props, chatId, messageId, callback) {\n    axios.get(\n        `${str.getApiUrl(props)}/chats/${chatId}/messages/${messageId}/`,\n        { headers: getHeaders(props) }\n    )\n\n    .then((response) => {\n        callback && callback(chatId, response.data)\n    })\n    \n    .catch((error) => {\n        console.log('Fetch Message Error', error)\n    });\n}","import axios from 'axios'\nimport * as str from '../../actions'\nimport { getHeaders } from '../auth'\n\nexport function editMessage(props, chatId, messageId, data, callback) {\n    axios.patch(\n        `${str.getApiUrl(props)}/chats/${chatId}/messages/${messageId}/`,\n        data,\n        { headers: getHeaders(props) }\n    )\n\n    .then((response) => {\n        callback && callback(response.data)\n    })\n    \n    .catch((error) => {\n        console.log('Delete Messages Error', error)\n    });\n}","import axios from 'axios'\nimport * as str from '../../actions'\nimport { getHeaders } from '../auth'\n\nexport function readMessage(props, chatId, messageId, callback) {\n    axios.patch(\n        `${str.getApiUrl(props)}/chats/${chatId}/people/`,\n        { last_read: messageId },\n        { headers: getHeaders(props) }\n    )\n\n    .then((response) => {\n        callback && callback(response.data)\n    })\n    \n    .catch((error) => {\n        console.log('Read Message Error', error)\n    });\n}","import axios from 'axios'\nimport * as str from '../../actions'\nimport { getHeaders } from '../auth'\n\nexport function deleteMessage(props, chatId, messageId, callback) {\n    axios.delete(\n        `${str.getApiUrl(props)}/chats/${chatId}/messages/${messageId}/`,\n        { headers: getHeaders(props) }\n    )\n\n    .then((response) => {\n        callback && callback(response.data)\n    })\n    \n    .catch((error) => {\n        console.log('Delete Messages Error', error)\n    });\n}","import axios from 'axios'\n\nimport * as str from '..'\nimport { getHeaders } from '../auth'\n\nexport function isTyping(props, chatId, callback) {\n    axios.post(\n        `${str.getApiUrl(props)}/chats/${chatId}/typing/`,\n        {},\n        { headers: getHeaders(props) }\n    )\n\n    .then((response) => {\n        callback && callback(response.data)\n    })\n    \n    .catch((error) => {});\n}","import React, { useState } from 'react';\n\nimport { PaperClipOutlined } from '@ant-design/icons'\n\nconst ImagesInput = props => {\n    const [state, setState] = useState({\n        hovered: false,\n    })\n\n    function onSelect(event) {\n        const files = Array.from(event.target.files)\n        props.onSelectFiles &&  props.onSelectFiles(files)\n    }\n\n    return (\n        <div\n            className=\"uploader\"\n            encType=\"multipart/form-data\"\n            style={{ height: '0px' }}\n            className='ce-upload-document-form'\n        >\n            <label\n                htmlFor=\"files\"\n                id='ce-upload-document-button'\n            >\n                <PaperClipOutlined \n                    id='ce-upload-document-icon'\n                    onMouseEnter={() => setState({ ...state, hovered: true })}\n                    onMouseLeave={() => setState({ ...state, hovered: false })}\n                    style={{\n                        ...{ cursor: 'pointer', position: 'absolute', bottom: '20px', right: '63px', fontSize: '18px' },\n                        ...{ color: state.hovered ? '#69c0ff' : '#1890ff' }\n                    }}\n                />\n            </label>\n\n            <input\n               \n                id=\"files\"\n                accept=\"image/x-png,image/gif,image/jpeg\"\n                style={{ visibility: \"hidden\" }}\n                type=\"file\"\n                onChange={(e) => onSelect(e)}\n                onClick={(e) => e.target.value = null}\n            />\n        </div>\n    );\n}\n\nexport default ImagesInput\n","import React, { Component } from 'react'\n\nexport default class MessageInput extends Component {\n    state = {\n        value: null,\n        height: 0\n    }\n\n    resize() {\n        var textarea = document.getElementById(\"msg-textarea\");\n        textarea.style.height = \"\";\n        textarea.style.height = Math.min(textarea.scrollHeight, 150) + \"px\";\n        this.setState({ height: Math.min(textarea.scrollHeight, 150) })\n    }\n\n    componentDidMount() { this.resize() }\n\n    handleChange(e) {\n        this.resize()\n        this.props.handleChange && this.props.handleChange(e)\n    }\n\n    onKeyDown(e) {\n        if (e.key === 'Enter') { \n            e.preventDefault()\n\n            if (this.props.value.length > 0) {\n                this.props.onSubmit && this.props.onSubmit(e) \n            }\n        }\n    }    \n\n    render() {\n        return (\n            <input \n                id='msg-textarea'\n                className='ce-input ce-textarea-input'\n                style={styles.input}\n                value={this.props.value}\n                placeholder={this.props.label}\n                onChange={(e) => this.handleChange(e)} \n                onKeyDown={(e) => this.onKeyDown(e)}\n            />\n        )\n    }\n}\n\nconst styles = {\n    input: { \n        border: '1px solid white',\n        width: 'calc(100% - 100px)',\n        outline: 'none', \n        fontSize: '15px',\n        fontFamily: 'Avenir',\n        paddingLeft: '12px',\n        paddingRight: '12px',\n        position: 'relative', \n        left: '12px',\n        resize: 'none', \n        overflowX: 'hidden'\n    }\n}","import React, { useContext, useState } from 'react'\n\nimport { ChatEngineContext } from 'react-chat-engine'\n\nimport { sendMessage, isTyping } from 'react-chat-engine'\n\nimport FilesRow from '../NewMessageForm/FilesRow'\nimport ImagesRow from '../NewMessageForm/ImagesRow'\n\nimport ImagesInput from './ImagesInput'\nimport MessageInput from './MessageInput'\n\nconst MessageFormSocial = () => {\n  const { conn, activeChat, messages, setMessages } = useContext(ChatEngineContext)\n\n  const [iter, setIter] = useState(0) // Forces attachments update\n  const [value, setValue] = useState('')\n  const [trigger, setTrigger] = useState(0)\n  const [attachments, setAttachments] = useState([])\n\n  if (!conn || conn === null) return <div />\n\n  function onRemove(index) {\n    const newAttachments = attachments\n    newAttachments.splice(index, 1)\n    setAttachments(newAttachments)\n    setIter(iter + 1)\n  }\n  \n  function handleChange(e) {\n    setValue(e.target.value)\n    setTrigger((trigger + 1) % 4)\n    if (trigger === 1) { conn && isTyping(conn, activeChat) }\n  }\n\n  function handleSubmit(e) {\n    e.preventDefault();\n\n    if (!conn) return \n\n    let text = value.trim()\n    if (text.length > 11 && text.slice(-11) === '<p><br></p>') { text = text.substr(0, text.length - 11) }\n\n    const custom_json = { sender_id: Date.now().toString() }\n    const sender_username = conn.userName ? conn.userName : conn.senderUsername\n    const created = new Date().toISOString().replace('T', ' ').replace('Z', `${Math.floor(Math.random() * 1000)}+00:00`)\n    const data = { text, attachments, custom_json, sender_username, chat: activeChat, created }\n\n    if (text.length > 0 || attachments.length > 0) {\n      sendMessage(conn, activeChat, data, () => {})\n    }\n\n    setValue('')\n    setAttachments([])\n\n    let newMessages = {...messages}\n    newMessages[data.created] = data\n    setMessages(newMessages)\n  }\n\n  return (\n    <div \n      id='ce-social-msg-form-container'\n      style={styles.messageFormContainer}\n      className='ce-social-message-form-container'\n    >\n      <ImagesRow files={attachments} onRemove={(i) => onRemove(i)} />\n\n      <FilesRow files={attachments} onRemove={(i) => onRemove(i)} />\n\n      <form \n        onSubmit={handleSubmit.bind(this)} \n        className='ce-social-message-form' \n        style={styles.messageForm}\n      >\n        <button \n            icon='send'\n            type=\"submit\"\n            id='ce-send-message-button'\n            style={styles.sendMessage}\n          >\n            <img \n              className=\"send-icon\" \n              style={styles.sendIcon}\n              src=\"https://chat-engine-assets.s3.amazonaws.com/send.png\" \n              alt=\"chat-engine-send-button\"\n            />\n        </button>\n      \n        <div style={styles.inputContainer} className='ce-message-input-form'>\n          <ImagesInput onSelectFiles={(attachments) => setAttachments(attachments)} />\n\n          <MessageInput\n            value={value}\n            label='Send a message...'\n            handleChange={handleChange.bind(this)}\n            onSubmit={handleSubmit.bind(this)}\n          />\n        </div>\n      </form>\n    </div>\n  );\n}\n\nexport default MessageFormSocial\n\nconst styles = {\n  messageFormContainer: { \n    position: 'absolute', \n    bottom: '0px', \n    width: '100%', \n    backgroundColor: 'white',\n  },\n  messageForm: {\n    paddingTop: \"22px\",\n    marginRight: \"10px\",\n    width: '100%',\n  },\n  inputContainer: { \n    minHeight: '36px',\n    paddingBottom: '16px',\n    width: '100%'\n  },\n  sendMessage: {\n    // Look + Feel\n    width: \"40px\",\n    height: \"40px\",\n    borderRadius: \"50%\",\n    borderWidth: \"0px\",\n    padding: \"0px\",\n    outline: \"none\",\n    color: \"white\",\n    backgroundColor: 'rgb(24, 144, 255)',\n    cursor: \"pointer\",\n    // Positioning\n    position: 'absolute',\n    bottom: '12px',\n    right: '10px',\n    zIndex: '10'\n  },\n  sendIcon: {\n    width: \"20px\",\n    transform: \"rotate(-20deg)\",\n    marginLeft: \"5px\",\n  }\n}"]}