/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = "./src/login/index.js");
/******/ })
/************************************************************************/
/******/ ({

/***/ "./src/login/defaultlogin.js":
/*!***********************************!*\
  !*** ./src/login/defaultlogin.js ***!
  \***********************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nvar _wp$element = wp.element,\n    createElement = _wp$element.createElement,\n    useState = _wp$element.useState,\n    useEffect = _wp$element.useEffect,\n    Fragment = _wp$element.Fragment,\n    render = _wp$element.render;\nvar _wp$data = wp.data,\n    dispatch = _wp$data.dispatch,\n    select = _wp$data.select;\n\nvar DefaultLogin = function DefaultLogin(props) {\n  var _useState = useState({}),\n      _useState2 = _slicedToArray(_useState, 2),\n      providers = _useState2[0],\n      setProviders = _useState2[1];\n\n  var _useState3 = useState(false),\n      _useState4 = _slicedToArray(_useState3, 2),\n      isLoading = _useState4[0],\n      setIsLoading = _useState4[1];\n\n  useEffect(function () {\n    if (window.vibebp.settings.firebase_config) {\n      if ((typeof firebase === \"undefined\" ? \"undefined\" : _typeof(firebase)) == 'object' && firebase.apps.length === 0) {\n        firebase.initializeApp(JSON.parse(window.vibebp.settings.firebase_config));\n      }\n    }\n  }, []);\n  useEffect(function () {\n    if (window.vibebp.settings.firebase_config) {\n      var nproviders = {};\n      Object.keys(window.vibebp.settings.auth).map(function (key) {\n        if (window.vibebp.settings.auth[key]) {\n          if (key === 'google') {\n            nproviders.google = new firebase.auth.GoogleAuthProvider();\n            nproviders.google.addScope('profile');\n            nproviders.google.addScope('email');\n          }\n\n          if (key === 'twitter') {\n            nproviders.twitter = new firebase.auth.TwitterAuthProvider();\n          }\n\n          if (key === 'github') {\n            nproviders.github = new firebase.auth.GithubAuthProvider();\n          }\n\n          if (key === 'apple') {\n            nproviders.apple = new firebase.auth.OAuthProvider('apple.com'); //new firebase.auth.AppleAuthProvider();\n\n            nproviders.apple.addScope('email');\n            nproviders.apple.addScope('name');\n          }\n\n          if (key === 'facebook') {\n            nproviders.facebook = new firebase.auth.FacebookAuthProvider();\n          }\n        }\n      });\n      setProviders(nproviders);\n    }\n  }, []);\n\n  var sociallogin = function sociallogin(result, idToken) {\n    fetch(\"\".concat(window.vibebp.api.url, \"/sociallogin?client_id=\").concat(window.vibebp.settings.client_id), {\n      method: 'post',\n      body: JSON.stringify({\n        social: result.credential.signInMethod,\n        client_id: window.vibebp.settings.client_id,\n        user: {\n          email: result.user.email,\n          uid: result.user.uid,\n          name: result.user.displayName,\n          avatar: result.user.photoURL,\n          phoneNumber: result.user.phoneNumber,\n          last_login: result.user.metadata.lastSignInTime,\n          create_time: result.user.metadata.creationTime\n        },\n        idToken: idToken\n      })\n    }).then(function (res) {\n      return res.json();\n    }).then(function (data) {\n      if (data.status) {\n        localforage.setItem('bp_login_token', data.token);\n        fetch(\"\".concat(window.vibebp.api.validate_token, \"?client_id=\").concat(window.vibebp.settings.client_id), {\n          method: 'post',\n          body: data.token\n        }).then(function (res) {\n          return res.json();\n        }).then(function (response) {\n          if (response.hasOwnProperty('data')) {\n            localforage.setItem('bp_user', JSON.stringify(response.data.data.user));\n            sessionStorage.setItem('bp_user', JSON.stringify(response.data.data.user));\n            props.setUser(response.data.data.user);\n            dispatch('vibebp').setToken(data.token);\n            dispatch('vibebp').setUser(response.data.data.user);\n            document.querySelector('body').classList.add('vibebp-logged-in');\n            var event = new CustomEvent(\"userLoaded\", {\n              detail: {\n                userLoaded: true\n              }\n            });\n            document.dispatchEvent(event);\n\n            if (window.vibebp.settings.login_redirect && window.vibebp.settings.login_redirect_component) {\n              window.location.href = window.vibebp.settings.login_redirect + response.data.data.user.slug + '#' + window.vibebp.settings.login_redirect_component;\n            }\n\n            fetch(\"\".concat(window.vibebp.api.url, \"/loggedinmenu\"), {\n              method: 'post',\n              body: JSON.stringify({\n                token: data.token\n              })\n            }).then(function (res) {\n              return res.json();\n            }).then(function (resp) {\n              if (resp.status) {\n                dispatch('vibebp').setData('loggedinMenu', resp.menu);\n              }\n            });\n          }\n        });\n      }\n    });\n  };\n\n  var initiateLogin = function initiateLogin(key) {\n    if (window.vibebp.settings.firebase_config && providers && providers[key]) {\n      setIsLoading(key);\n      firebase.auth().signInWithPopup(providers[key]).then(function (result) {\n        var user = result.user;\n        user.getIdToken().then(function (idToken) {\n          sociallogin(result, idToken);\n        });\n      })[\"catch\"](function (error) {\n        if (error.code === 'auth/account-exists-with-different-credential') {\n          console.log('account exists in different login credentials');\n          firebase.auth().fetchSignInMethodsForEmail(error.email).then(function (rproviders) {\n            setIsLoading(false);\n\n            if (Array.isArray(rproviders)) {\n              if (rproviders.indexOf(\"google.com\") > -1) {\n                var provider = new firebase.auth.GoogleAuthProvider();\n                provider.addScope('profile');\n                provider.addScope('email');\n              } else if (rproviders.indexOf(\"facebook.com\") > -1) {\n                var provider = new firebase.auth.FacebookAuthProvider();\n              } else if (rproviders.indexOf(\"twitter.com\") > -1) {\n                var provider = new firebase.auth.TwitterAuthProvider();\n              } else if (rproviders.indexOf(\"github.com\") > -1) {\n                var provider = new firebase.auth.GithubAuthProvider();\n              }\n\n              provider.setCustomParameters({\n                login_hint: error.email\n              });\n              firebase.auth().signInWithPopup(provider).then(function (result) {\n                var user = result.user;\n                user.getIdToken().then(function (idToken) {\n                  sociallogin(result, idToken);\n                });\n              })[\"catch\"](function (er) {\n                console.log(er);\n              });\n            }\n          });\n        }\n      });\n    } else {\n      document.dispatchEvent(new CustomEvent('login_with_' + key, {\n        detail: {\n          key: key\n        }\n      }));\n    }\n  };\n\n  return wp.element.createElement(Fragment, null, wp.element.createElement(\"h2\", {\n    dangerouslySetInnerHTML: {\n      __html: window.vibebp.translations.login_heading\n    }\n  }), wp.element.createElement(\"p\", {\n    dangerouslySetInnerHTML: {\n      __html: window.vibebp.translations.login_message\n    }\n  }), window.vibebp.settings.firebase_config ? Object.keys(window.vibebp.settings.auth).map(function (key) {\n    if (window.vibebp.settings.auth[key]) {\n      return wp.element.createElement(\"a\", {\n        className: isLoading == key ? 'button is-primary is-loading' : 'button is-primary',\n        onClick: function onClick() {\n          return initiateLogin(key);\n        }\n      }, window.vibebp.settings.icons && window.vibebp.settings.icons[key] ? wp.element.createElement(\"span\", {\n        className: \"vicon\",\n        dangerouslySetInnerHTML: {\n          __html: window.vibebp.settings.icons[key]\n        }\n      }) : wp.element.createElement(\"span\", {\n        className: 'icon vicon vicon-' + key\n      }), wp.element.createElement(\"span\", null, window.vibebp.translations[key]));\n    }\n  }) : '', wp.element.createElement(\"a\", {\n    className: \"button is-primary\",\n    onClick: function onClick() {\n      return props.setemailSignIn(true);\n    }\n  }, wp.element.createElement(\"span\", {\n    className: \"icon vicon vicon-email\"\n  }), wp.element.createElement(\"span\", null, window.vibebp.translations.email_login)), wp.element.createElement(\"div\", {\n    className: \"extra_details\"\n  }, window.vibebp.settings.enable_registrations ? isNaN(window.vibebp.settings.enable_registrations) ? wp.element.createElement(\"p\", null, window.vibebp.translations.no_account, wp.element.createElement(\"a\", {\n    className: \"vibebp_forward_link\",\n    href: window.vibebp.settings.enable_registrations\n  }, window.vibebp.translations.create_one, \" \", wp.element.createElement(\"span\", {\n    className: \"vicon vicon-arrow-right\"\n  }))) : wp.element.createElement(\"p\", null, window.vibebp.translations.no_account, wp.element.createElement(\"a\", {\n    className: \"vibebp_forward_link\",\n    onClick: function onClick() {\n      return props.setRegistration(true);\n    }\n  }, window.vibebp.translations.create_one, \" \", wp.element.createElement(\"span\", {\n    className: \"vicon vicon-arrow-right\"\n  }))) : '', wp.element.createElement(\"p\", null, window.vibebp.translations.login_terms)));\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (DefaultLogin);\n\n//# sourceURL=webpack:///./src/login/defaultlogin.js?");

/***/ }),

/***/ "./src/login/index.js":
/*!****************************!*\
  !*** ./src/login/index.js ***!
  \****************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _defaultlogin_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultlogin.js */ \"./src/login/defaultlogin.js\");\n/* harmony import */ var _signinemail_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./signinemail.js */ \"./src/login/signinemail.js\");\n/* harmony import */ var _register_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./register.js */ \"./src/login/register.js\");\n/* harmony import */ var _usermenu_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./usermenu.js */ \"./src/login/usermenu.js\");\n/* harmony import */ var _store_bp_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../store/bp.js */ \"./src/store/bp.js\");\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\n\n\n\n\n\nvar _wp$element = wp.element,\n    createElement = _wp$element.createElement,\n    useState = _wp$element.useState,\n    useEffect = _wp$element.useEffect,\n    Fragment = _wp$element.Fragment,\n    render = _wp$element.render;\nvar _wp$data = wp.data,\n    dispatch = _wp$data.dispatch,\n    select = _wp$data.select;\n\nvar Login = function Login(props) {\n  var _useState = useState(false),\n      _useState2 = _slicedToArray(_useState, 2),\n      popup = _useState2[0],\n      setPopup = _useState2[1];\n\n  var _useState3 = useState({}),\n      _useState4 = _slicedToArray(_useState3, 2),\n      user = _useState4[0],\n      _setUser = _useState4[1];\n\n  var _useState5 = useState(false),\n      _useState6 = _slicedToArray(_useState5, 2),\n      userMenu = _useState6[0],\n      setUserMenu = _useState6[1];\n\n  var _useState7 = useState(false),\n      _useState8 = _slicedToArray(_useState7, 2),\n      onuserMenu = _useState8[0],\n      setonUserMenu = _useState8[1];\n\n  var _useState9 = useState(true),\n      _useState10 = _slicedToArray(_useState9, 2),\n      onSubscribeCalls = _useState10[0],\n      setOnSubscribeCalls = _useState10[1];\n\n  var _useState11 = useState(false),\n      _useState12 = _slicedToArray(_useState11, 2),\n      emailSignIn = _useState12[0],\n      setemailSignIn = _useState12[1];\n\n  var _useState13 = useState(false),\n      _useState14 = _slicedToArray(_useState13, 2),\n      register = _useState14[0],\n      setRegistration = _useState14[1];\n\n  var _useState15 = useState('login_popup ' + window.vibebp.style),\n      _useState16 = _slicedToArray(_useState15, 2),\n      loginpopup_class = _useState16[0],\n      setLoginpopupClass = _useState16[1];\n\n  var _useState17 = useState(false),\n      _useState18 = _slicedToArray(_useState17, 2),\n      loginExtras = _useState18[0],\n      setLoginExtras = _useState18[1];\n\n  var _useState19 = useState([]),\n      _useState20 = _slicedToArray(_useState19, 2),\n      notifications = _useState20[0],\n      setNotifications = _useState20[1];\n\n  var _useState21 = useState(false),\n      _useState22 = _slicedToArray(_useState21, 2),\n      isNotificationsActive = _useState22[0],\n      setIsNotificationsActive = _useState22[1];\n\n  var _useState23 = useState(true),\n      _useState24 = _slicedToArray(_useState23, 2),\n      isVerifying = _useState24[0],\n      setIsVerifying = _useState24[1];\n\n  var _useState25 = useState(false),\n      _useState26 = _slicedToArray(_useState25, 2),\n      reload = _useState26[0],\n      setReload = _useState26[1];\n\n  if (window.vibebp.settings.firebase_config) {\n    if (!firebase.apps.length) {\n      firebase.initializeApp(JSON.parse(window.vibebp.settings.firebase_config));\n    }\n  }\n\n  useEffect(function () {\n    document.addEventListener('tokenGenerated', function () {\n      setReload(!reload);\n    });\n  }, []);\n  useEffect(function () {\n    new Promise(function (resolve) {\n      resolve(localforage.getItem('bp_login_token'));\n    }).then(function (token) {\n      if (token) {\n        select('vibebp').setToken(token);\n        select('vibebp').verifyUser(\"\".concat(window.vibebp.api.validate_token, \"?client_id=\").concat(window.vibebp.settings.client_id), token);\n        _store_bp_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].subscribe(function () {\n          if (onSubscribeCalls) {\n            setIsVerifying(false);\n\n            _setUser(_store_bp_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getState().user);\n\n            if (select('vibebp').getNotifications() && select('vibebp').getNotifications().length) {\n              setIsNotificationsActive(true);\n              setNotifications(select('vibebp').getNotifications());\n            } else {\n              setIsNotificationsActive(false);\n            }\n\n            var event = new CustomEvent(\"userLoaded\", {\n              detail: {\n                userLoaded: _store_bp_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getState().user\n              }\n            });\n            document.dispatchEvent(event);\n            document.querySelector('body').classList.remove('logged-out');\n            document.querySelector('body').classList.add('logged-in');\n            setOnSubscribeCalls(false);\n\n            if (!select('vibebp').getData('loggedinMenu')) {\n              fetch(\"\".concat(window.vibebp.api.url, \"/loggedinmenu\"), {\n                method: 'post',\n                body: JSON.stringify({\n                  token: token\n                })\n              }).then(function (res) {\n                return res.json();\n              }).then(function (response) {\n                if (response.status) {\n                  dispatch('vibebp').setData('loggedinMenu', response.menu);\n                }\n              });\n            }\n          }\n        });\n      } else {\n        setIsVerifying(false);\n      }\n    });\n  }, [reload]);\n  useEffect(function () {\n    if (window.vibebp.settings.firebase_config && typeof firebase.database == 'function' && _store_bp_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getState().user && Object.keys(_store_bp_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getState().user).length) {\n      firebase.database().ref(\"users/\".concat(_store_bp_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getState().user.id, \"/status\")).set(1);\n      fetch(\"\".concat(window.vibebp.api.url, \"/followers\"), {\n        method: 'post',\n        body: JSON.stringify({\n          token: select('vibebp').getToken()\n        })\n      }).then(function (res) {\n        return res.json();\n      }).then(function (data) {\n        if (data.status) {\n          data.followers.map(function (follower) {\n            firebase.database().ref(\"users/\".concat(follower.ID, \"/status\")).once('value').then(function (snapshot) {\n              if (snapshot.exists()) {\n                if (snapshot.val()) {\n                  //notify the online members that user is online\n                  firebase.database().ref(\"notifications/\".concat(follower.ID)).push({\n                    sender: select('vibebp').getUser().id,\n                    type: 'user_online',\n                    status: 1,\n                    time: new Date().getTime()\n                  });\n                }\n              }\n            });\n          });\n        }\n      });\n      firebase.database().ref(\"notifications/\".concat(_store_bp_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getState().user.id)).on('child_added', function (snapshot) {\n        if (snapshot.exists()) {\n          var val = snapshot.val();\n\n          if (val.hasOwnProperty('message')) {\n            dispatch('vibebp').addNotification({\n              text: val.message\n            });\n          } else {\n            fetch(\"\".concat(window.vibebp.api.url, \"/process_notification\"), {\n              method: 'post',\n              body: JSON.stringify(_objectSpread({}, val, {\n                token: select('vibebp').getToken()\n              }))\n            }).then(function (res) {\n              return res.json();\n            }).then(function (data) {\n              if (data.status) {\n                dispatch('vibebp').addNotification(data);\n              }\n            });\n          }\n        }\n      });\n    }\n\n    window.addEventListener('online', function () {\n      dispatch('vibebp').addNotification({\n        text: window.vibebp.translations.online\n      });\n    }, false);\n    window.addEventListener('offline', function () {\n      dispatch('vibebp').addNotification({\n        text: window.vibebp.translations.offline\n      });\n    }, false);\n  }, [_store_bp_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getState().user]);\n  useEffect(function () {\n    if (_store_bp_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getState().user) {\n      _setUser(_store_bp_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getState().user);\n    }\n  }, [_store_bp_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getState().user]);\n  useEffect(function () {\n    document.addEventListener('vibebp_show_login_popup', function () {\n      if (!_store_bp_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getState().user || !Object.keys(_store_bp_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getState().user).length) {\n        console.log('open');\n        setPopup(true);\n        setTimeout(function () {\n          setLoginpopupClass(loginpopup_class + ' active');\n        }, 30);\n      }\n    });\n  }, []);\n\n  var removeNotification = function removeNotification(notification) {\n    var nnotifications = _toConsumableArray(notifications);\n\n    nnotifications.splice(nnotifications.findIndex(function (n) {\n      return n.id === notification.id;\n    }), 1);\n    setNotifications(nnotifications);\n    select('vibebp').removeNotification(notification);\n  };\n\n  var logout = function logout() {\n    _setUser({});\n\n    select('vibebp').logout();\n    document.querySelector('body').classList.add('vibebp_logout');\n\n    if (window.vibebp.settings.firebase_config) {\n      firebase.auth().signOut().then(function () {\n        console.log('logout successfull');\n      }, function (error) {\n        console.log('logout failed');\n      });\n    }\n\n    var event = new CustomEvent(\"userLoaded\", {\n      detail: {\n        userLoaded: true\n      }\n    });\n    document.dispatchEvent(event);\n  };\n\n  var loginExtrasFx = function loginExtrasFx() {\n    if (loginExtras) {\n      setLoginExtras(false);\n    } else {\n      setLoginExtras(true);\n    }\n\n    var event = new CustomEvent(\"loginExtras\", {\n      detail: {\n        loginExtras: true\n      }\n    });\n    document.dispatchEvent(event);\n  };\n\n  return wp.element.createElement(Fragment, null, props.type != 'static' ? user && Object.keys(user).length ? wp.element.createElement(\"div\", {\n    className: \"loggedin_user_div\"\n  }, wp.element.createElement(\"a\", {\n    className: \"loggedin_user\",\n    \"data-id\": user.id,\n    onClick: function onClick() {\n      if (userMenu) {\n        setUserMenu(false);\n      } else {\n        setUserMenu(true);\n      }\n    }\n  }, wp.element.createElement(\"img\", {\n    src: user.avatar,\n    alt: user.displayname\n  }), wp.element.createElement(\"span\", {\n    className: \"vibebp_name\"\n  }, user.displayname)), userMenu ? wp.element.createElement(_usermenu_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n    logout: logout\n  }) : '', wp.element.createElement(Fragment, null, window.vibebp.settings.firebase_config && window.vibebp.settings.hide_live != 'on' ? wp.element.createElement(\"span\", {\n    className: \"login_extras\",\n    onClick: loginExtrasFx\n  }, wp.element.createElement(\"span\", {\n    className: loginExtras ? 'vicon vicon-align-right' : 'vicon vicon-align-left'\n  })) : '')) : wp.element.createElement(\"a\", {\n    onClick: function onClick(e) {\n      e.stopPropagation();\n      setPopup(true);\n      setTimeout(function () {\n        setLoginpopupClass(loginpopup_class + ' active');\n      }, 30);\n    }\n  }, isVerifying ? '...' : wp.element.createElement(\"span\", {\n    dangerouslySetInnerHTML: {\n      __html: props.title\n    }\n  })) : '', popup || props.type == 'static' && user && !Object.keys(user).length ? wp.element.createElement(\"div\", {\n    className: props.hasOwnProperty('type') && props.type == 'static' ? 'static_wrapper' : 'loginpopup_wrapper',\n    onClick: function onClick(e) {\n      e.stopPropagation();\n\n      if (e.target.className.indexOf('loginpopup_wrapper') !== -1) {\n        setLoginpopupClass(loginpopup_class.replace(/active/g));\n        setPopup(false);\n      }\n    }\n  }, wp.element.createElement(\"div\", {\n    className: loginpopup_class\n  }, wp.element.createElement(\"div\", {\n    className: \"login_popup_content\"\n  }, emailSignIn ? wp.element.createElement(_signinemail_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n    setemailSignIn: setemailSignIn,\n    setUser: function setUser(us) {\n      _setUser(us);\n\n      setPopup(false);\n    }\n  }) : register ? wp.element.createElement(_register_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n    setRegistration: setRegistration\n  }) : wp.element.createElement(_defaultlogin_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"], {\n    setLoginpopupClass: setLoginpopupClass,\n    setUser: function setUser(us) {\n      _setUser(us);\n\n      setPopup(false);\n    },\n    setRegistration: setRegistration,\n    setemailSignIn: setemailSignIn\n  }), props.type != 'static' ? wp.element.createElement(\"a\", {\n    onClick: function onClick(e) {\n      e.stopPropagation();\n      setLoginpopupClass(loginpopup_class.replace(/active/g));\n      setPopup(false);\n    },\n    className: \"vicon-close\"\n  }) : ''))) : '', notifications.length ? wp.element.createElement(\"div\", {\n    className: isNotificationsActive ? 'vibebp_notifications_wrapper' : 'vibebp_notifications_wrapper closed'\n  }, notifications.map(function (notification) {\n    return wp.element.createElement(\"div\", {\n      className: \"vibebp_notification\"\n    }, wp.element.createElement(\"div\", {\n      className: \"vibebp_notification_body\"\n    }, wp.element.createElement(\"div\", {\n      dangerouslySetInnerHTML: {\n        __html: notification.text\n      }\n    }), notification.hasOwnProperty('actions') ? notification.actions.map(function (action) {\n      return wp.element.createElement(\"a\", {\n        className: \"link\",\n        onClick: function onClick() {\n          var event = new CustomEvent(action.event, {\n            'detail': _objectSpread({}, action, {\n              'item_id': notification.item_id,\n              'user_id': select('vibebp').getUser().id\n            })\n          });\n          document.dispatchEvent(event);\n        }\n      }, action.label);\n    }) : '', wp.element.createElement(\"span\", {\n      className: \"vicon vicon-close\",\n      onClick: function onClick() {\n        removeNotification(notification);\n      }\n    })));\n  })) : '');\n};\n\ndocument.addEventListener('DOMContentLoaded', function () {\n  if (document.querySelector(\".vibebp-login\")) {\n    document.querySelectorAll(\".vibebp-login\").forEach(function (el) {\n      render(wp.element.createElement(Login, {\n        type: document.querySelector(\".vibebp-login\").getAttribute('type'),\n        title: document.querySelector(\".vibebp-login\").innerHTML\n      }), el);\n    });\n  }\n\n  document.addEventListener('wp_login_sync', function () {\n    if (document.querySelector(\".vibebp-login\")) {\n      document.querySelectorAll(\".vibebp-login\").forEach(function (el) {\n        render(wp.element.createElement(Login, {\n          type: document.querySelector(\".vibebp-login\").getAttribute('type'),\n          title: document.querySelector(\".vibebp-login\").innerHTML\n        }), el);\n      });\n    }\n  });\n}, false);\n\nif (document.querySelector(\".vibebp-login\")) {\n  document.querySelectorAll(\".vibebp-login\").forEach(function (el) {\n    render(wp.element.createElement(Login, {\n      type: document.querySelector(\".vibebp-login\").getAttribute('type'),\n      title: document.querySelector(\".vibebp-login\").innerHTML\n    }), el);\n  });\n}\n\n//# sourceURL=webpack:///./src/login/index.js?");

/***/ }),

/***/ "./src/login/register.js":
/*!*******************************!*\
  !*** ./src/login/register.js ***!
  \*******************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nvar _wp$element = wp.element,\n    createElement = _wp$element.createElement,\n    useState = _wp$element.useState,\n    useEffect = _wp$element.useEffect,\n    Fragment = _wp$element.Fragment,\n    render = _wp$element.render;\nvar _wp$data = wp.data,\n    dispatch = _wp$data.dispatch,\n    select = _wp$data.select;\n\nvar RegisterAccount = function RegisterAccount(props) {\n  var _useState = useState([{\n    type: 'email',\n    id: 'email',\n    label: window.vibebp.translations.email,\n    value: '',\n    \"class\": 'input'\n  }, {\n    type: 'password',\n    id: 'password',\n    label: window.vibebp.translations.password,\n    value: '',\n    \"class\": 'input'\n  }]),\n      _useState2 = _slicedToArray(_useState, 2),\n      fields = _useState2[0],\n      setFields = _useState2[1];\n\n  var _useState3 = useState(false),\n      _useState4 = _slicedToArray(_useState3, 2),\n      errorMessage = _useState4[0],\n      setErrorMessage = _useState4[1];\n\n  var _useState5 = useState(false),\n      _useState6 = _slicedToArray(_useState5, 2),\n      isCreating = _useState6[0],\n      setIsCreating = _useState6[1];\n\n  var _useState7 = useState(''),\n      _useState8 = _slicedToArray(_useState7, 2),\n      registrationMessage = _useState8[0],\n      setRegistrationMessage = _useState8[1];\n\n  var _useState9 = useState(true),\n      _useState10 = _slicedToArray(_useState9, 2),\n      isChecked = _useState10[0],\n      setIsChecked = _useState10[1];\n\n  useEffect(function () {\n    if (window.vibebp.translations.registration_checkbox.length) {\n      setIsChecked(false);\n    }\n  }, []);\n\n  var createAccount = function createAccount() {\n    setIsCreating(true);\n    fetch(\"\".concat(window.vibebp.api.url, \"/registerUser?client_id=\").concat(window.vibebp.settings.client_id), {\n      method: 'post',\n      body: JSON.stringify(fields)\n    }).then(function (response) {\n      return response.json();\n    }).then(function (data) {\n      setIsCreating(false);\n\n      if (data.status) {\n        setRegistrationMessage(data.message);\n      } else {\n        setErrorMessage(data.message);\n      }\n    });\n  };\n\n  return wp.element.createElement(Fragment, null, wp.element.createElement(\"h2\", null, window.vibebp.translations.register_account_heading), wp.element.createElement(\"p\", null, window.vibebp.translations.register_account_description), wp.element.createElement(\"div\", {\n    className: \"loginform\"\n  }, registrationMessage.length ? wp.element.createElement(\"div\", {\n    className: \"registration_message\",\n    dangerouslySetInnerHTML: {\n      __html: registrationMessage\n    }\n  }) : fields.length ? wp.element.createElement(Fragment, null, fields.map(function (field, i) {\n    return wp.element.createElement(\"div\", {\n      className: \"field\"\n    }, wp.element.createElement(\"div\", {\n      className: \"control\"\n    }, wp.element.createElement(\"label\", null, wp.element.createElement(\"strong\", null, field.label)), field.type == 'email' ? wp.element.createElement(\"input\", {\n      className: field[\"class\"],\n      type: \"text\",\n      value: field.value,\n      onChange: function onChange(e) {\n        var nfields = _toConsumableArray(fields);\n\n        nfields[i].value = e.target.value;\n        fields.map(function (field, i) {\n          if (field.type == 'email' && !nfields[i].value.match(/^([\\w.%+-]+)@([\\w-]+\\.)+([\\w]{2,})$/i) && nfields[i]['class'].indexOf('is-danger') == -1) {\n            nfields[i]['class'] += ' is-danger';\n          } else {\n            nfields[i]['class'] = nfields[i]['class'].split('is-danger').join(' ');\n            console.log(nfields[i]);\n          }\n        });\n        setFields(nfields);\n      }\n    }) : field.type == 'password' ? wp.element.createElement(\"input\", {\n      className: field[\"class\"],\n      type: \"password\",\n      value: field.value,\n      onChange: function onChange(e) {\n        var nfields = _toConsumableArray(fields);\n\n        nfields[i].value = e.target.value;\n        fields.map(function (field, i) {\n          if (field.type == 'email' && !nfields[i].value.length < 4 && nfields[i]['class'].indexOf('is-danger') == -1) {\n            nfields[i]['class'] += ' is-danger';\n          } else {\n            nfields[i]['class'] = nfields[i]['class'].split('is-danger').join(' ');\n          }\n        });\n        setFields(nfields);\n      }\n    }) : field.type == 'phone' || field.type == 'mobile' ? wp.element.createElement(\"input\", {\n      className: field[\"class\"],\n      type: \"telephone\",\n      value: field.value,\n      onChange: function onChange(e) {\n        var nfields = _toConsumableArray(fields);\n\n        nfields[i].value = e.target.value;\n        fields.map(function (field, i) {\n          if ((field.type == 'phone' || field.type == 'mobile') && !nfields[i].value.match(/^(\\+\\d{1,3}[- ]?)?\\d{10}$/) && !nfields[i].value.match(/0{5,}/) && nfields[i]['class'].indexOf('is-danger') == -1) {\n            nfields[i]['class'] += ' is-danger';\n          } else {\n            nfields[i]['class'] = nfields[i]['class'].split('is-danger').join(' ');\n          }\n        });\n        setFields(nfields);\n      }\n    }) : wp.element.createElement(\"input\", {\n      className: field[\"class\"],\n      type: \"text\",\n      value: field.value,\n      onChange: function onChange(e) {\n        var nfields = _toConsumableArray(fields);\n\n        nfields[i].value = e.target.value;\n        setFields(nfields);\n      }\n    })));\n  }), window.vibebp.translations.registration_checkbox.length ? wp.element.createElement(\"div\", {\n    className: \"checkbox\"\n  }, wp.element.createElement(\"input\", {\n    id: \"registration_checkbox\",\n    type: \"checkbox\",\n    onClick: function onClick() {\n      return setIsChecked(!isChecked);\n    }\n  }), wp.element.createElement(\"label\", {\n    \"for\": \"registration_checkbox\",\n    dangerouslySetInnerHTML: {\n      __html: window.vibebp.translations.registration_checkbox\n    }\n  })) : '', wp.element.createElement(\"a\", {\n    className: isCreating ? 'button is-primary is-loading' : 'button is-primary',\n    onClick: createAccount\n  }, window.vibebp.translations.create_account), errorMessage ? wp.element.createElement(\"div\", {\n    className: \"error\"\n  }, errorMessage) : '') : ''), wp.element.createElement(\"div\", {\n    className: \"extra_details\"\n  }, wp.element.createElement(\"p\", null, window.vibebp.translations.account_already, wp.element.createElement(\"a\", {\n    className: \"vibebp_forward_link\",\n    onClick: function onClick() {\n      return props.setRegistration(false);\n    }\n  }, window.vibebp.translations.signin, \" \", wp.element.createElement(\"span\", {\n    className: \"vicon vicon-arrow-right\"\n  }))), wp.element.createElement(\"p\", null, window.vibebp.translations.login_terms)));\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (RegisterAccount);\n\n//# sourceURL=webpack:///./src/login/register.js?");

/***/ }),

/***/ "./src/login/signinemail.js":
/*!**********************************!*\
  !*** ./src/login/signinemail.js ***!
  \**********************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _store_bp_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../store/bp.js */ \"./src/store/bp.js\");\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\n\nvar _wp$element = wp.element,\n    createElement = _wp$element.createElement,\n    useState = _wp$element.useState,\n    useEffect = _wp$element.useEffect,\n    Fragment = _wp$element.Fragment,\n    render = _wp$element.render;\nvar _wp$data = wp.data,\n    select = _wp$data.select,\n    dispatch = _wp$data.dispatch;\n\nvar SignInEmail = function SignInEmail(props) {\n  var _useState = useState(''),\n      _useState2 = _slicedToArray(_useState, 2),\n      email = _useState2[0],\n      setEmail = _useState2[1];\n\n  var _useState3 = useState(false),\n      _useState4 = _slicedToArray(_useState3, 2),\n      isLoggingIn = _useState4[0],\n      setIsLoggingIn = _useState4[1];\n\n  var _useState5 = useState('input'),\n      _useState6 = _slicedToArray(_useState5, 2),\n      emailclass = _useState6[0],\n      setEmailClass = _useState6[1];\n\n  var _useState7 = useState('input'),\n      _useState8 = _slicedToArray(_useState7, 2),\n      passwordclass = _useState8[0],\n      setPasswordClass = _useState8[1];\n\n  var _useState9 = useState(''),\n      _useState10 = _slicedToArray(_useState9, 2),\n      password = _useState10[0],\n      setPassword = _useState10[1];\n\n  var _useState11 = useState(false),\n      _useState12 = _slicedToArray(_useState11, 2),\n      forgot = _useState12[0],\n      setForgot = _useState12[1];\n\n  var _useState13 = useState(''),\n      _useState14 = _slicedToArray(_useState13, 2),\n      error = _useState14[0],\n      setError = _useState14[1];\n\n  var _useState15 = useState(''),\n      _useState16 = _slicedToArray(_useState15, 2),\n      forgotMessage = _useState16[0],\n      setForgotMessage = _useState16[1];\n\n  var _useState17 = useState(false),\n      _useState18 = _slicedToArray(_useState17, 2),\n      isForgotLoading = _useState18[0],\n      setIsForgotLoading = _useState18[1];\n\n  var _useState19 = useState(true),\n      _useState20 = _slicedToArray(_useState19, 2),\n      isChecked = _useState20[0],\n      setIsChecked = _useState20[1];\n\n  useEffect(function () {\n    if (window.vibebp.translations.login_checkbox.length) {\n      setIsChecked(false);\n    }\n  }, []);\n\n  var signIn = function signIn() {\n    var error = 0;\n\n    if (!email.match(/^([\\w.%+-]+)@([\\w-]+\\.)+([\\w]{2,})$/i)) {\n      setEmailClass('input is-danger');\n      setError(window.vibebp.translations.invalid_email);\n      error++;\n    }\n\n    if (password.length < 4) {\n      setPasswordClass('input is-danger');\n      setError(window.vibebp.translations.password_too_short);\n      error++;\n    }\n\n    if (error || !isChecked) {\n      return;\n    }\n\n    setIsLoggingIn(true);\n    fetch(\"\".concat(window.vibebp.api.generate_token, \"?client_id=\").concat(window.vibebp.settings.client_id), {\n      method: 'post',\n      body: JSON.stringify({\n        email: email,\n        password: password\n      })\n    }).then(function (response) {\n      return response.json();\n    }).then(function (data) {\n      setIsLoggingIn(false);\n\n      if (data.status) {\n        localforage.setItem('bp_login_token', data.token);\n        select('vibebp').setToken(data.token);\n        fetch(\"\".concat(window.vibebp.api.validate_token, \"?client_id=\").concat(window.vibebp.settings.client_id), {\n          method: 'post',\n          body: data.token\n        }).then(function (res) {\n          return res.json();\n        }).then(function (response) {\n          if (response.hasOwnProperty('data')) {\n            localforage.setItem('bp_user', response.data.data.user);\n            sessionStorage.setItem('bp_user', JSON.stringify(response.data.data.user));\n            props.setUser(response.data.data.user);\n\n            if (window.vibebp.settings.firebase_config && typeof firebase.database == 'function') {\n              firebase.database().ref(\"users/\".concat(response.data.data.user.id, \"/status\")).set(1);\n              var firebasediv = document.createElement(\"div\");\n              firebasediv.classList.add(\"vibebp_live_modules\");\n              document.body.appendChild(firebasediv);\n            }\n\n            dispatch('vibebp').setUser(response.data.data.user);\n            var event = new CustomEvent(\"userLoaded\", {\n              detail: {\n                userLoaded: true\n              }\n            });\n            document.dispatchEvent(event);\n\n            if (document.querySelector('body').classList.contains('logged-out')) {\n              document.querySelector('body').classList.remove('logged-out');\n            }\n\n            if (!document.querySelector('body').classList.contains('logged-in')) {\n              document.querySelector('body').classList.add('logged-in');\n            }\n\n            if (window.vibebp.settings.login_redirect && window.vibebp.settings.login_redirect_component) {\n              window.location.href = window.vibebp.settings.login_redirect + response.data.data.user.slug + '#' + window.vibebp.settings.login_redirect_component;\n            }\n\n            fetch(\"\".concat(window.vibebp.api.url, \"/loggedinmenu\"), {\n              method: 'post',\n              body: JSON.stringify({\n                token: data.token\n              })\n            }).then(function (res) {\n              return res.json();\n            }).then(function (resp) {\n              if (resp.status) {\n                dispatch('vibebp').setData('loggedinMenu', resp.menu);\n              }\n            });\n          }\n        });\n      } else {\n        setError(data.message);\n      }\n    });\n  };\n\n  var sendForgotAPICall = function sendForgotAPICall() {\n    var error = 0;\n\n    if (!email.match(/^([\\w.%+-]+)@([\\w-]+\\.)+([\\w]{2,})$/i)) {\n      setEmailClass('input is-danger');\n      setError(window.vibebp.translations.invalid_email);\n      return;\n    }\n\n    setIsForgotLoading(true);\n    fetch(\"\".concat(window.vibebp.api.url, \"/forgotPassword?client_id=\").concat(window.vibebp.settings.client_id), {\n      method: 'post',\n      body: JSON.stringify({\n        email: email\n      })\n    }).then(function (res) {\n      return res.json();\n    }).then(function (response) {\n      setIsForgotLoading(false);\n\n      if (response.status) {\n        setForgotMessage(response.message);\n      } else {\n        if (response.hasOwnProperty('message')) {\n          dispatch('vibebp').addNotification({\n            text: response.message\n          });\n        }\n      }\n    });\n  };\n\n  return wp.element.createElement(Fragment, null, wp.element.createElement(\"h2\", null, forgot ? window.vibebp.translations.forgotpassword : window.vibebp.translations.signin_email_heading), wp.element.createElement(\"p\", null, window.vibebp.translations.signin_email_description), wp.element.createElement(\"div\", {\n    className: \"loginform\"\n  }, forgotMessage.length ? wp.element.createElement(\"div\", {\n    className: \"message\"\n  }, wp.element.createElement(\"div\", {\n    dangerouslySetInnerHTML: {\n      __html: forgotMessage\n    }\n  })) : wp.element.createElement(\"div\", {\n    className: \"field\"\n  }, wp.element.createElement(\"div\", {\n    className: \"control\"\n  }, wp.element.createElement(\"label\", null, wp.element.createElement(\"strong\", null, window.vibebp.translations.email)), wp.element.createElement(\"input\", {\n    className: emailclass,\n    type: \"text\",\n    onChange: function onChange(e) {\n      if (!e.target.value.match(/^([\\w.%+-]+)@([\\w-]+\\.)+([\\w]{2,})$/i)) {\n        setEmailClass('input is-warning');\n      } else {\n        setEmailClass('input');\n        setError('');\n      }\n\n      setEmail(e.target.value);\n    }\n  }))), forgot ? wp.element.createElement(Fragment, null, wp.element.createElement(\"a\", {\n    className: isForgotLoading ? 'button is-primary is-loading' : 'button is-primary',\n    onClick: sendForgotAPICall\n  }, window.vibebp.translations.password_recovery_email)) : wp.element.createElement(Fragment, null, wp.element.createElement(\"div\", {\n    className: \"field\"\n  }, wp.element.createElement(\"div\", {\n    className: \"control\"\n  }, wp.element.createElement(\"label\", null, wp.element.createElement(\"strong\", null, window.vibebp.translations.password), wp.element.createElement(\"span\", {\n    className: \"forgot_password\",\n    onClick: function onClick() {\n      return setForgot(true);\n    }\n  }, window.vibebp.translations.forgotpassword)), wp.element.createElement(\"input\", {\n    className: \"input\",\n    type: \"password\",\n    onChange: function onChange(e) {\n      setPassword(e.target.value);\n      setError('');\n    },\n    onKeyPress: function onKeyPress(e) {\n      if (e.key === 'Enter') {\n        signIn();\n      }\n    }\n  }))), window.vibebp.translations.login_checkbox.length ? wp.element.createElement(\"div\", {\n    className: \"checkbox\"\n  }, wp.element.createElement(\"input\", {\n    id: \"login_checkbox\",\n    type: \"checkbox\",\n    onClick: function onClick() {\n      return setIsChecked(!isChecked);\n    }\n  }), wp.element.createElement(\"label\", {\n    \"for\": \"login_checkbox\",\n    dangerouslySetInnerHTML: {\n      __html: window.vibebp.translations.login_checkbox\n    }\n  })) : '', wp.element.createElement(\"a\", {\n    className: isLoggingIn ? 'button is-primary is-loading' : 'button is-primary',\n    onClick: signIn\n  }, window.vibebp.translations.signin), error.length ? wp.element.createElement(\"div\", {\n    className: \"error\"\n  }, error) : '')), wp.element.createElement(\"div\", {\n    \"class\": \"extra_details\"\n  }, wp.element.createElement(\"a\", {\n    className: \"vibebp_back_link\",\n    onClick: function onClick() {\n      return props.setemailSignIn(false);\n    }\n  }, wp.element.createElement(\"span\", {\n    className: \"vicon vicon-arrow-left\"\n  }), window.vibebp.translations.all_signin_options)));\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (SignInEmail);\n\n//# sourceURL=webpack:///./src/login/signinemail.js?");

/***/ }),

/***/ "./src/login/usermenu.js":
/*!*******************************!*\
  !*** ./src/login/usermenu.js ***!
  \*******************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _store_bp_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../store/bp.js */ \"./src/store/bp.js\");\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nvar _wp$element = wp.element,\n    createElement = _wp$element.createElement,\n    useState = _wp$element.useState,\n    useEffect = _wp$element.useEffect,\n    Fragment = _wp$element.Fragment,\n    render = _wp$element.render;\nvar _wp$data = wp.data,\n    dispatch = _wp$data.dispatch,\n    select = _wp$data.select;\n\n\nvar UserMenu = function UserMenu(props) {\n  var _useState = useState('user_menu'),\n      _useState2 = _slicedToArray(_useState, 2),\n      classs = _useState2[0],\n      setClasss = _useState2[1];\n\n  var _useState3 = useState(''),\n      _useState4 = _slicedToArray(_useState3, 2),\n      password = _useState4[0],\n      setPassword = _useState4[1];\n\n  var _useState5 = useState(select('vibebp').getData('loggedinMenu')),\n      _useState6 = _slicedToArray(_useState5, 2),\n      menu = _useState6[0],\n      setMenu = _useState6[1];\n\n  var _useState7 = useState(false),\n      _useState8 = _slicedToArray(_useState7, 2),\n      isFetching = _useState8[0],\n      setIsFetching = _useState8[1];\n\n  var user = select('vibebp').getUser();\n  useEffect(function () {\n    setTimeout(function () {\n      setClasss(classs.replace(/active/g, '') + ' active');\n    }, 30);\n    document.addEventListener('userLoaded', function () {\n      console.log('capturing');\n    });\n  }, []);\n\n  var setLink = function setLink(item) {\n    var user = select('vibebp').getUser();\n\n    if (item.classes.indexOf('bp-menu') > -1) {\n      if (window.location === user.profile_link) {\n        dispatch('vibebp').setComponent(item.css_id);\n      } else {\n        window.location = user.profile_link + '#component=' + item.css_id;\n      }\n    } else {\n      window.location.href = item.url;\n    }\n  };\n\n  return wp.element.createElement(\"div\", {\n    className: classs\n  }, wp.element.createElement(\"div\", {\n    className: \"usermenu_content\"\n  }, menu.length ? menu.map(function (item) {\n    return wp.element.createElement(\"span\", {\n      className: item.classes.join(' '),\n      onClick: function onClick() {\n        return setLink(item);\n      },\n      dangerouslySetInnerHTML: {\n        __html: item.title\n      }\n    });\n  }) : wp.element.createElement(\"a\", {\n    href: user.profile_link\n  }, window.vibebp.translations.profile)), wp.element.createElement(\"a\", {\n    onClick: props.logout\n  }, wp.element.createElement(\"span\", {\n    className: \"vicon vicon-power-off\"\n  }), window.vibebp.translations.logout));\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (UserMenu);\n\n//# sourceURL=webpack:///./src/login/usermenu.js?");

/***/ }),

/***/ "./src/store/actions.js":
/*!******************************!*\
  !*** ./src/store/actions.js ***!
  \******************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar actions = {\n  setUser: function setUser(user) {\n    return {\n      type: 'SET_USER',\n      user: user\n    };\n  },\n  addNotification: function addNotification(newnotification) {\n    var notification = _objectSpread({}, newnotification, {\n      id: new Date().getTime()\n    });\n\n    return {\n      type: 'ADD_NOTIFICATION',\n      notification: notification\n    };\n  },\n  removeNotification: function removeNotification(notification) {\n    return {\n      type: 'REMOVE_NOTIFICATION',\n      notification: notification\n    };\n  },\n  getUser: function getUser() {\n    return {\n      type: 'GET_USER'\n    };\n  },\n  verifyUser: function verifyUser(path, token) {\n    return {\n      type: 'VERIFY_USER_API',\n      path: path,\n      token: token\n    };\n  },\n  setToken: function setToken(token) {\n    return {\n      type: 'SET_TOKEN',\n      token: token\n    };\n  },\n  logout: function logout() {\n    var event = new CustomEvent(\"userLoaded\", {\n      detail: {\n        userLoaded: true,\n        loggedOut: true\n      }\n    });\n    document.dispatchEvent(event);\n    localforage.removeItem('bp_login_token');\n    sessionStorage.removeItem('bp_user');\n    document.querySelector('body').classList.add('vibebp_logout');\n    window.location.href = window.vibebp.settings.logout_redirect + '?vibebp_logout=1';\n    return {\n      type: 'LOGOUT'\n    };\n  },\n  setMenu: function setMenu(menu) {\n    return {\n      type: 'SET_MENU',\n      menu: menu\n    };\n  },\n  setOnlineMembers: function setOnlineMembers(onlineMembers) {\n    return {\n      type: 'SET_ONLINE_MEMBERS',\n      onlineMembers: onlineMembers\n    };\n  },\n  setData: function setData(type, data) {\n    return {\n      type: 'SET_DATA',\n      data_type: type,\n      data: data\n    };\n  },\n  setComponent: function setComponent(component) {\n    var fragments = window.location.href.split('#');\n    var rebuildUrl = fragments[0] + '#';\n    var vars = [];\n    var parts = window.location.href.replace(/[#&]+([^=&]+)=([^&]*)/gi, function (m, key, value) {\n      vars[key] = value;\n    });\n    var extras = '';\n    var action = '';\n    var id = '';\n    Object.keys(vars).map(function (key) {\n      if (key !== 'component') {\n        extras += '&' + key + '=' + vars[key];\n      }\n\n      if (key == 'action') {\n        action = vars[key];\n      }\n\n      if (key == 'id') {\n        id = vars[key];\n      }\n    });\n    rebuildUrl += 'component=' + component;\n\n    if (extras.length) {\n      rebuildUrl += extras;\n    }\n\n    window.location.href = rebuildUrl;\n    document.querySelector('body').classList.forEach(function (classs, i) {\n      if (classs.indexOf('vibebp-component') > -1) {\n        document.querySelector('body').classList.remove(classs);\n      }\n    });\n    document.querySelector('body').classList.add('vibebp-component-' + component);\n    return {\n      type: 'SET_COMPONENT',\n      component: component,\n      action: action,\n      id: id\n    };\n  },\n  setAction: function setAction(action) {\n    var fragments = window.location.href.split('#');\n    var rebuildUrl = fragments[0] + '#';\n    var vars = [];\n    var parts = window.location.href.replace(/[#&]+([^=&]+)=([^&]*)/gi, function (m, key, value) {\n      vars[key] = value;\n    });\n    var extras = '';\n    var id = '';\n    var component = '';\n    Object.keys(vars).map(function (key) {\n      if (key !== 'component' && key !== 'action') {\n        extras += '&' + key + '=' + vars[key];\n      }\n\n      if (key == 'component') {\n        component = vars[key];\n      }\n\n      if (key == 'id') {\n        id = vars[key];\n      }\n    });\n\n    if (component) {\n      rebuildUrl += 'component=' + component;\n\n      if (action) {\n        rebuildUrl += '&action=' + action;\n\n        if (id) {\n          rebuildUrl += '&id=' + id;\n        }\n      }\n    }\n\n    if (extras.length) {\n      rebuildUrl += extras;\n    }\n\n    window.location.href = rebuildUrl;\n    return {\n      type: 'SET_ACTION',\n      action: action\n    };\n  },\n  setId: function setId(id) {\n    var fragments = window.location.href.split('#');\n    var rebuildUrl = fragments[0] + '#';\n    var vars = [];\n    var parts = window.location.href.replace(/[#&]+([^=&]+)=([^&]*)/gi, function (m, key, value) {\n      vars[key] = value;\n    });\n    var extras = '';\n    var component = '';\n    var action = '';\n    Object.keys(vars).map(function (key) {\n      if (key !== 'component' && key !== 'action' && key != 'id') {\n        extras += '&' + key + '=' + vars[key];\n      }\n\n      if (key == 'action') {\n        action = vars[key];\n      }\n\n      if (key == 'component') {\n        component = vars[key];\n      }\n    });\n\n    if (component) {\n      rebuildUrl += 'component=' + component;\n\n      if (action) {\n        rebuildUrl += '&action=' + action;\n\n        if (id) {\n          rebuildUrl += '&id=' + id;\n        }\n      }\n    }\n\n    if (extras.length) {\n      rebuildUrl += extras;\n    }\n\n    window.location.href = rebuildUrl;\n    return {\n      type: 'SET_ID',\n      id: id\n    };\n  },\n  sendRealTimeNotification: function sendRealTimeNotification(user_id, message) {\n    return {\n      type: 'SEND_REALTIME_NOTIFICATION',\n      user_id: user_id,\n      message: message\n    };\n  },\n  removeRealTimeNotification: function removeRealTimeNotification(user_id, message) {\n    return {\n      type: 'REMOVE_REALTIME_NOTIFICATION',\n      user_id: user_id,\n      message: message\n    };\n  }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (actions);\n\n//# sourceURL=webpack:///./src/store/actions.js?");

/***/ }),

/***/ "./src/store/bp.js":
/*!*************************!*\
  !*** ./src/store/bp.js ***!
  \*************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _actions_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./actions.js */ \"./src/store/actions.js\");\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _wp$data = wp.data,\n    registerStore = _wp$data.registerStore,\n    combineReducers = _wp$data.combineReducers,\n    useStore = _wp$data.useStore;\n\nvar DEFAULT_STATE = {\n  user: {},\n  menu: [],\n  notifications: [],\n  component: '',\n  action: ''\n};\nvar bp = registerStore('vibebp', {\n  reducer: function reducer() {\n    var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_STATE;\n    var action = arguments.length > 1 ? arguments[1] : undefined;\n\n    switch (action.type) {\n      case 'SET_USER':\n        return _objectSpread({}, state, {\n          user: action.user\n        });\n        break;\n\n      case 'ADD_NOTIFICATION':\n        var n = _toConsumableArray(state.notifications);\n\n        var notifications = [];\n        n.map(function (notification, i) {\n          if (notification.id >= new Date().getTime() - 3000) {\n            notifications.push(notification);\n          }\n        });\n        notifications.unshift(_objectSpread({}, action.notification));\n        return _objectSpread({}, state, {\n          notifications: notifications\n        });\n        break;\n\n      case 'REMOVE_NOTIFICATION':\n        var anotifications = _toConsumableArray(state.notifications);\n\n        anotifications.splice(anotifications.findIndex(function (n) {\n          return action.notification.id === n.id;\n        }), 1);\n        return _objectSpread({}, state, {\n          notifications: anotifications\n        });\n        break;\n\n      case 'GET_NOTIFICATIONS':\n        return state.notifications;\n        break;\n\n      case 'GET_USER':\n        return state.user;\n        break;\n\n      case 'SET_MENU':\n        return _objectSpread({}, state, {\n          menu: action.menu\n        });\n        break;\n\n      case 'GET_MENU':\n        return state.menu;\n        break;\n\n      case 'SET_TOKEN':\n        return _objectSpread({}, state, {\n          token: action.token\n        });\n        break;\n\n      case 'SET_COMPONENT':\n        var event = new CustomEvent('component_loaded', {\n          detail: {\n            component: action.component,\n            action: action.action,\n            id: action.id,\n            user: state.user,\n            token: state.token\n          }\n        });\n        document.dispatchEvent(event);\n        return _objectSpread({}, state, {\n          component: action.component,\n          action: action.action,\n          id: action.id\n        });\n        break;\n\n      case 'SET_ACTION':\n        return _objectSpread({}, state, {\n          action: action.action\n        });\n        break;\n\n      case 'SET_ID':\n        return _objectSpread({}, state, {\n          action: action.id\n        });\n        break;\n\n      case 'SET_ONLINE_MEMBERS':\n        return _objectSpread({}, state, {\n          onlineMembers: action.onlineMembers\n        });\n        break;\n\n      case 'SET_DATA':\n        var ddata = _objectSpread({}, state.data);\n\n        ddata[action.data_type] = action.data;\n        return _objectSpread({}, state, {\n          data: ddata\n        });\n        break;\n\n      case 'SEND_REALTIME_NOTIFICATION':\n        var user = _objectSpread({}, state.user);\n\n        if (!state.hasOwnProperty('realTimeNotification') || state.realTimeNotification.message != action.message && state.realTimeNotification.user_id != action.user_id) {\n          if (window.vibebp.settings.firebase_config) {\n            firebase.database().ref(\"notifications/\".concat(action.user_id)).push({\n              time: new Date().getTime(),\n              sender: user.id,\n              message: action.message\n            });\n          }\n\n          return _objectSpread({}, state, {\n            realTimeNotification: {\n              user_id: action.user_id,\n              message: action.message\n            }\n          });\n        } else {\n          return state;\n        }\n\n        break;\n    }\n\n    return state;\n  },\n  actions: _actions_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n  selectors: {\n    getUser: function getUser(state) {\n      return state.user;\n    },\n    verifyUser: function verifyUser(state, path, token) {\n      return state.user;\n    },\n    setUser: function setUser(state, userr) {\n      state.user = userr;\n      return userr;\n    },\n    getNotifications: function getNotifications(state) {\n      return state.notifications;\n    },\n    removeNotification: function removeNotification(state, id) {\n      var notifications = state.notifications;\n      notifications.splice(notifications.findIndex(function (i) {\n        return i.id === id;\n      }), 1);\n      state.notifications = notifications;\n      return notifications;\n    },\n    logout: function logout(state) {\n      var user = state.user;\n      return user;\n    },\n    setMenu: function setMenu(state, nav) {\n      var menu = state.menu;\n      return menu;\n    },\n    getMenu: function getMenu(state) {\n      var menu = state.menu;\n      return menu;\n    },\n    getComponent: function getComponent(state) {\n      var component = state.component;\n      return component;\n    },\n    getAction: function getAction(state) {\n      var action = state.action;\n      return action;\n    },\n    getId: function getId(state) {\n      var id = state.id;\n      return id;\n    },\n    getToken: function getToken(state) {\n      var token = state.token;\n      return token;\n    },\n    setToken: function setToken(state, tokenn) {\n      state.token = tokenn;\n      return tokenn;\n    },\n    getOnlineMembers: function getOnlineMembers(state) {\n      return state.onlineMembers;\n    },\n    getData: function getData(state, type) {\n      if (state.hasOwnProperty('data') && state.data.hasOwnProperty(type)) {\n        return state.data[type];\n      } else {\n        return false;\n      }\n    }\n  },\n  controls: {\n    VERIFY_USER_API: function VERIFY_USER_API(state) {\n      var path = state.path,\n          token = state.token;\n      return fetch(path, {\n        method: 'post',\n        body: token\n      }).then(function (res) {\n        return res.json();\n      }).then(function (response) {\n        if (response.hasOwnProperty('data')) {\n          if (response.status) {\n            localforage.setItem('bp_user', JSON.stringify(response.data.data.user));\n            return response.data.data.user;\n          } else {\n            localforage.removeItem('bp_user');\n            localforage.removeItem('bp_login_token'); //document.location.reload(true);\n\n            return {};\n          }\n        }\n      });\n    },\n    LOGOUT: function LOGOUT(state) {\n      localforage.removeItem('bp_login_token');\n      localforage.removeItem('bp_user');\n    }\n  },\n  resolvers: {\n    verifyUser:\n    /*#__PURE__*/\n    regeneratorRuntime.mark(function verifyUser(path, token) {\n      var user;\n      return regeneratorRuntime.wrap(function verifyUser$(_context) {\n        while (1) {\n          switch (_context.prev = _context.next) {\n            case 0:\n              _context.next = 2;\n              return _actions_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].verifyUser(path, token);\n\n            case 2:\n              user = _context.sent;\n              return _context.abrupt(\"return\", _actions_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].setUser(user));\n\n            case 4:\n            case \"end\":\n              return _context.stop();\n          }\n        }\n      }, verifyUser);\n    }),\n    setToken:\n    /*#__PURE__*/\n    regeneratorRuntime.mark(function setToken(user) {\n      return regeneratorRuntime.wrap(function setToken$(_context2) {\n        while (1) {\n          switch (_context2.prev = _context2.next) {\n            case 0:\n              return _context2.abrupt(\"return\", _actions_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].setToken(user));\n\n            case 1:\n            case \"end\":\n              return _context2.stop();\n          }\n        }\n      }, setToken);\n    }),\n    setUser:\n    /*#__PURE__*/\n    regeneratorRuntime.mark(function setUser(user) {\n      return regeneratorRuntime.wrap(function setUser$(_context3) {\n        while (1) {\n          switch (_context3.prev = _context3.next) {\n            case 0:\n              return _context3.abrupt(\"return\", _actions_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].setUser(user));\n\n            case 1:\n            case \"end\":\n              return _context3.stop();\n          }\n        }\n      }, setUser);\n    }),\n    addNotification:\n    /*#__PURE__*/\n    regeneratorRuntime.mark(function addNotification(notification) {\n      return regeneratorRuntime.wrap(function addNotification$(_context4) {\n        while (1) {\n          switch (_context4.prev = _context4.next) {\n            case 0:\n              return _context4.abrupt(\"return\", _actions_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].addNotification(notification));\n\n            case 1:\n            case \"end\":\n              return _context4.stop();\n          }\n        }\n      }, addNotification);\n    }),\n    removeNotification:\n    /*#__PURE__*/\n    regeneratorRuntime.mark(function removeNotification(notification) {\n      return regeneratorRuntime.wrap(function removeNotification$(_context5) {\n        while (1) {\n          switch (_context5.prev = _context5.next) {\n            case 0:\n              return _context5.abrupt(\"return\", _actions_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].removeNotification(notification));\n\n            case 1:\n            case \"end\":\n              return _context5.stop();\n          }\n        }\n      }, removeNotification);\n    }),\n    logout:\n    /*#__PURE__*/\n    regeneratorRuntime.mark(function logout() {\n      var user;\n      return regeneratorRuntime.wrap(function logout$(_context6) {\n        while (1) {\n          switch (_context6.prev = _context6.next) {\n            case 0:\n              _context6.next = 2;\n              return _actions_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].logout();\n\n            case 2:\n              user = _context6.sent;\n              return _context6.abrupt(\"return\", _actions_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].setUser({}));\n\n            case 4:\n            case \"end\":\n              return _context6.stop();\n          }\n        }\n      }, logout);\n    }),\n    setMenu:\n    /*#__PURE__*/\n    regeneratorRuntime.mark(function setMenu(menu) {\n      return regeneratorRuntime.wrap(function setMenu$(_context7) {\n        while (1) {\n          switch (_context7.prev = _context7.next) {\n            case 0:\n              return _context7.abrupt(\"return\", _actions_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].setMenu(menu));\n\n            case 1:\n            case \"end\":\n              return _context7.stop();\n          }\n        }\n      }, setMenu);\n    })\n  }\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (bp);\n\n//# sourceURL=webpack:///./src/store/bp.js?");

/***/ })

/******/ });