{"version":3,"sources":["configuration/axios.js","handlers/rest/userController.js","components/shared/bubble.js","components/navigation/activeUsers.js","resources/svg/loading.svg","components/shared/loading.js","components/drawing/boardList.js","handlers/rest/whiteboardController.js","reducers/userReducer.js","reducers/whiteboardReducer.js","components/schema/SignInAsGuest.yup.js","components/shared/constants/colors.js","components/shared/focusDialogBox.js","components/shared/guestModalForm.js","components/svg/circle.js","components/toolbar/toolbar.js","resources/consistentsvg/trash.svg","components/toolbar/tools/clearBoardTool.js","resources/consistentsvg/download.svg","components/toolbar/tools/downloadImageTool.js","resources/consistentsvg/size-dropdown-closed.svg","resources/consistentsvg/size-dropdown-open.svg","components/toolbar/tools/inputModesTool.js","resources/consistentsvg/share.svg","components/toolbar/tools/linkShareTool.js","types/Shapes.js","resources/consistentsvg/shape-dropdown-closed.svg","resources/consistentsvg/shape-dropdown-open.svg","components/toolbar/tools/shapeTool.js","resources/consistentsvg/redo.svg","resources/consistentsvg/undo.svg","components/toolbar/tools/undoRedoTool.js","resources/consistentsvg/zoom-in.svg","components/toolbar/tools/zoomInTool.js","resources/consistentsvg/zoom-out.svg","components/toolbar/tools/zoomOutTool.js","configuration/socket.js","engines/drawingEngine.js","engines/socketEngine.js","components/drawing/canvas.js","components/svg/logo.svg","components/navigation/useNavbar.js","components/navigation/browsingNavbar.js","components/navigation/EditableTitle.js","components/navigation/drawingNavbar.js","components/navigation/navBar.js","components/page/createAccount.js","resources/svg/easy-to-use-icon.svg","resources/svg/collaboration-friendly.svg","resources/svg/organized.svg","resources/svg/marker-icon.svg","components/shared/button.js","components/shared/footer.js","components/shared/line.js","components/svg/writing.svg","components/page/home.js","components/page/signIn.js","components/routing/router.js","components/shared/authentication.js","configuration/store.js","index.js"],"names":["axios","require","create","baseURL","process","withCredentials","a","get","data","UserController","createAccount","request","post","createGuest","user","getUserDetailsByCookie","listWhiteboards","signIn","signOut","Bubble","text","color","style","backgroundColor","className","ActiveUsers","collaborators","collaboratorProp","console","log","length","useSelector","state","whiteboard","value","oldVal","newVal","JSON","stringify","colors","overflow","getRandomColor","randomIndex","Math","floor","random","selectedColor","_","remove","collaboratorInfo","slice","overflowUsers","map","firstName","lastName","overflowUser","Loading","alt","src","LoadIcon","BoardList","useState","boardList","setBoardList","isLoading","setIsLoading","result","useEffect","getBoards","board","href","_id","title","Date","lastUpdated","toLocaleString","whiteboardId","WhiteboardController","createWhiteboard","countWhiteboards","getWhiteboardById","userSlice","createSlice","initialState","isAuthenticated","isLoadingUser","role","name","reducers","finishLoadingUser","loginUser","action","payload","logoutUser","actions","whiteboardSlice","shape","addCollaborator","find","collaborator","push","setTitle","removeCollaborator","index","indexOf","splice","setShape","SignInAsGuestSchema","Yup","email","required","min","max","COLORS","Object","freeze","BLACK","BLUE","GREEN","RED","YELLOW","FocusDialogBox","children","onSubmit","buttonText","isValid","isPopupVisible","setIsPopupVisible","hidePopup","Dialog","onClose","open","DialogTitle","id","DialogContent","DialogContentText","DialogActions","Button","onClick","type","GuestModalForm","handleFormSubmit","schema","initialValues","validationSchema","values","handleBlur","handleSubmit","handleChange","event","TextField","label","onBlur","onChange","Circle","size","height","width","xmlns","cx","cy","fill","r","stroke","strokeWidth","Toolbar","isMouseDown","position","toolbarRef","useRef","join","ref","setTimeout","current","opacity","display","animation","ClearBoardTool","clearBoard","draggable","CrossIcon","DownloadImageTool","getDownloadData","downloadData","setDownloadData","download","DownloadIcon","InputModesTool","handleMarkerClick","setOpen","anchorElement","setAnchorElement","handleListKeyDown","key","preventDefault","handleAwayClick","sizes","undefined","fullWidth","previouslyOpen","currentTarget","padding","minWidth","SizeDropdownOpen","SizeDropdownClosed","Popper","anchorEl","disablePortal","placement","transition","TransitionProps","Grow","transformOrigin","Paper","ClickAwayListener","onClickAway","MenuList","autoFocusItem","onKeyDown","MenuItem","sizeString","getSizeInt","ShareLinkBox","showSuccessToast","useRouteMatch","params","canvasId","whiteboardUrl","window","location","origin","LinkIcon","disabled","margin","copyText","document","querySelector","copy","copyLink","Shapes","CIRCLE","LINE","SQUARE","ShapeTool","ShapeDropdownOpen","ShapeDropdownClosed","handleOptionSelect","UndoRedoTool","onUndo","onRedo","gap","UndoIcon","RedoIcon","ZoomInTool","zoomIn","ZoomInIcon","ZoomOutTool","zoomOut","ZoomOutIcon","Socket","io","autoConnect","transports","DrawingEngine","props","this","_canvasContext","canvasContext","_animationContext","animationContext","_shapeStartPoint","_animating","_shape","_paintSize","_markerColor","markerColor","_whiteboardId","_scale","_currHistoryOffset","_drawingData","_isMouseDown","_shapeDataToDraw","_history","_setCanvasMouseDown","setCanvasMouseDown","target","keys","getOwnPropertyNames","constructor","prototype","bind","bindAll","_isFirstStroke","isFirstStroke","drawingData","animating","history","shapeDataToDraw","currentHistoryIndex","lineStartPoint","paintSize","scale","emitMessage","context","emit","clearRect","canvas","beginPath","currHistoryOffset","strokesToDraw","fromEntries","entries","abs","draw","undoneDrawingStrokeId","strokeId","isTrusted","ctrlKey","deltaY","scaleUp","scaleDown","xOffset","touches","clientX","scrollX","yOffset","clientY","scrollY","mouseX","getMousePositionX","offsetLeft","mouseY","getMousePositionY","offsetTop","crypto","randomUUID","newStroke","moveTo","subpath","subpathData","x","y","shapeStartPoint","prevStroke","concat","toFixed","handleZoom","colorToDraw","sizeToUse","lineJoin","lineCap","lineWidth","strokeStyle","strokeRect","ellipse","PI","lineTo","isArray","point","drawPoint","animationCanvas","transform","SocketEngine","dispatch","_drawingEngine","drawingEngine","connect","on","disconnect","Canvas","isToastVisible","setIsToastVisible","canvasMouseDown","socketEngine","canvasRef","animationCanvasRef","useDispatch","setWhiteboardData","response","innerWidth","innerHeight","strokes","getContext","initializeSocketListeners","handleResize","redraw","addEventListener","handleKeyDown","passive","handleScrollZoom","removeEventListener","handleGuestSubmit","handleMouseMove","handleDragTouch","handleMouseUp","handleEndStroke","handleTouchEnd","handleTouchMove","handleTouchStart","handleDrawingStart","handleMouseLeave","handleZoomIn","handleZoomOut","onMouseDown","onMouseLeave","onMouseMove","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","Snackbar","autoHideDuration","Alert","severity","handleRedo","handleUndo","Divider","flexItem","orientation","toDataURL","Fragment","identifier","handleMarkerSelect","useNavbar","NavigationOptionsComponent","collapse","useMemo","Navbar","bg","expand","fixed","Brand","logo","Toggle","Collapse","BrowsingNavbar","Nav","Link","EditableTitle","currTitle","formTitle","e","trim","spellCheck","contentEditable","DrawingNavbar","NavBar","Result","useLocation","pathname","includes","CreateAccount","useHistory","matchingPassword","password","btoa","CreateAccountSchema","oneOf","variant","grow","Footer","Line","Home","alignItems","justifyContent","flex","flexDirection","maxWidth","fontSize","textAlign","MarkerIcon","left","rotate","top","zIndex","borderRadius","Array","from","unused","Writing","verticalAlign","marginTop","EasyToUseIcon","CollaborationFriendlyIcon","alignSelf","flexGrow","OrganizedIcon","minHeight","SignIn","formValues","assign","alert","username","Router","getAuthentication","component","exact","path","configureStore","reducer","userReducer","whiteboardReducer","ReactDOM","render","StrictMode","store"],"mappings":"yhBAAaA,EAAQC,EAAQ,KAASC,OAAO,CAC3CC,QAASC,wCACTC,iBAAiB,I,4CCMnB,8BAAAC,EAAA,sEAIYN,EAAMO,IAAI,mBAJtB,uBAGIC,EAHJ,EAGIA,KAHJ,kBAKSA,GALT,4C,kEAoBA,8BAAAF,EAAA,sEAGYN,EAAMO,IAAI,iBAHtB,uBAEIC,EAFJ,EAEIA,KAFJ,kBAISA,GAJT,4C,sBAOO,IAAMC,EAAiB,CAC5BC,cAhCF,SAAwBC,GACtB,OAAOX,EAAMY,KAAK,uBAAwBD,IAgC1CE,YAbF,SAAsBC,GACpB,OAAOd,EAAMY,KAAK,cAAeE,IAajCC,uB,2CACAC,gB,2CACAC,OAxBF,SAAiBH,GACf,OAAOd,EAAMY,KAAK,cAAeE,IAwBjCI,QArBF,WACE,OAAOlB,EAAMO,IAAI,kB,uBCXJY,MARf,YAAgC,IAAfC,EAAc,EAAdA,KAAMC,EAAQ,EAARA,MACnB,OACI,qBAAgBC,MAAO,CAACC,gBAAiBF,GAAQG,UAAU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ACwC,EAAA,EAAD,CAAWX,KAAK,WAAWzG,MAAO+G,EAAOqT,SAAU9S,OAAQA,EAAQC,SAAUL,EAClE7D,KAAK,WAAWgE,MAAM,WAAWzC,UAAQ,IAEpD,cAAC2B,GAAA,EAAD,CAAQE,KAAK,SAAS+T,QAAQ,YAA9B,qBACA,mEAAqC,mBAAGpY,KAAK,kBAAR,8B,WCK9Cua,GAxBA,WACb,IAAMlI,EAAWa,cACXnJ,EAAW2N,cAQjB,OANA7X,qBAAU,YCvBL,SAAwBwS,GAC3B,8CAAO,4BAAArW,EAAA,+EAEwBG,EAAeM,yBAFvC,OAEO2W,EAFP,OAGCf,EAASjR,EAAUgS,EAASpS,OAH7B,gDAKCqR,EAAS9Q,KALV,QAOH8Q,EAASlR,KAPN,yDAAP,qDDuBAqZ,CAAkBnI,EAAlBmI,KACC,CACDzQ,IAIA,qCACE,cAAC,GAAD,IACA,eAAC,IAAD,WACE,cAAC,IAAD,CAAO0Q,UAAWjC,GAAMkC,OAAK,EAACC,KAAK,MACnC,cAAC,IAAD,CAAOF,UAAWP,GAAQS,KAAK,aAC/B,cAAC,IAAD,CAAOF,UAAW5C,GAAe8C,KAAK,oBACtC,cAAC,IAAD,CAAOF,UAAWnb,EAAWqb,KAAK,eAClC,cAAC,IAAD,CAAOF,UAAW9H,GAAQgI,KAAK,6BElCxBC,eAAe,CAC5BC,QAAS,CACPre,KAAMse,EACNnd,WAAYod,K,OCGhBC,IAASC,OACP,cAAC,IAAMC,WAAP,UACE,cAAC,IAAD,CAAUC,MAAOA,GAAjB,SACE,cAAC,IAAD,UACE,cAAC,GAAD,UAIN9Q,SAASC,cAAc,Y","file":"static/js/main.14fee97b.chunk.js","sourcesContent":["export const axios = require('axios').create({\r\n baseURL: process.env.REACT_APP_BACKEND_URL,\r\n withCredentials: true,\r\n});\r\n","import {\r\n axios,\r\n} from '../../configuration/axios';\r\n\r\nfunction createAccount (request) {\r\n return axios.post('/user/create-account', request);\r\n}\r\n\r\nasync function listWhiteboards () {\r\n // TODO: Pageable/sortaable/filterable?\r\n const {\r\n data,\r\n } = await axios.get('/user/my-boards');\r\n return data;\r\n}\r\n\r\nfunction signIn (user) {\r\n return axios.post('/user/login', user);\r\n}\r\n\r\nfunction signOut () {\r\n return axios.get('/user/logout');\r\n}\r\n\r\nfunction createGuest (user) {\r\n return axios.post('/user/guest', user);\r\n}\r\n\r\nasync function getUserDetailsByCookie () {\r\n const {\r\n data,\r\n } = await axios.get('/user/details');\r\n return data;\r\n}\r\n\r\nexport const UserController = {\r\n createAccount,\r\n createGuest,\r\n getUserDetailsByCookie,\r\n listWhiteboards,\r\n signIn,\r\n signOut,\r\n};\r\n","import '../../styles/bubble.css';\r\n\r\nfunction Bubble({text, color}) {\r\n return (\r\n
\r\n
{text}
\r\n
\r\n )\r\n}\r\n\r\nexport default Bubble;","import Bubble from '../shared/bubble';\r\nimport '../../styles/activeUsers.css';\r\nimport React from 'react';\r\nimport _ from 'lodash';\r\nimport {useSelector} from \"react-redux\";\r\n\r\nconst ActiveUsers = ({collaborators: collaboratorProp = []}) => {\r\n let collaborators = collaboratorProp;\r\n console.log(collaboratorProp)\r\n if (collaboratorProp.length !== 0){\r\n collaborators = useSelector((state) => {\r\n return state.whiteboard.value.collaborators;\r\n }, (oldVal, newVal) => {\r\n return JSON.stringify(oldVal) === JSON.stringify(newVal)\r\n })\r\n }\r\n\r\n const colors = [\r\n '#7CC0EB',\r\n '#94EB65',\r\n '#EB4DEB',\r\n '#EBA23A',\r\n ];\r\n const maxCircles = 4;\r\n const overflow = collaborators.length - maxCircles;\r\n\r\n function getRandomColor() {\r\n const randomIndex = Math.floor(Math.random() * (colors.length - 1));\r\n const selectedColor = colors[randomIndex];\r\n _.remove(colors, (value) => value === selectedColor);\r\n return selectedColor;\r\n }\r\n\r\n function getOverflowUsers() {\r\n if (overflow > 0) {\r\n return collaborators.slice(collaborators.length - overflow);\r\n }\r\n\r\n return [];\r\n }\r\n\r\n const collaboratorInfo = {\r\n collaborators: overflow > 0 ?\r\n collaborators.slice(0, collaborators.length - overflow) :\r\n collaborators,\r\n overflowUsers: getOverflowUsers(),\r\n };\r\n return (\r\n
\r\n {collaboratorInfo.collaborators.map((user) => )}\r\n {collaboratorInfo.overflowUsers.length > 0 && collaboratorInfo.overflowUsers.map((overflowUser) => {`+ ${overflow} other${overflow > 1 ?\r\n 's' :\r\n ''}`}
)}\r\n \r\n )\r\n};\r\n\r\nexport default ActiveUsers;\r\n","export default __webpack_public_path__ + \"static/media/loading.b32760ce.svg\";","import React from 'react';\r\nimport LoadIcon from '../../resources/svg/loading.svg';\r\nimport '../../styles/load.css';\r\n\r\nconst Loading = () => {\r\n return (\r\n
\r\n\r\n
\r\n Loading\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default Loading;\r\n","import React, {\r\n useEffect,\r\n useState,\r\n} from 'react';\r\nimport {\r\n UserController,\r\n} from '../../handlers/rest/userController';\r\nimport '../../styles/boardList.css';\r\nimport ActiveUsers from '../navigation/activeUsers';\r\nimport Loading from '../shared/loading';\r\n\r\nconst BoardList = () => {\r\n const [\r\n boardList,\r\n setBoardList,\r\n ] = useState([]);\r\n const [\r\n isLoading,\r\n setIsLoading,\r\n ] = useState(false);\r\n\r\n async function getBoards() {\r\n try {\r\n const result = await UserController.listWhiteboards();\r\n setBoardList(result);\r\n setIsLoading(false);\r\n } catch {\r\n // todo: toast\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n setIsLoading(true);\r\n getBoards();\r\n }, []);\r\n\r\n return (\r\n
\r\n
\r\n

Your Whiteboards

\r\n
\r\n
\r\n {isLoading &&\r\n \r\n }\r\n {boardList.length > 0 &&\r\n boardList.map((board) => {\r\n return (\r\n \r\n
{board.title}
\r\n
Last\r\n Modified {new Date(board.lastUpdated).toLocaleString()}
\r\n \r\n
)\r\n })\r\n }\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default BoardList;\r\n","import {axios} from '../../configuration/axios';\r\n\r\nasync function createWhiteboard() {\r\n const {data} = await axios.post('/whiteboard/create');\r\n return data;\r\n}\r\n\r\nfunction countWhiteboards() {\r\n return axios.get('/whiteboard/count');\r\n}\r\n\r\nasync function getWhiteboardById(whiteboardId) {\r\n const {data} = await axios.get('/whiteboard/read/' + whiteboardId);\r\n return data;\r\n}\r\n\r\nexport const WhiteboardController = {\r\n createWhiteboard,\r\n countWhiteboards,\r\n getWhiteboardById\r\n};\r\n","import {\r\n createSlice,\r\n} from '@reduxjs/toolkit';\r\n\r\nexport const userSlice = createSlice(\r\n {\r\n initialState: {\r\n value: {\r\n isAuthenticated: false,\r\n isLoadingUser: true,\r\n role: '',\r\n },\r\n },\r\n name: 'user',\r\n reducers: {\r\n finishLoadingUser: (state) => {\r\n state.value.isLoadingUser = false;\r\n },\r\n loginUser: (state, action) => {\r\n state.value.isAuthenticated = action.payload !== 'guest';\r\n state.value.role = action.payload;\r\n },\r\n logoutUser: (state) => {\r\n state.value.isAuthenticated = false;\r\n state.value.role = '';\r\n },\r\n },\r\n },\r\n);\r\nexport const {\r\n loginUser,\r\n logoutUser,\r\n finishLoadingUser,\r\n} = userSlice.actions;\r\n\r\nexport default userSlice.reducer;\r\n","import {\r\n createSlice,\r\n} from '@reduxjs/toolkit';\r\n\r\nexport const whiteboardSlice = createSlice(\r\n {\r\n initialState: {\r\n value: {\r\n collaborators: [],\r\n shape: '',\r\n title: '',\r\n },\r\n },\r\n name: 'whiteboard',\r\n reducers: {\r\n addCollaborator: (state, action) => {\r\n if (state.value.collaborators.find(collaborator => action.payload.firstName === collaborator.firstName && action.payload.lastName)) {\r\n return;\r\n }\r\n state.value.collaborators.push(action.payload);\r\n },\r\n setTitle: (state, action) => {\r\n state.value.title = action.payload;\r\n },\r\n removeCollaborator: (state, action) => {\r\n const index = state.value.collaborators.indexOf(action.payload);\r\n state.value.collaborators = state.value.collaborators.splice(index, index);\r\n },\r\n setShape: (state, action) => {\r\n state.value.shape = action.payload;\r\n },\r\n },\r\n },\r\n);\r\nexport const {\r\n addCollaborator,\r\n removeCollaborator,\r\n setTitle,\r\n setShape,\r\n} = whiteboardSlice.actions;\r\n\r\nexport default whiteboardSlice.reducer;\r\n","import * as Yup from 'yup';\r\n\r\nconst SignInAsGuestSchema = Yup.object()\r\n .shape({\r\n email: Yup.string()\r\n .email('The email provided is invalid.')\r\n .required('Email is required.'),\r\n firstName: Yup.string()\r\n .min(2, 'First Name must be more than 1 character.')\r\n .max(50, 'First Name must be less than 50 characters.')\r\n .required('First name is required.'),\r\n lastName: Yup.string()\r\n .min(2, 'Last name must be more than 1 character.')\r\n .max(50, 'Last name must be less than 50 characters.')\r\n .required('Last name is required.'),\r\n });\r\n\r\nexport default SignInAsGuestSchema;\r\n","const COLORS = Object.freeze({\r\n BLACK: 'black',\r\n BLUE: 'blue',\r\n GREEN: 'green',\r\n RED: 'red',\r\n YELLOW: 'yellow',\r\n});\r\n\r\nexport default COLORS;\r\n","import {\r\n Dialog,\r\n DialogActions,\r\n DialogContent,\r\n DialogContentText,\r\n DialogTitle,\r\n} from '@mui/material';\r\nimport Button from '@mui/material/Button';\r\nimport React, {useState,} from 'react';\r\n\r\nconst FocusDialogBox = ({\r\n text,\r\n children,\r\n onSubmit,\r\n buttonText,\r\n isValid,\r\n}) => {\r\n const [\r\n isPopupVisible,\r\n setIsPopupVisible,\r\n ] = useState(true);\r\n\r\n function hidePopup () {\r\n if (isValid) {\r\n setIsPopupVisible(false);\r\n }\r\n }\r\n\r\n return (\r\n \r\n Join As Guest\r\n \r\n \r\n {text}\r\n \r\n
\r\n {children}\r\n
\r\n
\r\n \r\n {\r\n if (isValid) {\r\n hidePopup();\r\n }\r\n\r\n onSubmit();\r\n }} type='submit'\r\n >\r\n {buttonText}\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default FocusDialogBox;\r\n","import {\r\n TextField,\r\n} from '@mui/material';\r\nimport {\r\n ErrorMessage,\r\n Formik,\r\n} from 'formik';\r\nimport React from 'react';\r\nimport FocusDialogBox from './focusDialogBox';\r\n\r\nconst GuestModalForm = ({\r\n handleFormSubmit,\r\n schema,\r\n}) => {\r\n return (\r\n \r\n {({\r\n values,\r\n handleBlur,\r\n handleSubmit,\r\n isValid,\r\n handleChange,\r\n }) => handleSubmit(event)}\r\n text='Let other collaborators know who you are!'\r\n >\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n }\r\n \r\n );\r\n};\r\n\r\nexport default GuestModalForm;\r\n","import React from 'react';\r\n\r\nconst Circle = ({\r\n size,\r\n onClick,\r\n color,\r\n}) => {\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default Circle;\r\n","import React, {\r\n useRef,\r\n} from 'react';\r\nimport '../../styles/toolbar.css';\r\n\r\nconst Toolbar = ({\r\n isMouseDown,\r\n children,\r\n position = 'bottom',\r\n}) => {\r\n const toolbarRef = useRef();\r\n\r\n function getStyle () {\r\n if (isMouseDown) {\r\n setTimeout(() => {\r\n if (toolbarRef.current.style.opacity === '0') {\r\n toolbarRef.current.style.display = 'none';\r\n }\r\n }, 250);\r\n return {\r\n animation: 'fadeOutComplete .5s forwards',\r\n opacity: 0,\r\n };\r\n }\r\n\r\n if (toolbarRef.current) {\r\n toolbarRef.current.style.display = 'flex';\r\n return {\r\n animation: 'fadeInFromComplete .5s forwards',\r\n opacity: 1,\r\n };\r\n }\r\n }\r\n\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n};\r\n\r\nexport default Toolbar;\r\n","export default __webpack_public_path__ + \"static/media/trash.b8281936.svg\";","import React from 'react';\r\nimport CrossIcon from '../../../resources/consistentsvg/trash.svg';\r\n\r\nconst ClearBoardTool = ({\r\n clearBoard,\r\n}) => {\r\n function handleOnClick () {\r\n clearBoard(true);\r\n }\r\n\r\n return (\r\n
\r\n Clear Board\r\n
\r\n );\r\n};\r\n\r\nexport default ClearBoardTool;\r\n","export default __webpack_public_path__ + \"static/media/download.11eb7dad.svg\";","import React, {\r\n useState,\r\n} from 'react';\r\nimport DownloadIcon from '../../../resources/consistentsvg/download.svg';\r\n\r\nconst DownloadImageTool = ({\r\n getDownloadData,\r\n}) => {\r\n const [\r\n downloadData,\r\n setDownloadData,\r\n ] = useState();\r\n return (\r\n
\r\n setDownloadData(getDownloadData())}\r\n >\r\n Download Drawing as Image\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default DownloadImageTool;\r\n","export default __webpack_public_path__ + \"static/media/size-dropdown-closed.7ef6c9bf.svg\";","export default __webpack_public_path__ + \"static/media/size-dropdown-open.901d36aa.svg\";","import {\r\n Button,\r\n ClickAwayListener,\r\n Grow,\r\n MenuItem,\r\n MenuList,\r\n Paper,\r\n Popper\r\n} from '@mui/material';\r\nimport React, {\r\n useState,\r\n} from 'react';\r\nimport SizeDropdownClosed from '../../../resources/consistentsvg/size-dropdown-closed.svg';\r\nimport SizeDropdownOpen from '../../../resources/consistentsvg/size-dropdown-open.svg';\r\n\r\nconst InputModesTool = ({\r\n handleMarkerClick,\r\n}) => {\r\n const [\r\n open,\r\n setOpen,\r\n ] = useState(false);\r\n const [\r\n anchorElement,\r\n setAnchorElement,\r\n ] = useState(null);\r\n\r\n function handleListKeyDown (event) {\r\n if (event.key === 'Tab') {\r\n event.preventDefault();\r\n setOpen(false);\r\n } else if (event.key === 'Escape') {\r\n setOpen(false);\r\n }\r\n }\r\n\r\n const handleAwayClick = () => {\r\n setOpen(false);\r\n };\r\n\r\n const handleClick = (event) => {\r\n setOpen((previouslyOpen) => {\r\n if (event) {\r\n setAnchorElement(event.currentTarget);\r\n }\r\n\r\n return !previouslyOpen;\r\n });\r\n };\r\n\r\n function handleOptionSelect (shape) {\r\n handleMarkerClick(shape);\r\n setOpen(false);\r\n }\r\n\r\n function getSizeInt (sizeString) {\r\n switch (sizeString) {\r\n case 'Small':\r\n return 5;\r\n case 'Medium':\r\n return 30;\r\n case 'Large':\r\n return 55;\r\n default:\r\n return 30;\r\n }\r\n }\r\n\r\n const sizes = [\r\n 'Small',\r\n 'Medium',\r\n 'Large',\r\n ];\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n {({\r\n TransitionProps,\r\n placement,\r\n }) => \r\n \r\n \r\n \r\n {sizes.map((size) => {\r\n return (\r\n handleOptionSelect(getSizeInt(size))}\r\n >\r\n {size}\r\n \r\n );\r\n })}\r\n \r\n \r\n \r\n }\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default InputModesTool;\r\n","export default __webpack_public_path__ + \"static/media/share.4a9c4af0.svg\";","import {\r\n Dialog,\r\n DialogActions,\r\n DialogContent,\r\n DialogContentText,\r\n DialogTitle,\r\n TextField,\r\n} from '@mui/material';\r\nimport Button from '@mui/material/Button';\r\nimport copy from 'copy-to-clipboard';\r\nimport React, {\r\n useState,\r\n} from 'react';\r\nimport {\r\n useRouteMatch,\r\n} from 'react-router-dom';\r\nimport LinkIcon from '../../../resources/consistentsvg/share.svg';\r\nimport '../../../styles/shareLinkBox.css';\r\n\r\nconst ShareLinkBox = ({\r\n text,\r\n showSuccessToast,\r\n}) => {\r\n const {\r\n canvasId: whiteboardId,\r\n } = useRouteMatch('/boards/:canvasId').params;\r\n const [\r\n isPopupVisible,\r\n setIsPopupVisible,\r\n ] = useState(false);\r\n\r\n const whiteboardUrl = `${window.location.origin}/boards/${whiteboardId}`;\r\n function copyLink () {\r\n const copyText = document.querySelector('#value');\r\n copy(copyText.value);\r\n }\r\n\r\n function hidePopup () {\r\n setIsPopupVisible(false);\r\n }\r\n\r\n function showPopup () {\r\n setIsPopupVisible(true);\r\n }\r\n\r\n return (\r\n
\r\n Get Share Link\r\n \r\n Share With Your Friends!\r\n \r\n \r\n {text}\r\n \r\n \r\n\r\n \r\n \r\n {\r\n copyLink();\r\n hidePopup();\r\n showSuccessToast();\r\n }}\r\n >\r\n Copy\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default ShareLinkBox;\r\n","const Shapes = Object.freeze({\r\n CIRCLE: 'Circle',\r\n LINE: 'Line',\r\n SQUARE: 'Square',\r\n});\r\n\r\nexport default Shapes;\r\n","export default __webpack_public_path__ + \"static/media/shape-dropdown-closed.15e45f5c.svg\";","export default __webpack_public_path__ + \"static/media/shape-dropdown-open.16154082.svg\";","import {\r\n Button,\r\n ClickAwayListener,\r\n Grow,\r\n MenuItem,\r\n MenuList,\r\n Paper,\r\n Popper\r\n} from '@mui/material';\r\nimport React, {\r\n useState,\r\n} from 'react';\r\nimport Shapes from '../../../types/Shapes';\r\nimport ShapeDropdownClosed from \"../../../resources/consistentsvg/shape-dropdown-closed.svg\";\r\nimport ShapeDropdownOpen from \"../../../resources/consistentsvg/shape-dropdown-open.svg\";\r\n\r\nconst ShapeTool = ({\r\n handleChange,\r\n}) => {\r\n const [\r\n open,\r\n setOpen,\r\n ] = useState(false);\r\n const [\r\n anchorElement,\r\n setAnchorElement,\r\n ] = useState(null);\r\n\r\n function handleListKeyDown (event) {\r\n if (event.key === 'Tab') {\r\n event.preventDefault();\r\n setOpen(false);\r\n } else if (event.key === 'Escape') {\r\n setOpen(false);\r\n }\r\n }\r\n\r\n const handleAwayClick = () => {\r\n setOpen(false);\r\n };\r\n\r\n const handleClick = (event) => {\r\n setOpen((previouslyOpen) => {\r\n if (event) {\r\n setAnchorElement(event.currentTarget);\r\n }\r\n\r\n return !previouslyOpen;\r\n });\r\n };\r\n\r\n function handleOptionSelect (shape) {\r\n handleChange(shape);\r\n setOpen(false);\r\n }\r\n\r\n return (\r\n
\r\n \r\n Select Shape\r\n \r\n \r\n {({\r\n TransitionProps,\r\n placement,\r\n }) => \r\n \r\n \r\n \r\n {Object.values(Shapes)\r\n .map((shape) => {\r\n return (\r\n handleOptionSelect(shape)}\r\n >\r\n {shape}\r\n \r\n );\r\n })}\r\n \r\n \r\n \r\n }\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default ShapeTool;\r\n","export default __webpack_public_path__ + \"static/media/redo.9dd43770.svg\";","export default __webpack_public_path__ + \"static/media/undo.3101bdd6.svg\";","import React from 'react';\r\nimport RedoIcon from '../../../resources/consistentsvg/redo.svg';\r\nimport UndoIcon from '../../../resources/consistentsvg/undo.svg';\r\n\r\nconst UndoRedoTool = ({\r\n onUndo,\r\n onRedo,\r\n}) => {\r\n return (\r\n \r\n
\r\n Undo\r\n
\r\n
\r\n Redo\r\n
\r\n \r\n );\r\n};\r\n\r\nexport default UndoRedoTool;\r\n","export default __webpack_public_path__ + \"static/media/zoom-in.8d5c241d.svg\";","import React from 'react';\r\nimport ZoomInIcon from '../../../resources/consistentsvg/zoom-in.svg';\r\n\r\nconst ZoomInTool = ({\r\n zoomIn,\r\n}) => {\r\n return (\r\n
\r\n Zoom In\r\n
\r\n );\r\n};\r\n\r\nexport default ZoomInTool;\r\n","export default __webpack_public_path__ + \"static/media/zoom-out.83a352d0.svg\";","import React from 'react';\r\nimport ZoomOutIcon from '../../../resources/consistentsvg/zoom-out.svg';\r\n\r\nconst ZoomOutTool = ({\r\n zoomOut,\r\n}) => {\r\n return (\r\n
\r\n Zoom Out\r\n
\r\n );\r\n};\r\n\r\nexport default ZoomOutTool;\r\n","import {\r\n io,\r\n} from 'socket.io-client';\r\n\r\nexport const Socket = io(\r\n process.env.REACT_APP_BACKEND_URL, {\r\n autoConnect: false,\r\n transports: [\r\n 'websocket',\r\n ],\r\n },\r\n);\r\n","import _ from 'lodash';\r\nimport { Socket, } from '../configuration/socket';\r\nimport Shapes from '../types/Shapes';\r\n\r\nfunction bindAll(target) {\r\n const keys = Object.getOwnPropertyNames(target.constructor.prototype);\r\n for (const key of keys) {\r\n const propertyOrMethod = target[key];\r\n if (typeof propertyOrMethod === 'function') {\r\n target[key] = target[key].bind(target);\r\n }\r\n }\r\n}\r\n\r\nexport class DrawingEngine {\r\n constructor(props) {\r\n this._canvasContext = props.canvasContext;\r\n this._animationContext = props.animationContext;\r\n this._shapeStartPoint = undefined;\r\n this._animating = false;\r\n this._shape = props.shape;\r\n this._paintSize = 25;\r\n this._markerColor = props.markerColor || 'black';\r\n this._whiteboardId = props.whiteboardId;\r\n this._scale = 1;\r\n this._currHistoryOffset = 0;\r\n this._drawingData = [];\r\n this._isMouseDown = false;\r\n this._shapeDataToDraw = undefined;\r\n // 2D array. Each index represents a \"stroke\" and contains an array of the values of the subpath\r\n this._history = [];\r\n this._setCanvasMouseDown = props.setCanvasMouseDown;\r\n bindAll(this);\r\n }\r\n\r\n get newStroke() {\r\n return this._isFirstStroke;\r\n }\r\n\r\n set newStroke(isFirstStroke) {\r\n this._isFirstStroke = isFirstStroke;\r\n }\r\n\r\n get isMouseDown() {\r\n return this._isMouseDown;\r\n }\r\n\r\n set isMouseDown(isMouseDown) {\r\n this._isMouseDown = isMouseDown;\r\n this._setCanvasMouseDown(isMouseDown);\r\n }\r\n\r\n get drawingData() {\r\n return this._drawingData;\r\n }\r\n\r\n set drawingData(drawingData) {\r\n this._drawingData = drawingData;\r\n }\r\n\r\n get animating() {\r\n return this._animating;\r\n }\r\n\r\n set animating(animating) {\r\n this._animating = animating;\r\n }\r\n\r\n get history() {\r\n return this._history;\r\n }\r\n\r\n set history(history) {\r\n this._history = history;\r\n }\r\n\r\n get shapeDataToDraw() {\r\n return this._shapeDataToDraw;\r\n }\r\n\r\n set shapeDataToDraw(shapeDataToDraw) {\r\n this._shapeDataToDraw = shapeDataToDraw;\r\n }\r\n\r\n get currHistoryOffset() {\r\n return this._currHistoryOffset;\r\n }\r\n\r\n set currHistoryOffset(currentHistoryIndex) {\r\n this._currHistoryOffset = currentHistoryIndex;\r\n }\r\n\r\n get canvasContext() {\r\n return this._canvasContext;\r\n }\r\n\r\n set canvasContext(canvasContext) {\r\n this._canvasContext = canvasContext;\r\n }\r\n\r\n get animationContext() {\r\n return this._animationContext;\r\n }\r\n\r\n set animationContext(animationContext) {\r\n this._animationContext = animationContext;\r\n }\r\n\r\n get shapeStartPoint() {\r\n return this._shapeStartPoint;\r\n }\r\n\r\n set shapeStartPoint(lineStartPoint) {\r\n this._shapeStartPoint = lineStartPoint;\r\n }\r\n\r\n get shape() {\r\n return this._shape;\r\n }\r\n\r\n set shape(shape) {\r\n this._shape = shape;\r\n }\r\n\r\n get paintSize() {\r\n return this._paintSize;\r\n }\r\n\r\n set paintSize(paintSize) {\r\n this._paintSize = paintSize;\r\n }\r\n\r\n get markerColor() {\r\n return this._markerColor;\r\n }\r\n\r\n set markerColor(markerColor) {\r\n this._markerColor = markerColor;\r\n }\r\n\r\n get whiteboardId() {\r\n return this._whiteboardId;\r\n }\r\n\r\n set whiteboardId(whiteboardId) {\r\n this._whiteboardId = whiteboardId;\r\n }\r\n\r\n get scale() {\r\n return this._scale;\r\n }\r\n\r\n set scale(scale) {\r\n this._scale = scale;\r\n }\r\n\r\n clearBoard(emitMessage) {\r\n const context = this.canvasContext;\r\n this.drawingData = [];\r\n this.history = [];\r\n if (emitMessage) {\r\n Socket.emit('empty-page', this.whiteboardId);\r\n }\r\n\r\n // I think the context's scale affects clearing the board when zoomed causing the entire board to not clear when zoomed out\r\n context.clearRect(0, 0, context.canvas.width * this.scale ** -1, context.canvas.height * this.scale ** -1);\r\n context.beginPath();\r\n }\r\n\r\n handleRedo() {\r\n if (this.currHistoryOffset === 0) {\r\n // nothing to redo\r\n return;\r\n }\r\n\r\n this.currHistoryOffset += 1;\r\n const context = this.canvasContext;\r\n const strokesToDraw = Object.values(Object.fromEntries(Object.entries(this.history).slice(0, Object.keys(this.history).length - Math.abs(this.currHistoryOffset))))\r\n\r\n context.clearRect(0, 0, context.canvas.width, context.canvas.height);\r\n if (!strokesToDraw || strokesToDraw.length === 0) {\r\n return;\r\n }\r\n\r\n this.canvasContext.beginPath();\r\n this.draw(strokesToDraw, this.canvasContext);\r\n this.canvasContext.stroke();\r\n }\r\n\r\n handleUndo() {\r\n if (Math.abs(this.currHistoryOffset) > Object.keys(this.history).length - 1) {\r\n //Nothing to undo\r\n return;\r\n }\r\n\r\n const context = this.canvasContext;\r\n this.currHistoryOffset -= 1;\r\n const strokesToDraw = Object.values(Object.fromEntries(Object.entries(this.history).slice(0, Object.keys(this.history).length - Math.abs(this.currHistoryOffset))))\r\n\r\n const undoneDrawingStrokeId = this.history[Object.keys(this.history).length - Math.abs(this.currHistoryOffset)].strokeId;\r\n context.clearRect(0, 0, context.canvas.width, context.canvas.height);\r\n Socket.emit('undo', { strokeId: undoneDrawingStrokeId, whiteboardId: this.whiteboardId });\r\n if (!strokesToDraw || strokesToDraw.length === 0) {\r\n return;\r\n }\r\n\r\n this.draw(strokesToDraw, this.canvasContext);\r\n this.canvasContext.stroke();\r\n }\r\n\r\n redraw() {\r\n const context = this.canvasContext;\r\n context.clearRect(0, 0, context.canvas.width, context.canvas.height);\r\n\r\n this.draw(this.drawingData, this.canvasContext);\r\n }\r\n\r\n handleScrollZoom(event) {\r\n if (!event.isTrusted) {\r\n return;\r\n }\r\n if (event.ctrlKey) {\r\n event.preventDefault();\r\n if (event.deltaY < 0) {\r\n this.scaleUp();\r\n } else {\r\n this.scaleDown();\r\n }\r\n }\r\n }\r\n\r\n handleKeyDown(event) {\r\n if (event.ctrlKey && event.key === '=') {\r\n event.preventDefault();\r\n this.scaleUp();\r\n }\r\n\r\n if (event.ctrlKey && event.key === '-') {\r\n event.preventDefault();\r\n this.scaleDown();\r\n }\r\n }\r\n\r\n getMousePositionX(event, xOffset) {\r\n if (event.type === 'touchmove') {\r\n return (event.touches[0].clientX - xOffset + window.scrollX) / (this.scale);\r\n } else {\r\n return (event.clientX - xOffset + window.scrollX) / (this.scale);\r\n }\r\n }\r\n\r\n getMousePositionY(event, yOffset) {\r\n if (event.type === 'touchmove') {\r\n return (event.touches[0].clientY - yOffset - 56 + window.scrollY) / (this.scale);\r\n } else {\r\n return (event.clientY - yOffset - 56 + window.scrollY) / (this.scale);\r\n }\r\n }\r\n\r\n handleDrawingStart(event) {\r\n const context = this.shape !== undefined ? this.animationContext : this.canvasContext;\r\n const mouseX = this.getMousePositionX(event, context.canvas.offsetLeft);\r\n const mouseY = this.getMousePositionY(event, context.canvas.offsetTop);\r\n // initialize a new \"stroke\"\r\n const strokeId = crypto.randomUUID();\r\n this.newStroke = true;\r\n context.moveTo(mouseX, mouseY);\r\n context.beginPath();\r\n if (this.history && Object.keys(this.history).length >= 30) {\r\n delete this.history[0];\r\n\r\n // Shift left\r\n for (let index = 0; index < Object.keys(this.history).length; index++) {\r\n if (!this.history[index + 1]) {\r\n delete this.history[index];\r\n break;\r\n }\r\n\r\n this.history[index] = this.history[index + 1];\r\n }\r\n }\r\n\r\n // initialize new history entry\r\n this.history[Object.keys(this.history).length] = { strokeId, subpath: [] };\r\n }\r\n\r\n handleDragTouch(event) {\r\n if (!this.isMouseDown) {\r\n return;\r\n }\r\n\r\n let context = this.shape !== undefined ? this.animationContext : this.canvasContext;\r\n const mouseX = this.getMousePositionX(event, context.canvas.offsetLeft);\r\n const mouseY = this.getMousePositionY(event, context.canvas.offsetTop);\r\n const subpathData = {\r\n color: this.markerColor,\r\n size: this.paintSize,\r\n whiteboardId: this.whiteboardId,\r\n x: mouseX,\r\n y: mouseY,\r\n };\r\n\r\n if (this.newStroke) {\r\n subpathData.moveTo = {\r\n x: mouseX,\r\n y: mouseY,\r\n };\r\n this.newStroke = false;\r\n }\r\n\r\n switch (this.shape) {\r\n case Shapes.LINE:\r\n case Shapes.SQUARE:\r\n case Shapes.CIRCLE:\r\n subpathData.shape = this.shape;\r\n context = this.animationContext;\r\n if (this.shapeStartPoint) {\r\n subpathData.shapeStartPoint = this.shapeStartPoint;\r\n } else {\r\n this.shapeStartPoint = {\r\n x: mouseX,\r\n y: mouseY,\r\n };\r\n subpathData.shapeStartPoint = this.shapeStartPoint;\r\n subpathData.moveTo = this.shapeStartPoint;\r\n }\r\n\r\n context.clearRect(0, 0, context.canvas.width / this.scale, context.canvas.height / this.scale);\r\n let stroke = this.history[Object.keys(this.history).length - 1];\r\n\r\n // stroke.subpath = [subpathData];\r\n // this.drawingData.push(stroke)\r\n this.draw(subpathData, context);\r\n this.shapeDataToDraw = subpathData;\r\n break;\r\n default:\r\n this.draw(subpathData, this.canvasContext);\r\n const prevStroke = this.history[Object.keys(this.history).length - 1];\r\n Socket.emit('drawing-data', {\r\n whiteboardId: this.whiteboardId,\r\n subpath: subpathData,\r\n strokeId: prevStroke.strokeId\r\n });\r\n prevStroke.subpath = prevStroke.subpath.concat(subpathData);\r\n this.drawingData.push(prevStroke);\r\n context.stroke();\r\n break;\r\n }\r\n }\r\n\r\n handleEndStroke() {\r\n this.isMouseDown = false;\r\n this.shape = undefined;\r\n this.shapeStartPoint = undefined;\r\n this.animating = false;\r\n\r\n if (this.shapeDataToDraw) {\r\n //clear animation layer\r\n this.animationContext.clearRect(0, 0, this.animationContext.canvas.width, this.animationContext.canvas.height);\r\n\r\n const stroke = this.history[Object.keys(this.history).length - 1];\r\n stroke.subpath.push(this.shapeDataToDraw);\r\n this.draw(this.shapeDataToDraw, this.canvasContext);\r\n this.drawingData = this.drawingData.concat(this.shapeDataToDraw);\r\n Socket.emit('drawing-data', {\r\n whiteboardId: this.whiteboardId,\r\n subpath: this.shapeDataToDraw,\r\n strokeId: stroke.strokeId\r\n });\r\n this.shapeDataToDraw = undefined;\r\n }\r\n if (this.currHistoryOffset !== 0) {\r\n this.history.splice(this.history.length - (Math.abs(this.currHistoryOffset)) - 1, 1)\r\n }\r\n this.currHistoryOffset = 0;\r\n\r\n }\r\n\r\n scaleUp() {\r\n this.scale = (this.scale * 1.25).toFixed(2); // inverse of 4/5 or 0.8\r\n this.handleZoom(1.25, 1.25);\r\n }\r\n\r\n scaleDown() {\r\n this.scale = (this.scale * 0.8).toFixed(2); // inverse of 5/4 or 1.25\r\n this.handleZoom(0.8, 0.8);\r\n }\r\n\r\n drawPoint(x, y, colorToDraw, sizeToUse, moveTo, shape, shapeStartPoint, context) {\r\n context.lineJoin = 'round';\r\n context.lineCap = 'round';\r\n context.lineWidth = sizeToUse;\r\n context.strokeStyle = colorToDraw;\r\n\r\n if (moveTo) {\r\n context.beginPath();\r\n context.moveTo(moveTo.x, moveTo.y);\r\n }\r\n\r\n switch (shape) {\r\n case Shapes.SQUARE:\r\n context.moveTo(shapeStartPoint.x, shapeStartPoint.y);\r\n context.beginPath();\r\n context.strokeRect(shapeStartPoint.x, shapeStartPoint.y, x - shapeStartPoint.x, y - shapeStartPoint.y);\r\n break;\r\n case Shapes.CIRCLE:\r\n context.moveTo(shapeStartPoint.x, shapeStartPoint.y);\r\n context.beginPath();\r\n context.ellipse(shapeStartPoint.x, shapeStartPoint.y, Math.abs(x - shapeStartPoint.x), Math.abs(y - shapeStartPoint.y), 0, 0, 2 * Math.PI);\r\n break;\r\n case Shapes.LINE:\r\n context.beginPath();\r\n context.moveTo(shapeStartPoint.x, shapeStartPoint.y);\r\n context.lineTo(x, y);\r\n\r\n break;\r\n default:\r\n context.lineTo(x, y);\r\n }\r\n\r\n context.stroke();\r\n }\r\n\r\n draw(data, context = this.canvasContext) {\r\n if (_.isArray(data)) {\r\n for (const stroke of data) {\r\n for (const point of stroke.subpath) {\r\n this.drawPoint(point.x, point.y, point.color, point.size, point.moveTo, point.shape, point.shapeStartPoint, context);\r\n }\r\n }\r\n return;\r\n }\r\n\r\n this.drawPoint(data.x, data.y, data.color, data.size, data.moveTo, data.shape, data.shapeStartPoint, context);\r\n }\r\n\r\n handleZoom() {\r\n const canvas = this.canvasContext.canvas;\r\n const animationCanvas = this.animationContext.canvas;\r\n canvas.style.transformOrigin = \"0 0\"; //scale from top left\r\n canvas.style.transform = `scale(${this.scale})`;\r\n animationCanvas.style.transformOrigin = \"0 0\"; //scale from top left\r\n animationCanvas.style.transform = `scale(${this.scale})`;\r\n }\r\n\r\n}\r\n","\r\nimport {\r\n Socket,\r\n} from '../configuration/socket';\r\nimport {\r\n addCollaborator,\r\n removeCollaborator,\r\n setTitle\r\n} from '../reducers/whiteboardReducer';\r\n\r\nexport class SocketEngine {\r\n get drawingEngine() {\r\n return this._drawingEngine;\r\n }\r\n\r\n constructor(dispatch) {\r\n this.dispatch = dispatch;\r\n }\r\n\r\n set drawingEngine(drawingEngine) {\r\n this._drawingEngine = drawingEngine;\r\n }\r\n\r\n socketSendClearBoard(whiteboardId) {\r\n Socket.emit('empty-page', whiteboardId);\r\n }\r\n\r\n socketSendDrawingData(data) {\r\n Socket.emit('drawing-data', data);\r\n }\r\n\r\n initializeSocketListeners(whiteboardId) {\r\n Socket.connect();\r\n Socket.emit('join', whiteboardId);\r\n Socket.on('empty-page-from-server', () => this.drawingEngine.clearBoard(false));\r\n Socket.on('drawing-data-from-server', (data) => this.drawingEngine.draw(data));\r\n Socket.on('joined', (data) => this.dispatch(addCollaborator(data)));\r\n Socket.on('left', (data) => this.dispatch(removeCollaborator(data)));\r\n Socket.on('update-title', (data) => this.dispatch(setTitle(data)));\r\n }\r\n\r\n disconnect() {\r\n Socket.disconnect();\r\n }\r\n}\r\n","import {\r\n Divider,\r\n Snackbar,\r\n} from '@mui/material';\r\nimport Alert from '@mui/material/Alert';\r\nimport React, {\r\n useEffect,\r\n useRef,\r\n useState,\r\n} from 'react';\r\nimport {\r\n useDispatch,\r\n useSelector,\r\n} from 'react-redux';\r\nimport {\r\n useRouteMatch,\r\n} from 'react-router-dom';\r\nimport {\r\n UserController,\r\n} from '../../handlers/rest/userController';\r\nimport {\r\n WhiteboardController,\r\n} from '../../handlers/rest/whiteboardController';\r\nimport {\r\n loginUser,\r\n} from '../../reducers/userReducer';\r\nimport {\r\n addCollaborator,\r\n setTitle,\r\n} from '../../reducers/whiteboardReducer';\r\nimport '../../styles/shareLinkBox.css';\r\nimport '../../styles/divider.css';\r\nimport SignInAsGuestSchema from '../schema/SignInAsGuest.yup';\r\nimport COLORS from '../shared/constants/colors';\r\nimport GuestModalForm from '../shared/guestModalForm';\r\nimport Loading from '../shared/loading';\r\nimport Circle from '../svg/circle';\r\nimport Toolbar from '../toolbar/toolbar';\r\nimport ClearBoardTool from '../toolbar/tools/clearBoardTool';\r\nimport DownloadImageTool from '../toolbar/tools/downloadImageTool';\r\nimport InputModesTool from '../toolbar/tools/inputModesTool';\r\nimport ShareLinkBox from '../toolbar/tools/linkShareTool';\r\nimport ShapeTool from '../toolbar/tools/shapeTool';\r\nimport UndoRedoTool from '../toolbar/tools/undoRedoTool';\r\nimport ZoomInTool from '../toolbar/tools/zoomInTool';\r\nimport ZoomOutTool from '../toolbar/tools/zoomOutTool';\r\nimport {\r\n DrawingEngine,\r\n} from '../../engines/drawingEngine';\r\nimport {\r\n SocketEngine,\r\n} from '../../engines/socketEngine';\r\n\r\nconst Canvas = () => {\r\n const [\r\n isToastVisible,\r\n setIsToastVisible,\r\n ] = useState(false);\r\n\r\n const [\r\n isLoading,\r\n setIsLoading,\r\n ] = useState(false);\r\n const [\r\n canvasMouseDown,\r\n setCanvasMouseDown,\r\n ] = useState(false);\r\n\r\n const drawingEngine = useRef({});\r\n const socketEngine = useRef({});\r\n const {\r\n canvasId: whiteboardId,\r\n } = useRouteMatch('/boards/:canvasId').params;\r\n\r\n const user = useSelector((state) => state.user.value);\r\n const canvasRef = useRef();\r\n const animationCanvasRef = useRef();\r\n const dispatch = useDispatch();\r\n\r\n useEffect(() => {\r\n setIsLoading(true);\r\n const setWhiteboardData = async () => {\r\n const response = await WhiteboardController.getWhiteboardById(whiteboardId);\r\n if (response) {\r\n for (const collaborator of response.collaborators) {\r\n dispatch(addCollaborator(collaborator));\r\n }\r\n\r\n\r\n dispatch(setTitle(response.title));\r\n canvasRef.current.width = window.innerWidth;\r\n canvasRef.current.height = window.innerHeight;\r\n animationCanvasRef.current.width = window.innerWidth;\r\n animationCanvasRef.current.height = window.innerHeight;\r\n\r\n if (response.strokes) {\r\n drawingEngine.current.draw(response.strokes);\r\n drawingEngine.current.drawingData = response.strokes;\r\n }\r\n\r\n setIsLoading(false);\r\n }\r\n };\r\n\r\n if (drawingEngine && drawingEngine !== {}) {\r\n socketEngine.current = new SocketEngine(dispatch);\r\n drawingEngine.current = new DrawingEngine(\r\n {\r\n canvasContext: canvasRef.current.getContext('2d'),\r\n animationContext: animationCanvasRef.current.getContext('2d'),\r\n setCanvasMouseDown,\r\n whiteboardId,\r\n },\r\n );\r\n socketEngine.current.drawingEngine = drawingEngine.current;\r\n drawingEngine.current.socketEngine = socketEngine.current;\r\n }\r\n if (!user.isLoadingUser && user.role) {\r\n socketEngine.current.initializeSocketListeners(whiteboardId);\r\n\r\n setWhiteboardData();\r\n }\r\n }, [\r\n dispatch,\r\n user.isLoadingUser,\r\n user.role,\r\n whiteboardId,\r\n ]);\r\n\r\n const setShape = (shape) => {\r\n drawingEngine.current.shape = shape;\r\n };\r\n const handleResize = () => {\r\n const canvas = canvasRef.current;\r\n canvas.width = window.innerWidth\r\n canvas.height = window.innerHeight\r\n animationCanvasRef.current.width = window.innerWidth;\r\n animationCanvasRef.current.height = window.innerHeight;\r\n drawingEngine.current.redraw();\r\n }\r\n const attachWindowListeners = () => {\r\n window.addEventListener('keydown', (event) => drawingEngine.current.handleKeyDown(event), {\r\n passive: false,\r\n });\r\n window.addEventListener('wheel', (event) => drawingEngine.current.handleScrollZoom(event), {\r\n passive: false,\r\n });\r\n window.addEventListener('resize', handleResize, false);\r\n };\r\n\r\n const removeWindowListeners = () => {\r\n window.removeEventListener('keydown', drawingEngine.current.handleKeyDown);\r\n window.removeEventListener('resize', handleResize);\r\n window.removeEventListener('wheel', drawingEngine.current.handleScrollZoom);\r\n };\r\n\r\n useEffect(() => {\r\n attachWindowListeners();\r\n return () => {\r\n removeWindowListeners();\r\n socketEngine.current.disconnect();\r\n };\r\n }, []);\r\n\r\n const showSuccessToast = () => {\r\n setIsToastVisible(true);\r\n };\r\n\r\n const handleGuestSubmit = async (values) => {\r\n await UserController.createGuest(values);\r\n dispatch(loginUser('guest'));\r\n };\r\n\r\n const handleMouseMove = (event) => {\r\n // Is object empty? Prevents errors when moving mouse as page loads\r\n if (Object.keys(drawingEngine.current).length !== 0) {\r\n drawingEngine.current.handleDragTouch(event);\r\n }\r\n };\r\n\r\n const handleMouseUp = (event) => {\r\n if (canvasMouseDown) {\r\n drawingEngine.current.handleEndStroke(event);\r\n }\r\n };\r\n\r\n const handleTouchEnd = (event) => {\r\n drawingEngine.current.handleEndStroke(event);\r\n };\r\n\r\n const handleTouchMove = (event) => {\r\n drawingEngine.current.handleDragTouch(event);\r\n };\r\n\r\n const handleTouchStart = (event) => {\r\n drawingEngine.current.handleDrawingStart(event);\r\n };\r\n\r\n const handleMouseLeave = () => {\r\n drawingEngine.current.isMouseDown = false;\r\n };\r\n\r\n const handleMouseDown = (event) => {\r\n drawingEngine.current.handleDrawingStart(event);\r\n drawingEngine.current.isMouseDown = true;\r\n };\r\n\r\n const handleZoomIn = drawingEngine.current.scaleUp;\r\n const handleZoomOut = drawingEngine.current.scaleDown;\r\n const handleMarkerClick = (value) => {\r\n drawingEngine.current.paintSize = value;\r\n };\r\n\r\n const handleMarkerSelect = (color) => {\r\n drawingEngine.current.markerColor = color;\r\n };\r\n\r\n return (\r\n
\r\n {isLoading &&\r\n }\r\n \r\n Please update your browser.\r\n \r\n \r\n\r\n \r\n {isToastVisible &&\r\n setIsToastVisible(false)}\r\n open={isToastVisible}\r\n >\r\n \r\n We've copied the link to your clipboard!\r\n \r\n }\r\n {!user.isLoadingUser &&\r\n <>\r\n {!user.isAuthenticated && !user.role &&\r\n }\r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n canvasRef.current.toDataURL('image/png')}\r\n />\r\n \r\n \r\n \r\n \r\n {\r\n Object.values(COLORS).map((color) => \r\n handleMarkerSelect(color)}\r\n size={50}\r\n />\r\n )\r\n }\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default Canvas;\r\n","export default __webpack_public_path__ + \"static/media/logo.db8daaee.svg\";","import React, {\r\n useMemo,\r\n} from 'react';\r\nimport Navbar from 'react-bootstrap/Navbar';\r\nimport logo from '../svg/logo.svg';\r\n\r\nfunction useNavbar (NavigationOptionsComponent, collapse = true) {\r\n return (\r\n <>\r\n {useMemo(() => {\r\n return (\r\n \r\n \r\n \r\n logo\r\n \r\n \r\n {collapse ?\r\n \r\n \r\n :\r\n }\r\n \r\n \r\n );\r\n }, [\r\n NavigationOptionsComponent,\r\n collapse,\r\n ])}\r\n \r\n );\r\n}\r\n\r\nexport default useNavbar;\r\n","import React from 'react';\r\nimport Nav from 'react-bootstrap/Nav';\r\nimport {\r\n useSelector,\r\n} from 'react-redux';\r\nimport useNavbar from './useNavbar';\r\n\r\nfunction BrowsingNavbar () {\r\n const user = useSelector((state) => state.user.value);\r\n const BrowserNavComponent = () => <>\r\n {!user.isLoadingUser &&\r\n
\r\n {user.isAuthenticated ?\r\n My Boards :\r\n <>\r\n Sign In\r\n Create Account\r\n }\r\n\r\n
}\r\n ;\r\n\r\n return useNavbar(BrowserNavComponent, false);\r\n}\r\n\r\nexport default BrowsingNavbar;\r\n","import React, {useState} from 'react';\r\nimport { useSelector} from \"react-redux\";\r\n\r\nimport {\r\n Socket,\r\n} from '../../configuration/socket';\r\nimport \"../../styles/editableTitle.css\";\r\n\r\nimport {useRouteMatch} from \"react-router-dom\";\r\n\r\nconst EditableTitle = () => {\r\n const currTitle = useSelector((state) => state.whiteboard.value.title);\r\n\r\n const {\r\n canvasId: whiteboardId,\r\n } = useRouteMatch('/boards/:canvasId').params;\r\n const [formTitle, setTitle] = useState();\r\n const handleChange = (title) => {\r\n\r\n setTitle(title);\r\n }\r\n const handleSubmit = (title) => {\r\n if (!title) {\r\n setTitle(currTitle);\r\n return;\r\n }\r\n\r\n Socket.emit('update-title', {whiteboardId, title: title?.trim()});\r\n }\r\n return (\r\n <>\r\n
e.preventDefault()}>\r\n handleSubmit(formTitle)}\r\n style={{margin: '0'}}\r\n spellCheck={false}\r\n contentEditable\r\n name=\"title\"\r\n onChange={(e) => handleChange(e.currentTarget.value)}\r\n />\r\n \r\n \r\n );\r\n};\r\n\r\nexport default EditableTitle;\r\n","import React from 'react';\r\nimport ActiveUsers from './activeUsers';\r\nimport useNavbar from './useNavbar';\r\nimport EditableTitle from \"./EditableTitle\";\r\n\r\nfunction DrawingNavbar() {\r\n const DrawingNavbarComponent = () => {\r\n return (\r\n <>\r\n \r\n \r\n \r\n )\r\n };\r\n return useNavbar(DrawingNavbarComponent, false);\r\n}\r\n\r\nexport default DrawingNavbar;\r\n","import React from 'react';\r\nimport {\r\n useLocation,\r\n} from 'react-router-dom';\r\nimport BrowsingNavbar from './browsingNavbar';\r\nimport DrawingNavbar from './drawingNavbar';\r\n\r\nconst NavBar = () => {\r\n const location = useLocation();\r\n const Result = location.pathname.includes('/boards/') ? DrawingNavbar : BrowsingNavbar;\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nexport default NavBar;\r\n","import {Button, TextField} from '@mui/material';\r\nimport {ErrorMessage, Formik} from 'formik';\r\nimport React from 'react';\r\nimport {useHistory} from 'react-router-dom';\r\nimport * as Yup from 'yup';\r\nimport {UserController} from '../../handlers/rest/userController';\r\n\r\nfunction CreateAccount() {\r\n const history = useHistory();\r\n\r\n async function handleCreateAccount(values) {\r\n delete values.matchingPassword; //TODO: find a better way to remove this field?\r\n values.password = btoa(values.password); //base64 encode\r\n try {\r\n await UserController.createAccount(values);\r\n history.push(\"/\");\r\n } catch (e) {\r\n console.log(\"Error\");\r\n }\r\n }\r\n\r\n const CreateAccountSchema = Yup.object().shape({\r\n firstName: Yup.string()\r\n .min(2, 'First Name must be more than 1 character.')\r\n .max(50, 'First Name must be less than 50 characters.')\r\n .required('First name is required.'),\r\n lastName: Yup.string()\r\n .min(2, 'Last name must be more than 1 character.')\r\n .max(50, 'Last name must be less than 50 characters.')\r\n .required('Last name is required.'),\r\n email: Yup.string().email('The email provided is invalid.').required('Email is required.'),\r\n password: Yup.string().min(7, 'Password must be at least 7 characters.').required('Password is a required field.'),\r\n matchingPassword: Yup.string().oneOf([Yup.ref('password'), null], 'Passwords must match.')\r\n });\r\n\r\n return (\r\n
\r\n \r\n {({handleSubmit, values, handleChange, onBlur}) => (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n

Already have an account? Sign in here

\r\n \r\n )}\r\n \r\n
\r\n )\r\n}\r\n\r\nexport default CreateAccount;\r\n","export default __webpack_public_path__ + \"static/media/easy-to-use-icon.c01e3f9d.svg\";","export default __webpack_public_path__ + \"static/media/collaboration-friendly.0419ea48.svg\";","export default __webpack_public_path__ + \"static/media/organized.24ae3594.svg\";","export default __webpack_public_path__ + \"static/media/marker-icon.a51ef49e.svg\";","import React from 'react';\r\nimport '../../styles/button.css';\r\n\r\nfunction Button({onClick, variant = \"primary\", children, grow}) {\r\n\r\n function getClasses() {\r\n return grow ? \"button \" + variant + ' ' + 'grow' : \"button \" + variant;\r\n }\r\n\r\n return (\r\n \r\n );\r\n}\r\n\r\nexport default Button;","import React from 'react';\r\nimport '../../styles/footer.css';\r\nimport logo from '../svg/logo.svg';\r\n\r\nconst Footer = () => {\r\n return (\r\n
\r\n
\r\n logo\r\n

Simplify workflows for remote teams

\r\n
\r\n
\r\n Created by by Kyle Kerlew. Learn more at kylekerlew.com \r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default Footer;\r\n","import React from 'react';\r\nimport '../../styles/line.css';\r\n\r\nfunction Line() {\r\n return (\r\n \r\n \r\n );\r\n}\r\n\r\nexport default Line;\r\n","export default __webpack_public_path__ + \"static/media/writing.8778ce1a.svg\";","import React from 'react';\r\nimport '../../styles/home.css';\r\nimport {\r\n useHistory,\r\n} from 'react-router-dom';\r\nimport {\r\n WhiteboardController,\r\n} from '../../handlers/rest/whiteboardController';\r\nimport EasyToUseIcon from '../../resources/svg/easy-to-use-icon.svg';\r\nimport CollaborationFriendlyIcon from '../../resources/svg/collaboration-friendly.svg';\r\nimport OrganizedIcon from '../../resources/svg/organized.svg';\r\nimport MarkerIcon from '../../resources/svg/marker-icon.svg';\r\nimport Button from '../shared/button';\r\nimport Footer from '../shared/footer';\r\nimport Line from '../shared/line';\r\nimport Writing from '../svg/writing.svg';\r\nimport '../../styles/animations.css';\r\n\r\nconst Home = () => {\r\n const history = useHistory();\r\n\r\n async function createNewWhiteboard() {\r\n try {\r\n const response = await WhiteboardController.createWhiteboard();\r\n history.push(`/boards/${response._id}`);\r\n } catch {\r\n // todo: toast\r\n }\r\n }\r\n\r\n return (\r\n
\r\n \r\n
\r\n\r\n

Whiteboard IO

\r\n
\r\n

\r\n Whiteboard IO is an open source tool for collaborative drawing in real time. It\r\n simplifies planning, instructing, and documenting.\r\n

\r\n
\r\n \r\n window.open('https://github.com/Kyle-Kerlew/whiteboard.io')}\r\n variant='secondary'\r\n >View Github\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n {Array.from({\r\n length: 3,\r\n }).map((unused, index) => {\r\n return ;\r\n })}\r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n
\r\n

\r\n Build Up the Big Picture\r\n

\r\n
\r\n

\r\n Let Whiteboard help you visualize and collaborate in your next meeting, brainstorm session, or\r\n class!\r\n

\r\n
\r\n
\r\n
\r\n Easy to use\r\n

\r\n Easy to Use\r\n

\r\n

Let Whiteboard help you visualize and collaborate in your next meeting, brainstorm session,\r\n or\r\n class!

\r\n
\r\n
\r\n Collaborate\r\n

\r\n Collaborate\r\n

\r\n

Whiteboard offers real-time updates so you can\r\n collaborate quickly and effectively.

\r\n
\r\n
\r\n Organized\r\n

\r\n Keep Organized\r\n

\r\n

Whiteboard IO will keep track of all the projects you are a part of so you don’t have to!

\r\n
\r\n
\r\n
\r\n \r\n
\r\n

\r\n A New Way of Brainstorming\r\n

\r\n
\r\n

\r\n In the age of being remote, Whiteboard can serve as an easy tool to help you be as close as\r\n ever!\r\n

\r\n
\r\n
\r\n \r\n
\r\n

Visualize Workflows

\r\n

Let Whiteboard help you\r\n visualize and collaborate in your next\r\n Let Whiteboard help you visualize and collaborate in your next\r\n meeting, brainstorm session, or\r\n class!

\r\n
\r\n \r\n
\r\n
\r\n \r\n\r\n \r\n
\r\n

Visualize Workflows

\r\n
\r\n

\r\n Let Whiteboard help you visualize and collaborate in your next meeting, brainstorm\r\n session, or class!\r\n

\r\n
\r\n
\r\n \r\n \r\n \r\n