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IAAW,SAAC,EAAD,KACZ,SAAC,EAAD,KACA,SAAC,EAAD,UCbhB,GC+BkBJ,EAAAA,EAAAA,KARM,SAAC6C,GAAD,MAAuB,CAC3CuG,UAAWvG,EAAME,KAAKqG,UACtBhJ,QAASyC,EAAME,KAAK3C,WAGG,GAO3B,EA3BsC,SAACH,GACnC,IAAQmJ,EAAcnJ,EAAdmJ,UACJc,GAAWC,EAAAA,EAAAA,MAQf,OANA7C,EAAAA,EAAAA,YAAU,WACN,IAAI8B,EACA,OAAOc,EAAS,iBAAkB,CAAEE,SAAS,MAElD,CAAChB,EAAWc,KAGX,SAACD,GAAD,UAAUhK","sources":["components/Loader/LottieView.tsx","img/center.svg","img/refresh.svg","img/history.svg","utils/dateFormat.ts","components/PersonInfo/PersonInfo.tsx","components/Map/Map.tsx","components/PersonInfo/PersonInfoContainer.tsx","components/PersonInfo/index.ts","components/HistorySwiper/HistorySwiper.tsx","components/HistorySwiper/index.ts","components/Map/MapContainer.tsx","components/Map/index.ts","components/Sidebar/Sidebar.tsx","components/Sidebar/SidebarContainer.tsx","components/Sidebar/index.ts","pages/Home/Home.tsx","pages/Home/index.ts","pages/Home/HomeContainer.tsx"],"sourcesContent":["\nimport { ConnectedProps, connect } from 'react-redux';\nimport { loadingAction } from '../../store/user/actions';\nimport { useLottie } from \"lottie-react\";\nimport loading from \"./loading.json\";\nimport './Loader.scss';\n\ntype Props = PropsFromRedux;\n\nconst LottieView = (props: Props) => {\n const { loadingAction } = props;\n\n const options = {\n animationData: loading,\n loop: true,\n autoplay: true\n };\n \n const { View } = useLottie(options);\n\n return (\n <div className='lottie-view'>\n <svg className=\"close\" onClick={() => loadingAction(false)} width=\"36\" height=\"36\" viewBox=\"0 0 36 36\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M28.5 9.615L26.385 7.5L18 15.885L9.615 7.5L7.5 9.615L15.885 18L7.5 26.385L9.615 28.5L18 20.115L26.385 28.5L28.5 26.385L20.115 18L28.5 9.615Z\" fill=\"#878787\"/>\n </svg>\n {View}\n </div>\n );\n};\n\nconst mapDispatchToProps = {\n loadingAction\n};\n\nconst connector = connect(null, mapDispatchToProps);\n\nexport type PropsFromRedux = ConnectedProps<typeof connector>;\n\nexport default connector(LottieView);","var _path, _path2, _path3, _path4, _path5, _path6, _path7, _path8, _path9, _path10, _path11, _path12, _path13;\n\nvar _excluded = [\"title\", \"titleId\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgCenter(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 28,\n height: 28,\n viewBox: \"0 0 28 28\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M14 1.99988C13.648 1.99988 13.2992 2.01506 12.9544 2.04486C12.4042 2.0924 11.9967 2.577 12.0442 3.12723C12.0918 3.67747 12.5764 4.08498 13.1266 4.03743C13.4142 4.01258 13.7055 3.99988 14 3.99988C14.2945 3.99988 14.5858 4.01258 14.8734 4.03743C15.4236 4.08498 15.9082 3.67747 15.9558 3.12723C16.0033 2.577 15.5958 2.0924 15.0456 2.04486C14.7008 2.01506 14.352 1.99988 14 1.99988Z\",\n fill: \"#25AFBD\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19.0732 3.1221C18.5728 2.88837 17.9777 3.10453 17.7439 3.60492C17.5102 4.1053 17.7263 4.70043 18.2267 4.93416C18.7564 5.18157 19.261 5.47415 19.7355 5.80704C20.1876 6.1242 20.8113 6.01479 21.1285 5.56266C21.4456 5.11052 21.3362 4.48688 20.8841 4.16972C20.3149 3.77046 19.7093 3.41926 19.0732 3.1221Z\",\n fill: \"#25AFBD\"\n })), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9.77327 4.93416C10.2737 4.70043 10.4898 4.1053 10.2561 3.60492C10.0224 3.10453 9.42723 2.88837 8.92684 3.1221C8.29068 3.41926 7.68508 3.77046 7.11593 4.16972C6.66379 4.48689 6.55438 5.11053 6.87155 5.56266C7.18872 6.01479 7.81236 6.1242 8.26449 5.80703C8.73902 5.47415 9.24361 5.18157 9.77327 4.93416Z\",\n fill: \"#25AFBD\"\n })), _path4 || (_path4 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M23.8302 7.1158C23.513 6.66367 22.8894 6.55426 22.4372 6.87143C21.9851 7.18859 21.8757 7.81223 22.1928 8.26437C22.5257 8.7389 22.8183 9.24349 23.0657 9.77315C23.2995 10.2735 23.8946 10.4897 24.395 10.256C24.8953 10.0222 25.1115 9.4271 24.8778 8.92672C24.5806 8.29055 24.2294 7.68495 23.8302 7.1158Z\",\n fill: \"#25AFBD\"\n })), _path5 || (_path5 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M5.80716 8.26437C6.12432 7.81223 6.01491 7.18859 5.56278 6.87143C5.11065 6.55426 4.48701 6.66367 4.16984 7.11581C3.77059 7.68495 3.41938 8.29055 3.12222 8.92672C2.88849 9.42711 3.10465 10.0222 3.60504 10.256C4.10542 10.4897 4.70055 10.2735 4.93428 9.77315C5.18169 9.24349 5.47427 8.7389 5.80716 8.26437Z\",\n fill: \"#25AFBD\"\n })), _path6 || (_path6 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M25.955 12.9543C25.9075 12.4041 25.4229 11.9966 24.8726 12.0441C24.3224 12.0917 23.9149 12.5763 23.9624 13.1265C23.9873 13.4141 24 13.7054 24 13.9999C24 14.2944 23.9873 14.5857 23.9624 14.8733C23.9149 15.4235 24.3224 15.9081 24.8726 15.9556C25.4229 16.0032 25.9075 15.5957 25.955 15.0454C25.9848 14.7007 26 14.3519 26 13.9999C26 13.6478 25.9848 13.2991 25.955 12.9543Z\",\n fill: \"#25AFBD\"\n })), _path7 || (_path7 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M4.03755 13.1265C4.0851 12.5763 3.67759 12.0917 3.12735 12.0441C2.57712 11.9966 2.09252 12.4041 2.04498 12.9543C2.01519 13.2991 2 13.6478 2 13.9999C2 14.3519 2.01519 14.7007 2.04498 15.0454C2.09252 15.5957 2.57712 16.0032 3.12735 15.9556C3.67759 15.9081 4.0851 15.4235 4.03755 14.8733C4.0127 14.5857 4 14.2944 4 13.9999C4 13.7054 4.0127 13.4141 4.03755 13.1265Z\",\n fill: \"#25AFBD\"\n })), _path8 || (_path8 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M24.8778 19.073C25.1115 18.5727 24.8953 17.9775 24.395 17.7438C23.8946 17.5101 23.2995 17.7262 23.0657 18.2266C22.8183 18.7563 22.5257 19.2609 22.1928 19.7354C21.8757 20.1875 21.9851 20.8112 22.4372 21.1283C22.8894 21.4455 23.513 21.3361 23.8302 20.884C24.2294 20.3148 24.5806 19.7092 24.8778 19.073Z\",\n fill: \"#25AFBD\"\n })), _path9 || (_path9 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M4.93428 18.2266C4.70055 17.7262 4.10542 17.5101 3.60504 17.7438C3.10465 17.9775 2.88849 18.5727 3.12223 19.073C3.41938 19.7092 3.77059 20.3148 4.16984 20.884C4.48701 21.3361 5.11065 21.4455 5.56278 21.1283C6.01491 20.8112 6.12432 20.1875 5.80716 19.7354C5.47427 19.2609 5.18169 18.7563 4.93428 18.2266Z\",\n fill: \"#25AFBD\"\n })), _path10 || (_path10 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8.26449 22.1927C7.81236 21.8756 7.18872 21.985 6.87155 22.4371C6.55438 22.8892 6.66379 23.5129 7.11593 23.83C7.68508 24.2293 8.29068 24.5805 8.92684 24.8777C9.42723 25.1114 10.0224 24.8952 10.2561 24.3948C10.4898 23.8945 10.2737 23.2993 9.77327 23.0656C9.24361 22.8182 8.73903 22.5256 8.26449 22.1927Z\",\n fill: \"#25AFBD\"\n })), _path11 || (_path11 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M20.8841 23.83C21.3362 23.5129 21.4456 22.8892 21.1285 22.4371C20.8113 21.985 20.1876 21.8756 19.7355 22.1927C19.261 22.5256 18.7564 22.8182 18.2267 23.0656C17.7263 23.2993 17.5102 23.8945 17.7439 24.3948C17.9777 24.8952 18.5728 25.1114 19.0732 24.8777C19.7093 24.5805 20.3149 24.2293 20.8841 23.83Z\",\n fill: \"#25AFBD\"\n })), _path12 || (_path12 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13.1266 23.9623C12.5764 23.9148 12.0918 24.3223 12.0442 24.8725C11.9967 25.4228 12.4042 25.9074 12.9544 25.9549C13.2992 25.9847 13.648 25.9999 14 25.9999C14.352 25.9999 14.7008 25.9847 15.0456 25.9549C15.5958 25.9074 16.0033 25.4228 15.9558 24.8725C15.9082 24.3223 15.4236 23.9148 14.8734 23.9623C14.5858 23.9872 14.2945 23.9999 14 23.9999C13.7055 23.9999 13.4142 23.9872 13.1266 23.9623Z\",\n fill: \"#25AFBD\"\n })), _path13 || (_path13 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M14 15.9999C15.1046 15.9999 16 15.1044 16 13.9999C16 12.8953 15.1046 11.9999 14 11.9999C12.8954 11.9999 12 12.8953 12 13.9999C12 15.1044 12.8954 15.9999 14 15.9999Z\",\n fill: \"#25AFBD\"\n })));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgCenter);\nexport default __webpack_public_path__ + \"static/media/center.09948d99b3666d7b3f78e8952f41ad34.svg\";\nexport { ForwardRef as ReactComponent };","var _path;\n\nvar _excluded = [\"title\", \"titleId\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgRefresh(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 28,\n height: 28,\n viewBox: \"0 0 28 28\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M26 13.9999C26.0018 13.8674 25.9774 13.7358 25.9279 13.6128C25.8785 13.4899 25.8052 13.3779 25.7121 13.2836C25.6191 13.1892 25.5082 13.1143 25.3859 13.0631C25.2637 13.012 25.1325 12.9856 25 12.9856C24.8674 12.9856 24.7362 13.012 24.614 13.0631C24.4917 13.1143 24.3808 13.1892 24.2878 13.2836C24.1948 13.3779 24.1214 13.4899 24.072 13.6128C24.0226 13.7358 23.9981 13.8674 24 13.9999C24 19.5344 19.5345 23.9999 14 23.9999C8.46543 23.9999 3.99996 19.5344 3.99996 13.9999C3.99996 8.46534 8.46543 3.99988 14 3.99988C16.3497 3.99988 18.5031 4.80842 20.207 6.16003L18 7.99988L25 9.99988L24 2.99988L21.7597 4.86707C19.6649 3.08654 16.9582 1.99988 14 1.99988C7.38449 1.99988 1.99996 7.38441 1.99996 13.9999C1.99996 20.6153 7.38449 25.9999 14 25.9999C20.6154 25.9999 26 20.6153 26 13.9999Z\",\n fill: \"#25AFBD\"\n })));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgRefresh);\nexport default __webpack_public_path__ + \"static/media/refresh.b57d2cf2b0f7a30dffb96fcd4b810671.svg\";\nexport { ForwardRef as ReactComponent };","var _path, _path2;\n\nvar _excluded = [\"title\", \"titleId\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgHistory(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 28,\n height: 29,\n viewBox: \"0 0 28 29\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12.8482 9.93462C12.2121 9.93462 11.6964 10.4503 11.6964 11.0864V15.6936C11.6964 16.3297 12.2121 16.8453 12.8482 16.8453H18.6071C19.2432 16.8453 19.7589 16.3297 19.7589 15.6936C19.7589 15.0574 19.2432 14.5418 18.6071 14.5418H14V11.0864C14 10.4503 13.4843 9.93462 12.8482 9.93462Z\",\n fill: \"#25AFBD\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M27.8214 14.5418C27.8214 22.1751 21.6333 28.3632 14 28.3632C6.36662 28.3632 0.178558 22.1751 0.178558 14.5418C0.178558 6.9084 6.36662 0.720337 14 0.720337C21.6333 0.720337 27.8214 6.9084 27.8214 14.5418ZM25.5178 14.5418C25.5178 20.9029 20.3611 26.0596 14 26.0596C7.63885 26.0596 2.48213 20.9029 2.48213 14.5418C2.48213 8.18063 7.63885 3.02391 14 3.02391C20.3611 3.02391 25.5178 8.18063 25.5178 14.5418Z\",\n fill: \"#25AFBD\"\n })));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgHistory);\nexport default __webpack_public_path__ + \"static/media/history.b58f038dd036dfd268febee50404b9a7.svg\";\nexport { ForwardRef as ReactComponent };","import moment from \"moment\";\n\nexport function dateFormat(date: string) {\n const stillUtc = moment.utc(date).toDate();\n return moment(stillUtc).local().format(\"MMM DD, YYYY HH:mm\");\n}\n","import centerIcon from \"../../img/center.svg\";\nimport refreshIcon from \"../../img/refresh.svg\";\nimport historyIcon from \"../../img/history.svg\";\nimport { User } from \"../../types\";\nimport { PropsFromRedux } from \"./PersonInfoContainer\";\nimport { dateFormat } from \"../../utils/dateFormat\";\n\ntype Props = PropsFromRedux & {\n currentFriend: User;\n centerHandle: () => void;\n handelClose: () => void;\n};\n\nexport const PersonInfo: React.FC<Props> = (props) => {\n const {\n currentFriend,\n centerHandle,\n historyAction,\n updateLocationAction,\n address,\n handelClose,\n } = props;\n\n return (\n <div className=\"person\">\n <svg\n className=\"person__close\"\n onClick={handelClose}\n width=\"28\"\n height=\"28\"\n viewBox=\"0 0 28 28\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M6.92849 6.92893C6.53796 7.31946 6.53797 7.95262 6.92849 8.34315L12.5853 14L6.92849 19.6569C6.53796 20.0474 6.53796 20.6805 6.92849 21.0711C7.31901 21.4616 7.95218 21.4616 8.3427 21.0711L13.9996 15.4142L19.6564 21.0711C20.0469 21.4616 20.6801 21.4616 21.0706 21.0711C21.4611 20.6805 21.4611 20.0474 21.0706 19.6569L15.4138 14L21.0706 8.34315C21.4611 7.95262 21.4611 7.31946 21.0706 6.92893C20.6801 6.53841 20.0469 6.53841 19.6564 6.92893L13.9996 12.5858L8.3427 6.92893C7.95218 6.53841 7.31901 6.53841 6.92849 6.92893Z\"\n fill=\"#666\"\n />\n </svg>\n <div className=\"person__item\">\n <div className=\"person__row\">\n <div\n className=\"person__img\"\n style={{\n backgroundImage: `url(${\n currentFriend.pictureUrl || \"https://imap-app.com/images/default.svg\"\n })`,\n }}\n />\n <div className=\"person__content\">\n <div className=\"person__full-name\">{currentFriend.name}</div>\n {currentFriend.locationUpdatedAt && (\n <div className=\"person__last-time\">\n {dateFormat(currentFriend.locationUpdatedAt)}\n </div>\n )}\n {address && <div className=\"person__location\">{address}</div>}\n </div>\n </div>\n </div>\n <div className=\"person__item\">\n <div className=\"btn-group\">\n <button className=\"paper\" onClick={centerHandle}>\n <div className=\"paper__text\">Center</div>\n <img src={centerIcon} alt=\"\" className=\"paper__icon\" />\n </button>\n <button\n className=\"paper\"\n onClick={() => updateLocationAction(currentFriend.id)}\n >\n <div className=\"paper__text\">Refresh</div>\n <img src={refreshIcon} alt=\"\" className=\"paper__icon\" />\n </button>\n <button\n className=\"paper\"\n onClick={() => historyAction(currentFriend.id)}\n >\n <div className=\"paper__text\">History</div>\n <img src={historyIcon} alt=\"\" className=\"paper__icon\" />\n </button>\n </div>\n </div>\n </div>\n );\n};\n","import { GoogleMap, LoadScript, Marker } from \"@react-google-maps/api\";\nimport { useCallback, useEffect, useRef } from \"react\";\nimport moment from \"moment\";\nimport { Center } from \"../../types\";\nimport PersonInfoContainer from \"../PersonInfo\";\nimport { PropsFromRedux } from \"./MapContainer\";\nimport HistorySwiper from \"../HistorySwiper\";\n\ntype Props = PropsFromRedux & {\n position?: Center;\n};\n\nlet flightPath: google.maps.Polyline;\nlet markers: google.maps.Marker[] = [];\n\nexport const Map = (props: Props) => {\n const { position, currentFriend, historiesByDate, addressAction } = props;\n const mapRef = useRef<google.maps.Map | null>(null);\n\n const onLoad = useCallback(function callback(map: google.maps.Map) {\n mapRef.current = map;\n }, []);\n\n const getPolyline = useCallback(\n (map: google.maps.Map | null) => {\n if (historiesByDate.length === 0) {\n if (flightPath) {\n flightPath.setMap(null);\n }\n return;\n }\n let geoPoints: Center[] = [];\n if (flightPath) {\n flightPath.setMap(null);\n }\n if (historiesByDate) {\n for (let point of historiesByDate) {\n const geoPoint: Center = {\n lat: point.positionX,\n lng: point.positionY,\n };\n geoPoints.push(geoPoint);\n }\n }\n flightPath = new google.maps.Polyline({\n path: geoPoints,\n geodesic: true,\n strokeColor: \"#FF0000\",\n strokeOpacity: 1.0,\n strokeWeight: 2,\n });\n\n flightPath.setMap(map);\n },\n [historiesByDate]\n );\n\n // Sets the map on all markers in the array.\n function setMapOnAll(map: google.maps.Map | null) {\n for (let i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n }\n\n // Deletes all markers in the array by removing references to them.\n const deleteMarkers = useCallback(() => {\n setMapOnAll(null);\n getPolyline(null);\n }, [getPolyline]);\n\n const geocodeLatLng = useCallback(\n (location: Center) => {\n if (mapRef.current) {\n const geocoder = new google.maps.Geocoder();\n geocoder\n .geocode({ location })\n .then((response) => {\n if (response.results[0]) {\n addressAction(response.results[0].formatted_address);\n } else {\n window.alert(\"No results found\");\n }\n })\n .catch((e) => console.log(\"Geocoder failed due to: \" + e));\n }\n },\n [addressAction]\n );\n\n useEffect(() => {\n if (position && currentFriend) {\n geocodeLatLng(position);\n if (mapRef.current) {\n mapRef.current.setZoom(16);\n }\n }\n }, [position, currentFriend, geocodeLatLng]);\n\n const showHistories = useCallback(() => {\n deleteMarkers();\n if (mapRef.current) {\n const bounds = new google.maps.LatLngBounds();\n const infowindow = new google.maps.InfoWindow();\n let marker: google.maps.Marker, i: number;\n for (i = 0; i < historiesByDate.length; i++) {\n marker = new google.maps.Marker({\n position: new google.maps.LatLng(\n historiesByDate[i].positionX,\n historiesByDate[i].positionY\n ),\n map: mapRef.current,\n });\n\n markers.push(marker);\n\n google.maps.event.addListener(\n marker,\n \"click\",\n (function (marker, i) {\n return function () {\n const contentString = `\n <div class=\"infoWindow\">\n <div class=\"infoWindow__date\">${moment\n .utc(historiesByDate[i].locatedAt)\n .local()\n .format(\"DD.MM.YYYY\")}</div>\n <div class=\"infoWindow__time\">${moment\n .utc(historiesByDate[i].locatedAt)\n .local()\n .format(\"HH:mm:ss\")}</div>\n </div>\n `;\n infowindow.setContent(contentString);\n infowindow.open(mapRef.current, marker);\n };\n })(marker, i)\n );\n\n const markerPosition = marker.getPosition();\n if (marker.getVisible() && markerPosition) {\n bounds.extend(markerPosition);\n }\n mapRef.current.fitBounds(bounds);\n }\n\n getPolyline(mapRef.current);\n }\n }, [getPolyline, historiesByDate, deleteMarkers]);\n\n useEffect(() => {\n if (position) {\n return deleteMarkers();\n }\n showHistories();\n }, [historiesByDate, showHistories, deleteMarkers, position]);\n\n return (\n <div className=\"map\">\n {currentFriend && <PersonInfoContainer currentFriend={currentFriend} />}\n <div className=\"map-container\">\n <LoadScript googleMapsApiKey=\"AIzaSyCt-8q69NCdYOzDe0JdOWCHbX-4gm3PPdY\">\n <GoogleMap\n mapContainerStyle={mapStyle}\n center={position}\n zoom={10}\n onLoad={onLoad}\n options={{\n fullscreenControl: true,\n zoomControl: false,\n streetViewControl: false,\n mapTypeControl: false,\n fullscreenControlOptions: {\n position: 12.0,\n },\n }}\n >\n {position && <Marker position={position} />}\n <HistorySwiper />\n </GoogleMap>\n </LoadScript>\n </div>\n </div>\n );\n};\n\nconst mapStyle = {\n width: \"100%\",\n height: \"100%\",\n};\n","import { ConnectedProps, connect } from 'react-redux';\nimport { RootState } from '../../store';\nimport { positionAction, historyAction, updateLocationAction, currentFriendAction, loadingAction } from '../../store/user/actions';\nimport { Center, User } from '../../types';\nimport { PersonInfo } from './PersonInfo';\nimport './PersonInfo.scss';\n\ntype Props = PropsFromRedux & {\n currentFriend: User;\n};\n\nconst PersonInfoContainer:React.FC<Props> = (props) => {\n const { currentFriend, positionAction, currentFriendAction, user, loadingAction } = props;\n\n const centerHandle = () => {\n loadingAction(true);\n if(currentFriend.positionX && currentFriend.positionY) {\n const friendPosition: Center = {\n lat: currentFriend.positionX,\n lng: currentFriend.positionY\n }\n positionAction(friendPosition);\n }\n setTimeout(() => loadingAction(false), 500);\n }\n\n const handelClose = () => {\n currentFriendAction(null);\n if(user && user.positionX && user.positionY) {\n const position: Center = {\n lat: user.positionX,\n lng: user.positionY\n }\n positionAction(position);\n }\n }\n\n return (\n <PersonInfo \n {...props}\n currentFriend={currentFriend} \n centerHandle={centerHandle} \n handelClose={handelClose} />\n );\n};\n\nconst mapStateToProps = (state: RootState) => ({\n friends: state.user.friends,\n address: state.user.address,\n user: state.user.user\n});\n \nconst mapDispatchToProps = {\n positionAction,\n historyAction,\n updateLocationAction,\n currentFriendAction,\n loadingAction\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\nexport type PropsFromRedux = ConnectedProps<typeof connector>;\n\nexport default connector(PersonInfoContainer);","import PersonInfoContainer from './PersonInfoContainer';\n\nexport default PersonInfoContainer;","import { ConnectedProps, connect } from \"react-redux\";\nimport { RootState } from \"../../store\";\nimport { Swiper, SwiperSlide } from \"swiper/react\";\nimport { Navigation } from \"swiper\";\nimport { History } from \"../../types\";\nimport moment from \"moment\";\nimport {\n historiesByDateAction,\n activeIndexAction,\n} from \"../../store/user/actions\";\nimport \"swiper/css\";\nimport \"./HistorySwiper.scss\";\n\ntype Props = PropsFromRedux;\n\nconst HistorySwiper = (props: Props) => {\n const {\n histories,\n historiesByDateAction,\n activeIndexAction,\n activeIndex,\n currentFriend,\n } = props;\n\n // store swiper instance\n\n let group: Array<History[]> = histories.reduce((r: any, a: History) => {\n const date = moment(a.locatedAt).format(\"YYYY-MM-DD\");\n r[date] = [...(r[date] || []), a];\n return r;\n }, {});\n\n const getHistoriesByDate = (index: number) => {\n activeIndexAction(index);\n const historyList = Object.values(group).reverse();\n historiesByDateAction(historyList[index]);\n };\n\n if (histories.length === 0) return null;\n\n return (\n <div className={`history-swiper ${currentFriend ? \"friend-swiper\" : \"\"}`}>\n <Swiper navigation={true} modules={[Navigation]} slidesPerView={10}>\n {Object.keys(group)\n .reverse()\n .map((item, index) => (\n <SwiperSlide\n key={item}\n className={`history-swiper__item ${\n index === activeIndex ? \"active\" : \"\"\n }`}\n onClick={() => getHistoriesByDate(index)}\n >\n <div className=\"history-swiper__day\">\n {moment.utc(item).local().format(\"DD\")}\n </div>\n <div className=\"history-swiper__month\">\n {moment.utc(item).local().format(\"MMM\")}\n </div>\n <div className=\"history-swiper__yaer\">\n {moment.utc(item).local().format(\"YYYY\")}\n </div>\n </SwiperSlide>\n ))}\n </Swiper>\n </div>\n );\n};\n\nconst mapStateToProps = (state: RootState) => ({\n histories: state.user.histories,\n activeIndex: state.user.activeIndex,\n currentFriend: state.user.currentFriend,\n});\n\nconst mapDispatchToProps = {\n historiesByDateAction,\n activeIndexAction,\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\nexport type PropsFromRedux = ConnectedProps<typeof connector>;\n\nexport default connector(HistorySwiper);\n","import HistorySwiper from './HistorySwiper';\n\nexport default HistorySwiper;","import { ConnectedProps, connect } from 'react-redux';\nimport { RootState } from '../../store';\nimport { Map } from \"./Map\";\nimport { addressAction } from '../../store/user/actions';\nimport { Loader } from '../Loader';\nimport './Map.scss';\n\ntype Props = PropsFromRedux;\n\nconst MapContainer = (props: Props) => {\n const { position, tokenInfo } = props;\n\n if(!tokenInfo) {\n return <Loader />\n }\n\n return (\n <Map {...props} position={position} />\n );\n};\n\nconst mapStateToProps = (state: RootState) => ({\n user: state.user.user,\n currentFriend: state.user.currentFriend,\n position: state.user.position,\n historiesByDate: state.user.historiesByDate,\n tokenInfo: state.user.tokenInfo,\n loading: state.user.loading\n});\n\nconst mapDispatchToProps = {\n addressAction\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\nexport type PropsFromRedux = ConnectedProps<typeof connector>;\n\nexport default connector(MapContainer);","import MapContainer from '../Map/MapContainer';\n\nexport default MapContainer;","import React from \"react\";\nimport centerIcon from \"../../img/center.svg\";\nimport refreshIcon from \"../../img/refresh.svg\";\nimport historyIcon from \"../../img/history.svg\";\nimport { Scrollbars } from \"react-custom-scrollbars\";\nimport { PropsFromRedux } from \"./SidebarContainer\";\nimport { User } from \"../../types\";\nimport { dateFormat } from \"../../utils/dateFormat\";\n\ntype Props = PropsFromRedux & {\n renderThumb: ({ style, ...props }: any) => JSX.Element;\n centerHandle: () => void;\n friendHandle: (friend: User) => void;\n};\n\nexport const Sidebar: React.FC<Props> = (props) => {\n const {\n renderThumb,\n user,\n friends,\n currentFriendAction,\n centerHandle,\n historyAction,\n updateLocationAction,\n } = props;\n\n return (\n <div className=\"sidebar\">\n {user && (\n <div className=\"profile\">\n <div className=\"profile__img-row\">\n <div\n className=\"profile__img\"\n style={{\n backgroundImage: `url(${\n user.pictureUrl || \"https://imap-app.com/images/default.svg\"\n })`,\n }}\n />\n </div>\n <div className=\"profile__content\">\n <div className=\"profile__name\">\n <strong>Hi, </strong>\n <span>{user.name}</span>\n </div>\n {user.subscriptionTill && (\n <div className=\"profile__subscription\">\n Subscription: <span>{dateFormat(user.subscriptionTill)}</span>\n </div>\n )}\n </div>\n </div>\n )}\n <div className=\"btn-group\">\n <button className=\"paper\" onClick={centerHandle}>\n <div className=\"paper__text\">Center</div>\n <img src={centerIcon} className=\"paper__icon\" alt=\"\" />\n </button>\n <button\n className=\"paper\"\n onClick={() => user && updateLocationAction(user.id)}\n >\n <div className=\"paper__text\">Refresh</div>\n <img src={refreshIcon} className=\"paper__icon\" alt=\"\" />\n </button>\n <button\n className=\"paper\"\n onClick={() => user && historyAction(user.id, \"user\")}\n >\n <div className=\"paper__text\">History</div>\n <img src={historyIcon} className=\"paper__icon\" alt=\"\" />\n </button>\n </div>\n <div className=\"title\">Friends</div>\n <Scrollbars style={{ height: 410 }} renderThumbVertical={renderThumb}>\n <div className=\"friends\">\n {friends.map((friend) => (\n <div\n key={friend.id}\n className=\"friend\"\n onClick={() => currentFriendAction(friend)}\n >\n <div\n className=\"friend__img\"\n style={{\n backgroundImage: `url(${\n friend.pictureUrl || \"https://imap-app.com/images/default.svg\"\n })`,\n }}\n />\n <div className=\"friend__content\">\n <div className=\"friend__full-name\">{friend.name}</div>\n {friend.locationUpdatedAt && (\n <div className=\"friend__last-time\">\n {dateFormat(friend.locationUpdatedAt)}\n </div>\n )}\n <div className=\"friend__more\">See details</div>\n </div>\n </div>\n ))}\n </div>\n </Scrollbars>\n </div>\n );\n};\n","import { useEffect } from 'react';\nimport { ConnectedProps, connect } from 'react-redux';\nimport { RootState } from '../../store';\nimport { Sidebar } from './Sidebar';\nimport { \n userAction, friendsAction, currentFriendAction, positionAction, \n historyAction, updateLocationAction, loadingAction, historiesByDateAction \n} from '../../store/user/actions';\nimport { Center, User } from '../../types';\nimport './Sidebar.scss';\n\ntype Props = PropsFromRedux;\n\nconst SidebarContainer:React.FC<Props> = (props) => {\n const { userAction, friendsAction, user, positionAction, tokenInfo, loadingAction, currentFriendAction, historiesByDateAction } = props;\n\n useEffect(() => {\n if(tokenInfo) {\n userAction();\n friendsAction();\n }\n }, [userAction, friendsAction, tokenInfo]);\n\n const centerHandle = () => {\n loadingAction(true);\n if(user && user.positionX && user.positionY) {\n const userPosition: Center = {\n lat: user.positionX,\n lng: user.positionY\n }\n positionAction(userPosition);\n }\n setTimeout(() => loadingAction(false), 500);\n }\n\n const friendHandle = (friend: User) => {\n currentFriendAction(friend);\n historiesByDateAction([]);\n }\n\n const renderThumb = ({ style, ...props }: any) => {\n const thumbStyle = {\n backgroundColor: '#25AFBD',\n borderRadius: 4,\n width: 4,\n cursore: 'pointer'\n };\n return (\n <div\n style={{ ...style, ...thumbStyle }}\n {...props} />\n );\n }\n\n return (\n <Sidebar {...props} renderThumb={renderThumb} centerHandle={centerHandle} friendHandle={friendHandle} />\n );\n};\n\nconst mapStateToProps = (state: RootState) => ({\n user: state.user.user,\n friends: state.user.friends,\n tokenInfo: state.user.tokenInfo\n});\n \nconst mapDispatchToProps = {\n userAction,\n friendsAction,\n currentFriendAction,\n positionAction,\n historyAction,\n updateLocationAction,\n loadingAction,\n historiesByDateAction\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\nexport type PropsFromRedux = ConnectedProps<typeof connector>;\n\nexport default connector(SidebarContainer);","import SidebarContainer from './SidebarContainer';\n\nexport default SidebarContainer;","import LottieView from '../../components/Loader/LottieView';\nimport MapContainer from '../../components/Map';\nimport SidebarContainer from '../../components/Sidebar';\nimport { PropsFromRedux } from './HomeContainer';\n\ntype Props = PropsFromRedux;\n\nexport const Home = (props: Props) => {\n const { loading } = props;\n return (\n <div className=\"container\">\n <div className=\"row\">\n {loading && <LottieView />}\n <SidebarContainer />\n <MapContainer />\n </div>\n </div>\n );\n};","import HomeContainer from './HomeContainer';\nexport default HomeContainer;","import { useEffect } from 'react';\nimport { ConnectedProps, connect } from 'react-redux';\nimport { useNavigate } from 'react-router-dom';\nimport { RootState } from '../../store';\nimport { Home } from './Home';\nimport './Home.scss';\n\nexport type Props = PropsFromRedux;\n\nconst HomeContainer:React.FC<Props> = (props) => {\n const { tokenInfo } = props;\n let navigate = useNavigate();\n\n useEffect(() => {\n if(!tokenInfo) {\n return navigate('/authorization', { replace: true });\n }\n }, [tokenInfo, navigate]);\n\n return (\n <Home {...props} />\n );\n};\n\nconst mapStateToProps = (state: RootState) => ({\n tokenInfo: state.user.tokenInfo,\n loading: state.user.loading\n});\n \nconst mapDispatchToProps = {\n};\n\nconst connector = connect(mapStateToProps, mapDispatchToProps);\n\nexport type PropsFromRedux = ConnectedProps<typeof connector>;\n\nexport default connector(HomeContainer);"],"names":["mapDispatchToProps","loadingAction","connect","props","options","animationData","loading","loop","autoplay","View","useLottie","className","onClick","width","height","viewBox","fill","xmlns","d","dateFormat","date","stillUtc","moment","toDate","local","format","flightPath","PersonInfo","currentFriend","centerHandle","historyAction","updateLocationAction","address","handelClose","style","backgroundImage","pictureUrl","name","locationUpdatedAt","src","centerIcon","alt","id","refreshIcon","historyIcon","positionAction","currentFriendAction","state","friends","user","positionX","positionY","friendPosition","lat","lng","setTimeout","position","historiesByDateAction","activeIndexAction","histories","activeIndex","group","reduce","r","a","locatedAt","length","navigation","modules","Navigation","slidesPerView","Object","keys","reverse","map","item","index","historyList","values","getHistoriesByDate","markers","Map","historiesByDate","addressAction","mapRef","useRef","onLoad","useCallback","current","getPolyline","geoPoints","setMap","point","geoPoint","push","google","maps","Polyline","path","geodesic","strokeColor","strokeOpacity","strokeWeight","deleteMarkers","i","setMapOnAll","geocodeLatLng","location","Geocoder","geocode","then","response","results","formatted_address","window","alert","catch","e","console","log","useEffect","setZoom","showHistories","marker","bounds","LatLngBounds","infowindow","InfoWindow","Marker","LatLng","event","addListener","contentString","setContent","open","markerPosition","getPosition","getVisible","extend","fitBounds","googleMapsApiKey","mapContainerStyle","mapStyle","center","zoom","fullscreenControl","zoomControl","streetViewControl","mapTypeControl","fullscreenControlOptions","tokenInfo","Sidebar","renderThumb","subscriptionTill","renderThumbVertical","friend","userAction","friendsAction","backgroundColor","borderRadius","cursore","userPosition","friendHandle","Home","navigate","useNavigate","replace"],"sourceRoot":""}