diff --git a/__tests__/__snapshots__/index.js.snap b/__tests__/__snapshots__/index.js.snap
index 180895cd..0542a66c 100644
--- a/__tests__/__snapshots__/index.js.snap
+++ b/__tests__/__snapshots__/index.js.snap
@@ -69,6 +69,7 @@ Object {
"dropAll": [Function],
"getAchievementsDone": [Function],
"getAchievementsInit": [Function],
+ "getAchievementsV3Done": [Function],
"getActiveChallengesDone": [Function],
"getActiveChallengesInit": [Function],
"getFinancesDone": [Function],
@@ -98,6 +99,7 @@ Object {
"deleteWebLinkInit": [Function],
"getAchievementsDone": [Function],
"getAchievementsInit": [Function],
+ "getAchievementsV3Done": [Function],
"getCredentialDone": [Function],
"getCredentialInit": [Function],
"getEmailPreferencesDone": [Function],
diff --git a/__tests__/actions/__snapshots__/profile.js.snap b/__tests__/actions/__snapshots__/profile.js.snap
index 3ae1356e..b784f238 100644
--- a/__tests__/actions/__snapshots__/profile.js.snap
+++ b/__tests__/actions/__snapshots__/profile.js.snap
@@ -14,6 +14,7 @@ Object {
"deleteWebLinkInit": [Function],
"getAchievementsDone": [Function],
"getAchievementsInit": [Function],
+ "getAchievementsV3Done": [Function],
"getCredentialDone": [Function],
"getCredentialInit": [Function],
"getEmailPreferencesDone": [Function],
diff --git a/dist/dev/index.js b/dist/dev/index.js
index a5879a81..64dddd7b 100644
--- a/dist/dev/index.js
+++ b/dist/dev/index.js
@@ -520,7 +520,7 @@ eval("/* WEBPACK VAR INJECTION */(function(module) {\n\nObject.defineProperty(ex
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-eval("/* WEBPACK VAR INJECTION */(function(module) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _promise = __webpack_require__(/*! babel-runtime/core-js/promise */ \"babel-runtime/core-js/promise\");\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _slicedToArray2 = __webpack_require__(/*! babel-runtime/helpers/slicedToArray */ \"babel-runtime/helpers/slicedToArray\");\n\nvar _slicedToArray3 = _interopRequireDefault(_slicedToArray2);\n\nvar _regenerator = __webpack_require__(/*! babel-runtime/regenerator */ \"babel-runtime/regenerator\");\n\nvar _regenerator2 = _interopRequireDefault(_regenerator);\n\nvar _asyncToGenerator2 = __webpack_require__(/*! babel-runtime/helpers/asyncToGenerator */ \"babel-runtime/helpers/asyncToGenerator\");\n\nvar _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);\n\n/**\n * @static\n * @desc Creates an action that loads member achievements.\n * @param {String} handle Member handle.\n * @param {String} uuid Loading operation\n * @return {Action}\n */\nvar getAchievementsDone = function () {\n var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(handle, uuid) {\n var data;\n return _regenerator2.default.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n data = void 0;\n _context.prev = 1;\n _context.next = 4;\n return (0, _user.getService)().getAchievements(handle);\n\n case 4:\n data = _context.sent;\n _context.next = 10;\n break;\n\n case 7:\n _context.prev = 7;\n _context.t0 = _context['catch'](1);\n\n data = [];\n\n case 10:\n return _context.abrupt('return', { data: data, handle: handle, uuid: uuid });\n\n case 11:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this, [[1, 7]]);\n }));\n\n return function getAchievementsDone(_x, _x2) {\n return _ref.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Creates an action that signals beginning of loading the member's\n * financial information.\n * @param {String} handle Member handle.\n * @param {String} uuid Operation UUID.\n * @return {Action}\n */\n\n\n/**\n * @static\n * @desc Creates an action that loads member's financial information.\n * @param {String} handle Member handle.\n * @param {String} uuid Operation UUID.\n * @param {String} tokenV3 v3 auth token.\n * @return {Action}\n */\nvar getFinancesDone = function () {\n var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(handle, uuid, tokenV3) {\n var data;\n return _regenerator2.default.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return (0, _members.getService)(tokenV3).getMemberFinances(handle);\n\n case 2:\n data = _context2.sent;\n return _context2.abrupt('return', { data: data, handle: handle, uuid: uuid });\n\n case 4:\n case 'end':\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n\n return function getFinancesDone(_x3, _x4, _x5) {\n return _ref2.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Creates an action that signals beginning of member stats loading.\n * @param {String} handle Member handle.\n * @param {String} uuid Operation UUID.\n * @return {Action}\n */\n\n\nvar getStatsInit = function () {\n var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(handle, uuid) {\n return _regenerator2.default.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n return _context3.abrupt('return', { handle: handle, uuid: uuid });\n\n case 1:\n case 'end':\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n\n return function getStatsInit(_x6, _x7) {\n return _ref3.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Create an action that loads member statistics.\n * @param {String} handle Member handle.\n * @param {String} uuid Operation UUID.\n * @param {String} tokenV3 v3 auth token.\n * @return {Action}\n */\n\n\nvar getStatsDone = function () {\n var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(handle, uuid, tokenV3) {\n var data;\n return _regenerator2.default.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _context4.next = 2;\n return (0, _members.getService)(tokenV3).getStats(handle);\n\n case 2:\n data = _context4.sent;\n return _context4.abrupt('return', { data: data, handle: handle, uuid: uuid });\n\n case 4:\n case 'end':\n return _context4.stop();\n }\n }\n }, _callee4, this);\n }));\n\n return function getStatsDone(_x8, _x9, _x10) {\n return _ref4.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Payload creator for the action that inits the loading of member active challenges.\n * @param {String} handle\n * @param {String} uuid\n * @returns {Object} Payload\n */\n\n\nvar getActiveChallengesInit = function () {\n var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(handle, uuid) {\n return _regenerator2.default.wrap(function _callee5$(_context5) {\n while (1) {\n switch (_context5.prev = _context5.next) {\n case 0:\n return _context5.abrupt('return', { handle: handle, uuid: uuid });\n\n case 1:\n case 'end':\n return _context5.stop();\n }\n }\n }, _callee5, this);\n }));\n\n return function getActiveChallengesInit(_x11, _x12) {\n return _ref5.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Payload creator for the action that loads the member active challenges.\n * @param {String} handle\n * @param {String} uuid\n * @param {String} tokenV3\n * @returns {Object} Payload\n */\n\n\nvar getActiveChallengesDone = function () {\n var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(handle, uuid, tokenV3) {\n var filter, service, getAll, calls, _ref8, _ref9, challenges;\n\n return _regenerator2.default.wrap(function _callee6$(_context6) {\n while (1) {\n switch (_context6.prev = _context6.next) {\n case 0:\n getAll = function getAll(getter) {\n var page = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var prev = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n var PAGE_SIZE = 50;\n return getter({\n limit: PAGE_SIZE,\n offset: page * PAGE_SIZE\n }).then(function (_ref7) {\n var chunk = _ref7.challenges;\n\n if (!chunk.length) return prev || [];\n return getAll(getter, 1 + page, prev ? prev.concat(chunk) : chunk);\n });\n };\n\n filter = { status: 'ACTIVE' };\n service = (0, _challenges.getService)(tokenV3);\n /* TODO: Reuse `getAll` from `actions/challenge-listing`\n /* after it moved from `community-app` to here.\n */\n\n calls = [getAll(function (params) {\n return service.getUserChallenges(handle, filter, params);\n })];\n _context6.next = 6;\n return _promise2.default.all(calls);\n\n case 6:\n _ref8 = _context6.sent;\n _ref9 = (0, _slicedToArray3.default)(_ref8, 1);\n challenges = _ref9[0];\n return _context6.abrupt('return', { handle: handle, challenges: challenges, uuid: uuid });\n\n case 10:\n case 'end':\n return _context6.stop();\n }\n }\n }, _callee6, this);\n }));\n\n return function getActiveChallengesDone(_x13, _x14, _x15) {\n return _ref6.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Create an action that signals beginning of member stats distribution history.\n * @param {String} handle Member handle.\n * @param {String} uuid Operation UUID.\n * @return {Action}\n */\n\n\nvar getStatsHistoryInit = function () {\n var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(handle, uuid) {\n return _regenerator2.default.wrap(function _callee7$(_context7) {\n while (1) {\n switch (_context7.prev = _context7.next) {\n case 0:\n return _context7.abrupt('return', { handle: handle, uuid: uuid });\n\n case 1:\n case 'end':\n return _context7.stop();\n }\n }\n }, _callee7, this);\n }));\n\n return function getStatsHistoryInit(_x18, _x19) {\n return _ref10.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Create an action that loads the member stats history.\n * @param {String} handle Member handle.\n * @param {String} uuid Operation UUID.\n * @param {String} tokenV3 v3 auth token.\n * @return {Action}\n */\n\n\nvar getStatsHistoryDone = function () {\n var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(handle, uuid, tokenV3) {\n var data;\n return _regenerator2.default.wrap(function _callee8$(_context8) {\n while (1) {\n switch (_context8.prev = _context8.next) {\n case 0:\n _context8.next = 2;\n return (0, _members.getService)(tokenV3).getStatsHistory(handle);\n\n case 2:\n data = _context8.sent;\n return _context8.abrupt('return', { data: data, handle: handle, uuid: uuid });\n\n case 4:\n case 'end':\n return _context8.stop();\n }\n }\n }, _callee8, this);\n }));\n\n return function getStatsHistoryDone(_x20, _x21, _x22) {\n return _ref11.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Create an action that signals beginning of member stats distribution loading.\n * @param {String} handle Member handle.\n * @param {String} uuid Operation UUID.\n * @return {Action}\n */\n\n\nvar getStatsDistributionInit = function () {\n var _ref12 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(handle, uuid) {\n return _regenerator2.default.wrap(function _callee9$(_context9) {\n while (1) {\n switch (_context9.prev = _context9.next) {\n case 0:\n return _context9.abrupt('return', { handle: handle, uuid: uuid });\n\n case 1:\n case 'end':\n return _context9.stop();\n }\n }\n }, _callee9, this);\n }));\n\n return function getStatsDistributionInit(_x23, _x24) {\n return _ref12.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Create an action that loads the member stats distribution.\n * @param {String} handle Member handle.\n * @param {String} track Main track name.\n * @param {String} subTrack Subtrack name.\n * @param {String} uuid Operation UUID.\n * @param {String} tokenV3 v3 auth token.\n * @return {Action}\n */\n\n\nvar getStatsDistributionDone = function () {\n var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(handle, track, subTrack, uuid, tokenV3) {\n var data;\n return _regenerator2.default.wrap(function _callee10$(_context10) {\n while (1) {\n switch (_context10.prev = _context10.next) {\n case 0:\n _context10.next = 2;\n return (0, _members.getService)(tokenV3).getStatsDistribution(handle, track, subTrack);\n\n case 2:\n data = _context10.sent;\n return _context10.abrupt('return', { data: data, handle: handle, uuid: uuid });\n\n case 4:\n case 'end':\n return _context10.stop();\n }\n }\n }, _callee10, this);\n }));\n\n return function getStatsDistributionDone(_x25, _x26, _x27, _x28, _x29) {\n return _ref13.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Create an action that signals beginning of subtrack challenges loading.\n * @param {String} handle Member handle.\n * @param {String} uuid Operation UUID.\n * @return {Action}\n */\n\n\nvar getSubtrackChallengesInit = function () {\n var _ref14 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(handle, uuid) {\n return _regenerator2.default.wrap(function _callee11$(_context11) {\n while (1) {\n switch (_context11.prev = _context11.next) {\n case 0:\n return _context11.abrupt('return', { handle: handle, uuid: uuid });\n\n case 1:\n case 'end':\n return _context11.stop();\n }\n }\n }, _callee11, this);\n }));\n\n return function getSubtrackChallengesInit(_x30, _x31) {\n return _ref14.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Create an action that loads the member subtrack challenges.\n * @param {String} uuid Operation UUID.\n * @param {String} handle Member handle.\n * @param {String} tokenV3 v3 auth token.\n * @param {String} track Main track name.\n * @param {String} subTrack Subtrack name.\n * @param {Number} start page.\n * @param {Number} page size.\n * @param {Boolean} whether to refresh.\n * @return {Action}\n */\n\n\nvar getSubtrackChallengesDone = function () {\n var _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(uuid, handle, tokenV3, track, subTrack, pageNum, pageSize, refresh) {\n var filter, params, service;\n return _regenerator2.default.wrap(function _callee12$(_context12) {\n while (1) {\n switch (_context12.prev = _context12.next) {\n case 0:\n filter = {\n status: 'completed',\n hasUserSubmittedForReview: 'true',\n track: track,\n subTrack: subTrack\n };\n params = {};\n\n params.orderBy = 'submissionEndDate desc';\n params.limit = pageSize;\n params.offset = pageNum * pageSize;\n\n service = (0, _challenges.getService)(tokenV3);\n return _context12.abrupt('return', service.getUserChallenges(handle, filter, params).then(function (res) {\n return {\n uuid: uuid,\n challenges: res.challenges,\n refresh: refresh,\n handle: handle\n };\n }));\n\n case 7:\n case 'end':\n return _context12.stop();\n }\n }\n }, _callee12, this);\n }));\n\n return function getSubtrackChallengesDone(_x32, _x33, _x34, _x35, _x36, _x37, _x38, _x39) {\n return _ref15.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Create an action that signals beginning of member SRM loading.\n * @param {String} handle Member handle.\n * @param {String} uuid Operation UUID.\n * @return {Action}\n */\n\n\nvar getUserSRMInit = function () {\n var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(handle, uuid) {\n return _regenerator2.default.wrap(function _callee13$(_context13) {\n while (1) {\n switch (_context13.prev = _context13.next) {\n case 0:\n return _context13.abrupt('return', { handle: handle, uuid: uuid });\n\n case 1:\n case 'end':\n return _context13.stop();\n }\n }\n }, _callee13, this);\n }));\n\n return function getUserSRMInit(_x40, _x41) {\n return _ref16.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Create an action that loads the member SRM.\n * @param {String} uuid Operation UUID.\n * @param {String} handle Member handle.\n * @param {String} tokenV3 v3 auth token.\n * @param {Number} start page.\n * @param {Number} page size.\n * @param {Boolean} whether to refresh.\n * @return {Action}\n */\n\n\nvar getUserSRMDone = function () {\n var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14(uuid, handle, tokenV3, pageNum, pageSize, refresh) {\n var filter, params, service;\n return _regenerator2.default.wrap(function _callee14$(_context14) {\n while (1) {\n switch (_context14.prev = _context14.next) {\n case 0:\n filter = {\n status: 'past',\n isRatedForSRM: 'true'\n };\n params = {\n filter: _qs2.default.stringify(filter, { encode: false }),\n limit: pageSize,\n offset: pageNum * pageSize\n };\n service = (0, _challenges.getService)(tokenV3);\n return _context14.abrupt('return', service.getUserSrms(handle, params).then(function (res) {\n return {\n uuid: uuid,\n srms: res,\n refresh: refresh,\n handle: handle\n };\n }));\n\n case 4:\n case 'end':\n return _context14.stop();\n }\n }\n }, _callee14, this);\n }));\n\n return function getUserSRMDone(_x42, _x43, _x44, _x45, _x46, _x47) {\n return _ref17.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Create an action that signals beginning of member marathon loading.\n * @param {String} handle Member handle.\n * @param {String} uuid Operation UUID.\n * @return {Action}\n */\n\n\nvar getUserMarathonInit = function () {\n var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(handle, uuid) {\n return _regenerator2.default.wrap(function _callee15$(_context15) {\n while (1) {\n switch (_context15.prev = _context15.next) {\n case 0:\n return _context15.abrupt('return', { handle: handle, uuid: uuid });\n\n case 1:\n case 'end':\n return _context15.stop();\n }\n }\n }, _callee15, this);\n }));\n\n return function getUserMarathonInit(_x48, _x49) {\n return _ref18.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Create an action that loads the member marathon.\n * @param {String} uuid Operation UUID.\n * @param {String} handle Member handle.\n * @param {String} tokenV3 v3 auth token.\n * @param {Number} start page.\n * @param {Number} page size.\n * @param {Boolean} whether to refresh.\n * @return {Action}\n */\n\n\nvar getUserMarathonDone = function () {\n var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16(uuid, handle, tokenV3, pageNum, pageSize, refresh) {\n var filter, params, service;\n return _regenerator2.default.wrap(function _callee16$(_context16) {\n while (1) {\n switch (_context16.prev = _context16.next) {\n case 0:\n filter = { status: 'PAST', isRatedForMM: 'true' };\n params = {};\n\n params.orderBy = 'endDate desc';\n params.limit = pageSize;\n params.offset = pageNum * pageSize;\n\n service = (0, _challenges.getService)(tokenV3);\n return _context16.abrupt('return', service.getUserMarathonMatches(handle, filter, params).then(function (res) {\n return {\n uuid: uuid,\n marathons: res,\n refresh: refresh,\n handle: handle\n };\n }));\n\n case 7:\n case 'end':\n return _context16.stop();\n }\n }\n }, _callee16, this);\n }));\n\n return function getUserMarathonDone(_x50, _x51, _x52, _x53, _x54, _x55) {\n return _ref19.apply(this, arguments);\n };\n}();\n\nvar _qs = __webpack_require__(/*! qs */ \"qs\");\n\nvar _qs2 = _interopRequireDefault(_qs);\n\nvar _reduxActions = __webpack_require__(/*! redux-actions */ \"redux-actions\");\n\nvar _members = __webpack_require__(/*! ../services/members */ \"./src/services/members.js\");\n\nvar _user = __webpack_require__(/*! ../services/user */ \"./src/services/user.js\");\n\nvar _challenges = __webpack_require__(/*! ../services/challenges */ \"./src/services/challenges.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n(function () {\n var enterModule = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").enterModule;\n\n enterModule && enterModule(module);\n})(); /**\n * @module \"actions.members\"\n * @desc Actions related to members data.\n */\n\n/**\n * @static\n * @desc Creates an action that drops all information related to the specfied\n * member.\n * @param {String} handle Topcoder user handle.\n * @return {Action}\n */\nfunction drop(handle) {\n return handle;\n}\n\n/**\n * @static\n * @desc Creates an action that drops all member information loaded by\n * actions from this module.\n * @return {Action}\n */\nfunction dropAll() {}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of member achievements\n * loading.\n * @param {String} handle Member handle.\n * @param {String} uuid Loading operation UUID.\n * @return {Action}\n */\nfunction getAchievementsInit(handle, uuid) {\n return { handle: handle, uuid: uuid };\n}function getFinancesInit(handle, uuid) {\n return { handle: handle, uuid: uuid };\n}\nvar _default = (0, _reduxActions.createActions)({\n MEMBERS: {\n DROP: drop,\n DROP_ALL: dropAll,\n GET_ACHIEVEMENTS_INIT: getAchievementsInit,\n GET_ACHIEVEMENTS_DONE: getAchievementsDone,\n GET_FINANCES_INIT: getFinancesInit,\n GET_FINANCES_DONE: getFinancesDone,\n GET_STATS_INIT: getStatsInit,\n GET_STATS_DONE: getStatsDone,\n GET_STATS_HISTORY_INIT: getStatsHistoryInit,\n GET_STATS_HISTORY_DONE: getStatsHistoryDone,\n GET_STATS_DISTRIBUTION_INIT: getStatsDistributionInit,\n GET_STATS_DISTRIBUTION_DONE: getStatsDistributionDone,\n GET_ACTIVE_CHALLENGES_INIT: getActiveChallengesInit,\n GET_ACTIVE_CHALLENGES_DONE: getActiveChallengesDone,\n GET_SUBTRACK_CHALLENGES_INIT: getSubtrackChallengesInit,\n GET_SUBTRACK_CHALLENGES_DONE: getSubtrackChallengesDone,\n GET_USER_SRM_INIT: getUserSRMInit,\n GET_USER_SRM_DONE: getUserSRMDone,\n GET_USER_MARATHON_INIT: getUserMarathonInit,\n GET_USER_MARATHON_DONE: getUserMarathonDone\n }\n});\n\nexports.default = _default;\n;\n\n(function () {\n var reactHotLoader = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").default;\n\n var leaveModule = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").leaveModule;\n\n if (!reactHotLoader) {\n return;\n }\n\n reactHotLoader.register(drop, 'drop', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(dropAll, 'dropAll', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getAchievementsInit, 'getAchievementsInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getAchievementsDone, 'getAchievementsDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getFinancesInit, 'getFinancesInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getFinancesDone, 'getFinancesDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getStatsInit, 'getStatsInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getStatsDone, 'getStatsDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getActiveChallengesInit, 'getActiveChallengesInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getActiveChallengesDone, 'getActiveChallengesDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getStatsHistoryInit, 'getStatsHistoryInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getStatsHistoryDone, 'getStatsHistoryDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getStatsDistributionInit, 'getStatsDistributionInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getStatsDistributionDone, 'getStatsDistributionDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getSubtrackChallengesInit, 'getSubtrackChallengesInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getSubtrackChallengesDone, 'getSubtrackChallengesDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getUserSRMInit, 'getUserSRMInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getUserSRMDone, 'getUserSRMDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getUserMarathonInit, 'getUserMarathonInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getUserMarathonDone, 'getUserMarathonDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(_default, 'default', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n leaveModule(module);\n})();\n\n;\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node_modules/webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n//# sourceURL=webpack://topcoder-react-lib/./src/actions/members.js?");
+eval("/* WEBPACK VAR INJECTION */(function(module) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _promise = __webpack_require__(/*! babel-runtime/core-js/promise */ \"babel-runtime/core-js/promise\");\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _slicedToArray2 = __webpack_require__(/*! babel-runtime/helpers/slicedToArray */ \"babel-runtime/helpers/slicedToArray\");\n\nvar _slicedToArray3 = _interopRequireDefault(_slicedToArray2);\n\nvar _regenerator = __webpack_require__(/*! babel-runtime/regenerator */ \"babel-runtime/regenerator\");\n\nvar _regenerator2 = _interopRequireDefault(_regenerator);\n\nvar _asyncToGenerator2 = __webpack_require__(/*! babel-runtime/helpers/asyncToGenerator */ \"babel-runtime/helpers/asyncToGenerator\");\n\nvar _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);\n\n/**\n * @static\n * @desc Creates an action that loads member achievements.\n * @param {String} handle Member handle.\n * @param {String} uuid Loading operation\n * @return {Action}\n */\nvar getAchievementsDone = function () {\n var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(handle, uuid) {\n var data;\n return _regenerator2.default.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n data = void 0;\n _context.prev = 1;\n _context.next = 4;\n return (0, _user.getService)().getAchievements(handle);\n\n case 4:\n data = _context.sent;\n _context.next = 10;\n break;\n\n case 7:\n _context.prev = 7;\n _context.t0 = _context['catch'](1);\n\n data = [];\n\n case 10:\n return _context.abrupt('return', { data: data, handle: handle, uuid: uuid });\n\n case 11:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this, [[1, 7]]);\n }));\n\n return function getAchievementsDone(_x, _x2) {\n return _ref.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Creates an action that loads member achievements from v3 API.\n * @param {String} handle Member handle.\n * @param {String} uuid Loading operation\n * @return {Action}\n */\n\n\nvar getAchievementsV3Done = function () {\n var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(handle, uuid) {\n var data;\n return _regenerator2.default.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n data = void 0;\n _context2.prev = 1;\n _context2.next = 4;\n return (0, _user.getService)().getAchievementsV3(handle);\n\n case 4:\n data = _context2.sent;\n _context2.next = 10;\n break;\n\n case 7:\n _context2.prev = 7;\n _context2.t0 = _context2['catch'](1);\n\n data = [];\n\n case 10:\n return _context2.abrupt('return', { data: data, handle: handle, uuid: uuid });\n\n case 11:\n case 'end':\n return _context2.stop();\n }\n }\n }, _callee2, this, [[1, 7]]);\n }));\n\n return function getAchievementsV3Done(_x3, _x4) {\n return _ref2.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Creates an action that signals beginning of loading the member's\n * financial information.\n * @param {String} handle Member handle.\n * @param {String} uuid Operation UUID.\n * @return {Action}\n */\n\n\n/**\n * @static\n * @desc Creates an action that loads member's financial information.\n * @param {String} handle Member handle.\n * @param {String} uuid Operation UUID.\n * @param {String} tokenV3 v3 auth token.\n * @return {Action}\n */\nvar getFinancesDone = function () {\n var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(handle, uuid, tokenV3) {\n var data;\n return _regenerator2.default.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _context3.next = 2;\n return (0, _members.getService)(tokenV3).getMemberFinances(handle);\n\n case 2:\n data = _context3.sent;\n return _context3.abrupt('return', { data: data, handle: handle, uuid: uuid });\n\n case 4:\n case 'end':\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n\n return function getFinancesDone(_x5, _x6, _x7) {\n return _ref3.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Creates an action that signals beginning of member stats loading.\n * @param {String} handle Member handle.\n * @param {String} uuid Operation UUID.\n * @return {Action}\n */\n\n\nvar getStatsInit = function () {\n var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(handle, uuid) {\n return _regenerator2.default.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n return _context4.abrupt('return', { handle: handle, uuid: uuid });\n\n case 1:\n case 'end':\n return _context4.stop();\n }\n }\n }, _callee4, this);\n }));\n\n return function getStatsInit(_x8, _x9) {\n return _ref4.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Create an action that loads member statistics.\n * @param {String} handle Member handle.\n * @param {String} uuid Operation UUID.\n * @param {String} tokenV3 v3 auth token.\n * @return {Action}\n */\n\n\nvar getStatsDone = function () {\n var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(handle, uuid, tokenV3) {\n var data;\n return _regenerator2.default.wrap(function _callee5$(_context5) {\n while (1) {\n switch (_context5.prev = _context5.next) {\n case 0:\n _context5.next = 2;\n return (0, _members.getService)(tokenV3).getStats(handle);\n\n case 2:\n data = _context5.sent;\n return _context5.abrupt('return', { data: data, handle: handle, uuid: uuid });\n\n case 4:\n case 'end':\n return _context5.stop();\n }\n }\n }, _callee5, this);\n }));\n\n return function getStatsDone(_x10, _x11, _x12) {\n return _ref5.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Payload creator for the action that inits the loading of member active challenges.\n * @param {String} handle\n * @param {String} uuid\n * @returns {Object} Payload\n */\n\n\nvar getActiveChallengesInit = function () {\n var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(handle, uuid) {\n return _regenerator2.default.wrap(function _callee6$(_context6) {\n while (1) {\n switch (_context6.prev = _context6.next) {\n case 0:\n return _context6.abrupt('return', { handle: handle, uuid: uuid });\n\n case 1:\n case 'end':\n return _context6.stop();\n }\n }\n }, _callee6, this);\n }));\n\n return function getActiveChallengesInit(_x13, _x14) {\n return _ref6.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Payload creator for the action that loads the member active challenges.\n * @param {String} handle\n * @param {String} uuid\n * @param {String} tokenV3\n * @returns {Object} Payload\n */\n\n\nvar getActiveChallengesDone = function () {\n var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(handle, uuid, tokenV3) {\n var filter, service, getAll, calls, _ref9, _ref10, challenges;\n\n return _regenerator2.default.wrap(function _callee7$(_context7) {\n while (1) {\n switch (_context7.prev = _context7.next) {\n case 0:\n getAll = function getAll(getter) {\n var page = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var prev = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n var PAGE_SIZE = 50;\n return getter({\n limit: PAGE_SIZE,\n offset: page * PAGE_SIZE\n }).then(function (_ref8) {\n var chunk = _ref8.challenges;\n\n if (!chunk.length) return prev || [];\n return getAll(getter, 1 + page, prev ? prev.concat(chunk) : chunk);\n });\n };\n\n filter = { status: 'ACTIVE' };\n service = (0, _challenges.getService)(tokenV3);\n /* TODO: Reuse `getAll` from `actions/challenge-listing`\n /* after it moved from `community-app` to here.\n */\n\n calls = [getAll(function (params) {\n return service.getUserChallenges(handle, filter, params);\n })];\n _context7.next = 6;\n return _promise2.default.all(calls);\n\n case 6:\n _ref9 = _context7.sent;\n _ref10 = (0, _slicedToArray3.default)(_ref9, 1);\n challenges = _ref10[0];\n return _context7.abrupt('return', { handle: handle, challenges: challenges, uuid: uuid });\n\n case 10:\n case 'end':\n return _context7.stop();\n }\n }\n }, _callee7, this);\n }));\n\n return function getActiveChallengesDone(_x15, _x16, _x17) {\n return _ref7.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Create an action that signals beginning of member stats distribution history.\n * @param {String} handle Member handle.\n * @param {String} uuid Operation UUID.\n * @return {Action}\n */\n\n\nvar getStatsHistoryInit = function () {\n var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(handle, uuid) {\n return _regenerator2.default.wrap(function _callee8$(_context8) {\n while (1) {\n switch (_context8.prev = _context8.next) {\n case 0:\n return _context8.abrupt('return', { handle: handle, uuid: uuid });\n\n case 1:\n case 'end':\n return _context8.stop();\n }\n }\n }, _callee8, this);\n }));\n\n return function getStatsHistoryInit(_x20, _x21) {\n return _ref11.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Create an action that loads the member stats history.\n * @param {String} handle Member handle.\n * @param {String} uuid Operation UUID.\n * @param {String} tokenV3 v3 auth token.\n * @return {Action}\n */\n\n\nvar getStatsHistoryDone = function () {\n var _ref12 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(handle, uuid, tokenV3) {\n var data;\n return _regenerator2.default.wrap(function _callee9$(_context9) {\n while (1) {\n switch (_context9.prev = _context9.next) {\n case 0:\n _context9.next = 2;\n return (0, _members.getService)(tokenV3).getStatsHistory(handle);\n\n case 2:\n data = _context9.sent;\n return _context9.abrupt('return', { data: data, handle: handle, uuid: uuid });\n\n case 4:\n case 'end':\n return _context9.stop();\n }\n }\n }, _callee9, this);\n }));\n\n return function getStatsHistoryDone(_x22, _x23, _x24) {\n return _ref12.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Create an action that signals beginning of member stats distribution loading.\n * @param {String} handle Member handle.\n * @param {String} uuid Operation UUID.\n * @return {Action}\n */\n\n\nvar getStatsDistributionInit = function () {\n var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(handle, uuid) {\n return _regenerator2.default.wrap(function _callee10$(_context10) {\n while (1) {\n switch (_context10.prev = _context10.next) {\n case 0:\n return _context10.abrupt('return', { handle: handle, uuid: uuid });\n\n case 1:\n case 'end':\n return _context10.stop();\n }\n }\n }, _callee10, this);\n }));\n\n return function getStatsDistributionInit(_x25, _x26) {\n return _ref13.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Create an action that loads the member stats distribution.\n * @param {String} handle Member handle.\n * @param {String} track Main track name.\n * @param {String} subTrack Subtrack name.\n * @param {String} uuid Operation UUID.\n * @param {String} tokenV3 v3 auth token.\n * @return {Action}\n */\n\n\nvar getStatsDistributionDone = function () {\n var _ref14 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(handle, track, subTrack, uuid, tokenV3) {\n var data;\n return _regenerator2.default.wrap(function _callee11$(_context11) {\n while (1) {\n switch (_context11.prev = _context11.next) {\n case 0:\n _context11.next = 2;\n return (0, _members.getService)(tokenV3).getStatsDistribution(handle, track, subTrack);\n\n case 2:\n data = _context11.sent;\n return _context11.abrupt('return', { data: data, handle: handle, uuid: uuid });\n\n case 4:\n case 'end':\n return _context11.stop();\n }\n }\n }, _callee11, this);\n }));\n\n return function getStatsDistributionDone(_x27, _x28, _x29, _x30, _x31) {\n return _ref14.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Create an action that signals beginning of subtrack challenges loading.\n * @param {String} handle Member handle.\n * @param {String} uuid Operation UUID.\n * @return {Action}\n */\n\n\nvar getSubtrackChallengesInit = function () {\n var _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(handle, uuid) {\n return _regenerator2.default.wrap(function _callee12$(_context12) {\n while (1) {\n switch (_context12.prev = _context12.next) {\n case 0:\n return _context12.abrupt('return', { handle: handle, uuid: uuid });\n\n case 1:\n case 'end':\n return _context12.stop();\n }\n }\n }, _callee12, this);\n }));\n\n return function getSubtrackChallengesInit(_x32, _x33) {\n return _ref15.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Create an action that loads the member subtrack challenges.\n * @param {String} uuid Operation UUID.\n * @param {String} handle Member handle.\n * @param {String} tokenV3 v3 auth token.\n * @param {String} track Main track name.\n * @param {String} subTrack Subtrack name.\n * @param {Number} start page.\n * @param {Number} page size.\n * @param {Boolean} whether to refresh.\n * @return {Action}\n */\n\n\nvar getSubtrackChallengesDone = function () {\n var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(uuid, handle, tokenV3, track, subTrack, pageNum, pageSize, refresh) {\n var filter, params, service;\n return _regenerator2.default.wrap(function _callee13$(_context13) {\n while (1) {\n switch (_context13.prev = _context13.next) {\n case 0:\n filter = {\n status: 'completed',\n hasUserSubmittedForReview: 'true',\n track: track,\n subTrack: subTrack\n };\n params = {};\n\n params.orderBy = 'submissionEndDate desc';\n params.limit = pageSize;\n params.offset = pageNum * pageSize;\n\n service = (0, _challenges.getService)(tokenV3);\n return _context13.abrupt('return', service.getUserChallenges(handle, filter, params).then(function (res) {\n return {\n uuid: uuid,\n challenges: res.challenges,\n refresh: refresh,\n handle: handle\n };\n }));\n\n case 7:\n case 'end':\n return _context13.stop();\n }\n }\n }, _callee13, this);\n }));\n\n return function getSubtrackChallengesDone(_x34, _x35, _x36, _x37, _x38, _x39, _x40, _x41) {\n return _ref16.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Create an action that signals beginning of member SRM loading.\n * @param {String} handle Member handle.\n * @param {String} uuid Operation UUID.\n * @return {Action}\n */\n\n\nvar getUserSRMInit = function () {\n var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14(handle, uuid) {\n return _regenerator2.default.wrap(function _callee14$(_context14) {\n while (1) {\n switch (_context14.prev = _context14.next) {\n case 0:\n return _context14.abrupt('return', { handle: handle, uuid: uuid });\n\n case 1:\n case 'end':\n return _context14.stop();\n }\n }\n }, _callee14, this);\n }));\n\n return function getUserSRMInit(_x42, _x43) {\n return _ref17.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Create an action that loads the member SRM.\n * @param {String} uuid Operation UUID.\n * @param {String} handle Member handle.\n * @param {String} tokenV3 v3 auth token.\n * @param {Number} start page.\n * @param {Number} page size.\n * @param {Boolean} whether to refresh.\n * @return {Action}\n */\n\n\nvar getUserSRMDone = function () {\n var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(uuid, handle, tokenV3, pageNum, pageSize, refresh) {\n var filter, params, service;\n return _regenerator2.default.wrap(function _callee15$(_context15) {\n while (1) {\n switch (_context15.prev = _context15.next) {\n case 0:\n filter = {\n status: 'past',\n isRatedForSRM: 'true'\n };\n params = {\n filter: _qs2.default.stringify(filter, { encode: false }),\n limit: pageSize,\n offset: pageNum * pageSize\n };\n service = (0, _challenges.getService)(tokenV3);\n return _context15.abrupt('return', service.getUserSrms(handle, params).then(function (res) {\n return {\n uuid: uuid,\n srms: res,\n refresh: refresh,\n handle: handle\n };\n }));\n\n case 4:\n case 'end':\n return _context15.stop();\n }\n }\n }, _callee15, this);\n }));\n\n return function getUserSRMDone(_x44, _x45, _x46, _x47, _x48, _x49) {\n return _ref18.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Create an action that signals beginning of member marathon loading.\n * @param {String} handle Member handle.\n * @param {String} uuid Operation UUID.\n * @return {Action}\n */\n\n\nvar getUserMarathonInit = function () {\n var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16(handle, uuid) {\n return _regenerator2.default.wrap(function _callee16$(_context16) {\n while (1) {\n switch (_context16.prev = _context16.next) {\n case 0:\n return _context16.abrupt('return', { handle: handle, uuid: uuid });\n\n case 1:\n case 'end':\n return _context16.stop();\n }\n }\n }, _callee16, this);\n }));\n\n return function getUserMarathonInit(_x50, _x51) {\n return _ref19.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Create an action that loads the member marathon.\n * @param {String} uuid Operation UUID.\n * @param {String} handle Member handle.\n * @param {String} tokenV3 v3 auth token.\n * @param {Number} start page.\n * @param {Number} page size.\n * @param {Boolean} whether to refresh.\n * @return {Action}\n */\n\n\nvar getUserMarathonDone = function () {\n var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee17(uuid, handle, tokenV3, pageNum, pageSize, refresh) {\n var filter, params, service;\n return _regenerator2.default.wrap(function _callee17$(_context17) {\n while (1) {\n switch (_context17.prev = _context17.next) {\n case 0:\n filter = { status: 'PAST', isRatedForMM: 'true' };\n params = {};\n\n params.orderBy = 'endDate desc';\n params.limit = pageSize;\n params.offset = pageNum * pageSize;\n\n service = (0, _challenges.getService)(tokenV3);\n return _context17.abrupt('return', service.getUserMarathonMatches(handle, filter, params).then(function (res) {\n return {\n uuid: uuid,\n marathons: res,\n refresh: refresh,\n handle: handle\n };\n }));\n\n case 7:\n case 'end':\n return _context17.stop();\n }\n }\n }, _callee17, this);\n }));\n\n return function getUserMarathonDone(_x52, _x53, _x54, _x55, _x56, _x57) {\n return _ref20.apply(this, arguments);\n };\n}();\n\nvar _qs = __webpack_require__(/*! qs */ \"qs\");\n\nvar _qs2 = _interopRequireDefault(_qs);\n\nvar _reduxActions = __webpack_require__(/*! redux-actions */ \"redux-actions\");\n\nvar _members = __webpack_require__(/*! ../services/members */ \"./src/services/members.js\");\n\nvar _user = __webpack_require__(/*! ../services/user */ \"./src/services/user.js\");\n\nvar _challenges = __webpack_require__(/*! ../services/challenges */ \"./src/services/challenges.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n(function () {\n var enterModule = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").enterModule;\n\n enterModule && enterModule(module);\n})(); /**\n * @module \"actions.members\"\n * @desc Actions related to members data.\n */\n\n/**\n * @static\n * @desc Creates an action that drops all information related to the specfied\n * member.\n * @param {String} handle Topcoder user handle.\n * @return {Action}\n */\nfunction drop(handle) {\n return handle;\n}\n\n/**\n * @static\n * @desc Creates an action that drops all member information loaded by\n * actions from this module.\n * @return {Action}\n */\nfunction dropAll() {}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of member achievements\n * loading.\n * @param {String} handle Member handle.\n * @param {String} uuid Loading operation UUID.\n * @return {Action}\n */\nfunction getAchievementsInit(handle, uuid) {\n return { handle: handle, uuid: uuid };\n}function getFinancesInit(handle, uuid) {\n return { handle: handle, uuid: uuid };\n}\nvar _default = (0, _reduxActions.createActions)({\n MEMBERS: {\n DROP: drop,\n DROP_ALL: dropAll,\n GET_ACHIEVEMENTS_INIT: getAchievementsInit,\n GET_ACHIEVEMENTS_DONE: getAchievementsDone,\n GET_ACHIEVEMENTS_V3_DONE: getAchievementsV3Done,\n GET_FINANCES_INIT: getFinancesInit,\n GET_FINANCES_DONE: getFinancesDone,\n GET_STATS_INIT: getStatsInit,\n GET_STATS_DONE: getStatsDone,\n GET_STATS_HISTORY_INIT: getStatsHistoryInit,\n GET_STATS_HISTORY_DONE: getStatsHistoryDone,\n GET_STATS_DISTRIBUTION_INIT: getStatsDistributionInit,\n GET_STATS_DISTRIBUTION_DONE: getStatsDistributionDone,\n GET_ACTIVE_CHALLENGES_INIT: getActiveChallengesInit,\n GET_ACTIVE_CHALLENGES_DONE: getActiveChallengesDone,\n GET_SUBTRACK_CHALLENGES_INIT: getSubtrackChallengesInit,\n GET_SUBTRACK_CHALLENGES_DONE: getSubtrackChallengesDone,\n GET_USER_SRM_INIT: getUserSRMInit,\n GET_USER_SRM_DONE: getUserSRMDone,\n GET_USER_MARATHON_INIT: getUserMarathonInit,\n GET_USER_MARATHON_DONE: getUserMarathonDone\n }\n});\n\nexports.default = _default;\n;\n\n(function () {\n var reactHotLoader = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").default;\n\n var leaveModule = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").leaveModule;\n\n if (!reactHotLoader) {\n return;\n }\n\n reactHotLoader.register(drop, 'drop', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(dropAll, 'dropAll', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getAchievementsInit, 'getAchievementsInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getAchievementsDone, 'getAchievementsDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getAchievementsV3Done, 'getAchievementsV3Done', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getFinancesInit, 'getFinancesInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getFinancesDone, 'getFinancesDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getStatsInit, 'getStatsInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getStatsDone, 'getStatsDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getActiveChallengesInit, 'getActiveChallengesInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getActiveChallengesDone, 'getActiveChallengesDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getStatsHistoryInit, 'getStatsHistoryInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getStatsHistoryDone, 'getStatsHistoryDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getStatsDistributionInit, 'getStatsDistributionInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getStatsDistributionDone, 'getStatsDistributionDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getSubtrackChallengesInit, 'getSubtrackChallengesInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getSubtrackChallengesDone, 'getSubtrackChallengesDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getUserSRMInit, 'getUserSRMInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getUserSRMDone, 'getUserSRMDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getUserMarathonInit, 'getUserMarathonInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(getUserMarathonDone, 'getUserMarathonDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n reactHotLoader.register(_default, 'default', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/members.js');\n leaveModule(module);\n})();\n\n;\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node_modules/webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n//# sourceURL=webpack://topcoder-react-lib/./src/actions/members.js?");
/***/ }),
@@ -532,7 +532,7 @@ eval("/* WEBPACK VAR INJECTION */(function(module) {\n\nObject.defineProperty(ex
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-eval("/* WEBPACK VAR INJECTION */(function(module) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reduxActions = __webpack_require__(/*! redux-actions */ \"redux-actions\");\n\nvar _lodash = __webpack_require__(/*! lodash */ \"lodash\");\n\nvar _lodash2 = _interopRequireDefault(_lodash);\n\nvar _user = __webpack_require__(/*! ../services/user */ \"./src/services/user.js\");\n\nvar _members = __webpack_require__(/*! ../services/members */ \"./src/services/members.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n(function () {\n var enterModule = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").enterModule;\n\n enterModule && enterModule(module);\n})(); /**\n * @module \"actions.profile\"\n * @desc Actions for interactions with profile details API.\n * @todo Some of them repeat actions in {@link actions.members.md}. The code\n * should be refactored to avoid redundancy.\n */\n\n\n/**\n * @static\n * @desc Creates and action that loads user profile.\n * @todo This action does not follow the pattern with init/done pairs of\n * actions. Should be improved.\n * @param {String} handle User handle.\n * @return {Action}\n */\nfunction loadProfile(handle) {\n return handle;\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of user achievements loading.\n * @todo This duplicates similar action in {@link actions.members.md}!\n * @return {Action}\n */\nfunction getAchievementsInit() {}\n\n/**\n * @static\n * @desc Creates an action that loads user achievements.\n * @todo This duplicates similar action in {@link actions.members.md}!\n * @param {String} handle User handle.\n * @return {Action}\n */\nfunction getAchievementsDone(handle) {\n return (0, _user.getService)().getUserPublic(handle);\n}\n\n/**\n * @static\n * @todo To be documented.\n * @return {Action}\n */\nfunction getExternalAccountsInit() {}\n\n/**\n * @static\n * @todo To be documented.\n * @param {String} handle User handle.\n * @return {Action}\n */\nfunction getExternalAccountsDone(handle) {\n return (0, _members.getService)().getExternalAccounts(handle);\n}\n\n/**\n * @static\n * @todo Figure out what does this action do.\n * @return {Action}\n */\nfunction getExternalLinksInit() {}\n\n/**\n * @static\n * @todo Figure out the purpose of this action\n * @param {String} handle User handle.\n * @return {Action}\n */\nfunction getExternalLinksDone(handle) {\n return (0, _members.getService)().getExternalLinks(handle);\n}\n\n/**\n * @static\n * @todo Figure out the purpose of this action.\n * @return {Action}\n */\nfunction getInfoInit() {}\n\n/**\n * @static\n * @todo Figure out the purpose of this action.\n * @param {String} handle User handle.\n * @return {Action}\n */\nfunction getInfoDone(handle) {\n return (0, _members.getService)().getMemberInfo(handle);\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of loading the member's\n * skills info.\n * @return {Action}\n */\nfunction getSkillsInit() {}\n\n/**\n * @static\n * @desc Creates an action that loads member's skills info.\n * @param {String} handle Member handle.\n * @return {Action}\n */\nfunction getSkillsDone(handle) {\n return (0, _members.getService)().getSkills(handle);\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of loading member's stats.\n * @todo This is similar to {@link actions.members.md#module_actions.members.getStatsInit}!\n * @return {Action}\n */\nfunction getStatsInit() {}\n\n/**\n * @static\n * @desc Creates an action that loads member's stats.\n * @param {String} handle Member handle.\n * @return {Action}\n */\nfunction getStatsDone(handle) {\n return (0, _members.getService)().getStats(handle);\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of getting linked accounts.\n * @return {Action}\n */\nfunction getLinkedAccountsInit() {}\n\n/**\n * @static\n * @desc Creates an action that gets linked accounts.\n *\n * @param {Object} profile Topcoder member profile.\n * @param {String} tokenV3 Topcoder auth token v3.\n * @return {Action}\n */\nfunction getLinkedAccountsDone(profile, tokenV3) {\n var service = (0, _user.getService)(tokenV3);\n return service.getLinkedAccounts(profile.userId);\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of getting credential.\n * @return {Action}\n */\nfunction getCredentialInit() {}\n\n/**\n * @static\n * @desc Creates an action that gets credential.\n *\n * @param {Object} profile Topcoder member profile.\n * @param {String} tokenV3 Topcoder auth token v3.\n * @return {Action}\n */\nfunction getCredentialDone(profile, tokenV3) {\n var service = (0, _user.getService)(tokenV3);\n return service.getCredential(profile.userId);\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of getting email preferences.\n * @return {Action}\n */\nfunction getEmailPreferencesInit() {}\n\n/**\n * @static\n * @desc Creates an action that gets email preferences.\n *\n * @param {Object} profile Topcoder member profile.\n * @param {String} tokenV3 Topcoder auth token v3.\n * @return {Action}\n */\nfunction getEmailPreferencesDone(profile, tokenV3) {\n var service = (0, _user.getService)(tokenV3);\n return service.getEmailPreferences(profile.userId);\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of uploading user's photo.\n * @return {Action}\n */\nfunction uploadPhotoInit() {}\n\n/**\n * @static\n * @desc Creates an action that uploads user's photo.\n * @param {String} handle Topcoder user handle.\n * @param {String} tokenV3 Topcoder auth token v3.\n * @param {String} file The photo file.\n * @return {Action}\n */\nfunction uploadPhotoDone(handle, tokenV3, file) {\n var service = (0, _members.getService)(tokenV3);\n return service.getPresignedUrl(handle, file).then(function (res) {\n return service.uploadFileToS3(res);\n }).then(function (res) {\n return service.updateMemberPhoto(res);\n }).then(function (photoURL) {\n return { handle: handle, photoURL: photoURL };\n });\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of deleting user's photo.\n * @return {Action}\n */\nfunction deletePhotoInit() {}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of updating user's profile.\n * @return {Action}\n */\nfunction updateProfileInit() {}\n\n/**\n * @static\n * @desc Creates an action that updates user's profile.\n * @param {String} profile Topcoder user profile.\n * @param {String} tokenV3 Topcoder auth token v3.\n * @return {Action}\n */\nfunction updateProfileDone(profile, tokenV3) {\n var service = (0, _members.getService)(tokenV3);\n return service.updateMemberProfile(profile);\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of adding user's skill.\n * @return {Action}\n */\nfunction addSkillInit() {}\n\n/**\n * @static\n * @desc Creates an action that adds user's skill.\n * @param {String} handle Topcoder user handle.\n * @param {String} tokenV3 Topcoder auth token v3.\n * @param {Object} skill Skill to add.\n * @return {Action}\n */\nfunction addSkillDone(handle, tokenV3, skill) {\n var service = (0, _members.getService)(tokenV3);\n return service.addSkill(handle, skill.tagId).then(function (res) {\n return { skills: res.skills, handle: handle, skill: skill };\n });\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of hiding user's skill.\n * @return {Action}\n */\nfunction hideSkillInit() {}\n\n/**\n * @static\n * @desc Creates an action that hides user's skill.\n * @param {String} handle Topcoder user handle.\n * @param {String} tokenV3 Topcoder auth token v3.\n * @param {Object} skill Skill to hide.\n * @return {Action}\n */\nfunction hideSkillDone(handle, tokenV3, skill) {\n var service = (0, _members.getService)(tokenV3);\n return service.hideSkill(handle, skill.tagId).then(function (res) {\n return { skills: res.skills, handle: handle, skill: skill };\n });\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of adding user's web link.\n * @return {Action}\n */\nfunction addWebLinkInit() {}\n\n/**\n * @static\n * @desc Creates an action that adds user's web link.\n * @param {String} handle Topcoder user handle.\n * @param {String} tokenV3 Topcoder auth token v3.\n * @param {String} webLink Web link to add.\n * @return {Action}\n */\nfunction addWebLinkDone(handle, tokenV3, webLink) {\n var service = (0, _members.getService)(tokenV3);\n return service.addWebLink(handle, webLink).then(function (res) {\n return { data: res, handle: handle };\n });\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of deleting user's web link.\n * @param {Object} key Web link key to delete.\n * @return {Action}\n */\nfunction deleteWebLinkInit(_ref) {\n var key = _ref.key;\n\n return { key: key };\n}\n\n/**\n * @static\n * @desc Creates an action that deletes user's web link.\n * @param {String} handle Topcoder user handle.\n * @param {String} tokenV3 Topcoder auth token v3.\n * @param {String} webLink Web link to delete.\n * @return {Action}\n */\nfunction deleteWebLinkDone(handle, tokenV3, webLink) {\n var service = (0, _members.getService)(tokenV3);\n return service.deleteWebLink(handle, webLink.key).then(function (res) {\n return { data: res, handle: handle };\n });\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of linking external account.\n * @return {Action}\n */\nfunction linkExternalAccountInit() {}\n\n/**\n * @static\n * @desc Creates an action that links external account.\n * @param {Object} profile Topcoder member handle.\n * @param {String} tokenV3 Topcoder auth token v3.\n * @param {String} providerType The external account service provider\n * @param {String} callbackUrl Optional. The callback url\n * @return {Action}\n */\nfunction linkExternalAccountDone(profile, tokenV3, providerType, callbackUrl) {\n var service = (0, _user.getService)(tokenV3);\n return service.linkExternalAccount(profile.userId, providerType, callbackUrl).then(function (res) {\n return { data: res, handle: profile.handle };\n });\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of unlinking external account.\n * @param {Object} providerType External account provider type to delete.\n * @return {Action}\n */\nfunction unlinkExternalAccountInit(_ref2) {\n var providerType = _ref2.providerType;\n\n return { providerType: providerType };\n}\n\n/**\n * @static\n * @desc Creates an action that unlinks external account.\n * @param {Object} profile Topcoder member profile.\n * @param {String} tokenV3 Topcoder auth token v3.\n * @param {String} providerType The external account service provider\n * @return {Action}\n */\nfunction unlinkExternalAccountDone(profile, tokenV3, providerType) {\n var service = (0, _user.getService)(tokenV3);\n return service.unlinkExternalAccount(profile.userId, providerType).then(function () {\n return { providerType: providerType, handle: profile.handle };\n });\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of saving email preferences.\n * @return {Action}\n */\nfunction saveEmailPreferencesInit() {}\n\n/**\n * @static\n * @desc Creates an action that saves email preferences.\n *\n * @param {Object} profile Topcoder member profile.\n * @param {String} tokenV3 Topcoder auth token v3.\n * @param {Object} preferences The email preferences\n * @return {Action}\n */\nfunction saveEmailPreferencesDone(profile, tokenV3, preferences) {\n var service = (0, _user.getService)(tokenV3);\n return service.saveEmailPreferences(profile, preferences).then(function (res) {\n return { data: res, handle: profile.handle };\n });\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of updating user password.\n * @return {Action}\n */\nfunction updatePasswordInit() {}\n\n/**\n * @static\n * @desc Creates an action that updates user password.\n *\n * @param {Object} profile Topcoder member profile.\n * @param {String} tokenV3 Topcoder auth token v3.\n * @param {String} newPassword The new password\n * @param {String} oldPassword The old password\n * @return {Action}\n */\nfunction updatePasswordDone(profile, tokenV3, newPassword, oldPassword) {\n var service = (0, _user.getService)(tokenV3);\n return service.updatePassword(profile.userId, newPassword, oldPassword).then(function (res) {\n return { data: res, handle: profile.handle };\n });\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of verify member new email.\n * @return {Action}\n */\nfunction verifyMemberNewEmailInit() {}\n\n/**\n * @static\n * @desc Creates an action that verify member new email.\n *\n * @param {Object} handle Topcoder member handle.\n * @param {String} tokenV3 Topcoder auth token v3.\n * @param {String} emailVerifyToken The verify token of new email.\n * @return {Action}\n */\nfunction verifyMemberNewEmailDone(handle, tokenV3, emailVerifyToken) {\n var service = (0, _members.getService)(tokenV3);\n return service.verifyMemberNewEmail(handle, emailVerifyToken).then(function (res) {\n return { data: res };\n });\n}\n\n/**\n * @static\n * @desc Creates an action that toggles isEmailConflict state\n * @param {boolean} state\n * @return {Action}\n */\nfunction updateEmailConflict() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n return state;\n}\n\nvar _default = (0, _reduxActions.createActions)({\n PROFILE: {\n LOAD_PROFILE: loadProfile,\n CLEAR_PROFILE: _lodash2.default.noop,\n GET_ACHIEVEMENTS_INIT: getAchievementsInit,\n GET_ACHIEVEMENTS_DONE: getAchievementsDone,\n GET_EXTERNAL_ACCOUNTS_INIT: getExternalAccountsInit,\n GET_EXTERNAL_ACCOUNTS_DONE: getExternalAccountsDone,\n GET_EXTERNAL_LINKS_INIT: getExternalLinksInit,\n GET_EXTERNAL_LINKS_DONE: getExternalLinksDone,\n GET_INFO_INIT: getInfoInit,\n GET_INFO_DONE: getInfoDone,\n GET_SKILLS_INIT: getSkillsInit,\n GET_SKILLS_DONE: getSkillsDone,\n GET_STATS_INIT: getStatsInit,\n GET_STATS_DONE: getStatsDone,\n GET_LINKED_ACCOUNTS_INIT: getLinkedAccountsInit,\n GET_LINKED_ACCOUNTS_DONE: getLinkedAccountsDone,\n GET_EMAIL_PREFERENCES_INIT: getEmailPreferencesInit,\n GET_EMAIL_PREFERENCES_DONE: getEmailPreferencesDone,\n GET_CREDENTIAL_INIT: getCredentialInit,\n GET_CREDENTIAL_DONE: getCredentialDone,\n UPLOAD_PHOTO_INIT: uploadPhotoInit,\n UPLOAD_PHOTO_DONE: uploadPhotoDone,\n DELETE_PHOTO_INIT: deletePhotoInit,\n DELETE_PHOTO_DONE: updateProfileDone,\n UPDATE_PROFILE_INIT: updateProfileInit,\n UPDATE_PROFILE_DONE: updateProfileDone,\n ADD_SKILL_INIT: addSkillInit,\n ADD_SKILL_DONE: addSkillDone,\n HIDE_SKILL_INIT: hideSkillInit,\n HIDE_SKILL_DONE: hideSkillDone,\n ADD_WEB_LINK_INIT: addWebLinkInit,\n ADD_WEB_LINK_DONE: addWebLinkDone,\n DELETE_WEB_LINK_INIT: deleteWebLinkInit,\n DELETE_WEB_LINK_DONE: deleteWebLinkDone,\n LINK_EXTERNAL_ACCOUNT_INIT: linkExternalAccountInit,\n LINK_EXTERNAL_ACCOUNT_DONE: linkExternalAccountDone,\n UNLINK_EXTERNAL_ACCOUNT_INIT: unlinkExternalAccountInit,\n UNLINK_EXTERNAL_ACCOUNT_DONE: unlinkExternalAccountDone,\n SAVE_EMAIL_PREFERENCES_INIT: saveEmailPreferencesInit,\n SAVE_EMAIL_PREFERENCES_DONE: saveEmailPreferencesDone,\n UPDATE_PASSWORD_INIT: updatePasswordInit,\n UPDATE_PASSWORD_DONE: updatePasswordDone,\n VERIFY_MEMBER_NEW_EMAIL_INIT: verifyMemberNewEmailInit,\n VERIFY_MEMBER_NEW_EMAIL_DONE: verifyMemberNewEmailDone,\n UPDATE_EMAIL_CONFLICT: updateEmailConflict\n }\n});\n\nexports.default = _default;\n;\n\n(function () {\n var reactHotLoader = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").default;\n\n var leaveModule = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").leaveModule;\n\n if (!reactHotLoader) {\n return;\n }\n\n reactHotLoader.register(loadProfile, 'loadProfile', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getAchievementsInit, 'getAchievementsInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getAchievementsDone, 'getAchievementsDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getExternalAccountsInit, 'getExternalAccountsInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getExternalAccountsDone, 'getExternalAccountsDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getExternalLinksInit, 'getExternalLinksInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getExternalLinksDone, 'getExternalLinksDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getInfoInit, 'getInfoInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getInfoDone, 'getInfoDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getSkillsInit, 'getSkillsInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getSkillsDone, 'getSkillsDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getStatsInit, 'getStatsInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getStatsDone, 'getStatsDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getLinkedAccountsInit, 'getLinkedAccountsInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getLinkedAccountsDone, 'getLinkedAccountsDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getCredentialInit, 'getCredentialInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getCredentialDone, 'getCredentialDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getEmailPreferencesInit, 'getEmailPreferencesInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getEmailPreferencesDone, 'getEmailPreferencesDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(uploadPhotoInit, 'uploadPhotoInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(uploadPhotoDone, 'uploadPhotoDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(deletePhotoInit, 'deletePhotoInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(updateProfileInit, 'updateProfileInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(updateProfileDone, 'updateProfileDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(addSkillInit, 'addSkillInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(addSkillDone, 'addSkillDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(hideSkillInit, 'hideSkillInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(hideSkillDone, 'hideSkillDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(addWebLinkInit, 'addWebLinkInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(addWebLinkDone, 'addWebLinkDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(deleteWebLinkInit, 'deleteWebLinkInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(deleteWebLinkDone, 'deleteWebLinkDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(linkExternalAccountInit, 'linkExternalAccountInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(linkExternalAccountDone, 'linkExternalAccountDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(unlinkExternalAccountInit, 'unlinkExternalAccountInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(unlinkExternalAccountDone, 'unlinkExternalAccountDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(saveEmailPreferencesInit, 'saveEmailPreferencesInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(saveEmailPreferencesDone, 'saveEmailPreferencesDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(updatePasswordInit, 'updatePasswordInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(updatePasswordDone, 'updatePasswordDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(verifyMemberNewEmailInit, 'verifyMemberNewEmailInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(verifyMemberNewEmailDone, 'verifyMemberNewEmailDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(updateEmailConflict, 'updateEmailConflict', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(_default, 'default', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n leaveModule(module);\n})();\n\n;\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node_modules/webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n//# sourceURL=webpack://topcoder-react-lib/./src/actions/profile.js?");
+eval("/* WEBPACK VAR INJECTION */(function(module) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _reduxActions = __webpack_require__(/*! redux-actions */ \"redux-actions\");\n\nvar _lodash = __webpack_require__(/*! lodash */ \"lodash\");\n\nvar _lodash2 = _interopRequireDefault(_lodash);\n\nvar _user = __webpack_require__(/*! ../services/user */ \"./src/services/user.js\");\n\nvar _members = __webpack_require__(/*! ../services/members */ \"./src/services/members.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n(function () {\n var enterModule = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").enterModule;\n\n enterModule && enterModule(module);\n})(); /**\n * @module \"actions.profile\"\n * @desc Actions for interactions with profile details API.\n * @todo Some of them repeat actions in {@link actions.members.md}. The code\n * should be refactored to avoid redundancy.\n */\n\n\n/**\n * @static\n * @desc Creates and action that loads user profile.\n * @todo This action does not follow the pattern with init/done pairs of\n * actions. Should be improved.\n * @param {String} handle User handle.\n * @return {Action}\n */\nfunction loadProfile(handle) {\n return handle;\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of user achievements loading.\n * @todo This duplicates similar action in {@link actions.members.md}!\n * @return {Action}\n */\nfunction getAchievementsInit() {}\n\n/**\n * @static\n * @desc Creates an action that loads user achievements from API v2.\n * @todo This duplicates similar action in {@link actions.members.md}!\n * @param {String} handle User handle.\n * @return {Action}\n */\nfunction getAchievementsDone(handle) {\n return (0, _user.getService)().getUserPublic(handle);\n}\n\n/**\n * @static\n * @desc Creates an action that loads user achievements from API v3.\n * @todo This duplicates similar action in {@link actions.members.md}!\n * @param {String} handle User handle.\n * @return {Action}\n */\nfunction getAchievementsV3Done(handle) {\n return (0, _user.getService)().getUserPublicV3(handle);\n}\n\n/**\n * @static\n * @todo To be documented.\n * @return {Action}\n */\nfunction getExternalAccountsInit() {}\n\n/**\n * @static\n * @todo To be documented.\n * @param {String} handle User handle.\n * @return {Action}\n */\nfunction getExternalAccountsDone(handle) {\n return (0, _members.getService)().getExternalAccounts(handle);\n}\n\n/**\n * @static\n * @todo Figure out what does this action do.\n * @return {Action}\n */\nfunction getExternalLinksInit() {}\n\n/**\n * @static\n * @todo Figure out the purpose of this action\n * @param {String} handle User handle.\n * @return {Action}\n */\nfunction getExternalLinksDone(handle) {\n return (0, _members.getService)().getExternalLinks(handle);\n}\n\n/**\n * @static\n * @todo Figure out the purpose of this action.\n * @return {Action}\n */\nfunction getInfoInit() {}\n\n/**\n * @static\n * @todo Figure out the purpose of this action.\n * @param {String} handle User handle.\n * @return {Action}\n */\nfunction getInfoDone(handle) {\n return (0, _members.getService)().getMemberInfo(handle);\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of loading the member's\n * skills info.\n * @return {Action}\n */\nfunction getSkillsInit() {}\n\n/**\n * @static\n * @desc Creates an action that loads member's skills info.\n * @param {String} handle Member handle.\n * @return {Action}\n */\nfunction getSkillsDone(handle) {\n return (0, _members.getService)().getSkills(handle);\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of loading member's stats.\n * @todo This is similar to {@link actions.members.md#module_actions.members.getStatsInit}!\n * @return {Action}\n */\nfunction getStatsInit() {}\n\n/**\n * @static\n * @desc Creates an action that loads member's stats.\n * @param {String} handle Member handle.\n * @return {Action}\n */\nfunction getStatsDone(handle) {\n return (0, _members.getService)().getStats(handle);\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of getting linked accounts.\n * @return {Action}\n */\nfunction getLinkedAccountsInit() {}\n\n/**\n * @static\n * @desc Creates an action that gets linked accounts.\n *\n * @param {Object} profile Topcoder member profile.\n * @param {String} tokenV3 Topcoder auth token v3.\n * @return {Action}\n */\nfunction getLinkedAccountsDone(profile, tokenV3) {\n var service = (0, _user.getService)(tokenV3);\n return service.getLinkedAccounts(profile.userId);\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of getting credential.\n * @return {Action}\n */\nfunction getCredentialInit() {}\n\n/**\n * @static\n * @desc Creates an action that gets credential.\n *\n * @param {Object} profile Topcoder member profile.\n * @param {String} tokenV3 Topcoder auth token v3.\n * @return {Action}\n */\nfunction getCredentialDone(profile, tokenV3) {\n var service = (0, _user.getService)(tokenV3);\n return service.getCredential(profile.userId);\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of getting email preferences.\n * @return {Action}\n */\nfunction getEmailPreferencesInit() {}\n\n/**\n * @static\n * @desc Creates an action that gets email preferences.\n *\n * @param {Object} profile Topcoder member profile.\n * @param {String} tokenV3 Topcoder auth token v3.\n * @return {Action}\n */\nfunction getEmailPreferencesDone(profile, tokenV3) {\n var service = (0, _user.getService)(tokenV3);\n return service.getEmailPreferences(profile.userId);\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of uploading user's photo.\n * @return {Action}\n */\nfunction uploadPhotoInit() {}\n\n/**\n * @static\n * @desc Creates an action that uploads user's photo.\n * @param {String} handle Topcoder user handle.\n * @param {String} tokenV3 Topcoder auth token v3.\n * @param {String} file The photo file.\n * @return {Action}\n */\nfunction uploadPhotoDone(handle, tokenV3, file) {\n var service = (0, _members.getService)(tokenV3);\n return service.getPresignedUrl(handle, file).then(function (res) {\n return service.uploadFileToS3(res);\n }).then(function (res) {\n return service.updateMemberPhoto(res);\n }).then(function (photoURL) {\n return { handle: handle, photoURL: photoURL };\n });\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of deleting user's photo.\n * @return {Action}\n */\nfunction deletePhotoInit() {}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of updating user's profile.\n * @return {Action}\n */\nfunction updateProfileInit() {}\n\n/**\n * @static\n * @desc Creates an action that updates user's profile.\n * @param {String} profile Topcoder user profile.\n * @param {String} tokenV3 Topcoder auth token v3.\n * @return {Action}\n */\nfunction updateProfileDone(profile, tokenV3) {\n var service = (0, _members.getService)(tokenV3);\n return service.updateMemberProfile(profile);\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of adding user's skill.\n * @return {Action}\n */\nfunction addSkillInit() {}\n\n/**\n * @static\n * @desc Creates an action that adds user's skill.\n * @param {String} handle Topcoder user handle.\n * @param {String} tokenV3 Topcoder auth token v3.\n * @param {Object} skill Skill to add.\n * @return {Action}\n */\nfunction addSkillDone(handle, tokenV3, skill) {\n var service = (0, _members.getService)(tokenV3);\n return service.addSkill(handle, skill.tagId).then(function (res) {\n return { skills: res.skills, handle: handle, skill: skill };\n });\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of hiding user's skill.\n * @return {Action}\n */\nfunction hideSkillInit() {}\n\n/**\n * @static\n * @desc Creates an action that hides user's skill.\n * @param {String} handle Topcoder user handle.\n * @param {String} tokenV3 Topcoder auth token v3.\n * @param {Object} skill Skill to hide.\n * @return {Action}\n */\nfunction hideSkillDone(handle, tokenV3, skill) {\n var service = (0, _members.getService)(tokenV3);\n return service.hideSkill(handle, skill.tagId).then(function (res) {\n return { skills: res.skills, handle: handle, skill: skill };\n });\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of adding user's web link.\n * @return {Action}\n */\nfunction addWebLinkInit() {}\n\n/**\n * @static\n * @desc Creates an action that adds user's web link.\n * @param {String} handle Topcoder user handle.\n * @param {String} tokenV3 Topcoder auth token v3.\n * @param {String} webLink Web link to add.\n * @return {Action}\n */\nfunction addWebLinkDone(handle, tokenV3, webLink) {\n var service = (0, _members.getService)(tokenV3);\n return service.addWebLink(handle, webLink).then(function (res) {\n return { data: res, handle: handle };\n });\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of deleting user's web link.\n * @param {Object} key Web link key to delete.\n * @return {Action}\n */\nfunction deleteWebLinkInit(_ref) {\n var key = _ref.key;\n\n return { key: key };\n}\n\n/**\n * @static\n * @desc Creates an action that deletes user's web link.\n * @param {String} handle Topcoder user handle.\n * @param {String} tokenV3 Topcoder auth token v3.\n * @param {String} webLink Web link to delete.\n * @return {Action}\n */\nfunction deleteWebLinkDone(handle, tokenV3, webLink) {\n var service = (0, _members.getService)(tokenV3);\n return service.deleteWebLink(handle, webLink.key).then(function (res) {\n return { data: res, handle: handle };\n });\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of linking external account.\n * @return {Action}\n */\nfunction linkExternalAccountInit() {}\n\n/**\n * @static\n * @desc Creates an action that links external account.\n * @param {Object} profile Topcoder member handle.\n * @param {String} tokenV3 Topcoder auth token v3.\n * @param {String} providerType The external account service provider\n * @param {String} callbackUrl Optional. The callback url\n * @return {Action}\n */\nfunction linkExternalAccountDone(profile, tokenV3, providerType, callbackUrl) {\n var service = (0, _user.getService)(tokenV3);\n return service.linkExternalAccount(profile.userId, providerType, callbackUrl).then(function (res) {\n return { data: res, handle: profile.handle };\n });\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of unlinking external account.\n * @param {Object} providerType External account provider type to delete.\n * @return {Action}\n */\nfunction unlinkExternalAccountInit(_ref2) {\n var providerType = _ref2.providerType;\n\n return { providerType: providerType };\n}\n\n/**\n * @static\n * @desc Creates an action that unlinks external account.\n * @param {Object} profile Topcoder member profile.\n * @param {String} tokenV3 Topcoder auth token v3.\n * @param {String} providerType The external account service provider\n * @return {Action}\n */\nfunction unlinkExternalAccountDone(profile, tokenV3, providerType) {\n var service = (0, _user.getService)(tokenV3);\n return service.unlinkExternalAccount(profile.userId, providerType).then(function () {\n return { providerType: providerType, handle: profile.handle };\n });\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of saving email preferences.\n * @return {Action}\n */\nfunction saveEmailPreferencesInit() {}\n\n/**\n * @static\n * @desc Creates an action that saves email preferences.\n *\n * @param {Object} profile Topcoder member profile.\n * @param {String} tokenV3 Topcoder auth token v3.\n * @param {Object} preferences The email preferences\n * @return {Action}\n */\nfunction saveEmailPreferencesDone(profile, tokenV3, preferences) {\n var service = (0, _user.getService)(tokenV3);\n return service.saveEmailPreferences(profile, preferences).then(function (res) {\n return { data: res, handle: profile.handle };\n });\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of updating user password.\n * @return {Action}\n */\nfunction updatePasswordInit() {}\n\n/**\n * @static\n * @desc Creates an action that updates user password.\n *\n * @param {Object} profile Topcoder member profile.\n * @param {String} tokenV3 Topcoder auth token v3.\n * @param {String} newPassword The new password\n * @param {String} oldPassword The old password\n * @return {Action}\n */\nfunction updatePasswordDone(profile, tokenV3, newPassword, oldPassword) {\n var service = (0, _user.getService)(tokenV3);\n return service.updatePassword(profile.userId, newPassword, oldPassword).then(function (res) {\n return { data: res, handle: profile.handle };\n });\n}\n\n/**\n * @static\n * @desc Creates an action that signals beginning of verify member new email.\n * @return {Action}\n */\nfunction verifyMemberNewEmailInit() {}\n\n/**\n * @static\n * @desc Creates an action that verify member new email.\n *\n * @param {Object} handle Topcoder member handle.\n * @param {String} tokenV3 Topcoder auth token v3.\n * @param {String} emailVerifyToken The verify token of new email.\n * @return {Action}\n */\nfunction verifyMemberNewEmailDone(handle, tokenV3, emailVerifyToken) {\n var service = (0, _members.getService)(tokenV3);\n return service.verifyMemberNewEmail(handle, emailVerifyToken).then(function (res) {\n return { data: res };\n });\n}\n\n/**\n * @static\n * @desc Creates an action that toggles isEmailConflict state\n * @param {boolean} state\n * @return {Action}\n */\nfunction updateEmailConflict() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n return state;\n}\n\nvar _default = (0, _reduxActions.createActions)({\n PROFILE: {\n LOAD_PROFILE: loadProfile,\n CLEAR_PROFILE: _lodash2.default.noop,\n GET_ACHIEVEMENTS_INIT: getAchievementsInit,\n GET_ACHIEVEMENTS_DONE: getAchievementsDone,\n GET_ACHIEVEMENTS_V3_DONE: getAchievementsV3Done,\n GET_EXTERNAL_ACCOUNTS_INIT: getExternalAccountsInit,\n GET_EXTERNAL_ACCOUNTS_DONE: getExternalAccountsDone,\n GET_EXTERNAL_LINKS_INIT: getExternalLinksInit,\n GET_EXTERNAL_LINKS_DONE: getExternalLinksDone,\n GET_INFO_INIT: getInfoInit,\n GET_INFO_DONE: getInfoDone,\n GET_SKILLS_INIT: getSkillsInit,\n GET_SKILLS_DONE: getSkillsDone,\n GET_STATS_INIT: getStatsInit,\n GET_STATS_DONE: getStatsDone,\n GET_LINKED_ACCOUNTS_INIT: getLinkedAccountsInit,\n GET_LINKED_ACCOUNTS_DONE: getLinkedAccountsDone,\n GET_EMAIL_PREFERENCES_INIT: getEmailPreferencesInit,\n GET_EMAIL_PREFERENCES_DONE: getEmailPreferencesDone,\n GET_CREDENTIAL_INIT: getCredentialInit,\n GET_CREDENTIAL_DONE: getCredentialDone,\n UPLOAD_PHOTO_INIT: uploadPhotoInit,\n UPLOAD_PHOTO_DONE: uploadPhotoDone,\n DELETE_PHOTO_INIT: deletePhotoInit,\n DELETE_PHOTO_DONE: updateProfileDone,\n UPDATE_PROFILE_INIT: updateProfileInit,\n UPDATE_PROFILE_DONE: updateProfileDone,\n ADD_SKILL_INIT: addSkillInit,\n ADD_SKILL_DONE: addSkillDone,\n HIDE_SKILL_INIT: hideSkillInit,\n HIDE_SKILL_DONE: hideSkillDone,\n ADD_WEB_LINK_INIT: addWebLinkInit,\n ADD_WEB_LINK_DONE: addWebLinkDone,\n DELETE_WEB_LINK_INIT: deleteWebLinkInit,\n DELETE_WEB_LINK_DONE: deleteWebLinkDone,\n LINK_EXTERNAL_ACCOUNT_INIT: linkExternalAccountInit,\n LINK_EXTERNAL_ACCOUNT_DONE: linkExternalAccountDone,\n UNLINK_EXTERNAL_ACCOUNT_INIT: unlinkExternalAccountInit,\n UNLINK_EXTERNAL_ACCOUNT_DONE: unlinkExternalAccountDone,\n SAVE_EMAIL_PREFERENCES_INIT: saveEmailPreferencesInit,\n SAVE_EMAIL_PREFERENCES_DONE: saveEmailPreferencesDone,\n UPDATE_PASSWORD_INIT: updatePasswordInit,\n UPDATE_PASSWORD_DONE: updatePasswordDone,\n VERIFY_MEMBER_NEW_EMAIL_INIT: verifyMemberNewEmailInit,\n VERIFY_MEMBER_NEW_EMAIL_DONE: verifyMemberNewEmailDone,\n UPDATE_EMAIL_CONFLICT: updateEmailConflict\n }\n});\n\nexports.default = _default;\n;\n\n(function () {\n var reactHotLoader = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").default;\n\n var leaveModule = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").leaveModule;\n\n if (!reactHotLoader) {\n return;\n }\n\n reactHotLoader.register(loadProfile, 'loadProfile', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getAchievementsInit, 'getAchievementsInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getAchievementsDone, 'getAchievementsDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getAchievementsV3Done, 'getAchievementsV3Done', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getExternalAccountsInit, 'getExternalAccountsInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getExternalAccountsDone, 'getExternalAccountsDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getExternalLinksInit, 'getExternalLinksInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getExternalLinksDone, 'getExternalLinksDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getInfoInit, 'getInfoInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getInfoDone, 'getInfoDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getSkillsInit, 'getSkillsInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getSkillsDone, 'getSkillsDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getStatsInit, 'getStatsInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getStatsDone, 'getStatsDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getLinkedAccountsInit, 'getLinkedAccountsInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getLinkedAccountsDone, 'getLinkedAccountsDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getCredentialInit, 'getCredentialInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getCredentialDone, 'getCredentialDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getEmailPreferencesInit, 'getEmailPreferencesInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(getEmailPreferencesDone, 'getEmailPreferencesDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(uploadPhotoInit, 'uploadPhotoInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(uploadPhotoDone, 'uploadPhotoDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(deletePhotoInit, 'deletePhotoInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(updateProfileInit, 'updateProfileInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(updateProfileDone, 'updateProfileDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(addSkillInit, 'addSkillInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(addSkillDone, 'addSkillDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(hideSkillInit, 'hideSkillInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(hideSkillDone, 'hideSkillDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(addWebLinkInit, 'addWebLinkInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(addWebLinkDone, 'addWebLinkDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(deleteWebLinkInit, 'deleteWebLinkInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(deleteWebLinkDone, 'deleteWebLinkDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(linkExternalAccountInit, 'linkExternalAccountInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(linkExternalAccountDone, 'linkExternalAccountDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(unlinkExternalAccountInit, 'unlinkExternalAccountInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(unlinkExternalAccountDone, 'unlinkExternalAccountDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(saveEmailPreferencesInit, 'saveEmailPreferencesInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(saveEmailPreferencesDone, 'saveEmailPreferencesDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(updatePasswordInit, 'updatePasswordInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(updatePasswordDone, 'updatePasswordDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(verifyMemberNewEmailInit, 'verifyMemberNewEmailInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(verifyMemberNewEmailDone, 'verifyMemberNewEmailDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(updateEmailConflict, 'updateEmailConflict', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n reactHotLoader.register(_default, 'default', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/profile.js');\n leaveModule(module);\n})();\n\n;\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node_modules/webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n//# sourceURL=webpack://topcoder-react-lib/./src/actions/profile.js?");
/***/ }),
@@ -556,7 +556,7 @@ eval("/* WEBPACK VAR INJECTION */(function(module) {\n\nObject.defineProperty(ex
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-eval("/* WEBPACK VAR INJECTION */(function(module) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _regenerator = __webpack_require__(/*! babel-runtime/regenerator */ \"babel-runtime/regenerator\");\n\nvar _regenerator2 = _interopRequireDefault(_regenerator);\n\nvar _asyncToGenerator2 = __webpack_require__(/*! babel-runtime/helpers/asyncToGenerator */ \"babel-runtime/helpers/asyncToGenerator\");\n\nvar _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);\n\n/**\n * @static\n * @desc Creates an action that loads user's all traits.\n * @param {String} uuid Operation UUID.\n * @param {String} tokenV3 v3 auth token.\n * @return {Action}\n */\n\nvar getAllUserTraits = function () {\n var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(handle, tokenV3) {\n var data;\n return _regenerator2.default.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return (0, _userTraits.getService)(tokenV3).getAllUserTraits(handle);\n\n case 2:\n data = _context.sent;\n return _context.abrupt('return', { data: data, handle: handle });\n\n case 4:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n return function getAllUserTraits(_x, _x2) {\n return _ref.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Creates an action that add trait by trait id.\n * @param {String} handle member's handle.\n * @param {String} traitId trait id.\n * @param {Array} data trait data array.\n * @param {String} tokenV3 v3 auth token.\n * @return {Action}\n */\n\n\nvar addUserTrait = function () {\n var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(handle, traitId, data, tokenV3) {\n var result;\n return _regenerator2.default.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return (0, _userTraits.getService)(tokenV3).addUserTrait(handle, traitId, data);\n\n case 2:\n result = _context2.sent;\n return _context2.abrupt('return', { result: result, handle: handle, traitId: traitId });\n\n case 4:\n case 'end':\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n\n return function addUserTrait(_x3, _x4, _x5, _x6) {\n return _ref2.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Creates an action that update trait by trait id.\n * @param {String} handle member's handle.\n * @param {String} traitId trait id.\n * @param {Array} data trait data array.\n * @param {String} tokenV3 v3 auth token.\n * @return {Action}\n */\n\n\nvar updateUserTrait = function () {\n var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(handle, traitId, data, tokenV3) {\n var result;\n return _regenerator2.default.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _context3.next = 2;\n return (0, _userTraits.getService)(tokenV3).updateUserTrait(handle, traitId, data);\n\n case 2:\n result = _context3.sent;\n return _context3.abrupt('return', { result: result, handle: handle, traitId: traitId });\n\n case 4:\n case 'end':\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n\n return function updateUserTrait(_x7, _x8, _x9, _x10) {\n return _ref3.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Creates an action that delete trait by trait id.\n * @param {String} handle member's handle.\n * @param {String} traitId trait id.\n * @param {String} tokenV3 v3 auth token.\n * @return {Action}\n */\n\n\nvar deleteUserTrait = function () {\n var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(handle, traitId, tokenV3) {\n var data;\n return _regenerator2.default.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _context4.next = 2;\n return (0, _userTraits.getService)(tokenV3).deleteUserTrait(handle, traitId);\n\n case 2:\n data = _context4.sent;\n return _context4.abrupt('return', { data: data, handle: handle, traitId: traitId });\n\n case 4:\n case 'end':\n return _context4.stop();\n }\n }\n }, _callee4, this);\n }));\n\n return function deleteUserTrait(_x11, _x12, _x13) {\n return _ref4.apply(this, arguments);\n };\n}();\n\nvar _reduxActions = __webpack_require__(/*! redux-actions */ \"redux-actions\");\n\nvar _lodash = __webpack_require__(/*! lodash */ \"lodash\");\n\nvar _lodash2 = _interopRequireDefault(_lodash);\n\nvar _userTraits = __webpack_require__(/*! ../services/user-traits */ \"./src/services/user-traits.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n(function () {\n var enterModule = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").enterModule;\n\n enterModule && enterModule(module);\n})(); /**\n * @module \"actions.settings\"\n * @desc Actions related to settings page.\n */\n\nvar _default = (0, _reduxActions.createActions)({\n SETTINGS: {\n GET_ALL_USER_TRAITS: getAllUserTraits,\n ADD_USER_TRAIT: addUserTrait,\n DELETE_USER_TRAIT: deleteUserTrait,\n UPDATE_USER_TRAIT: updateUserTrait,\n MODIFY_USER_TRAIT_INIT: _lodash2.default.noop\n }\n});\n\nexports.default = _default;\n;\n\n(function () {\n var reactHotLoader = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").default;\n\n var leaveModule = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").leaveModule;\n\n if (!reactHotLoader) {\n return;\n }\n\n reactHotLoader.register(getAllUserTraits, 'getAllUserTraits', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/settings.js');\n reactHotLoader.register(addUserTrait, 'addUserTrait', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/settings.js');\n reactHotLoader.register(updateUserTrait, 'updateUserTrait', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/settings.js');\n reactHotLoader.register(deleteUserTrait, 'deleteUserTrait', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/settings.js');\n reactHotLoader.register(_default, 'default', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/settings.js');\n leaveModule(module);\n})();\n\n;\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node_modules/webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n//# sourceURL=webpack://topcoder-react-lib/./src/actions/settings.js?");
+eval("/* WEBPACK VAR INJECTION */(function(module) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _regenerator = __webpack_require__(/*! babel-runtime/regenerator */ \"babel-runtime/regenerator\");\n\nvar _regenerator2 = _interopRequireDefault(_regenerator);\n\nvar _asyncToGenerator2 = __webpack_require__(/*! babel-runtime/helpers/asyncToGenerator */ \"babel-runtime/helpers/asyncToGenerator\");\n\nvar _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);\n\n/**\n * @static\n * @desc Creates an action that loads user's all traits.\n * @param {String} handle the topcoder member handle\n * @param {String} tokenV3 v3 auth token.\n * @return {Action}\n */\nvar getAllUserTraits = function () {\n var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(handle, tokenV3) {\n var data;\n return _regenerator2.default.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return (0, _userTraits.getService)(tokenV3).getAllUserTraits(handle);\n\n case 2:\n data = _context.sent;\n return _context.abrupt('return', { data: data, handle: handle });\n\n case 4:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n return function getAllUserTraits(_x, _x2) {\n return _ref.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Creates an action that add trait by trait id.\n * @param {String} handle member's handle.\n * @param {String} traitId trait id.\n * @param {Array} data trait data array.\n * @param {String} tokenV3 v3 auth token.\n * @return {Action}\n */\n\n\nvar addUserTrait = function () {\n var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(handle, traitId, data, tokenV3) {\n var result;\n return _regenerator2.default.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return (0, _userTraits.getService)(tokenV3).addUserTrait(handle, traitId, data);\n\n case 2:\n result = _context2.sent;\n return _context2.abrupt('return', { result: result, handle: handle, traitId: traitId });\n\n case 4:\n case 'end':\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n\n return function addUserTrait(_x3, _x4, _x5, _x6) {\n return _ref2.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Creates an action that update trait by trait id.\n * @param {String} handle member's handle.\n * @param {String} traitId trait id.\n * @param {Array} data trait data array.\n * @param {String} tokenV3 v3 auth token.\n * @return {Action}\n */\n\n\nvar updateUserTrait = function () {\n var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(handle, traitId, data, tokenV3) {\n var result;\n return _regenerator2.default.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _context3.next = 2;\n return (0, _userTraits.getService)(tokenV3).updateUserTrait(handle, traitId, data);\n\n case 2:\n result = _context3.sent;\n return _context3.abrupt('return', { result: result, handle: handle, traitId: traitId });\n\n case 4:\n case 'end':\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n\n return function updateUserTrait(_x7, _x8, _x9, _x10) {\n return _ref3.apply(this, arguments);\n };\n}();\n\n/**\n * @static\n * @desc Creates an action that delete trait by trait id.\n * @param {String} handle member's handle.\n * @param {String} traitId trait id.\n * @param {String} tokenV3 v3 auth token.\n * @return {Action}\n */\n\n\nvar deleteUserTrait = function () {\n var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(handle, traitId, tokenV3) {\n var data;\n return _regenerator2.default.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _context4.next = 2;\n return (0, _userTraits.getService)(tokenV3).deleteUserTrait(handle, traitId);\n\n case 2:\n data = _context4.sent;\n return _context4.abrupt('return', { data: data, handle: handle, traitId: traitId });\n\n case 4:\n case 'end':\n return _context4.stop();\n }\n }\n }, _callee4, this);\n }));\n\n return function deleteUserTrait(_x11, _x12, _x13) {\n return _ref4.apply(this, arguments);\n };\n}();\n\nvar _reduxActions = __webpack_require__(/*! redux-actions */ \"redux-actions\");\n\nvar _lodash = __webpack_require__(/*! lodash */ \"lodash\");\n\nvar _lodash2 = _interopRequireDefault(_lodash);\n\nvar _userTraits = __webpack_require__(/*! ../services/user-traits */ \"./src/services/user-traits.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n(function () {\n var enterModule = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").enterModule;\n\n enterModule && enterModule(module);\n})(); /**\n * @module \"actions.settings\"\n * @desc Actions related to settings page.\n */\n\nvar _default = (0, _reduxActions.createActions)({\n SETTINGS: {\n GET_ALL_USER_TRAITS: getAllUserTraits,\n ADD_USER_TRAIT: addUserTrait,\n DELETE_USER_TRAIT: deleteUserTrait,\n UPDATE_USER_TRAIT: updateUserTrait,\n MODIFY_USER_TRAIT_INIT: _lodash2.default.noop\n }\n});\n\nexports.default = _default;\n;\n\n(function () {\n var reactHotLoader = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").default;\n\n var leaveModule = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").leaveModule;\n\n if (!reactHotLoader) {\n return;\n }\n\n reactHotLoader.register(getAllUserTraits, 'getAllUserTraits', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/settings.js');\n reactHotLoader.register(addUserTrait, 'addUserTrait', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/settings.js');\n reactHotLoader.register(updateUserTrait, 'updateUserTrait', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/settings.js');\n reactHotLoader.register(deleteUserTrait, 'deleteUserTrait', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/settings.js');\n reactHotLoader.register(_default, 'default', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/actions/settings.js');\n leaveModule(module);\n})();\n\n;\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node_modules/webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n//# sourceURL=webpack://topcoder-react-lib/./src/actions/settings.js?");
/***/ }),
@@ -724,7 +724,7 @@ eval("/* WEBPACK VAR INJECTION */(function(module) {\n\nObject.defineProperty(ex
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-eval("/* WEBPACK VAR INJECTION */(function(module) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _promise = __webpack_require__(/*! babel-runtime/core-js/promise */ \"babel-runtime/core-js/promise\");\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _toConsumableArray2 = __webpack_require__(/*! babel-runtime/helpers/toConsumableArray */ \"babel-runtime/helpers/toConsumableArray\");\n\nvar _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);\n\nvar _defineProperty2 = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ \"babel-runtime/helpers/defineProperty\");\n\nvar _defineProperty3 = _interopRequireDefault(_defineProperty2);\n\nvar _extends20 = __webpack_require__(/*! babel-runtime/helpers/extends */ \"babel-runtime/helpers/extends\");\n\nvar _extends21 = _interopRequireDefault(_extends20);\n\nexports.factory = factory;\n\nvar _lodash = __webpack_require__(/*! lodash */ \"lodash\");\n\nvar _lodash2 = _interopRequireDefault(_lodash);\n\nvar _reduxActions = __webpack_require__(/*! redux-actions */ \"redux-actions\");\n\nvar _logger = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\n\nvar _logger2 = _interopRequireDefault(_logger);\n\nvar _members = __webpack_require__(/*! ../actions/members */ \"./src/actions/members.js\");\n\nvar _members2 = _interopRequireDefault(_members);\n\nvar _errors = __webpack_require__(/*! ../utils/errors */ \"./src/utils/errors.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n(function () {\n var enterModule = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").enterModule;\n\n enterModule && enterModule(module);\n})(); /**\n * @module \"reducers.members\"\n * @desc Reducer for the Redux store segment that holds members data.\n * @todo Document state segment structure.\n */\n\n/**\n * Drops information about a member.\n * @param {Object} state\n * @param {Object} action\n * @return {Object} New state.\n */\nfunction onDrop(state, _ref) {\n var payload = _ref.payload;\n\n if (!state[payload]) return state;\n return _lodash2.default.omit(state, payload);\n}\n\n/**\n * Drops all loaded information on members.\n * @return {Object} New state.\n */\nfunction onDropAll() {\n return {};\n}\n\n/**\n * Inits the loading of member achievements.\n * @param {Object} state\n * @param {String} action.handle\n * @param {String} action.uuid\n * @return {Object} New state.\n */\nfunction onGetAchievementsInit(state, action) {\n var _action$payload = action.payload,\n handle = _action$payload.handle,\n uuid = _action$payload.uuid;\n\n var res = state[handle];\n res = res ? _lodash2.default.clone(res) : {};\n res.achievements = { loadingUuid: uuid };\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, res));\n}\n\n/**\n * Finalizes the loading of member achievements.\n * @param {Object} state\n * @param {Object} error\n * @param {Array} payload.data\n * @param {String} payload.handle\n * @param {String} payload.uuid\n * @return {Object} New state.\n */\nfunction onGetAchievementsDone(state, _ref2) {\n var error = _ref2.error,\n payload = _ref2.payload;\n\n if (error) {\n _logger2.default.error('Failed to load member achievements', payload);\n (0, _errors.fireErrorMessage)('Failed to load member achievements');\n return state;\n }\n\n var data = payload.data,\n handle = payload.handle,\n uuid = payload.uuid;\n\n if (uuid !== _lodash2.default.get(state[handle], 'achievements.loadingUuid')) return state;\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, (0, _extends21.default)({}, state[handle], {\n achievements: { data: data, timestamp: Date.now() }\n })));\n}\n\n/**\n * Initializes the loading of member financial information.\n * @param {Object} state\n * @param {String} action.payload.handle\n * @param {String} action.payload.uuid\n * @return {Object} New state.\n */\nfunction onGetFinancesInit(state, action) {\n var _action$payload2 = action.payload,\n handle = _action$payload2.handle,\n uuid = _action$payload2.uuid;\n\n var envelop = (0, _extends21.default)({}, state[handle] || {}, {\n finances: {\n loadingUuid: uuid,\n timestamp: 0\n }\n });\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, envelop));\n}\n\n/**\n * Finalizes a pending loading of member financial information.\n * @param {Object} state\n * @param {Object} action\n * @return {Object} New state.\n */\nfunction onGetFinancesDone(state, _ref3) {\n var error = _ref3.error,\n payload = _ref3.payload;\n\n if (error) {\n _logger2.default.error('Failed to get user financial info', payload);\n (0, _errors.fireErrorMessage)('Failed to get user financial info', '');\n return state;\n }\n\n var data = payload.data,\n handle = payload.handle,\n uuid = payload.uuid;\n\n if (uuid !== _lodash2.default.get(state[handle], 'finances.loadingUuid')) return state;\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, (0, _extends21.default)({}, state[handle], {\n finances: {\n data: data,\n loadingUuid: '',\n timestamp: Date.now()\n }\n })));\n}\n\n/**\n * Inits the loading of member stats.\n * @param {Object} state\n * @param {Object} action\n * @return {Object} New state.\n */\nfunction onGetStatsInit(state, action) {\n var _action$payload3 = action.payload,\n handle = _action$payload3.handle,\n uuid = _action$payload3.uuid;\n\n var res = state[handle];\n res = res ? _lodash2.default.clone(res) : {};\n res.stats = { loadingUuid: uuid };\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, res));\n}\n\n/**\n * Finalizes the loading of member stats.\n * @param {Object} state\n * @param {Object} action\n * @return {Object} New state.\n */\nfunction onGetStatsDone(state, _ref4) {\n var error = _ref4.error,\n payload = _ref4.payload;\n\n if (error) {\n _logger2.default.error('Failed to get member stats', payload);\n (0, _errors.fireErrorMessage)('Failed to get member stats', '');\n return state;\n }\n\n var data = payload.data,\n handle = payload.handle,\n uuid = payload.uuid;\n\n if (uuid !== _lodash2.default.get(state[handle], 'stats.loadingUuid')) return state;\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, (0, _extends21.default)({}, state[handle], {\n stats: { data: data, timestamp: Date.now() }\n })));\n}\n\n/**\n * Inits the loading of member stats history.\n * @param {Object} state\n * @param {Object} action\n * @return {Object} New state.\n */\nfunction onGetStatsHistoryInit(state, action) {\n var _action$payload4 = action.payload,\n handle = _action$payload4.handle,\n uuid = _action$payload4.uuid;\n\n var res = state[handle];\n res = res ? _lodash2.default.clone(res) : {};\n res.statsHistory = { loadingUuid: uuid };\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, res));\n}\n\n/**\n * Finalizes the loading of member stats history.\n * @param {Object} state\n * @param {Object} action\n * @return {Object} New state.\n */\nfunction onGetStatsHistoryDone(state, _ref5) {\n var error = _ref5.error,\n payload = _ref5.payload;\n\n if (error) {\n _logger2.default.error('Failed to get member statsHistory', payload);\n (0, _errors.fireErrorMessage)('Failed to get member statsHistory', '');\n return state;\n }\n\n var data = payload.data,\n handle = payload.handle,\n uuid = payload.uuid;\n\n if (uuid !== _lodash2.default.get(state[handle], 'statsHistory.loadingUuid')) return state;\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, (0, _extends21.default)({}, state[handle], {\n statsHistory: { data: data, timestamp: Date.now() }\n })));\n}\n\n/**\n * Inits the loading of member stats distribution.\n * @param {Object} state\n * @param {Object} action\n * @return {Object} New state.\n */\nfunction onGetStatsDistributionInit(state, action) {\n var _action$payload5 = action.payload,\n handle = _action$payload5.handle,\n uuid = _action$payload5.uuid;\n\n var res = state[handle];\n res = res ? _lodash2.default.clone(res) : {};\n res.statsDistribution = { loadingUuid: uuid };\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, res));\n}\n\n/**\n * Finalizes the loading of member stats distribution.\n * @param {Object} state\n * @param {Object} action\n * @return {Object} New state.\n */\nfunction onGetStatsDistributionDone(state, _ref6) {\n var error = _ref6.error,\n payload = _ref6.payload;\n\n if (error) {\n _logger2.default.error('Failed to get member statsDistribution', payload);\n (0, _errors.fireErrorMessage)('Failed to get member statsDistribution', '');\n return state;\n }\n\n var data = payload.data,\n handle = payload.handle,\n uuid = payload.uuid;\n\n if (uuid !== _lodash2.default.get(state[handle], 'statsDistribution.loadingUuid')) return state;\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, (0, _extends21.default)({}, state[handle], {\n statsDistribution: { data: data, timestamp: Date.now() }\n })));\n}\n\n/**\n * Inits the loading of member active challenges.\n * @param {Object} state\n * @param {Object} action\n * @return {Object} New state.\n */\nfunction onGetActiveChallengesInit(state, action) {\n var handle = action.payload.handle;\n\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, (0, _extends21.default)({}, state[handle], { activeChallengesCount: null })));\n}\n\n/**\n * Finalizes the loading of member active challenges.\n * @param {Object} state\n * @param {Object} action\n * @return {Object} New state.\n */\nfunction onGetActiveChallengesDone(state, _ref7) {\n var error = _ref7.error,\n payload = _ref7.payload;\n\n if (error) {\n _logger2.default.error('Failed to get member active challenges', payload);\n (0, _errors.fireErrorMessage)('Failed to get member active challenges', '');\n return state;\n }\n\n var handle = payload.handle,\n challenges = payload.challenges;\n\n\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, (0, _extends21.default)({}, state[handle], {\n activeChallengesCount: challenges.length\n })));\n}\n\n/**\n * Inits the loading of member subtrack challenges.\n * @param {Object} state\n * @param {Object} action\n * @return {Object} New state.\n */\nfunction onGetSubtrackChallengesInit(state, _ref8) {\n var payload = _ref8.payload;\n var handle = payload.handle,\n uuid = payload.uuid;\n\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, (0, _extends21.default)({}, state[handle], { loadingSubTrackChallengesUUID: uuid })));\n}\n\n/**\n * Finalizes the loading of member subtrack challenges.\n * @param {Object} state\n * @param {Object} action\n * @return {Object} New state.\n */\nfunction onGetSubtrackChallengesDone(state, _ref9) {\n var error = _ref9.error,\n payload = _ref9.payload;\n\n if (error) {\n _logger2.default.error('Failed to get member subtrack challenges', payload);\n (0, _errors.fireErrorMessage)('Failed to get member subtrack challenges', '');\n return state;\n }\n\n var uuid = payload.uuid,\n challenges = payload.challenges,\n refresh = payload.refresh,\n handle = payload.handle;\n\n if (uuid !== state[handle].loadingSubTrackChallengesUUID) return state;\n\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, (0, _extends21.default)({}, state[handle], {\n subtrackChallenges: state[handle].subtrackChallenges && !refresh ? [].concat((0, _toConsumableArray3.default)(state[handle].subtrackChallenges), (0, _toConsumableArray3.default)(challenges)) : challenges,\n // if current query returns 0 item, mark it completed\n subtrackChallengesHasMore: challenges && challenges.length > 0,\n loadingSubTrackChallengesUUID: ''\n })));\n}\n\n/**\n * Inits the loading of member SRMs.\n * @param {Object} state\n * @param {Object} action\n * @return {Object} New state.\n */\nfunction onGetUserSRMInit(state, _ref10) {\n var payload = _ref10.payload;\n var handle = payload.handle,\n uuid = payload.uuid;\n\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, (0, _extends21.default)({}, state[handle], { loadingSRMUUID: uuid })));\n}\n\n/**\n * Finalizes the loading of member SRMs.\n * @param {Object} state\n * @param {Object} action\n * @return {Object} New state.\n */\nfunction onGetUserSRMDone(state, _ref11) {\n var error = _ref11.error,\n payload = _ref11.payload;\n\n if (error) {\n _logger2.default.error('Failed to get member SRMs', payload);\n (0, _errors.fireErrorMessage)('Failed to get member SRMs', '');\n return state;\n }\n\n var uuid = payload.uuid,\n srms = payload.srms,\n refresh = payload.refresh,\n handle = payload.handle;\n\n if (uuid !== state[handle].loadingSRMUUID) return state;\n\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, (0, _extends21.default)({}, state[handle], {\n userSRMs: state[handle].userSRMs && !refresh ? [].concat((0, _toConsumableArray3.default)(state[handle].userSRMs), (0, _toConsumableArray3.default)(srms)) : srms,\n userSRMHasMore: srms && srms.length > 0, // if current query returns 0 item, mark it completed\n loadingSRMUUID: ''\n })));\n}\n\n/**\n * Inits the loading of member marathons.\n * @param {Object} state\n * @param {Object} action\n * @return {Object} New state.\n */\nfunction onGetUserMarathonInit(state, _ref12) {\n var payload = _ref12.payload;\n var handle = payload.handle,\n uuid = payload.uuid;\n\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, (0, _extends21.default)({}, state[handle], { loadingMarathonUUID: uuid })));\n}\n\n/**\n * Finalizes the loading of member marathons.\n * @param {Object} state\n * @param {Object} action\n * @return {Object} New state.\n */\nfunction onGetUserMarathonDone(state, _ref13) {\n var error = _ref13.error,\n payload = _ref13.payload;\n\n if (error) {\n _logger2.default.error('Failed to get member marathons', payload);\n (0, _errors.fireErrorMessage)('Failed to get member marathons', '');\n return state;\n }\n\n var uuid = payload.uuid,\n marathons = payload.marathons,\n refresh = payload.refresh,\n handle = payload.handle;\n\n if (uuid !== state[handle].loadingMarathonUUID) return state;\n\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, (0, _extends21.default)({}, state[handle], {\n userMarathons: state[handle].userMarathons && !refresh ? [].concat((0, _toConsumableArray3.default)(state[handle].userMarathons), (0, _toConsumableArray3.default)(marathons.challenges)) : marathons.challenges,\n // if current query returns 0 item, mark it completed\n userMarathonHasMore: marathons && marathons.challenges && marathons.challenges.length > 0,\n loadingMarathonUUID: ''\n })));\n}\n\n/**\n * Creates a new Members reducer with the specified initial state.\n * @param {Object} initialState Optional. Initial state.\n * @return {Function} Members reducer.\n */\nfunction create() {\n var _handleActions;\n\n var initialState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var a = _members2.default.members;\n return (0, _reduxActions.handleActions)((_handleActions = {}, (0, _defineProperty3.default)(_handleActions, a.drop, onDrop), (0, _defineProperty3.default)(_handleActions, a.dropAll, onDropAll), (0, _defineProperty3.default)(_handleActions, a.getAchievementsInit, onGetAchievementsInit), (0, _defineProperty3.default)(_handleActions, a.getAchievementsDone, onGetAchievementsDone), (0, _defineProperty3.default)(_handleActions, a.getFinancesInit, onGetFinancesInit), (0, _defineProperty3.default)(_handleActions, a.getFinancesDone, onGetFinancesDone), (0, _defineProperty3.default)(_handleActions, a.getStatsInit, onGetStatsInit), (0, _defineProperty3.default)(_handleActions, a.getStatsDone, onGetStatsDone), (0, _defineProperty3.default)(_handleActions, a.getStatsHistoryInit, onGetStatsHistoryInit), (0, _defineProperty3.default)(_handleActions, a.getStatsHistoryDone, onGetStatsHistoryDone), (0, _defineProperty3.default)(_handleActions, a.getStatsDistributionInit, onGetStatsDistributionInit), (0, _defineProperty3.default)(_handleActions, a.getStatsDistributionDone, onGetStatsDistributionDone), (0, _defineProperty3.default)(_handleActions, a.getActiveChallengesInit, onGetActiveChallengesInit), (0, _defineProperty3.default)(_handleActions, a.getActiveChallengesDone, onGetActiveChallengesDone), (0, _defineProperty3.default)(_handleActions, a.getSubtrackChallengesInit, onGetSubtrackChallengesInit), (0, _defineProperty3.default)(_handleActions, a.getSubtrackChallengesDone, onGetSubtrackChallengesDone), (0, _defineProperty3.default)(_handleActions, a.getUserSrmInit, onGetUserSRMInit), (0, _defineProperty3.default)(_handleActions, a.getUserSrmDone, onGetUserSRMDone), (0, _defineProperty3.default)(_handleActions, a.getUserMarathonInit, onGetUserMarathonInit), (0, _defineProperty3.default)(_handleActions, a.getUserMarathonDone, onGetUserMarathonDone), _handleActions), initialState);\n}\n\n/**\n * Factory which creates a new reducer with its initial state tailored to the\n * given options object, if specified (for server-side rendering). If options\n * object is not specified, it creates just the default reducer. Accepted options are:\n * @return {Promise}\n * @resolves {Function(state, action): state} New reducer.\n */\nfunction factory() {\n return _promise2.default.resolve(create());\n}\n\n/**\n * @static\n * @member default\n * @desc Reducer with default initial state.\n */\n\nvar _default = create();\n\nexports.default = _default;\n;\n\n(function () {\n var reactHotLoader = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").default;\n\n var leaveModule = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").leaveModule;\n\n if (!reactHotLoader) {\n return;\n }\n\n reactHotLoader.register(onDrop, 'onDrop', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onDropAll, 'onDropAll', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetAchievementsInit, 'onGetAchievementsInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetAchievementsDone, 'onGetAchievementsDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetFinancesInit, 'onGetFinancesInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetFinancesDone, 'onGetFinancesDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetStatsInit, 'onGetStatsInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetStatsDone, 'onGetStatsDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetStatsHistoryInit, 'onGetStatsHistoryInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetStatsHistoryDone, 'onGetStatsHistoryDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetStatsDistributionInit, 'onGetStatsDistributionInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetStatsDistributionDone, 'onGetStatsDistributionDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetActiveChallengesInit, 'onGetActiveChallengesInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetActiveChallengesDone, 'onGetActiveChallengesDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetSubtrackChallengesInit, 'onGetSubtrackChallengesInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetSubtrackChallengesDone, 'onGetSubtrackChallengesDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetUserSRMInit, 'onGetUserSRMInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetUserSRMDone, 'onGetUserSRMDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetUserMarathonInit, 'onGetUserMarathonInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetUserMarathonDone, 'onGetUserMarathonDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(create, 'create', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(factory, 'factory', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(_default, 'default', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n leaveModule(module);\n})();\n\n;\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node_modules/webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n//# sourceURL=webpack://topcoder-react-lib/./src/reducers/members.js?");
+eval("/* WEBPACK VAR INJECTION */(function(module) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _promise = __webpack_require__(/*! babel-runtime/core-js/promise */ \"babel-runtime/core-js/promise\");\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _toConsumableArray2 = __webpack_require__(/*! babel-runtime/helpers/toConsumableArray */ \"babel-runtime/helpers/toConsumableArray\");\n\nvar _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);\n\nvar _defineProperty2 = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ \"babel-runtime/helpers/defineProperty\");\n\nvar _defineProperty3 = _interopRequireDefault(_defineProperty2);\n\nvar _extends20 = __webpack_require__(/*! babel-runtime/helpers/extends */ \"babel-runtime/helpers/extends\");\n\nvar _extends21 = _interopRequireDefault(_extends20);\n\nexports.factory = factory;\n\nvar _lodash = __webpack_require__(/*! lodash */ \"lodash\");\n\nvar _lodash2 = _interopRequireDefault(_lodash);\n\nvar _reduxActions = __webpack_require__(/*! redux-actions */ \"redux-actions\");\n\nvar _logger = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\n\nvar _logger2 = _interopRequireDefault(_logger);\n\nvar _members = __webpack_require__(/*! ../actions/members */ \"./src/actions/members.js\");\n\nvar _members2 = _interopRequireDefault(_members);\n\nvar _errors = __webpack_require__(/*! ../utils/errors */ \"./src/utils/errors.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n(function () {\n var enterModule = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").enterModule;\n\n enterModule && enterModule(module);\n})(); /**\n * @module \"reducers.members\"\n * @desc Reducer for the Redux store segment that holds members data.\n * @todo Document state segment structure.\n */\n\n/**\n * Drops information about a member.\n * @param {Object} state\n * @param {Object} action\n * @return {Object} New state.\n */\nfunction onDrop(state, _ref) {\n var payload = _ref.payload;\n\n if (!state[payload]) return state;\n return _lodash2.default.omit(state, payload);\n}\n\n/**\n * Drops all loaded information on members.\n * @return {Object} New state.\n */\nfunction onDropAll() {\n return {};\n}\n\n/**\n * Inits the loading of member achievements.\n * @param {Object} state\n * @param {String} action.handle\n * @param {String} action.uuid\n * @return {Object} New state.\n */\nfunction onGetAchievementsInit(state, action) {\n var _action$payload = action.payload,\n handle = _action$payload.handle,\n uuid = _action$payload.uuid;\n\n var res = state[handle];\n res = res ? _lodash2.default.clone(res) : {};\n res.achievements = { loadingUuid: uuid };\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, res));\n}\n\n/**\n * Finalizes the loading of member achievements.\n * @param {Object} state\n * @param {Object} error\n * @param {Array} payload.data\n * @param {String} payload.handle\n * @param {String} payload.uuid\n * @return {Object} New state.\n */\nfunction onGetAchievementsDone(state, _ref2) {\n var error = _ref2.error,\n payload = _ref2.payload;\n\n if (error) {\n _logger2.default.error('Failed to load member achievements', payload);\n (0, _errors.fireErrorMessage)('Failed to load member achievements');\n return state;\n }\n\n var data = payload.data,\n handle = payload.handle,\n uuid = payload.uuid;\n\n if (uuid !== _lodash2.default.get(state[handle], 'achievements.loadingUuid')) return state;\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, (0, _extends21.default)({}, state[handle], {\n achievements: { data: data, timestamp: Date.now() }\n })));\n}\n\n/**\n * Initializes the loading of member financial information.\n * @param {Object} state\n * @param {String} action.payload.handle\n * @param {String} action.payload.uuid\n * @return {Object} New state.\n */\nfunction onGetFinancesInit(state, action) {\n var _action$payload2 = action.payload,\n handle = _action$payload2.handle,\n uuid = _action$payload2.uuid;\n\n var envelop = (0, _extends21.default)({}, state[handle] || {}, {\n finances: {\n loadingUuid: uuid,\n timestamp: 0\n }\n });\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, envelop));\n}\n\n/**\n * Finalizes a pending loading of member financial information.\n * @param {Object} state\n * @param {Object} action\n * @return {Object} New state.\n */\nfunction onGetFinancesDone(state, _ref3) {\n var error = _ref3.error,\n payload = _ref3.payload;\n\n if (error) {\n _logger2.default.error('Failed to get user financial info', payload);\n (0, _errors.fireErrorMessage)('Failed to get user financial info', '');\n return state;\n }\n\n var data = payload.data,\n handle = payload.handle,\n uuid = payload.uuid;\n\n if (uuid !== _lodash2.default.get(state[handle], 'finances.loadingUuid')) return state;\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, (0, _extends21.default)({}, state[handle], {\n finances: {\n data: data,\n loadingUuid: '',\n timestamp: Date.now()\n }\n })));\n}\n\n/**\n * Inits the loading of member stats.\n * @param {Object} state\n * @param {Object} action\n * @return {Object} New state.\n */\nfunction onGetStatsInit(state, action) {\n var _action$payload3 = action.payload,\n handle = _action$payload3.handle,\n uuid = _action$payload3.uuid;\n\n var res = state[handle];\n res = res ? _lodash2.default.clone(res) : {};\n res.stats = { loadingUuid: uuid };\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, res));\n}\n\n/**\n * Finalizes the loading of member stats.\n * @param {Object} state\n * @param {Object} action\n * @return {Object} New state.\n */\nfunction onGetStatsDone(state, _ref4) {\n var error = _ref4.error,\n payload = _ref4.payload;\n\n if (error) {\n _logger2.default.error('Failed to get member stats', payload);\n (0, _errors.fireErrorMessage)('Failed to get member stats', '');\n return state;\n }\n\n var data = payload.data,\n handle = payload.handle,\n uuid = payload.uuid;\n\n if (uuid !== _lodash2.default.get(state[handle], 'stats.loadingUuid')) return state;\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, (0, _extends21.default)({}, state[handle], {\n stats: { data: data, timestamp: Date.now() }\n })));\n}\n\n/**\n * Inits the loading of member stats history.\n * @param {Object} state\n * @param {Object} action\n * @return {Object} New state.\n */\nfunction onGetStatsHistoryInit(state, action) {\n var _action$payload4 = action.payload,\n handle = _action$payload4.handle,\n uuid = _action$payload4.uuid;\n\n var res = state[handle];\n res = res ? _lodash2.default.clone(res) : {};\n res.statsHistory = { loadingUuid: uuid };\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, res));\n}\n\n/**\n * Finalizes the loading of member stats history.\n * @param {Object} state\n * @param {Object} action\n * @return {Object} New state.\n */\nfunction onGetStatsHistoryDone(state, _ref5) {\n var error = _ref5.error,\n payload = _ref5.payload;\n\n if (error) {\n _logger2.default.error('Failed to get member statsHistory', payload);\n (0, _errors.fireErrorMessage)('Failed to get member statsHistory', '');\n return state;\n }\n\n var data = payload.data,\n handle = payload.handle,\n uuid = payload.uuid;\n\n if (uuid !== _lodash2.default.get(state[handle], 'statsHistory.loadingUuid')) return state;\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, (0, _extends21.default)({}, state[handle], {\n statsHistory: { data: data, timestamp: Date.now() }\n })));\n}\n\n/**\n * Inits the loading of member stats distribution.\n * @param {Object} state\n * @param {Object} action\n * @return {Object} New state.\n */\nfunction onGetStatsDistributionInit(state, action) {\n var _action$payload5 = action.payload,\n handle = _action$payload5.handle,\n uuid = _action$payload5.uuid;\n\n var res = state[handle];\n res = res ? _lodash2.default.clone(res) : {};\n res.statsDistribution = { loadingUuid: uuid };\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, res));\n}\n\n/**\n * Finalizes the loading of member stats distribution.\n * @param {Object} state\n * @param {Object} action\n * @return {Object} New state.\n */\nfunction onGetStatsDistributionDone(state, _ref6) {\n var error = _ref6.error,\n payload = _ref6.payload;\n\n if (error) {\n _logger2.default.error('Failed to get member statsDistribution', payload);\n (0, _errors.fireErrorMessage)('Failed to get member statsDistribution', '');\n return state;\n }\n\n var data = payload.data,\n handle = payload.handle,\n uuid = payload.uuid;\n\n if (uuid !== _lodash2.default.get(state[handle], 'statsDistribution.loadingUuid')) return state;\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, (0, _extends21.default)({}, state[handle], {\n statsDistribution: { data: data, timestamp: Date.now() }\n })));\n}\n\n/**\n * Inits the loading of member active challenges.\n * @param {Object} state\n * @param {Object} action\n * @return {Object} New state.\n */\nfunction onGetActiveChallengesInit(state, action) {\n var handle = action.payload.handle;\n\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, (0, _extends21.default)({}, state[handle], { activeChallengesCount: null })));\n}\n\n/**\n * Finalizes the loading of member active challenges.\n * @param {Object} state\n * @param {Object} action\n * @return {Object} New state.\n */\nfunction onGetActiveChallengesDone(state, _ref7) {\n var error = _ref7.error,\n payload = _ref7.payload;\n\n if (error) {\n _logger2.default.error('Failed to get member active challenges', payload);\n (0, _errors.fireErrorMessage)('Failed to get member active challenges', '');\n return state;\n }\n\n var handle = payload.handle,\n challenges = payload.challenges;\n\n\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, (0, _extends21.default)({}, state[handle], {\n activeChallengesCount: challenges.length\n })));\n}\n\n/**\n * Inits the loading of member subtrack challenges.\n * @param {Object} state\n * @param {Object} action\n * @return {Object} New state.\n */\nfunction onGetSubtrackChallengesInit(state, _ref8) {\n var payload = _ref8.payload;\n var handle = payload.handle,\n uuid = payload.uuid;\n\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, (0, _extends21.default)({}, state[handle], { loadingSubTrackChallengesUUID: uuid })));\n}\n\n/**\n * Finalizes the loading of member subtrack challenges.\n * @param {Object} state\n * @param {Object} action\n * @return {Object} New state.\n */\nfunction onGetSubtrackChallengesDone(state, _ref9) {\n var error = _ref9.error,\n payload = _ref9.payload;\n\n if (error) {\n _logger2.default.error('Failed to get member subtrack challenges', payload);\n (0, _errors.fireErrorMessage)('Failed to get member subtrack challenges', '');\n return state;\n }\n\n var uuid = payload.uuid,\n challenges = payload.challenges,\n refresh = payload.refresh,\n handle = payload.handle;\n\n if (uuid !== state[handle].loadingSubTrackChallengesUUID) return state;\n\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, (0, _extends21.default)({}, state[handle], {\n subtrackChallenges: state[handle].subtrackChallenges && !refresh ? [].concat((0, _toConsumableArray3.default)(state[handle].subtrackChallenges), (0, _toConsumableArray3.default)(challenges)) : challenges,\n // if current query returns 0 item, mark it completed\n subtrackChallengesHasMore: challenges && challenges.length > 0,\n loadingSubTrackChallengesUUID: ''\n })));\n}\n\n/**\n * Inits the loading of member SRMs.\n * @param {Object} state\n * @param {Object} action\n * @return {Object} New state.\n */\nfunction onGetUserSRMInit(state, _ref10) {\n var payload = _ref10.payload;\n var handle = payload.handle,\n uuid = payload.uuid;\n\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, (0, _extends21.default)({}, state[handle], { loadingSRMUUID: uuid })));\n}\n\n/**\n * Finalizes the loading of member SRMs.\n * @param {Object} state\n * @param {Object} action\n * @return {Object} New state.\n */\nfunction onGetUserSRMDone(state, _ref11) {\n var error = _ref11.error,\n payload = _ref11.payload;\n\n if (error) {\n _logger2.default.error('Failed to get member SRMs', payload);\n (0, _errors.fireErrorMessage)('Failed to get member SRMs', '');\n return state;\n }\n\n var uuid = payload.uuid,\n srms = payload.srms,\n refresh = payload.refresh,\n handle = payload.handle;\n\n if (uuid !== state[handle].loadingSRMUUID) return state;\n\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, (0, _extends21.default)({}, state[handle], {\n userSRMs: state[handle].userSRMs && !refresh ? [].concat((0, _toConsumableArray3.default)(state[handle].userSRMs), (0, _toConsumableArray3.default)(srms)) : srms,\n userSRMHasMore: srms && srms.length > 0, // if current query returns 0 item, mark it completed\n loadingSRMUUID: ''\n })));\n}\n\n/**\n * Inits the loading of member marathons.\n * @param {Object} state\n * @param {Object} action\n * @return {Object} New state.\n */\nfunction onGetUserMarathonInit(state, _ref12) {\n var payload = _ref12.payload;\n var handle = payload.handle,\n uuid = payload.uuid;\n\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, (0, _extends21.default)({}, state[handle], { loadingMarathonUUID: uuid })));\n}\n\n/**\n * Finalizes the loading of member marathons.\n * @param {Object} state\n * @param {Object} action\n * @return {Object} New state.\n */\nfunction onGetUserMarathonDone(state, _ref13) {\n var error = _ref13.error,\n payload = _ref13.payload;\n\n if (error) {\n _logger2.default.error('Failed to get member marathons', payload);\n (0, _errors.fireErrorMessage)('Failed to get member marathons', '');\n return state;\n }\n\n var uuid = payload.uuid,\n marathons = payload.marathons,\n refresh = payload.refresh,\n handle = payload.handle;\n\n if (uuid !== state[handle].loadingMarathonUUID) return state;\n\n return (0, _extends21.default)({}, state, (0, _defineProperty3.default)({}, handle, (0, _extends21.default)({}, state[handle], {\n userMarathons: state[handle].userMarathons && !refresh ? [].concat((0, _toConsumableArray3.default)(state[handle].userMarathons), (0, _toConsumableArray3.default)(marathons.challenges)) : marathons.challenges,\n // if current query returns 0 item, mark it completed\n userMarathonHasMore: marathons && marathons.challenges && marathons.challenges.length > 0,\n loadingMarathonUUID: ''\n })));\n}\n\n/**\n * Creates a new Members reducer with the specified initial state.\n * @param {Object} initialState Optional. Initial state.\n * @return {Function} Members reducer.\n */\nfunction create() {\n var _handleActions;\n\n var initialState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var a = _members2.default.members;\n return (0, _reduxActions.handleActions)((_handleActions = {}, (0, _defineProperty3.default)(_handleActions, a.drop, onDrop), (0, _defineProperty3.default)(_handleActions, a.dropAll, onDropAll), (0, _defineProperty3.default)(_handleActions, a.getAchievementsInit, onGetAchievementsInit), (0, _defineProperty3.default)(_handleActions, a.getAchievementsDone, onGetAchievementsDone), (0, _defineProperty3.default)(_handleActions, a.getAchievementsV3Done, onGetAchievementsDone), (0, _defineProperty3.default)(_handleActions, a.getFinancesInit, onGetFinancesInit), (0, _defineProperty3.default)(_handleActions, a.getFinancesDone, onGetFinancesDone), (0, _defineProperty3.default)(_handleActions, a.getStatsInit, onGetStatsInit), (0, _defineProperty3.default)(_handleActions, a.getStatsDone, onGetStatsDone), (0, _defineProperty3.default)(_handleActions, a.getStatsHistoryInit, onGetStatsHistoryInit), (0, _defineProperty3.default)(_handleActions, a.getStatsHistoryDone, onGetStatsHistoryDone), (0, _defineProperty3.default)(_handleActions, a.getStatsDistributionInit, onGetStatsDistributionInit), (0, _defineProperty3.default)(_handleActions, a.getStatsDistributionDone, onGetStatsDistributionDone), (0, _defineProperty3.default)(_handleActions, a.getActiveChallengesInit, onGetActiveChallengesInit), (0, _defineProperty3.default)(_handleActions, a.getActiveChallengesDone, onGetActiveChallengesDone), (0, _defineProperty3.default)(_handleActions, a.getSubtrackChallengesInit, onGetSubtrackChallengesInit), (0, _defineProperty3.default)(_handleActions, a.getSubtrackChallengesDone, onGetSubtrackChallengesDone), (0, _defineProperty3.default)(_handleActions, a.getUserSrmInit, onGetUserSRMInit), (0, _defineProperty3.default)(_handleActions, a.getUserSrmDone, onGetUserSRMDone), (0, _defineProperty3.default)(_handleActions, a.getUserMarathonInit, onGetUserMarathonInit), (0, _defineProperty3.default)(_handleActions, a.getUserMarathonDone, onGetUserMarathonDone), _handleActions), initialState);\n}\n\n/**\n * Factory which creates a new reducer with its initial state tailored to the\n * given options object, if specified (for server-side rendering). If options\n * object is not specified, it creates just the default reducer. Accepted options are:\n * @return {Promise}\n * @resolves {Function(state, action): state} New reducer.\n */\nfunction factory() {\n return _promise2.default.resolve(create());\n}\n\n/**\n * @static\n * @member default\n * @desc Reducer with default initial state.\n */\n\nvar _default = create();\n\nexports.default = _default;\n;\n\n(function () {\n var reactHotLoader = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").default;\n\n var leaveModule = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").leaveModule;\n\n if (!reactHotLoader) {\n return;\n }\n\n reactHotLoader.register(onDrop, 'onDrop', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onDropAll, 'onDropAll', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetAchievementsInit, 'onGetAchievementsInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetAchievementsDone, 'onGetAchievementsDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetFinancesInit, 'onGetFinancesInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetFinancesDone, 'onGetFinancesDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetStatsInit, 'onGetStatsInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetStatsDone, 'onGetStatsDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetStatsHistoryInit, 'onGetStatsHistoryInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetStatsHistoryDone, 'onGetStatsHistoryDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetStatsDistributionInit, 'onGetStatsDistributionInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetStatsDistributionDone, 'onGetStatsDistributionDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetActiveChallengesInit, 'onGetActiveChallengesInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetActiveChallengesDone, 'onGetActiveChallengesDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetSubtrackChallengesInit, 'onGetSubtrackChallengesInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetSubtrackChallengesDone, 'onGetSubtrackChallengesDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetUserSRMInit, 'onGetUserSRMInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetUserSRMDone, 'onGetUserSRMDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetUserMarathonInit, 'onGetUserMarathonInit', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(onGetUserMarathonDone, 'onGetUserMarathonDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(create, 'create', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(factory, 'factory', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n reactHotLoader.register(_default, 'default', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/members.js');\n leaveModule(module);\n})();\n\n;\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node_modules/webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n//# sourceURL=webpack://topcoder-react-lib/./src/reducers/members.js?");
/***/ }),
@@ -748,7 +748,7 @@ eval("/* WEBPACK VAR INJECTION */(function(module) {\n\nObject.defineProperty(ex
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-eval("/* WEBPACK VAR INJECTION */(function(module) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _promise = __webpack_require__(/*! babel-runtime/core-js/promise */ \"babel-runtime/core-js/promise\");\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _defineProperty2 = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ \"babel-runtime/helpers/defineProperty\");\n\nvar _defineProperty3 = _interopRequireDefault(_defineProperty2);\n\nvar _toConsumableArray2 = __webpack_require__(/*! babel-runtime/helpers/toConsumableArray */ \"babel-runtime/helpers/toConsumableArray\");\n\nvar _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);\n\nvar _extends2 = __webpack_require__(/*! babel-runtime/helpers/extends */ \"babel-runtime/helpers/extends\");\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nexports.factory = factory;\n\nvar _lodash = __webpack_require__(/*! lodash */ \"lodash\");\n\nvar _lodash2 = _interopRequireDefault(_lodash);\n\nvar _reduxActions = __webpack_require__(/*! redux-actions */ \"redux-actions\");\n\nvar _profile = __webpack_require__(/*! ../actions/profile */ \"./src/actions/profile.js\");\n\nvar _profile2 = _interopRequireDefault(_profile);\n\nvar _logger = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\n\nvar _logger2 = _interopRequireDefault(_logger);\n\nvar _errors = __webpack_require__(/*! ../utils/errors */ \"./src/utils/errors.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n(function () {\n var enterModule = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").enterModule;\n\n enterModule && enterModule(module);\n})(); /**\n * @module \"reducers.profile\"\n * @desc Reducer for Profile API data\n * @todo Document reducer state structure.\n */\n\n\n/**\n * Handles PROFILE/GET_ACHIEVEMENTS_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onGetAchievementsDone(state, _ref) {\n var payload = _ref.payload,\n error = _ref.error;\n\n if (error) {\n return (0, _extends3.default)({}, state, { loadingError: true });\n }\n\n return (0, _extends3.default)({}, state, {\n achievements: payload.Achievements,\n copilot: payload.copilot,\n country: payload.country,\n loadingError: false\n });\n}\n\n/**\n * Handles PROFILE/GET_EXTERNAL_ACCOUNTS_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onGetExternalAccountsDone(state, _ref2) {\n var payload = _ref2.payload,\n error = _ref2.error;\n\n if (error) {\n return (0, _extends3.default)({}, state, { loadingError: true });\n }\n\n return (0, _extends3.default)({}, state, {\n externalAccounts: payload\n });\n}\n\n/**\n * Handles PROFILE/GET_EXTERNAL_LINKS_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onGetExternalLinksDone(state, _ref3) {\n var payload = _ref3.payload,\n error = _ref3.error;\n\n if (error) {\n return (0, _extends3.default)({}, state, { loadingError: true });\n }\n\n return (0, _extends3.default)({}, state, {\n externalLinks: payload\n });\n}\n\n/**\n * Handles PROFILE/GET_INFO_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onGetInfoDone(state, _ref4) {\n var payload = _ref4.payload,\n error = _ref4.error;\n\n if (error) {\n return (0, _extends3.default)({}, state, { loadingError: true });\n }\n\n return (0, _extends3.default)({}, state, { info: payload, loadingError: false });\n}\n\n/**\n * Handles PROFILE/GET_SKILLS_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onGetSkillsDone(state, _ref5) {\n var payload = _ref5.payload,\n error = _ref5.error;\n\n if (error) {\n return (0, _extends3.default)({}, state, { loadingError: true });\n }\n\n return (0, _extends3.default)({}, state, { skills: payload.skills, loadingError: false });\n}\n\n/**\n * Handles PROFILE/GET_STATS_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onGetStatsDone(state, _ref6) {\n var payload = _ref6.payload,\n error = _ref6.error;\n\n if (error) {\n return (0, _extends3.default)({}, state, { loadingError: true });\n }\n\n return (0, _extends3.default)({}, state, { stats: payload, loadingError: false });\n}\n\n/**\n * Handles PROFILE/GET_LINKED_ACCOUNTS_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onGetLinkedAccountsDone(state, _ref7) {\n var payload = _ref7.payload,\n error = _ref7.error;\n\n if (error) {\n return (0, _extends3.default)({}, state, { loadingError: true });\n }\n\n return (0, _extends3.default)({}, state, { linkedAccounts: payload.profiles, loadingError: false });\n}\n\n/**\n * Handles PROFILE/GET_CREDENTIAL_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onGetCredentialDone(state, _ref8) {\n var payload = _ref8.payload,\n error = _ref8.error;\n\n if (error) {\n return (0, _extends3.default)({}, state, { loadingError: true });\n }\n\n return (0, _extends3.default)({}, state, { credential: payload.credential, loadingError: false });\n}\n\n/**\n * Handles PROFILE/GET_EMAIL_PREFERENCES_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onGetEmailPreferencesDone(state, _ref9) {\n var payload = _ref9.payload,\n error = _ref9.error;\n\n if (error) {\n return (0, _extends3.default)({}, state, { loadingError: true });\n }\n\n return (0, _extends3.default)({}, state, { emailPreferences: payload.subscriptions, loadingError: false });\n}\n\n/**\n * Handles PROFILE/UPLOAD_PHOTO_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onUploadPhotoDone(state, _ref10) {\n var payload = _ref10.payload,\n error = _ref10.error;\n\n var newState = (0, _extends3.default)({}, state, { uploadingPhoto: false });\n\n if (error) {\n _logger2.default.error('Failed to upload user photo', payload);\n (0, _errors.fireErrorMessage)('ERROR: Failed to upload photo!');\n return newState;\n }\n\n if (!newState.info || newState.info.handle !== payload.handle) {\n return newState;\n }\n\n return (0, _extends3.default)({}, newState, {\n info: (0, _extends3.default)({}, newState.info, {\n photoURL: payload.photoURL\n })\n });\n}\n\n/**\n * Handles PROFILE/DELETE_PHOTO_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onDeletePhotoDone(state, _ref11) {\n var payload = _ref11.payload,\n error = _ref11.error;\n\n var newState = (0, _extends3.default)({}, state, { deletingPhoto: false });\n\n if (error) {\n _logger2.default.error('Failed to delete user photo', payload);\n (0, _errors.fireErrorMessage)('ERROR: Failed to delete photo!');\n return newState;\n }\n\n if (!newState.info || newState.info.handle !== payload.handle) {\n return newState;\n }\n\n return (0, _extends3.default)({}, newState, {\n info: (0, _extends3.default)({}, newState.info, {\n photoURL: null\n })\n });\n}\n\n/**\n * Handles PROFILE/UPDATE_PROFILE_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onUpdateProfileDone(state, _ref12) {\n var payload = _ref12.payload,\n error = _ref12.error;\n\n var newState = (0, _extends3.default)({}, state, { updatingProfile: false });\n\n if (payload.isEmailConflict) {\n return (0, _extends3.default)({}, newState, {\n isEmailConflict: true,\n updateProfileSuccess: false\n });\n }\n\n if (error) {\n _logger2.default.error('Failed to update user profile', payload);\n (0, _errors.fireErrorMessage)('ERROR: Failed to update user profile!');\n return (0, _extends3.default)({}, newState, {\n updateProfileSuccess: false\n });\n }\n\n if (!newState.info || newState.info.handle !== payload.handle) {\n return (0, _extends3.default)({}, newState, {\n updateProfileSuccess: true\n });\n }\n\n return (0, _extends3.default)({}, newState, {\n info: (0, _extends3.default)({}, newState.info, payload),\n updateProfileSuccess: true\n });\n}\n\n/**\n * Handles PROFILE/ADD_SKILL_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onAddSkillDone(state, _ref13) {\n var payload = _ref13.payload,\n error = _ref13.error;\n\n var newState = (0, _extends3.default)({}, state, { addingSkill: false });\n\n if (error) {\n _logger2.default.error('Failed to add user skill', payload);\n (0, _errors.fireErrorMessage)('ERROR: Failed to add user skill!');\n return newState;\n }\n\n if (newState.profileForHandle !== payload.handle) {\n return newState;\n }\n\n return (0, _extends3.default)({}, newState, {\n skills: payload.skills\n });\n}\n\n/**\n * Handles PROFILE/HIDE_SKILL_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onHideSkillDone(state, _ref14) {\n var payload = _ref14.payload,\n error = _ref14.error;\n\n var newState = (0, _extends3.default)({}, state, { hidingSkill: false });\n\n if (error) {\n _logger2.default.error('Failed to remove user skill', payload);\n (0, _errors.fireErrorMessage)('ERROR: Failed to remove user skill!');\n return newState;\n }\n\n if (newState.profileForHandle !== payload.handle) {\n return newState;\n }\n\n return (0, _extends3.default)({}, newState, {\n skills: payload.skills\n });\n}\n\n/**\n * Handles PROFILE/ADD_WEB_LINK_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onAddWebLinkDone(state, _ref15) {\n var payload = _ref15.payload,\n error = _ref15.error;\n\n var newState = (0, _extends3.default)({}, state, { addingWebLink: false });\n\n if (error) {\n _logger2.default.error('Failed to add web link', payload);\n (0, _errors.fireErrorMessage)('ERROR: Failed to add web link!');\n return newState;\n }\n\n if (newState.profileForHandle !== payload.handle || !payload.data) {\n return newState;\n }\n\n return (0, _extends3.default)({}, newState, {\n externalLinks: [].concat((0, _toConsumableArray3.default)(newState.externalLinks), [payload.data])\n });\n}\n\n/**\n * Handles PROFILE/DELETE_WEB_LINK_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onDeleteWebLinkDone(state, _ref16) {\n var payload = _ref16.payload,\n error = _ref16.error;\n\n var newState = (0, _extends3.default)({}, state, { deletingWebLink: false });\n\n if (error) {\n _logger2.default.error('Failed to delete web link', payload);\n (0, _errors.fireErrorMessage)('ERROR: Failed to delete web link!');\n return newState;\n }\n\n if (newState.profileForHandle !== payload.handle || !payload.data) {\n return newState;\n }\n\n return (0, _extends3.default)({}, newState, {\n externalLinks: _lodash2.default.filter(newState.externalLinks, function (el) {\n return el.key !== payload.data.key;\n })\n });\n}\n\n/**\n * Handles PROFILE/LINK_EXTERNAL_ACCOUNT_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onLinkExternalAccountDone(state, _ref17) {\n var payload = _ref17.payload,\n error = _ref17.error;\n\n var newState = (0, _extends3.default)({}, state, { linkingExternalAccount: false });\n\n if (error) {\n _logger2.default.error('Failed to link external account', payload);\n (0, _errors.fireErrorMessage)('ERROR: Failed to link external account!');\n return newState;\n }\n\n if (newState.profileForHandle !== payload.handle || !payload.data) {\n return newState;\n }\n\n return (0, _extends3.default)({}, newState, {\n linkedAccounts: [].concat((0, _toConsumableArray3.default)(newState.linkedAccounts), [payload.data])\n });\n}\n\n/**\n * Handles PROFILE/UNLINK_EXTERNAL_ACCOUNT_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onUnlinkExternalAccountDone(state, _ref18) {\n var payload = _ref18.payload,\n error = _ref18.error;\n\n var newState = (0, _extends3.default)({}, state, { unlinkingExternalAccount: false });\n\n if (error) {\n _logger2.default.error('Failed to unlink external account', payload);\n (0, _errors.fireErrorMessage)('ERROR: Failed to unlink external account!');\n return newState;\n }\n\n if (newState.profileForHandle !== payload.handle) {\n return newState;\n }\n\n return (0, _extends3.default)({}, newState, {\n linkedAccounts: _lodash2.default.filter(newState.linkedAccounts, function (el) {\n return el.providerType !== payload.providerType;\n })\n });\n}\n\n/**\n * Handles PROFILE/SAVE_EMAIL_PREFERENCES_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onSaveEmailPreferencesDone(state, _ref19) {\n var payload = _ref19.payload,\n error = _ref19.error;\n\n var newState = (0, _extends3.default)({}, state, { savingEmailPreferences: false });\n\n if (error) {\n _logger2.default.error('Failed to save email preferences', payload);\n (0, _errors.fireErrorMessage)('ERROR: Failed to save email preferences!');\n return newState;\n }\n\n if (newState.profileForHandle !== payload.handle || !payload.data) {\n return newState;\n }\n\n return (0, _extends3.default)({}, newState, {\n emailPreferences: payload.data.subscriptions\n });\n}\n\n/**\n * Handles PROFILE/UPDATE_PASSWORD_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onUpdatePasswordDone(state, _ref20) {\n var payload = _ref20.payload,\n error = _ref20.error;\n\n var newState = (0, _extends3.default)({}, state, { updatingPassword: false });\n\n if (error) {\n _logger2.default.error('Failed to update password', payload);\n (0, _errors.fireErrorMessage)('The old password is invalid');\n }\n return newState;\n}\n\n/**\n * Handles PROFILE/VERIFY_MEMBER_NEW_EMAIL_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onVerifyMemberNewEmailDone(state, _ref21) {\n var payload = _ref21.payload,\n error = _ref21.error;\n\n var newState = (0, _extends3.default)({}, state, { verifyingEmail: false });\n\n if (error) {\n _logger2.default.error('Failed to verify member new email', payload);\n return (0, _extends3.default)({}, newState, {\n verifyError: true\n });\n }\n\n return (0, _extends3.default)({}, newState, {\n verifyError: false\n });\n}\n\n/**\n * Handles UPDATE_EMAIL_CONFLICT action\n * @param {Object} state\n * @param {Object} action Payload will be a boolean value\n * @return {Object} New state\n */\nfunction onUpdateEmailConflict(state, _ref22) {\n var payload = _ref22.payload;\n\n return (0, _extends3.default)({}, state, {\n isEmailConflict: payload\n });\n}\n\n/**\n * Creates a new Profile reducer with the specified initial state.\n * @param {Object} initialState Optional. Initial state.\n * @return {Function} Profile reducer.\n */\nfunction create(initialState) {\n var _handleActions;\n\n var a = _profile2.default.profile;\n return (0, _reduxActions.handleActions)((_handleActions = {}, (0, _defineProperty3.default)(_handleActions, a.clearProfile, function (state) {\n return (0, _extends3.default)({}, state, { achievements: null, country: '', info: null, skills: null, stats: null\n });\n }), (0, _defineProperty3.default)(_handleActions, a.loadProfile, function (state, action) {\n return (0, _extends3.default)({}, state, { profileForHandle: action.payload });\n }), (0, _defineProperty3.default)(_handleActions, a.getAchievementsInit, function (state) {\n return state;\n }), (0, _defineProperty3.default)(_handleActions, a.getAchievementsDone, onGetAchievementsDone), (0, _defineProperty3.default)(_handleActions, a.getExternalAccountsInit, function (state) {\n return state;\n }), (0, _defineProperty3.default)(_handleActions, a.getExternalAccountsDone, onGetExternalAccountsDone), (0, _defineProperty3.default)(_handleActions, a.getExternalLinksInit, function (state) {\n return state;\n }), (0, _defineProperty3.default)(_handleActions, a.getExternalLinksDone, onGetExternalLinksDone), (0, _defineProperty3.default)(_handleActions, a.getInfoInit, function (state) {\n return state;\n }), (0, _defineProperty3.default)(_handleActions, a.getInfoDone, onGetInfoDone), (0, _defineProperty3.default)(_handleActions, a.getSkillsInit, function (state) {\n return state;\n }), (0, _defineProperty3.default)(_handleActions, a.getSkillsDone, onGetSkillsDone), (0, _defineProperty3.default)(_handleActions, a.getStatsInit, function (state) {\n return state;\n }), (0, _defineProperty3.default)(_handleActions, a.getStatsDone, onGetStatsDone), (0, _defineProperty3.default)(_handleActions, a.getLinkedAccountsInit, function (state) {\n return state;\n }), (0, _defineProperty3.default)(_handleActions, a.getLinkedAccountsDone, onGetLinkedAccountsDone), (0, _defineProperty3.default)(_handleActions, a.uploadPhotoInit, function (state) {\n return (0, _extends3.default)({}, state, { uploadingPhoto: true });\n }), (0, _defineProperty3.default)(_handleActions, a.uploadPhotoDone, onUploadPhotoDone), (0, _defineProperty3.default)(_handleActions, a.deletePhotoInit, function (state) {\n return (0, _extends3.default)({}, state, { deletingPhoto: true });\n }), (0, _defineProperty3.default)(_handleActions, a.deletePhotoDone, onDeletePhotoDone), (0, _defineProperty3.default)(_handleActions, a.updateProfileInit, function (state) {\n return (0, _extends3.default)({}, state, { updatingProfile: true });\n }), (0, _defineProperty3.default)(_handleActions, a.updateProfileDone, onUpdateProfileDone), (0, _defineProperty3.default)(_handleActions, a.addSkillInit, function (state) {\n return (0, _extends3.default)({}, state, { addingSkill: true });\n }), (0, _defineProperty3.default)(_handleActions, a.addSkillDone, onAddSkillDone), (0, _defineProperty3.default)(_handleActions, a.hideSkillInit, function (state) {\n return (0, _extends3.default)({}, state, { hidingSkill: true });\n }), (0, _defineProperty3.default)(_handleActions, a.hideSkillDone, onHideSkillDone), (0, _defineProperty3.default)(_handleActions, a.addWebLinkInit, function (state) {\n return (0, _extends3.default)({}, state, { addingWebLink: true });\n }), (0, _defineProperty3.default)(_handleActions, a.addWebLinkDone, onAddWebLinkDone), (0, _defineProperty3.default)(_handleActions, a.deleteWebLinkInit, function (state) {\n return (0, _extends3.default)({}, state, { deletingWebLink: true });\n }), (0, _defineProperty3.default)(_handleActions, a.deleteWebLinkDone, onDeleteWebLinkDone), (0, _defineProperty3.default)(_handleActions, a.linkExternalAccountInit, function (state) {\n return (0, _extends3.default)({}, state, { linkingExternalAccount: true });\n }), (0, _defineProperty3.default)(_handleActions, a.linkExternalAccountDone, onLinkExternalAccountDone), (0, _defineProperty3.default)(_handleActions, a.unlinkExternalAccountInit, function (state) {\n return (0, _extends3.default)({}, state, { unlinkingExternalAccount: true });\n }), (0, _defineProperty3.default)(_handleActions, a.unlinkExternalAccountDone, onUnlinkExternalAccountDone), (0, _defineProperty3.default)(_handleActions, a.getCredentialInit, function (state) {\n return state;\n }), (0, _defineProperty3.default)(_handleActions, a.getCredentialDone, onGetCredentialDone), (0, _defineProperty3.default)(_handleActions, a.getEmailPreferencesInit, function (state) {\n return state;\n }), (0, _defineProperty3.default)(_handleActions, a.getEmailPreferencesDone, onGetEmailPreferencesDone), (0, _defineProperty3.default)(_handleActions, a.saveEmailPreferencesInit, function (state) {\n return (0, _extends3.default)({}, state, { savingEmailPreferences: true });\n }), (0, _defineProperty3.default)(_handleActions, a.saveEmailPreferencesDone, onSaveEmailPreferencesDone), (0, _defineProperty3.default)(_handleActions, a.updatePasswordInit, function (state) {\n return (0, _extends3.default)({}, state, { updatingPassword: true });\n }), (0, _defineProperty3.default)(_handleActions, a.updatePasswordDone, onUpdatePasswordDone), (0, _defineProperty3.default)(_handleActions, a.verifyMemberNewEmailInit, function (state) {\n return (0, _extends3.default)({}, state, { verifyingEmail: true });\n }), (0, _defineProperty3.default)(_handleActions, a.verifyMemberNewEmailDone, onVerifyMemberNewEmailDone), (0, _defineProperty3.default)(_handleActions, a.updateEmailConflict, onUpdateEmailConflict), _handleActions), _lodash2.default.defaults(initialState, {\n achievements: null,\n copilot: false,\n country: '',\n info: null,\n loadingError: false,\n skills: null,\n stats: null,\n verifyError: null,\n updateProfileSuccess: null\n }));\n}\n\n/**\n * Factory which creates a new reducer with its initial state tailored to the\n * given options object, if specified (for server-side rendering). If options\n * object is not specified, it creates just the default reducer. Accepted options are:\n * @returns {Promise}\n * @resolves {Function(state, action): state} New reducer.\n */\nfunction factory() {\n return _promise2.default.resolve(create());\n}\n\n/* Reducer with the default initial state. */\n\nvar _default = create();\n\nexports.default = _default;\n;\n\n(function () {\n var reactHotLoader = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").default;\n\n var leaveModule = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").leaveModule;\n\n if (!reactHotLoader) {\n return;\n }\n\n reactHotLoader.register(onGetAchievementsDone, 'onGetAchievementsDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onGetExternalAccountsDone, 'onGetExternalAccountsDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onGetExternalLinksDone, 'onGetExternalLinksDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onGetInfoDone, 'onGetInfoDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onGetSkillsDone, 'onGetSkillsDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onGetStatsDone, 'onGetStatsDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onGetLinkedAccountsDone, 'onGetLinkedAccountsDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onGetCredentialDone, 'onGetCredentialDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onGetEmailPreferencesDone, 'onGetEmailPreferencesDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onUploadPhotoDone, 'onUploadPhotoDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onDeletePhotoDone, 'onDeletePhotoDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onUpdateProfileDone, 'onUpdateProfileDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onAddSkillDone, 'onAddSkillDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onHideSkillDone, 'onHideSkillDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onAddWebLinkDone, 'onAddWebLinkDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onDeleteWebLinkDone, 'onDeleteWebLinkDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onLinkExternalAccountDone, 'onLinkExternalAccountDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onUnlinkExternalAccountDone, 'onUnlinkExternalAccountDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onSaveEmailPreferencesDone, 'onSaveEmailPreferencesDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onUpdatePasswordDone, 'onUpdatePasswordDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onVerifyMemberNewEmailDone, 'onVerifyMemberNewEmailDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onUpdateEmailConflict, 'onUpdateEmailConflict', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(create, 'create', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(factory, 'factory', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(_default, 'default', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n leaveModule(module);\n})();\n\n;\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node_modules/webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n//# sourceURL=webpack://topcoder-react-lib/./src/reducers/profile.js?");
+eval("/* WEBPACK VAR INJECTION */(function(module) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _promise = __webpack_require__(/*! babel-runtime/core-js/promise */ \"babel-runtime/core-js/promise\");\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _defineProperty2 = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ \"babel-runtime/helpers/defineProperty\");\n\nvar _defineProperty3 = _interopRequireDefault(_defineProperty2);\n\nvar _toConsumableArray2 = __webpack_require__(/*! babel-runtime/helpers/toConsumableArray */ \"babel-runtime/helpers/toConsumableArray\");\n\nvar _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);\n\nvar _extends2 = __webpack_require__(/*! babel-runtime/helpers/extends */ \"babel-runtime/helpers/extends\");\n\nvar _extends3 = _interopRequireDefault(_extends2);\n\nexports.factory = factory;\n\nvar _lodash = __webpack_require__(/*! lodash */ \"lodash\");\n\nvar _lodash2 = _interopRequireDefault(_lodash);\n\nvar _reduxActions = __webpack_require__(/*! redux-actions */ \"redux-actions\");\n\nvar _profile = __webpack_require__(/*! ../actions/profile */ \"./src/actions/profile.js\");\n\nvar _profile2 = _interopRequireDefault(_profile);\n\nvar _logger = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\n\nvar _logger2 = _interopRequireDefault(_logger);\n\nvar _errors = __webpack_require__(/*! ../utils/errors */ \"./src/utils/errors.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n(function () {\n var enterModule = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").enterModule;\n\n enterModule && enterModule(module);\n})(); /**\n * @module \"reducers.profile\"\n * @desc Reducer for Profile API data\n * @todo Document reducer state structure.\n */\n\n\n/**\n * Handles PROFILE/GET_ACHIEVEMENTS_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onGetAchievementsDone(state, _ref) {\n var payload = _ref.payload,\n error = _ref.error;\n\n if (error) {\n return (0, _extends3.default)({}, state, { loadingError: true });\n }\n\n return (0, _extends3.default)({}, state, {\n achievements: payload.Achievements,\n copilot: payload.copilot,\n country: payload.country,\n loadingError: false\n });\n}\n\n/**\n * Handles PROFILE/GET_ACHIEVEMENTS_V3_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onGetAchievementsV3Done(state, _ref2) {\n var payload = _ref2.payload,\n error = _ref2.error;\n\n if (error) {\n return (0, _extends3.default)({}, state, { loadingError: true });\n }\n\n return (0, _extends3.default)({}, state, {\n achievements: payload.achievements || [],\n copilot: payload.copilot,\n country: payload.country,\n loadingError: false\n });\n}\n\n/**\n * Handles PROFILE/GET_EXTERNAL_ACCOUNTS_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onGetExternalAccountsDone(state, _ref3) {\n var payload = _ref3.payload,\n error = _ref3.error;\n\n if (error) {\n return (0, _extends3.default)({}, state, { loadingError: true });\n }\n\n return (0, _extends3.default)({}, state, {\n externalAccounts: payload\n });\n}\n\n/**\n * Handles PROFILE/GET_EXTERNAL_LINKS_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onGetExternalLinksDone(state, _ref4) {\n var payload = _ref4.payload,\n error = _ref4.error;\n\n if (error) {\n return (0, _extends3.default)({}, state, { loadingError: true });\n }\n\n return (0, _extends3.default)({}, state, {\n externalLinks: payload\n });\n}\n\n/**\n * Handles PROFILE/GET_INFO_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onGetInfoDone(state, _ref5) {\n var payload = _ref5.payload,\n error = _ref5.error;\n\n if (error) {\n return (0, _extends3.default)({}, state, { loadingError: true });\n }\n\n return (0, _extends3.default)({}, state, { info: payload, loadingError: false });\n}\n\n/**\n * Handles PROFILE/GET_SKILLS_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onGetSkillsDone(state, _ref6) {\n var payload = _ref6.payload,\n error = _ref6.error;\n\n if (error) {\n return (0, _extends3.default)({}, state, { loadingError: true });\n }\n\n return (0, _extends3.default)({}, state, { skills: payload.skills, loadingError: false });\n}\n\n/**\n * Handles PROFILE/GET_STATS_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onGetStatsDone(state, _ref7) {\n var payload = _ref7.payload,\n error = _ref7.error;\n\n if (error) {\n return (0, _extends3.default)({}, state, { loadingError: true });\n }\n\n return (0, _extends3.default)({}, state, { stats: payload, loadingError: false });\n}\n\n/**\n * Handles PROFILE/GET_LINKED_ACCOUNTS_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onGetLinkedAccountsDone(state, _ref8) {\n var payload = _ref8.payload,\n error = _ref8.error;\n\n if (error) {\n return (0, _extends3.default)({}, state, { loadingError: true });\n }\n\n return (0, _extends3.default)({}, state, { linkedAccounts: payload.profiles, loadingError: false });\n}\n\n/**\n * Handles PROFILE/GET_CREDENTIAL_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onGetCredentialDone(state, _ref9) {\n var payload = _ref9.payload,\n error = _ref9.error;\n\n if (error) {\n return (0, _extends3.default)({}, state, { loadingError: true });\n }\n\n return (0, _extends3.default)({}, state, { credential: payload.credential, loadingError: false });\n}\n\n/**\n * Handles PROFILE/GET_EMAIL_PREFERENCES_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onGetEmailPreferencesDone(state, _ref10) {\n var payload = _ref10.payload,\n error = _ref10.error;\n\n if (error) {\n return (0, _extends3.default)({}, state, { loadingError: true });\n }\n\n return (0, _extends3.default)({}, state, { emailPreferences: payload.subscriptions, loadingError: false });\n}\n\n/**\n * Handles PROFILE/UPLOAD_PHOTO_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onUploadPhotoDone(state, _ref11) {\n var payload = _ref11.payload,\n error = _ref11.error;\n\n var newState = (0, _extends3.default)({}, state, { uploadingPhoto: false });\n\n if (error) {\n _logger2.default.error('Failed to upload user photo', payload);\n (0, _errors.fireErrorMessage)('ERROR: Failed to upload photo!');\n return newState;\n }\n\n if (!newState.info || newState.info.handle !== payload.handle) {\n return newState;\n }\n\n return (0, _extends3.default)({}, newState, {\n info: (0, _extends3.default)({}, newState.info, {\n photoURL: payload.photoURL\n })\n });\n}\n\n/**\n * Handles PROFILE/DELETE_PHOTO_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onDeletePhotoDone(state, _ref12) {\n var payload = _ref12.payload,\n error = _ref12.error;\n\n var newState = (0, _extends3.default)({}, state, { deletingPhoto: false });\n\n if (error) {\n _logger2.default.error('Failed to delete user photo', payload);\n (0, _errors.fireErrorMessage)('ERROR: Failed to delete photo!');\n return newState;\n }\n\n if (!newState.info || newState.info.handle !== payload.handle) {\n return newState;\n }\n\n return (0, _extends3.default)({}, newState, {\n info: (0, _extends3.default)({}, newState.info, {\n photoURL: null\n })\n });\n}\n\n/**\n * Handles PROFILE/UPDATE_PROFILE_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onUpdateProfileDone(state, _ref13) {\n var payload = _ref13.payload,\n error = _ref13.error;\n\n var newState = (0, _extends3.default)({}, state, { updatingProfile: false });\n\n if (payload.isEmailConflict) {\n return (0, _extends3.default)({}, newState, {\n isEmailConflict: true,\n updateProfileSuccess: false\n });\n }\n\n if (error) {\n _logger2.default.error('Failed to update user profile', payload);\n (0, _errors.fireErrorMessage)('ERROR: Failed to update user profile!');\n return (0, _extends3.default)({}, newState, {\n updateProfileSuccess: false\n });\n }\n\n if (!newState.info || newState.info.handle !== payload.handle) {\n return (0, _extends3.default)({}, newState, {\n updateProfileSuccess: true\n });\n }\n\n return (0, _extends3.default)({}, newState, {\n info: (0, _extends3.default)({}, newState.info, payload),\n updateProfileSuccess: true\n });\n}\n\n/**\n * Handles PROFILE/ADD_SKILL_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onAddSkillDone(state, _ref14) {\n var payload = _ref14.payload,\n error = _ref14.error;\n\n var newState = (0, _extends3.default)({}, state, { addingSkill: false });\n\n if (error) {\n _logger2.default.error('Failed to add user skill', payload);\n (0, _errors.fireErrorMessage)('ERROR: Failed to add user skill!');\n return newState;\n }\n\n if (newState.profileForHandle !== payload.handle) {\n return newState;\n }\n\n return (0, _extends3.default)({}, newState, {\n skills: payload.skills\n });\n}\n\n/**\n * Handles PROFILE/HIDE_SKILL_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onHideSkillDone(state, _ref15) {\n var payload = _ref15.payload,\n error = _ref15.error;\n\n var newState = (0, _extends3.default)({}, state, { hidingSkill: false });\n\n if (error) {\n _logger2.default.error('Failed to remove user skill', payload);\n (0, _errors.fireErrorMessage)('ERROR: Failed to remove user skill!');\n return newState;\n }\n\n if (newState.profileForHandle !== payload.handle) {\n return newState;\n }\n\n return (0, _extends3.default)({}, newState, {\n skills: payload.skills\n });\n}\n\n/**\n * Handles PROFILE/ADD_WEB_LINK_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onAddWebLinkDone(state, _ref16) {\n var payload = _ref16.payload,\n error = _ref16.error;\n\n var newState = (0, _extends3.default)({}, state, { addingWebLink: false });\n\n if (error) {\n _logger2.default.error('Failed to add web link', payload);\n (0, _errors.fireErrorMessage)('ERROR: Failed to add web link!');\n return newState;\n }\n\n if (newState.profileForHandle !== payload.handle || !payload.data) {\n return newState;\n }\n\n return (0, _extends3.default)({}, newState, {\n externalLinks: [].concat((0, _toConsumableArray3.default)(newState.externalLinks), [payload.data])\n });\n}\n\n/**\n * Handles PROFILE/DELETE_WEB_LINK_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onDeleteWebLinkDone(state, _ref17) {\n var payload = _ref17.payload,\n error = _ref17.error;\n\n var newState = (0, _extends3.default)({}, state, { deletingWebLink: false });\n\n if (error) {\n _logger2.default.error('Failed to delete web link', payload);\n (0, _errors.fireErrorMessage)('ERROR: Failed to delete web link!');\n return newState;\n }\n\n if (newState.profileForHandle !== payload.handle || !payload.data) {\n return newState;\n }\n\n return (0, _extends3.default)({}, newState, {\n externalLinks: _lodash2.default.filter(newState.externalLinks, function (el) {\n return el.key !== payload.data.key;\n })\n });\n}\n\n/**\n * Handles PROFILE/LINK_EXTERNAL_ACCOUNT_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onLinkExternalAccountDone(state, _ref18) {\n var payload = _ref18.payload,\n error = _ref18.error;\n\n var newState = (0, _extends3.default)({}, state, { linkingExternalAccount: false });\n\n if (error) {\n _logger2.default.error('Failed to link external account', payload);\n (0, _errors.fireErrorMessage)('ERROR: Failed to link external account!');\n return newState;\n }\n\n if (newState.profileForHandle !== payload.handle || !payload.data) {\n return newState;\n }\n\n return (0, _extends3.default)({}, newState, {\n linkedAccounts: [].concat((0, _toConsumableArray3.default)(newState.linkedAccounts), [payload.data])\n });\n}\n\n/**\n * Handles PROFILE/UNLINK_EXTERNAL_ACCOUNT_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onUnlinkExternalAccountDone(state, _ref19) {\n var payload = _ref19.payload,\n error = _ref19.error;\n\n var newState = (0, _extends3.default)({}, state, { unlinkingExternalAccount: false });\n\n if (error) {\n _logger2.default.error('Failed to unlink external account', payload);\n (0, _errors.fireErrorMessage)('ERROR: Failed to unlink external account!');\n return newState;\n }\n\n if (newState.profileForHandle !== payload.handle) {\n return newState;\n }\n\n return (0, _extends3.default)({}, newState, {\n linkedAccounts: _lodash2.default.filter(newState.linkedAccounts, function (el) {\n return el.providerType !== payload.providerType;\n })\n });\n}\n\n/**\n * Handles PROFILE/SAVE_EMAIL_PREFERENCES_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onSaveEmailPreferencesDone(state, _ref20) {\n var payload = _ref20.payload,\n error = _ref20.error;\n\n var newState = (0, _extends3.default)({}, state, { savingEmailPreferences: false });\n\n if (error) {\n _logger2.default.error('Failed to save email preferences', payload);\n (0, _errors.fireErrorMessage)('ERROR: Failed to save email preferences!');\n return newState;\n }\n\n if (newState.profileForHandle !== payload.handle || !payload.data) {\n return newState;\n }\n\n return (0, _extends3.default)({}, newState, {\n emailPreferences: payload.data.subscriptions\n });\n}\n\n/**\n * Handles PROFILE/UPDATE_PASSWORD_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onUpdatePasswordDone(state, _ref21) {\n var payload = _ref21.payload,\n error = _ref21.error;\n\n var newState = (0, _extends3.default)({}, state, { updatingPassword: false });\n\n if (error) {\n _logger2.default.error('Failed to update password', payload);\n (0, _errors.fireErrorMessage)('The old password is invalid');\n }\n return newState;\n}\n\n/**\n * Handles PROFILE/VERIFY_MEMBER_NEW_EMAIL_DONE action.\n * @param {Object} state\n * @param {Object} action Payload will be JSON from api call\n * @return {Object} New state\n */\nfunction onVerifyMemberNewEmailDone(state, _ref22) {\n var payload = _ref22.payload,\n error = _ref22.error;\n\n var newState = (0, _extends3.default)({}, state, { verifyingEmail: false });\n\n if (error) {\n _logger2.default.error('Failed to verify member new email', payload);\n return (0, _extends3.default)({}, newState, {\n verifyError: true\n });\n }\n\n return (0, _extends3.default)({}, newState, {\n verifyError: false,\n emailChangeResult: payload.data\n });\n}\n\n/**\n * Handles UPDATE_EMAIL_CONFLICT action\n * @param {Object} state\n * @param {Object} action Payload will be a boolean value\n * @return {Object} New state\n */\nfunction onUpdateEmailConflict(state, _ref23) {\n var payload = _ref23.payload;\n\n return (0, _extends3.default)({}, state, {\n isEmailConflict: payload\n });\n}\n\n/**\n * Creates a new Profile reducer with the specified initial state.\n * @param {Object} initialState Optional. Initial state.\n * @return {Function} Profile reducer.\n */\nfunction create(initialState) {\n var _handleActions;\n\n var a = _profile2.default.profile;\n return (0, _reduxActions.handleActions)((_handleActions = {}, (0, _defineProperty3.default)(_handleActions, a.clearProfile, function (state) {\n return (0, _extends3.default)({}, state, { achievements: null, country: '', info: null, skills: null, stats: null\n });\n }), (0, _defineProperty3.default)(_handleActions, a.loadProfile, function (state, action) {\n return (0, _extends3.default)({}, state, { profileForHandle: action.payload });\n }), (0, _defineProperty3.default)(_handleActions, a.getAchievementsInit, function (state) {\n return state;\n }), (0, _defineProperty3.default)(_handleActions, a.getAchievementsDone, onGetAchievementsDone), (0, _defineProperty3.default)(_handleActions, a.getAchievementsV3Done, onGetAchievementsV3Done), (0, _defineProperty3.default)(_handleActions, a.getExternalAccountsInit, function (state) {\n return state;\n }), (0, _defineProperty3.default)(_handleActions, a.getExternalAccountsDone, onGetExternalAccountsDone), (0, _defineProperty3.default)(_handleActions, a.getExternalLinksInit, function (state) {\n return state;\n }), (0, _defineProperty3.default)(_handleActions, a.getExternalLinksDone, onGetExternalLinksDone), (0, _defineProperty3.default)(_handleActions, a.getInfoInit, function (state) {\n return state;\n }), (0, _defineProperty3.default)(_handleActions, a.getInfoDone, onGetInfoDone), (0, _defineProperty3.default)(_handleActions, a.getSkillsInit, function (state) {\n return state;\n }), (0, _defineProperty3.default)(_handleActions, a.getSkillsDone, onGetSkillsDone), (0, _defineProperty3.default)(_handleActions, a.getStatsInit, function (state) {\n return state;\n }), (0, _defineProperty3.default)(_handleActions, a.getStatsDone, onGetStatsDone), (0, _defineProperty3.default)(_handleActions, a.getLinkedAccountsInit, function (state) {\n return state;\n }), (0, _defineProperty3.default)(_handleActions, a.getLinkedAccountsDone, onGetLinkedAccountsDone), (0, _defineProperty3.default)(_handleActions, a.uploadPhotoInit, function (state) {\n return (0, _extends3.default)({}, state, { uploadingPhoto: true });\n }), (0, _defineProperty3.default)(_handleActions, a.uploadPhotoDone, onUploadPhotoDone), (0, _defineProperty3.default)(_handleActions, a.deletePhotoInit, function (state) {\n return (0, _extends3.default)({}, state, { deletingPhoto: true });\n }), (0, _defineProperty3.default)(_handleActions, a.deletePhotoDone, onDeletePhotoDone), (0, _defineProperty3.default)(_handleActions, a.updateProfileInit, function (state) {\n return (0, _extends3.default)({}, state, { updatingProfile: true });\n }), (0, _defineProperty3.default)(_handleActions, a.updateProfileDone, onUpdateProfileDone), (0, _defineProperty3.default)(_handleActions, a.addSkillInit, function (state) {\n return (0, _extends3.default)({}, state, { addingSkill: true });\n }), (0, _defineProperty3.default)(_handleActions, a.addSkillDone, onAddSkillDone), (0, _defineProperty3.default)(_handleActions, a.hideSkillInit, function (state) {\n return (0, _extends3.default)({}, state, { hidingSkill: true });\n }), (0, _defineProperty3.default)(_handleActions, a.hideSkillDone, onHideSkillDone), (0, _defineProperty3.default)(_handleActions, a.addWebLinkInit, function (state) {\n return (0, _extends3.default)({}, state, { addingWebLink: true });\n }), (0, _defineProperty3.default)(_handleActions, a.addWebLinkDone, onAddWebLinkDone), (0, _defineProperty3.default)(_handleActions, a.deleteWebLinkInit, function (state) {\n return (0, _extends3.default)({}, state, { deletingWebLink: true });\n }), (0, _defineProperty3.default)(_handleActions, a.deleteWebLinkDone, onDeleteWebLinkDone), (0, _defineProperty3.default)(_handleActions, a.linkExternalAccountInit, function (state) {\n return (0, _extends3.default)({}, state, { linkingExternalAccount: true });\n }), (0, _defineProperty3.default)(_handleActions, a.linkExternalAccountDone, onLinkExternalAccountDone), (0, _defineProperty3.default)(_handleActions, a.unlinkExternalAccountInit, function (state) {\n return (0, _extends3.default)({}, state, { unlinkingExternalAccount: true });\n }), (0, _defineProperty3.default)(_handleActions, a.unlinkExternalAccountDone, onUnlinkExternalAccountDone), (0, _defineProperty3.default)(_handleActions, a.getCredentialInit, function (state) {\n return state;\n }), (0, _defineProperty3.default)(_handleActions, a.getCredentialDone, onGetCredentialDone), (0, _defineProperty3.default)(_handleActions, a.getEmailPreferencesInit, function (state) {\n return state;\n }), (0, _defineProperty3.default)(_handleActions, a.getEmailPreferencesDone, onGetEmailPreferencesDone), (0, _defineProperty3.default)(_handleActions, a.saveEmailPreferencesInit, function (state) {\n return (0, _extends3.default)({}, state, { savingEmailPreferences: true });\n }), (0, _defineProperty3.default)(_handleActions, a.saveEmailPreferencesDone, onSaveEmailPreferencesDone), (0, _defineProperty3.default)(_handleActions, a.updatePasswordInit, function (state) {\n return (0, _extends3.default)({}, state, { updatingPassword: true });\n }), (0, _defineProperty3.default)(_handleActions, a.updatePasswordDone, onUpdatePasswordDone), (0, _defineProperty3.default)(_handleActions, a.verifyMemberNewEmailInit, function (state) {\n return (0, _extends3.default)({}, state, { verifyingEmail: true });\n }), (0, _defineProperty3.default)(_handleActions, a.verifyMemberNewEmailDone, onVerifyMemberNewEmailDone), (0, _defineProperty3.default)(_handleActions, a.updateEmailConflict, onUpdateEmailConflict), _handleActions), _lodash2.default.defaults(initialState, {\n achievements: null,\n copilot: false,\n country: '',\n info: null,\n loadingError: false,\n skills: null,\n stats: null,\n verifyError: null,\n updateProfileSuccess: null\n }));\n}\n\n/**\n * Factory which creates a new reducer with its initial state tailored to the\n * given options object, if specified (for server-side rendering). If options\n * object is not specified, it creates just the default reducer. Accepted options are:\n * @returns {Promise}\n * @resolves {Function(state, action): state} New reducer.\n */\nfunction factory() {\n return _promise2.default.resolve(create());\n}\n\n/* Reducer with the default initial state. */\n\nvar _default = create();\n\nexports.default = _default;\n;\n\n(function () {\n var reactHotLoader = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").default;\n\n var leaveModule = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").leaveModule;\n\n if (!reactHotLoader) {\n return;\n }\n\n reactHotLoader.register(onGetAchievementsDone, 'onGetAchievementsDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onGetAchievementsV3Done, 'onGetAchievementsV3Done', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onGetExternalAccountsDone, 'onGetExternalAccountsDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onGetExternalLinksDone, 'onGetExternalLinksDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onGetInfoDone, 'onGetInfoDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onGetSkillsDone, 'onGetSkillsDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onGetStatsDone, 'onGetStatsDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onGetLinkedAccountsDone, 'onGetLinkedAccountsDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onGetCredentialDone, 'onGetCredentialDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onGetEmailPreferencesDone, 'onGetEmailPreferencesDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onUploadPhotoDone, 'onUploadPhotoDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onDeletePhotoDone, 'onDeletePhotoDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onUpdateProfileDone, 'onUpdateProfileDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onAddSkillDone, 'onAddSkillDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onHideSkillDone, 'onHideSkillDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onAddWebLinkDone, 'onAddWebLinkDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onDeleteWebLinkDone, 'onDeleteWebLinkDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onLinkExternalAccountDone, 'onLinkExternalAccountDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onUnlinkExternalAccountDone, 'onUnlinkExternalAccountDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onSaveEmailPreferencesDone, 'onSaveEmailPreferencesDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onUpdatePasswordDone, 'onUpdatePasswordDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onVerifyMemberNewEmailDone, 'onVerifyMemberNewEmailDone', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(onUpdateEmailConflict, 'onUpdateEmailConflict', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(create, 'create', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(factory, 'factory', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n reactHotLoader.register(_default, 'default', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/reducers/profile.js');\n leaveModule(module);\n})();\n\n;\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node_modules/webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n//# sourceURL=webpack://topcoder-react-lib/./src/reducers/profile.js?");
/***/ }),
@@ -1054,7 +1054,7 @@ eval("/* WEBPACK VAR INJECTION */(function(module) {\n\nObject.defineProperty(ex
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-eval("/* WEBPACK VAR INJECTION */(function(module) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _stringify = __webpack_require__(/*! babel-runtime/core-js/json/stringify */ \"babel-runtime/core-js/json/stringify\");\n\nvar _stringify2 = _interopRequireDefault(_stringify);\n\nvar _promise = __webpack_require__(/*! babel-runtime/core-js/promise */ \"babel-runtime/core-js/promise\");\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _regenerator = __webpack_require__(/*! babel-runtime/regenerator */ \"babel-runtime/regenerator\");\n\nvar _regenerator2 = _interopRequireDefault(_regenerator);\n\nvar _asyncToGenerator2 = __webpack_require__(/*! babel-runtime/helpers/asyncToGenerator */ \"babel-runtime/helpers/asyncToGenerator\");\n\nvar _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"babel-runtime/helpers/classCallCheck\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"babel-runtime/helpers/createClass\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _slicedToArray2 = __webpack_require__(/*! babel-runtime/helpers/slicedToArray */ \"babel-runtime/helpers/slicedToArray\");\n\nvar _slicedToArray3 = _interopRequireDefault(_slicedToArray2);\n\nexports.getService = getService;\n\nvar _topcoderReactUtils = __webpack_require__(/*! topcoder-react-utils */ \"topcoder-react-utils\");\n\nvar _logger = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\n\nvar _logger2 = _interopRequireDefault(_logger);\n\nvar _tc = __webpack_require__(/*! ../utils/tc */ \"./src/utils/tc.js\");\n\nvar _api = __webpack_require__(/*! ./api */ \"./src/services/api.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n(function () {\n var enterModule = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").enterModule;\n\n enterModule && enterModule(module);\n})(); /**\n * @module \"services.user\"\n * @desc The User service provides functionality related to Topcoder user\n * accounts.\n */\n\n\nvar auth0 = void 0;\n\n/**\n * Returns a new, or cached auth0 instance.\n * @return {Object} Auth0 object.\n */\nfunction getAuth0() {\n if (!auth0 && _topcoderReactUtils.isomorphy.isClientSide()) {\n var Auth0 = __webpack_require__(/*! auth0-js */ \"./node_modules/auth0-js/index.js\"); /* eslint-disable-line global-require */\n auth0 = new Auth0({\n domain: _topcoderReactUtils.config.AUTH0.DOMAIN,\n clientID: _topcoderReactUtils.config.AUTH0.CLIENT_ID,\n callbackOnLocationHash: true,\n sso: false\n });\n }\n return auth0;\n}\n\n/**\n * Gets social user data.\n * @param {Object} profile The user social profile\n * @param {*} accessToken The access token\n * @returns {Object} Social user data\n */\nfunction getSocialUserData(profile, accessToken) {\n var socialProvider = profile.identities[0].connection;\n var firstName = '';\n var lastName = '';\n var handle = '';\n var email = profile.email || '';\n\n var socialUserId = profile.user_id.substring(profile.user_id.lastIndexOf('|') + 1);\n var splitName = void 0;\n\n if (socialProvider === 'google-oauth2') {\n firstName = profile.given_name;\n lastName = profile.family_name;\n handle = profile.nickname;\n } else if (socialProvider === 'facebook') {\n firstName = profile.given_name;\n lastName = profile.family_name;\n handle = firstName + '.' + lastName;\n } else if (socialProvider === 'twitter') {\n splitName = profile.name.split(' ');\n var _splitName = splitName;\n\n var _splitName2 = (0, _slicedToArray3.default)(_splitName, 1);\n\n firstName = _splitName2[0];\n\n if (splitName.length > 1) {\n var _splitName3 = splitName;\n\n var _splitName4 = (0, _slicedToArray3.default)(_splitName3, 2);\n\n lastName = _splitName4[1];\n }\n handle = profile.screen_name;\n } else if (socialProvider === 'github') {\n splitName = profile.name.split(' ');\n var _splitName5 = splitName;\n\n var _splitName6 = (0, _slicedToArray3.default)(_splitName5, 1);\n\n firstName = _splitName6[0];\n\n if (splitName.length > 1) {\n var _splitName7 = splitName;\n\n var _splitName8 = (0, _slicedToArray3.default)(_splitName7, 2);\n\n lastName = _splitName8[1];\n }\n handle = profile.nickname;\n } else if (socialProvider === 'bitbucket') {\n firstName = profile.first_name;\n lastName = profile.last_name;\n handle = profile.username;\n } else if (socialProvider === 'stackoverflow') {\n firstName = profile.first_name;\n lastName = profile.last_name;\n handle = socialUserId;\n } else if (socialProvider === 'dribbble') {\n firstName = profile.first_name;\n lastName = profile.last_name;\n handle = socialUserId;\n }\n\n var token = accessToken;\n var tokenSecret = null;\n if (profile.identities[0].access_token) {\n token = profile.identities[0].access_token;\n }\n if (profile.identities[0].access_token_secret) {\n tokenSecret = profile.identities[0].access_token_secret;\n }\n return {\n socialUserId: socialUserId,\n username: handle,\n firstname: firstName,\n lastname: lastName,\n email: email,\n socialProfile: profile,\n socialProvider: socialProvider,\n accessToken: token,\n accessTokenSecret: tokenSecret\n };\n}\n\n/**\n * Service class.\n */\n\nvar User = function () {\n /**\n * Creates a new User service.\n * @param {String} tokenV3 Topcoder auth tokenV3.\n * @param {String} tokenV2 TC auth token v2.\n */\n function User(tokenV3, tokenV2) {\n (0, _classCallCheck3.default)(this, User);\n\n this.private = {\n api: (0, _api.getApi)('V3', tokenV3),\n apiV2: (0, _api.getApi)('V2', tokenV2),\n tokenV2: tokenV2,\n tokenV3: tokenV3\n };\n }\n\n /**\n * Gets user achievements. Does not need auth.\n * @param {String} username\n * @return {Object}\n */\n\n\n (0, _createClass3.default)(User, [{\n key: 'getAchievements',\n value: function () {\n var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(username) {\n var res;\n return _regenerator2.default.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return this.private.apiV2.get('/users/' + username);\n\n case 2:\n res = _context.sent;\n\n if (res.ok) {\n _context.next = 5;\n break;\n }\n\n throw new Error(res.statusText);\n\n case 5:\n _context.next = 7;\n return res.json();\n\n case 7:\n _context.t0 = _context.sent.Achievements;\n\n if (_context.t0) {\n _context.next = 10;\n break;\n }\n\n _context.t0 = [];\n\n case 10:\n return _context.abrupt('return', _context.t0);\n\n case 11:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function getAchievements(_x) {\n return _ref.apply(this, arguments);\n }\n\n return getAchievements;\n }()\n\n /**\n * Gets public user info. Does not need auth.\n * @param {String} username\n * @return {Object}\n */\n\n }, {\n key: 'getUserPublic',\n value: function () {\n var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(username) {\n var res;\n return _regenerator2.default.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return this.private.apiV2.get('/users/' + username);\n\n case 2:\n res = _context2.sent;\n\n if (res.ok) {\n _context2.next = 5;\n break;\n }\n\n throw new Error(res.statusText);\n\n case 5:\n return _context2.abrupt('return', res.json() || null);\n\n case 6:\n case 'end':\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n\n function getUserPublic(_x2) {\n return _ref2.apply(this, arguments);\n }\n\n return getUserPublic;\n }()\n\n /**\n * Gets user data object for the specified username.\n *\n * NOTE: Only admins are authorized to use the underlying endpoint.\n *\n * @param {String} username\n * @return {Promise} Resolves to the user data object.\n */\n\n }, {\n key: 'getUser',\n value: function () {\n var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(username) {\n var url, res;\n return _regenerator2.default.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n url = '/users?filter=handle%3D' + username;\n _context3.next = 3;\n return this.private.api.get(url);\n\n case 3:\n res = _context3.sent;\n _context3.next = 6;\n return (0, _tc.getApiResponsePayload)(res);\n\n case 6:\n return _context3.abrupt('return', _context3.sent[0]);\n\n case 7:\n case 'end':\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n\n function getUser(_x3) {\n return _ref3.apply(this, arguments);\n }\n\n return getUser;\n }()\n\n /**\n * Gets email preferences.\n *\n * NOTE: Only admins are authorized to use the underlying endpoint.\n *\n * @param {Number} userId The TopCoder user id\n * @returns {Promise} Resolves to the email preferences result\n */\n\n }, {\n key: 'getEmailPreferences',\n value: function () {\n var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(userId) {\n var url, res, x;\n return _regenerator2.default.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n url = '/users/' + userId + '/preferences/email';\n _context4.next = 3;\n return this.private.api.get(url);\n\n case 3:\n res = _context4.sent;\n _context4.next = 6;\n return res.json();\n\n case 6:\n x = _context4.sent.result;\n return _context4.abrupt('return', x.content);\n\n case 8:\n case 'end':\n return _context4.stop();\n }\n }\n }, _callee4, this);\n }));\n\n function getEmailPreferences(_x4) {\n return _ref4.apply(this, arguments);\n }\n\n return getEmailPreferences;\n }()\n\n /**\n * Saves email preferences.\n *\n * NOTE: Only admins are authorized to use the underlying endpoint.\n *\n * @param {Object} user The TopCoder user\n * @param {Object} preferences The email preferences\n * @returns {Promise} Resolves to the email preferences result\n */\n\n }, {\n key: 'saveEmailPreferences',\n value: function () {\n var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(_ref6, preferences) {\n var firstName = _ref6.firstName,\n lastName = _ref6.lastName,\n userId = _ref6.userId;\n var settings, url, res;\n return _regenerator2.default.wrap(function _callee5$(_context5) {\n while (1) {\n switch (_context5.prev = _context5.next) {\n case 0:\n settings = {\n firstName: firstName,\n lastName: lastName,\n subscriptions: {}\n };\n\n\n if (!preferences) {\n settings.subscriptions.TOPCODER_NL_GEN = true;\n } else {\n settings.subscriptions = preferences;\n }\n url = '/users/' + userId + '/preferences/email';\n _context5.next = 5;\n return this.private.api.putJson(url, { param: settings });\n\n case 5:\n res = _context5.sent;\n return _context5.abrupt('return', (0, _tc.getApiResponsePayload)(res));\n\n case 7:\n case 'end':\n return _context5.stop();\n }\n }\n }, _callee5, this);\n }));\n\n function saveEmailPreferences(_x5, _x6) {\n return _ref5.apply(this, arguments);\n }\n\n return saveEmailPreferences;\n }()\n\n /**\n * Gets credential for the specified user id.\n *\n * NOTE: Only admins are authorized to use the underlying endpoint.\n *\n * @param {Number} userId The user id\n * @return {Promise} Resolves to the linked accounts array.\n */\n\n }, {\n key: 'getCredential',\n value: function () {\n var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(userId) {\n var url, res;\n return _regenerator2.default.wrap(function _callee6$(_context6) {\n while (1) {\n switch (_context6.prev = _context6.next) {\n case 0:\n url = '/users/' + userId + '?fields=credential';\n _context6.next = 3;\n return this.private.api.get(url);\n\n case 3:\n res = _context6.sent;\n return _context6.abrupt('return', (0, _tc.getApiResponsePayload)(res));\n\n case 5:\n case 'end':\n return _context6.stop();\n }\n }\n }, _callee6, this);\n }));\n\n function getCredential(_x7) {\n return _ref7.apply(this, arguments);\n }\n\n return getCredential;\n }()\n\n /**\n * Updates user password.\n *\n * NOTE: Only admins are authorized to use the underlying endpoint.\n *\n * @param {Number} userId The user id\n * @param {String} newPassword The new password\n * @param {String} oldPassword The old password\n * @return {Promise} Resolves to the update result.\n */\n\n }, {\n key: 'updatePassword',\n value: function () {\n var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(userId, newPassword, oldPassword) {\n var credential, url, res;\n return _regenerator2.default.wrap(function _callee7$(_context7) {\n while (1) {\n switch (_context7.prev = _context7.next) {\n case 0:\n credential = {\n password: newPassword,\n currentPassword: oldPassword\n };\n url = '/users/' + userId;\n _context7.next = 4;\n return this.private.api.patchJson(url, { param: { credential: credential } });\n\n case 4:\n res = _context7.sent;\n return _context7.abrupt('return', (0, _tc.getApiResponsePayload)(res));\n\n case 6:\n case 'end':\n return _context7.stop();\n }\n }\n }, _callee7, this);\n }));\n\n function updatePassword(_x8, _x9, _x10) {\n return _ref8.apply(this, arguments);\n }\n\n return updatePassword;\n }()\n\n /**\n * Gets linked accounts for the specified user id.\n *\n * NOTE: Only admins are authorized to use the underlying endpoint.\n *\n * @param {Number} userId The user id\n * @return {Promise} Resolves to the linked accounts array.\n */\n\n }, {\n key: 'getLinkedAccounts',\n value: function () {\n var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(userId) {\n var url, res;\n return _regenerator2.default.wrap(function _callee8$(_context8) {\n while (1) {\n switch (_context8.prev = _context8.next) {\n case 0:\n url = '/users/' + userId + '?fields=profiles';\n _context8.next = 3;\n return this.private.api.get(url);\n\n case 3:\n res = _context8.sent;\n return _context8.abrupt('return', (0, _tc.getApiResponsePayload)(res));\n\n case 5:\n case 'end':\n return _context8.stop();\n }\n }\n }, _callee8, this);\n }));\n\n function getLinkedAccounts(_x11) {\n return _ref9.apply(this, arguments);\n }\n\n return getLinkedAccounts;\n }()\n\n /**\n * Unlinks external account.\n * @param {Number} userId The TopCoder user id\n * @param {String} provider The external account service provider\n * @returns {Promise} Resolves to the unlink result\n */\n\n }, {\n key: 'unlinkExternalAccount',\n value: function () {\n var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(userId, provider) {\n var url, res;\n return _regenerator2.default.wrap(function _callee9$(_context9) {\n while (1) {\n switch (_context9.prev = _context9.next) {\n case 0:\n url = '/users/' + userId + '/profiles/' + provider;\n _context9.next = 3;\n return this.private.api.delete(url);\n\n case 3:\n res = _context9.sent;\n return _context9.abrupt('return', (0, _tc.getApiResponsePayload)(res));\n\n case 5:\n case 'end':\n return _context9.stop();\n }\n }\n }, _callee9, this);\n }));\n\n function unlinkExternalAccount(_x12, _x13) {\n return _ref10.apply(this, arguments);\n }\n\n return unlinkExternalAccount;\n }()\n\n /**\n * Links external account.\n * @param {Number} userId The TopCoder user id\n * @param {String} provider The external account service provider\n * @param {String} callbackUrl Optional. The callback url\n * @returns {Promise} Resolves to the linked account result\n */\n\n }, {\n key: 'linkExternalAccount',\n value: function () {\n var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(userId, provider, callbackUrl) {\n var _this = this;\n\n return _regenerator2.default.wrap(function _callee10$(_context10) {\n while (1) {\n switch (_context10.prev = _context10.next) {\n case 0:\n return _context10.abrupt('return', new _promise2.default(function (resolve, reject) {\n getAuth0().signin({\n popup: true,\n connection: provider,\n scope: 'openid profile offline_access',\n state: callbackUrl\n }, function (authError, profile, idToken, accessToken) {\n if (authError) {\n _logger2.default.error('Error signing in - onSocialLoginFailure', authError);\n reject(authError);\n return;\n }\n\n var socialData = getSocialUserData(profile, accessToken);\n\n var postData = {\n userId: socialData.socialUserId,\n name: socialData.username,\n email: socialData.email,\n emailVerified: false,\n providerType: socialData.socialProvider,\n context: {\n handle: socialData.username,\n accessToken: socialData.accessToken,\n auth0UserId: profile.user_id\n }\n };\n if (socialData.accessTokenSecret) {\n postData.context.accessTokenSecret = socialData.accessTokenSecret;\n }\n _logger2.default.debug('link API postdata: ' + (0, _stringify2.default)(postData));\n _this.private.api.postJson('/users/' + userId + '/profiles', { param: postData }).then(function (resp) {\n return (0, _tc.getApiResponsePayload)(resp).then(function (result) {\n _logger2.default.debug('Succesfully linked account: ' + (0, _stringify2.default)(result));\n resolve(postData);\n });\n }).catch(function (err) {\n _logger2.default.error('Error linking account', err);\n reject(err);\n });\n });\n }));\n\n case 1:\n case 'end':\n return _context10.stop();\n }\n }\n }, _callee10, this);\n }));\n\n function linkExternalAccount(_x14, _x15, _x16) {\n return _ref11.apply(this, arguments);\n }\n\n return linkExternalAccount;\n }()\n }, {\n key: '__reactstandin__regenerateByEval',\n // @ts-ignore\n value: function __reactstandin__regenerateByEval(key, code) {\n // @ts-ignore\n this[key] = eval(code);\n }\n }]);\n return User;\n}();\n\nvar lastInstance = null;\n\n/**\n * Returns a new or existing User service for the specified tokenV3.\n * @param {String} tokenV3 Optional. Topcoder auth token v3.\n * @param {String} tokenV2 Optional. TC auth token v2.\n * @return {Api} API v3 service object.\n */\nfunction getService(tokenV3, tokenV2) {\n if (!lastInstance || lastInstance.private.tokenV2 !== tokenV2 || lastInstance.private.tokenV3 !== tokenV3) {\n lastInstance = new User(tokenV3, tokenV2);\n }\n return lastInstance;\n}\n\n/**\n * @static\n * @member default\n * @desc Default export is {@link module:services.user~User} class.\n */\nvar _default = User;\nexports.default = _default;\n;\n\n(function () {\n var reactHotLoader = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").default;\n\n var leaveModule = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").leaveModule;\n\n if (!reactHotLoader) {\n return;\n }\n\n reactHotLoader.register(auth0, 'auth0', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/services/user.js');\n reactHotLoader.register(getAuth0, 'getAuth0', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/services/user.js');\n reactHotLoader.register(getSocialUserData, 'getSocialUserData', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/services/user.js');\n reactHotLoader.register(User, 'User', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/services/user.js');\n reactHotLoader.register(lastInstance, 'lastInstance', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/services/user.js');\n reactHotLoader.register(getService, 'getService', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/services/user.js');\n reactHotLoader.register(_default, 'default', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/services/user.js');\n leaveModule(module);\n})();\n\n;\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node_modules/webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n//# sourceURL=webpack://topcoder-react-lib/./src/services/user.js?");
+eval("/* WEBPACK VAR INJECTION */(function(module) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _stringify = __webpack_require__(/*! babel-runtime/core-js/json/stringify */ \"babel-runtime/core-js/json/stringify\");\n\nvar _stringify2 = _interopRequireDefault(_stringify);\n\nvar _promise = __webpack_require__(/*! babel-runtime/core-js/promise */ \"babel-runtime/core-js/promise\");\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _regenerator = __webpack_require__(/*! babel-runtime/regenerator */ \"babel-runtime/regenerator\");\n\nvar _regenerator2 = _interopRequireDefault(_regenerator);\n\nvar _asyncToGenerator2 = __webpack_require__(/*! babel-runtime/helpers/asyncToGenerator */ \"babel-runtime/helpers/asyncToGenerator\");\n\nvar _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);\n\nvar _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ \"babel-runtime/helpers/classCallCheck\");\n\nvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\n\nvar _createClass2 = __webpack_require__(/*! babel-runtime/helpers/createClass */ \"babel-runtime/helpers/createClass\");\n\nvar _createClass3 = _interopRequireDefault(_createClass2);\n\nvar _slicedToArray2 = __webpack_require__(/*! babel-runtime/helpers/slicedToArray */ \"babel-runtime/helpers/slicedToArray\");\n\nvar _slicedToArray3 = _interopRequireDefault(_slicedToArray2);\n\nexports.getService = getService;\n\nvar _topcoderReactUtils = __webpack_require__(/*! topcoder-react-utils */ \"topcoder-react-utils\");\n\nvar _logger = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.js\");\n\nvar _logger2 = _interopRequireDefault(_logger);\n\nvar _tc = __webpack_require__(/*! ../utils/tc */ \"./src/utils/tc.js\");\n\nvar _api = __webpack_require__(/*! ./api */ \"./src/services/api.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n(function () {\n var enterModule = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").enterModule;\n\n enterModule && enterModule(module);\n})(); /**\n * @module \"services.user\"\n * @desc The User service provides functionality related to Topcoder user\n * accounts.\n */\n\n\nvar auth0 = void 0;\n\n/**\n * Returns a new, or cached auth0 instance.\n * @return {Object} Auth0 object.\n */\nfunction getAuth0() {\n if (!auth0 && _topcoderReactUtils.isomorphy.isClientSide()) {\n var Auth0 = __webpack_require__(/*! auth0-js */ \"./node_modules/auth0-js/index.js\"); /* eslint-disable-line global-require */\n auth0 = new Auth0({\n domain: _topcoderReactUtils.config.AUTH0.DOMAIN,\n clientID: _topcoderReactUtils.config.AUTH0.CLIENT_ID,\n callbackOnLocationHash: true,\n sso: false\n });\n }\n return auth0;\n}\n\n/**\n * Gets social user data.\n * @param {Object} profile The user social profile\n * @param {*} accessToken The access token\n * @returns {Object} Social user data\n */\nfunction getSocialUserData(profile, accessToken) {\n var socialProvider = profile.identities[0].connection;\n var firstName = '';\n var lastName = '';\n var handle = '';\n var email = profile.email || '';\n\n var socialUserId = profile.user_id.substring(profile.user_id.lastIndexOf('|') + 1);\n var splitName = void 0;\n\n if (socialProvider === 'google-oauth2') {\n firstName = profile.given_name;\n lastName = profile.family_name;\n handle = profile.nickname;\n } else if (socialProvider === 'facebook') {\n firstName = profile.given_name;\n lastName = profile.family_name;\n handle = firstName + '.' + lastName;\n } else if (socialProvider === 'twitter') {\n splitName = profile.name.split(' ');\n var _splitName = splitName;\n\n var _splitName2 = (0, _slicedToArray3.default)(_splitName, 1);\n\n firstName = _splitName2[0];\n\n if (splitName.length > 1) {\n var _splitName3 = splitName;\n\n var _splitName4 = (0, _slicedToArray3.default)(_splitName3, 2);\n\n lastName = _splitName4[1];\n }\n handle = profile.screen_name;\n } else if (socialProvider === 'github') {\n splitName = profile.name.split(' ');\n var _splitName5 = splitName;\n\n var _splitName6 = (0, _slicedToArray3.default)(_splitName5, 1);\n\n firstName = _splitName6[0];\n\n if (splitName.length > 1) {\n var _splitName7 = splitName;\n\n var _splitName8 = (0, _slicedToArray3.default)(_splitName7, 2);\n\n lastName = _splitName8[1];\n }\n handle = profile.nickname;\n } else if (socialProvider === 'bitbucket') {\n firstName = profile.first_name;\n lastName = profile.last_name;\n handle = profile.username;\n } else if (socialProvider === 'stackoverflow') {\n firstName = profile.first_name;\n lastName = profile.last_name;\n handle = socialUserId;\n } else if (socialProvider === 'dribbble') {\n firstName = profile.first_name;\n lastName = profile.last_name;\n handle = socialUserId;\n }\n\n var token = accessToken;\n var tokenSecret = null;\n if (profile.identities[0].access_token) {\n token = profile.identities[0].access_token;\n }\n if (profile.identities[0].access_token_secret) {\n tokenSecret = profile.identities[0].access_token_secret;\n }\n return {\n socialUserId: socialUserId,\n username: handle,\n firstname: firstName,\n lastname: lastName,\n email: email,\n socialProfile: profile,\n socialProvider: socialProvider,\n accessToken: token,\n accessTokenSecret: tokenSecret\n };\n}\n\n/**\n * Service class.\n */\n\nvar User = function () {\n /**\n * Creates a new User service.\n * @param {String} tokenV3 Topcoder auth tokenV3.\n * @param {String} tokenV2 TC auth token v2.\n */\n function User(tokenV3, tokenV2) {\n (0, _classCallCheck3.default)(this, User);\n\n this.private = {\n api: (0, _api.getApi)('V3', tokenV3),\n apiV2: (0, _api.getApi)('V2', tokenV2),\n tokenV2: tokenV2,\n tokenV3: tokenV3\n };\n }\n\n /**\n * Gets user achievements. Does not need auth.\n * @param {String} username\n * @return {Object}\n */\n\n\n (0, _createClass3.default)(User, [{\n key: 'getAchievements',\n value: function () {\n var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(username) {\n var res;\n return _regenerator2.default.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return this.private.apiV2.get('/users/' + username);\n\n case 2:\n res = _context.sent;\n\n if (res.ok) {\n _context.next = 5;\n break;\n }\n\n throw new Error(res.statusText);\n\n case 5:\n _context.next = 7;\n return res.json();\n\n case 7:\n _context.t0 = _context.sent.Achievements;\n\n if (_context.t0) {\n _context.next = 10;\n break;\n }\n\n _context.t0 = [];\n\n case 10:\n return _context.abrupt('return', _context.t0);\n\n case 11:\n case 'end':\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function getAchievements(_x) {\n return _ref.apply(this, arguments);\n }\n\n return getAchievements;\n }()\n\n /**\n * Gets public user info. Does not need auth.\n * @param {String} username\n * @return {Object}\n */\n\n }, {\n key: 'getUserPublic',\n value: function () {\n var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(username) {\n var res;\n return _regenerator2.default.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return this.private.apiV2.get('/users/' + username);\n\n case 2:\n res = _context2.sent;\n\n if (res.ok) {\n _context2.next = 5;\n break;\n }\n\n throw new Error(res.statusText);\n\n case 5:\n return _context2.abrupt('return', res.json() || null);\n\n case 6:\n case 'end':\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n\n function getUserPublic(_x2) {\n return _ref2.apply(this, arguments);\n }\n\n return getUserPublic;\n }()\n\n /**\n * Gets public user info from v3 API. Does not need auth.\n * @param {String} username\n * @return {Object}\n */\n\n }, {\n key: 'getUserPublicV3',\n value: function () {\n var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(username) {\n var res;\n return _regenerator2.default.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _context3.next = 2;\n return this.private.api.get('/members/' + username);\n\n case 2:\n res = _context3.sent;\n return _context3.abrupt('return', (0, _tc.getApiResponsePayload)(res));\n\n case 4:\n case 'end':\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n\n function getUserPublicV3(_x3) {\n return _ref3.apply(this, arguments);\n }\n\n return getUserPublicV3;\n }()\n\n /**\n * Gets user data object for the specified username.\n *\n * NOTE: Only admins are authorized to use the underlying endpoint.\n *\n * @param {String} username\n * @return {Promise} Resolves to the user data object.\n */\n\n }, {\n key: 'getUser',\n value: function () {\n var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(username) {\n var url, res;\n return _regenerator2.default.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n url = '/users?filter=handle%3D' + username;\n _context4.next = 3;\n return this.private.api.get(url);\n\n case 3:\n res = _context4.sent;\n _context4.next = 6;\n return (0, _tc.getApiResponsePayload)(res);\n\n case 6:\n return _context4.abrupt('return', _context4.sent[0]);\n\n case 7:\n case 'end':\n return _context4.stop();\n }\n }\n }, _callee4, this);\n }));\n\n function getUser(_x4) {\n return _ref4.apply(this, arguments);\n }\n\n return getUser;\n }()\n\n /**\n * Gets email preferences.\n *\n * NOTE: Only admins are authorized to use the underlying endpoint.\n *\n * @param {Number} userId The TopCoder user id\n * @returns {Promise} Resolves to the email preferences result\n */\n\n }, {\n key: 'getEmailPreferences',\n value: function () {\n var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(userId) {\n var url, res, x;\n return _regenerator2.default.wrap(function _callee5$(_context5) {\n while (1) {\n switch (_context5.prev = _context5.next) {\n case 0:\n url = '/users/' + userId + '/preferences/email';\n _context5.next = 3;\n return this.private.api.get(url);\n\n case 3:\n res = _context5.sent;\n _context5.next = 6;\n return res.json();\n\n case 6:\n x = _context5.sent.result;\n return _context5.abrupt('return', x.content);\n\n case 8:\n case 'end':\n return _context5.stop();\n }\n }\n }, _callee5, this);\n }));\n\n function getEmailPreferences(_x5) {\n return _ref5.apply(this, arguments);\n }\n\n return getEmailPreferences;\n }()\n\n /**\n * Saves email preferences.\n *\n * NOTE: Only admins are authorized to use the underlying endpoint.\n *\n * @param {Object} user The TopCoder user\n * @param {Object} preferences The email preferences\n * @returns {Promise} Resolves to the email preferences result\n */\n\n }, {\n key: 'saveEmailPreferences',\n value: function () {\n var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(_ref7, preferences) {\n var firstName = _ref7.firstName,\n lastName = _ref7.lastName,\n userId = _ref7.userId;\n var settings, url, res;\n return _regenerator2.default.wrap(function _callee6$(_context6) {\n while (1) {\n switch (_context6.prev = _context6.next) {\n case 0:\n settings = {\n firstName: firstName,\n lastName: lastName,\n subscriptions: {}\n };\n\n\n if (!preferences) {\n settings.subscriptions.TOPCODER_NL_GEN = true;\n } else {\n settings.subscriptions = preferences;\n }\n url = '/users/' + userId + '/preferences/email';\n _context6.next = 5;\n return this.private.api.putJson(url, { param: settings });\n\n case 5:\n res = _context6.sent;\n return _context6.abrupt('return', (0, _tc.getApiResponsePayload)(res));\n\n case 7:\n case 'end':\n return _context6.stop();\n }\n }\n }, _callee6, this);\n }));\n\n function saveEmailPreferences(_x6, _x7) {\n return _ref6.apply(this, arguments);\n }\n\n return saveEmailPreferences;\n }()\n\n /**\n * Gets credential for the specified user id.\n *\n * NOTE: Only admins are authorized to use the underlying endpoint.\n *\n * @param {Number} userId The user id\n * @return {Promise} Resolves to the linked accounts array.\n */\n\n }, {\n key: 'getCredential',\n value: function () {\n var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(userId) {\n var url, res;\n return _regenerator2.default.wrap(function _callee7$(_context7) {\n while (1) {\n switch (_context7.prev = _context7.next) {\n case 0:\n url = '/users/' + userId + '?fields=credential';\n _context7.next = 3;\n return this.private.api.get(url);\n\n case 3:\n res = _context7.sent;\n return _context7.abrupt('return', (0, _tc.getApiResponsePayload)(res));\n\n case 5:\n case 'end':\n return _context7.stop();\n }\n }\n }, _callee7, this);\n }));\n\n function getCredential(_x8) {\n return _ref8.apply(this, arguments);\n }\n\n return getCredential;\n }()\n\n /**\n * Updates user password.\n *\n * NOTE: Only admins are authorized to use the underlying endpoint.\n *\n * @param {Number} userId The user id\n * @param {String} newPassword The new password\n * @param {String} oldPassword The old password\n * @return {Promise} Resolves to the update result.\n */\n\n }, {\n key: 'updatePassword',\n value: function () {\n var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(userId, newPassword, oldPassword) {\n var credential, url, res;\n return _regenerator2.default.wrap(function _callee8$(_context8) {\n while (1) {\n switch (_context8.prev = _context8.next) {\n case 0:\n credential = {\n password: newPassword,\n currentPassword: oldPassword\n };\n url = '/users/' + userId;\n _context8.next = 4;\n return this.private.api.patchJson(url, { param: { credential: credential } });\n\n case 4:\n res = _context8.sent;\n return _context8.abrupt('return', (0, _tc.getApiResponsePayload)(res));\n\n case 6:\n case 'end':\n return _context8.stop();\n }\n }\n }, _callee8, this);\n }));\n\n function updatePassword(_x9, _x10, _x11) {\n return _ref9.apply(this, arguments);\n }\n\n return updatePassword;\n }()\n\n /**\n * Gets linked accounts for the specified user id.\n *\n * NOTE: Only admins are authorized to use the underlying endpoint.\n *\n * @param {Number} userId The user id\n * @return {Promise} Resolves to the linked accounts array.\n */\n\n }, {\n key: 'getLinkedAccounts',\n value: function () {\n var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(userId) {\n var url, res;\n return _regenerator2.default.wrap(function _callee9$(_context9) {\n while (1) {\n switch (_context9.prev = _context9.next) {\n case 0:\n url = '/users/' + userId + '?fields=profiles';\n _context9.next = 3;\n return this.private.api.get(url);\n\n case 3:\n res = _context9.sent;\n return _context9.abrupt('return', (0, _tc.getApiResponsePayload)(res));\n\n case 5:\n case 'end':\n return _context9.stop();\n }\n }\n }, _callee9, this);\n }));\n\n function getLinkedAccounts(_x12) {\n return _ref10.apply(this, arguments);\n }\n\n return getLinkedAccounts;\n }()\n\n /**\n * Unlinks external account.\n * @param {Number} userId The TopCoder user id\n * @param {String} provider The external account service provider\n * @returns {Promise} Resolves to the unlink result\n */\n\n }, {\n key: 'unlinkExternalAccount',\n value: function () {\n var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(userId, provider) {\n var url, res;\n return _regenerator2.default.wrap(function _callee10$(_context10) {\n while (1) {\n switch (_context10.prev = _context10.next) {\n case 0:\n url = '/users/' + userId + '/profiles/' + provider;\n _context10.next = 3;\n return this.private.api.delete(url);\n\n case 3:\n res = _context10.sent;\n return _context10.abrupt('return', (0, _tc.getApiResponsePayload)(res));\n\n case 5:\n case 'end':\n return _context10.stop();\n }\n }\n }, _callee10, this);\n }));\n\n function unlinkExternalAccount(_x13, _x14) {\n return _ref11.apply(this, arguments);\n }\n\n return unlinkExternalAccount;\n }()\n\n /**\n * Links external account.\n * @param {Number} userId The TopCoder user id\n * @param {String} provider The external account service provider\n * @param {String} callbackUrl Optional. The callback url\n * @returns {Promise} Resolves to the linked account result\n */\n\n }, {\n key: 'linkExternalAccount',\n value: function () {\n var _ref12 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(userId, provider, callbackUrl) {\n var _this = this;\n\n return _regenerator2.default.wrap(function _callee11$(_context11) {\n while (1) {\n switch (_context11.prev = _context11.next) {\n case 0:\n return _context11.abrupt('return', new _promise2.default(function (resolve, reject) {\n getAuth0().signin({\n popup: true,\n connection: provider,\n scope: 'openid profile offline_access',\n state: callbackUrl\n }, function (authError, profile, idToken, accessToken) {\n if (authError) {\n _logger2.default.error('Error signing in - onSocialLoginFailure', authError);\n reject(authError);\n return;\n }\n\n var socialData = getSocialUserData(profile, accessToken);\n\n var postData = {\n userId: socialData.socialUserId,\n name: socialData.username,\n email: socialData.email,\n emailVerified: false,\n providerType: socialData.socialProvider,\n context: {\n handle: socialData.username,\n accessToken: socialData.accessToken,\n auth0UserId: profile.user_id\n }\n };\n if (socialData.accessTokenSecret) {\n postData.context.accessTokenSecret = socialData.accessTokenSecret;\n }\n _logger2.default.debug('link API postdata: ' + (0, _stringify2.default)(postData));\n _this.private.api.postJson('/users/' + userId + '/profiles', { param: postData }).then(function (resp) {\n return (0, _tc.getApiResponsePayload)(resp).then(function (result) {\n _logger2.default.debug('Succesfully linked account: ' + (0, _stringify2.default)(result));\n resolve(postData);\n });\n }).catch(function (err) {\n _logger2.default.error('Error linking account', err);\n reject(err);\n });\n });\n }));\n\n case 1:\n case 'end':\n return _context11.stop();\n }\n }\n }, _callee11, this);\n }));\n\n function linkExternalAccount(_x15, _x16, _x17) {\n return _ref12.apply(this, arguments);\n }\n\n return linkExternalAccount;\n }()\n }, {\n key: '__reactstandin__regenerateByEval',\n // @ts-ignore\n value: function __reactstandin__regenerateByEval(key, code) {\n // @ts-ignore\n this[key] = eval(code);\n }\n }]);\n return User;\n}();\n\nvar lastInstance = null;\n\n/**\n * Returns a new or existing User service for the specified tokenV3.\n * @param {String} tokenV3 Optional. Topcoder auth token v3.\n * @param {String} tokenV2 Optional. TC auth token v2.\n * @return {Api} API v3 service object.\n */\nfunction getService(tokenV3, tokenV2) {\n if (!lastInstance || lastInstance.private.tokenV2 !== tokenV2 || lastInstance.private.tokenV3 !== tokenV3) {\n lastInstance = new User(tokenV3, tokenV2);\n }\n return lastInstance;\n}\n\n/**\n * @static\n * @member default\n * @desc Default export is {@link module:services.user~User} class.\n */\nvar _default = User;\nexports.default = _default;\n;\n\n(function () {\n var reactHotLoader = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").default;\n\n var leaveModule = __webpack_require__(/*! react-hot-loader */ \"react-hot-loader\").leaveModule;\n\n if (!reactHotLoader) {\n return;\n }\n\n reactHotLoader.register(auth0, 'auth0', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/services/user.js');\n reactHotLoader.register(getAuth0, 'getAuth0', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/services/user.js');\n reactHotLoader.register(getSocialUserData, 'getSocialUserData', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/services/user.js');\n reactHotLoader.register(User, 'User', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/services/user.js');\n reactHotLoader.register(lastInstance, 'lastInstance', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/services/user.js');\n reactHotLoader.register(getService, 'getService', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/services/user.js');\n reactHotLoader.register(_default, 'default', '/Users/thomaskranitsas/Desktop/topcoder-react-lib/src/services/user.js');\n leaveModule(module);\n})();\n\n;\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node_modules/webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n//# sourceURL=webpack://topcoder-react-lib/./src/services/user.js?");
/***/ }),
diff --git a/dist/prod/index.js b/dist/prod/index.js
index 49a784fb..62c95fca 100644
--- a/dist/prod/index.js
+++ b/dist/prod/index.js
@@ -1,6 +1,6 @@
-!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("lodash"),require("babel-runtime/core-js/promise"),require("redux-actions"),require("babel-runtime/helpers/extends"),require("babel-runtime/regenerator"),require("babel-runtime/helpers/asyncToGenerator"),require("babel-runtime/helpers/defineProperty"),require("topcoder-react-utils"),require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/createClass"),require("qs"),require("babel-runtime/core-js/json/stringify"),require("babel-runtime/helpers/slicedToArray"),require("tc-accounts"),require("babel-runtime/helpers/toConsumableArray"),require("moment"),require("babel-runtime/core-js/set"),require("isomorphic-fetch"),require("babel-runtime/core-js/object/keys"),require("moment-duration-format"),require("babel-runtime/core-js/set-immediate"),require("le_node"),require("babel-runtime/core-js/object/assign"),require("to-capital-case"),require("babel-runtime/core-js/object/values")):"function"==typeof define&&define.amd?define(["lodash","babel-runtime/core-js/promise","redux-actions","babel-runtime/helpers/extends","babel-runtime/regenerator","babel-runtime/helpers/asyncToGenerator","babel-runtime/helpers/defineProperty","topcoder-react-utils","babel-runtime/helpers/classCallCheck","babel-runtime/helpers/createClass","qs","babel-runtime/core-js/json/stringify","babel-runtime/helpers/slicedToArray","tc-accounts","babel-runtime/helpers/toConsumableArray","moment","babel-runtime/core-js/set","isomorphic-fetch","babel-runtime/core-js/object/keys","moment-duration-format","babel-runtime/core-js/set-immediate","le_node","babel-runtime/core-js/object/assign","to-capital-case","babel-runtime/core-js/object/values"],t):"object"==typeof exports?exports["topcoder-react-lib"]=t(require("lodash"),require("babel-runtime/core-js/promise"),require("redux-actions"),require("babel-runtime/helpers/extends"),require("babel-runtime/regenerator"),require("babel-runtime/helpers/asyncToGenerator"),require("babel-runtime/helpers/defineProperty"),require("topcoder-react-utils"),require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/createClass"),require("qs"),require("babel-runtime/core-js/json/stringify"),require("babel-runtime/helpers/slicedToArray"),require("tc-accounts"),require("babel-runtime/helpers/toConsumableArray"),require("moment"),require("babel-runtime/core-js/set"),require("isomorphic-fetch"),require("babel-runtime/core-js/object/keys"),require("moment-duration-format"),require("babel-runtime/core-js/set-immediate"),require("le_node"),require("babel-runtime/core-js/object/assign"),require("to-capital-case"),require("babel-runtime/core-js/object/values")):e["topcoder-react-lib"]=t(e.lodash,e["babel-runtime/core-js/promise"],e["redux-actions"],e["babel-runtime/helpers/extends"],e["babel-runtime/regenerator"],e["babel-runtime/helpers/asyncToGenerator"],e["babel-runtime/helpers/defineProperty"],e["topcoder-react-utils"],e["babel-runtime/helpers/classCallCheck"],e["babel-runtime/helpers/createClass"],e.qs,e["babel-runtime/core-js/json/stringify"],e["babel-runtime/helpers/slicedToArray"],e["tc-accounts"],e["babel-runtime/helpers/toConsumableArray"],e.moment,e["babel-runtime/core-js/set"],e["isomorphic-fetch"],e["babel-runtime/core-js/object/keys"],e["moment-duration-format"],e["babel-runtime/core-js/set-immediate"],e.le_node,e["babel-runtime/core-js/object/assign"],e["to-capital-case"],e["babel-runtime/core-js/object/values"])}("undefined"!=typeof self?self:this,function(__WEBPACK_EXTERNAL_MODULE__0__,__WEBPACK_EXTERNAL_MODULE__1__,__WEBPACK_EXTERNAL_MODULE__2__,__WEBPACK_EXTERNAL_MODULE__3__,__WEBPACK_EXTERNAL_MODULE__4__,__WEBPACK_EXTERNAL_MODULE__5__,__WEBPACK_EXTERNAL_MODULE__6__,__WEBPACK_EXTERNAL_MODULE__8__,__WEBPACK_EXTERNAL_MODULE__9__,__WEBPACK_EXTERNAL_MODULE__10__,__WEBPACK_EXTERNAL_MODULE__14__,__WEBPACK_EXTERNAL_MODULE__15__,__WEBPACK_EXTERNAL_MODULE__16__,__WEBPACK_EXTERNAL_MODULE__17__,__WEBPACK_EXTERNAL_MODULE__19__,__WEBPACK_EXTERNAL_MODULE__20__,__WEBPACK_EXTERNAL_MODULE__23__,__WEBPACK_EXTERNAL_MODULE__29__,__WEBPACK_EXTERNAL_MODULE__53__,__WEBPACK_EXTERNAL_MODULE__54__,__WEBPACK_EXTERNAL_MODULE__55__,__WEBPACK_EXTERNAL_MODULE__56__,__WEBPACK_EXTERNAL_MODULE__90__,__WEBPACK_EXTERNAL_MODULE__91__,__WEBPACK_EXTERNAL_MODULE__104__){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=51)}([function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__0__},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__1__},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__2__},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__3__},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__4__},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__5__},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__6__},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTcM2mToken=t.getApiV4=t.getApiV3=t.getApiV2=void 0;var r=y(n(53)),o=y(n(1)),a=y(n(15)),i=y(n(4)),s=y(n(3)),u=y(n(5)),l=y(n(9)),c=y(n(10)),d=t.getTcM2mToken=function(){var e=(0,u.default)(i.default.mark(function e(){var t,n,r,o;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(h.isomorphy.isServerSide()){e.next=2;break}throw new Error("getTcM2mToken() called outside the server");case 2:if(t=Date.now(),n=d.cached,r=h.config.SECRET.TC_M2M,n&&!(n.expires1&&void 0!==arguments[1]?arguments[1]:{};return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=this.private,r=n.base,o=n.token,a=l.headers?f.default.clone(l.headers):{},o&&(a.Authorization="Bearer "+o),e.t0=a["Content-Type"],e.next=null===e.t0?6:void 0===e.t0?8:10;break;case 6:return delete a["Content-Type"],e.abrupt("break",10);case 8:return a["Content-Type"]="application/json",e.abrupt("break",10);case 10:if(!h.isomorphy.isClientSide()&&!h.isomorphy.isDevBuild()){e.next=19;break}if(u=Date.now(),!((b+=v)>u)){e.next=18;break}return e.next=16,(0,m.delay)(b-u);case 16:e.next=19;break;case 18:b=u;case 19:return e.abrupt("return",(0,p.default)(""+r+t,(0,s.default)({},l,{headers:a})).catch(function(e){throw(0,g.setErrorIcon)(g.ERROR_ICON_TYPES.NETWORK,""+r+t,e.message),e}));case 20:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"delete",value:function(e,t){return this.fetch(e,{body:t,method:"DELETE"})}},{key:"get",value:function(e){return this.fetch(e)}},{key:"post",value:function(e,t){return this.fetch(e,{body:t,method:"POST"})}},{key:"postJson",value:function(e,t){return this.post(e,(0,a.default)(t))}},{key:"put",value:function(e,t){return this.fetch(e,{body:t,method:"PUT"})}},{key:"putJson",value:function(e,t){return this.put(e,(0,a.default)(t))}},{key:"patch",value:function(e,t){return this.fetch(e,{body:t,method:"PATCH"})}},{key:"patchJson",value:function(e,t){return this.patch(e,(0,a.default)(t))}},{key:"upload",value:function(e,t,n){var a=this.private,i=a.base,s=a.token,u=t.headers?f.default.clone(t.headers):{};return s&&(u.Authorization="Bearer "+s),h.isomorphy.isClientSide()?new o.default(function(o,a){var s=new XMLHttpRequest;s.open(t.method,""+i+e),(0,r.default)(u).forEach(function(e){null!=u[e]&&s.setRequestHeader(e,u[e])}),s.onload=function(e){return o(e.target.responseText)},s.onerror=a,s.upload&&n&&(s.upload.onprogress=function(e){e.lengthComputable&&n(e.loaded/e.total)}),s.send(t.body)}):this.fetch(e,t)}}]),e}();t.default=_;var w={};function E(e,t){if(!e||!h.config.API[e])throw new Error(e+" is not a valid API version");return w[e]&&w[e].private.token===t||(w[e]=new _(h.config.API[e],t)),w[e]}t.getApiV2=function(e){return E("V2",e)},t.getApiV3=function(e){return E("V3",e)},t.getApiV4=function(e){return E("V4",e)};d.MIN_LIFETIME=3e4},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__8__},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__9__},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__10__},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(15)),o=i(n(0)),a=n(8);function i(e){return e&&e.__esModule?e:{default:e}}var s={};o.default.functions(console).forEach(function(e){s[e]=a.isomorphy.isDevBuild()||a.isomorphy.isServerSide()?console[e]:o.default.noop});var u=void 0;if(a.isomorphy.isServerSide()){var l=a.config.LOG_ENTRIES_TOKEN;if(l){var c=n(56);u=new c({token:l})}}else{var d=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o=500&&(0,y.setErrorIcon)(y.ERROR_ICON_TYPES.API,"/challenges",t.statusText),new Error(t.statusText);case 3:return e.next=5,t.json();case 5:if(200===(n=e.sent.result).status){e.next=8;break}throw new Error(n.content);case 8:return e.abrupt("return",n);case 9:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}();t.normalizeChallengeDetails=w,t.normalizeChallenge=E,t.getService=function(e,t){C&&C.private.tokenV3===e&&C.tokenV2===t||(C=new T(e,t));return C};var f=_(n(0)),p=_(n(20)),h=_(n(14)),m=n(17),g=_(n(11)),y=n(12),v=n(13),b=n(7);function _(e){return e&&e.__esModule?e:{default:e}}t.ORDER_BY={SUBMISSION_END_DATE:"submissionEndDate"};function w(e,t,n,r){var o=(0,c.default)({},e,{id:e.challengeId,reliabilityBonus:f.default.get(t,"reliabilityBonus",0),status:(e.currentStatus||"").toUpperCase(),allPhases:[],currentPhases:[],name:e.challengeName||e.challengeTitle,projectId:Number(e.projectId),forumId:Number(e.forumId),introduction:e.introduction||"",detailedRequirements:"null"===e.detailedRequirements?"":e.detailedRequirements,finalSubmissionGuidelines:"null"===e.finalSubmissionGuidelines?"":e.finalSubmissionGuidelines,screeningScorecardId:Number(e.screeningScorecardId),reviewScorecardId:Number(e.reviewScorecardId),numberOfCheckpointsPrizes:e.numberOfCheckpointsPrizes,topCheckPointPrize:e.topCheckPointPrize,submissionsViewable:e.submissionsViewable||"false",reviewType:e.reviewType,allowStockArt:"true"===e.allowStockArt,fileTypes:e.filetypes||[],environment:e.environment,codeRepo:e.codeRepo,forumLink:e.forumLink,submissionLimit:Number(e.submissionLimit)||0,drPoints:e.digitalRunPoints,directUrl:e.directUrl,technologies:e.technologies||e.technology||[],platforms:e.platforms||[],prizes:e.prize||e.prizes||[],events:f.default.map(e.event,function(e){return{eventName:e.eventShortDesc,eventId:e.id,description:e.eventDescription}}),terms:e.terms,submissions:e.submissions,track:f.default.toUpper(e.challengeCommunity),subTrack:e.subTrack,checkpoints:e.checkpoints,documents:e.documents||[],numRegistrants:e.numberOfRegistrants,numberOfCheckpointSubmissions:e.numberOfCheckpointSubmissions,registrants:e.registrants||[]});if(o.winners=f.default.map(e.winners,function(e,t){return(0,c.default)({},e,{handle:e.submitter,placement:e.rank||t+1})}),"MARATHON_MATCH"===o.subTrack&&(o.track="DATA_SCIENCE"),o.mainEvent=o.events[0]||{},t){var a={};t.groupIds&&t.groupIds.forEach(function(e){a[e]=!0}),f.default.merge(o,{componentId:t.componentId,contestId:t.contestId,submissionEndDate:t.submissionEndDate,submissionEndTimestamp:t.submissionEndDate,allPhases:t.allPhases||[],currentPhases:t.currentPhases||[],numSubmissions:t.numSubmissions,groups:a})}n&&f.default.defaults(o,{userDetails:n.userDetails});var i=f.default.some(o.allPhases,function(e){return"Registration"===e.phaseType&&"Open"===e.phaseStatus})?"Yes":"No";return f.default.defaults(o,{communities:new l.default([v.COMPETITION_TRACKS[o.track]]),registrationOpen:i,users:r?(0,u.default)({},r,!0):{}}),o.submissions&&o.submissions.length||(o.submissions=o.registrants.filter(function(e){return e.submissionDate||""}).sort(function(e,t){return(e.submissionDate||"").localeCompare(t.submissionDate||"")})),o.allPhases||(o.allPhases=[]),o.track||(o.track=""),o}function E(e,t){var n="Open"===e.allPhases.filter(function(e){return"Registration"===e.phaseType})[0].phaseStatus?"Yes":"No",r={};e.groupIds&&e.groupIds.forEach(function(e){r[e]=!0}),e.prizes||(e.prizes=e.prize||[]),e.totalPrize||(e.totalPrize=e.prizes.reduce(function(e,t){return e+t},0)),e.technologies||(e.technologies=[]),e.platforms||(e.platforms=[]),"DEVELOP_MARATHON_MATCH"===e.subTrack&&(e.track="DATA_SCIENCE"),f.default.defaults(e,{communities:new l.default([v.COMPETITION_TRACKS[e.track]]),groups:r,registrationOpen:n,submissionEndTimestamp:e.submissionEndDate,users:t?(0,u.default)({},t,!0):{}})}var T=function(){function e(t,n){var r=this;(0,o.default)(this,e);var a=function(){var e=(0,s.default)(i.default.mark(function e(t){var n,o,a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=(0,c.default)({filter:h.default.stringify(s,{encode:!1})},u),o=t+"?"+h.default.stringify(n),e.next=4,r.private.api.get(o).then(d);case 4:return a=e.sent,e.abrupt("return",{challenges:a.content||[],totalCount:a.metadata.totalCount,meta:a.metadata});case 6:case"end":return e.stop()}},e,r)}));return function(t){return e.apply(this,arguments)}}();this.private={api:(0,b.getApi)("V4",t),apiV2:(0,b.getApi)("V2",n),getChallenges:a,tokenV2:n,tokenV3:t}}return(0,a.default)(e,[{key:"activate",value:function(){var e=(0,s.default)(i.default.mark(function e(t){var n;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.post("/challenges/"+t+"/activate");case 2:if((n=e.sent).ok){e.next=5;break}throw new Error(n.statusText);case 5:return e.next=7,n.json();case 7:if(200===(n=e.sent.result).status){e.next=10;break}throw new Error(n.content);case 10:return e.abrupt("return",n.content);case 11:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"close",value:function(){var e=(0,s.default)(i.default.mark(function e(t,n){var r,o;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r="/challenges/"+t+"/close",n&&(r=r+"?winnerId="+n),e.next=4,this.private.api.post(r);case 4:if((o=e.sent).ok){e.next=7;break}throw new Error(o.statusText);case 7:return e.next=9,o.json();case 9:if(200===(o=e.sent.result).status){e.next=12;break}throw new Error(o.content);case 12:return e.abrupt("return",o.content);case 13:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}()},{key:"createTask",value:function(){var e=(0,s.default)(i.default.mark(function e(t,n,r,o,a,s,u,l,c,d){var h,m;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return h={param:{assignees:[a],billingAccountId:n,confidentialityType:"public",detailedRequirements:o,submissionGuidelines:u,milestoneId:1,name:r,technologies:d,prizes:s?[s]:[],projectId:t,registrationStartsAt:(0,p.default)().toISOString(),reviewType:"INTERNAL",subTrack:"FIRST_2_FINISH",task:!0}},l&&f.default.assign(h.param,{copilotId:l,copilotFee:c}),e.next=4,this.private.api.postJson("/challenges",h);case 4:if((m=e.sent).ok){e.next=7;break}throw new Error(m.statusText);case 7:return e.next=9,m.json();case 9:if(200===(m=e.sent.result).status){e.next=12;break}throw new Error(m.content);case 12:return e.abrupt("return",m.content);case 13:case"end":return e.stop()}},e,this)}));return function(t,n,r,o,a,i,s,u,l,c){return e.apply(this,arguments)}}()},{key:"getChallengeDetails",value:function(){var e=(0,s.default)(i.default.mark(function e(t){var n,r,o,a,s;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/challenges/"+t).then(d).then(function(e){return e.content});case 2:return n=e.sent,e.next=5,this.private.getChallenges("/challenges/",{id:t}).then(function(e){return e.challenges[0]});case 5:if(r=e.sent,o=this.private.tokenV3&&(0,m.decodeToken)(this.private.tokenV3).handle,e.t0=o,!e.t0){e.next=12;break}return e.next=11,this.getUserChallenges(o,{id:t}).then(function(e){return e.challenges[0]}).catch(function(){return null});case 11:e.t0=e.sent;case 12:return a=e.t0,(s=w(n,r,a,o)).fetchedWithAuth=Boolean(this.private.api.private.token),e.abrupt("return",s);case 16:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getChallengeSubtracks",value:function(){return this.private.api.get("/challenge-types").then(function(e){return e.ok?e.json():new Error(e.statusText)}).then(function(e){return 200===e.result.status?e.result.content:new Error(e.result.content)})}},{key:"getChallengeTags",value:function(){return this.private.api.get("/technologies").then(function(e){return e.ok?e.json():new Error(e.statusText)}).then(function(e){return 200===e.result.status?e.result.content:new Error(e.result.content)})}},{key:"getChallenges",value:function(e,t){return this.private.getChallenges("/challenges/",e,t).then(function(e){return e.challenges.forEach(function(e){return E(e)}),e})}},{key:"getSrms",value:function(){var e=(0,s.default)(i.default.mark(function e(t){var n;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/srms/?"+h.default.stringify(t));case 2:return n=e.sent,e.abrupt("return",(0,v.getApiResponsePayload)(n));case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getUserChallenges",value:function(e,t,n){var r="/members/"+e.toLowerCase()+"/challenges/";return this.private.getChallenges(r,t,n).then(function(t){return t.challenges.forEach(function(t){return E(t,e)}),t})}},{key:"getUserMarathonMatches",value:function(e,t,n){var r="/members/"+e.toLowerCase()+"/mms/";return this.private.getChallenges(r,t,n)}},{key:"getUserSrms",value:function(){var e=(0,s.default)(i.default.mark(function e(t,n){var r,o;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r="/members/"+t+"/srms/?"+h.default.stringify(n),e.next=3,this.private.api.get(r);case 3:return o=e.sent,e.abrupt("return",(0,v.getApiResponsePayload)(o));case 5:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}()},{key:"register",value:function(){var e=(0,s.default)(i.default.mark(function e(t){var n,r;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n="/challenges/"+t+"/register",e.next=3,this.private.api.postJson(n);case 3:if((r=e.sent).ok){e.next=6;break}throw new Error(r.statusText);case 6:return e.abrupt("return",r.json());case 7:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"unregister",value:function(){var e=(0,s.default)(i.default.mark(function e(t){var n,r;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n="/challenges/"+t+"/unregister",e.next=3,this.private.api.post(n);case 3:if((r=e.sent).ok){e.next=6;break}throw new Error(r.statusText);case 6:return e.abrupt("return",r.json());case 7:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getActiveChallengesCount",value:function(e){return this.getUserChallenges(e,{status:"ACTIVE"},{limit:1,offset:0}).then(function(e){return e.totalCount})}},{key:"submit",value:function(e,t,n,o){var a=void 0,i=void 0,s=void 0;return"DESIGN"===n?(a=this.private.api,i="application/json",s="/submissions/"):(a=this.private.apiV2,i=null,s="/develop/challenges/"+t+"/upload"),a.upload(s,{body:e,headers:{"Content-Type":i},method:"POST"},o).then(function(e){var t=JSON.parse(e);if("DEVELOP"===n)return t;var s=t.result.content.id;return a.upload("/submissions/"+s+"/process/",{body:(0,r.default)({param:t.result.content}),headers:{"Content-Type":i},method:"POST"},o).then(function(e){return JSON.parse(e)})},function(e){throw g.default.error("Failed to submit to the challenge #"+t,e),e})}},{key:"updateChallenge",value:function(){var e=(0,s.default)(i.default.mark(function e(t){var n,r,o;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n="/challenges/"+t.id,r={param:t},e.next=4,this.private.api.putJson(n,r);case 4:if((o=e.sent).ok){e.next=7;break}throw new Error(o.statusText);case 7:return e.next=9,o.json();case 9:if(200===(o=e.sent.result).status){e.next=12;break}throw new Error(o.content);case 12:return e.abrupt("return",o.content);case 13:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()}]),e}(),C=null;t.default=void 0},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__19__},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__20__},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0)),o=n(2);t.default=(0,o.createActions)({ERRORS:{CLEAR_ERROR:r.default.noop,NEW_ERROR:function(e,t){return{title:e,details:t}},CLEAR_ALL_ERROR_ICONS:r.default.noop,SET_ERROR_ICON:function(e,t,n){return{id:e,title:t,message:n}},CLEAR_ERROR_ICON:function(e){return{id:e}}}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0)),o=n(2),a=n(7);t.default=(0,o.createActions)({SMP:{DELETE_SUBMISSION_DONE:function(e,t){return(0,a.getApi)("V3",e).delete("/submissions/"+t).then(function(){return t})},DELETE_SUBMISSION_INIT:function(){},DOWNLOAD_SUBMISSION:function(e,t,n){r.default.noop(e,t,n)}}})},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__23__},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=p(n(4)),o=p(n(5)),a=p(n(1)),i=p(n(9)),s=p(n(10)),u=p(n(23));t.addDescendantGroups=function(e,t){var n=l.default.isArray(e)?e:[e],r=new u.default,o=0;for(;o1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=[],o=[],a=[],i=[],s=Date.now(),c=new u.default;return(l.default.isArray(e)?e:[e]).forEach(function(e){if(!c.has(e)){c.add(e);var u=t[e];u||i.push(e),u&&(s-u.timestamp||0)1&&void 0!==arguments[1])||arguments[1])&&(t+="/getSubGroups?includeSubGroups=true&oneLevel=false"),this.private.api.get(t).then(m)}},{key:"getGroupMap",value:function(e){var t=this,n={},r=new u.default,o=(l.default.isArray(e)?e:[e]).map(function(e){return r.has(e)?null:(r.add(e),t.getGroup(e).then(function(e){return function e(t,n){var r=n.subGroups;n.timestamp=Date.now(),r&&r.length&&(n.subGroupIds=r.map(function(e){return e.id}),r.forEach(function(n){return e(t,n)})),delete n.subGroups,t[n.id]=n}(n,e)}).catch(function(t){d.default.error("Failed to get user group #"+e,t),n[e]={id:e,timestamp:Date.now()}}))});return a.default.all(o).then(function(){return n})}},{key:"getGroupTreeIds",value:function(){var e=(0,o.default)(r.default.mark(function e(t){var n,o,a,i,s,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3e5;return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=Date.now(),o=this.private.cache.groupTreeIds,a=864e5,n-o.lastCleanUp>a&&(l.default.forOwn(o,function(e,t){var r=e.timestamp;n-r>a&&delete o[t]}),o.lastCleanUp=n),!((i=o[t])&&n-i.timestamp0&&void 0!==arguments[0]&&arguments[0]}}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=h(n(15)),o=h(n(1)),a=h(n(4)),i=h(n(5)),s=h(n(9)),u=h(n(10)),l=h(n(16));t.getService=function(e,t){b&&b.private.tokenV2===t&&b.private.tokenV3===e||(b=new v(e,t));return b};var c=n(8),d=h(n(11)),f=n(13),p=n(7);function h(e){return e&&e.__esModule?e:{default:e}}var m=void 0;function g(){if(!m&&c.isomorphy.isClientSide()){var e=n(64);m=new e({domain:c.config.AUTH0.DOMAIN,clientID:c.config.AUTH0.CLIENT_ID,callbackOnLocationHash:!0,sso:!1})}return m}function y(e,t){var n=e.identities[0].connection,r="",o="",a="",i=e.email||"",s=e.user_id.substring(e.user_id.lastIndexOf("|")+1),u=void 0;if("google-oauth2"===n)r=e.given_name,o=e.family_name,a=e.nickname;else if("facebook"===n)a=(r=e.given_name)+"."+(o=e.family_name);else if("twitter"===n){var c=u=e.name.split(" ");if(r=(0,l.default)(c,1)[0],u.length>1){var d=u;o=(0,l.default)(d,2)[1]}a=e.screen_name}else if("github"===n){var f=u=e.name.split(" ");if(r=(0,l.default)(f,1)[0],u.length>1){var p=u;o=(0,l.default)(p,2)[1]}a=e.nickname}else"bitbucket"===n?(r=e.first_name,o=e.last_name,a=e.username):"stackoverflow"===n?(r=e.first_name,o=e.last_name,a=s):"dribbble"===n&&(r=e.first_name,o=e.last_name,a=s);var h=t,m=null;return e.identities[0].access_token&&(h=e.identities[0].access_token),e.identities[0].access_token_secret&&(m=e.identities[0].access_token_secret),{socialUserId:s,username:a,firstname:r,lastname:o,email:i,socialProfile:e,socialProvider:n,accessToken:h,accessTokenSecret:m}}var v=function(){function e(t,n){(0,s.default)(this,e),this.private={api:(0,p.getApi)("V3",t),apiV2:(0,p.getApi)("V2",n),tokenV2:n,tokenV3:t}}return(0,u.default)(e,[{key:"getAchievements",value:function(){var e=(0,i.default)(a.default.mark(function e(t){var n;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.apiV2.get("/users/"+t);case 2:if((n=e.sent).ok){e.next=5;break}throw new Error(n.statusText);case 5:return e.next=7,n.json();case 7:if(e.t0=e.sent.Achievements,e.t0){e.next=10;break}e.t0=[];case 10:return e.abrupt("return",e.t0);case 11:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getUserPublic",value:function(){var e=(0,i.default)(a.default.mark(function e(t){var n;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.apiV2.get("/users/"+t);case 2:if((n=e.sent).ok){e.next=5;break}throw new Error(n.statusText);case 5:return e.abrupt("return",n.json()||null);case 6:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getUser",value:function(){var e=(0,i.default)(a.default.mark(function e(t){var n,r;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n="/users?filter=handle%3D"+t,e.next=3,this.private.api.get(n);case 3:return r=e.sent,e.next=6,(0,f.getApiResponsePayload)(r);case 6:return e.abrupt("return",e.sent[0]);case 7:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getEmailPreferences",value:function(){var e=(0,i.default)(a.default.mark(function e(t){var n,r,o;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n="/users/"+t+"/preferences/email",e.next=3,this.private.api.get(n);case 3:return r=e.sent,e.next=6,r.json();case 6:return o=e.sent.result,e.abrupt("return",o.content);case 8:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"saveEmailPreferences",value:function(){var e=(0,i.default)(a.default.mark(function e(t,n){var r,o,i,s=t.firstName,u=t.lastName,l=t.userId;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r={firstName:s,lastName:u,subscriptions:{}},n?r.subscriptions=n:r.subscriptions.TOPCODER_NL_GEN=!0,o="/users/"+l+"/preferences/email",e.next=5,this.private.api.putJson(o,{param:r});case 5:return i=e.sent,e.abrupt("return",(0,f.getApiResponsePayload)(i));case 7:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}()},{key:"getCredential",value:function(){var e=(0,i.default)(a.default.mark(function e(t){var n,r;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n="/users/"+t+"?fields=credential",e.next=3,this.private.api.get(n);case 3:return r=e.sent,e.abrupt("return",(0,f.getApiResponsePayload)(r));case 5:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"updatePassword",value:function(){var e=(0,i.default)(a.default.mark(function e(t,n,r){var o,i,s;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o={password:n,currentPassword:r},i="/users/"+t,e.next=4,this.private.api.patchJson(i,{param:{credential:o}});case 4:return s=e.sent,e.abrupt("return",(0,f.getApiResponsePayload)(s));case 6:case"end":return e.stop()}},e,this)}));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"getLinkedAccounts",value:function(){var e=(0,i.default)(a.default.mark(function e(t){var n,r;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n="/users/"+t+"?fields=profiles",e.next=3,this.private.api.get(n);case 3:return r=e.sent,e.abrupt("return",(0,f.getApiResponsePayload)(r));case 5:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"unlinkExternalAccount",value:function(){var e=(0,i.default)(a.default.mark(function e(t,n){var r,o;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r="/users/"+t+"/profiles/"+n,e.next=3,this.private.api.delete(r);case 3:return o=e.sent,e.abrupt("return",(0,f.getApiResponsePayload)(o));case 5:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}()},{key:"linkExternalAccount",value:function(){var e=(0,i.default)(a.default.mark(function e(t,n,i){var s=this;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new o.default(function(e,o){g().signin({popup:!0,connection:n,scope:"openid profile offline_access",state:i},function(n,a,i,u){if(n)return d.default.error("Error signing in - onSocialLoginFailure",n),void o(n);var l=y(a,u),c={userId:l.socialUserId,name:l.username,email:l.email,emailVerified:!1,providerType:l.socialProvider,context:{handle:l.username,accessToken:l.accessToken,auth0UserId:a.user_id}};l.accessTokenSecret&&(c.context.accessTokenSecret=l.accessTokenSecret),d.default.debug("link API postdata: "+(0,r.default)(c)),s.private.api.postJson("/users/"+t+"/profiles",{param:c}).then(function(t){return(0,f.getApiResponsePayload)(t).then(function(t){d.default.debug("Succesfully linked account: "+(0,r.default)(t)),e(c)})}).catch(function(e){d.default.error("Error linking account",e),o(e)})})}));case 1:case"end":return e.stop()}},e,this)}));return function(t,n,r){return e.apply(this,arguments)}}()}]),e}(),b=null;t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=g(n(90)),o=g(n(1)),a=g(n(6)),i=g(n(15)),s=g(n(4)),u=g(n(5)),l=g(n(9)),c=g(n(10));t.getService=function(e){v&&e===v.private.tokenV3||(v=new y(e));return v};var d=g(n(0)),f=g(n(14)),p=g(n(11)),h=n(13),m=n(7);function g(e){return e&&e.__esModule?e:{default:e}}var y=function(){function e(t){(0,l.default)(this,e),this.private={api:(0,m.getApi)("V3",t),tokenV3:t}}return(0,c.default)(e,[{key:"getMemberFinances",value:function(){var e=(0,u.default)(s.default.mark(function e(t){var n;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/members/"+t+"/financial");case 2:return n=e.sent,e.abrupt("return",(0,h.getApiResponsePayload)(n));case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getMemberInfo",value:function(){var e=(0,u.default)(s.default.mark(function e(t){var n;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/members/"+t);case 2:return n=e.sent,e.abrupt("return",(0,h.getApiResponsePayload)(n));case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getExternalAccounts",value:function(){var e=(0,u.default)(s.default.mark(function e(t){var n;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/members/"+t+"/externalAccounts");case 2:return n=e.sent,e.abrupt("return",(0,h.getApiResponsePayload)(n));case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getExternalLinks",value:function(){var e=(0,u.default)(s.default.mark(function e(t){var n;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/members/"+t+"/externalLinks");case 2:return n=e.sent,e.abrupt("return",(0,h.getApiResponsePayload)(n));case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getSkills",value:function(){var e=(0,u.default)(s.default.mark(function e(t){var n;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/members/"+t+"/skills");case 2:return n=e.sent,e.abrupt("return",(0,h.getApiResponsePayload)(n));case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getStats",value:function(){var e=(0,u.default)(s.default.mark(function e(t){var n;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/members/"+t+"/stats");case 2:return n=e.sent,e.abrupt("return",(0,h.getApiResponsePayload)(n));case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getStatsHistory",value:function(){var e=(0,u.default)(s.default.mark(function e(t){var n;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/members/"+t+"/stats/history");case 2:return n=e.sent,e.abrupt("return",(0,h.getApiResponsePayload)(n));case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getStatsDistribution",value:function(){var e=(0,u.default)(s.default.mark(function e(t,n,r){var o;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/members/stats/distribution?filter="+encodeURIComponent(f.default.stringify({track:n,subTrack:r})));case 2:return o=e.sent,e.abrupt("return",(0,h.getApiResponsePayload)(o));case 4:case"end":return e.stop()}},e,this)}));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"getMemberSuggestions",value:function(){var e=(0,u.default)(s.default.mark(function e(t){var n;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/members/_suggest/"+t);case 2:return n=e.sent,e.abrupt("return",(0,h.getApiResponsePayload)(n));case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"addWebLink",value:function(){var e=(0,u.default)(s.default.mark(function e(t,n){var r;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.postJson("/members/"+t+"/externalLinks",{param:{url:n}});case 2:return r=e.sent,e.abrupt("return",(0,h.getApiResponsePayload)(r));case 4:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}()},{key:"deleteWebLink",value:function(){var e=(0,u.default)(s.default.mark(function e(t,n){var r,o;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r={param:{handle:n}},e.next=3,this.private.api.delete("/members/"+t+"/externalLinks/"+n,(0,i.default)(r));case 3:return o=e.sent,e.abrupt("return",(0,h.getApiResponsePayload)(o));case 5:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}()},{key:"addSkill",value:function(){var e=(0,u.default)(s.default.mark(function e(t,n){var r,o;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r={param:{skills:(0,a.default)({},n,{hidden:!1})}},e.next=3,this.private.api.patchJson("/members/"+t+"/skills",r);case 3:return o=e.sent,e.abrupt("return",(0,h.getApiResponsePayload)(o));case 5:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}()},{key:"hideSkill",value:function(){var e=(0,u.default)(s.default.mark(function e(t,n){var r,o;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r={param:{skills:(0,a.default)({},n,{hidden:!0})}},e.next=3,this.private.api.fetch("/members/"+t+"/skills",{body:(0,i.default)(r),method:"PATCH"});case 3:return o=e.sent,e.abrupt("return",(0,h.getApiResponsePayload)(o));case 5:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}()},{key:"updateMemberProfile",value:function(){var e=(0,u.default)(s.default.mark(function e(t){var n,a;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.verifyUrl?"/members/"+t.handle+"?verifyUrl="+t.verifyUrl:"/members/"+t.handle,e.next=3,this.private.api.putJson(n,{param:t.verifyUrl?d.default.omit(t,["verifyUrl"]):t});case 3:if(a=e.sent,!t.verifyUrl||409!==a.status){e.next=6;break}return e.abrupt("return",o.default.resolve((0,r.default)({},t,{isEmailConflict:!0})));case 6:return e.abrupt("return",(0,h.getApiResponsePayload)(a));case 7:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getPresignedUrl",value:function(){var e=(0,u.default)(s.default.mark(function e(t,n){var r,o;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.postJson("/members/"+t+"/photoUploadUrl",{param:{contentType:n.type}});case 2:return r=e.sent,e.next=5,(0,h.getApiResponsePayload)(r);case 5:return o=e.sent,e.abrupt("return",{preSignedURL:o.preSignedURL,token:o.token,file:n,userHandle:t});case 7:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}()},{key:"updateMemberPhoto",value:function(){var e=(0,u.default)(s.default.mark(function e(t){var n;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.putJson("/members/"+t.userHandle+"/photo",{param:t.body});case 2:return n=e.sent,e.abrupt("return",(0,h.getApiResponsePayload)(n));case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"uploadFileToS3",value:function(e){return d.default.noop(this),new o.default(function(t,n){var r=new XMLHttpRequest;r.open("PUT",e.preSignedURL,!0),r.setRequestHeader("Content-Type",e.file.type),r.onreadystatechange=function(){var o=r.status;if((o>=200&&o<300||304===o)&&4===r.readyState)t({userHandle:e.userHandle,body:{token:e.token,contentType:e.file.type}});else if(o>=400){var a=new Error("Could not upload image to S3");a.status=o,n(a)}},r.onerror=function(e){p.default.error("Could not upload image to S3",e),n(e)},r.send(e.file)})}},{key:"verifyMemberNewEmail",value:function(){var e=(0,u.default)(s.default.mark(function e(t,n){var r;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/members/"+t+"/verify?token="+n);case 2:return r=e.sent,e.abrupt("return",(0,h.getApiResponsePayload)(r));case 4:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}()}]),e}(),v=null;t.default=void 0},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(3)),o=l(n(16)),a=l(n(1)),i=n(2),s=n(17),u=n(7);function l(e){return e&&e.__esModule?e:{default:e}}t.default=(0,i.createActions)({AUTH:{LOAD_PROFILE:function(e){if(!e)return a.default.resolve(null);var t=(0,s.decodeToken)(e),n=(0,u.getApi)("V3",e);return a.default.all([n.get("/members/"+t.handle).then(function(e){return e.json()}).then(function(e){return 200===e.result.status?e.result.content:{}}),n.get("/groups?memberId="+t.userId+"&membershipType=user").then(function(e){return e.json()}).then(function(e){return 200===e.result.status?e.result.content:[]})]).then(function(e){var t=(0,o.default)(e,2),n=t[0],a=t[1];return(0,r.default)({},n,{groups:a})})},SET_TC_TOKEN_V2:function(e){return e},SET_TC_TOKEN_V3:function(e){return e}}})},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__29__},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatDuration=t.delay=void 0;var r=s(n(4)),o=s(n(1)),a=s(n(5)),i=(t.delay=function(){var e=(0,a.default)(r.default.mark(function e(t){return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new o.default(function(e){return setTimeout(function(){return e()},t)}));case 1:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),s(n(20)));function s(e){return e&&e.__esModule?e:{default:e}}n(54);t.formatDuration=function(e){var t=void 0;return t=e>864e5?"D[d] H[h]":e>36e5?"H[h] m[min]":"m[min] s[s]",i.default.duration(e).format(t)};t.default=void 0},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(4)),o=c(n(5)),a=function(){var e=(0,o.default)(r.default.mark(function e(t,n,o,a){var s,c,d,f,p,h;return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,s=o.filter(function(e){return"ACTIVE"===e.status}),t.challengeFilter&&(c=u.getFilterFunction(t.challengeFilter),s=s.filter(c)),d=Math.round(s.reduce(function(e,t){return e+(t.totalPrize||0)},0)),f=(0,l.getService)(a),p={community:t.communityId,stats:{},uuid:n},s.length&&(p.stats.numChallenges=s.length),d&&(p.stats.openPrizes="$"+d.toLocaleString()),!(h=i.default.get(t,"groupIds[0]"))){e.next=13;break}return e.next=12,f.getMembersCount(h,!0);case 12:p.stats.numMembers=e.sent;case 13:return e.abrupt("return",p);case 16:return e.prev=16,e.t0=e.catch(0),e.abrupt("return",{community:t.communityId,stats:{},uuid:n});case 19:case"end":return e.stop()}},e,this,[[0,16]])}));return function(t,n,r,o){return e.apply(this,arguments)}}(),i=c(n(0)),s=n(2),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(32)),l=n(24);function c(e){return e&&e.__esModule?e:{default:e}}t.default=(0,s.createActions)({STATS:{GET_COMMUNITY_STATS_INIT:function(e,t){return{community:e.communityId,uuid:t}},GET_COMMUNITY_STATS_DONE:a}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(23)),o=u(n(3));t.addTrack=function(e,t){if(!e.tracks)return e;var n=a.default.clone(e);n.tracks=a.default.clone(n.tracks),n.tracks[t]=!0,a.default.values(s.COMPETITION_TRACKS).some(function(e){return!n.tracks[e]})||delete n.tracks;return n},t.getFilterFunction=function e(t){return function(n){var r=function(e,t){return!t.status||t.status.includes(e.status)}(n,t)&&h(n,t)&&function(e,t){return!!a.default.isUndefined(t.upcoming)||(0,i.default)().isBefore(e.registrationStartDate)}(n,t)&&function(e,t){return!t.groupIds||t.groupIds.some(function(t){return e.groups[t]})}(n,t)&&p(n,t)&&f(n,t)&&d(n,t)&&function(e,t){return!t.users||t.users.find(function(t){return e.users[t]})}(n,t)&&l(n,t)&&c(n,t)&&function(e,t){return!!a.default.isUndefined(t.started)||(0,i.default)(e.registrationStartDate).isBefore(Date.now())}(n,t)&&function(e,t){return!!a.default.isUndefined(t.registrationOpen)||function(){if(e.registrationOpen)return"Yes"===e.registrationOpen;if("MARATHON_MATCH"===e.subTrack)return"PAST"!==e.status;var t=e.allPhases.find(function(e){return"Registration"===e.phaseType});if(!t||"Open"!==t.phaseStatus)return!1;if("DESIGN"===e.track){var n=e.allPhases.find(function(e){return"Checkpoint Submission"===e.phaseType});return!n||"Closed"!==n.phaseStatus}return!0}()===t.registrationOpen}(n,t);if(!r&&t.or)for(var o=0;!r&&o3&&void 0!==arguments[3]&&arguments[3];e[n]&&t[n]?e[n]=r?a.default.uniq(e[n].concat(t[n])):a.default.intersection(e[n],t[n]):t[n]&&(e[n]=t[n])}t.default=void 0},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(1)),o=u(n(0)),a=n(2),i=n(8),s=n(34);function u(e){return e&&e.__esModule?e:{default:e}}function l(e,t,n){var r=(0,s.getService)(t.tokenV2),o=void 0,a=n?Array(11).join("1").split("").map(function(){return!0}):[];switch(e.type){case"challenge":o=r.getChallengeTerms(e.id,a);break;case"community":o=r.getCommunityTerms(e.id,t.tokenV3,a);break;case"reviewOpportunity":o=r.getReviewOpportunityTerms(e.reviewOpportunityTerms);break;default:throw new Error("Entity type '"+e.type+"' is not supported by getTermsDone.")}return o.then(function(t){return{entity:e,terms:t.terms}})}t.default=(0,a.createActions)({TERMS:{GET_TERMS_INIT:function(e){return e},GET_TERMS_DONE:l,GET_TERM_DETAILS_INIT:function(e){return o.default.toString(e)},GET_TERM_DETAILS_DONE:function(e,t){return(0,s.getService)(t).getTermDetails(e).then(function(t){return{termId:e,details:t}})},GET_DOCU_SIGN_URL_INIT:function(e){return o.default.toString(e)},GET_DOCU_SIGN_URL_DONE:function(e,t,n){return(0,s.getService)(n).getDocuSignUrl(e,t).then(function(t){return{templateId:e,docuSignUrl:t.recipientViewUrl}})},AGREE_TERM_INIT:function(e){return o.default.toString(e)},AGREE_TERM_DONE:function(e,t){return(0,s.getService)(t).agreeTerm(e).then(function(t){return{termId:e,success:t.success}})},CHECK_STATUS_INIT:function(){},CHECK_STATUS_DONE:function(e,t){var n=i.config.MOCK_TERMS_SERVICE;return function a(i){return l(e,t,n).then(function(e){return!o.default.every(e.terms,"agreed")&&i>1?function(e){return new r.default(function(t){setTimeout(t,e)})}(5e3).then(function(){return a(i-1)}):e.terms})}(5)}}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(1)),o=c(n(9)),a=c(n(10));t.getService=function(e){if(s.config.MOCK_TERMS_SERVICE)return n(57).getService(e);(!f||e&&f.private.tokenV2!==e)&&(f=new d(e));return f};var i=c(n(0)),s=n(8),u=n(35),l=n(7);function c(e){return e&&e.__esModule?e:{default:e}}var d=function(){function e(t){(0,o.default)(this,e),this.private={api:(0,l.getApi)("V2",t),tokenV2:t}}return(0,a.default)(e,[{key:"getChallengeTerms",value:function(e){var t=this;if(this.private.tokenV2){var n=!1;return this.private.api.get("/terms/"+e+"?role=Submitter").then(function(e){return e.json()}).then(function(r){return r.error?("You are already registered for this challenge."===r.error.details&&(n=!0),t.private.api.get("/terms/"+e+"?role=Submitter&noauth=true").then(function(e){return e.ok?e.json().then(function(e){return n&&i.default.forEach(e.terms,function(e){e.agreed=!0}),e}):new Error(e.statusText)})):r})}return this.private.api.get("/terms/"+e+"?role=Submitter&noauth=true").then(function(e){if(e.ok)return e.json();throw new Error(e.statusText)})}},{key:"getCommunityTerms",value:function(e,t){var n=this;return(0,u.getService)(t).getMetadata(e).then(function(e){return e.terms&&e.terms.length?r.default.all(e.terms.map(function(e){return n.getTermDetails(e)})).then(function(e){return e.map(function(e){return i.default.omit(e,"text")})}):[]}).then(function(e){return{terms:e}})}},{key:"getReviewOpportunityTerms",value:function(e){var t=this,n=e.map(function(e){return e.agreed?r.default.resolve(e):t.getTermDetails(e.termsOfUseId).then(function(e){return i.default.pick(e,["termsOfUseId","agreed","title"])})});return r.default.all(n).then(function(e){return{terms:e}})}},{key:"getTermDetails",value:function(e){var t=(new Date).getTime();return this.private.api.get("/terms/detail/"+e+"?nocache="+t).then(function(e){return e.ok?e.json():r.default.reject(e.json())})}},{key:"getDocuSignUrl",value:function(e,t){return this.private.api.post("/terms/docusign/viewURL?templateId="+e+"&returnUrl="+t).then(function(e){return e.ok?e.json():r.default.reject(e.json())})}},{key:"agreeTerm",value:function(e){return this.private.api.post("/terms/"+e+"/agree").then(function(e){return e.ok?e.json():r.default.reject(e.json())})}}]),e}(),f=null;t.default=void 0},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(4)),o=d(n(5)),a=d(n(9)),i=d(n(10));t.getService=function(e){h&&e===h.private.tokenV3||(h=new p(e));return h};var s=d(n(0)),u=d(n(29)),l=d(n(14)),c=n(8);function d(e){return e&&e.__esModule?e:{default:e}}function f(){var e=s.default.get(c.config,"URL.COMMUNITY_APP");if(!e)throw new Error("No URL.COMMUNITY_APP param found in config");return e}var p=function(){function e(t){(0,a.default)(this,e),this.private={tokenV3:t}}return(0,i.default)(e,[{key:"getList",value:function(){var e=(0,o.default)(r.default.mark(function e(t){var n,o;return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=f(),n+="/community-app-assets/api/tc-communities?",n+=l.default.stringify({groups:t}),e.next=5,(0,u.default)(n,{headers:{authorization:this.private.tokenV3}});case 5:return o=e.sent,e.abrupt("return",o.json());case 7:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getMetadata",value:function(){var e=(0,o.default)(r.default.mark(function e(t){var n,o;return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=f(),n+="/community-app-assets/api/tc-communities/"+t+"/meta",e.next=4,(0,u.default)(n,{headers:{authorization:this.private.tokenV3}});case 4:return o=e.sent,e.abrupt("return",o.json());case 6:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()}]),e}(),h=null;t.default=void 0},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(4)),o=l(n(5)),a=function(){var e=(0,o.default)(r.default.mark(function e(t,n){var o,a;return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o={},n&&(o.hasActiveBillingAccount=!0),e.next=4,(0,u.getService)(t).getUserProjects(o);case 4:return a=e.sent,e.abrupt("return",{tokenV3:t,projects:a});case 6:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}(),i=l(n(0)),s=n(2),u=n(37);function l(e){return e&&e.__esModule?e:{default:e}}t.default=(0,s.createActions)({DIRECT:{DROP_ALL:function(){return null},GET_PROJECT_DETAILS_INIT:function(e){return e},GET_PROJECT_DETAILS_DONE:function(e,t){return(0,u.getService)(t).getProjectDetails(e)},GET_PROJECT_PERMISSIONS_INIT:function(e){return i.default.toNumber(e)},GET_PROJECT_PERMISSIONS_DONE:function(e,t){return(0,u.getService)(t).getProjectPermissions(e).then(function(t){return{permissions:t,projectId:e}})},GET_USER_PROJECTS_INIT:function(e){return e},GET_USER_PROJECTS_DONE:a}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(4)),o=l(n(5)),a=l(n(9)),i=l(n(10));t.getService=function(e){d&&d.private.tokenV3===e||(d=new c(e));return d};var s=l(n(14)),u=n(7);function l(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(t){(0,a.default)(this,e),this.private={api:(0,u.getApi)("V3",t),tokenV3:t}}return(0,i.default)(e,[{key:"getProjectDetails",value:function(){var e=(0,o.default)(r.default.mark(function e(t){var n;return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/direct/projects/"+t);case 2:if((n=e.sent).ok){e.next=5;break}throw new Error(n.statusText);case 5:return e.next=7,n.json();case 7:if(200===(n=e.sent.result).status){e.next=10;break}throw new Error(n.content);case 10:return e.abrupt("return",n.content);case 11:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getProjectPermissions",value:function(){var e=(0,o.default)(r.default.mark(function e(t){var n,o;return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n="/direct/projects/"+t+"/permissions",e.next=3,this.private.api.get(n);case 3:if((o=e.sent).ok){e.next=6;break}throw new Error(o.statusText);case 6:return e.next=8,o.json();case 8:if(200===(o=e.sent.result).status){e.next=11;break}throw new Error(o.content);case 11:return e.abrupt("return",o.content);case 12:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getUserProjects",value:function(){var e=(0,o.default)(r.default.mark(function e(t){var n,o;return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n="/direct/projects/user",t&&(n+="?"+s.default.stringify(t)),e.next=4,this.private.api.get(n);case 4:if((o=e.sent).ok){e.next=7;break}throw new Error(o.statusText);case 7:return e.next=9,o.json();case 9:if(200===(o=e.sent.result).status){e.next=12;break}throw new Error(o.content);case 12:return e.abrupt("return",o.content);case 13:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()}]),e}(),d=null;t.default=void 0},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=n(24);t.default=(0,r.createActions)({GROUPS:{DROP_GROUPS:function(){},GET_GROUPS_INIT:function(e){return e},GET_GROUPS_DONE:function(e,t){return(0,o.getService)(t).getGroupMap(e)}}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(1)),o=l(n(0)),a=n(8),i=n(2),s=n(18),u=n(7);function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t,n){return(0,s.getService)(t,n).getChallengeDetails(e)}t.default=(0,i.createActions)({CHALLENGE:{DROP_CHECKPOINTS:function(){},DROP_RESULTS:function(){},FETCH_CHECKPOINTS_INIT:function(){},FETCH_CHECKPOINTS_DONE:function(e,t){var n="/design/challenges/checkpoint/"+t;return(0,u.getApi)("V2",e).fetch(n).then(function(e){if(200!==e.status)throw e.status;return e.json()}).then(function(e){return e.checkpointResults.forEach(function(t,n){e.checkpointResults[n].expanded=!1}),{challengeId:Number(t),checkpoints:e}}).catch(function(e){return{error:e,challengeId:Number(t)}})},GET_DETAILS_INIT:function(e){return o.default.toString(e)},GET_DETAILS_DONE:c,GET_SUBMISSIONS_INIT:function(e){return o.default.toString(e)},GET_SUBMISSIONS_DONE:function(e,t){return(0,u.getApi)("V2",t).fetch("/challenges/submissions/"+e+"/mySubmissions").then(function(e){return e.json()}).then(function(t){return{challengeId:o.default.toString(e),submissions:t.submissions}}).catch(function(t){throw{challengeId:o.default.toString(e),error:t}})},LOAD_RESULTS_INIT:function(e){return o.default.toString(e)},LOAD_RESULTS_DONE:function(e,t,n){return(0,u.getApi)("V2",e.tokenV2).fetch("/"+n+"/challenges/result/"+t).then(function(e){return e.json()}).then(function(e){return{challengeId:o.default.toString(t),results:e.results}})},REGISTER_INIT:function(){},REGISTER_DONE:function(e,t){return(0,s.getService)(e.tokenV3).register(t).then(function(){return new r.default(function(n){return setTimeout(function(){return n(c(t,e.tokenV3,e.tokenV2))},a.config.CHALLENGE_DETAILS_REFRESH_DELAY)})})},TOGGLE_CHECKPOINT_FEEDBACK:function(e,t){return{id:e,open:t}},UNREGISTER_INIT:function(){},UNREGISTER_DONE:function(e,t){return(0,s.getService)(e.tokenV3).unregister(t).then(function(){return new r.default(function(n){return setTimeout(function(){return n(c(t,e.tokenV3,e.tokenV2))},a.config.CHALLENGE_DETAILS_REFRESH_DELAY)})})},UPDATE_CHALLENGE_INIT:function(e){return e},UPDATE_CHALLENGE_DONE:function(e,t,n){return(0,s.getService)(n).updateChallenge(t).then(function(t){return{uuid:e,res:t}})},GET_ACTIVE_CHALLENGES_COUNT_INIT:function(){},GET_ACTIVE_CHALLENGES_COUNT_DONE:function(e,t){return(0,s.getService)(t).getActiveChallengesCount(e)}}})},function(e,t,n){e.exports=void 0===window.JSON?n(86).parse:window.JSON.parse},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=O(n(1)),o=O(n(16)),a=O(n(4)),i=O(n(5)),s=function(){var e=(0,i.default)(a.default.mark(function e(t,n){var r;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=void 0,e.prev=1,e.next=4,(0,I.getService)().getAchievements(t);case 4:r=e.sent,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),r=[];case 10:return e.abrupt("return",{data:r,handle:t,uuid:n});case 11:case"end":return e.stop()}},e,this,[[1,7]])}));return function(t,n){return e.apply(this,arguments)}}(),u=function(){var e=(0,i.default)(a.default.mark(function e(t,n,r){var o;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,S.getService)(r).getMemberFinances(t);case 2:return o=e.sent,e.abrupt("return",{data:o,handle:t,uuid:n});case 4:case"end":return e.stop()}},e,this)}));return function(t,n,r){return e.apply(this,arguments)}}(),l=function(){var e=(0,i.default)(a.default.mark(function e(t,n){return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{handle:t,uuid:n});case 1:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}(),c=function(){var e=(0,i.default)(a.default.mark(function e(t,n,r){var o;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,S.getService)(r).getStats(t);case 2:return o=e.sent,e.abrupt("return",{data:o,handle:t,uuid:n});case 4:case"end":return e.stop()}},e,this)}));return function(t,n,r){return e.apply(this,arguments)}}(),d=function(){var e=(0,i.default)(a.default.mark(function e(t,n){return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{handle:t,uuid:n});case 1:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}(),f=function(){var e=(0,i.default)(a.default.mark(function e(t,n,i){var s,u,l,c,d,f,p;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t({limit:50,offset:50*n}).then(function(o){var a=o.challenges;return a.length?e(t,1+n,r?r.concat(a):a):r||[]})},s={status:"ACTIVE"},u=(0,k.getService)(i),c=[l(function(e){return u.getUserChallenges(t,s,e)})],e.next=6,r.default.all(c);case 6:return d=e.sent,f=(0,o.default)(d,1),p=f[0],e.abrupt("return",{handle:t,challenges:p,uuid:n});case 10:case"end":return e.stop()}},e,this)}));return function(t,n,r){return e.apply(this,arguments)}}(),p=function(){var e=(0,i.default)(a.default.mark(function e(t,n){return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{handle:t,uuid:n});case 1:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}(),h=function(){var e=(0,i.default)(a.default.mark(function e(t,n,r){var o;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,S.getService)(r).getStatsHistory(t);case 2:return o=e.sent,e.abrupt("return",{data:o,handle:t,uuid:n});case 4:case"end":return e.stop()}},e,this)}));return function(t,n,r){return e.apply(this,arguments)}}(),m=function(){var e=(0,i.default)(a.default.mark(function e(t,n){return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{handle:t,uuid:n});case 1:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}(),g=function(){var e=(0,i.default)(a.default.mark(function e(t,n,r,o,i){var s;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,S.getService)(i).getStatsDistribution(t,n,r);case 2:return s=e.sent,e.abrupt("return",{data:s,handle:t,uuid:o});case 4:case"end":return e.stop()}},e,this)}));return function(t,n,r,o,a){return e.apply(this,arguments)}}(),y=function(){var e=(0,i.default)(a.default.mark(function e(t,n){return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{handle:t,uuid:n});case 1:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}(),v=function(){var e=(0,i.default)(a.default.mark(function e(t,n,r,o,i,s,u,l){var c,d,f;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c={status:"completed",hasUserSubmittedForReview:"true",track:o,subTrack:i},(d={}).orderBy="submissionEndDate desc",d.limit=u,d.offset=s*u,f=(0,k.getService)(r),e.abrupt("return",f.getUserChallenges(n,c,d).then(function(e){return{uuid:t,challenges:e.challenges,refresh:l,handle:n}}));case 7:case"end":return e.stop()}},e,this)}));return function(t,n,r,o,a,i,s,u){return e.apply(this,arguments)}}(),b=function(){var e=(0,i.default)(a.default.mark(function e(t,n){return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{handle:t,uuid:n});case 1:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}(),_=function(){var e=(0,i.default)(a.default.mark(function e(t,n,r,o,i,s){var u,l,c;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u={status:"past",isRatedForSRM:"true"},l={filter:T.default.stringify(u,{encode:!1}),limit:i,offset:o*i},c=(0,k.getService)(r),e.abrupt("return",c.getUserSrms(n,l).then(function(e){return{uuid:t,srms:e,refresh:s,handle:n}}));case 4:case"end":return e.stop()}},e,this)}));return function(t,n,r,o,a,i){return e.apply(this,arguments)}}(),w=function(){var e=(0,i.default)(a.default.mark(function e(t,n){return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{handle:t,uuid:n});case 1:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}(),E=function(){var e=(0,i.default)(a.default.mark(function e(t,n,r,o,i,s){var u,l,c;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u={status:"PAST",isRatedForMM:"true"},(l={}).orderBy="endDate desc",l.limit=i,l.offset=o*i,c=(0,k.getService)(r),e.abrupt("return",c.getUserMarathonMatches(n,u,l).then(function(e){return{uuid:t,marathons:e,refresh:s,handle:n}}));case 7:case"end":return e.stop()}},e,this)}));return function(t,n,r,o,a,i){return e.apply(this,arguments)}}(),T=O(n(14)),C=n(2),S=n(27),I=n(26),k=n(18);function O(e){return e&&e.__esModule?e:{default:e}}t.default=(0,C.createActions)({MEMBERS:{DROP:function(e){return e},DROP_ALL:function(){},GET_ACHIEVEMENTS_INIT:function(e,t){return{handle:e,uuid:t}},GET_ACHIEVEMENTS_DONE:s,GET_FINANCES_INIT:function(e,t){return{handle:e,uuid:t}},GET_FINANCES_DONE:u,GET_STATS_INIT:l,GET_STATS_DONE:c,GET_STATS_HISTORY_INIT:p,GET_STATS_HISTORY_DONE:h,GET_STATS_DISTRIBUTION_INIT:m,GET_STATS_DISTRIBUTION_DONE:g,GET_ACTIVE_CHALLENGES_INIT:d,GET_ACTIVE_CHALLENGES_DONE:f,GET_SUBTRACK_CHALLENGES_INIT:y,GET_SUBTRACK_CHALLENGES_DONE:v,GET_USER_SRM_INIT:b,GET_USER_SRM_DONE:_,GET_USER_MARATHON_INIT:w,GET_USER_MARATHON_DONE:E}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PAGE_SIZE=void 0;var r=n(2),o=n(18),a=t.PAGE_SIZE=50;t.default=(0,r.createActions)({MEMBER_TASKS:{DROP_ALL:function(){return null},GET_INIT:function(e,t){return{pageNum:t,uuid:e}},GET_DONE:function(e,t,n,r){return(0,o.getService)(r).getChallenges({isTask:1,projectId:t},{limit:a,offset:n*a}).then(function(n){var r=n.challenges,o=n.totalCount;return{projectId:t,tasks:r,totalCount:o,uuid:e}})}}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1)),o=n(2),a=n(44),i=n(12);t.default=(0,o.createActions)({REVIEW_OPPORTUNITY:{CANCEL_APPLICATIONS_INIT:function(){},CANCEL_APPLICATIONS_DONE:function(e,t,n){return(0,a.getReviewOpportunitiesService)(n).cancelApplications(e,t)},GET_DETAILS_INIT:function(){},GET_DETAILS_DONE:function(e,t){return(0,a.getReviewOpportunitiesService)(t).getDetails(e).catch(function(e){return 401!==e.status&&(0,i.fireErrorMessage)("Error Getting Review Opportunity Details",e.content||e),r.default.reject(e.status)})},SUBMIT_APPLICATIONS_INIT:function(){},SUBMIT_APPLICATIONS_DONE:function(e,t,n){return(0,a.getReviewOpportunitiesService)(n).submitApplications(e,t)}}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=s(n(1)),o=s(n(9)),a=s(n(10));t.getReviewOpportunitiesService=function(e){l&&e===l.private.tokenV3||(l=new u(e));return l};var i=n(7);function s(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(t){(0,o.default)(this,e),this.private={api:(0,i.getApi)("V3",t),tokenV3:t}}return(0,a.default)(e,[{key:"getReviewOpportunities",value:function(e,t){var n="/reviewOpportunities?limit="+e+"&offset="+t;return this.private.api.get(n).then(function(e){return e.ok?e.json():r.default.reject(new Error("Error Code: "+e.status))}).then(function(e){return 200===e.result.status?e.result.content:r.default.reject(e.result.content)})}},{key:"getDetails",value:function(e){var t="/reviewOpportunities/"+e;return this.private.api.get(t).then(function(e){return e.json()}).then(function(e){return 200===e.result.status?e.result.content:r.default.reject(e.result)})}},{key:"submitApplications",value:function(e,t){var n="/reviewOpportunities/"+e+"/applications?reviewApplicationRoleIds="+t.join(",");return this.private.api.post(n,{}).then(function(e){return JSON.parse(e)})}},{key:"cancelApplications",value:function(e,t){var n="/reviewOpportunities/"+e+"/applications?reviewApplicationRoleIds="+t.join(",");return this.private.api.delete(n,{}).then(function(e){return JSON.parse(e)})}}]),e}(),l=null;t.default=void 0},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=n(46);t.default=(0,r.createActions)({LOOKUP:{GET_SKILL_TAGS_INIT:function(){},GET_SKILL_TAGS_DONE:function(){return(0,o.getService)().getTags({domain:"SKILLS",status:"APPROVED"})},GET_COUNTRIES_INIT:function(){},GET_COUNTRIES_DONE:function(){return(0,o.getService)().getCountries()}}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(4)),o=c(n(5)),a=c(n(9)),i=c(n(10));t.getService=function(e){f&&e===f.private.tokenV3||(f=new d(e));return f};var s=c(n(14)),u=n(13),l=n(7);function c(e){return e&&e.__esModule?e:{default:e}}var d=function(){function e(t){(0,a.default)(this,e),this.private={api:(0,l.getApi)("V3",t),tokenV3:t}}return(0,i.default)(e,[{key:"getTags",value:function(){var e=(0,o.default)(r.default.mark(function e(t){var n;return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/tags/?"+s.default.stringify(t));case 2:return n=e.sent,e.abrupt("return",(0,u.getApiResponsePayload)(n));case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getCountries",value:function(){var e=(0,o.default)(r.default.mark(function e(){var t;return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/members/lookup/countries");case 2:return t=e.sent,e.abrupt("return",(0,u.getApiResponsePayload)(t));case 4:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()}]),e}(),f=null;t.default=void 0},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(4)),o=f(n(5)),a=function(){var e=(0,o.default)(r.default.mark(function e(t,n){var o;return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.getService)(n).getAllUserTraits(t);case 2:return o=e.sent,e.abrupt("return",{data:o,handle:t});case 4:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}(),i=function(){var e=(0,o.default)(r.default.mark(function e(t,n,o,a){var i;return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.getService)(a).addUserTrait(t,n,o);case 2:return i=e.sent,e.abrupt("return",{result:i,handle:t,traitId:n});case 4:case"end":return e.stop()}},e,this)}));return function(t,n,r,o){return e.apply(this,arguments)}}(),s=function(){var e=(0,o.default)(r.default.mark(function e(t,n,o,a){var i;return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.getService)(a).updateUserTrait(t,n,o);case 2:return i=e.sent,e.abrupt("return",{result:i,handle:t,traitId:n});case 4:case"end":return e.stop()}},e,this)}));return function(t,n,r,o){return e.apply(this,arguments)}}(),u=function(){var e=(0,o.default)(r.default.mark(function e(t,n,o){var a;return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.getService)(o).deleteUserTrait(t,n);case 2:return a=e.sent,e.abrupt("return",{data:a,handle:t,traitId:n});case 4:case"end":return e.stop()}},e,this)}));return function(t,n,r){return e.apply(this,arguments)}}(),l=n(2),c=f(n(0)),d=n(48);function f(e){return e&&e.__esModule?e:{default:e}}t.default=(0,l.createActions)({SETTINGS:{GET_ALL_USER_TRAITS:a,ADD_USER_TRAIT:i,DELETE_USER_TRAIT:u,UPDATE_USER_TRAIT:s,MODIFY_USER_TRAIT_INIT:c.default.noop}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(4)),o=c(n(5)),a=c(n(9)),i=c(n(10));t.getService=function(e){f&&e===f.private.tokenV3||(f=new d(e));return f};var s=c(n(91)),u=n(13),l=n(7);function c(e){return e&&e.__esModule?e:{default:e}}var d=function(){function e(t){(0,a.default)(this,e),this.private={api:(0,l.getApi)("V3",t),tokenV3:t}}return(0,i.default)(e,[{key:"getAllUserTraits",value:function(){var e=(0,o.default)(r.default.mark(function e(t){var n;return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/members/"+t.toLowerCase()+"/traits");case 2:return n=e.sent,e.abrupt("return",(0,u.getApiResponsePayload)(n));case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"addUserTrait",value:function(){var e=(0,o.default)(r.default.mark(function e(t,n,o){var a,i;return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a={param:[{traitId:n,categoryName:(0,s.default)(n),traits:{data:o}}]},e.next=3,this.private.api.postJson("/members/"+t+"/traits",a);case 3:return i=e.sent,e.abrupt("return",(0,u.getApiResponsePayload)(i));case 5:case"end":return e.stop()}},e,this)}));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"updateUserTrait",value:function(){var e=(0,o.default)(r.default.mark(function e(t,n,o){var a,i;return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a={param:[{traitId:n,categoryName:(0,s.default)(n),traits:{data:o}}]},e.next=3,this.private.api.putJson("/members/"+t+"/traits",a);case 3:return i=e.sent,e.abrupt("return",(0,u.getApiResponsePayload)(i));case 5:case"end":return e.stop()}},e,this)}));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"deleteUserTrait",value:function(){var e=(0,o.default)(r.default.mark(function e(t,n){var o;return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.delete("/members/"+t+"/traits?traitIds="+n);case 2:return o=e.sent,e.abrupt("return",(0,u.getApiResponsePayload)(o));case 4:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}()}]),e}(),f=null;t.default=void 0},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(4)),o=u(n(5)),a=function(){var e=(0,o.default)(r.default.mark(function e(t){var n;return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,s.getService)().getLooker(t);case 2:return n=e.sent,e.abrupt("return",{data:n,lookerId:t});case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),i=n(2),s=n(92);function u(e){return e&&e.__esModule?e:{default:e}}t.default=(0,i.createActions)({LOOKER:{GET_LOOKER_DONE:a}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(1)),o=l(n(6)),a=l(n(3));t.factory=function(){return r.default.resolve(c())};var i=l(n(0)),s=n(2),u=l(n(22));function l(e){return e&&e.__esModule?e:{default:e}}function c(e){var t;return(0,s.handleActions)((t={},(0,o.default)(t,u.default.smp.deleteSubmissionDone,function(e){return(0,a.default)({},e,{deletingSubmission:!1})}),(0,o.default)(t,u.default.smp.deleteSubmissionInit,function(e){return(0,a.default)({},e,{deletingSubmission:!0})}),t),i.default.defaults(e,{}))}t.default=c()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mock=t.time=t.tc=t.errors=t.logger=t.challenge=t.services=t.actions=t.reducers=t.reducerFactory=void 0;var r=n(52);Object.defineProperty(t,"actions",{enumerable:!0,get:function(){return r.actions}});var o=n(93);Object.defineProperty(t,"services",{enumerable:!0,get:function(){return o.services}});var a=n(96);Object.defineProperty(t,"challenge",{enumerable:!0,get:function(){return a.challenge}}),Object.defineProperty(t,"logger",{enumerable:!0,get:function(){return a.logger}}),Object.defineProperty(t,"errors",{enumerable:!0,get:function(){return a.errors}}),Object.defineProperty(t,"tc",{enumerable:!0,get:function(){return a.tc}}),Object.defineProperty(t,"time",{enumerable:!0,get:function(){return a.time}}),Object.defineProperty(t,"mock",{enumerable:!0,get:function(){return a.mock}});var i=n(98),s=function(e){return e&&e.__esModule?e:{default:e}}(i);t.reducerFactory=i.factory,t.reducers=s.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.actions=void 0;var r=v(n(28)),o=v(n(22)),a=v(n(31)),i=v(n(33)),s=v(n(36)),u=v(n(38)),l=v(n(21)),c=v(n(39)),d=v(n(25)),f=v(n(41)),p=v(n(42)),h=v(n(43)),m=v(n(45)),g=v(n(47)),y=v(n(49));function v(e){return e&&e.__esModule?e:{default:e}}t.actions={auth:r.default.auth,smp:o.default.smp,challenge:c.default.challenge,terms:i.default.terms,stats:a.default.stats,direct:s.default.direct,groups:u.default.groups,errors:l.default.errors,profile:d.default.profile,members:f.default.members,memberTasks:p.default.memberTasks,reviewOpportunity:h.default.reviewOpportunity,lookup:m.default.lookup,settings:g.default.settings,looker:y.default.looker};t.default=void 0},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__53__},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__54__},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__55__},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__56__},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=p(n(1)),o=p(n(9)),a=p(n(10));t.getService=function(e){console.error("WARNING:\n Mock version of DocuSign service is used! Should you see this message in\n production, contact support as soon as possible!"),(!g||e&&g.private.tokenV2!==e)&&(g=new m(e));return g};var i=p(n(0)),s=p(n(58)),u=p(n(59)),l=p(n(60)),c=p(n(61)),d=p(n(62)),f=p(n(63));function p(e){return e&&e.__esModule?e:{default:e}}var h=!1,m=function(){function e(t){(0,o.default)(this,e),this.private={tokenV2:t}}return(0,a.default)(e,[{key:"getChallengeTerms",value:function(e,t){var n=i.default.clone(this.private.tokenV2?s.default:l.default);if(n.serverInformation.currentTime=Date.now(),n.requesterInformation.receivedParams.challengeId=i.default.toString(e),this.private.tokenV2&&i.default.isArray(t))for(var o=0;o\r\nTo agree to the Appirio NDA, please electronically sign the document by following this link:\r\n\r\nhttps://community.topcoder.com/tc?module=SignDocument&templateId=fake-template-id \r\n
\r\n\r\n\r\nOnce signed, you will be automatically added to the NDA terms of use and notified by email. \r\n
',agreed:!1,docusignTemplateId:"fake-template-id",serverInformation:{serverName:"TopCoder API",apiVersion:"0.0.1",requestDuration:4,currentTime:1504891122158},requesterInformation:{id:"d9994de712597c11d1caad64996d9fa0d9b4aa2c-w2VCwwGwnN6EeyhK",remoteIP:"12.34.56.789",receivedParams:{apiVersion:"v2",termsOfUseId:"21153",action:"getTermsOfUse"}}}},function(e){e.exports={terms:[{termsOfUseId:21193,title:"Standard Terms for Topcoder Competitions v2.1",url:"",agreeabilityType:"Electronically-agreeable",templateId:null},{termsOfUseId:21153,title:"Appirio NDA v2.0",url:"http://community.topcoder.com/tc?module=Terms&tuid=21153",agreeabilityType:"DocuSignable",templateId:"fake-template-id"}],serverInformation:{serverName:"Topcoder API",apiVersion:"0.0.1",requestDuration:11471,currentTime:1504879510947},requesterInformation:{id:"456f987dee6e9823179c8184fd3509ffdf9c613a-FyefLdEpb8UHgFQF",remoteIP:"12.34.567.890",receivedParams:{role:"Submitter",noauth:"true",apiVersion:"v2",challengeId:"30059255",action:"getChallengeTerms"}}}},function(e){e.exports={terms:[{termsOfUseId:21153,title:"Appirio NDA v2.0",url:"http://community.topcoder.com/tc?module=Terms&tuid=21153",agreeabilityType:"DocuSignable",agreed:!1,templateId:"fake-template-id"},{termsOfUseId:20704,title:"Standard Reviewer Terms v1.0",url:"",agreeabilityType:"Electronically-agreeable",agreed:!1,templateId:null}],serverInformation:{serverName:"Topcoder API",apiVersion:"0.0.1",requestDuration:29,currentTime:1504878884618},requesterInformation:{id:"1b37607c519c318194ce6da08c519c0a3f7c9855-7FSFCyd6oSX2mV6Z",remoteIP:"12.34.567.890",receivedParams:{role:"Submitter",apiVersion:"v2",challengeId:"30059255",action:"getChallengeTerms"}}}},function(e){e.exports={termsOfUseId:20704,title:"Standard Reviewer Terms v1.0",url:"",text:'Standard Reviewer Terms (Version 1.0) \r\n\r\nTHESE ARE THE TERMS AND CONDITIONS ("TERMS") UNDER WHICH YOU AGREE TO WORK UNDER AS A TOPCODER REVIEW BOARD MEMBER. THESE TERMS AND CONDITIONS AFFECT YOUR RIGHTS AND YOU SHOULD READ THEM CAREFULLY BEFORE AGREEING TO THEM. IN THESE TERMS AND CONDITIONS, "WE," "US," "ITS" AND "OUR" REFER TO TOPCODER, INC. AND "YOU" AND "YOUR" REFER TO YOU.
\r\n\r\nIt is understood that We need, and You have, expertise in evaluating and critiquing software designs and/or software development solutions. Furthermore, You agree that You are ready, willing, and able to undertake the performance of evaluating and critiquing such software designs and/or software development solutions submitted to Us, and You agree to assign and transfer your rights as a result of performing such services.
\r\n\r\nIn consideration of the premises and the mutual promises and covenants set forth herein, and for other good and valuable consideration, the receipt and sufficiency of which are hereby acknowledged, the parties agree as follows:
\r\n\r\n1.0\tDefinitions: \r\nAs used in these Terms, the following capitalized terms shall have the following meanings unless otherwise indicated:
\r\n\r\n1.1.\t"Development(s)" shall mean any idea, design, concept, development, component, algorithm, process, method, formula, code, software, technique, technology, discovery or improvement, whether or not patentable, made, conceived, created, discovered, invented or reduced to practice by You in connection with the performance of services hereunder.
\r\n\r\n1.2.\t"Intellectual Property Rights" shall mean all intellectual property rights worldwide arising under statutory or common law or by contract and whether or not perfected, now existing or hereafter filed, issued or acquired, including all patent rights; all rights associated with works of authorship including copyrights and moral rights; rights relating to the protection of trade secrets and confidential information; and any right analogous to those set forth herein and any other proprietary rights relating to intangible property, other than Trademarks.
\r\n\r\n1.3.\t"TopCoder Information" shall mean TopCoder\'s and TopCoder Software\'s specifications, descriptions, architecture, plans, interfaces, and code for TopCoder\'s and TopCoder Software\'s hardware, software, and web site; TopCoder\'s competitions and competition operation procedures; TopCoder\'s and TopCoder Software\'s business and operational plans; and derivatives of the foregoing. The TopCoder Information shall be Confidential Information hereunder.
\r\n\r\n1.4.\t"Software Component" shall mean all software and related materials, technology and documentation (including without limitation design documents, source code and object code) to be evaluated and assessed by You for Us hereunder in accordance with our requirements, as set forth herein and in other documents provided by Us. The Software Component shall be Confidential Information hereunder.
\r\n\r\n2.\tServices: \r\n\r\n2.1\tYou hereby agree to provide services relating to the evaluation and assessment of the Software Component. You agree to perform such services according to and in conformity with the following specifications, in addition to any specifications and/or scheduled provided by Us in our sole discretion (the "Services"):
\r\n\r\nArchitecture Review Board requirements per component project:\r\nIf assigned the role of Primary Architect, as designated by Us, You will review all component submissions to check if all required elements are present as defined in the Design Screening Scorecard. If all required elements are present, then the reviewer objectively scores the design on a series of questions in the Design Screening Scorecard. This process will narrow down the component submissions to the top components, which will go on to a more detailed review. \r\nAll Architecture Review Board members for a component will fill out a subjective review for each component that passes the screening phase. This review is performed through a series of questions in the Design Review Scorecard. Each question requires both a score and comments. \r\nThe Primary Architect is responsible for aggregating all review comments. This includes resolving any conflicts between differing architect comments. The Primary Architect may deem some suggestions as mandatory with our permission. \r\nThe Primary Architect is responsible for giving final review to the component submission once the comments have been applied. This includes ensuring that mandatory suggestions have been implemented, and that all suggestions implemented have been done correctly. \r\nAll interaction with designers, our personnel and other Architecture Review Board members should occur in the online forum on www.topcodersoftware.com. \r\n \r\n\r\nDevelopment Review Board requirements per component project:\r\n\r\nIf assigned the role of Primary Reviewer, as designated by Us, You will review all component submissions to check if all required elements are present as defined in the Development Screening Scorecard. If all required elements are present, then the reviewer objectively scores the development solution on a series of questions in the Development Screening Scorecard. This process will narrow down the component submissions to the top components, which will go on to a more detailed review. \r\nAll Development Review Board members for a component will fill out a subjective review for each component that passes the screening phase. This review is performed through a series of questions in the Development Review Scorecard. Each question requires both a score and comments. In addition, the reviewers will each be assigned one of the following roles, which defines what type of test cases they are responsible for submitting: \r\n\r\nStress Tester - Develop test cases to stress test component solutions in order to get performance metrics on throughput and capacity. \r\nAccuracy Tester - Develop test cases to test the accuracy of the component. Each public method should be tested to ensure it returns the expected result. \r\nFailure Tester - Develop test cases to test different input types for all constructor methods and public methods that are not covered in the developer unit test cases or the designer test cases. \r\n \r\nAll interaction with designers, developers, our personnel and other Development Review Board members should occur in the online forum on www.topcodersoftware.com. \r\n \r\n\r\n2.2\tYou agree to commit sufficient time and resources to perform the Services according to the schedule set forth by Us. You shall promptly notify Us of any circumstances, as such circumstances arise, that may reasonably be anticipated to lead to a material deviation from the schedule.
\r\n\r\n2.3\tYou agree to keep Us updated, promptly upon our request, of any progress, problems, and/or developments of which You are aware regarding the Services. We shall have the right to require such updates in writing from You in a format specified by Us or acceptable to Us in our sole discretion. You shall conduct and conclude the Services in a professional manner.
\r\n\r\n3.\tConsideration/Compensation: \r\n\r\n3.1\tFee. In consideration for performance of the Services required by You, We shall pay You the fee set forth on TopCoder\'s website and/or in other correspondence from Us to You (the "Fee"). The Fee shall be in U.S. Dollars and may be paid in installments, as set forth on our website or in other correspondence from Us. The Fee shall be paid upon the conclusion of the review period, and once completed scorecards have been received, provided the completed scorecards are submitted to Us by the deadline as set forth on the website and/or in the correspondence from Us.
\r\n\r\n3.2\tRoyalty Payments.
\r\n \r\n(a)\tDefinitions. As used in this Section 3, the following capitalized terms shall have the following meanings unless otherwise indicated:
\r\n\r\n(i)\t"Royalty Percentage" shall mean the percentage of the Royalty Pool to be distributed by Us, at our sole discretion, to all review board members who evaluate the Software Components. \r\n(ii) "Royalty Pool Percentage" shall mean the percentage of total revenue We derive from the sale of Software Components. We, in our sole discretion, shall determine the Royalty Pool Percentage and may modify or amend the Royalty Pool Percentage at any time for any or no reason. \r\n(iii) "Royalty Pool" shall mean the portion of our revenues that We distribute as royalty payments to the designers, architects, developers and quality assurance developers who designed, evaluated, developed and tested the applicable Software Components. The Royalty Pool shall be determined by multiplying (x) the Royalty Pool Percentage by (y) the total revenues received by Us from licenses of the applicable Software Components during the respective fiscal quarter. \r\n(iv) "Revenue Receipt Date" shall mean the date on which We first receive payment of revenue from licenses of an applicable Software Components. \r\n \r\n\r\n(b)\tIn consideration of Your evaluation of the Software Components and performance of Your obligations hereunder, We may pay to You a royalty (the "Royalty Payment"). The Royalty Payment to be paid shall be a portion of the Royalty Pool. The Royalty Pool shall be distributed as follows:
\r\n\r\n\r\n(i) 25% to all Architecture Review Board members. (This amount will be distributed equally amongst all review board members.) \r\n(ii) 25% to all Development Review Board members. (This amount will be distributed equally amongst all review board members.) \r\n(iii) 25% to the winning designer \r\n(iv) 25% to the winning developer \r\n \r\n\r\n3.3\tTotal Payment. The sum of the Fee and the Royalty Payments shall be the total payment due to You. Any and all out-of-pocket expenses incurred by You in connection with performing the obligations hereunder are your sole responsibility. We will not reimburse You for any expenses incurred.
\r\n\r\n3.4\tYou shall not be entitled to receive any other compensation or any benefits from Us in connection with the Services. Except as otherwise required by law, We shall not withhold any sums or payments made to You for social security or other federal, state or local tax liabilities or contributions, and all withholdings, liabilities, and contributions shall be solely your responsibility. Further, You understand and agree that the Services are not covered under the unemployment compensation laws and are not intended to be covered by workers\' compensation laws.
\r\n\r\n4.\tOwnership and Rights: \r\n\r\n4.1\tYou hereby acknowledge and agree that We own, solely and exclusively, all right, title and interest, including all Intellectual Property Rights, in and to the TopCoder Information. In addition, You hereby irrevocably and unconditionally transfer and assign to Us all right, title and interest You had, have, may have or acquire in or to all Developments and Software Components, and You agree to execute and deliver such documents, certificates, assignments and other writings, and take such other actions as may be necessary or desirable to vest in Us the ownership rights granted to Us hereunder.
\r\n\r\n4.2\tYou further agree that any and all works of authorship created, authored or developed by You hereunder shall be deemed to be "works made for hire" within the meaning of the United States Copyright Law and, as such, all rights therein including copyright shall belong solely and exclusively to Us from the time of their creation. To the extent any such work of authorship may not be deemed to be a work made for hire, You agree to, and do hereby, irrevocably and unconditionally transfer and assign to Us all right, title and interest including copyright in and to such work.
\r\n\r\n4.3\tYou agree that if We are unable, because of your unavailability, or for any other reason, to secure your signature to apply for or to pursue any application for any United States or foreign patents, mask work, copyright or trademark registrations covering the assignments to Us above, then You hereby irrevocably designates and appoints Us and your duly authorized officers and agents as your agent and attorney in fact, to act for and in your behalf and stead to execute and file any such applications and to do all other lawfully permitted acts to further the prosecution and issuance of patents, copyright, mask work and trademark registrations thereon with the same legal force and effect as if executed by your authorized agent.
\r\n\r\n4.4\tAll Intellectual Property Rights owned by a party as of the date You agree to these Terms shall remain the property of such party and no licenses or other rights with respect to such intellectual property are granted to the other party except as expressly set forth herein.
\r\n\r\n4.5\tNothing in these terms shall be construed as granting You any right or license under any of our Intellectual Property Right (including any rights We may have in any patents, copyrights, trademarks, service marks or any trade secrets), by implication, estoppel or otherwise, except as expressly set forth herein.
\r\n\r\n5.\tConfidential Information: \r\n\r\n5.1\t"Confidential Information" shall mean any information, in whatever form, provided by Us to You with obligation of confidentiality, or designated by Us in writing as confidential, proprietary or marked with words of like import when provided to You, and information orally conveyed if We state at the time of oral conveyance or promptly thereafter that such information is confidential. Notwithstanding anything to the contrary contained herein, information about or relating to our software, our system interfaces, our hardware and software architecture, our business, operational and marketing plans, our member lists and database, all information and technology provided by Us to You to enable You to perform your obligations hereunder, TopCoder Information, and any and all Developments shall be considered Confidential Information.
\r\n\r\n5.2\tConfidential Information shall not include information which (a) was in your possession without confidentiality restriction prior to disclosure by Us hereunder; (b) at or after the time of disclosure by Us becomes generally available to the public through no act or omission on our part; (c) is developed by You independently of and without reference to any Confidential Information You receive from Us; or (d) has come into your possession without confidentiality restriction from a third party and such third party is under no obligation to Us to maintain the confidentiality of such information.
\r\n\r\n5.3\tYou acknowledge the confidential and proprietary nature of Confidential Information and agree (i) to hold Confidential Information in confidence and to take all reasonable precautions to protect such Confidential Information (including, without limitation, all precautions You employ with respect to your own confidential materials), (ii) not to divulge any such Confidential Information to any third person; and (iii) not to make any use whatsoever of such Confidential Information except as expressly authorized herein.
\r\n\r\n5.4\tIn the event You are ordered to disclose Confidential Information pursuant to a judicial or government request, requirement or order, You shall promptly notify Us and upon our request, You shall, at our expense, take reasonable steps to assist Us in contesting such request, requirement or order or in otherwise protecting our rights prior to disclosure.
\r\n\r\n5.5\tYou agree not to reproduce or copy by any means Confidential Information, except as reasonably required to perform the Services. Upon termination of your performance of the Services as a review board member, your right to use Confidential Information shall immediately terminate. In addition, upon such termination, or upon demand by Us at any time, You shall return promptly to Us or destroy, at our option, all tangible materials and computer data that disclose or embody Confidential Information.
\r\n\r\n5.6\tYou agree that any breach of these terms by You could cause irreparable damage to Us. In view of the difficulties of placing a monetary value on the Confidential Information, We shall have, in addition to any and all remedies of law, the right to an injunction or other equitable relief, and may be entitled to a preliminary and final injunction without the necessity of posting any bond or undertaking in connection therewith to prevent any further breach or further unauthorized use of Confidential Information. This remedy is separate from any other remedy We may have.
\r\n\r\n6.\tRepresentations and Warranties: \r\n\r\n6.1\tYou represent and warrant that:\r\n
\r\n(a) You are at least 18 years old; \r\n(b) You are either (i) a U.S. citizen, (ii) a lawful permanent resident of the U.S., (iii) currently residing in the U.S. with proper and valid work authorization to work as an independent contractor, or (iv) a non-U.S. citizen, not living in the U.S. and performing the Services while residing in your country of residence; \r\n(c)\tYou are legally able and have the power and authority to execute, deliver and perform the Services and any other agreements contemplated hereby and to consummate the transactions contemplated hereby; \r\n(d)\tNo impediment exists to You agreeing to these Terms, and no other agreement has been or shall be made with any third party which will interfere with its performance; \r\n(e)\tYou shall use Your own independently developed code, and shall not copy or include code from any other party, including publicly available "Open Source" code that is or may be subject to licensing restrictions, without our prior written permission; and \r\n(f)\tAny services performed by You as a review board member shall be performed in a professional and workmanlike manner. \r\n \r\n\r\n\r\n7.\tIntellectual Property Indemnification: \r\n\r\n7.1\tYou shall indemnify, hold harmless and defend Us and our customers from and against any and all suits, actions, damages, costs, losses, expenses (including settlement awards and reasonable attorneys\' fees) and other liabilities arising from or in connection with any claim alleging that, to your knowledge, any Development and/or Software Component violates any trade secret right, or infringes any copyright, patent, trademark, or other intellectual property interest, in any country, and shall pay all costs and damages awarded. We shall promptly notify You of any such claim of which We are aware.
\r\n\r\n7.2\tYour obligations shall not extend to any claim for violation or infringement resulting solely from your compliance with any specific or direct written instructions from Us if such infringement would have been avoided but for such compliance.
\r\n\r\n8.\tIndependent Contractors: \r\n\r\n8.1\tBoth parties expressly agree and understand that You are an independent contractor and nothing herein nor the services rendered hereunder is meant, or shall be construed in any way or manner, to create a relationship of employer and employee, principal and agent, partners or any other relationship other than that of independent parties contracting with each other solely for the purpose of carrying out the provisions of these Terms. Accordingly, You acknowledge and agree that You shall not be entitled to any benefits provided by Us to our employees. You shall be responsible for any and all out-of-pocket expenses incurred in connection with performing the Services. In addition, You shall have sole and exclusive responsibility for the payment of all federal, state and local income taxes, for all employment and disability insurance and for Social Security and other similar taxes with respect to any compensation provided by Us hereunder. You further agree that if We pay or become liable for such taxes or related civil penalties or interest as a result of your failure to pay taxes or report same, or due to our failure to withhold taxes, You shall indemnify and hold us harmless for any such liability. You shall assume and accept all responsibilities which are imposed on independent contractors by any statute, regulation, rule of law, or otherwise. You are not our agent and are not authorized and shall not have the power or authority to bind Us or incur any liability or obligation, or act on behalf of Us. At no time shall You represent that You are our agent, or that any of the views, advice, statements and/or information that may be provided while performing the Services are ours.
\r\n\r\n8.2\tWe are entitled to provide You with general guidance to assist You in completing the scope of work to our satisfaction, You are ultimately responsible for directing and controlling the performance of the task and the scope of work, in accordance with these Terms. You shall use your best efforts, energy and skill in your own name and in such manner as You see fit.
',agreeabilityType:"Electronically-agreeable",serverInformation:{serverName:"Topcoder API",apiVersion:"0.0.1",requestDuration:52,currentTime:1504892902498},requesterInformation:{id:"d8c441f8332161f71533f368c09aeead856e4366-K1RdFai7LCAgXVu5",remoteIP:"12.34.56.78",receivedParams:{apiVersion:"v2",termsOfUseId:"21193",action:"getTermsOfUse"}}}},function(e){e.exports={termsOfUseId:21193,title:"Standard Terms for Topcoder Competitions v2.1",url:"",agreeabilityType:"Electronically-agreeable",text:'\r\n\r\n \r\n\r\n\r\n\r\n\r\n\r\n
Terms & Conditions of Use at topcoder \r\n\r\n
Acceptance of Terms and Conditions \r\n\r\nWelcome to topcoder.com (and related sub-domains (the "Website"). By using the Website, you are indicating your agreement to these Terms and Conditions of Use ("Terms of Use"), including, without limitation, our privacy policy. If you do not agree to these Terms of Use, please do not use the Website and exit now. \r\n\r\n\r\nThroughout these Terms of Use, the words "we," "us," "our," and topcoder refer to Topcoder, Inc., Appirio Inc. and their parents, subsidiaries and affiliates collectively. The term "Submissions" shall refer to any entry, component of an entry, or contents of a posting onto the Website submitted in connection with Competitions. "Competitions" shall refer to challenges, matches, tournaments or other competitions that take place on the Website or in connection with the topcoder Open ("TCO"). You and any other user of this Website that enters any Submissions with respect to Competitions shall be referred to herein as a "Contestant" in such capacity.\r\n\r\n\r\n\r\nWe may revise these Terms of Use at any time without prior notice by updating this page and such revisions will be effective upon posting to this page. Please check this page periodically for any changes. Your continued use of this Website following the posting of any revisions to these Terms of Use will mean you accept those changes. We reserve the right to alter, suspend or discontinue any aspect of www.topcoder.com, including your access to it. Unless explicitly stated, any new features will be subject to these Terms of Use. \r\n\r\n\r\n
General Eligibility \r\nOur Website is not intended for use by children under the age of 13. You must have your parents" permission to use this Website if you have not reached the age of majority in your jurisdiction of primary residence and citizenship. You must be at least 18 years old and have reached the age of majority in your jurisdiction of primary residence and citizenship to participate in any Competitions. \r\n\r\n\r\nUnless otherwise stated in the rules of a Competition, you are not eligible to participate in such Competition if you are a resident of the Quebec province of Canada, Iran, Cuba, North Korea, Crimea Region of Ukraine, Sudan or Syria. In addition, you are not eligible to participate in any Competition if you are on the Specially Designated National list promulgated and amended, from time to time, by the United States Department of the Treasury.\r\n\r\n\r\nFor Competitions that offer a cash prize and/or to participate in TCO, additional eligibility requirements apply. Please see the "Prize Payments" and "Additional TCO Terms" sections of this Terms of Use for additional eligibility requirements.\r\n\r\n\r\nWe may assign, novate or subcontract any or all of our rights and obligations under these Terms of Use at any time. \r\n\r\n\r\nIf you have any questions regarding these Terms of Use, contact us at
support@topcoder.com .\r\n\r\n\r\n
Accounts; Passwords; Security \r\nYou may need to set up an account in order to use some of the features of the Website. You may not use a third party"s account without permission. When you are setting up your account, you must give us accurate and complete information. This means that you cannot set up an account using a name or contact information that does not apply to you, and you must provide accurate and current information on all registration forms that are part of the Website. You may only set up one account. You have complete responsibility for your account and everything that happens on your account. This means you need to be careful with your password. If you find out that someone is using your account without your permission, you must let us know immediately. You may not transfer your account to someone else. We are not liable for any damages or losses caused by someone using your account without your permission. However, if we (or anyone else) suffer any damage due to the unauthorized use of your account, you may be liable. \r\n\r\n\r\nBy registering for an account with us, you are also hereby registered to compete in the TCO. The TCO is a series of Competitions held in four (4) online periods (each, a "Period") throughout the year (which such periods are posted on the Website), and which leads up to an onsite tournament annually which will be held at a location and time to be determined by topcoder. Your registration and participation in the TCO constitutes agreement with any additional applicable TCO terms and conditions (the "TCO Rules") that topocder may impose at its sole discretion as well as these Terms of Use, including those available at: http://tco15.topcoder.com/overview/competition-rules/. NO PURCHASE NECESSARY TO ENTER OR WIN, A PURCHASE WILL NOT INCREASE YOUR CHANCE OF WINNING.\r\n\r\n\r\n
Competitions \r\n\r\n\r\nIn addition to these Terms of Use, we may provide specific Official Rules and Regulations and other documentation for certain activities on this Website, including with respect to Competitions conducted by us and those in conjunction with third parties. These Terms of Use are incorporated by reference into the specific Official Rules and Regulations which appear in connection with information about a particular Competition. To the extent that any conflict exists between these Terms of Use and any specific Official Rules and Regulations, the Official Rules and Regulations for that Competition in which you choose to participate shall govern. \r\n\r\n
Ownership Rights of Submissions \r\n
Winning Submissions \r\n\r\nExcept with respect to "Fun Challenges", you hereby assign, grant and transfer and agree to assign, grant and transfer to us all right and title in and to any and all Submissions made by you in connection with a Competition for which you are paid a cash prize or other good and valuable compensation (or for which topcoder has in good faith made available for payment pending your completion of tocpoder"s payment requirements) (any such Submission, a "Winning Submission"), along with any and all copyright, patent, trade secret, moral right, and other intellectual property rights, in and to any and all such Winning Submissions. To the extent any rights in a Winning Submission are not assignable, you hereby grant and agree to grant to topcoder under any and all such rights an irrevocable, paid-up, royalty free, perpetual, exclusive, sublicensable (directly or indirectly through multiple tiers), transferable, and worldwide license to use and permit others to use such Winning Submission in any manner desired by us (and/or our contest sponsors or customers) without restriction or accounting to you, including, without limitation, the right to make, have made, sell, offer for sale, use, rent, lease, import, copy, prepare derivative works, publicly display, publicly perform, and distribute all or any part of such Winning Submission and modifications and combinations thereof and to sublicense (directly or indirectly through multiple tiers) or transfer any and all such rights. Further, you hereby waive and agree to waive in favor of topcoder any moral right or other right or claim that is contrary to the intent of a complete transfer of rights to topcoder in each Winning Submission. You agree to promptly execute such documents and perform such acts as we may reasonably require to perfect our entire right, title, and interest in and to each and every Winning Submission, including a topcoder Competition Assignment Agreement if requested by topcoder and/or a sponsor of a Competition. \r\n\r\n\r\n
Other Submissions \r\n\r\nExcept with respect to "Fun Challenges", the ownership rights in and to any Submission that is not a Winning Submission shall remain with the Contestant, except that to the extent you are required to enter into a Non-Disclosure Agreement in connection with a Competition (a "Competition NDA"), you understand and agree that the rights in and to any confidential information of the sponsor of a Competition shall remain the property of such Competition sponsor and you shall be bound by and the terms of such Competition NDA shall apply with respect to your rights in and to the Submission. The current version of the Competition NDA is posted in the "direct tool" available on the Website. In addition, by participating in a Competition and uploading a Submission, regardless of whether it is a Winning Submission or not, you consent to and you hereby grant Topcoder, other Topcoder members, Appirio, the Competition sponsor and their affiliates, employees, contractors and third parties engaged by them a license to review, revise, scan, comment on and/or update your Submission in connection with the Competition, without any payment to or further approval from you. You agree that this consent and license spans the length of the Competition and cannot be revoked.\r\n\r\n\r\n
Fun Challenges \r\n\r\n"Fun Challenges" are Competitions that do not have any winners or prizes associated with them, and are intended purely for the fun of participating and collaborating with fellow topcoder members throughout the world. All Submissions in connection with Fun Challenges will be made publicly available and without any restrictions on use by anyone worldwide. By entering into a Fun Challenge and uploading a Submission in connection with a Fun Challenge, you hereby waive and release any and all ownership, copyright, patent, trade secret, moral right, and other intellectual property rights, in and to any and all such Submissions without the expectation of any payment or consideration of any kind.\r\n\r\n\r\n
Contest Materials \r\n\r\nYou hereby further acknowledge and understand that Competition sponsors, topcoder and Appirio engage, has engaged and will in the future engage in the development, preparation, production, acquisition and dissemination of creative, educational, artistic and other material (collectively, the "Materials"), including without limitation Materials that may be similar or identical to your Submission. You also acknowledge that other persons, including our employees and employees of a Competition sponsor, may previously have originated and may hereafter originate Materials that are similar or identical to your Submission. You agree that you will not be entitled to any compensation because of the use by Sponsor of any such similar or identical material. Without limitation of the foregoing, we, our customers and any Competition sponsor may use, without any payment or other obligation whatsoever to you, any part of the Materials, and any idea or concept contained therein, that (a) is similar or identical to, or contains significant elements encompassed in, a concept that is under consideration or in development by us or the Competition sponsor before or at the time of your entry, (b) is not unique, novel, original, and concrete so as to be entitled to protection under applicable laws, (c) has been made public by anyone at the time of its submission to the Competition sponsor or us or otherwise is in the public domain, (d) would be freely usable by a third person if it had not been accepted as a Submission or the subject of any agreement, (e) is not protected by United States copyright law, or (f) is similar or identical to, or contains significant elements encompassed in, an idea, concept or material that is independently created by us, a Competition sponsor or any third party. You agree that our or a Competition sponsor"s development, preparation, production, acquisition, dissemination and/or exploitation of Materials similar or identical to your Submission or containing features, ideas, material and/or elements similar to or identical with those contained in your Submission shall not entitle you to any compensation or other right or remedy. As an inducement to us or a Competition sponsor to accept your Submission for entry into the contest, you hereby waive any claim or right of action against us, the Competition sponsor"s and their successors in connection with use of any Materials (or any portions thereof) whether or not such Materials are similar or identical to your Submission or contain any features, ideas, material and/or elements that are similar or identical to those contained in your Submission. Acceptance by us (or a Competition sponsor, as applicable) of a Submission is not an admission by us or a Competition sponsor of the novelty or originality of the Submission.\r\n\r\n\r\n\r\nUnless agreed otherwise in writing, the sponsor of a contest administered through the Website, topcoder or Appirio (as applicable) owns and will retain ownership (including all intellectual property rights) in and to any materials that are not Submissions, which materials may be tangible or intangible, that you develop that are a result of a contest administered through the Website ("Contest Materials"), and any modifications, improvements and derivative works thereto (including any such materials that incorporate any of Contestant"s ideas, feedback or suggestions). \r\n\r\n\r\n
U.S. Federal Government Rights & Restrictions \r\n\r\nFor any Competition sponsored by, on behalf of, or for the benefit of the U.S. Federal Government, Contestants may be subject to the Federal Acquisition Regulations and agree to comply with applicable provisions of the Federal Acquisition Regulations ("FAR") and all other laws and regulations applicable to providing goods and services to the U.S. Federal Government. In particular, Winning Submissions be considered "Commercial Items" and Contestants may be classified as "Subcontractors" according to the U.S. Federal Government, and by entering a Submission in connection with a Competition, the Contestant hereby agrees to be bound by all laws and regulations applicable to the sale of commercial items by subcontractors to the U.S. Federal Government including FAR 52.212-5(e) and FAR 52.244-6(c)(1).. \r\nUser Content\r\n\r\n\r\nYou are solely responsible for any User Content you post to the Website, and the consequences of posting or publishing it. By "User Content", we mean any Content you post to the Website. "Content" means information, data, text, software, music, sound, photos, graphics, videos, messages, tags, interactive features, or any other materials. When we say "post", we include posting, uploading, sharing, submitting or otherwise providing User Content in any manner in connection with the Website. For the avoidance of doubt, Submissions and Contest Materials are User Content.\r\n\r\n\r\nYou may not:\r\n\r\n
\r\nUse our Website for any illegal purpose \r\nSubmit User Content that you don"t have the right to submit (including but not limited to material covered by someone else"s copyright, patent, trade secret, privacy policy, publicity policy, or any other proprietary right) \r\nDisguise in any way the origin of any User Content you submit (including but not limited to forging headers) \r\nSubmit any User Content that contains lies or misrepresentations that could damage Us or anyone else \r\nSubmit User Content that is obscene, illegal, defamatory, libelous, threatening, pornographic, harassing, hateful, or encourages criminal conduct, give rise to civil liability, violate any law, or is otherwise inappropriate \r\nTransmit any advertising, promotional materials, junk mail, spam, chain letters, pyramid schemes or any other solicitation \r\nImpersonate anyone else or misrepresent your affiliation with any other person or entity \r\nUse meta tags or any other hidden text utilizing any of our or our suppliers" names, products names, or trademarks \r\nUpload, launch, post email or transmit any material (including any bot, worm, spider, script, or virus) that may harm or corrupt this Website, or anyone else"s computer systems or data \r\nUse our Website to harm minors in any way \r\nCollect or gather other people"s personal information (including account information) \r\nSubmit User Content that disparages us or our partners and affiliates \r\nSolicit any users of our Website for any commercial purpose \r\n \r\n\r\n\r\nWe have the sole right, but not necessarily the obligation, to delete at any time any User Content that violates these rules or that we believe to be inappropriate for any reason.\r\n\r\n\r\nIf you post User Content, you are making a guarantee to us that you either own all the Content you are posting, or you have the right to post the Content. Unless otherwise expressly permitted, you may not copy or include in any User Content any code from any third party, including "open source" code or other code that is or may be subject to license terms. Furthermore, you are guaranteeing that you have the right to allow us to make your User Content available for others to view and use as part of the Website without requiring that any such use be subject to additional obligations or terms. If you do not have these rights, do not post the Content. By posting your User Content, you do not lose any ownership rights you may have to it. However, unless otherwise governed by the Official Rules and Regulations governing a specific Competition, you do grant us a worldwide, irrevocable, non-exclusive, royalty-free, fully-paid, sublicenseable (through multiple tiers of distribution) and transferable license to use, reproduce, modify, distribute, prepare derivative works of, display, and perform your User Content in connection with the Website and our business, in any media formats or in tangible form and through any media channels now known or hereinafter developed. You also grant each user of the Website a non-exclusive royalty-free, fully-paid, sublicenseable and transferable license to access your User Content through the Website, and to use, reproduce, distribute, prepare derivative works of, display and perform your User Content as permitted through the functionality of the Website and under these Terms of Service.\r\n\r\n\r\nYou understand that once you post User Content, your content becomes public. We are not responsible for keeping any User Content confidential.\r\n\r\n\r\nWe generally do not review any of the User Content posted by our users. We do not endorse any User Content or support any views, opinions, recommendations, or advice that may be in user submissions. User Content comes from a variety of sources, and we make no promises about the reliability of any source or the accuracy, usefulness, safety, or intellectual property rights of any user submission. You may be offended by User Content that you see on the Website. You may find some of it to be inaccurate, offensive, indecent, or objectionable. However, you agree not to hold us responsible in any way for your use of our Website, including your exposure to User Content.\r\n\r\n\r\nWe reserve the right to remove any postings or other uploaded materials in response to complaints of infringement, obscenity or defamation or to otherwise review or edit such materials as appropriate, in our sole discretion and without notice.\r\n\r\n\r\nIn addition to the above terms governing User Content, as a condition of participating in the TCO, you agree to permit topcoder to describe, publicize, and link to any User Content submitted or posted in connection with TCO. You may not cheat; all ideas for Submissions submitted in connection with the TCO shall be solely yours; you may not collaborate on any Submissions entered in connection with the TCO unless otherwise set forth in the TCO Rules. IN ORDER TO BE ELIGIBLE FOR THE TCO, YOU WARRANT THAT YOUR SUBMISSION FOR EACH COMPETITION THAT IS PART OF THE TCO:\r\n\r\nDoes not include or anticipate the inclusion of any unsuitable or offensive content, including nudity, sexually explicit, disparaging, libelous or other inappropriate content;\r\n\r\n\r\nDoes not include or anticipate the inclusion of any content that is in violation of or infringes third party intellectual property rights including, but not limited to copyrights, including music copyrights, trademarks, and rights of publicity;\r\n\r\n\r\nHas not been entered in previous contests, or won previous awards;\r\n\r\n\r\nHas not been published or distributed previously in any media;\r\n\r\n\r\nIs suitable for a general audience; and\r\n\r\n\r\nDoes not contain any claims that are not and cannot be substantiated or that would be false and/or misleading to a reasonable consumer.\r\n\r\n
Copyright, Trademark and Other Intellectual Property \r\n\r\n
Protection \r\nExcept as otherwise indicated, this Website and its entire contents (including, but not limited to, the text, photographs, information, software, graphics, images, sound, and animation) are owned by us and are protected by domestic and international copyright, trademark, patent, and other intellectual property laws. All copyrightable text and graphics, the selection, arrangement, and presentation of all materials (including information in the public domain), and the overall design of this Website are "2014 topcoder. All rights reserved. We hereby give you permission to download and print materials from this Website for the sole purposes of viewing, reading, and retaining for reference the materials for non-commercial use. Any other copying, distribution, retransmission, or modification of information or materials on this Website, whether in electronic or other form, without our express prior written permission is strictly prohibited. You further agree that you will not disassemble, decompile, reverse engineer or otherwise modify the material on this Website. Any unauthorized or prohibited use may subject the offender to civil liability and criminal prosecution under applicable laws. \r\n\r\n\r\n
Notice \r\nAll trademarks, service marks, and trade names are proprietary to us or other respective owners that have granted us the right and license to use their marks. \r\n\r\n\r\n
Copyright Complaints \r\nWe respect the intellectual property of others, and we ask you to do the same. We may, in appropriate circumstances and at our sole discretion, terminate the access of users who infringe the copyright rights of others. \r\nIf you believe that your work has been copied and is accessible at our Website in a way that constitutes copyright infringement, or that our Website contains links or other references to another online location that contains material or activity that infringes your copyright rights, you may notify us by providing our copyright agent the information required by the U.S. Online Copyright Infringement Liability Limitation Act of the U.S. Digital Millennium Copyright Act, 17 U.S.C. "512. Our agent for notice of claims of copyright infringement on or regarding this Website can be reached as follows: \r\n\r\n\r\n
\r\n\r\n\r\nBY E-MAIL: \r\nGC@appirio.com \r\n \r\n\r\nBY MAIL: \r\nDan Lascell\r\n\r\nTopcoder, Inc.\r\n\r\n760 Market Street\r\n\r\nSan Francisco, CA 94102 \r\n \r\n\r\nBY PHONE: \r\n(650) 268-9911 \r\n \r\n \r\n
\r\n\r\n\r\nRepeat infringers will be blocked from accessing the topcoder Website. \r\n\r\n\r\n
Marketing Materials \r\n\r\n\r\nYou hereby authorize us and any Competition sponsors to publicize the results of any Competition, including your name and account name (handle). Contestant hereby grants to us and any Competition sponsors the absolute right and permission to use your name, address (city and state), testimonial statement (or statements in different words which have substantially the same meaning), voice, photograph and/or other likeness in any and all advertising and promotional materials, or to refrain from doing so, in any manner or media whatsoever, worldwide, for advertising and promotional purposes in conjunction with this and similar Competitions without notice to you and without further compensation. You shall have no right of approval, no claim to any compensation, and no claim arising out of the use, alteration, distortion or illusionary effect or use in any composite form of your name, address, testimonial statement, voice, photograph or likeness.\r\n\r\nYou understand that we own all photographs of you taken by us and we may copyright material containing such photographs.\r\n\r\n\r\n
Indemnification and Release \r\nBy accessing our Website, you agree to indemnify us and any parent, subsidiary, sponsor or affiliated entities, our officers and employees, and officers and employees of any parent, subsidiary, sponsor or affiliated entities and hold them harmless from any and all claims and expenses, including attorney\'s fees, arising from your use of our Website including any material (including third-party material) that you post on our Website and any services or products available through our Website. In addition, you hereby release us and any parent, subsidiary, sponsor or affiliated entities, our officers and employees, and officers and employees of any parent, subsidiary, sponsor or affiliated entities from any and all claims, demands, debts, obligations, damages (actual or consequential), costs, and expenses of any kind or nature whatsoever, whether known or unknown, suspected or unsuspected, disclosed or undisclosed, that you may have against them arising out of or in any way related to such disputes and/or to any services or products available at our Website. You hereby agree to waive all laws that may limit the efficacy of such releases. \r\n\r\n\r\nBy registering and/or participating in the TCO or a Competition, you agree to release topcoder and any Competition sponsor(s), and its affiliates and agents, and the officers, employees, affiliates, advertising and promotions agencies, prize suppliers, and all of their employees, officers, directors, shareholder\'s and agents (collectively, the "Releasees") from any and all liability or any injuries, loss or damage of any kind arising from or in connection with the TCO or a Competition, the use of any Submission, or the acceptance or use of any prize won, except where prohibited by law. Releasees assume no responsibility for incomplete, misdirected, damaged or illegible entries nor for any delayed Submissions or those not received for whatever reason, including without limitation due to internet or e-mail server failure, telephone, human, or other higherror or for any technical or other malfunctions that may occur including any injury or damage to your or any other person\'s computer relating to or resulting from participation in the Tournament or a Competition or downloading any materials during or for the TCO or a Competition.\r\n\r\n\r\n
Disclaimer \r\nTHE MATERIALS AND SERVICES ON OUR WEB SITE ARE PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND EITHER EXPRESS OR IMPLIED. TO THE FULLEST EXTENT PERMISSIBLE PURSUANT TO APPLICABLE LAW, WE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. WE DO NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE MATERIALS WILL BE UNINTERRUPTED OR ERROR-FREE, THAT DEFECTS WILL BE CORRECTED, OR THAT THIS WEB SITE OR THE SERVER(S) THAT MAKES OUR WEB SITE AVAILABLE OR ANY ADVERTISED OR HYPERLINKED SITE ARE FREE OF VIRUSES OR OTHER HARMFUL COMPONENTS OR THAT OUR SITE, SERVER(S), ADVERTISED OR HYPERLINKED SITES WILL BE ACCESSIBLE AT ALL TIMES. WE DO NOT WARRANT THAT SUCH ERRORS, DEFECTS OR INTERRUPTIONS IN SERVICE WILL NOT AFFECT THE RESULTS OF OUR COMPETITIONS, AND WE DISCLAIM ANY RESPONSIBILITY FOR REDUCED PERFORMANCE IN COMPETITIONS DUE TO SUCH PROBLEMS. WE DO NOT WARRANT OR MAKE ANY REPRESENTATIONS REGARDING THE USE OR THE RESULTS OF OUR WEB SITE WITH RESPECT TO CORRECTNESS, ACCURACY, RELIABILITY, GRAPHICS, LINKS OR OTHERWISE. YOU ASSUME THE ENTIRE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. TO THE EXTENT THAT APPLICABLE LAW MAY NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, THE ABOVE EXCLUSIONS MAY NOT APPLY TO YOU. \r\n\r\n\r\nDocuments, graphics and other materials appearing at our Website may include technical inaccuracies, typographical errors, and out-of-date information and use of such documents, graphics or other materials is at your own risk. \r\nYou represent and warrant that neither you nor any member of your immediate family, nor anyone living in your household, is an employee of topcoder or Competition sponsors, regardless of commitment date as sponsor, including any companies involved in the production (including prize suppliers), implementation and distribution of this tournament and their advertising or promotion agencies, parent companies, service providers, agents, officers, subsidiaries or affiliates, or any other persons or entities directly associated with the tournament, and that neither you nor any immediate family member nor anyone living in your household is connected with any of the above.\r\n\r\n\r\n
Limitation of Liability \r\n\r\nTO THE FULLEST EXTENT PERMISSIBLE PURSUANT TO APPLICABLE LAW, TOPCODER] SHALL NOT BE LIABLE FOR ANY DAMAGES (INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES), WHETHER BASED ON WARRANTY, CONTRACT, TORT, OR ANY OTHER LEGAL THEORY, INCLUDING, BUT NOT LIMITED TO, DAMAGES FOR LOSS OF WINNINGS, DATA OR OTHER DAMAGE TO ANY OTHER INTANGIBLE PROPERTY, EVEN IF TOPCODER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, RESULTING FROM (i) THE USE OR INABILITY TO USE THIS WEB SITE, (ii) THE DISCLOSURE OF, UNAUTHORIZED ACCESS TO OR ALTERATION OF ANY TRANSMISSION OR DATA, (iii) THE STATEMENTS OR CONDUCT OF ANY THIRD PARTY OR (iv) ANY OTHER MATTER RELATING TO TOPCODER. \r\n\r\n\r\n
Prize Payment \r\n\r\nYou understand that neither we, the Competition sponsors nor their parent corporations, subsidiaries, affiliates, agents, assigns, etc. or any entity connected with a Competition will be responsible for any costs (including, without limitation, any federal, state or local taxes) Contestant may incur in connection with any Contest or any prize Contestant may be awarded. However, Contestant understands that topcoder may make withholdings from any prize that Contestant may be awarded in order to comply with applicable tax laws. Contestant agrees to sign any applicable forms necessary to distribute the prize as required by tax authorities.\r\n\r\n\r\nAll cash prizes are listed and shall be awarded in USD. All prizes will be awarded in each Competition, provided a qualified number of Submissions are received and the requisite number of Contestants participate in a round of a Competition. A Competition sponsor may award prizes to more than one Submission with respect to any Competition. If a Contestant cannot or will not accept a prize, then the prize will be forfeited and may be awarded to the next highest scoring Submission. Unless otherwise provided herein, by participating in a Competition and/or the TCO, a Contestant acknowledges and agrees that if his/her Submission is selected as a winner, the Contestant will receive a cash award only upon verification of all applicable eligibility requirements. Cash prizes will be paid out by topcoder (or its designee) in the US in US dollars no later than 90 days following the conclusion of the Competition or the conclusion of the TCO (as applicable). Taxes, if any, are the sole responsibility of the winner(s). Prizes which remain unclaimed or undeliverable for a period of six (6) months will be forfeited. \r\n\r\n\r\nAs a condition of winning and redeeming a cash prize, Contestants will be required to submit a completed (i) Contestant Questionnaire and all post Competition surveys, (ii) if requested, an Affidavit of Eligibility and Liability and Publicity Release, unless a notarized copy is already on file with topcoder (iii) IRS Form W-9 or W-8BEN, as appropriate if one is not already on file with topcoder, (iv) with respect to the TCO, a topcoder Competition Assignment Agreement, if one is not already on file with topcoder, and (v) with respect to the TCO, a Travel form. In completing any requested Affidavit of Eligibility and Liability and Publicity Release, a Contestant who wins a cash prize (a) confirms his/her eligibility, (b) represents and warrants that he/she has not cheated, (c) verifies the accuracy of the demographic information submitted to, and contained in, the topcoder member database, (d) authorizes topcoder to publicize the results of the Competition and/or the TCO, (e) agrees to sign any applicable forms required by tax authorities, (f) grants topcoder a license to all information submitted during the Competition and/or the TCO, and (g) releases topcoder from liability arising out of any prize won. topcoder requires all Contestants to complete the Form W-9 or W-8BEN for tax reporting purposes. Providing false information in the registration process or in the required forms described in this paragraph will result in a forfeiture of a cash prize. If a winning Contestant (i) does not reply to a notification from topcoder or the notification is undeliverable, (ii) in the case of TCO, does not return a requested Affidavit of Eligibility/Liability/Publicity release completed and signed within ten (10) days of date of prize notification, or (iii) is not otherwise in compliance with these Rules or the rules of a Competition, the Contestant will be disqualified and forfeit any prize, and topcoder may, at our discretion, select and notify another Contestant. Participatory prizes and non-cash prizes will be mailed within one month following the conclusion of the Competition or the TCO (as applicable) to the address provided by the Contestant in their topcoder profile. Unclaimed or undeliverable participatory prizes will be forfeited. Contestants who do not submit the required information by the applicable deadlines forfeit their prizes. Please allow 6-12 weeks for delivery. If a Contestant"s prize is returned, topcoder will resend that prize to a secondary address provided a request is made by the prizewinning Contestant. topcoder is not responsible for lost or stolen items and will not send additional prizes in the event a prize is not received. Each Contestant that participates in the Onsite portion of the TCO is eligible to receive only one (1) TCO T-shirt during the TCO, which may only be picked up by the Contestant at the TCO.\r\n\r\n\r\n
Links to Other Web Sites and Services \r\n\r\nTo the extent that our Website contains links to other Websites and outside services and resources, we do not control the availability and content of those Websites, services or resources, nor do we necessarily review or endorse materials available at or through such other Websites. Viewing other Websites or utilizing outside services and resources is done at your own risk. We shall not be liable for any loss or damage caused or alleged to be caused by or in connection with use of or reliance on any such content, goods or services available on or through any such site or resource. \r\n\r\n\r\n
Other Restrictions on Conduct \r\nWe are making the Website available to you for your information and personal use only. You may not (and you agree not to) use, copy, distribute, transmit, broadcast, sell, or do anything else with the Website for any other purpose.\r\n\r\n\r\nYou agree not to disrupt, modify or interfere with the functioning of our Website or any services provided on or through our Website or with any associated software, hardware or servers in any way and you agree not to impede or interfere with others\' use of our Website. This includes your agreement that you will not cheat; that the idea for the code and/or challenge(s) submitted by you is yours alone. This also includes your agreement that you will not provide your topcoder information including, but not limited to, your topcoder handle and rating, to any third party for the purpose of pursuing employment opportunities without the written consent of topcoder. If you are contacted by a third-party regarding employment opportunities and/or media interest as a result in your participation in topcoder Competitions, you agree to promptly notify topcoder of such contact. You also agree not to alter or tamper with any information or materials on, or associated with our Website or services provided on or through our Website. \r\nWe do not necessarily endorse, support, sanction, encourage, verify or agree with the comments, opinions, or other statements made public at our Website by users through our Competitions, forums or other interactive services available at our Website. Any information or material sent by users to any forums, including advice and opinions, represents the views and is the responsibility of those users and does not necessarily represent our views. \r\n\r\n\r\nYou agree that no impediment exists to you joining the topcoder Website, and your participation in topcoder\'s Website and the Competitions it offers will not interfere with your performance of any other agreement or obligation which has been or will be made with any third party. \r\n\r\n\r\n
Provisions Applicable to Chinese Citizens and Expatriates Residing in China \r\ntopcoder hereby incorporates into these Terms of Use and into our Privacy Policy the provisions of China\'s Decision on Safeguarding the Security of the Internet (the "Decision"). \r\n\r\n\r\nAccording to Section 1 of the Decision "to ensure operational security of the Internet, the person or organization perpetrating any of the following acts in violation of the criminal law shall be penalized according to the criminal code:\r\n\r\n
\r\n1.\tUnauthorized penetration into the computer and information system of the state affair, national defense or high-tech departments of the state; \r\n2.\tIntentional composition or dissemination of computer virus or other destructive programs, or attacking the computer system or telecommunication network and resulting in damage or destruction of such computer systems or telecommunication network; \r\n3.\tUnauthorized disruption of operation of the computer network or telecommunication service and resulting in malfunction of such network or telecommunication systems in violation of the laws or regulations of the state." \r\n \r\n\r\nAccording to Section 2 of the Decision, "to protect national security and social stability, the person or organization perpetrating any of the following acts in violation of the criminal law shall be penalized according to the criminal code:\r\n\r\n
\r\n1.\tDisseminating rumor or slander on the Internet, or publishing or diffusing maleficent information to instigate subversion of the state power or socialist system, advocate abruption of the country or harm unity of the country; \r\n2.\tStealing or disclosing the national or military secrets on the Internet; \r\n3.\tInstigating inter-ethnic enmity or prejudice, or disrupting ethnic unity on the Internet; and \r\n4.\tEstablishing or organizing heresies on the Internet and impeding the implementation of laws and regulations of the state." \r\n \r\n\r\n\r\nSection 3 of the Decision also stipulates that "to safeguard the order of the socialist market economy and social stability, the person or organization perpetrating any of the following acts in violation of the criminal law shall be penalized according to the criminal code:\r\n\r\n
\r\n1.\tSelling fake or shoddy goods on the Internet or making false or misleading propaganda of commodities on the Internet; \r\n2.\tHurting others\' commercial fame or reputation of products on the Internet; \r\n3.\tInfringing upon others\' intellectual property rights on the Internet; \r\n4.\tCompiling and distributing false information on the Internet to affect securities or futures transactions or disrupt order of the financial markets; and \r\n5.\tEstablishing pornographic web sites or web pages, providing links to pornographic web sites, or disseminating pornographic magazines, films, audio and videos materials or graphics on the Internet." \r\n \r\n\r\nSection 4 of the Decision stipulates that "to protect the legal rights of personal safety and property of individuals, legal persons and other organizations, the person or organization perpetrating any of the following acts in violation of the criminal law shall be penalized according to the criminal code:\r\n\r\n
\r\n1.\tInsulting others or drawing up slanders against others on the Internet; \r\n2.\tIllegally intercepting, modifying or deleting others\' emails or other database materials and infringing rights of the citizen of freedom and secrets in communicating and letter transmitting; and \r\n3.\tPerpetrating theft, fraud, or blackmailing on the Internet." \r\n \r\n\r\n
Choice of Law and Forum \r\n\r\nThese Terms of Use are governed by the laws of the state of California. You hereby agree to submit to the exclusive jurisdiction of the courts of San Francisco County, California. To the extent that applicable laws have mandatory application to this agreement or give you the right to bring action in any other courts, the above limitations may not apply to you. Use of this Website is unauthorized in any jurisdiction that does not give full effect to all provisions of these Terms of Use. \r\n\r\n\r\n
Severability and Enforceability \r\n\r\nIf any provision or portion of these Terms of Use is held illegal, invalid, or unenforceable, in whole or in part, it shall be modified to the minimum extent necessary to correct any deficiencies or replaced with a provision which is as close as is legally permissible to the provision found invalid or unenforceable and shall not affect the legality, validity or enforceability of any other provisions or portions of these Terms of Use. \r\n\r\n\r\n
Termination/Exclusion \r\n\r\nWe reserve the right, in our sole discretion, to revoke any and all privileges associated with accessing and/or competing on our Website, and to take any other action we deem appropriate including but not limited to terminating or suspending your use of www.topcoder.com, for no reason or any reason whatsoever, including improper use of this Website or failure to comply with these Terms of Use. \r\n\r\n\r\n
Additional TCO Terms \r\n\r\n
Eligibility \r\nThe TCO and each Competition that is part of the TCO is open to all members of the topcoder Website who have agreed to these Terms of Use and who are at least 18 years of age at the time of registration and have attained the age of majority in their jurisdiction of primary residence and citizenship. In addition to the other terms and eligibility criteria set forth in these Terms and Use, to be eligible to participate in the TCO, you must be (i) a U.S. citizen, (ii) a lawful permanent resident of the U.S., (iii) a temporary resident, asylee, refugee of the U.S., or have a lawfully issued work authorization card permitting unrestricted employment in the U.S., or (iv) a non-U.S. resident authorized in the country in which the member resides while participating in the TCO to perform services as an independent contractor; or (v) with respect to any Competition designated by us as an "Algorithm Competition", be in the United States under a valid and current visa issued by the United States government which does not prohibit receiving a cash prize. \r\n\r\n\r\nViolation of these Terms of Use may result in disqualification from the TCO and/or further consequences as determined in our sole discretion. Current employees of topcoder and those involved in the development, production (including prize suppliers and sponsors), implementation and distribution of the TCO (including Competitions run as part of the TCO) and their advertising or promotion agencies, parent companies, service providers, agents, officers, subsidiaries or affiliates, or any other persons or entities directly associated with the TCO and members of their immediate families and/or persons living in the same household as such persons, are ineligible to enter the TCO and related Competitions. Current employees of any TCO sponsor (or Competition sponsor that is part of TCO) or their parent companies, subsidiaries or affiliates which such Competition sponsor or TCO Sponsor, as applicable, is involved in the preparation, administration or judging of the TCO (and any related Competitions) and members of their employees\' immediate families and/or persons living in the same household as such employees, are ineligible to enter the TCO.\r\n\r\n\r\n
topcoder"s Discretion regarding the TCO \r\n\r\nAll decisions relating to the viability of Submissions, the ranking of Submissions and all other matters pertaining to the TCO are within the sole discretion of topcoder or its designee and shall be final and binding in all respects. By participating in the TCO and/or a Competition that is part of the TCO, a Contestant who wins a prize releases and agrees to hold harmless topcoder its affiliates, subsidiaries, sponsors, advertising and promotion agencies, and prize suppliers, and all of their respective directors, officers, employees, representatives and agents, from and against any and all liability for any loss, property damage or damage to person, including without limitation, death and injury, due in whole or in part, directly or indirectly, from or arising out of participation in the TCO, or participation in any TCO-related activity, or the receipt, use or misuse of a prize. topcoder reserves the right to limit the participation of any person in the TCO, amend or interpret these rules or official communications governing the TCO or cancel the TCO or any TCO-related Competition for any reason with prior notice. Notices for any such amendment, interpretation or cancellation will be deemed to have been given by posting on the Website and by virtue of a Contestant\'s continued participation in the TCO. A Contestant may terminate participation in the TCO upon written notice to topcoder.\r\n\r\n\r\n
TCO Logistics \r\n\r\nAll Contestants who have advanced or won a trip to the onsite portion of the TCO ("Onsite Contestants") must arrive at the event no later than the date and time specified in the TCO Rules. All Onsite Contestants must confirm their attendance at the onsite event no later than the date specified in the TCO Rules. In order to confirm attendance, Onsite Contestants must have acquired any necessary travel visas and confirm their ability to travel to the United States no later than the date specified in the TCO Rules. If an Onsite Contestant is required to travel from outside the United States, the Onsite Contestant must show proof of a visa and/or passport by the date specified in the TCO Rules. Onsite Contestants may email a copy of their documents as instructed in the TCO Rules. Onsite Contestants who fail to meet this requirement may be replaced as an Onsite Contestant. Contestants who are otherwise eligible to compete in any or all of the Competitions will be permitted to participate in the online portions of any/all of them. However, in the event a Contestant advances to the onsite finals in more than one Competition and any of the times for the onsite rounds of the Competitions overlap, the Onsite Contestant may participate in either, but not both, Competitions. The Onsite Contestant must notify topcoder of the Competition in which she/he will participate as an Onsite Contestant no later than the date specified in the TCO Rules.\r\n\r\n\r\ntopcoderwill issue visa invitation letters (upon request) to international Contestants who require one to obtain a travel visa to enter the United States. All registered TCO Contestants may request a visa invitation letter in respect of the year of the upcoming TCO. Contestants must fill out the visa letter request form in its entirety before a visa letter will be mailed. Contestants have until the date and time specified in the TCO Rules to request a letter. Visas can take a significant amount of time to obtain in certain countries, so it is in a Contestant\'s best interests to request one well before the deadline. The cost of obtaining a visa is the sole responsibility of the Contestant. See more information about travel visas. The TCO involves a large number of visa applications by topcoder members. By applying for a visa to attend the TCO, Contestant understands that topcoder will cooperate with all requests by consulates, the Department of Homeland Security, and law enforcement in connection with such Contestant\'s visa, including information about the visa applicants\' attendance at the TCO. Any abuse of the visa application process or any visa obtained for the TCO is considered a serious violation of US law and these Terms of Use, and, among other things, the Contestant will be subject to discipline by topcoder.\r\n\r\n\r\ntopcoder will provide air travel arrangements for each Onsite Contestant. The flight will be reserved and paid for by topcoder. Onsite Contestants will arrive on the date specified in the TCO Rules and depart the day after the final day of the Onsite portion of the TCO. At topcoder\'s sole discretion, topcoder will pay for each Onsite Contestant\'s airfare up to $1,500, but reserves the right to make exceptions to the maximum amount based on individual circumstances. If an Onsite Contestant wishes to take a flight other than the one provided by topcoder and/or wishes to stay at a hotel other than the one provided by topcoder, the Onsite Contestant shall be responsible for the entire cost of such deviation from the accommodations and travel arrangements provided by topcoder. In addition, the Onsite Contestant agrees to reimburse topcoder for any costs, penalties, fines or fees incurred by topcoder as a result of such deviation. Ground transportation to and from the airport will be provided for each Onsite Contestant by topcoder, as well as private hotel accommodations and certain meals. All other expenses are the responsibility of the Onsite Contestant. topcoder will not provide travel, lodging accommodations, or visa assistance for any guests of an Onsite Contestant. If an Onsite Contestant is eliminated or chooses not to utilize the travel accommodations provide by topcoder for any reason after he/she is confirmed as a finalist and travel accommodations have already been made for the Onsite Contestant by topcoder for the onsite finals, that Onsite Contestant may be held responsible for reimbursing topcoder for the cost of such accommodations. topcoder reserves the right to withhold any future cash prizes won by the Onsite Contestant until the cost of such accommodations has been fully reimbursed. Onsite Contestants must complete the following items and submit them to topcoder by the date specified in the TCO Rules (failure to submit these items will disqualify an Onsite Contestant from advancing to the onsite event):\r\n\r\n\r\nConfirmation of attendance/proof of travel documents " Please confirm your attendance onsite as directed in the TCO Rules. If you require a passport and/or visa to visit the United States, you must show proof of your documents.\r\n\r\n\r\nPlease submit a member photo, if you have not already done so.\r\n\r\n\r\nPlease also submit a fun photo to be shared during your onsite introduction.\r\n\r\n\r\nPlease ensure the information listed in your topcoder profile is current. We may need to mail your plane tickets or contact you via telephone.\r\n\r\n\r\nComplete the Onsite Contestant Questionnaire - your responses may be published in the program for the TCO.\r\n\r\n\r\nTravel form - provide topcoder with the appropriate travel information for your trip to the onsite event.\r\n\r\n\r\nApplicable tax forms (unless one is already on file with topcoder).\r\n\r\n\r\n
\r\n\r\n\r\n\r\n\r\n',agreed:!1,serverInformation:{serverName:"Topcoder API",apiVersion:"0.0.1",requestDuration:52,currentTime:1504892902498},requesterInformation:{id:"d8c441f8332161f71533f368c09aeead856e4366-K1RdFai7LCAgXVu5",remoteIP:"12.34.56.78",receivedParams:{apiVersion:"v2",termsOfUseId:"21193",action:"getTermsOfUse"}}}},function(e,t,n){(function(t){var r=n(66),o=n(68),a=n(69),i=n(70),s=n(14),u=n(71),l=n(77),c=n(78),d=n(79),f=n(80),p={param:"cbx",timeout:8e3,prefix:"__auth0jp"},h=n(85),m=n(40),g=n(87),y=n(88);function v(){var e=-1,t=navigator.userAgent;return"Microsoft Internet Explorer"===navigator.appName?null!=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(t)&&(e=parseFloat(RegExp.$1)):t.indexOf("Trident")>-1&&null!==new RegExp("rv:([0-9]{2,2}[.0-9]{0,})").exec(t)&&(e=parseFloat(RegExp.$1)),e}function b(e){var t="";for(var n in e)t+=n+"="+e[n]+",";return t.slice(0,-1)}function _(e,t){return!(!e||null==e[t])}function w(e,t){var n=e.status,r="string"==typeof e.responseText?e.responseText:e,o=10===v()||11===v(),a=!n||0===n,i=!!window.navigator.onLine;a&&!i?(n=0,r={code:"offline"}):a&&o?(n=401,r={code:"invalid_user_password"}):a&&(n=0,r={code:"connection_refused_timeout"}),t(new g(n,r))}function E(e,t,n){return e+"//"+t+n}function T(e){if(!(this instanceof T))return new T(e);o(e,"clientID"),o(e,"domain"),this._useJSONP=null!=e.forceJSONP?!!e.forceJSONP:y()&&!h("https:",e.domain),this._clientID=e.clientID,this._callbackURL=e.callbackURL||document.location.href,this._shouldRedirect=!!e.callbackURL,this._domain=e.domain,this._callbackOnLocationHash=e.callbackOnLocationHash,this._cordovaSocialPlugins={facebook:this._phonegapFacebookLogin},this._useCordovaSocialPlugins=e.useCordovaSocialPlugins,this._sendClientInfo=null==e.sendSDKClientInfo||e.sendSDKClientInfo}T.version=n(89).str,T.clientInfo={name:"auth0.js",version:T.version},T.prototype.openWindow=function(e,t,n){return window.open(e,t,b(n))},T.prototype._redirect=function(e){t.window.location=e},T.prototype._getCallbackOnLocationHash=function(e){return e&&void 0!==e.callbackOnLocationHash?e.callbackOnLocationHash:this._callbackOnLocationHash},T.prototype._getCallbackURL=function(e){return e&&void 0!==e.callbackURL?e.callbackURL:this._callbackURL},T.prototype._getClientInfoString=function(){var e=JSON.stringify(T.clientInfo);return r.encode(e)},T.prototype._getClientInfoHeader=function(){return{"Auth0-Client":this._getClientInfoString()}},T.prototype._renderAndSubmitWSFedForm=function(e,t){var n=document.createElement("div");n.innerHTML=t;var r=document.body.appendChild(n).children[0];e.popup&&!this._getCallbackOnLocationHash(e)&&(r.target="auth0_signup_popup"),r.submit()},T.prototype._getMode=function(e){return{scope:"openid",response_type:this._getCallbackOnLocationHash(e)?"token":"code"}},T.prototype._configureOfflineMode=function(e){e.scope&&e.scope.indexOf("offline_access")>=0&&(e.device=e.device||"Browser")},T.prototype._getUserInfo=function(e,t,n){if(!e||e.user_id)return n(null,e);var r=this._domain,o=E("https:",r,"/tokeninfo"),a=function(e,t){var r=new Error(e+": "+(t||""));r.error=e,r.error_description=t,n(r)};return this._useJSONP?f(o+"?"+s.stringify({id_token:t}),p,function(e,t){return e?a(0,e.toString()):200===t.status?n(null,t.user):a(t.status,t.err||t.error)}):c({url:h("https:",r)?"/tokeninfo":o,method:"post",type:"json",crossOrigin:!h("https:",r),data:{id_token:t}}).fail(function(e){a(e.status,e.responseText)}).then(function(e){n(null,e)})},T.prototype.getProfile=function(e,t){if("function"!=typeof t)throw new Error("A callback function is required");if(!e||"string"!=typeof e)return t(new Error("Invalid token"));this._getUserInfo(this.decodeJwt(e),e,t)},T.prototype.validateUser=function(e,t){var n=this._domain,r="/public/api/users/validate_userpassword",o=E("https:",n,r),a=u(e,{client_id:this._clientID,username:l(e.username||e.email||"")});if(this._useJSONP)return f(o+"?"+s.stringify(a),p,function(e,n){return e?t(e):"error"in n&&404!==n.status?t(new Error(n.error)):void t(null,200===n.status)});c({url:h("https:",n)?r:o,method:"post",type:"text",data:a,crossOrigin:!h("https:",n),error:function(e){if(404!==e.status)return t(new Error(e.responseText));t(null,!1)},success:function(e){t(null,200===e.status)}})},T.prototype.decodeJwt=function(e){var t=e&&e.split(".")[1];return m(r.decode(t))},T.prototype.parseHash=function(e){var t;if((e=e||window.location.hash).match(/error/))return e=e.substr(1).replace(/^\//,""),{error:(t=s.parse(e)).error,error_description:t.error_description};if(!e.match(/access_token/))return null;e=e.substr(1).replace(/^\//,"");var n=(t=s.parse(e)).id_token,r=t.refresh_token,o=this.decodeJwt(n),u=function(e){return{error:"invalid_token",error_description:e}},l=a(o.aud)?o.aud:[o.aud];return-1===i(l,this._clientID)?u("The clientID configured ("+this._clientID+") does not match with the clientID set in the token ("+l.join(", ")+")."):o.iss&&o.iss!=="https://"+this._domain+"/"?u("The domain configured (https://"+this._domain+"/) does not match with the domain set in the token ("+o.iss+")."):{profile:o,id_token:n,access_token:t.access_token,state:t.state,refresh_token:r}},T.prototype.signup=function(e,t){var n,r=this,o={client_id:this._clientID,redirect_uri:this._getCallbackURL(e),username:l(e.username||""),email:l(e.email||e.username||""),tenant:this._domain.split(".")[0]},a=u(this._getMode(e),e,o);function i(){return e.auto_login?r.login(e,t):"function"==typeof t?t():void 0}function d(e,r){var o=new g(e,r);if(n&&"function"==typeof n.kill&&n.kill(),"function"==typeof t)return t(o);throw o}this._configureOfflineMode(a),_(e,"sso")||(e.sso=!0),_(e,"auto_login")||(e.auto_login=!0),e.auto_login&&e.popup&&(!this._getCallbackOnLocationHash(e)||e.sso)&&(n=this._buildPopupWindow(e));var m=this._domain,y=E("https:",m,"/dbconnections/signup");if(this._useJSONP)return f(y+"?"+s.stringify(a),p,function(e,t){return e?d(0,e):200==t.status?i():d(t.status,t.err||t.error)});c({url:h("https:",m)?"/dbconnections/signup":y,method:"post",type:"html",data:a,success:i,crossOrigin:!h("https:",m),error:function(e){d(e.status,e.responseText)}})},T.prototype.changePassword=function(e,t){var n={tenant:this._domain.split(".")[0],client_id:this._clientID,connection:e.connection,username:l(e.username||""),email:l(e.email||e.username||""),password:e.password};function r(e,n){var r=new g(e,n);if(t)return t(r)}var o=this._domain,a="/dbconnections/change_password",i=E("https:",o,a);if(this._useJSONP)return f(i+"?"+s.stringify(n),p,function(e,n){return e?r(0,e):200==n.status?t(null,n.message):r(n.status,n.err||n.error)});c({url:h("https:",o)?a:i,method:"post",type:"html",data:n,crossOrigin:!h("https:",o),error:function(e){r(e.status,e.responseText)},success:function(e){t(null,e)}})},T.prototype._buildAuthorizeQueryString=function(e,t){var n=this._buildAuthorizationParameters(e,t);return s.stringify(n)},T.prototype._buildAuthorizationParameters=function(e,t){var n,r=u.apply(null,e);for(this._configureOfflineMode(r),this._sendClientInfo&&(r.auth0Client=this._getClientInfoString()),t=t||["popup","popupOptions"],n=0;n1&&(!e.sso||window.cordova))return this.loginWithResourceOwner(e,t);var n,r=this;if(e.popup&&!this._getCallbackOnLocationHash(e)&&(n=this._buildPopupWindow(e)),t&&t.length>1&&e.sso)return this.loginWithUsernamePasswordAndSSO(e,t);var o=u(this._getMode(e),e,{client_id:this._clientID,redirect_uri:this._getCallbackURL(e),username:l(e.username||e.email||""),tenant:this._domain.split(".")[0]});this._configureOfflineMode(o);var a=this._domain,i=E("https:",a,"/usernamepassword/login");if(this._useJSONP)return f(i+"?"+s.stringify(o),p,function(o,a){if(o)return n&&n.kill&&n.kill(),t(o);if("error"in a){n&&n.kill&&n.kill();var i=new g(a.status,a.error);return t(i)}r._renderAndSubmitWSFedForm(e,a.form)});function d(e){if(t)return t(e);throw e}c({url:h("https:",a)?"/usernamepassword/login":i,method:"post",type:"html",data:o,headers:this._getClientInfoHeader(),crossOrigin:!h("https:",a),success:function(t){r._renderAndSubmitWSFedForm(e,t)},error:function(e){n&&n.kill&&n.kill(),w(e,d)}})},T.prototype.loginWithPasscode=function(e,t){if(null==e.email&&null==e.phoneNumber)throw new Error("email or phoneNumber is required for authentication");if(null==e.passcode)throw new Error("passcode is required for authentication");if(e.connection=null==e.email?"sms":"email",!this._shouldRedirect)return delete(e=u(e,{username:null==e.email?e.phoneNumber:e.email,password:e.passcode,sso:!1})).email,delete e.phoneNumber,delete e.passcode,this.loginWithResourceOwner(e,t);var n={connection:e.connection};e.phoneNumber&&(e.phone_number=e.phoneNumber,delete e.phoneNumber,n.phone_number=e.phone_number),e.email&&(n.email=e.email),e.verification_code=e.passcode,delete e.passcode,n.verification_code=e.verification_code;var r=this;this._verify(n,function(n){if(n)return t(n);r._verify_redirect(e)})},T.prototype._verify=function(e,t){var n=this._domain,r=E("https:",n,"/passwordless/verify"),o=e;return this._useJSONP?(this._sendClientInfo&&(o.auth0Client=this._getClientInfoString()),f(r+"?"+s.stringify(o),p,function(e,n){return e?t(new Error("0: "+e.toString())):200===n.status?t(null,!0):t({status:n.status})})):c({url:h("https:",n)?"/passwordless/verify":r,method:"post",headers:this._getClientInfoHeader(),crossOrigin:!h("https:",n),data:o}).fail(function(e){try{t(JSON.parse(e.responseText))}catch(r){var n=new Error(e.status+"("+e.statusText+"): "+e.responseText);n.statusCode=e.status,n.error=e.statusText,n.message=e.responseText,t(n)}}).then(function(e){t(null,e)})},T.prototype._verify_redirect=function(e){var t=[this._getMode(e),e,{client_id:this._clientID,redirect_uri:this._getCallbackURL(e)}],n=this._buildAuthorizeQueryString(t),r=E("https:",this._domain,"/passwordless/verify_redirect?"+n);this._redirect(r)},T.prototype.renewIdToken=function(e,t){this.getDelegationToken({id_token:e,scope:"passthrough",api:"auth0"},t)},T.prototype.refreshToken=function(e,t){this.getDelegationToken({refresh_token:e,scope:"passthrough",api:"auth0"},t)},T.prototype.getDelegationToken=function(e,t){if(!(e=e||{}).id_token&&!e.refresh_token)throw new Error("You must send either an id_token or a refresh_token to get a delegation token.");var n=u({grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",client_id:this._clientID,target:e.targetClientId||this._clientID,api_type:e.api},e);delete n.hasOwnProperty,delete n.targetClientId,delete n.api;var r=this._domain,o=E("https:",r,"/delegation");if(this._useJSONP)return f(o+"?"+s.stringify(n),p,function(e,n){if(e)return t(e);if("error"in n){var r=new g(n.status,n.error_description||n.error);return t(r)}t(null,n)});c({url:h("https:",r)?"/delegation":o,method:"post",type:"json",data:n,crossOrigin:!h("https:",r),success:function(e){t(null,e)},error:function(e){try{t(JSON.parse(e.responseText))}catch(a){var n=e,r=10===v()||11===v(),o=!n.status||0===n.status;o&&!window.navigator.onLine?((n={}).status=0,n.responseText={code:"offline"}):o&&r?((n={}).status=401,n.responseText={code:"invalid_operation"}):o?((n={}).status=0,n.responseText={code:"connection_refused_timeout"}):n.responseText=e,t(new g(n.status,n.responseText))}}})},T.prototype.logout=function(e){var t=E("https:",this._domain,"/logout");e&&(t+="?"+s.stringify(e)),this._redirect(t)},T.prototype.getSSOData=function(e,t){"function"==typeof e&&(t=e,e=!1);var n={sso:!1},r=this._domain,o=E("https:",r,"/user/ssodata"),a=h("https:",r),i={};if(e&&(i={ldaps:1,client_id:this._clientID}),this._useJSONP){var l=u({},p,{timeout:3e3});return i.auth0Client=this._getClientInfoString(),o+="?"+s.stringify(i),f(o,l,function(e,r){t(null,e?n:r)})}c({url:a?"/user/ssodata":o,method:"get",type:"json",data:i,crossOrigin:!a,withCredentials:!a,timeout:3e3}).fail(function(e){new Error("There was an error in the request that obtains the user's country").cause=e,t(null,n)}).then(function(e){t(null,e)})},T.prototype.getConnections=function(e){return f("https://"+this._domain+"/public/api/"+this._clientID+"/connections",p,e)},T.prototype.startPasswordless=function(e,t){if("object"!=typeof e)throw new Error("An options object is required");if("function"!=typeof t)throw new Error("A callback function is required");if(!e.email&&!e.phoneNumber)throw new Error("An `email` or a `phoneNumber` is required.");var n=this._domain,r=E("https:",n,"/passwordless/start"),o={client_id:this._clientID};return e.email?(o.email=e.email,o.connection="email",e.authParams&&(o.authParams=e.authParams),e.send&&"link"!==e.send||(o.authParams||(o.authParams={}),o.authParams.redirect_uri=this._callbackURL,o.authParams.response_type=this._shouldRedirect&&!this._callbackOnLocationHash?"code":"token"),e.send&&(o.send=e.send)):(o.phone_number=e.phoneNumber,o.connection="sms"),this._useJSONP?(this._sendClientInfo&&(o.auth0Client=this._getClientInfoString()),f(r+"?"+s.stringify(o),p,function(e,n){return e?t(new Error("0: "+e.toString())):200===n.status?t(null,!0):t(n.err||n.error)})):c({url:h("https:",n)?"/passwordless/start":r,method:"post",type:"json",headers:this._getClientInfoHeader(),crossOrigin:!h("https:",n),data:o}).fail(function(e){try{t(JSON.parse(e.responseText))}catch(r){var n=new Error(e.status+"("+e.statusText+"): "+e.responseText);n.statusCode=e.status,n.error=e.statusText,n.message=e.responseText,t(n)}}).then(function(e){t(null,e)})},T.prototype.requestMagicLink=function(e,t){return this.startPasswordless(e,t)},T.prototype.requestEmailCode=function(e,t){return e.send="code",this.startPasswordless(e,t)},T.prototype.verifyEmailCode=function(e,t){return e.passcode=e.code,delete e.code,this.login(e,t)},T.prototype.requestSMSCode=function(e,t){return this.startPasswordless(e,t)},T.prototype.verifySMSCode=function(e,t){return e.passcode=e.code,delete e.code,this.login(e,t)},e.exports=T}).call(this,n(65))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(67);e.exports={encode:function(e){return r.btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},decode:function(e){return e=(e+=Array(5-e.length%4).join("=")).replace(/\-/g,"+").replace(/\_/g,"/"),r.atob(e)}}},function(e,t,n){!function(){var e=t,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r=function(){try{document.createElement("$")}catch(e){return e}}();e.btoa||(e.btoa=function(e){for(var t,o,a=0,i=n,s="";e.charAt(0|a)||(i="=",a%1);s+=i.charAt(63&t>>8-a%1*8)){if((o=e.charCodeAt(a+=.75))>255)throw r;t=t<<8|o}return s}),e.atob||(e.atob=function(e){if((e=e.replace(/=+$/,"")).length%4==1)throw r;for(var t,o,a=0,i=0,s="";o=e.charAt(i++);~o&&(t=a%4?64*t+o:o,a++%4)?s+=String.fromCharCode(255&t>>(-2*a&6)):0)o=n.indexOf(o);return s})}()},function(e,t){e.exports=function(e,t){if(!e[t])throw new Error(t+" is required.")}},function(e,t){var n=Object.prototype.toString;e.exports=null!=Array.isArray?Array.isArray:function(e){return"[object Array]"===n.call(e)}},function(e,t){e.exports=Array.prototype.indexOf?function(e,t,n){return e.indexOf(t,n)}:function(e,t,n){var r;if(null==e)throw new TypeError('"array" is null or not defined');var o=Object(e),a=o.length>>>0;if(0===a)return-1;var i=+n||0;Math.abs(i)===1/0&&(i=0);if(i>=a)return-1;r=Math.max(i>=0?i:a-Math.abs(i),0);for(;r2?arguments[2]:null;if(s===+s)for(o=0;o=0&&"[object Function]"===n.call(e.callee)),r}},function(e,t){e.exports=function(e){return null!==e&&("object"==typeof e||"function"==typeof e)}},function(e,t){(t=e.exports=function(e){return e.replace(/^\s*|\s*$/g,"")}).left=function(e){return e.replace(/^\s*/,"")},t.right=function(e){return e.replace(/\s*$/,"")}},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_RESULT__;
+!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("lodash"),require("babel-runtime/core-js/promise"),require("redux-actions"),require("babel-runtime/helpers/extends"),require("babel-runtime/regenerator"),require("babel-runtime/helpers/asyncToGenerator"),require("babel-runtime/helpers/defineProperty"),require("topcoder-react-utils"),require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/createClass"),require("qs"),require("babel-runtime/core-js/json/stringify"),require("babel-runtime/helpers/slicedToArray"),require("tc-accounts"),require("babel-runtime/helpers/toConsumableArray"),require("moment"),require("babel-runtime/core-js/set"),require("isomorphic-fetch"),require("babel-runtime/core-js/object/keys"),require("moment-duration-format"),require("babel-runtime/core-js/set-immediate"),require("le_node"),require("babel-runtime/core-js/object/assign"),require("to-capital-case"),require("babel-runtime/core-js/object/values")):"function"==typeof define&&define.amd?define(["lodash","babel-runtime/core-js/promise","redux-actions","babel-runtime/helpers/extends","babel-runtime/regenerator","babel-runtime/helpers/asyncToGenerator","babel-runtime/helpers/defineProperty","topcoder-react-utils","babel-runtime/helpers/classCallCheck","babel-runtime/helpers/createClass","qs","babel-runtime/core-js/json/stringify","babel-runtime/helpers/slicedToArray","tc-accounts","babel-runtime/helpers/toConsumableArray","moment","babel-runtime/core-js/set","isomorphic-fetch","babel-runtime/core-js/object/keys","moment-duration-format","babel-runtime/core-js/set-immediate","le_node","babel-runtime/core-js/object/assign","to-capital-case","babel-runtime/core-js/object/values"],t):"object"==typeof exports?exports["topcoder-react-lib"]=t(require("lodash"),require("babel-runtime/core-js/promise"),require("redux-actions"),require("babel-runtime/helpers/extends"),require("babel-runtime/regenerator"),require("babel-runtime/helpers/asyncToGenerator"),require("babel-runtime/helpers/defineProperty"),require("topcoder-react-utils"),require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/createClass"),require("qs"),require("babel-runtime/core-js/json/stringify"),require("babel-runtime/helpers/slicedToArray"),require("tc-accounts"),require("babel-runtime/helpers/toConsumableArray"),require("moment"),require("babel-runtime/core-js/set"),require("isomorphic-fetch"),require("babel-runtime/core-js/object/keys"),require("moment-duration-format"),require("babel-runtime/core-js/set-immediate"),require("le_node"),require("babel-runtime/core-js/object/assign"),require("to-capital-case"),require("babel-runtime/core-js/object/values")):e["topcoder-react-lib"]=t(e.lodash,e["babel-runtime/core-js/promise"],e["redux-actions"],e["babel-runtime/helpers/extends"],e["babel-runtime/regenerator"],e["babel-runtime/helpers/asyncToGenerator"],e["babel-runtime/helpers/defineProperty"],e["topcoder-react-utils"],e["babel-runtime/helpers/classCallCheck"],e["babel-runtime/helpers/createClass"],e.qs,e["babel-runtime/core-js/json/stringify"],e["babel-runtime/helpers/slicedToArray"],e["tc-accounts"],e["babel-runtime/helpers/toConsumableArray"],e.moment,e["babel-runtime/core-js/set"],e["isomorphic-fetch"],e["babel-runtime/core-js/object/keys"],e["moment-duration-format"],e["babel-runtime/core-js/set-immediate"],e.le_node,e["babel-runtime/core-js/object/assign"],e["to-capital-case"],e["babel-runtime/core-js/object/values"])}("undefined"!=typeof self?self:this,function(__WEBPACK_EXTERNAL_MODULE__0__,__WEBPACK_EXTERNAL_MODULE__1__,__WEBPACK_EXTERNAL_MODULE__2__,__WEBPACK_EXTERNAL_MODULE__3__,__WEBPACK_EXTERNAL_MODULE__4__,__WEBPACK_EXTERNAL_MODULE__5__,__WEBPACK_EXTERNAL_MODULE__6__,__WEBPACK_EXTERNAL_MODULE__8__,__WEBPACK_EXTERNAL_MODULE__9__,__WEBPACK_EXTERNAL_MODULE__10__,__WEBPACK_EXTERNAL_MODULE__14__,__WEBPACK_EXTERNAL_MODULE__15__,__WEBPACK_EXTERNAL_MODULE__16__,__WEBPACK_EXTERNAL_MODULE__17__,__WEBPACK_EXTERNAL_MODULE__19__,__WEBPACK_EXTERNAL_MODULE__20__,__WEBPACK_EXTERNAL_MODULE__23__,__WEBPACK_EXTERNAL_MODULE__29__,__WEBPACK_EXTERNAL_MODULE__53__,__WEBPACK_EXTERNAL_MODULE__54__,__WEBPACK_EXTERNAL_MODULE__55__,__WEBPACK_EXTERNAL_MODULE__56__,__WEBPACK_EXTERNAL_MODULE__90__,__WEBPACK_EXTERNAL_MODULE__91__,__WEBPACK_EXTERNAL_MODULE__104__){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=51)}([function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__0__},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__1__},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__2__},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__3__},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__4__},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__5__},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__6__},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTcM2mToken=t.getApiV4=t.getApiV3=t.getApiV2=void 0;var n=y(r(53)),o=y(r(1)),a=y(r(15)),i=y(r(4)),s=y(r(3)),u=y(r(5)),l=y(r(9)),c=y(r(10)),d=t.getTcM2mToken=function(){var e=(0,u.default)(i.default.mark(function e(){var t,r,n,o;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(h.isomorphy.isServerSide()){e.next=2;break}throw new Error("getTcM2mToken() called outside the server");case 2:if(t=Date.now(),r=d.cached,n=h.config.SECRET.TC_M2M,r&&!(r.expires1&&void 0!==arguments[1]?arguments[1]:{};return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r=this.private,n=r.base,o=r.token,a=l.headers?f.default.clone(l.headers):{},o&&(a.Authorization="Bearer "+o),e.t0=a["Content-Type"],e.next=null===e.t0?6:void 0===e.t0?8:10;break;case 6:return delete a["Content-Type"],e.abrupt("break",10);case 8:return a["Content-Type"]="application/json",e.abrupt("break",10);case 10:if(!h.isomorphy.isClientSide()&&!h.isomorphy.isDevBuild()){e.next=19;break}if(u=Date.now(),!((b+=v)>u)){e.next=18;break}return e.next=16,(0,m.delay)(b-u);case 16:e.next=19;break;case 18:b=u;case 19:return e.abrupt("return",(0,p.default)(""+n+t,(0,s.default)({},l,{headers:a})).catch(function(e){throw(0,g.setErrorIcon)(g.ERROR_ICON_TYPES.NETWORK,""+n+t,e.message),e}));case 20:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"delete",value:function(e,t){return this.fetch(e,{body:t,method:"DELETE"})}},{key:"get",value:function(e){return this.fetch(e)}},{key:"post",value:function(e,t){return this.fetch(e,{body:t,method:"POST"})}},{key:"postJson",value:function(e,t){return this.post(e,(0,a.default)(t))}},{key:"put",value:function(e,t){return this.fetch(e,{body:t,method:"PUT"})}},{key:"putJson",value:function(e,t){return this.put(e,(0,a.default)(t))}},{key:"patch",value:function(e,t){return this.fetch(e,{body:t,method:"PATCH"})}},{key:"patchJson",value:function(e,t){return this.patch(e,(0,a.default)(t))}},{key:"upload",value:function(e,t,r){var a=this.private,i=a.base,s=a.token,u=t.headers?f.default.clone(t.headers):{};return s&&(u.Authorization="Bearer "+s),h.isomorphy.isClientSide()?new o.default(function(o,a){var s=new XMLHttpRequest;s.open(t.method,""+i+e),(0,n.default)(u).forEach(function(e){null!=u[e]&&s.setRequestHeader(e,u[e])}),s.onload=function(e){return o(e.target.responseText)},s.onerror=a,s.upload&&r&&(s.upload.onprogress=function(e){e.lengthComputable&&r(e.loaded/e.total)}),s.send(t.body)}):this.fetch(e,t)}}]),e}();t.default=_;var w={};function E(e,t){if(!e||!h.config.API[e])throw new Error(e+" is not a valid API version");return w[e]&&w[e].private.token===t||(w[e]=new _(h.config.API[e],t)),w[e]}t.getApiV2=function(e){return E("V2",e)},t.getApiV3=function(e){return E("V3",e)},t.getApiV4=function(e){return E("V4",e)};d.MIN_LIFETIME=3e4},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__8__},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__9__},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__10__},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(r(15)),o=i(r(0)),a=r(8);function i(e){return e&&e.__esModule?e:{default:e}}var s={};o.default.functions(console).forEach(function(e){s[e]=a.isomorphy.isDevBuild()||a.isomorphy.isServerSide()?console[e]:o.default.noop});var u=void 0;if(a.isomorphy.isServerSide()){var l=a.config.LOG_ENTRIES_TOKEN;if(l){var c=r(56);u=new c({token:l})}}else{var d=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),o=1;o=500&&(0,y.setErrorIcon)(y.ERROR_ICON_TYPES.API,"/challenges",t.statusText),new Error(t.statusText);case 3:return e.next=5,t.json();case 5:if(200===(r=e.sent.result).status){e.next=8;break}throw new Error(r.content);case 8:return e.abrupt("return",r);case 9:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}();t.normalizeChallengeDetails=w,t.normalizeChallenge=E,t.getService=function(e,t){C&&C.private.tokenV3===e&&C.tokenV2===t||(C=new T(e,t));return C};var f=_(r(0)),p=_(r(20)),h=_(r(14)),m=r(17),g=_(r(11)),y=r(12),v=r(13),b=r(7);function _(e){return e&&e.__esModule?e:{default:e}}t.ORDER_BY={SUBMISSION_END_DATE:"submissionEndDate"};function w(e,t,r,n){var o=(0,c.default)({},e,{id:e.challengeId,reliabilityBonus:f.default.get(t,"reliabilityBonus",0),status:(e.currentStatus||"").toUpperCase(),allPhases:[],currentPhases:[],name:e.challengeName||e.challengeTitle,projectId:Number(e.projectId),forumId:Number(e.forumId),introduction:e.introduction||"",detailedRequirements:"null"===e.detailedRequirements?"":e.detailedRequirements,finalSubmissionGuidelines:"null"===e.finalSubmissionGuidelines?"":e.finalSubmissionGuidelines,screeningScorecardId:Number(e.screeningScorecardId),reviewScorecardId:Number(e.reviewScorecardId),numberOfCheckpointsPrizes:e.numberOfCheckpointsPrizes,topCheckPointPrize:e.topCheckPointPrize,submissionsViewable:e.submissionsViewable||"false",reviewType:e.reviewType,allowStockArt:"true"===e.allowStockArt,fileTypes:e.filetypes||[],environment:e.environment,codeRepo:e.codeRepo,forumLink:e.forumLink,submissionLimit:Number(e.submissionLimit)||0,drPoints:e.digitalRunPoints,directUrl:e.directUrl,technologies:e.technologies||e.technology||[],platforms:e.platforms||[],prizes:e.prize||e.prizes||[],events:f.default.map(e.event,function(e){return{eventName:e.eventShortDesc,eventId:e.id,description:e.eventDescription}}),terms:e.terms,submissions:e.submissions,track:f.default.toUpper(e.challengeCommunity),subTrack:e.subTrack,checkpoints:e.checkpoints,documents:e.documents||[],numRegistrants:e.numberOfRegistrants,numberOfCheckpointSubmissions:e.numberOfCheckpointSubmissions,registrants:e.registrants||[]});if(o.winners=f.default.map(e.winners,function(e,t){return(0,c.default)({},e,{handle:e.submitter,placement:e.rank||t+1})}),"MARATHON_MATCH"===o.subTrack&&(o.track="DATA_SCIENCE"),o.mainEvent=o.events[0]||{},t){var a={};t.groupIds&&t.groupIds.forEach(function(e){a[e]=!0}),f.default.merge(o,{componentId:t.componentId,contestId:t.contestId,submissionEndDate:t.submissionEndDate,submissionEndTimestamp:t.submissionEndDate,allPhases:t.allPhases||[],currentPhases:t.currentPhases||[],numSubmissions:t.numSubmissions,groups:a})}r&&f.default.defaults(o,{userDetails:r.userDetails});var i=f.default.some(o.allPhases,function(e){return"Registration"===e.phaseType&&"Open"===e.phaseStatus})?"Yes":"No";return f.default.defaults(o,{communities:new l.default([v.COMPETITION_TRACKS[o.track]]),registrationOpen:i,users:n?(0,u.default)({},n,!0):{}}),o.submissions&&o.submissions.length||(o.submissions=o.registrants.filter(function(e){return e.submissionDate||""}).sort(function(e,t){return(e.submissionDate||"").localeCompare(t.submissionDate||"")})),o.allPhases||(o.allPhases=[]),o.track||(o.track=""),o}function E(e,t){var r="Open"===e.allPhases.filter(function(e){return"Registration"===e.phaseType})[0].phaseStatus?"Yes":"No",n={};e.groupIds&&e.groupIds.forEach(function(e){n[e]=!0}),e.prizes||(e.prizes=e.prize||[]),e.totalPrize||(e.totalPrize=e.prizes.reduce(function(e,t){return e+t},0)),e.technologies||(e.technologies=[]),e.platforms||(e.platforms=[]),"DEVELOP_MARATHON_MATCH"===e.subTrack&&(e.track="DATA_SCIENCE"),f.default.defaults(e,{communities:new l.default([v.COMPETITION_TRACKS[e.track]]),groups:n,registrationOpen:r,submissionEndTimestamp:e.submissionEndDate,users:t?(0,u.default)({},t,!0):{}})}var T=function(){function e(t,r){var n=this;(0,o.default)(this,e);var a=function(){var e=(0,s.default)(i.default.mark(function e(t){var r,o,a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=(0,c.default)({filter:h.default.stringify(s,{encode:!1})},u),o=t+"?"+h.default.stringify(r),e.next=4,n.private.api.get(o).then(d);case 4:return a=e.sent,e.abrupt("return",{challenges:a.content||[],totalCount:a.metadata.totalCount,meta:a.metadata});case 6:case"end":return e.stop()}},e,n)}));return function(t){return e.apply(this,arguments)}}();this.private={api:(0,b.getApi)("V4",t),apiV2:(0,b.getApi)("V2",r),getChallenges:a,tokenV2:r,tokenV3:t}}return(0,a.default)(e,[{key:"activate",value:function(){var e=(0,s.default)(i.default.mark(function e(t){var r;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.post("/challenges/"+t+"/activate");case 2:if((r=e.sent).ok){e.next=5;break}throw new Error(r.statusText);case 5:return e.next=7,r.json();case 7:if(200===(r=e.sent.result).status){e.next=10;break}throw new Error(r.content);case 10:return e.abrupt("return",r.content);case 11:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"close",value:function(){var e=(0,s.default)(i.default.mark(function e(t,r){var n,o;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n="/challenges/"+t+"/close",r&&(n=n+"?winnerId="+r),e.next=4,this.private.api.post(n);case 4:if((o=e.sent).ok){e.next=7;break}throw new Error(o.statusText);case 7:return e.next=9,o.json();case 9:if(200===(o=e.sent.result).status){e.next=12;break}throw new Error(o.content);case 12:return e.abrupt("return",o.content);case 13:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"createTask",value:function(){var e=(0,s.default)(i.default.mark(function e(t,r,n,o,a,s,u,l,c,d){var h,m;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return h={param:{assignees:[a],billingAccountId:r,confidentialityType:"public",detailedRequirements:o,submissionGuidelines:u,milestoneId:1,name:n,technologies:d,prizes:s?[s]:[],projectId:t,registrationStartsAt:(0,p.default)().toISOString(),reviewType:"INTERNAL",subTrack:"FIRST_2_FINISH",task:!0}},l&&f.default.assign(h.param,{copilotId:l,copilotFee:c}),e.next=4,this.private.api.postJson("/challenges",h);case 4:if((m=e.sent).ok){e.next=7;break}throw new Error(m.statusText);case 7:return e.next=9,m.json();case 9:if(200===(m=e.sent.result).status){e.next=12;break}throw new Error(m.content);case 12:return e.abrupt("return",m.content);case 13:case"end":return e.stop()}},e,this)}));return function(t,r,n,o,a,i,s,u,l,c){return e.apply(this,arguments)}}()},{key:"getChallengeDetails",value:function(){var e=(0,s.default)(i.default.mark(function e(t){var r,n,o,a,s;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/challenges/"+t).then(d).then(function(e){return e.content});case 2:return r=e.sent,e.next=5,this.private.getChallenges("/challenges/",{id:t}).then(function(e){return e.challenges[0]});case 5:if(n=e.sent,o=this.private.tokenV3&&(0,m.decodeToken)(this.private.tokenV3).handle,e.t0=o,!e.t0){e.next=12;break}return e.next=11,this.getUserChallenges(o,{id:t}).then(function(e){return e.challenges[0]}).catch(function(){return null});case 11:e.t0=e.sent;case 12:return a=e.t0,(s=w(r,n,a,o)).fetchedWithAuth=Boolean(this.private.api.private.token),e.abrupt("return",s);case 16:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getChallengeSubtracks",value:function(){return this.private.api.get("/challenge-types").then(function(e){return e.ok?e.json():new Error(e.statusText)}).then(function(e){return 200===e.result.status?e.result.content:new Error(e.result.content)})}},{key:"getChallengeTags",value:function(){return this.private.api.get("/technologies").then(function(e){return e.ok?e.json():new Error(e.statusText)}).then(function(e){return 200===e.result.status?e.result.content:new Error(e.result.content)})}},{key:"getChallenges",value:function(e,t){return this.private.getChallenges("/challenges/",e,t).then(function(e){return e.challenges.forEach(function(e){return E(e)}),e})}},{key:"getSrms",value:function(){var e=(0,s.default)(i.default.mark(function e(t){var r;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/srms/?"+h.default.stringify(t));case 2:return r=e.sent,e.abrupt("return",(0,v.getApiResponsePayload)(r));case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getUserChallenges",value:function(e,t,r){var n="/members/"+e.toLowerCase()+"/challenges/";return this.private.getChallenges(n,t,r).then(function(t){return t.challenges.forEach(function(t){return E(t,e)}),t})}},{key:"getUserMarathonMatches",value:function(e,t,r){var n="/members/"+e.toLowerCase()+"/mms/";return this.private.getChallenges(n,t,r)}},{key:"getUserSrms",value:function(){var e=(0,s.default)(i.default.mark(function e(t,r){var n,o;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n="/members/"+t+"/srms/?"+h.default.stringify(r),e.next=3,this.private.api.get(n);case 3:return o=e.sent,e.abrupt("return",(0,v.getApiResponsePayload)(o));case 5:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"register",value:function(){var e=(0,s.default)(i.default.mark(function e(t){var r,n;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r="/challenges/"+t+"/register",e.next=3,this.private.api.postJson(r);case 3:if((n=e.sent).ok){e.next=6;break}throw new Error(n.statusText);case 6:return e.abrupt("return",n.json());case 7:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"unregister",value:function(){var e=(0,s.default)(i.default.mark(function e(t){var r,n;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r="/challenges/"+t+"/unregister",e.next=3,this.private.api.post(r);case 3:if((n=e.sent).ok){e.next=6;break}throw new Error(n.statusText);case 6:return e.abrupt("return",n.json());case 7:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getActiveChallengesCount",value:function(e){return this.getUserChallenges(e,{status:"ACTIVE"},{limit:1,offset:0}).then(function(e){return e.totalCount})}},{key:"submit",value:function(e,t,r,o){var a=void 0,i=void 0,s=void 0;return"DESIGN"===r?(a=this.private.api,i="application/json",s="/submissions/"):(a=this.private.apiV2,i=null,s="/develop/challenges/"+t+"/upload"),a.upload(s,{body:e,headers:{"Content-Type":i},method:"POST"},o).then(function(e){var t=JSON.parse(e);if("DEVELOP"===r)return t;var s=t.result.content.id;return a.upload("/submissions/"+s+"/process/",{body:(0,n.default)({param:t.result.content}),headers:{"Content-Type":i},method:"POST"},o).then(function(e){return JSON.parse(e)})},function(e){throw g.default.error("Failed to submit to the challenge #"+t,e),e})}},{key:"updateChallenge",value:function(){var e=(0,s.default)(i.default.mark(function e(t){var r,n,o;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r="/challenges/"+t.id,n={param:t},e.next=4,this.private.api.putJson(r,n);case 4:if((o=e.sent).ok){e.next=7;break}throw new Error(o.statusText);case 7:return e.next=9,o.json();case 9:if(200===(o=e.sent.result).status){e.next=12;break}throw new Error(o.content);case 12:return e.abrupt("return",o.content);case 13:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()}]),e}(),C=null;t.default=void 0},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__19__},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__20__},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(r(0)),o=r(2);t.default=(0,o.createActions)({ERRORS:{CLEAR_ERROR:n.default.noop,NEW_ERROR:function(e,t){return{title:e,details:t}},CLEAR_ALL_ERROR_ICONS:n.default.noop,SET_ERROR_ICON:function(e,t,r){return{id:e,title:t,message:r}},CLEAR_ERROR_ICON:function(e){return{id:e}}}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(r(0)),o=r(2),a=r(7);t.default=(0,o.createActions)({SMP:{DELETE_SUBMISSION_DONE:function(e,t){return(0,a.getApi)("V3",e).delete("/submissions/"+t).then(function(){return t})},DELETE_SUBMISSION_INIT:function(){},DOWNLOAD_SUBMISSION:function(e,t,r){n.default.noop(e,t,r)}}})},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__23__},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=p(r(4)),o=p(r(5)),a=p(r(1)),i=p(r(9)),s=p(r(10)),u=p(r(23));t.addDescendantGroups=function(e,t){var r=l.default.isArray(e)?e:[e],n=new u.default,o=0;for(;o1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=[],o=[],a=[],i=[],s=Date.now(),c=new u.default;return(l.default.isArray(e)?e:[e]).forEach(function(e){if(!c.has(e)){c.add(e);var u=t[e];u||i.push(e),u&&(s-u.timestamp||0)1&&void 0!==arguments[1])||arguments[1])&&(t+="/getSubGroups?includeSubGroups=true&oneLevel=false"),this.private.api.get(t).then(m)}},{key:"getGroupMap",value:function(e){var t=this,r={},n=new u.default,o=(l.default.isArray(e)?e:[e]).map(function(e){return n.has(e)?null:(n.add(e),t.getGroup(e).then(function(e){return function e(t,r){var n=r.subGroups;r.timestamp=Date.now(),n&&n.length&&(r.subGroupIds=n.map(function(e){return e.id}),n.forEach(function(r){return e(t,r)})),delete r.subGroups,t[r.id]=r}(r,e)}).catch(function(t){d.default.error("Failed to get user group #"+e,t),r[e]={id:e,timestamp:Date.now()}}))});return a.default.all(o).then(function(){return r})}},{key:"getGroupTreeIds",value:function(){var e=(0,o.default)(n.default.mark(function e(t){var r,o,a,i,s,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3e5;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=Date.now(),o=this.private.cache.groupTreeIds,a=864e5,r-o.lastCleanUp>a&&(l.default.forOwn(o,function(e,t){var n=e.timestamp;r-n>a&&delete o[t]}),o.lastCleanUp=r),!((i=o[t])&&r-i.timestamp0&&void 0!==arguments[0]&&arguments[0]}}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=h(r(15)),o=h(r(1)),a=h(r(4)),i=h(r(5)),s=h(r(9)),u=h(r(10)),l=h(r(16));t.getService=function(e,t){b&&b.private.tokenV2===t&&b.private.tokenV3===e||(b=new v(e,t));return b};var c=r(8),d=h(r(11)),f=r(13),p=r(7);function h(e){return e&&e.__esModule?e:{default:e}}var m=void 0;function g(){if(!m&&c.isomorphy.isClientSide()){var e=r(64);m=new e({domain:c.config.AUTH0.DOMAIN,clientID:c.config.AUTH0.CLIENT_ID,callbackOnLocationHash:!0,sso:!1})}return m}function y(e,t){var r=e.identities[0].connection,n="",o="",a="",i=e.email||"",s=e.user_id.substring(e.user_id.lastIndexOf("|")+1),u=void 0;if("google-oauth2"===r)n=e.given_name,o=e.family_name,a=e.nickname;else if("facebook"===r)a=(n=e.given_name)+"."+(o=e.family_name);else if("twitter"===r){var c=u=e.name.split(" ");if(n=(0,l.default)(c,1)[0],u.length>1){var d=u;o=(0,l.default)(d,2)[1]}a=e.screen_name}else if("github"===r){var f=u=e.name.split(" ");if(n=(0,l.default)(f,1)[0],u.length>1){var p=u;o=(0,l.default)(p,2)[1]}a=e.nickname}else"bitbucket"===r?(n=e.first_name,o=e.last_name,a=e.username):"stackoverflow"===r?(n=e.first_name,o=e.last_name,a=s):"dribbble"===r&&(n=e.first_name,o=e.last_name,a=s);var h=t,m=null;return e.identities[0].access_token&&(h=e.identities[0].access_token),e.identities[0].access_token_secret&&(m=e.identities[0].access_token_secret),{socialUserId:s,username:a,firstname:n,lastname:o,email:i,socialProfile:e,socialProvider:r,accessToken:h,accessTokenSecret:m}}var v=function(){function e(t,r){(0,s.default)(this,e),this.private={api:(0,p.getApi)("V3",t),apiV2:(0,p.getApi)("V2",r),tokenV2:r,tokenV3:t}}return(0,u.default)(e,[{key:"getAchievements",value:function(){var e=(0,i.default)(a.default.mark(function e(t){var r;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.apiV2.get("/users/"+t);case 2:if((r=e.sent).ok){e.next=5;break}throw new Error(r.statusText);case 5:return e.next=7,r.json();case 7:if(e.t0=e.sent.Achievements,e.t0){e.next=10;break}e.t0=[];case 10:return e.abrupt("return",e.t0);case 11:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getUserPublic",value:function(){var e=(0,i.default)(a.default.mark(function e(t){var r;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.apiV2.get("/users/"+t);case 2:if((r=e.sent).ok){e.next=5;break}throw new Error(r.statusText);case 5:return e.abrupt("return",r.json()||null);case 6:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getUserPublicV3",value:function(){var e=(0,i.default)(a.default.mark(function e(t){var r;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/members/"+t);case 2:return r=e.sent,e.abrupt("return",(0,f.getApiResponsePayload)(r));case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getUser",value:function(){var e=(0,i.default)(a.default.mark(function e(t){var r,n;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r="/users?filter=handle%3D"+t,e.next=3,this.private.api.get(r);case 3:return n=e.sent,e.next=6,(0,f.getApiResponsePayload)(n);case 6:return e.abrupt("return",e.sent[0]);case 7:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getEmailPreferences",value:function(){var e=(0,i.default)(a.default.mark(function e(t){var r,n,o;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r="/users/"+t+"/preferences/email",e.next=3,this.private.api.get(r);case 3:return n=e.sent,e.next=6,n.json();case 6:return o=e.sent.result,e.abrupt("return",o.content);case 8:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"saveEmailPreferences",value:function(){var e=(0,i.default)(a.default.mark(function e(t,r){var n,o,i,s=t.firstName,u=t.lastName,l=t.userId;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n={firstName:s,lastName:u,subscriptions:{}},r?n.subscriptions=r:n.subscriptions.TOPCODER_NL_GEN=!0,o="/users/"+l+"/preferences/email",e.next=5,this.private.api.putJson(o,{param:n});case 5:return i=e.sent,e.abrupt("return",(0,f.getApiResponsePayload)(i));case 7:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"getCredential",value:function(){var e=(0,i.default)(a.default.mark(function e(t){var r,n;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r="/users/"+t+"?fields=credential",e.next=3,this.private.api.get(r);case 3:return n=e.sent,e.abrupt("return",(0,f.getApiResponsePayload)(n));case 5:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"updatePassword",value:function(){var e=(0,i.default)(a.default.mark(function e(t,r,n){var o,i,s;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o={password:r,currentPassword:n},i="/users/"+t,e.next=4,this.private.api.patchJson(i,{param:{credential:o}});case 4:return s=e.sent,e.abrupt("return",(0,f.getApiResponsePayload)(s));case 6:case"end":return e.stop()}},e,this)}));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"getLinkedAccounts",value:function(){var e=(0,i.default)(a.default.mark(function e(t){var r,n;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r="/users/"+t+"?fields=profiles",e.next=3,this.private.api.get(r);case 3:return n=e.sent,e.abrupt("return",(0,f.getApiResponsePayload)(n));case 5:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"unlinkExternalAccount",value:function(){var e=(0,i.default)(a.default.mark(function e(t,r){var n,o;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n="/users/"+t+"/profiles/"+r,e.next=3,this.private.api.delete(n);case 3:return o=e.sent,e.abrupt("return",(0,f.getApiResponsePayload)(o));case 5:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"linkExternalAccount",value:function(){var e=(0,i.default)(a.default.mark(function e(t,r,i){var s=this;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new o.default(function(e,o){g().signin({popup:!0,connection:r,scope:"openid profile offline_access",state:i},function(r,a,i,u){if(r)return d.default.error("Error signing in - onSocialLoginFailure",r),void o(r);var l=y(a,u),c={userId:l.socialUserId,name:l.username,email:l.email,emailVerified:!1,providerType:l.socialProvider,context:{handle:l.username,accessToken:l.accessToken,auth0UserId:a.user_id}};l.accessTokenSecret&&(c.context.accessTokenSecret=l.accessTokenSecret),d.default.debug("link API postdata: "+(0,n.default)(c)),s.private.api.postJson("/users/"+t+"/profiles",{param:c}).then(function(t){return(0,f.getApiResponsePayload)(t).then(function(t){d.default.debug("Succesfully linked account: "+(0,n.default)(t)),e(c)})}).catch(function(e){d.default.error("Error linking account",e),o(e)})})}));case 1:case"end":return e.stop()}},e,this)}));return function(t,r,n){return e.apply(this,arguments)}}()}]),e}(),b=null;t.default=v},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=g(r(90)),o=g(r(1)),a=g(r(6)),i=g(r(15)),s=g(r(4)),u=g(r(5)),l=g(r(9)),c=g(r(10));t.getService=function(e){v&&e===v.private.tokenV3||(v=new y(e));return v};var d=g(r(0)),f=g(r(14)),p=g(r(11)),h=r(13),m=r(7);function g(e){return e&&e.__esModule?e:{default:e}}var y=function(){function e(t){(0,l.default)(this,e),this.private={api:(0,m.getApi)("V3",t),tokenV3:t}}return(0,c.default)(e,[{key:"getMemberFinances",value:function(){var e=(0,u.default)(s.default.mark(function e(t){var r;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/members/"+t+"/financial");case 2:return r=e.sent,e.abrupt("return",(0,h.getApiResponsePayload)(r));case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getMemberInfo",value:function(){var e=(0,u.default)(s.default.mark(function e(t){var r;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/members/"+t);case 2:return r=e.sent,e.abrupt("return",(0,h.getApiResponsePayload)(r));case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getExternalAccounts",value:function(){var e=(0,u.default)(s.default.mark(function e(t){var r;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/members/"+t+"/externalAccounts");case 2:return r=e.sent,e.abrupt("return",(0,h.getApiResponsePayload)(r));case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getExternalLinks",value:function(){var e=(0,u.default)(s.default.mark(function e(t){var r;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/members/"+t+"/externalLinks");case 2:return r=e.sent,e.abrupt("return",(0,h.getApiResponsePayload)(r));case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getSkills",value:function(){var e=(0,u.default)(s.default.mark(function e(t){var r;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/members/"+t+"/skills");case 2:return r=e.sent,e.abrupt("return",(0,h.getApiResponsePayload)(r));case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getStats",value:function(){var e=(0,u.default)(s.default.mark(function e(t){var r;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/members/"+t+"/stats");case 2:return r=e.sent,e.abrupt("return",(0,h.getApiResponsePayload)(r));case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getStatsHistory",value:function(){var e=(0,u.default)(s.default.mark(function e(t){var r;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/members/"+t+"/stats/history");case 2:return r=e.sent,e.abrupt("return",(0,h.getApiResponsePayload)(r));case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getStatsDistribution",value:function(){var e=(0,u.default)(s.default.mark(function e(t,r,n){var o;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/members/stats/distribution?filter="+encodeURIComponent(f.default.stringify({track:r,subTrack:n})));case 2:return o=e.sent,e.abrupt("return",(0,h.getApiResponsePayload)(o));case 4:case"end":return e.stop()}},e,this)}));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"getMemberSuggestions",value:function(){var e=(0,u.default)(s.default.mark(function e(t){var r;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/members/_suggest/"+t);case 2:return r=e.sent,e.abrupt("return",(0,h.getApiResponsePayload)(r));case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"addWebLink",value:function(){var e=(0,u.default)(s.default.mark(function e(t,r){var n;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.postJson("/members/"+t+"/externalLinks",{param:{url:r}});case 2:return n=e.sent,e.abrupt("return",(0,h.getApiResponsePayload)(n));case 4:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"deleteWebLink",value:function(){var e=(0,u.default)(s.default.mark(function e(t,r){var n,o;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n={param:{handle:r}},e.next=3,this.private.api.delete("/members/"+t+"/externalLinks/"+r,(0,i.default)(n));case 3:return o=e.sent,e.abrupt("return",(0,h.getApiResponsePayload)(o));case 5:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"addSkill",value:function(){var e=(0,u.default)(s.default.mark(function e(t,r){var n,o;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n={param:{skills:(0,a.default)({},r,{hidden:!1})}},e.next=3,this.private.api.patchJson("/members/"+t+"/skills",n);case 3:return o=e.sent,e.abrupt("return",(0,h.getApiResponsePayload)(o));case 5:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"hideSkill",value:function(){var e=(0,u.default)(s.default.mark(function e(t,r){var n,o;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n={param:{skills:(0,a.default)({},r,{hidden:!0})}},e.next=3,this.private.api.fetch("/members/"+t+"/skills",{body:(0,i.default)(n),method:"PATCH"});case 3:return o=e.sent,e.abrupt("return",(0,h.getApiResponsePayload)(o));case 5:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"updateMemberProfile",value:function(){var e=(0,u.default)(s.default.mark(function e(t){var r,a;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.verifyUrl?"/members/"+t.handle+"?verifyUrl="+t.verifyUrl:"/members/"+t.handle,e.next=3,this.private.api.putJson(r,{param:t.verifyUrl?d.default.omit(t,["verifyUrl"]):t});case 3:if(a=e.sent,!t.verifyUrl||409!==a.status){e.next=6;break}return e.abrupt("return",o.default.resolve((0,n.default)({},t,{isEmailConflict:!0})));case 6:return e.abrupt("return",(0,h.getApiResponsePayload)(a));case 7:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getPresignedUrl",value:function(){var e=(0,u.default)(s.default.mark(function e(t,r){var n,o;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.postJson("/members/"+t+"/photoUploadUrl",{param:{contentType:r.type}});case 2:return n=e.sent,e.next=5,(0,h.getApiResponsePayload)(n);case 5:return o=e.sent,e.abrupt("return",{preSignedURL:o.preSignedURL,token:o.token,file:r,userHandle:t});case 7:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"updateMemberPhoto",value:function(){var e=(0,u.default)(s.default.mark(function e(t){var r;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.putJson("/members/"+t.userHandle+"/photo",{param:t.body});case 2:return r=e.sent,e.abrupt("return",(0,h.getApiResponsePayload)(r));case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"uploadFileToS3",value:function(e){return d.default.noop(this),new o.default(function(t,r){var n=new XMLHttpRequest;n.open("PUT",e.preSignedURL,!0),n.setRequestHeader("Content-Type",e.file.type),n.onreadystatechange=function(){var o=n.status;if((o>=200&&o<300||304===o)&&4===n.readyState)t({userHandle:e.userHandle,body:{token:e.token,contentType:e.file.type}});else if(o>=400){var a=new Error("Could not upload image to S3");a.status=o,r(a)}},n.onerror=function(e){p.default.error("Could not upload image to S3",e),r(e)},n.send(e.file)})}},{key:"verifyMemberNewEmail",value:function(){var e=(0,u.default)(s.default.mark(function e(t,r){var n;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/members/"+t+"/verify?token="+r);case 2:return n=e.sent,e.abrupt("return",(0,h.getApiResponsePayload)(n));case 4:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()}]),e}(),v=null;t.default=void 0},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=l(r(3)),o=l(r(16)),a=l(r(1)),i=r(2),s=r(17),u=r(7);function l(e){return e&&e.__esModule?e:{default:e}}t.default=(0,i.createActions)({AUTH:{LOAD_PROFILE:function(e){if(!e)return a.default.resolve(null);var t=(0,s.decodeToken)(e),r=(0,u.getApi)("V3",e);return a.default.all([r.get("/members/"+t.handle).then(function(e){return e.json()}).then(function(e){return 200===e.result.status?e.result.content:{}}),r.get("/groups?memberId="+t.userId+"&membershipType=user").then(function(e){return e.json()}).then(function(e){return 200===e.result.status?e.result.content:[]})]).then(function(e){var t=(0,o.default)(e,2),r=t[0],a=t[1];return(0,n.default)({},r,{groups:a})})},SET_TC_TOKEN_V2:function(e){return e},SET_TC_TOKEN_V3:function(e){return e}}})},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__29__},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatDuration=t.delay=void 0;var n=s(r(4)),o=s(r(1)),a=s(r(5)),i=(t.delay=function(){var e=(0,a.default)(n.default.mark(function e(t){return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new o.default(function(e){return setTimeout(function(){return e()},t)}));case 1:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),s(r(20)));function s(e){return e&&e.__esModule?e:{default:e}}r(54);t.formatDuration=function(e){var t=void 0;return t=e>864e5?"D[d] H[h]":e>36e5?"H[h] m[min]":"m[min] s[s]",i.default.duration(e).format(t)};t.default=void 0},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=c(r(4)),o=c(r(5)),a=function(){var e=(0,o.default)(n.default.mark(function e(t,r,o,a){var s,c,d,f,p,h;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,s=o.filter(function(e){return"ACTIVE"===e.status}),t.challengeFilter&&(c=u.getFilterFunction(t.challengeFilter),s=s.filter(c)),d=Math.round(s.reduce(function(e,t){return e+(t.totalPrize||0)},0)),f=(0,l.getService)(a),p={community:t.communityId,stats:{},uuid:r},s.length&&(p.stats.numChallenges=s.length),d&&(p.stats.openPrizes="$"+d.toLocaleString()),!(h=i.default.get(t,"groupIds[0]"))){e.next=13;break}return e.next=12,f.getMembersCount(h,!0);case 12:p.stats.numMembers=e.sent;case 13:return e.abrupt("return",p);case 16:return e.prev=16,e.t0=e.catch(0),e.abrupt("return",{community:t.communityId,stats:{},uuid:r});case 19:case"end":return e.stop()}},e,this,[[0,16]])}));return function(t,r,n,o){return e.apply(this,arguments)}}(),i=c(r(0)),s=r(2),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(32)),l=r(24);function c(e){return e&&e.__esModule?e:{default:e}}t.default=(0,s.createActions)({STATS:{GET_COMMUNITY_STATS_INIT:function(e,t){return{community:e.communityId,uuid:t}},GET_COMMUNITY_STATS_DONE:a}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=u(r(23)),o=u(r(3));t.addTrack=function(e,t){if(!e.tracks)return e;var r=a.default.clone(e);r.tracks=a.default.clone(r.tracks),r.tracks[t]=!0,a.default.values(s.COMPETITION_TRACKS).some(function(e){return!r.tracks[e]})||delete r.tracks;return r},t.getFilterFunction=function e(t){return function(r){var n=function(e,t){return!t.status||t.status.includes(e.status)}(r,t)&&h(r,t)&&function(e,t){return!!a.default.isUndefined(t.upcoming)||(0,i.default)().isBefore(e.registrationStartDate)}(r,t)&&function(e,t){return!t.groupIds||t.groupIds.some(function(t){return e.groups[t]})}(r,t)&&p(r,t)&&f(r,t)&&d(r,t)&&function(e,t){return!t.users||t.users.find(function(t){return e.users[t]})}(r,t)&&l(r,t)&&c(r,t)&&function(e,t){return!!a.default.isUndefined(t.started)||(0,i.default)(e.registrationStartDate).isBefore(Date.now())}(r,t)&&function(e,t){return!!a.default.isUndefined(t.registrationOpen)||function(){if(e.registrationOpen)return"Yes"===e.registrationOpen;if("MARATHON_MATCH"===e.subTrack)return"PAST"!==e.status;var t=e.allPhases.find(function(e){return"Registration"===e.phaseType});if(!t||"Open"!==t.phaseStatus)return!1;if("DESIGN"===e.track){var r=e.allPhases.find(function(e){return"Checkpoint Submission"===e.phaseType});return!r||"Closed"!==r.phaseStatus}return!0}()===t.registrationOpen}(r,t);if(!n&&t.or)for(var o=0;!n&&o3&&void 0!==arguments[3]&&arguments[3];e[r]&&t[r]?e[r]=n?a.default.uniq(e[r].concat(t[r])):a.default.intersection(e[r],t[r]):t[r]&&(e[r]=t[r])}t.default=void 0},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=u(r(1)),o=u(r(0)),a=r(2),i=r(8),s=r(34);function u(e){return e&&e.__esModule?e:{default:e}}function l(e,t,r){var n=(0,s.getService)(t.tokenV2),o=void 0,a=r?Array(11).join("1").split("").map(function(){return!0}):[];switch(e.type){case"challenge":o=n.getChallengeTerms(e.id,a);break;case"community":o=n.getCommunityTerms(e.id,t.tokenV3,a);break;case"reviewOpportunity":o=n.getReviewOpportunityTerms(e.reviewOpportunityTerms);break;default:throw new Error("Entity type '"+e.type+"' is not supported by getTermsDone.")}return o.then(function(t){return{entity:e,terms:t.terms}})}t.default=(0,a.createActions)({TERMS:{GET_TERMS_INIT:function(e){return e},GET_TERMS_DONE:l,GET_TERM_DETAILS_INIT:function(e){return o.default.toString(e)},GET_TERM_DETAILS_DONE:function(e,t){return(0,s.getService)(t).getTermDetails(e).then(function(t){return{termId:e,details:t}})},GET_DOCU_SIGN_URL_INIT:function(e){return o.default.toString(e)},GET_DOCU_SIGN_URL_DONE:function(e,t,r){return(0,s.getService)(r).getDocuSignUrl(e,t).then(function(t){return{templateId:e,docuSignUrl:t.recipientViewUrl}})},AGREE_TERM_INIT:function(e){return o.default.toString(e)},AGREE_TERM_DONE:function(e,t){return(0,s.getService)(t).agreeTerm(e).then(function(t){return{termId:e,success:t.success}})},CHECK_STATUS_INIT:function(){},CHECK_STATUS_DONE:function(e,t){var r=i.config.MOCK_TERMS_SERVICE;return function a(i){return l(e,t,r).then(function(e){return!o.default.every(e.terms,"agreed")&&i>1?function(e){return new n.default(function(t){setTimeout(t,e)})}(5e3).then(function(){return a(i-1)}):e.terms})}(5)}}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=c(r(1)),o=c(r(9)),a=c(r(10));t.getService=function(e){if(s.config.MOCK_TERMS_SERVICE)return r(57).getService(e);(!f||e&&f.private.tokenV2!==e)&&(f=new d(e));return f};var i=c(r(0)),s=r(8),u=r(35),l=r(7);function c(e){return e&&e.__esModule?e:{default:e}}var d=function(){function e(t){(0,o.default)(this,e),this.private={api:(0,l.getApi)("V2",t),tokenV2:t}}return(0,a.default)(e,[{key:"getChallengeTerms",value:function(e){var t=this;if(this.private.tokenV2){var r=!1;return this.private.api.get("/terms/"+e+"?role=Submitter").then(function(e){return e.json()}).then(function(n){return n.error?("You are already registered for this challenge."===n.error.details&&(r=!0),t.private.api.get("/terms/"+e+"?role=Submitter&noauth=true").then(function(e){return e.ok?e.json().then(function(e){return r&&i.default.forEach(e.terms,function(e){e.agreed=!0}),e}):new Error(e.statusText)})):n})}return this.private.api.get("/terms/"+e+"?role=Submitter&noauth=true").then(function(e){if(e.ok)return e.json();throw new Error(e.statusText)})}},{key:"getCommunityTerms",value:function(e,t){var r=this;return(0,u.getService)(t).getMetadata(e).then(function(e){return e.terms&&e.terms.length?n.default.all(e.terms.map(function(e){return r.getTermDetails(e)})).then(function(e){return e.map(function(e){return i.default.omit(e,"text")})}):[]}).then(function(e){return{terms:e}})}},{key:"getReviewOpportunityTerms",value:function(e){var t=this,r=e.map(function(e){return e.agreed?n.default.resolve(e):t.getTermDetails(e.termsOfUseId).then(function(e){return i.default.pick(e,["termsOfUseId","agreed","title"])})});return n.default.all(r).then(function(e){return{terms:e}})}},{key:"getTermDetails",value:function(e){var t=(new Date).getTime();return this.private.api.get("/terms/detail/"+e+"?nocache="+t).then(function(e){return e.ok?e.json():n.default.reject(e.json())})}},{key:"getDocuSignUrl",value:function(e,t){return this.private.api.post("/terms/docusign/viewURL?templateId="+e+"&returnUrl="+t).then(function(e){return e.ok?e.json():n.default.reject(e.json())})}},{key:"agreeTerm",value:function(e){return this.private.api.post("/terms/"+e+"/agree").then(function(e){return e.ok?e.json():n.default.reject(e.json())})}}]),e}(),f=null;t.default=void 0},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=d(r(4)),o=d(r(5)),a=d(r(9)),i=d(r(10));t.getService=function(e){h&&e===h.private.tokenV3||(h=new p(e));return h};var s=d(r(0)),u=d(r(29)),l=d(r(14)),c=r(8);function d(e){return e&&e.__esModule?e:{default:e}}function f(){var e=s.default.get(c.config,"URL.COMMUNITY_APP");if(!e)throw new Error("No URL.COMMUNITY_APP param found in config");return e}var p=function(){function e(t){(0,a.default)(this,e),this.private={tokenV3:t}}return(0,i.default)(e,[{key:"getList",value:function(){var e=(0,o.default)(n.default.mark(function e(t){var r,o;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=f(),r+="/community-app-assets/api/tc-communities?",r+=l.default.stringify({groups:t}),e.next=5,(0,u.default)(r,{headers:{authorization:this.private.tokenV3}});case 5:return o=e.sent,e.abrupt("return",o.json());case 7:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getMetadata",value:function(){var e=(0,o.default)(n.default.mark(function e(t){var r,o;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=f(),r+="/community-app-assets/api/tc-communities/"+t+"/meta",e.next=4,(0,u.default)(r,{headers:{authorization:this.private.tokenV3}});case 4:return o=e.sent,e.abrupt("return",o.json());case 6:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()}]),e}(),h=null;t.default=void 0},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=l(r(4)),o=l(r(5)),a=function(){var e=(0,o.default)(n.default.mark(function e(t,r){var o,a;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o={},r&&(o.hasActiveBillingAccount=!0),e.next=4,(0,u.getService)(t).getUserProjects(o);case 4:return a=e.sent,e.abrupt("return",{tokenV3:t,projects:a});case 6:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}(),i=l(r(0)),s=r(2),u=r(37);function l(e){return e&&e.__esModule?e:{default:e}}t.default=(0,s.createActions)({DIRECT:{DROP_ALL:function(){return null},GET_PROJECT_DETAILS_INIT:function(e){return e},GET_PROJECT_DETAILS_DONE:function(e,t){return(0,u.getService)(t).getProjectDetails(e)},GET_PROJECT_PERMISSIONS_INIT:function(e){return i.default.toNumber(e)},GET_PROJECT_PERMISSIONS_DONE:function(e,t){return(0,u.getService)(t).getProjectPermissions(e).then(function(t){return{permissions:t,projectId:e}})},GET_USER_PROJECTS_INIT:function(e){return e},GET_USER_PROJECTS_DONE:a}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=l(r(4)),o=l(r(5)),a=l(r(9)),i=l(r(10));t.getService=function(e){d&&d.private.tokenV3===e||(d=new c(e));return d};var s=l(r(14)),u=r(7);function l(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(t){(0,a.default)(this,e),this.private={api:(0,u.getApi)("V3",t),tokenV3:t}}return(0,i.default)(e,[{key:"getProjectDetails",value:function(){var e=(0,o.default)(n.default.mark(function e(t){var r;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/direct/projects/"+t);case 2:if((r=e.sent).ok){e.next=5;break}throw new Error(r.statusText);case 5:return e.next=7,r.json();case 7:if(200===(r=e.sent.result).status){e.next=10;break}throw new Error(r.content);case 10:return e.abrupt("return",r.content);case 11:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getProjectPermissions",value:function(){var e=(0,o.default)(n.default.mark(function e(t){var r,o;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r="/direct/projects/"+t+"/permissions",e.next=3,this.private.api.get(r);case 3:if((o=e.sent).ok){e.next=6;break}throw new Error(o.statusText);case 6:return e.next=8,o.json();case 8:if(200===(o=e.sent.result).status){e.next=11;break}throw new Error(o.content);case 11:return e.abrupt("return",o.content);case 12:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getUserProjects",value:function(){var e=(0,o.default)(n.default.mark(function e(t){var r,o;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r="/direct/projects/user",t&&(r+="?"+s.default.stringify(t)),e.next=4,this.private.api.get(r);case 4:if((o=e.sent).ok){e.next=7;break}throw new Error(o.statusText);case 7:return e.next=9,o.json();case 9:if(200===(o=e.sent.result).status){e.next=12;break}throw new Error(o.content);case 12:return e.abrupt("return",o.content);case 13:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()}]),e}(),d=null;t.default=void 0},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),o=r(24);t.default=(0,n.createActions)({GROUPS:{DROP_GROUPS:function(){},GET_GROUPS_INIT:function(e){return e},GET_GROUPS_DONE:function(e,t){return(0,o.getService)(t).getGroupMap(e)}}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=l(r(1)),o=l(r(0)),a=r(8),i=r(2),s=r(18),u=r(7);function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t,r){return(0,s.getService)(t,r).getChallengeDetails(e)}t.default=(0,i.createActions)({CHALLENGE:{DROP_CHECKPOINTS:function(){},DROP_RESULTS:function(){},FETCH_CHECKPOINTS_INIT:function(){},FETCH_CHECKPOINTS_DONE:function(e,t){var r="/design/challenges/checkpoint/"+t;return(0,u.getApi)("V2",e).fetch(r).then(function(e){if(200!==e.status)throw e.status;return e.json()}).then(function(e){return e.checkpointResults.forEach(function(t,r){e.checkpointResults[r].expanded=!1}),{challengeId:Number(t),checkpoints:e}}).catch(function(e){return{error:e,challengeId:Number(t)}})},GET_DETAILS_INIT:function(e){return o.default.toString(e)},GET_DETAILS_DONE:c,GET_SUBMISSIONS_INIT:function(e){return o.default.toString(e)},GET_SUBMISSIONS_DONE:function(e,t){return(0,u.getApi)("V2",t).fetch("/challenges/submissions/"+e+"/mySubmissions").then(function(e){return e.json()}).then(function(t){return{challengeId:o.default.toString(e),submissions:t.submissions}}).catch(function(t){throw{challengeId:o.default.toString(e),error:t}})},LOAD_RESULTS_INIT:function(e){return o.default.toString(e)},LOAD_RESULTS_DONE:function(e,t,r){return(0,u.getApi)("V2",e.tokenV2).fetch("/"+r+"/challenges/result/"+t).then(function(e){return e.json()}).then(function(e){return{challengeId:o.default.toString(t),results:e.results}})},REGISTER_INIT:function(){},REGISTER_DONE:function(e,t){return(0,s.getService)(e.tokenV3).register(t).then(function(){return new n.default(function(r){return setTimeout(function(){return r(c(t,e.tokenV3,e.tokenV2))},a.config.CHALLENGE_DETAILS_REFRESH_DELAY)})})},TOGGLE_CHECKPOINT_FEEDBACK:function(e,t){return{id:e,open:t}},UNREGISTER_INIT:function(){},UNREGISTER_DONE:function(e,t){return(0,s.getService)(e.tokenV3).unregister(t).then(function(){return new n.default(function(r){return setTimeout(function(){return r(c(t,e.tokenV3,e.tokenV2))},a.config.CHALLENGE_DETAILS_REFRESH_DELAY)})})},UPDATE_CHALLENGE_INIT:function(e){return e},UPDATE_CHALLENGE_DONE:function(e,t,r){return(0,s.getService)(r).updateChallenge(t).then(function(t){return{uuid:e,res:t}})},GET_ACTIVE_CHALLENGES_COUNT_INIT:function(){},GET_ACTIVE_CHALLENGES_COUNT_DONE:function(e,t){return(0,s.getService)(t).getActiveChallengesCount(e)}}})},function(e,t,r){e.exports=void 0===window.JSON?r(86).parse:window.JSON.parse},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=A(r(1)),o=A(r(16)),a=A(r(4)),i=A(r(5)),s=function(){var e=(0,i.default)(a.default.mark(function e(t,r){var n;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=void 0,e.prev=1,e.next=4,(0,k.getService)().getAchievements(t);case 4:n=e.sent,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),n=[];case 10:return e.abrupt("return",{data:n,handle:t,uuid:r});case 11:case"end":return e.stop()}},e,this,[[1,7]])}));return function(t,r){return e.apply(this,arguments)}}(),u=function(){var e=(0,i.default)(a.default.mark(function e(t,r){var n;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=void 0,e.prev=1,e.next=4,(0,k.getService)().getAchievementsV3(t);case 4:n=e.sent,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),n=[];case 10:return e.abrupt("return",{data:n,handle:t,uuid:r});case 11:case"end":return e.stop()}},e,this,[[1,7]])}));return function(t,r){return e.apply(this,arguments)}}(),l=function(){var e=(0,i.default)(a.default.mark(function e(t,r,n){var o;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,I.getService)(n).getMemberFinances(t);case 2:return o=e.sent,e.abrupt("return",{data:o,handle:t,uuid:r});case 4:case"end":return e.stop()}},e,this)}));return function(t,r,n){return e.apply(this,arguments)}}(),c=function(){var e=(0,i.default)(a.default.mark(function e(t,r){return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{handle:t,uuid:r});case 1:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}(),d=function(){var e=(0,i.default)(a.default.mark(function e(t,r,n){var o;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,I.getService)(n).getStats(t);case 2:return o=e.sent,e.abrupt("return",{data:o,handle:t,uuid:r});case 4:case"end":return e.stop()}},e,this)}));return function(t,r,n){return e.apply(this,arguments)}}(),f=function(){var e=(0,i.default)(a.default.mark(function e(t,r){return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{handle:t,uuid:r});case 1:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}(),p=function(){var e=(0,i.default)(a.default.mark(function e(t,r,i){var s,u,l,c,d,f,p;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t({limit:50,offset:50*r}).then(function(o){var a=o.challenges;return a.length?e(t,1+r,n?n.concat(a):a):n||[]})},s={status:"ACTIVE"},u=(0,O.getService)(i),c=[l(function(e){return u.getUserChallenges(t,s,e)})],e.next=6,n.default.all(c);case 6:return d=e.sent,f=(0,o.default)(d,1),p=f[0],e.abrupt("return",{handle:t,challenges:p,uuid:r});case 10:case"end":return e.stop()}},e,this)}));return function(t,r,n){return e.apply(this,arguments)}}(),h=function(){var e=(0,i.default)(a.default.mark(function e(t,r){return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{handle:t,uuid:r});case 1:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}(),m=function(){var e=(0,i.default)(a.default.mark(function e(t,r,n){var o;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,I.getService)(n).getStatsHistory(t);case 2:return o=e.sent,e.abrupt("return",{data:o,handle:t,uuid:r});case 4:case"end":return e.stop()}},e,this)}));return function(t,r,n){return e.apply(this,arguments)}}(),g=function(){var e=(0,i.default)(a.default.mark(function e(t,r){return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{handle:t,uuid:r});case 1:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}(),y=function(){var e=(0,i.default)(a.default.mark(function e(t,r,n,o,i){var s;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,I.getService)(i).getStatsDistribution(t,r,n);case 2:return s=e.sent,e.abrupt("return",{data:s,handle:t,uuid:o});case 4:case"end":return e.stop()}},e,this)}));return function(t,r,n,o,a){return e.apply(this,arguments)}}(),v=function(){var e=(0,i.default)(a.default.mark(function e(t,r){return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{handle:t,uuid:r});case 1:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}(),b=function(){var e=(0,i.default)(a.default.mark(function e(t,r,n,o,i,s,u,l){var c,d,f;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c={status:"completed",hasUserSubmittedForReview:"true",track:o,subTrack:i},(d={}).orderBy="submissionEndDate desc",d.limit=u,d.offset=s*u,f=(0,O.getService)(n),e.abrupt("return",f.getUserChallenges(r,c,d).then(function(e){return{uuid:t,challenges:e.challenges,refresh:l,handle:r}}));case 7:case"end":return e.stop()}},e,this)}));return function(t,r,n,o,a,i,s,u){return e.apply(this,arguments)}}(),_=function(){var e=(0,i.default)(a.default.mark(function e(t,r){return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{handle:t,uuid:r});case 1:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}(),w=function(){var e=(0,i.default)(a.default.mark(function e(t,r,n,o,i,s){var u,l,c;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u={status:"past",isRatedForSRM:"true"},l={filter:C.default.stringify(u,{encode:!1}),limit:i,offset:o*i},c=(0,O.getService)(n),e.abrupt("return",c.getUserSrms(r,l).then(function(e){return{uuid:t,srms:e,refresh:s,handle:r}}));case 4:case"end":return e.stop()}},e,this)}));return function(t,r,n,o,a,i){return e.apply(this,arguments)}}(),E=function(){var e=(0,i.default)(a.default.mark(function e(t,r){return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{handle:t,uuid:r});case 1:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}(),T=function(){var e=(0,i.default)(a.default.mark(function e(t,r,n,o,i,s){var u,l,c;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u={status:"PAST",isRatedForMM:"true"},(l={}).orderBy="endDate desc",l.limit=i,l.offset=o*i,c=(0,O.getService)(n),e.abrupt("return",c.getUserMarathonMatches(r,u,l).then(function(e){return{uuid:t,marathons:e,refresh:s,handle:r}}));case 7:case"end":return e.stop()}},e,this)}));return function(t,r,n,o,a,i){return e.apply(this,arguments)}}(),C=A(r(14)),S=r(2),I=r(27),k=r(26),O=r(18);function A(e){return e&&e.__esModule?e:{default:e}}t.default=(0,S.createActions)({MEMBERS:{DROP:function(e){return e},DROP_ALL:function(){},GET_ACHIEVEMENTS_INIT:function(e,t){return{handle:e,uuid:t}},GET_ACHIEVEMENTS_DONE:s,GET_ACHIEVEMENTS_V3_DONE:u,GET_FINANCES_INIT:function(e,t){return{handle:e,uuid:t}},GET_FINANCES_DONE:l,GET_STATS_INIT:c,GET_STATS_DONE:d,GET_STATS_HISTORY_INIT:h,GET_STATS_HISTORY_DONE:m,GET_STATS_DISTRIBUTION_INIT:g,GET_STATS_DISTRIBUTION_DONE:y,GET_ACTIVE_CHALLENGES_INIT:f,GET_ACTIVE_CHALLENGES_DONE:p,GET_SUBTRACK_CHALLENGES_INIT:v,GET_SUBTRACK_CHALLENGES_DONE:b,GET_USER_SRM_INIT:_,GET_USER_SRM_DONE:w,GET_USER_MARATHON_INIT:E,GET_USER_MARATHON_DONE:T}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PAGE_SIZE=void 0;var n=r(2),o=r(18),a=t.PAGE_SIZE=50;t.default=(0,n.createActions)({MEMBER_TASKS:{DROP_ALL:function(){return null},GET_INIT:function(e,t){return{pageNum:t,uuid:e}},GET_DONE:function(e,t,r,n){return(0,o.getService)(n).getChallenges({isTask:1,projectId:t},{limit:a,offset:r*a}).then(function(r){var n=r.challenges,o=r.totalCount;return{projectId:t,tasks:n,totalCount:o,uuid:e}})}}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(r(1)),o=r(2),a=r(44),i=r(12);t.default=(0,o.createActions)({REVIEW_OPPORTUNITY:{CANCEL_APPLICATIONS_INIT:function(){},CANCEL_APPLICATIONS_DONE:function(e,t,r){return(0,a.getReviewOpportunitiesService)(r).cancelApplications(e,t)},GET_DETAILS_INIT:function(){},GET_DETAILS_DONE:function(e,t){return(0,a.getReviewOpportunitiesService)(t).getDetails(e).catch(function(e){return 401!==e.status&&(0,i.fireErrorMessage)("Error Getting Review Opportunity Details",e.content||e),n.default.reject(e.status)})},SUBMIT_APPLICATIONS_INIT:function(){},SUBMIT_APPLICATIONS_DONE:function(e,t,r){return(0,a.getReviewOpportunitiesService)(r).submitApplications(e,t)}}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=s(r(1)),o=s(r(9)),a=s(r(10));t.getReviewOpportunitiesService=function(e){l&&e===l.private.tokenV3||(l=new u(e));return l};var i=r(7);function s(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(t){(0,o.default)(this,e),this.private={api:(0,i.getApi)("V3",t),tokenV3:t}}return(0,a.default)(e,[{key:"getReviewOpportunities",value:function(e,t){var r="/reviewOpportunities?limit="+e+"&offset="+t;return this.private.api.get(r).then(function(e){return e.ok?e.json():n.default.reject(new Error("Error Code: "+e.status))}).then(function(e){return 200===e.result.status?e.result.content:n.default.reject(e.result.content)})}},{key:"getDetails",value:function(e){var t="/reviewOpportunities/"+e;return this.private.api.get(t).then(function(e){return e.json()}).then(function(e){return 200===e.result.status?e.result.content:n.default.reject(e.result)})}},{key:"submitApplications",value:function(e,t){var r="/reviewOpportunities/"+e+"/applications?reviewApplicationRoleIds="+t.join(",");return this.private.api.post(r,{}).then(function(e){return JSON.parse(e)})}},{key:"cancelApplications",value:function(e,t){var r="/reviewOpportunities/"+e+"/applications?reviewApplicationRoleIds="+t.join(",");return this.private.api.delete(r,{}).then(function(e){return JSON.parse(e)})}}]),e}(),l=null;t.default=void 0},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),o=r(46);t.default=(0,n.createActions)({LOOKUP:{GET_SKILL_TAGS_INIT:function(){},GET_SKILL_TAGS_DONE:function(){return(0,o.getService)().getTags({domain:"SKILLS",status:"APPROVED"})},GET_COUNTRIES_INIT:function(){},GET_COUNTRIES_DONE:function(){return(0,o.getService)().getCountries()}}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=c(r(4)),o=c(r(5)),a=c(r(9)),i=c(r(10));t.getService=function(e){f&&e===f.private.tokenV3||(f=new d(e));return f};var s=c(r(14)),u=r(13),l=r(7);function c(e){return e&&e.__esModule?e:{default:e}}var d=function(){function e(t){(0,a.default)(this,e),this.private={api:(0,l.getApi)("V3",t),tokenV3:t}}return(0,i.default)(e,[{key:"getTags",value:function(){var e=(0,o.default)(n.default.mark(function e(t){var r;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/tags/?"+s.default.stringify(t));case 2:return r=e.sent,e.abrupt("return",(0,u.getApiResponsePayload)(r));case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getCountries",value:function(){var e=(0,o.default)(n.default.mark(function e(){var t;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/members/lookup/countries");case 2:return t=e.sent,e.abrupt("return",(0,u.getApiResponsePayload)(t));case 4:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()}]),e}(),f=null;t.default=void 0},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=f(r(4)),o=f(r(5)),a=function(){var e=(0,o.default)(n.default.mark(function e(t,r){var o;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.getService)(r).getAllUserTraits(t);case 2:return o=e.sent,e.abrupt("return",{data:o,handle:t});case 4:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}(),i=function(){var e=(0,o.default)(n.default.mark(function e(t,r,o,a){var i;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.getService)(a).addUserTrait(t,r,o);case 2:return i=e.sent,e.abrupt("return",{result:i,handle:t,traitId:r});case 4:case"end":return e.stop()}},e,this)}));return function(t,r,n,o){return e.apply(this,arguments)}}(),s=function(){var e=(0,o.default)(n.default.mark(function e(t,r,o,a){var i;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.getService)(a).updateUserTrait(t,r,o);case 2:return i=e.sent,e.abrupt("return",{result:i,handle:t,traitId:r});case 4:case"end":return e.stop()}},e,this)}));return function(t,r,n,o){return e.apply(this,arguments)}}(),u=function(){var e=(0,o.default)(n.default.mark(function e(t,r,o){var a;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.getService)(o).deleteUserTrait(t,r);case 2:return a=e.sent,e.abrupt("return",{data:a,handle:t,traitId:r});case 4:case"end":return e.stop()}},e,this)}));return function(t,r,n){return e.apply(this,arguments)}}(),l=r(2),c=f(r(0)),d=r(48);function f(e){return e&&e.__esModule?e:{default:e}}t.default=(0,l.createActions)({SETTINGS:{GET_ALL_USER_TRAITS:a,ADD_USER_TRAIT:i,DELETE_USER_TRAIT:u,UPDATE_USER_TRAIT:s,MODIFY_USER_TRAIT_INIT:c.default.noop}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=c(r(4)),o=c(r(5)),a=c(r(9)),i=c(r(10));t.getService=function(e){f&&e===f.private.tokenV3||(f=new d(e));return f};var s=c(r(91)),u=r(13),l=r(7);function c(e){return e&&e.__esModule?e:{default:e}}var d=function(){function e(t){(0,a.default)(this,e),this.private={api:(0,l.getApi)("V3",t),tokenV3:t}}return(0,i.default)(e,[{key:"getAllUserTraits",value:function(){var e=(0,o.default)(n.default.mark(function e(t){var r;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.get("/members/"+t.toLowerCase()+"/traits");case 2:return r=e.sent,e.abrupt("return",(0,u.getApiResponsePayload)(r));case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"addUserTrait",value:function(){var e=(0,o.default)(n.default.mark(function e(t,r,o){var a,i;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a={param:[{traitId:r,categoryName:(0,s.default)(r),traits:{data:o}}]},e.next=3,this.private.api.postJson("/members/"+t+"/traits",a);case 3:return i=e.sent,e.abrupt("return",(0,u.getApiResponsePayload)(i));case 5:case"end":return e.stop()}},e,this)}));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"updateUserTrait",value:function(){var e=(0,o.default)(n.default.mark(function e(t,r,o){var a,i;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a={param:[{traitId:r,categoryName:(0,s.default)(r),traits:{data:o}}]},e.next=3,this.private.api.putJson("/members/"+t+"/traits",a);case 3:return i=e.sent,e.abrupt("return",(0,u.getApiResponsePayload)(i));case 5:case"end":return e.stop()}},e,this)}));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"deleteUserTrait",value:function(){var e=(0,o.default)(n.default.mark(function e(t,r){var o;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.private.api.delete("/members/"+t+"/traits?traitIds="+r);case 2:return o=e.sent,e.abrupt("return",(0,u.getApiResponsePayload)(o));case 4:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()}]),e}(),f=null;t.default=void 0},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=u(r(4)),o=u(r(5)),a=function(){var e=(0,o.default)(n.default.mark(function e(t){var r;return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,s.getService)().getLooker(t);case 2:return r=e.sent,e.abrupt("return",{data:r,lookerId:t});case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),i=r(2),s=r(92);function u(e){return e&&e.__esModule?e:{default:e}}t.default=(0,i.createActions)({LOOKER:{GET_LOOKER_DONE:a}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=l(r(1)),o=l(r(6)),a=l(r(3));t.factory=function(){return n.default.resolve(c())};var i=l(r(0)),s=r(2),u=l(r(22));function l(e){return e&&e.__esModule?e:{default:e}}function c(e){var t;return(0,s.handleActions)((t={},(0,o.default)(t,u.default.smp.deleteSubmissionDone,function(e){return(0,a.default)({},e,{deletingSubmission:!1})}),(0,o.default)(t,u.default.smp.deleteSubmissionInit,function(e){return(0,a.default)({},e,{deletingSubmission:!0})}),t),i.default.defaults(e,{}))}t.default=c()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mock=t.time=t.tc=t.errors=t.logger=t.challenge=t.services=t.actions=t.reducers=t.reducerFactory=void 0;var n=r(52);Object.defineProperty(t,"actions",{enumerable:!0,get:function(){return n.actions}});var o=r(93);Object.defineProperty(t,"services",{enumerable:!0,get:function(){return o.services}});var a=r(96);Object.defineProperty(t,"challenge",{enumerable:!0,get:function(){return a.challenge}}),Object.defineProperty(t,"logger",{enumerable:!0,get:function(){return a.logger}}),Object.defineProperty(t,"errors",{enumerable:!0,get:function(){return a.errors}}),Object.defineProperty(t,"tc",{enumerable:!0,get:function(){return a.tc}}),Object.defineProperty(t,"time",{enumerable:!0,get:function(){return a.time}}),Object.defineProperty(t,"mock",{enumerable:!0,get:function(){return a.mock}});var i=r(98),s=function(e){return e&&e.__esModule?e:{default:e}}(i);t.reducerFactory=i.factory,t.reducers=s.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.actions=void 0;var n=v(r(28)),o=v(r(22)),a=v(r(31)),i=v(r(33)),s=v(r(36)),u=v(r(38)),l=v(r(21)),c=v(r(39)),d=v(r(25)),f=v(r(41)),p=v(r(42)),h=v(r(43)),m=v(r(45)),g=v(r(47)),y=v(r(49));function v(e){return e&&e.__esModule?e:{default:e}}t.actions={auth:n.default.auth,smp:o.default.smp,challenge:c.default.challenge,terms:i.default.terms,stats:a.default.stats,direct:s.default.direct,groups:u.default.groups,errors:l.default.errors,profile:d.default.profile,members:f.default.members,memberTasks:p.default.memberTasks,reviewOpportunity:h.default.reviewOpportunity,lookup:m.default.lookup,settings:g.default.settings,looker:y.default.looker};t.default=void 0},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__53__},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__54__},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__55__},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__56__},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=p(r(1)),o=p(r(9)),a=p(r(10));t.getService=function(e){console.error("WARNING:\n Mock version of DocuSign service is used! Should you see this message in\n production, contact support as soon as possible!"),(!g||e&&g.private.tokenV2!==e)&&(g=new m(e));return g};var i=p(r(0)),s=p(r(58)),u=p(r(59)),l=p(r(60)),c=p(r(61)),d=p(r(62)),f=p(r(63));function p(e){return e&&e.__esModule?e:{default:e}}var h=!1,m=function(){function e(t){(0,o.default)(this,e),this.private={tokenV2:t}}return(0,a.default)(e,[{key:"getChallengeTerms",value:function(e,t){var r=i.default.clone(this.private.tokenV2?s.default:l.default);if(r.serverInformation.currentTime=Date.now(),r.requesterInformation.receivedParams.challengeId=i.default.toString(e),this.private.tokenV2&&i.default.isArray(t))for(var o=0;o\r\nTo agree to the Appirio NDA, please electronically sign the document by following this link:\r\n\r\nhttps://community.topcoder.com/tc?module=SignDocument&templateId=fake-template-id \r\n\r\n\r\n\r\nOnce signed, you will be automatically added to the NDA terms of use and notified by email. \r\n
',agreed:!1,docusignTemplateId:"fake-template-id",serverInformation:{serverName:"TopCoder API",apiVersion:"0.0.1",requestDuration:4,currentTime:1504891122158},requesterInformation:{id:"d9994de712597c11d1caad64996d9fa0d9b4aa2c-w2VCwwGwnN6EeyhK",remoteIP:"12.34.56.789",receivedParams:{apiVersion:"v2",termsOfUseId:"21153",action:"getTermsOfUse"}}}},function(e){e.exports={terms:[{termsOfUseId:21193,title:"Standard Terms for Topcoder Competitions v2.1",url:"",agreeabilityType:"Electronically-agreeable",templateId:null},{termsOfUseId:21153,title:"Appirio NDA v2.0",url:"http://community.topcoder.com/tc?module=Terms&tuid=21153",agreeabilityType:"DocuSignable",templateId:"fake-template-id"}],serverInformation:{serverName:"Topcoder API",apiVersion:"0.0.1",requestDuration:11471,currentTime:1504879510947},requesterInformation:{id:"456f987dee6e9823179c8184fd3509ffdf9c613a-FyefLdEpb8UHgFQF",remoteIP:"12.34.567.890",receivedParams:{role:"Submitter",noauth:"true",apiVersion:"v2",challengeId:"30059255",action:"getChallengeTerms"}}}},function(e){e.exports={terms:[{termsOfUseId:21153,title:"Appirio NDA v2.0",url:"http://community.topcoder.com/tc?module=Terms&tuid=21153",agreeabilityType:"DocuSignable",agreed:!1,templateId:"fake-template-id"},{termsOfUseId:20704,title:"Standard Reviewer Terms v1.0",url:"",agreeabilityType:"Electronically-agreeable",agreed:!1,templateId:null}],serverInformation:{serverName:"Topcoder API",apiVersion:"0.0.1",requestDuration:29,currentTime:1504878884618},requesterInformation:{id:"1b37607c519c318194ce6da08c519c0a3f7c9855-7FSFCyd6oSX2mV6Z",remoteIP:"12.34.567.890",receivedParams:{role:"Submitter",apiVersion:"v2",challengeId:"30059255",action:"getChallengeTerms"}}}},function(e){e.exports={termsOfUseId:20704,title:"Standard Reviewer Terms v1.0",url:"",text:'Standard Reviewer Terms (Version 1.0) \r\n\r\nTHESE ARE THE TERMS AND CONDITIONS ("TERMS") UNDER WHICH YOU AGREE TO WORK UNDER AS A TOPCODER REVIEW BOARD MEMBER. THESE TERMS AND CONDITIONS AFFECT YOUR RIGHTS AND YOU SHOULD READ THEM CAREFULLY BEFORE AGREEING TO THEM. IN THESE TERMS AND CONDITIONS, "WE," "US," "ITS" AND "OUR" REFER TO TOPCODER, INC. AND "YOU" AND "YOUR" REFER TO YOU.
\r\n\r\nIt is understood that We need, and You have, expertise in evaluating and critiquing software designs and/or software development solutions. Furthermore, You agree that You are ready, willing, and able to undertake the performance of evaluating and critiquing such software designs and/or software development solutions submitted to Us, and You agree to assign and transfer your rights as a result of performing such services.
\r\n\r\nIn consideration of the premises and the mutual promises and covenants set forth herein, and for other good and valuable consideration, the receipt and sufficiency of which are hereby acknowledged, the parties agree as follows:
\r\n\r\n1.0\tDefinitions: \r\nAs used in these Terms, the following capitalized terms shall have the following meanings unless otherwise indicated:
\r\n\r\n1.1.\t"Development(s)" shall mean any idea, design, concept, development, component, algorithm, process, method, formula, code, software, technique, technology, discovery or improvement, whether or not patentable, made, conceived, created, discovered, invented or reduced to practice by You in connection with the performance of services hereunder.
\r\n\r\n1.2.\t"Intellectual Property Rights" shall mean all intellectual property rights worldwide arising under statutory or common law or by contract and whether or not perfected, now existing or hereafter filed, issued or acquired, including all patent rights; all rights associated with works of authorship including copyrights and moral rights; rights relating to the protection of trade secrets and confidential information; and any right analogous to those set forth herein and any other proprietary rights relating to intangible property, other than Trademarks.
\r\n\r\n1.3.\t"TopCoder Information" shall mean TopCoder\'s and TopCoder Software\'s specifications, descriptions, architecture, plans, interfaces, and code for TopCoder\'s and TopCoder Software\'s hardware, software, and web site; TopCoder\'s competitions and competition operation procedures; TopCoder\'s and TopCoder Software\'s business and operational plans; and derivatives of the foregoing. The TopCoder Information shall be Confidential Information hereunder.
\r\n\r\n1.4.\t"Software Component" shall mean all software and related materials, technology and documentation (including without limitation design documents, source code and object code) to be evaluated and assessed by You for Us hereunder in accordance with our requirements, as set forth herein and in other documents provided by Us. The Software Component shall be Confidential Information hereunder.
\r\n\r\n2.\tServices: \r\n\r\n2.1\tYou hereby agree to provide services relating to the evaluation and assessment of the Software Component. You agree to perform such services according to and in conformity with the following specifications, in addition to any specifications and/or scheduled provided by Us in our sole discretion (the "Services"):
\r\n\r\nArchitecture Review Board requirements per component project:\r\nIf assigned the role of Primary Architect, as designated by Us, You will review all component submissions to check if all required elements are present as defined in the Design Screening Scorecard. If all required elements are present, then the reviewer objectively scores the design on a series of questions in the Design Screening Scorecard. This process will narrow down the component submissions to the top components, which will go on to a more detailed review. \r\nAll Architecture Review Board members for a component will fill out a subjective review for each component that passes the screening phase. This review is performed through a series of questions in the Design Review Scorecard. Each question requires both a score and comments. \r\nThe Primary Architect is responsible for aggregating all review comments. This includes resolving any conflicts between differing architect comments. The Primary Architect may deem some suggestions as mandatory with our permission. \r\nThe Primary Architect is responsible for giving final review to the component submission once the comments have been applied. This includes ensuring that mandatory suggestions have been implemented, and that all suggestions implemented have been done correctly. \r\nAll interaction with designers, our personnel and other Architecture Review Board members should occur in the online forum on www.topcodersoftware.com. \r\n \r\n\r\nDevelopment Review Board requirements per component project:\r\n\r\nIf assigned the role of Primary Reviewer, as designated by Us, You will review all component submissions to check if all required elements are present as defined in the Development Screening Scorecard. If all required elements are present, then the reviewer objectively scores the development solution on a series of questions in the Development Screening Scorecard. This process will narrow down the component submissions to the top components, which will go on to a more detailed review. \r\nAll Development Review Board members for a component will fill out a subjective review for each component that passes the screening phase. This review is performed through a series of questions in the Development Review Scorecard. Each question requires both a score and comments. In addition, the reviewers will each be assigned one of the following roles, which defines what type of test cases they are responsible for submitting: \r\n\r\nStress Tester - Develop test cases to stress test component solutions in order to get performance metrics on throughput and capacity. \r\nAccuracy Tester - Develop test cases to test the accuracy of the component. Each public method should be tested to ensure it returns the expected result. \r\nFailure Tester - Develop test cases to test different input types for all constructor methods and public methods that are not covered in the developer unit test cases or the designer test cases. \r\n \r\nAll interaction with designers, developers, our personnel and other Development Review Board members should occur in the online forum on www.topcodersoftware.com. \r\n \r\n\r\n2.2\tYou agree to commit sufficient time and resources to perform the Services according to the schedule set forth by Us. You shall promptly notify Us of any circumstances, as such circumstances arise, that may reasonably be anticipated to lead to a material deviation from the schedule.
\r\n\r\n2.3\tYou agree to keep Us updated, promptly upon our request, of any progress, problems, and/or developments of which You are aware regarding the Services. We shall have the right to require such updates in writing from You in a format specified by Us or acceptable to Us in our sole discretion. You shall conduct and conclude the Services in a professional manner.
\r\n\r\n3.\tConsideration/Compensation: \r\n\r\n3.1\tFee. In consideration for performance of the Services required by You, We shall pay You the fee set forth on TopCoder\'s website and/or in other correspondence from Us to You (the "Fee"). The Fee shall be in U.S. Dollars and may be paid in installments, as set forth on our website or in other correspondence from Us. The Fee shall be paid upon the conclusion of the review period, and once completed scorecards have been received, provided the completed scorecards are submitted to Us by the deadline as set forth on the website and/or in the correspondence from Us.
\r\n\r\n3.2\tRoyalty Payments.
\r\n \r\n(a)\tDefinitions. As used in this Section 3, the following capitalized terms shall have the following meanings unless otherwise indicated:
\r\n\r\n(i)\t"Royalty Percentage" shall mean the percentage of the Royalty Pool to be distributed by Us, at our sole discretion, to all review board members who evaluate the Software Components. \r\n(ii) "Royalty Pool Percentage" shall mean the percentage of total revenue We derive from the sale of Software Components. We, in our sole discretion, shall determine the Royalty Pool Percentage and may modify or amend the Royalty Pool Percentage at any time for any or no reason. \r\n(iii) "Royalty Pool" shall mean the portion of our revenues that We distribute as royalty payments to the designers, architects, developers and quality assurance developers who designed, evaluated, developed and tested the applicable Software Components. The Royalty Pool shall be determined by multiplying (x) the Royalty Pool Percentage by (y) the total revenues received by Us from licenses of the applicable Software Components during the respective fiscal quarter. \r\n(iv) "Revenue Receipt Date" shall mean the date on which We first receive payment of revenue from licenses of an applicable Software Components. \r\n \r\n\r\n(b)\tIn consideration of Your evaluation of the Software Components and performance of Your obligations hereunder, We may pay to You a royalty (the "Royalty Payment"). The Royalty Payment to be paid shall be a portion of the Royalty Pool. The Royalty Pool shall be distributed as follows:
\r\n\r\n\r\n(i) 25% to all Architecture Review Board members. (This amount will be distributed equally amongst all review board members.) \r\n(ii) 25% to all Development Review Board members. (This amount will be distributed equally amongst all review board members.) \r\n(iii) 25% to the winning designer \r\n(iv) 25% to the winning developer \r\n \r\n\r\n3.3\tTotal Payment. The sum of the Fee and the Royalty Payments shall be the total payment due to You. Any and all out-of-pocket expenses incurred by You in connection with performing the obligations hereunder are your sole responsibility. We will not reimburse You for any expenses incurred.
\r\n\r\n3.4\tYou shall not be entitled to receive any other compensation or any benefits from Us in connection with the Services. Except as otherwise required by law, We shall not withhold any sums or payments made to You for social security or other federal, state or local tax liabilities or contributions, and all withholdings, liabilities, and contributions shall be solely your responsibility. Further, You understand and agree that the Services are not covered under the unemployment compensation laws and are not intended to be covered by workers\' compensation laws.
\r\n\r\n4.\tOwnership and Rights: \r\n\r\n4.1\tYou hereby acknowledge and agree that We own, solely and exclusively, all right, title and interest, including all Intellectual Property Rights, in and to the TopCoder Information. In addition, You hereby irrevocably and unconditionally transfer and assign to Us all right, title and interest You had, have, may have or acquire in or to all Developments and Software Components, and You agree to execute and deliver such documents, certificates, assignments and other writings, and take such other actions as may be necessary or desirable to vest in Us the ownership rights granted to Us hereunder.
\r\n\r\n4.2\tYou further agree that any and all works of authorship created, authored or developed by You hereunder shall be deemed to be "works made for hire" within the meaning of the United States Copyright Law and, as such, all rights therein including copyright shall belong solely and exclusively to Us from the time of their creation. To the extent any such work of authorship may not be deemed to be a work made for hire, You agree to, and do hereby, irrevocably and unconditionally transfer and assign to Us all right, title and interest including copyright in and to such work.
\r\n\r\n4.3\tYou agree that if We are unable, because of your unavailability, or for any other reason, to secure your signature to apply for or to pursue any application for any United States or foreign patents, mask work, copyright or trademark registrations covering the assignments to Us above, then You hereby irrevocably designates and appoints Us and your duly authorized officers and agents as your agent and attorney in fact, to act for and in your behalf and stead to execute and file any such applications and to do all other lawfully permitted acts to further the prosecution and issuance of patents, copyright, mask work and trademark registrations thereon with the same legal force and effect as if executed by your authorized agent.
\r\n\r\n4.4\tAll Intellectual Property Rights owned by a party as of the date You agree to these Terms shall remain the property of such party and no licenses or other rights with respect to such intellectual property are granted to the other party except as expressly set forth herein.
\r\n\r\n4.5\tNothing in these terms shall be construed as granting You any right or license under any of our Intellectual Property Right (including any rights We may have in any patents, copyrights, trademarks, service marks or any trade secrets), by implication, estoppel or otherwise, except as expressly set forth herein.
\r\n\r\n5.\tConfidential Information: \r\n\r\n5.1\t"Confidential Information" shall mean any information, in whatever form, provided by Us to You with obligation of confidentiality, or designated by Us in writing as confidential, proprietary or marked with words of like import when provided to You, and information orally conveyed if We state at the time of oral conveyance or promptly thereafter that such information is confidential. Notwithstanding anything to the contrary contained herein, information about or relating to our software, our system interfaces, our hardware and software architecture, our business, operational and marketing plans, our member lists and database, all information and technology provided by Us to You to enable You to perform your obligations hereunder, TopCoder Information, and any and all Developments shall be considered Confidential Information.
\r\n\r\n5.2\tConfidential Information shall not include information which (a) was in your possession without confidentiality restriction prior to disclosure by Us hereunder; (b) at or after the time of disclosure by Us becomes generally available to the public through no act or omission on our part; (c) is developed by You independently of and without reference to any Confidential Information You receive from Us; or (d) has come into your possession without confidentiality restriction from a third party and such third party is under no obligation to Us to maintain the confidentiality of such information.
\r\n\r\n5.3\tYou acknowledge the confidential and proprietary nature of Confidential Information and agree (i) to hold Confidential Information in confidence and to take all reasonable precautions to protect such Confidential Information (including, without limitation, all precautions You employ with respect to your own confidential materials), (ii) not to divulge any such Confidential Information to any third person; and (iii) not to make any use whatsoever of such Confidential Information except as expressly authorized herein.
\r\n\r\n5.4\tIn the event You are ordered to disclose Confidential Information pursuant to a judicial or government request, requirement or order, You shall promptly notify Us and upon our request, You shall, at our expense, take reasonable steps to assist Us in contesting such request, requirement or order or in otherwise protecting our rights prior to disclosure.
\r\n\r\n5.5\tYou agree not to reproduce or copy by any means Confidential Information, except as reasonably required to perform the Services. Upon termination of your performance of the Services as a review board member, your right to use Confidential Information shall immediately terminate. In addition, upon such termination, or upon demand by Us at any time, You shall return promptly to Us or destroy, at our option, all tangible materials and computer data that disclose or embody Confidential Information.
\r\n\r\n5.6\tYou agree that any breach of these terms by You could cause irreparable damage to Us. In view of the difficulties of placing a monetary value on the Confidential Information, We shall have, in addition to any and all remedies of law, the right to an injunction or other equitable relief, and may be entitled to a preliminary and final injunction without the necessity of posting any bond or undertaking in connection therewith to prevent any further breach or further unauthorized use of Confidential Information. This remedy is separate from any other remedy We may have.
\r\n\r\n6.\tRepresentations and Warranties: \r\n\r\n6.1\tYou represent and warrant that:\r\n
\r\n(a) You are at least 18 years old; \r\n(b) You are either (i) a U.S. citizen, (ii) a lawful permanent resident of the U.S., (iii) currently residing in the U.S. with proper and valid work authorization to work as an independent contractor, or (iv) a non-U.S. citizen, not living in the U.S. and performing the Services while residing in your country of residence; \r\n(c)\tYou are legally able and have the power and authority to execute, deliver and perform the Services and any other agreements contemplated hereby and to consummate the transactions contemplated hereby; \r\n(d)\tNo impediment exists to You agreeing to these Terms, and no other agreement has been or shall be made with any third party which will interfere with its performance; \r\n(e)\tYou shall use Your own independently developed code, and shall not copy or include code from any other party, including publicly available "Open Source" code that is or may be subject to licensing restrictions, without our prior written permission; and \r\n(f)\tAny services performed by You as a review board member shall be performed in a professional and workmanlike manner. \r\n \r\n\r\n\r\n7.\tIntellectual Property Indemnification: \r\n\r\n7.1\tYou shall indemnify, hold harmless and defend Us and our customers from and against any and all suits, actions, damages, costs, losses, expenses (including settlement awards and reasonable attorneys\' fees) and other liabilities arising from or in connection with any claim alleging that, to your knowledge, any Development and/or Software Component violates any trade secret right, or infringes any copyright, patent, trademark, or other intellectual property interest, in any country, and shall pay all costs and damages awarded. We shall promptly notify You of any such claim of which We are aware.
\r\n\r\n7.2\tYour obligations shall not extend to any claim for violation or infringement resulting solely from your compliance with any specific or direct written instructions from Us if such infringement would have been avoided but for such compliance.
\r\n\r\n8.\tIndependent Contractors: \r\n\r\n8.1\tBoth parties expressly agree and understand that You are an independent contractor and nothing herein nor the services rendered hereunder is meant, or shall be construed in any way or manner, to create a relationship of employer and employee, principal and agent, partners or any other relationship other than that of independent parties contracting with each other solely for the purpose of carrying out the provisions of these Terms. Accordingly, You acknowledge and agree that You shall not be entitled to any benefits provided by Us to our employees. You shall be responsible for any and all out-of-pocket expenses incurred in connection with performing the Services. In addition, You shall have sole and exclusive responsibility for the payment of all federal, state and local income taxes, for all employment and disability insurance and for Social Security and other similar taxes with respect to any compensation provided by Us hereunder. You further agree that if We pay or become liable for such taxes or related civil penalties or interest as a result of your failure to pay taxes or report same, or due to our failure to withhold taxes, You shall indemnify and hold us harmless for any such liability. You shall assume and accept all responsibilities which are imposed on independent contractors by any statute, regulation, rule of law, or otherwise. You are not our agent and are not authorized and shall not have the power or authority to bind Us or incur any liability or obligation, or act on behalf of Us. At no time shall You represent that You are our agent, or that any of the views, advice, statements and/or information that may be provided while performing the Services are ours.
\r\n\r\n8.2\tWe are entitled to provide You with general guidance to assist You in completing the scope of work to our satisfaction, You are ultimately responsible for directing and controlling the performance of the task and the scope of work, in accordance with these Terms. You shall use your best efforts, energy and skill in your own name and in such manner as You see fit.
',agreeabilityType:"Electronically-agreeable",serverInformation:{serverName:"Topcoder API",apiVersion:"0.0.1",requestDuration:52,currentTime:1504892902498},requesterInformation:{id:"d8c441f8332161f71533f368c09aeead856e4366-K1RdFai7LCAgXVu5",remoteIP:"12.34.56.78",receivedParams:{apiVersion:"v2",termsOfUseId:"21193",action:"getTermsOfUse"}}}},function(e){e.exports={termsOfUseId:21193,title:"Standard Terms for Topcoder Competitions v2.1",url:"",agreeabilityType:"Electronically-agreeable",text:'\r\n\r\n \r\n\r\n\r\n\r\n\r\n\r\n
Terms & Conditions of Use at topcoder \r\n\r\n
Acceptance of Terms and Conditions \r\n\r\nWelcome to topcoder.com (and related sub-domains (the "Website"). By using the Website, you are indicating your agreement to these Terms and Conditions of Use ("Terms of Use"), including, without limitation, our privacy policy. If you do not agree to these Terms of Use, please do not use the Website and exit now. \r\n\r\n\r\nThroughout these Terms of Use, the words "we," "us," "our," and topcoder refer to Topcoder, Inc., Appirio Inc. and their parents, subsidiaries and affiliates collectively. The term "Submissions" shall refer to any entry, component of an entry, or contents of a posting onto the Website submitted in connection with Competitions. "Competitions" shall refer to challenges, matches, tournaments or other competitions that take place on the Website or in connection with the topcoder Open ("TCO"). You and any other user of this Website that enters any Submissions with respect to Competitions shall be referred to herein as a "Contestant" in such capacity.\r\n\r\n\r\n\r\nWe may revise these Terms of Use at any time without prior notice by updating this page and such revisions will be effective upon posting to this page. Please check this page periodically for any changes. Your continued use of this Website following the posting of any revisions to these Terms of Use will mean you accept those changes. We reserve the right to alter, suspend or discontinue any aspect of www.topcoder.com, including your access to it. Unless explicitly stated, any new features will be subject to these Terms of Use. \r\n\r\n\r\n
General Eligibility \r\nOur Website is not intended for use by children under the age of 13. You must have your parents" permission to use this Website if you have not reached the age of majority in your jurisdiction of primary residence and citizenship. You must be at least 18 years old and have reached the age of majority in your jurisdiction of primary residence and citizenship to participate in any Competitions. \r\n\r\n\r\nUnless otherwise stated in the rules of a Competition, you are not eligible to participate in such Competition if you are a resident of the Quebec province of Canada, Iran, Cuba, North Korea, Crimea Region of Ukraine, Sudan or Syria. In addition, you are not eligible to participate in any Competition if you are on the Specially Designated National list promulgated and amended, from time to time, by the United States Department of the Treasury.\r\n\r\n\r\nFor Competitions that offer a cash prize and/or to participate in TCO, additional eligibility requirements apply. Please see the "Prize Payments" and "Additional TCO Terms" sections of this Terms of Use for additional eligibility requirements.\r\n\r\n\r\nWe may assign, novate or subcontract any or all of our rights and obligations under these Terms of Use at any time. \r\n\r\n\r\nIf you have any questions regarding these Terms of Use, contact us at
support@topcoder.com .\r\n\r\n\r\n
Accounts; Passwords; Security \r\nYou may need to set up an account in order to use some of the features of the Website. You may not use a third party"s account without permission. When you are setting up your account, you must give us accurate and complete information. This means that you cannot set up an account using a name or contact information that does not apply to you, and you must provide accurate and current information on all registration forms that are part of the Website. You may only set up one account. You have complete responsibility for your account and everything that happens on your account. This means you need to be careful with your password. If you find out that someone is using your account without your permission, you must let us know immediately. You may not transfer your account to someone else. We are not liable for any damages or losses caused by someone using your account without your permission. However, if we (or anyone else) suffer any damage due to the unauthorized use of your account, you may be liable. \r\n\r\n\r\nBy registering for an account with us, you are also hereby registered to compete in the TCO. The TCO is a series of Competitions held in four (4) online periods (each, a "Period") throughout the year (which such periods are posted on the Website), and which leads up to an onsite tournament annually which will be held at a location and time to be determined by topcoder. Your registration and participation in the TCO constitutes agreement with any additional applicable TCO terms and conditions (the "TCO Rules") that topocder may impose at its sole discretion as well as these Terms of Use, including those available at: http://tco15.topcoder.com/overview/competition-rules/. NO PURCHASE NECESSARY TO ENTER OR WIN, A PURCHASE WILL NOT INCREASE YOUR CHANCE OF WINNING.\r\n\r\n\r\n
Competitions \r\n\r\n\r\nIn addition to these Terms of Use, we may provide specific Official Rules and Regulations and other documentation for certain activities on this Website, including with respect to Competitions conducted by us and those in conjunction with third parties. These Terms of Use are incorporated by reference into the specific Official Rules and Regulations which appear in connection with information about a particular Competition. To the extent that any conflict exists between these Terms of Use and any specific Official Rules and Regulations, the Official Rules and Regulations for that Competition in which you choose to participate shall govern. \r\n\r\n
Ownership Rights of Submissions \r\n
Winning Submissions \r\n\r\nExcept with respect to "Fun Challenges", you hereby assign, grant and transfer and agree to assign, grant and transfer to us all right and title in and to any and all Submissions made by you in connection with a Competition for which you are paid a cash prize or other good and valuable compensation (or for which topcoder has in good faith made available for payment pending your completion of tocpoder"s payment requirements) (any such Submission, a "Winning Submission"), along with any and all copyright, patent, trade secret, moral right, and other intellectual property rights, in and to any and all such Winning Submissions. To the extent any rights in a Winning Submission are not assignable, you hereby grant and agree to grant to topcoder under any and all such rights an irrevocable, paid-up, royalty free, perpetual, exclusive, sublicensable (directly or indirectly through multiple tiers), transferable, and worldwide license to use and permit others to use such Winning Submission in any manner desired by us (and/or our contest sponsors or customers) without restriction or accounting to you, including, without limitation, the right to make, have made, sell, offer for sale, use, rent, lease, import, copy, prepare derivative works, publicly display, publicly perform, and distribute all or any part of such Winning Submission and modifications and combinations thereof and to sublicense (directly or indirectly through multiple tiers) or transfer any and all such rights. Further, you hereby waive and agree to waive in favor of topcoder any moral right or other right or claim that is contrary to the intent of a complete transfer of rights to topcoder in each Winning Submission. You agree to promptly execute such documents and perform such acts as we may reasonably require to perfect our entire right, title, and interest in and to each and every Winning Submission, including a topcoder Competition Assignment Agreement if requested by topcoder and/or a sponsor of a Competition. \r\n\r\n\r\n
Other Submissions \r\n\r\nExcept with respect to "Fun Challenges", the ownership rights in and to any Submission that is not a Winning Submission shall remain with the Contestant, except that to the extent you are required to enter into a Non-Disclosure Agreement in connection with a Competition (a "Competition NDA"), you understand and agree that the rights in and to any confidential information of the sponsor of a Competition shall remain the property of such Competition sponsor and you shall be bound by and the terms of such Competition NDA shall apply with respect to your rights in and to the Submission. The current version of the Competition NDA is posted in the "direct tool" available on the Website. In addition, by participating in a Competition and uploading a Submission, regardless of whether it is a Winning Submission or not, you consent to and you hereby grant Topcoder, other Topcoder members, Appirio, the Competition sponsor and their affiliates, employees, contractors and third parties engaged by them a license to review, revise, scan, comment on and/or update your Submission in connection with the Competition, without any payment to or further approval from you. You agree that this consent and license spans the length of the Competition and cannot be revoked.\r\n\r\n\r\n
Fun Challenges \r\n\r\n"Fun Challenges" are Competitions that do not have any winners or prizes associated with them, and are intended purely for the fun of participating and collaborating with fellow topcoder members throughout the world. All Submissions in connection with Fun Challenges will be made publicly available and without any restrictions on use by anyone worldwide. By entering into a Fun Challenge and uploading a Submission in connection with a Fun Challenge, you hereby waive and release any and all ownership, copyright, patent, trade secret, moral right, and other intellectual property rights, in and to any and all such Submissions without the expectation of any payment or consideration of any kind.\r\n\r\n\r\n
Contest Materials \r\n\r\nYou hereby further acknowledge and understand that Competition sponsors, topcoder and Appirio engage, has engaged and will in the future engage in the development, preparation, production, acquisition and dissemination of creative, educational, artistic and other material (collectively, the "Materials"), including without limitation Materials that may be similar or identical to your Submission. You also acknowledge that other persons, including our employees and employees of a Competition sponsor, may previously have originated and may hereafter originate Materials that are similar or identical to your Submission. You agree that you will not be entitled to any compensation because of the use by Sponsor of any such similar or identical material. Without limitation of the foregoing, we, our customers and any Competition sponsor may use, without any payment or other obligation whatsoever to you, any part of the Materials, and any idea or concept contained therein, that (a) is similar or identical to, or contains significant elements encompassed in, a concept that is under consideration or in development by us or the Competition sponsor before or at the time of your entry, (b) is not unique, novel, original, and concrete so as to be entitled to protection under applicable laws, (c) has been made public by anyone at the time of its submission to the Competition sponsor or us or otherwise is in the public domain, (d) would be freely usable by a third person if it had not been accepted as a Submission or the subject of any agreement, (e) is not protected by United States copyright law, or (f) is similar or identical to, or contains significant elements encompassed in, an idea, concept or material that is independently created by us, a Competition sponsor or any third party. You agree that our or a Competition sponsor"s development, preparation, production, acquisition, dissemination and/or exploitation of Materials similar or identical to your Submission or containing features, ideas, material and/or elements similar to or identical with those contained in your Submission shall not entitle you to any compensation or other right or remedy. As an inducement to us or a Competition sponsor to accept your Submission for entry into the contest, you hereby waive any claim or right of action against us, the Competition sponsor"s and their successors in connection with use of any Materials (or any portions thereof) whether or not such Materials are similar or identical to your Submission or contain any features, ideas, material and/or elements that are similar or identical to those contained in your Submission. Acceptance by us (or a Competition sponsor, as applicable) of a Submission is not an admission by us or a Competition sponsor of the novelty or originality of the Submission.\r\n\r\n\r\n\r\nUnless agreed otherwise in writing, the sponsor of a contest administered through the Website, topcoder or Appirio (as applicable) owns and will retain ownership (including all intellectual property rights) in and to any materials that are not Submissions, which materials may be tangible or intangible, that you develop that are a result of a contest administered through the Website ("Contest Materials"), and any modifications, improvements and derivative works thereto (including any such materials that incorporate any of Contestant"s ideas, feedback or suggestions). \r\n\r\n\r\n
U.S. Federal Government Rights & Restrictions \r\n\r\nFor any Competition sponsored by, on behalf of, or for the benefit of the U.S. Federal Government, Contestants may be subject to the Federal Acquisition Regulations and agree to comply with applicable provisions of the Federal Acquisition Regulations ("FAR") and all other laws and regulations applicable to providing goods and services to the U.S. Federal Government. In particular, Winning Submissions be considered "Commercial Items" and Contestants may be classified as "Subcontractors" according to the U.S. Federal Government, and by entering a Submission in connection with a Competition, the Contestant hereby agrees to be bound by all laws and regulations applicable to the sale of commercial items by subcontractors to the U.S. Federal Government including FAR 52.212-5(e) and FAR 52.244-6(c)(1).. \r\nUser Content\r\n\r\n\r\nYou are solely responsible for any User Content you post to the Website, and the consequences of posting or publishing it. By "User Content", we mean any Content you post to the Website. "Content" means information, data, text, software, music, sound, photos, graphics, videos, messages, tags, interactive features, or any other materials. When we say "post", we include posting, uploading, sharing, submitting or otherwise providing User Content in any manner in connection with the Website. For the avoidance of doubt, Submissions and Contest Materials are User Content.\r\n\r\n\r\nYou may not:\r\n\r\n
\r\nUse our Website for any illegal purpose \r\nSubmit User Content that you don"t have the right to submit (including but not limited to material covered by someone else"s copyright, patent, trade secret, privacy policy, publicity policy, or any other proprietary right) \r\nDisguise in any way the origin of any User Content you submit (including but not limited to forging headers) \r\nSubmit any User Content that contains lies or misrepresentations that could damage Us or anyone else \r\nSubmit User Content that is obscene, illegal, defamatory, libelous, threatening, pornographic, harassing, hateful, or encourages criminal conduct, give rise to civil liability, violate any law, or is otherwise inappropriate \r\nTransmit any advertising, promotional materials, junk mail, spam, chain letters, pyramid schemes or any other solicitation \r\nImpersonate anyone else or misrepresent your affiliation with any other person or entity \r\nUse meta tags or any other hidden text utilizing any of our or our suppliers" names, products names, or trademarks \r\nUpload, launch, post email or transmit any material (including any bot, worm, spider, script, or virus) that may harm or corrupt this Website, or anyone else"s computer systems or data \r\nUse our Website to harm minors in any way \r\nCollect or gather other people"s personal information (including account information) \r\nSubmit User Content that disparages us or our partners and affiliates \r\nSolicit any users of our Website for any commercial purpose \r\n \r\n\r\n\r\nWe have the sole right, but not necessarily the obligation, to delete at any time any User Content that violates these rules or that we believe to be inappropriate for any reason.\r\n\r\n\r\nIf you post User Content, you are making a guarantee to us that you either own all the Content you are posting, or you have the right to post the Content. Unless otherwise expressly permitted, you may not copy or include in any User Content any code from any third party, including "open source" code or other code that is or may be subject to license terms. Furthermore, you are guaranteeing that you have the right to allow us to make your User Content available for others to view and use as part of the Website without requiring that any such use be subject to additional obligations or terms. If you do not have these rights, do not post the Content. By posting your User Content, you do not lose any ownership rights you may have to it. However, unless otherwise governed by the Official Rules and Regulations governing a specific Competition, you do grant us a worldwide, irrevocable, non-exclusive, royalty-free, fully-paid, sublicenseable (through multiple tiers of distribution) and transferable license to use, reproduce, modify, distribute, prepare derivative works of, display, and perform your User Content in connection with the Website and our business, in any media formats or in tangible form and through any media channels now known or hereinafter developed. You also grant each user of the Website a non-exclusive royalty-free, fully-paid, sublicenseable and transferable license to access your User Content through the Website, and to use, reproduce, distribute, prepare derivative works of, display and perform your User Content as permitted through the functionality of the Website and under these Terms of Service.\r\n\r\n\r\nYou understand that once you post User Content, your content becomes public. We are not responsible for keeping any User Content confidential.\r\n\r\n\r\nWe generally do not review any of the User Content posted by our users. We do not endorse any User Content or support any views, opinions, recommendations, or advice that may be in user submissions. User Content comes from a variety of sources, and we make no promises about the reliability of any source or the accuracy, usefulness, safety, or intellectual property rights of any user submission. You may be offended by User Content that you see on the Website. You may find some of it to be inaccurate, offensive, indecent, or objectionable. However, you agree not to hold us responsible in any way for your use of our Website, including your exposure to User Content.\r\n\r\n\r\nWe reserve the right to remove any postings or other uploaded materials in response to complaints of infringement, obscenity or defamation or to otherwise review or edit such materials as appropriate, in our sole discretion and without notice.\r\n\r\n\r\nIn addition to the above terms governing User Content, as a condition of participating in the TCO, you agree to permit topcoder to describe, publicize, and link to any User Content submitted or posted in connection with TCO. You may not cheat; all ideas for Submissions submitted in connection with the TCO shall be solely yours; you may not collaborate on any Submissions entered in connection with the TCO unless otherwise set forth in the TCO Rules. IN ORDER TO BE ELIGIBLE FOR THE TCO, YOU WARRANT THAT YOUR SUBMISSION FOR EACH COMPETITION THAT IS PART OF THE TCO:\r\n\r\nDoes not include or anticipate the inclusion of any unsuitable or offensive content, including nudity, sexually explicit, disparaging, libelous or other inappropriate content;\r\n\r\n\r\nDoes not include or anticipate the inclusion of any content that is in violation of or infringes third party intellectual property rights including, but not limited to copyrights, including music copyrights, trademarks, and rights of publicity;\r\n\r\n\r\nHas not been entered in previous contests, or won previous awards;\r\n\r\n\r\nHas not been published or distributed previously in any media;\r\n\r\n\r\nIs suitable for a general audience; and\r\n\r\n\r\nDoes not contain any claims that are not and cannot be substantiated or that would be false and/or misleading to a reasonable consumer.\r\n\r\n
Copyright, Trademark and Other Intellectual Property \r\n\r\n
Protection \r\nExcept as otherwise indicated, this Website and its entire contents (including, but not limited to, the text, photographs, information, software, graphics, images, sound, and animation) are owned by us and are protected by domestic and international copyright, trademark, patent, and other intellectual property laws. All copyrightable text and graphics, the selection, arrangement, and presentation of all materials (including information in the public domain), and the overall design of this Website are "2014 topcoder. All rights reserved. We hereby give you permission to download and print materials from this Website for the sole purposes of viewing, reading, and retaining for reference the materials for non-commercial use. Any other copying, distribution, retransmission, or modification of information or materials on this Website, whether in electronic or other form, without our express prior written permission is strictly prohibited. You further agree that you will not disassemble, decompile, reverse engineer or otherwise modify the material on this Website. Any unauthorized or prohibited use may subject the offender to civil liability and criminal prosecution under applicable laws. \r\n\r\n\r\n
Notice \r\nAll trademarks, service marks, and trade names are proprietary to us or other respective owners that have granted us the right and license to use their marks. \r\n\r\n\r\n
Copyright Complaints \r\nWe respect the intellectual property of others, and we ask you to do the same. We may, in appropriate circumstances and at our sole discretion, terminate the access of users who infringe the copyright rights of others. \r\nIf you believe that your work has been copied and is accessible at our Website in a way that constitutes copyright infringement, or that our Website contains links or other references to another online location that contains material or activity that infringes your copyright rights, you may notify us by providing our copyright agent the information required by the U.S. Online Copyright Infringement Liability Limitation Act of the U.S. Digital Millennium Copyright Act, 17 U.S.C. "512. Our agent for notice of claims of copyright infringement on or regarding this Website can be reached as follows: \r\n\r\n\r\n
\r\n\r\n\r\nBY E-MAIL: \r\nGC@appirio.com \r\n \r\n\r\nBY MAIL: \r\nDan Lascell\r\n\r\nTopcoder, Inc.\r\n\r\n760 Market Street\r\n\r\nSan Francisco, CA 94102 \r\n \r\n\r\nBY PHONE: \r\n(650) 268-9911 \r\n \r\n \r\n
\r\n\r\n\r\nRepeat infringers will be blocked from accessing the topcoder Website. \r\n\r\n\r\n
Marketing Materials \r\n\r\n\r\nYou hereby authorize us and any Competition sponsors to publicize the results of any Competition, including your name and account name (handle). Contestant hereby grants to us and any Competition sponsors the absolute right and permission to use your name, address (city and state), testimonial statement (or statements in different words which have substantially the same meaning), voice, photograph and/or other likeness in any and all advertising and promotional materials, or to refrain from doing so, in any manner or media whatsoever, worldwide, for advertising and promotional purposes in conjunction with this and similar Competitions without notice to you and without further compensation. You shall have no right of approval, no claim to any compensation, and no claim arising out of the use, alteration, distortion or illusionary effect or use in any composite form of your name, address, testimonial statement, voice, photograph or likeness.\r\n\r\nYou understand that we own all photographs of you taken by us and we may copyright material containing such photographs.\r\n\r\n\r\n
Indemnification and Release \r\nBy accessing our Website, you agree to indemnify us and any parent, subsidiary, sponsor or affiliated entities, our officers and employees, and officers and employees of any parent, subsidiary, sponsor or affiliated entities and hold them harmless from any and all claims and expenses, including attorney\'s fees, arising from your use of our Website including any material (including third-party material) that you post on our Website and any services or products available through our Website. In addition, you hereby release us and any parent, subsidiary, sponsor or affiliated entities, our officers and employees, and officers and employees of any parent, subsidiary, sponsor or affiliated entities from any and all claims, demands, debts, obligations, damages (actual or consequential), costs, and expenses of any kind or nature whatsoever, whether known or unknown, suspected or unsuspected, disclosed or undisclosed, that you may have against them arising out of or in any way related to such disputes and/or to any services or products available at our Website. You hereby agree to waive all laws that may limit the efficacy of such releases. \r\n\r\n\r\nBy registering and/or participating in the TCO or a Competition, you agree to release topcoder and any Competition sponsor(s), and its affiliates and agents, and the officers, employees, affiliates, advertising and promotions agencies, prize suppliers, and all of their employees, officers, directors, shareholder\'s and agents (collectively, the "Releasees") from any and all liability or any injuries, loss or damage of any kind arising from or in connection with the TCO or a Competition, the use of any Submission, or the acceptance or use of any prize won, except where prohibited by law. Releasees assume no responsibility for incomplete, misdirected, damaged or illegible entries nor for any delayed Submissions or those not received for whatever reason, including without limitation due to internet or e-mail server failure, telephone, human, or other higherror or for any technical or other malfunctions that may occur including any injury or damage to your or any other person\'s computer relating to or resulting from participation in the Tournament or a Competition or downloading any materials during or for the TCO or a Competition.\r\n\r\n\r\n
Disclaimer \r\nTHE MATERIALS AND SERVICES ON OUR WEB SITE ARE PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND EITHER EXPRESS OR IMPLIED. TO THE FULLEST EXTENT PERMISSIBLE PURSUANT TO APPLICABLE LAW, WE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. WE DO NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE MATERIALS WILL BE UNINTERRUPTED OR ERROR-FREE, THAT DEFECTS WILL BE CORRECTED, OR THAT THIS WEB SITE OR THE SERVER(S) THAT MAKES OUR WEB SITE AVAILABLE OR ANY ADVERTISED OR HYPERLINKED SITE ARE FREE OF VIRUSES OR OTHER HARMFUL COMPONENTS OR THAT OUR SITE, SERVER(S), ADVERTISED OR HYPERLINKED SITES WILL BE ACCESSIBLE AT ALL TIMES. WE DO NOT WARRANT THAT SUCH ERRORS, DEFECTS OR INTERRUPTIONS IN SERVICE WILL NOT AFFECT THE RESULTS OF OUR COMPETITIONS, AND WE DISCLAIM ANY RESPONSIBILITY FOR REDUCED PERFORMANCE IN COMPETITIONS DUE TO SUCH PROBLEMS. WE DO NOT WARRANT OR MAKE ANY REPRESENTATIONS REGARDING THE USE OR THE RESULTS OF OUR WEB SITE WITH RESPECT TO CORRECTNESS, ACCURACY, RELIABILITY, GRAPHICS, LINKS OR OTHERWISE. YOU ASSUME THE ENTIRE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. TO THE EXTENT THAT APPLICABLE LAW MAY NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, THE ABOVE EXCLUSIONS MAY NOT APPLY TO YOU. \r\n\r\n\r\nDocuments, graphics and other materials appearing at our Website may include technical inaccuracies, typographical errors, and out-of-date information and use of such documents, graphics or other materials is at your own risk. \r\nYou represent and warrant that neither you nor any member of your immediate family, nor anyone living in your household, is an employee of topcoder or Competition sponsors, regardless of commitment date as sponsor, including any companies involved in the production (including prize suppliers), implementation and distribution of this tournament and their advertising or promotion agencies, parent companies, service providers, agents, officers, subsidiaries or affiliates, or any other persons or entities directly associated with the tournament, and that neither you nor any immediate family member nor anyone living in your household is connected with any of the above.\r\n\r\n\r\n
Limitation of Liability \r\n\r\nTO THE FULLEST EXTENT PERMISSIBLE PURSUANT TO APPLICABLE LAW, TOPCODER] SHALL NOT BE LIABLE FOR ANY DAMAGES (INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES), WHETHER BASED ON WARRANTY, CONTRACT, TORT, OR ANY OTHER LEGAL THEORY, INCLUDING, BUT NOT LIMITED TO, DAMAGES FOR LOSS OF WINNINGS, DATA OR OTHER DAMAGE TO ANY OTHER INTANGIBLE PROPERTY, EVEN IF TOPCODER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, RESULTING FROM (i) THE USE OR INABILITY TO USE THIS WEB SITE, (ii) THE DISCLOSURE OF, UNAUTHORIZED ACCESS TO OR ALTERATION OF ANY TRANSMISSION OR DATA, (iii) THE STATEMENTS OR CONDUCT OF ANY THIRD PARTY OR (iv) ANY OTHER MATTER RELATING TO TOPCODER. \r\n\r\n\r\n
Prize Payment \r\n\r\nYou understand that neither we, the Competition sponsors nor their parent corporations, subsidiaries, affiliates, agents, assigns, etc. or any entity connected with a Competition will be responsible for any costs (including, without limitation, any federal, state or local taxes) Contestant may incur in connection with any Contest or any prize Contestant may be awarded. However, Contestant understands that topcoder may make withholdings from any prize that Contestant may be awarded in order to comply with applicable tax laws. Contestant agrees to sign any applicable forms necessary to distribute the prize as required by tax authorities.\r\n\r\n\r\nAll cash prizes are listed and shall be awarded in USD. All prizes will be awarded in each Competition, provided a qualified number of Submissions are received and the requisite number of Contestants participate in a round of a Competition. A Competition sponsor may award prizes to more than one Submission with respect to any Competition. If a Contestant cannot or will not accept a prize, then the prize will be forfeited and may be awarded to the next highest scoring Submission. Unless otherwise provided herein, by participating in a Competition and/or the TCO, a Contestant acknowledges and agrees that if his/her Submission is selected as a winner, the Contestant will receive a cash award only upon verification of all applicable eligibility requirements. Cash prizes will be paid out by topcoder (or its designee) in the US in US dollars no later than 90 days following the conclusion of the Competition or the conclusion of the TCO (as applicable). Taxes, if any, are the sole responsibility of the winner(s). Prizes which remain unclaimed or undeliverable for a period of six (6) months will be forfeited. \r\n\r\n\r\nAs a condition of winning and redeeming a cash prize, Contestants will be required to submit a completed (i) Contestant Questionnaire and all post Competition surveys, (ii) if requested, an Affidavit of Eligibility and Liability and Publicity Release, unless a notarized copy is already on file with topcoder (iii) IRS Form W-9 or W-8BEN, as appropriate if one is not already on file with topcoder, (iv) with respect to the TCO, a topcoder Competition Assignment Agreement, if one is not already on file with topcoder, and (v) with respect to the TCO, a Travel form. In completing any requested Affidavit of Eligibility and Liability and Publicity Release, a Contestant who wins a cash prize (a) confirms his/her eligibility, (b) represents and warrants that he/she has not cheated, (c) verifies the accuracy of the demographic information submitted to, and contained in, the topcoder member database, (d) authorizes topcoder to publicize the results of the Competition and/or the TCO, (e) agrees to sign any applicable forms required by tax authorities, (f) grants topcoder a license to all information submitted during the Competition and/or the TCO, and (g) releases topcoder from liability arising out of any prize won. topcoder requires all Contestants to complete the Form W-9 or W-8BEN for tax reporting purposes. Providing false information in the registration process or in the required forms described in this paragraph will result in a forfeiture of a cash prize. If a winning Contestant (i) does not reply to a notification from topcoder or the notification is undeliverable, (ii) in the case of TCO, does not return a requested Affidavit of Eligibility/Liability/Publicity release completed and signed within ten (10) days of date of prize notification, or (iii) is not otherwise in compliance with these Rules or the rules of a Competition, the Contestant will be disqualified and forfeit any prize, and topcoder may, at our discretion, select and notify another Contestant. Participatory prizes and non-cash prizes will be mailed within one month following the conclusion of the Competition or the TCO (as applicable) to the address provided by the Contestant in their topcoder profile. Unclaimed or undeliverable participatory prizes will be forfeited. Contestants who do not submit the required information by the applicable deadlines forfeit their prizes. Please allow 6-12 weeks for delivery. If a Contestant"s prize is returned, topcoder will resend that prize to a secondary address provided a request is made by the prizewinning Contestant. topcoder is not responsible for lost or stolen items and will not send additional prizes in the event a prize is not received. Each Contestant that participates in the Onsite portion of the TCO is eligible to receive only one (1) TCO T-shirt during the TCO, which may only be picked up by the Contestant at the TCO.\r\n\r\n\r\n
Links to Other Web Sites and Services \r\n\r\nTo the extent that our Website contains links to other Websites and outside services and resources, we do not control the availability and content of those Websites, services or resources, nor do we necessarily review or endorse materials available at or through such other Websites. Viewing other Websites or utilizing outside services and resources is done at your own risk. We shall not be liable for any loss or damage caused or alleged to be caused by or in connection with use of or reliance on any such content, goods or services available on or through any such site or resource. \r\n\r\n\r\n
Other Restrictions on Conduct \r\nWe are making the Website available to you for your information and personal use only. You may not (and you agree not to) use, copy, distribute, transmit, broadcast, sell, or do anything else with the Website for any other purpose.\r\n\r\n\r\nYou agree not to disrupt, modify or interfere with the functioning of our Website or any services provided on or through our Website or with any associated software, hardware or servers in any way and you agree not to impede or interfere with others\' use of our Website. This includes your agreement that you will not cheat; that the idea for the code and/or challenge(s) submitted by you is yours alone. This also includes your agreement that you will not provide your topcoder information including, but not limited to, your topcoder handle and rating, to any third party for the purpose of pursuing employment opportunities without the written consent of topcoder. If you are contacted by a third-party regarding employment opportunities and/or media interest as a result in your participation in topcoder Competitions, you agree to promptly notify topcoder of such contact. You also agree not to alter or tamper with any information or materials on, or associated with our Website or services provided on or through our Website. \r\nWe do not necessarily endorse, support, sanction, encourage, verify or agree with the comments, opinions, or other statements made public at our Website by users through our Competitions, forums or other interactive services available at our Website. Any information or material sent by users to any forums, including advice and opinions, represents the views and is the responsibility of those users and does not necessarily represent our views. \r\n\r\n\r\nYou agree that no impediment exists to you joining the topcoder Website, and your participation in topcoder\'s Website and the Competitions it offers will not interfere with your performance of any other agreement or obligation which has been or will be made with any third party. \r\n\r\n\r\n
Provisions Applicable to Chinese Citizens and Expatriates Residing in China \r\ntopcoder hereby incorporates into these Terms of Use and into our Privacy Policy the provisions of China\'s Decision on Safeguarding the Security of the Internet (the "Decision"). \r\n\r\n\r\nAccording to Section 1 of the Decision "to ensure operational security of the Internet, the person or organization perpetrating any of the following acts in violation of the criminal law shall be penalized according to the criminal code:\r\n\r\n
\r\n1.\tUnauthorized penetration into the computer and information system of the state affair, national defense or high-tech departments of the state; \r\n2.\tIntentional composition or dissemination of computer virus or other destructive programs, or attacking the computer system or telecommunication network and resulting in damage or destruction of such computer systems or telecommunication network; \r\n3.\tUnauthorized disruption of operation of the computer network or telecommunication service and resulting in malfunction of such network or telecommunication systems in violation of the laws or regulations of the state." \r\n \r\n\r\nAccording to Section 2 of the Decision, "to protect national security and social stability, the person or organization perpetrating any of the following acts in violation of the criminal law shall be penalized according to the criminal code:\r\n\r\n
\r\n1.\tDisseminating rumor or slander on the Internet, or publishing or diffusing maleficent information to instigate subversion of the state power or socialist system, advocate abruption of the country or harm unity of the country; \r\n2.\tStealing or disclosing the national or military secrets on the Internet; \r\n3.\tInstigating inter-ethnic enmity or prejudice, or disrupting ethnic unity on the Internet; and \r\n4.\tEstablishing or organizing heresies on the Internet and impeding the implementation of laws and regulations of the state." \r\n \r\n\r\n\r\nSection 3 of the Decision also stipulates that "to safeguard the order of the socialist market economy and social stability, the person or organization perpetrating any of the following acts in violation of the criminal law shall be penalized according to the criminal code:\r\n\r\n
\r\n1.\tSelling fake or shoddy goods on the Internet or making false or misleading propaganda of commodities on the Internet; \r\n2.\tHurting others\' commercial fame or reputation of products on the Internet; \r\n3.\tInfringing upon others\' intellectual property rights on the Internet; \r\n4.\tCompiling and distributing false information on the Internet to affect securities or futures transactions or disrupt order of the financial markets; and \r\n5.\tEstablishing pornographic web sites or web pages, providing links to pornographic web sites, or disseminating pornographic magazines, films, audio and videos materials or graphics on the Internet." \r\n \r\n\r\nSection 4 of the Decision stipulates that "to protect the legal rights of personal safety and property of individuals, legal persons and other organizations, the person or organization perpetrating any of the following acts in violation of the criminal law shall be penalized according to the criminal code:\r\n\r\n
\r\n1.\tInsulting others or drawing up slanders against others on the Internet; \r\n2.\tIllegally intercepting, modifying or deleting others\' emails or other database materials and infringing rights of the citizen of freedom and secrets in communicating and letter transmitting; and \r\n3.\tPerpetrating theft, fraud, or blackmailing on the Internet." \r\n \r\n\r\n
Choice of Law and Forum \r\n\r\nThese Terms of Use are governed by the laws of the state of California. You hereby agree to submit to the exclusive jurisdiction of the courts of San Francisco County, California. To the extent that applicable laws have mandatory application to this agreement or give you the right to bring action in any other courts, the above limitations may not apply to you. Use of this Website is unauthorized in any jurisdiction that does not give full effect to all provisions of these Terms of Use. \r\n\r\n\r\n
Severability and Enforceability \r\n\r\nIf any provision or portion of these Terms of Use is held illegal, invalid, or unenforceable, in whole or in part, it shall be modified to the minimum extent necessary to correct any deficiencies or replaced with a provision which is as close as is legally permissible to the provision found invalid or unenforceable and shall not affect the legality, validity or enforceability of any other provisions or portions of these Terms of Use. \r\n\r\n\r\n
Termination/Exclusion \r\n\r\nWe reserve the right, in our sole discretion, to revoke any and all privileges associated with accessing and/or competing on our Website, and to take any other action we deem appropriate including but not limited to terminating or suspending your use of www.topcoder.com, for no reason or any reason whatsoever, including improper use of this Website or failure to comply with these Terms of Use. \r\n\r\n\r\n
Additional TCO Terms \r\n\r\n
Eligibility \r\nThe TCO and each Competition that is part of the TCO is open to all members of the topcoder Website who have agreed to these Terms of Use and who are at least 18 years of age at the time of registration and have attained the age of majority in their jurisdiction of primary residence and citizenship. In addition to the other terms and eligibility criteria set forth in these Terms and Use, to be eligible to participate in the TCO, you must be (i) a U.S. citizen, (ii) a lawful permanent resident of the U.S., (iii) a temporary resident, asylee, refugee of the U.S., or have a lawfully issued work authorization card permitting unrestricted employment in the U.S., or (iv) a non-U.S. resident authorized in the country in which the member resides while participating in the TCO to perform services as an independent contractor; or (v) with respect to any Competition designated by us as an "Algorithm Competition", be in the United States under a valid and current visa issued by the United States government which does not prohibit receiving a cash prize. \r\n\r\n\r\nViolation of these Terms of Use may result in disqualification from the TCO and/or further consequences as determined in our sole discretion. Current employees of topcoder and those involved in the development, production (including prize suppliers and sponsors), implementation and distribution of the TCO (including Competitions run as part of the TCO) and their advertising or promotion agencies, parent companies, service providers, agents, officers, subsidiaries or affiliates, or any other persons or entities directly associated with the TCO and members of their immediate families and/or persons living in the same household as such persons, are ineligible to enter the TCO and related Competitions. Current employees of any TCO sponsor (or Competition sponsor that is part of TCO) or their parent companies, subsidiaries or affiliates which such Competition sponsor or TCO Sponsor, as applicable, is involved in the preparation, administration or judging of the TCO (and any related Competitions) and members of their employees\' immediate families and/or persons living in the same household as such employees, are ineligible to enter the TCO.\r\n\r\n\r\n
topcoder"s Discretion regarding the TCO \r\n\r\nAll decisions relating to the viability of Submissions, the ranking of Submissions and all other matters pertaining to the TCO are within the sole discretion of topcoder or its designee and shall be final and binding in all respects. By participating in the TCO and/or a Competition that is part of the TCO, a Contestant who wins a prize releases and agrees to hold harmless topcoder its affiliates, subsidiaries, sponsors, advertising and promotion agencies, and prize suppliers, and all of their respective directors, officers, employees, representatives and agents, from and against any and all liability for any loss, property damage or damage to person, including without limitation, death and injury, due in whole or in part, directly or indirectly, from or arising out of participation in the TCO, or participation in any TCO-related activity, or the receipt, use or misuse of a prize. topcoder reserves the right to limit the participation of any person in the TCO, amend or interpret these rules or official communications governing the TCO or cancel the TCO or any TCO-related Competition for any reason with prior notice. Notices for any such amendment, interpretation or cancellation will be deemed to have been given by posting on the Website and by virtue of a Contestant\'s continued participation in the TCO. A Contestant may terminate participation in the TCO upon written notice to topcoder.\r\n\r\n\r\n
TCO Logistics \r\n\r\nAll Contestants who have advanced or won a trip to the onsite portion of the TCO ("Onsite Contestants") must arrive at the event no later than the date and time specified in the TCO Rules. All Onsite Contestants must confirm their attendance at the onsite event no later than the date specified in the TCO Rules. In order to confirm attendance, Onsite Contestants must have acquired any necessary travel visas and confirm their ability to travel to the United States no later than the date specified in the TCO Rules. If an Onsite Contestant is required to travel from outside the United States, the Onsite Contestant must show proof of a visa and/or passport by the date specified in the TCO Rules. Onsite Contestants may email a copy of their documents as instructed in the TCO Rules. Onsite Contestants who fail to meet this requirement may be replaced as an Onsite Contestant. Contestants who are otherwise eligible to compete in any or all of the Competitions will be permitted to participate in the online portions of any/all of them. However, in the event a Contestant advances to the onsite finals in more than one Competition and any of the times for the onsite rounds of the Competitions overlap, the Onsite Contestant may participate in either, but not both, Competitions. The Onsite Contestant must notify topcoder of the Competition in which she/he will participate as an Onsite Contestant no later than the date specified in the TCO Rules.\r\n\r\n\r\ntopcoderwill issue visa invitation letters (upon request) to international Contestants who require one to obtain a travel visa to enter the United States. All registered TCO Contestants may request a visa invitation letter in respect of the year of the upcoming TCO. Contestants must fill out the visa letter request form in its entirety before a visa letter will be mailed. Contestants have until the date and time specified in the TCO Rules to request a letter. Visas can take a significant amount of time to obtain in certain countries, so it is in a Contestant\'s best interests to request one well before the deadline. The cost of obtaining a visa is the sole responsibility of the Contestant. See more information about travel visas. The TCO involves a large number of visa applications by topcoder members. By applying for a visa to attend the TCO, Contestant understands that topcoder will cooperate with all requests by consulates, the Department of Homeland Security, and law enforcement in connection with such Contestant\'s visa, including information about the visa applicants\' attendance at the TCO. Any abuse of the visa application process or any visa obtained for the TCO is considered a serious violation of US law and these Terms of Use, and, among other things, the Contestant will be subject to discipline by topcoder.\r\n\r\n\r\ntopcoder will provide air travel arrangements for each Onsite Contestant. The flight will be reserved and paid for by topcoder. Onsite Contestants will arrive on the date specified in the TCO Rules and depart the day after the final day of the Onsite portion of the TCO. At topcoder\'s sole discretion, topcoder will pay for each Onsite Contestant\'s airfare up to $1,500, but reserves the right to make exceptions to the maximum amount based on individual circumstances. If an Onsite Contestant wishes to take a flight other than the one provided by topcoder and/or wishes to stay at a hotel other than the one provided by topcoder, the Onsite Contestant shall be responsible for the entire cost of such deviation from the accommodations and travel arrangements provided by topcoder. In addition, the Onsite Contestant agrees to reimburse topcoder for any costs, penalties, fines or fees incurred by topcoder as a result of such deviation. Ground transportation to and from the airport will be provided for each Onsite Contestant by topcoder, as well as private hotel accommodations and certain meals. All other expenses are the responsibility of the Onsite Contestant. topcoder will not provide travel, lodging accommodations, or visa assistance for any guests of an Onsite Contestant. If an Onsite Contestant is eliminated or chooses not to utilize the travel accommodations provide by topcoder for any reason after he/she is confirmed as a finalist and travel accommodations have already been made for the Onsite Contestant by topcoder for the onsite finals, that Onsite Contestant may be held responsible for reimbursing topcoder for the cost of such accommodations. topcoder reserves the right to withhold any future cash prizes won by the Onsite Contestant until the cost of such accommodations has been fully reimbursed. Onsite Contestants must complete the following items and submit them to topcoder by the date specified in the TCO Rules (failure to submit these items will disqualify an Onsite Contestant from advancing to the onsite event):\r\n\r\n\r\nConfirmation of attendance/proof of travel documents " Please confirm your attendance onsite as directed in the TCO Rules. If you require a passport and/or visa to visit the United States, you must show proof of your documents.\r\n\r\n\r\nPlease submit a member photo, if you have not already done so.\r\n\r\n\r\nPlease also submit a fun photo to be shared during your onsite introduction.\r\n\r\n\r\nPlease ensure the information listed in your topcoder profile is current. We may need to mail your plane tickets or contact you via telephone.\r\n\r\n\r\nComplete the Onsite Contestant Questionnaire - your responses may be published in the program for the TCO.\r\n\r\n\r\nTravel form - provide topcoder with the appropriate travel information for your trip to the onsite event.\r\n\r\n\r\nApplicable tax forms (unless one is already on file with topcoder).\r\n\r\n\r\n
\r\n\r\n\r\n\r\n\r\n',agreed:!1,serverInformation:{serverName:"Topcoder API",apiVersion:"0.0.1",requestDuration:52,currentTime:1504892902498},requesterInformation:{id:"d8c441f8332161f71533f368c09aeead856e4366-K1RdFai7LCAgXVu5",remoteIP:"12.34.56.78",receivedParams:{apiVersion:"v2",termsOfUseId:"21193",action:"getTermsOfUse"}}}},function(e,t,r){(function(t){var n=r(66),o=r(68),a=r(69),i=r(70),s=r(14),u=r(71),l=r(77),c=r(78),d=r(79),f=r(80),p={param:"cbx",timeout:8e3,prefix:"__auth0jp"},h=r(85),m=r(40),g=r(87),y=r(88);function v(){var e=-1,t=navigator.userAgent;return"Microsoft Internet Explorer"===navigator.appName?null!=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(t)&&(e=parseFloat(RegExp.$1)):t.indexOf("Trident")>-1&&null!==new RegExp("rv:([0-9]{2,2}[.0-9]{0,})").exec(t)&&(e=parseFloat(RegExp.$1)),e}function b(e){var t="";for(var r in e)t+=r+"="+e[r]+",";return t.slice(0,-1)}function _(e,t){return!(!e||null==e[t])}function w(e,t){var r=e.status,n="string"==typeof e.responseText?e.responseText:e,o=10===v()||11===v(),a=!r||0===r,i=!!window.navigator.onLine;a&&!i?(r=0,n={code:"offline"}):a&&o?(r=401,n={code:"invalid_user_password"}):a&&(r=0,n={code:"connection_refused_timeout"}),t(new g(r,n))}function E(e,t,r){return e+"//"+t+r}function T(e){if(!(this instanceof T))return new T(e);o(e,"clientID"),o(e,"domain"),this._useJSONP=null!=e.forceJSONP?!!e.forceJSONP:y()&&!h("https:",e.domain),this._clientID=e.clientID,this._callbackURL=e.callbackURL||document.location.href,this._shouldRedirect=!!e.callbackURL,this._domain=e.domain,this._callbackOnLocationHash=e.callbackOnLocationHash,this._cordovaSocialPlugins={facebook:this._phonegapFacebookLogin},this._useCordovaSocialPlugins=e.useCordovaSocialPlugins,this._sendClientInfo=null==e.sendSDKClientInfo||e.sendSDKClientInfo}T.version=r(89).str,T.clientInfo={name:"auth0.js",version:T.version},T.prototype.openWindow=function(e,t,r){return window.open(e,t,b(r))},T.prototype._redirect=function(e){t.window.location=e},T.prototype._getCallbackOnLocationHash=function(e){return e&&void 0!==e.callbackOnLocationHash?e.callbackOnLocationHash:this._callbackOnLocationHash},T.prototype._getCallbackURL=function(e){return e&&void 0!==e.callbackURL?e.callbackURL:this._callbackURL},T.prototype._getClientInfoString=function(){var e=JSON.stringify(T.clientInfo);return n.encode(e)},T.prototype._getClientInfoHeader=function(){return{"Auth0-Client":this._getClientInfoString()}},T.prototype._renderAndSubmitWSFedForm=function(e,t){var r=document.createElement("div");r.innerHTML=t;var n=document.body.appendChild(r).children[0];e.popup&&!this._getCallbackOnLocationHash(e)&&(n.target="auth0_signup_popup"),n.submit()},T.prototype._getMode=function(e){return{scope:"openid",response_type:this._getCallbackOnLocationHash(e)?"token":"code"}},T.prototype._configureOfflineMode=function(e){e.scope&&e.scope.indexOf("offline_access")>=0&&(e.device=e.device||"Browser")},T.prototype._getUserInfo=function(e,t,r){if(!e||e.user_id)return r(null,e);var n=this._domain,o=E("https:",n,"/tokeninfo"),a=function(e,t){var n=new Error(e+": "+(t||""));n.error=e,n.error_description=t,r(n)};return this._useJSONP?f(o+"?"+s.stringify({id_token:t}),p,function(e,t){return e?a(0,e.toString()):200===t.status?r(null,t.user):a(t.status,t.err||t.error)}):c({url:h("https:",n)?"/tokeninfo":o,method:"post",type:"json",crossOrigin:!h("https:",n),data:{id_token:t}}).fail(function(e){a(e.status,e.responseText)}).then(function(e){r(null,e)})},T.prototype.getProfile=function(e,t){if("function"!=typeof t)throw new Error("A callback function is required");if(!e||"string"!=typeof e)return t(new Error("Invalid token"));this._getUserInfo(this.decodeJwt(e),e,t)},T.prototype.validateUser=function(e,t){var r=this._domain,n="/public/api/users/validate_userpassword",o=E("https:",r,n),a=u(e,{client_id:this._clientID,username:l(e.username||e.email||"")});if(this._useJSONP)return f(o+"?"+s.stringify(a),p,function(e,r){return e?t(e):"error"in r&&404!==r.status?t(new Error(r.error)):void t(null,200===r.status)});c({url:h("https:",r)?n:o,method:"post",type:"text",data:a,crossOrigin:!h("https:",r),error:function(e){if(404!==e.status)return t(new Error(e.responseText));t(null,!1)},success:function(e){t(null,200===e.status)}})},T.prototype.decodeJwt=function(e){var t=e&&e.split(".")[1];return m(n.decode(t))},T.prototype.parseHash=function(e){var t;if((e=e||window.location.hash).match(/error/))return e=e.substr(1).replace(/^\//,""),{error:(t=s.parse(e)).error,error_description:t.error_description};if(!e.match(/access_token/))return null;e=e.substr(1).replace(/^\//,"");var r=(t=s.parse(e)).id_token,n=t.refresh_token,o=this.decodeJwt(r),u=function(e){return{error:"invalid_token",error_description:e}},l=a(o.aud)?o.aud:[o.aud];return-1===i(l,this._clientID)?u("The clientID configured ("+this._clientID+") does not match with the clientID set in the token ("+l.join(", ")+")."):o.iss&&o.iss!=="https://"+this._domain+"/"?u("The domain configured (https://"+this._domain+"/) does not match with the domain set in the token ("+o.iss+")."):{profile:o,id_token:r,access_token:t.access_token,state:t.state,refresh_token:n}},T.prototype.signup=function(e,t){var r,n=this,o={client_id:this._clientID,redirect_uri:this._getCallbackURL(e),username:l(e.username||""),email:l(e.email||e.username||""),tenant:this._domain.split(".")[0]},a=u(this._getMode(e),e,o);function i(){return e.auto_login?n.login(e,t):"function"==typeof t?t():void 0}function d(e,n){var o=new g(e,n);if(r&&"function"==typeof r.kill&&r.kill(),"function"==typeof t)return t(o);throw o}this._configureOfflineMode(a),_(e,"sso")||(e.sso=!0),_(e,"auto_login")||(e.auto_login=!0),e.auto_login&&e.popup&&(!this._getCallbackOnLocationHash(e)||e.sso)&&(r=this._buildPopupWindow(e));var m=this._domain,y=E("https:",m,"/dbconnections/signup");if(this._useJSONP)return f(y+"?"+s.stringify(a),p,function(e,t){return e?d(0,e):200==t.status?i():d(t.status,t.err||t.error)});c({url:h("https:",m)?"/dbconnections/signup":y,method:"post",type:"html",data:a,success:i,crossOrigin:!h("https:",m),error:function(e){d(e.status,e.responseText)}})},T.prototype.changePassword=function(e,t){var r={tenant:this._domain.split(".")[0],client_id:this._clientID,connection:e.connection,username:l(e.username||""),email:l(e.email||e.username||""),password:e.password};function n(e,r){var n=new g(e,r);if(t)return t(n)}var o=this._domain,a="/dbconnections/change_password",i=E("https:",o,a);if(this._useJSONP)return f(i+"?"+s.stringify(r),p,function(e,r){return e?n(0,e):200==r.status?t(null,r.message):n(r.status,r.err||r.error)});c({url:h("https:",o)?a:i,method:"post",type:"html",data:r,crossOrigin:!h("https:",o),error:function(e){n(e.status,e.responseText)},success:function(e){t(null,e)}})},T.prototype._buildAuthorizeQueryString=function(e,t){var r=this._buildAuthorizationParameters(e,t);return s.stringify(r)},T.prototype._buildAuthorizationParameters=function(e,t){var r,n=u.apply(null,e);for(this._configureOfflineMode(n),this._sendClientInfo&&(n.auth0Client=this._getClientInfoString()),t=t||["popup","popupOptions"],r=0;r1&&(!e.sso||window.cordova))return this.loginWithResourceOwner(e,t);var r,n=this;if(e.popup&&!this._getCallbackOnLocationHash(e)&&(r=this._buildPopupWindow(e)),t&&t.length>1&&e.sso)return this.loginWithUsernamePasswordAndSSO(e,t);var o=u(this._getMode(e),e,{client_id:this._clientID,redirect_uri:this._getCallbackURL(e),username:l(e.username||e.email||""),tenant:this._domain.split(".")[0]});this._configureOfflineMode(o);var a=this._domain,i=E("https:",a,"/usernamepassword/login");if(this._useJSONP)return f(i+"?"+s.stringify(o),p,function(o,a){if(o)return r&&r.kill&&r.kill(),t(o);if("error"in a){r&&r.kill&&r.kill();var i=new g(a.status,a.error);return t(i)}n._renderAndSubmitWSFedForm(e,a.form)});function d(e){if(t)return t(e);throw e}c({url:h("https:",a)?"/usernamepassword/login":i,method:"post",type:"html",data:o,headers:this._getClientInfoHeader(),crossOrigin:!h("https:",a),success:function(t){n._renderAndSubmitWSFedForm(e,t)},error:function(e){r&&r.kill&&r.kill(),w(e,d)}})},T.prototype.loginWithPasscode=function(e,t){if(null==e.email&&null==e.phoneNumber)throw new Error("email or phoneNumber is required for authentication");if(null==e.passcode)throw new Error("passcode is required for authentication");if(e.connection=null==e.email?"sms":"email",!this._shouldRedirect)return delete(e=u(e,{username:null==e.email?e.phoneNumber:e.email,password:e.passcode,sso:!1})).email,delete e.phoneNumber,delete e.passcode,this.loginWithResourceOwner(e,t);var r={connection:e.connection};e.phoneNumber&&(e.phone_number=e.phoneNumber,delete e.phoneNumber,r.phone_number=e.phone_number),e.email&&(r.email=e.email),e.verification_code=e.passcode,delete e.passcode,r.verification_code=e.verification_code;var n=this;this._verify(r,function(r){if(r)return t(r);n._verify_redirect(e)})},T.prototype._verify=function(e,t){var r=this._domain,n=E("https:",r,"/passwordless/verify"),o=e;return this._useJSONP?(this._sendClientInfo&&(o.auth0Client=this._getClientInfoString()),f(n+"?"+s.stringify(o),p,function(e,r){return e?t(new Error("0: "+e.toString())):200===r.status?t(null,!0):t({status:r.status})})):c({url:h("https:",r)?"/passwordless/verify":n,method:"post",headers:this._getClientInfoHeader(),crossOrigin:!h("https:",r),data:o}).fail(function(e){try{t(JSON.parse(e.responseText))}catch(n){var r=new Error(e.status+"("+e.statusText+"): "+e.responseText);r.statusCode=e.status,r.error=e.statusText,r.message=e.responseText,t(r)}}).then(function(e){t(null,e)})},T.prototype._verify_redirect=function(e){var t=[this._getMode(e),e,{client_id:this._clientID,redirect_uri:this._getCallbackURL(e)}],r=this._buildAuthorizeQueryString(t),n=E("https:",this._domain,"/passwordless/verify_redirect?"+r);this._redirect(n)},T.prototype.renewIdToken=function(e,t){this.getDelegationToken({id_token:e,scope:"passthrough",api:"auth0"},t)},T.prototype.refreshToken=function(e,t){this.getDelegationToken({refresh_token:e,scope:"passthrough",api:"auth0"},t)},T.prototype.getDelegationToken=function(e,t){if(!(e=e||{}).id_token&&!e.refresh_token)throw new Error("You must send either an id_token or a refresh_token to get a delegation token.");var r=u({grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",client_id:this._clientID,target:e.targetClientId||this._clientID,api_type:e.api},e);delete r.hasOwnProperty,delete r.targetClientId,delete r.api;var n=this._domain,o=E("https:",n,"/delegation");if(this._useJSONP)return f(o+"?"+s.stringify(r),p,function(e,r){if(e)return t(e);if("error"in r){var n=new g(r.status,r.error_description||r.error);return t(n)}t(null,r)});c({url:h("https:",n)?"/delegation":o,method:"post",type:"json",data:r,crossOrigin:!h("https:",n),success:function(e){t(null,e)},error:function(e){try{t(JSON.parse(e.responseText))}catch(a){var r=e,n=10===v()||11===v(),o=!r.status||0===r.status;o&&!window.navigator.onLine?((r={}).status=0,r.responseText={code:"offline"}):o&&n?((r={}).status=401,r.responseText={code:"invalid_operation"}):o?((r={}).status=0,r.responseText={code:"connection_refused_timeout"}):r.responseText=e,t(new g(r.status,r.responseText))}}})},T.prototype.logout=function(e){var t=E("https:",this._domain,"/logout");e&&(t+="?"+s.stringify(e)),this._redirect(t)},T.prototype.getSSOData=function(e,t){"function"==typeof e&&(t=e,e=!1);var r={sso:!1},n=this._domain,o=E("https:",n,"/user/ssodata"),a=h("https:",n),i={};if(e&&(i={ldaps:1,client_id:this._clientID}),this._useJSONP){var l=u({},p,{timeout:3e3});return i.auth0Client=this._getClientInfoString(),o+="?"+s.stringify(i),f(o,l,function(e,n){t(null,e?r:n)})}c({url:a?"/user/ssodata":o,method:"get",type:"json",data:i,crossOrigin:!a,withCredentials:!a,timeout:3e3}).fail(function(e){new Error("There was an error in the request that obtains the user's country").cause=e,t(null,r)}).then(function(e){t(null,e)})},T.prototype.getConnections=function(e){return f("https://"+this._domain+"/public/api/"+this._clientID+"/connections",p,e)},T.prototype.startPasswordless=function(e,t){if("object"!=typeof e)throw new Error("An options object is required");if("function"!=typeof t)throw new Error("A callback function is required");if(!e.email&&!e.phoneNumber)throw new Error("An `email` or a `phoneNumber` is required.");var r=this._domain,n=E("https:",r,"/passwordless/start"),o={client_id:this._clientID};return e.email?(o.email=e.email,o.connection="email",e.authParams&&(o.authParams=e.authParams),e.send&&"link"!==e.send||(o.authParams||(o.authParams={}),o.authParams.redirect_uri=this._callbackURL,o.authParams.response_type=this._shouldRedirect&&!this._callbackOnLocationHash?"code":"token"),e.send&&(o.send=e.send)):(o.phone_number=e.phoneNumber,o.connection="sms"),this._useJSONP?(this._sendClientInfo&&(o.auth0Client=this._getClientInfoString()),f(n+"?"+s.stringify(o),p,function(e,r){return e?t(new Error("0: "+e.toString())):200===r.status?t(null,!0):t(r.err||r.error)})):c({url:h("https:",r)?"/passwordless/start":n,method:"post",type:"json",headers:this._getClientInfoHeader(),crossOrigin:!h("https:",r),data:o}).fail(function(e){try{t(JSON.parse(e.responseText))}catch(n){var r=new Error(e.status+"("+e.statusText+"): "+e.responseText);r.statusCode=e.status,r.error=e.statusText,r.message=e.responseText,t(r)}}).then(function(e){t(null,e)})},T.prototype.requestMagicLink=function(e,t){return this.startPasswordless(e,t)},T.prototype.requestEmailCode=function(e,t){return e.send="code",this.startPasswordless(e,t)},T.prototype.verifyEmailCode=function(e,t){return e.passcode=e.code,delete e.code,this.login(e,t)},T.prototype.requestSMSCode=function(e,t){return this.startPasswordless(e,t)},T.prototype.verifySMSCode=function(e,t){return e.passcode=e.code,delete e.code,this.login(e,t)},e.exports=T}).call(this,r(65))},function(e,t){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){var n=r(67);e.exports={encode:function(e){return n.btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},decode:function(e){return e=(e+=Array(5-e.length%4).join("=")).replace(/\-/g,"+").replace(/\_/g,"/"),n.atob(e)}}},function(e,t,r){!function(){var e=t,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n=function(){try{document.createElement("$")}catch(e){return e}}();e.btoa||(e.btoa=function(e){for(var t,o,a=0,i=r,s="";e.charAt(0|a)||(i="=",a%1);s+=i.charAt(63&t>>8-a%1*8)){if((o=e.charCodeAt(a+=.75))>255)throw n;t=t<<8|o}return s}),e.atob||(e.atob=function(e){if((e=e.replace(/=+$/,"")).length%4==1)throw n;for(var t,o,a=0,i=0,s="";o=e.charAt(i++);~o&&(t=a%4?64*t+o:o,a++%4)?s+=String.fromCharCode(255&t>>(-2*a&6)):0)o=r.indexOf(o);return s})}()},function(e,t){e.exports=function(e,t){if(!e[t])throw new Error(t+" is required.")}},function(e,t){var r=Object.prototype.toString;e.exports=null!=Array.isArray?Array.isArray:function(e){return"[object Array]"===r.call(e)}},function(e,t){e.exports=Array.prototype.indexOf?function(e,t,r){return e.indexOf(t,r)}:function(e,t,r){var n;if(null==e)throw new TypeError('"array" is null or not defined');var o=Object(e),a=o.length>>>0;if(0===a)return-1;var i=+r||0;Math.abs(i)===1/0&&(i=0);if(i>=a)return-1;n=Math.max(i>=0?i:a-Math.abs(i),0);for(;n2?arguments[2]:null;if(s===+s)for(o=0;o=0&&"[object Function]"===r.call(e.callee)),n}},function(e,t){e.exports=function(e){return null!==e&&("object"==typeof e||"function"==typeof e)}},function(e,t){(t=e.exports=function(e){return e.replace(/^\s*|\s*$/g,"")}).left=function(e){return e.replace(/^\s*/,"")},t.right=function(e){return e.replace(/\s*$/,"")}},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_RESULT__;
/*!
* Reqwest! A general purpose XHR connection manager
* license MIT (c) Dustin Diaz 2014
* https://github.com/ded/reqwest
- */!function(e,t,n){module.exports?module.exports=n():void 0===(__WEBPACK_AMD_DEFINE_RESULT__="function"==typeof(__WEBPACK_AMD_DEFINE_FACTORY__=n)?__WEBPACK_AMD_DEFINE_FACTORY__.call(exports,__webpack_require__,exports,module):__WEBPACK_AMD_DEFINE_FACTORY__)||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)}(0,0,function(){var win=window,doc=document,httpsRe=/^http/,protocolRe=/(^\w+):\/\//,twoHundo=/^(20\d|1223)$/,byTag="getElementsByTagName",readyState="readyState",contentType="Content-Type",requestedWith="X-Requested-With",head=doc[byTag]("head")[0],uniqid=0,callbackPrefix="reqwest_"+ +new Date,lastValue,xmlHttpRequest="XMLHttpRequest",xDomainRequest="XDomainRequest",noop=function(){},isArray="function"==typeof Array.isArray?Array.isArray:function(e){return e instanceof Array},defaultHeaders={contentType:"application/x-www-form-urlencoded",requestedWith:xmlHttpRequest,accept:{"*":"text/javascript, text/html, application/xml, text/xml, */*",xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript",js:"application/javascript, text/javascript"}},xhr=function(e){if(!0===e.crossOrigin){var t=win[xmlHttpRequest]?new XMLHttpRequest:null;if(t&&"withCredentials"in t)return t;if(win[xDomainRequest])return new XDomainRequest;throw new Error("Browser does not support cross-origin requests")}return win[xmlHttpRequest]?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")},globalSetupOptions={dataFilter:function(e){return e}};function succeed(e){var t=protocolRe.exec(e.url);return t=t&&t[1]||window.location.protocol,httpsRe.test(t)?twoHundo.test(e.request.status):!!e.request.response}function handleReadyState(e,t,n){return function(){return e._aborted?n(e.request):e._timedOut?n(e.request,"Request is aborted: timeout"):void(e.request&&4==e.request[readyState]&&(e.request.onreadystatechange=noop,succeed(e)?t(e.request):n(e.request)))}}function setHeaders(e,t){var n,r=t.headers||{};r.Accept=r.Accept||defaultHeaders.accept[t.type]||defaultHeaders.accept["*"];var o="function"==typeof FormData&&t.data instanceof FormData;for(n in t.crossOrigin||r[requestedWith]||(r[requestedWith]=defaultHeaders.requestedWith),r[contentType]||o||(r[contentType]=t.contentType||defaultHeaders.contentType),r)r.hasOwnProperty(n)&&"setRequestHeader"in e&&e.setRequestHeader(n,r[n])}function setCredentials(e,t){void 0!==t.withCredentials&&void 0!==e.withCredentials&&(e.withCredentials=!!t.withCredentials)}function generalCallback(e){lastValue=e}function urlappend(e,t){return e+(/\?/.test(e)?"&":"?")+t}function handleJsonp(e,t,n,r){var o=uniqid++,a=e.jsonpCallback||"callback",i=e.jsonpCallbackName||reqwest.getcallbackPrefix(o),s=new RegExp("((^|\\?|&)"+a+")=([^&]+)"),u=r.match(s),l=doc.createElement("script"),c=0,d=-1!==navigator.userAgent.indexOf("MSIE 10.0");return u?"?"===u[3]?r=r.replace(s,"$1="+i):i=u[3]:r=urlappend(r,a+"="+i),win[i]=generalCallback,l.type="text/javascript",l.src=r,l.async=!0,void 0===l.onreadystatechange||d||(l.htmlFor=l.id="_reqwest_"+o),l.onload=l.onreadystatechange=function(){if(l[readyState]&&"complete"!==l[readyState]&&"loaded"!==l[readyState]||c)return!1;l.onload=l.onreadystatechange=null,l.onclick&&l.onclick(),t(lastValue),lastValue=void 0,head.removeChild(l),c=1},head.appendChild(l),{abort:function(){l.onload=l.onreadystatechange=null,n({},"Request is aborted: timeout",{}),lastValue=void 0,head.removeChild(l),c=1}}}function getRequest(e,t){var n,r=this.o,o=(r.method||"GET").toUpperCase(),a="string"==typeof r?r:r.url,i=!1!==r.processData&&r.data&&"string"!=typeof r.data?reqwest.toQueryString(r.data):r.data||null,s=!1;return"jsonp"!=r.type&&"GET"!=o||!i||(a=urlappend(a,i),i=null),"jsonp"==r.type?handleJsonp(r,e,t,a):((n=r.xhr&&r.xhr(r)||xhr(r)).open(o,a,!1!==r.async),setHeaders(n,r),setCredentials(n,r),win[xDomainRequest]&&n instanceof win[xDomainRequest]?(n.onload=e,n.onerror=t,n.onprogress=function(){},s=!0):n.onreadystatechange=handleReadyState(this,e,t),r.before&&r.before(n),s?setTimeout(function(){n.send(i)},200):n.send(i),n)}function Reqwest(e,t){this.o=e,this.fn=t,init.apply(this,arguments)}function setType(e){return e.match("json")?"json":e.match("javascript")?"js":e.match("text")?"html":e.match("xml")?"xml":void 0}function init(o,fn){this.url="string"==typeof o?o:o.url,this.timeout=null,this._fulfilled=!1,this._successHandler=function(){},this._fulfillmentHandlers=[],this._errorHandlers=[],this._completeHandlers=[],this._erred=!1,this._responseArgs={};var self=this;function complete(e){for(o.timeout&&clearTimeout(self.timeout),self.timeout=null;self._completeHandlers.length>0;)self._completeHandlers.shift()(e)}function success(resp){var type=o.type||resp&&setType(resp.getResponseHeader("Content-Type"));resp="jsonp"!==type?self.request:resp;var filteredResponse=globalSetupOptions.dataFilter(resp.responseText,type),r=filteredResponse;try{resp.responseText=r}catch(e){}if(r)switch(type){case"json":try{resp=win.JSON?win.JSON.parse(r):eval("("+r+")")}catch(e){return error(resp,"Could not parse JSON in response",e)}break;case"js":resp=eval(r);break;case"html":resp=r;break;case"xml":resp=resp.responseXML&&resp.responseXML.parseError&&resp.responseXML.parseError.errorCode&&resp.responseXML.parseError.reason?null:resp.responseXML}for(self._responseArgs.resp=resp,self._fulfilled=!0,fn(resp),self._successHandler(resp);self._fulfillmentHandlers.length>0;)resp=self._fulfillmentHandlers.shift()(resp);complete(resp)}function timedOut(){self._timedOut=!0,self.request.abort()}function error(e,t,n){for(e=self.request,self._responseArgs.resp=e,self._responseArgs.msg=t,self._responseArgs.t=n,self._erred=!0;self._errorHandlers.length>0;)self._errorHandlers.shift()(e,t,n);complete(e)}fn=fn||function(){},o.timeout&&(this.timeout=setTimeout(function(){timedOut()},o.timeout)),o.success&&(this._successHandler=function(){o.success.apply(o,arguments)}),o.error&&this._errorHandlers.push(function(){o.error.apply(o,arguments)}),o.complete&&this._completeHandlers.push(function(){o.complete.apply(o,arguments)}),this.request=getRequest.call(this,success,error)}function reqwest(e,t){return new Reqwest(e,t)}function normalize(e){return e?e.replace(/\r?\n/g,"\r\n"):""}function serial(e,t){var n,r,o,a,i=e.name,s=e.tagName.toLowerCase(),u=function(e){e&&!e.disabled&&t(i,normalize(e.attributes.value&&e.attributes.value.specified?e.value:e.text))};if(!e.disabled&&i)switch(s){case"input":/reset|button|image|file/i.test(e.type)||(n=/checkbox/i.test(e.type),r=/radio/i.test(e.type),o=e.value,(!n&&!r||e.checked)&&t(i,normalize(n&&""===o?"on":o)));break;case"textarea":t(i,normalize(e.value));break;case"select":if("select-one"===e.type.toLowerCase())u(e.selectedIndex>=0?e.options[e.selectedIndex]:null);else for(a=0;e.length&&a-1&&null!==new RegExp("rv:([0-9]{2,2}[.0-9]{0,})").exec(t)&&(e=parseFloat(RegExp.$1));return e>=8}();return"undefined"!=typeof window&&window.JSON&&window.JSON.stringify&&window.JSON.parse&&window.postMessage?{open:function(i,s){if(!s)throw"missing required callback argument";var u,l;i.url||(u="missing required 'url' parameter"),i.relay_url||(u="missing required 'relay_url' parameter"),u&&setTimeout(function(){s(u)},0),i.window_name||(i.window_name=null),i.window_features&&!function(){try{var e=navigator.userAgent;return-1!=e.indexOf("Fennec/")||-1!=e.indexOf("Firefox/")&&-1!=e.indexOf("Android")}catch(e){}return!1}()||(i.window_features=void 0);var c,d=o(i.url);if(d!==o(i.relay_url))return setTimeout(function(){s("invalid arguments: origin of url and relay_url must match")},0);a&&((l=document.createElement("iframe")).setAttribute("src",i.relay_url),l.style.display="none",l.setAttribute("name",e),document.body.appendChild(l),c=l.contentWindow);var f=i.popup||window.open(i.url,i.window_name,i.window_features);i.popup&&(f.location.href=i.url),c||(c=f);var p=setInterval(function(){f&&f.closed&&(m(),s&&(s("User closed the popup window"),s=null))},500),h=JSON.stringify({a:"request",d:i.params});function m(){if(l&&document.body.removeChild(l),l=void 0,p&&(p=clearInterval(p)),r(window,"message",g),r(window,"unload",m),f)try{f.close()}catch(e){c.postMessage(t,d)}f=c=void 0}function g(e){if(e.origin===d)try{var t=JSON.parse(e.data);"ready"===t.a?c.postMessage(h,d):"error"===t.a?(m(),s&&(s(t.d),s=null)):"response"===t.a&&(m(),s&&(s(null,t.d),s=null))}catch(e){}}return n(window,"unload",m),n(window,"message",g),{close:m,focus:function(){if(f)try{f.focus()}catch(e){}}}},onOpen:function(o){var i="*",s=a?function(){window.location;for(var t=window.opener.frames,n=t.length-1;n>=0;n--)try{if(t[n].location.protocol===window.location.protocol&&t[n].location.host===window.location.host&&t[n].name===e)return t[n]}catch(e){}}():window.opener;if(!s)throw"can't find relay frame";function u(e){e=JSON.stringify(e),a?s.doPost(e,i):s.postMessage(e,i)}function l(e){if(e.data===t)try{window.close()}catch(e){}}n(a?s:window,"message",function e(t){var n;try{n=JSON.parse(t.data)}catch(e){}n&&"request"===n.a&&(r(window,"message",e),i=t.origin,o&&setTimeout(function(){o(i,n.d,function(e){o=void 0,u({a:"response",d:e})})},0))}),n(a?s:window,"message",l);try{u({a:"ready"})}catch(e){n(s,"load",function(e){u({a:"ready"})})}var c=function(){try{r(a?s:window,"message",l)}catch(e){}o&&u({a:"error",d:"client closed window"}),o=void 0;try{window.close()}catch(e){}};return n(window,"unload",c),{detach:function(){r(window,"unload",c)}}}}:{open:function(e,t,n,r){setTimeout(function(){r("unsupported browser")},0)},onOpen:function(e){setTimeout(function(){e("unsupported browser")},0)}}}();e.exports&&(e.exports=r)},function(e,t,n){var r=n(81)("jsonp");e.exports=function(e,t,n){"function"==typeof t&&(n=t,t={});t||(t={});var i,s,u=t.prefix||"__jp",l=t.param||"callback",c=null!=t.timeout?t.timeout:6e4,d=encodeURIComponent,f=document.getElementsByTagName("script")[0]||document.head,p=u+o++;c&&(s=setTimeout(function(){h(),n&&n(new Error("Timeout"))},c));function h(){i.parentNode.removeChild(i),window[p]=a}window[p]=function(e){r("jsonp got",e),s&&clearTimeout(s),h(),n&&n(null,e)},e=(e+=(~e.indexOf("?")?"&":"?")+l+"="+d(p)).replace("?&","?"),r('jsonp req "%s"',e),(i=document.createElement("script")).src=e,f.parentNode.insertBefore(i,f)};var o=0;function a(){}},function(e,t,n){(function(r){t.log=function(...e){return"object"==typeof console&&console.log&&console.log(...e)},t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&"%c"===e&&(o=++r)}),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&void 0!==r&&"env"in r&&(e=Object({BABEL_ENV:"production",NODE_ENV:"production"}).DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=n(83)(t);const{formatters:o}=e.exports;o.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,n(82))},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var u,l=[],c=!1,d=-1;function f(){c&&u&&(c=!1,u.length?l=u.concat(l):d=-1,l.length&&p())}function p(){if(!c){var e=s(f);c=!0;for(var t=l.length;t;){for(u=l,l=[];++d1)for(var n=1;n{if("%%"===n)return n;s++;const a=r.formatters[o];if("function"==typeof a){const r=e[s];n=a.call(t,r),e.splice(s,1),s--}return n}),r.formatArgs.call(t,e),(t.log||r.log).apply(t,e)}return i.namespace=e,i.enabled=r.enabled(e),i.useColors=r.useColors(),i.color=t(e),i.destroy=o,i.extend=a,"function"==typeof r.init&&r.init(i),r.instances.push(i),i}function o(){const e=r.instances.indexOf(this);return-1!==e&&(r.instances.splice(e,1),!0)}function a(e,t){return r(this.namespace+(void 0===t?":":t)+e)}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return r.debug=r,r.default=r,r.coerce=function(e){return e instanceof Error?e.stack||e.message:e},r.disable=function(){const e=[...r.names.map(i),...r.skips.map(i).map(e=>"-"+e)].join(",");return r.enable(""),e},r.enable=function(e){let t;r.save(e),r.names=[],r.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(t=0;t{r[t]=e[t]}),r.instances=[],r.names=[],r.skips=[],r.formatters={},r.selectColor=t,r.enable(r.load()),r}},function(e,t){var n=1e3,r=60*n,o=60*r,a=24*o,i=7*a,s=365.25*a;function u(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,t){t=t||{};var l=typeof e;if("string"===l&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var u=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*s;case"weeks":case"week":case"w":return u*i;case"days":case"day":case"d":return u*a;case"hours":case"hour":case"hrs":case"hr":case"h":return u*o;case"minutes":case"minute":case"mins":case"min":case"m":return u*r;case"seconds":case"second":case"secs":case"sec":case"s":return u*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(e);if("number"===l&&!1===isNaN(e))return t.long?function(e){var t=Math.abs(e);if(t>=a)return u(e,t,a,"day");if(t>=o)return u(e,t,o,"hour");if(t>=r)return u(e,t,r,"minute");if(t>=n)return u(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=a)return Math.round(e/a)+"d";if(t>=o)return Math.round(e/o)+"h";if(t>=r)return Math.round(e/r)+"m";if(t>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t){var n=window.location.protocol,r=window.location.hostname,o=window.location.port;e.exports=function(e,t,a){return a=a||"",n===e&&r===t&&o===a}},function(module,exports){var JSON={};!function(){"use strict";function f(e){return e<10?"0"+e:e}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(e){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(e){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var n,r,o,a,i,s=gap,u=t[e];switch(u&&"object"==typeof u&&"function"==typeof u.toJSON&&(u=u.toJSON(e)),"function"==typeof rep&&(u=rep.call(t,e,u)),typeof u){case"string":return quote(u);case"number":return isFinite(u)?String(u):"null";case"boolean":case"null":return String(u);case"object":if(!u)return"null";if(gap+=indent,i=[],"[object Array]"===Object.prototype.toString.apply(u)){for(a=u.length,n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t={tokenV2:s.default.get(o.auth,"tokenV2"),tokenV3:s.default.get(o.auth,"tokenV3")}).tokenV3){e.next=8;break}return t.user=(0,u.decodeToken)(t.tokenV3),n=c.default.auth.loadProfile(t.tokenV3),e.next=6,l.redux.resolveAction(n);case 6:return n=e.sent,e.abrupt("return",h(p(t,n)));case 8:return e.abrupt("return",h(t));case 9:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),f(n(0))),u=n(17),l=n(8),c=f(n(28)),d=f(n(25));function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){return(0,i.default)({},e,{authenticating:!1,profile:t.payload})}function h(e){var t;return l.redux.handleActions((t={},(0,a.default)(t,c.default.auth.loadProfile,p),(0,a.default)(t,c.default.auth.setTcTokenV2,function(e,t){return(0,i.default)({},e,{tokenV2:t.payload})}),(0,a.default)(t,c.default.auth.setTcTokenV3,function(e,t){var n=t.payload;return(0,i.default)({},e,{tokenV3:n,user:n?(0,u.decodeToken)(n):null})}),(0,a.default)(t,"COMMUNITY_ACTIONS/TC_COMMUNITY/JOIN_DONE",function(e,t){var n=t.payload;return(0,i.default)({},e,{profile:(0,i.default)({},e.profile,{groups:e.profile.groups.concat({id:n.groupId.toString()})})})}),(0,a.default)(t,d.default.profile.uploadPhotoDone,function(e,t){var n=t.payload;return t.error?e:e.profile&&e.profile.handle===n.handle?(0,i.default)({},e,{profile:(0,i.default)({},e.profile,{photoURL:n.photoURL})}):e}),(0,a.default)(t,d.default.profile.deletePhotoDone,function(e,t){var n=t.payload;return t.error?e:e.profile&&e.profile.handle===n.handle?(0,i.default)({},e,{profile:(0,i.default)({},e.profile,{photoURL:null})}):e}),(0,a.default)(t,d.default.profile.updateProfileDone,function(e,t){var n=t.payload;return t.error?e:e.profile&&e.profile.handle===n.handle?(0,i.default)({},e,{profile:(0,i.default)({},e.profile,n)}):e}),t),s.default.defaults(e,{authenticating:!0,profile:null,tokenV2:"",tokenV3:"",user:null}))}t.default=h()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(1)),o=d(n(6)),a=d(n(3));t.factory=function(){return r.default.resolve(h())};var i=d(n(0)),s=n(2),u=d(n(11)),l=d(n(31)),c=n(12);function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){var n=t.payload,r=n.community,s=n.uuid,u=e.communities[r];return(u=u?i.default.clone(u):{}).loadingUuid=s,(0,a.default)({},e,{communities:(0,a.default)({},e.communities,(0,o.default)({},r,u))})}function p(e,t){var n=t.error,r=t.payload;if(n)return u.default.error("Failed to load community stats",r),(0,c.fireErrorMessage)("Failed to load community stats",""),e;var s=r.community,l=r.stats,d=r.uuid;return i.default.get(e.communities[s],"loadingUuid")!==d?e:(0,a.default)({},e,{communities:(0,a.default)({},e.communities,(0,o.default)({},s,{data:l,timestamp:Date.now()}))})}function h(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=l.default.stats;return(0,s.handleActions)((e={},(0,o.default)(e,n.getCommunityStatsInit,f),(0,o.default)(e,n.getCommunityStatsDone,p),e),i.default.defaults(i.default.clone(t),{communities:{}}))}t.default=h()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(1)),o=c(n(6)),a=c(n(3));t.factory=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=i.default.get(e,"terms.entity.type"),n=i.default.get(e,"terms.entity.id");if(t&&n){var o=e.terms.entity,a={tokenV2:i.default.get(e.auth,"tokenV2"),tokenV3:i.default.get(e.auth,"tokenV3")};return s.redux.resolveAction(l.default.terms.getTermsDone(o,a)).then(function(e){var t=p({},l.default.terms.getTermsInit(o));return v(t=f(t,e))})}return r.default.resolve(v())};var i=c(n(0)),s=n(8),u=c(n(11)),l=c(n(33));function c(e){return e&&e.__esModule?e:{default:e}}function d(e){return i.default.sortBy(e,function(e){return e.agreed?0:1})}function f(e,t){return t.error?(u.default.error("Failed to get terms!",t.payload),(0,a.default)({},e,{terms:[],getTermsFailure:t.error,loadingTermsForEntity:null})):i.default.isEqual(t.payload.entity,e.loadingTermsForEntity)?(0,a.default)({},e,{entity:t.payload.entity,terms:d(t.payload.terms),getTermsFailure:!1,loadingTermsForEntity:null}):e}function p(e,t){return(0,a.default)({},e,{getTermsFailure:!1,loadingTermsForEntity:t.payload,terms:[],entity:t.payload})}function h(e,t){if(t.error)return u.default.error("Check terms status failed!",t.payload),(0,a.default)({},e,{checkingStatus:!1,checkStatusError:t.payload,canRegister:!1});var n=i.default.every(t.payload,"agreed"),r=i.default.find(t.payload,function(e){return!e.agreed});return(0,a.default)({},e,{checkingStatus:!1,checkStatusError:!1,canRegister:n,terms:d(t.payload),selectedTerm:r})}function m(e,t){return t.error?(u.default.error("Failed to get term details!",t.payload),(0,a.default)({},e,{details:null,getTermDetailsFailure:t.payload,loadingDetailsForTermId:""})):i.default.toString(t.payload.termId)!==e.loadingDetailsForTermId?e:(0,a.default)({},e,t.payload,{getTermDetailsFailure:!1,loadingDetailsForTermId:""})}function g(e,t){return t.error?(u.default.error("Failed to get docu sign url!",t.payload),(0,a.default)({},e,{docuSignUrl:"",getDocuSignUrlFailure:t.payload,loadingDocuSignUrl:""})):i.default.toString(t.payload.templateId)!==e.loadingDocuSignUrl?e:(0,a.default)({},e,t.payload,{getDocuSignUrlFailure:!1,loadingDocuSignUrl:""})}function y(e,t){if(t.error)return u.default.error("Failed to agree term!",t.payload),(0,a.default)({},e,{agreeTermFailure:t.payload,agreeingTerm:""});if(i.default.toString(t.payload.termId)!==e.agreeingTerm)return e;if(t.payload.success){var n=i.default.cloneDeep(e.terms);i.default.find(n,["termsOfUseId",t.payload.termId]).agreed=!0;var r=i.default.find(n,function(e){return!e.agreed});return(0,a.default)({},e,{terms:n,selectedTerm:r,agreeTermFailure:!1,agreeingTerm:""})}return(0,a.default)({},e,{agreeTermFailure:!1,agreeingTerm:""})}function v(e){var t;return s.redux.handleActions((t={},(0,o.default)(t,l.default.terms.getTermsInit,p),(0,o.default)(t,l.default.terms.getTermsDone,f),(0,o.default)(t,l.default.terms.getTermDetailsInit,function(e,t){var n=t.payload;return(0,a.default)({},e,{getTermDetailsFailure:!1,loadingDetailsForTermId:n,details:null,termId:n})}),(0,o.default)(t,l.default.terms.getTermDetailsDone,m),(0,o.default)(t,l.default.terms.getDocuSignUrlInit,function(e,t){var n=t.payload;return(0,a.default)({},e,{getDocuSignUrlFailure:!1,loadingDocuSignUrl:n,docuSignUrl:"",templateId:n})}),(0,o.default)(t,l.default.terms.getDocuSignUrlDone,g),(0,o.default)(t,l.default.terms.agreeTermInit,function(e,t){var n=t.payload;return(0,a.default)({},e,{agreeTermFailure:!1,agreeingTerm:n})}),(0,o.default)(t,l.default.terms.agreeTermDone,y),(0,o.default)(t,l.default.terms.checkStatusInit,function(e){return(0,a.default)({},e,{checkingStatus:!0})}),(0,o.default)(t,l.default.terms.checkStatusDone,h),t),i.default.defaults(e,{terms:[],selectedTerm:null}))}t.default=v()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(1)),o=f(n(6)),a=f(n(3));t.factory=function(){return r.default.resolve(w())};var i=f(n(0)),s=n(2),u=n(17),l=f(n(36)),c=f(n(11)),d=n(12);function f(e){return e&&e.__esModule?e:{default:e}}var p="Cannot get user projects without auth token";function h(e){return(0,a.default)({},e,{loadingProjectDetailsForId:0,loadingProjectsForUsername:"",projectDetails:{},projects:[]})}function m(e,t){var n=t.payload;return(0,a.default)({},e,{loadingProjectDetailsForId:n})}function g(e,t){var n=t.error,r=t.payload;if(n)throw c.default.error("Failed to load project details",r),r;return r.project.projectId!==e.loadingProjectDetailsForId?e:(0,a.default)({},e,{loadingProjectDetailsForId:0,projectDetails:r})}function y(e,t){var n=t.payload,r=(0,a.default)({},e.projectPermissions,{loadingForProjectId:n});return(0,a.default)({},e,{projectPermissions:r})}function v(e,t){var n=t.error,r=t.payload;n&&((0,d.fireErrorMessage)("Failed to load project permissions",""),c.default.error("Failed to load project permissions",r));var o=r.permissions,i=r.projectId;if(i!==e.projectPermissions.loadingForProjectId)return e;var s={loadingForProjectId:0,permissions:o,projectId:i,timestamp:Date.now()};return(0,a.default)({},e,{projectPermissions:s})}function b(e,t){var n=t.payload;if(!n)throw c.default.error(p),new Error(p);return(0,a.default)({},e,{loadingProjectsForUsername:(0,u.decodeToken)(n).handle})}function _(e,t){var n=t.error,r=t.payload;if(n)throw c.default.error(r),r;var o=r.projects,i=r.tokenV3;if(!i)throw c.default.error(p),new Error(p);return(0,u.decodeToken)(i).handle!==e.loadingProjectsForUsername?e:(0,a.default)({},e,{loadingProjectsForUsername:"",projects:o.sort(function(e,t){return e.name.localeCompare(t.name)})})}function w(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=l.default.direct;return(0,s.handleActions)((e={},(0,o.default)(e,n.dropAll,h),(0,o.default)(e,n.getProjectDetailsInit,m),(0,o.default)(e,n.getProjectDetailsDone,g),(0,o.default)(e,n.getProjectPermissionsInit,y),(0,o.default)(e,n.getProjectPermissionsDone,v),(0,o.default)(e,n.getUserProjectsInit,b),(0,o.default)(e,n.getUserProjectsDone,_),e),i.default.defaults(t,{loadingProjectDetailsForId:0,loadingProjectsForUsername:"",projectDetails:{},projectPermissions:{loadingForProjectId:0,permissions:[],projectId:0,timestamp:0},projects:[]}))}t.default=w()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(1)),o=c(n(6)),a=c(n(104)),i=c(n(3));t.factory=function(){return r.default.resolve(h())};var s=c(n(0)),u=n(2),l=c(n(38));function c(e){return e&&e.__esModule?e:{default:e}}function d(e){return(0,i.default)({},e,{groups:{},loading:{}})}function f(e,t){var n=t.payload,r=s.default.isArray(n)?n:[n],o=s.default.clone(e.loading);return r.forEach(function(e){o[e]=!0}),(0,i.default)({},e,{loading:o})}function p(e,t){var n=s.default.clone(e.groups),r=s.default.clone(e.loading),o=t.payload;return(0,a.default)(o).forEach(function(e){var t=e.id;r[t]&&(!function e(t,n,r){var o=n[r];t[r]=o,o.subGroupIds&&o.subGroupIds.forEach(function(r){return e(t,n,r)})}(n,o,t),delete r[t])}),(0,i.default)({},e,{groups:n,loading:r})}function h(e){var t,n=l.default.groups;return(0,u.handleActions)((t={},(0,o.default)(t,n.dropGroups,d),(0,o.default)(t,n.getGroupsInit,f),(0,o.default)(t,n.getGroupsDone,p),t),s.default.defaults(e?s.default.clone(e):{},{groups:{},loading:{}}))}t.default=h()},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__104__},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=f(n(1)),a=f(n(19)),i=f(n(3)),s=f(n(6));t.factory=function(){return o.default.resolve(h())};var u=f(n(0)),l=n(2),c=f(n(21)),d=n(12);function f(e){return e&&e.__esModule?e:{default:e}}var p=(r={},(0,s.default)(r,d.ERROR_ICON_TYPES.NETWORK,[]),(0,s.default)(r,d.ERROR_ICON_TYPES.API,[]),r);function h(e){var t,n=c.default.errors;return(0,l.handleActions)((t={},(0,s.default)(t,n.clearError,function(e){return(0,i.default)({},e,{alerts:e.alerts.slice(1)})}),(0,s.default)(t,n.newError,function(e,t){var n=t.payload;return(0,i.default)({},e,{alerts:[].concat((0,a.default)(e.alerts),[{title:n.title,details:n.details}])})}),(0,s.default)(t,n.clearAllErrorIcons,function(e){return(0,i.default)({},e,{icons:p})}),(0,s.default)(t,n.setErrorIcon,function(e,t){var n=t.payload,r=n.id,o=n.title,u=n.message;return(0,i.default)({},e,{icons:(0,i.default)({},e.icons,(0,s.default)({},r,[].concat((0,a.default)(e.icons[r]),[{title:o,message:u}])))})}),(0,s.default)(t,n.clearErrorIcon,function(e,t){var n=t.payload.id;return(0,i.default)({},e,{icons:(0,i.default)({},e.icons,(0,s.default)({},n,[]))})}),t),u.default.defaults(e,{alerts:[],icons:p}))}t.default=h()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=m(n(16)),o=m(n(1)),a=m(n(6)),i=m(n(3));t.factory=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={tokenV2:s.default.get(e.auth,"tokenV2"),tokenV3:s.default.get(e.auth,"tokenV3")},n={},a=s.default.get(e,"challenge.challengeDetails.id"),u=s.default.get(e,"challenge.challengeDetails.mySubmission");if(a&&!u)return l.redux.resolveAction(c.default.challenge.getDetailsDone(a,t.tokenV3,t.tokenV2)).then(function(e){var n=s.default.get(e,"payload.track","").toLowerCase(),r="design"===n?l.redux.resolveAction(c.default.challenge.fetchCheckpointsDone(t.tokenV2,a)):null,i="COMPLETED"===s.default.get(e,"payload.status","")?l.redux.resolveAction(c.default.challenge.loadResultsDone(t,a,n)):null;return o.default.all([e,r,i])}).then(function(e){var t=(0,r.default)(e,3),o=t[0],s=t[1],u=t[2];return n=y(n=(0,i.default)({},n,{loadingCheckpoints:!0,loadingDetailsForChallengeId:a,loadingResultsForChallengeId:a}),o),s&&(n=_(n,s)),u&&(n=E(n,u)),n}).then(function(e){return l.redux.combineReducers(O(e),{mySubmissionsManagement:h.default})});if(a&&u)return o.default.all([l.redux.resolveAction(c.default.challenge.getDetailsDone(a,t.tokenV3,t.tokenV2)),l.redux.resolveAction(c.default.challenge.getSubmissionsDone(a,t.tokenV2))]).then(function(e){var t=(0,r.default)(e,2),o=t[0],s=t[1];return b(n=y(n=(0,i.default)({},n,{loadingSubmissionsForChallengeId:a,loadingDetailsForChallengeId:a}),o),s)}).then(function(e){return l.redux.combineReducers(O(e),{mySubmissionsManagement:h.default})});return o.default.resolve(l.redux.combineReducers(O(n),{mySubmissionsManagement:h.default}))};var s=m(n(0)),u=n(2),l=n(8),c=m(n(39)),d=m(n(22)),f=m(n(11)),p=n(12),h=m(n(50));function m(e){return e&&e.__esModule?e:{default:e}}function g(e,t){var n=t.payload;return e.details&&s.default.toString(e.details.id)!==n?(0,i.default)({},e,{fetchChallengeFailure:!1,loadingDetailsForChallengeId:n,details:null}):(0,i.default)({},e,{fetchChallengeFailure:!1,loadingDetailsForChallengeId:n})}function y(e,t){if(t.error)return f.default.error("Failed to get challenge details!",t.payload),(0,p.fireErrorMessage)("ERROR: Failed to load the challenge","Please, try again a bit later"),(0,i.default)({},e,{fetchChallengeFailure:t.error,loadingDetailsForChallengeId:""});var n=t.payload;return s.default.toString(n.id)!==e.loadingDetailsForChallengeId?e:(0,i.default)({},e,{details:n,fetchChallengeFailure:!1,loadingDetailsForChallengeId:""})}function v(e,t){return(0,i.default)({},e,{loadingSubmissionsForChallengeId:t.payload,mySubmissions:{challengeId:"",v2:null}})}function b(e,t){if(t.error)return f.default.error("Failed to get user's submissions for the challenge",t.payload),(0,i.default)({},e,{loadingSubmissionsForChallengeId:"",mySubmissions:{challengeId:"",v2:null}});var n=t.payload,r=n.challengeId,o=n.submissions;return r!==e.loadingSubmissionsForChallengeId?e:(0,i.default)({},e,{loadingSubmissionsForChallengeId:"",mySubmissions:{challengeId:r,v2:o}})}function _(e,t){return t.error?(0,i.default)({},e,{loadingCheckpoints:!1}):e.details&&e.details.id===t.payload.challengeId?(0,i.default)({},e,{checkpoints:t.payload.checkpoints,loadingCheckpoints:!1}):e}function w(e,t){var n=t.payload;return(0,i.default)({},e,{loadingResultsForChallengeId:n})}function E(e,t){return t.payload.challengeId!==e.loadingResultsForChallengeId?e:t.error?(f.default.error(t.payload),(0,i.default)({},e,{loadingResultsForChallengeId:"",results:null,resultsLoadedForChallengeId:""})):(0,i.default)({},e,{loadingResultsForChallengeId:"",results:t.payload.results,resultsLoadedForChallengeId:t.payload.challengeId})}function T(e,t){return t.error?(f.default.error("Failed to register for the challenge!",t.payload),(0,p.fireErrorMessage)("ERROR: Failed to register for the challenge!"),(0,i.default)({},e,{registering:!1})):y((0,i.default)({},e,{registering:!1,loadingDetailsForChallengeId:s.default.toString(e.details.id)}),t)}function C(e,t){return t.error?(f.default.error("Failed to register for the challenge!",t.payload),(0,p.fireErrorMessage)("ERROR: Failed to unregister for the challenge!"),(0,i.default)({},e,{unregistering:!1})):y((0,i.default)({},e,{unregistering:!1,loadingDetailsForChallengeId:s.default.toString(e.details.id)}),t)}function S(e,t){var n=t.payload;return(0,i.default)({},e,{updatingChallengeUuid:n})}function I(e,t){var n=t.error,r=t.payload;if(n)return(0,p.fireErrorMessage)("Failed to save the challenge!",""),f.default.error("Failed to save the challenge",r),e;if(r.uuid!==e.updatingChallengeUuid)return e;var o=s.default.pick(r.res,["detailedRequirements","introduction","round1Introduction","round2Introduction","submissionGuidelines"]);return(0,i.default)({},e,{details:(0,i.default)({},e.details,o),updatingChallengeUuid:""})}function k(e,t){var n=t.payload;return t.error?((0,p.fireErrorMessage)("Failed to get active challenges count!",""),f.default.error("Failed to get active challenges count",n),e):(0,i.default)({},e,{activeChallengesCount:n})}function O(e){var t,n=c.default.challenge;return(0,u.handleActions)((t={},(0,a.default)(t,n.dropCheckpoints,function(e){return(0,i.default)({},e,{checkpoints:null})}),(0,a.default)(t,n.dropResults,function(e){return(0,i.default)({},e,{results:null})}),(0,a.default)(t,n.getDetailsInit,g),(0,a.default)(t,n.getDetailsDone,y),(0,a.default)(t,n.getSubmissionsInit,v),(0,a.default)(t,n.getSubmissionsDone,b),(0,a.default)(t,d.default.smp.deleteSubmissionDone,function(e,t){var n=t.payload;return(0,i.default)({},e,{mySubmissions:(0,i.default)({},e.mySubmissions,{v2:e.mySubmissions.v2.filter(function(e){return e.submissionId!==n})})})}),(0,a.default)(t,n.registerInit,function(e){return(0,i.default)({},e,{registering:!0})}),(0,a.default)(t,n.registerDone,T),(0,a.default)(t,n.unregisterInit,function(e){return(0,i.default)({},e,{unregistering:!0})}),(0,a.default)(t,n.unregisterDone,C),(0,a.default)(t,n.loadResultsInit,w),(0,a.default)(t,n.loadResultsDone,E),(0,a.default)(t,n.fetchCheckpointsInit,function(e){return(0,i.default)({},e,{checkpoints:null,loadingCheckpoints:!0})}),(0,a.default)(t,n.fetchCheckpointsDone,_),(0,a.default)(t,n.updateChallengeInit,S),(0,a.default)(t,n.updateChallengeDone,I),(0,a.default)(t,n.getActiveChallengesCountInit,function(e){return e}),(0,a.default)(t,n.getActiveChallengesCountDone,k),t),s.default.defaults(e,{details:null,loadingCheckpoints:!1,loadingDetailsForChallengeId:"",loadingResultsForChallengeId:"",mySubmissions:{},checkpoints:null,registering:!1,results:null,resultsLoadedForChallengeId:"",unregistering:!1,updatingChallengeUuid:""}))}t.default=l.redux.combineReducers(O(),{mySubmissionsManagement:h.default})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(1)),o=f(n(6)),a=f(n(19)),i=f(n(3));t.factory=function(){return r.default.resolve(U())};var s=f(n(0)),u=n(2),l=f(n(25)),c=f(n(11)),d=n(12);function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){var n=t.payload;return t.error?(0,i.default)({},e,{loadingError:!0}):(0,i.default)({},e,{achievements:n.Achievements,copilot:n.copilot,country:n.country,loadingError:!1})}function h(e,t){var n=t.payload;return t.error?(0,i.default)({},e,{loadingError:!0}):(0,i.default)({},e,{externalAccounts:n})}function m(e,t){var n=t.payload;return t.error?(0,i.default)({},e,{loadingError:!0}):(0,i.default)({},e,{externalLinks:n})}function g(e,t){var n=t.payload;return t.error?(0,i.default)({},e,{loadingError:!0}):(0,i.default)({},e,{info:n,loadingError:!1})}function y(e,t){var n=t.payload;return t.error?(0,i.default)({},e,{loadingError:!0}):(0,i.default)({},e,{skills:n.skills,loadingError:!1})}function v(e,t){var n=t.payload;return t.error?(0,i.default)({},e,{loadingError:!0}):(0,i.default)({},e,{stats:n,loadingError:!1})}function b(e,t){var n=t.payload;return t.error?(0,i.default)({},e,{loadingError:!0}):(0,i.default)({},e,{linkedAccounts:n.profiles,loadingError:!1})}function _(e,t){var n=t.payload;return t.error?(0,i.default)({},e,{loadingError:!0}):(0,i.default)({},e,{credential:n.credential,loadingError:!1})}function w(e,t){var n=t.payload;return t.error?(0,i.default)({},e,{loadingError:!0}):(0,i.default)({},e,{emailPreferences:n.subscriptions,loadingError:!1})}function E(e,t){var n=t.payload,r=t.error,o=(0,i.default)({},e,{uploadingPhoto:!1});return r?(c.default.error("Failed to upload user photo",n),(0,d.fireErrorMessage)("ERROR: Failed to upload photo!"),o):o.info&&o.info.handle===n.handle?(0,i.default)({},o,{info:(0,i.default)({},o.info,{photoURL:n.photoURL})}):o}function T(e,t){var n=t.payload,r=t.error,o=(0,i.default)({},e,{deletingPhoto:!1});return r?(c.default.error("Failed to delete user photo",n),(0,d.fireErrorMessage)("ERROR: Failed to delete photo!"),o):o.info&&o.info.handle===n.handle?(0,i.default)({},o,{info:(0,i.default)({},o.info,{photoURL:null})}):o}function C(e,t){var n=t.payload,r=t.error,o=(0,i.default)({},e,{updatingProfile:!1});return n.isEmailConflict?(0,i.default)({},o,{isEmailConflict:!0,updateProfileSuccess:!1}):r?(c.default.error("Failed to update user profile",n),(0,d.fireErrorMessage)("ERROR: Failed to update user profile!"),(0,i.default)({},o,{updateProfileSuccess:!1})):o.info&&o.info.handle===n.handle?(0,i.default)({},o,{info:(0,i.default)({},o.info,n),updateProfileSuccess:!0}):(0,i.default)({},o,{updateProfileSuccess:!0})}function S(e,t){var n=t.payload,r=t.error,o=(0,i.default)({},e,{addingSkill:!1});return r?(c.default.error("Failed to add user skill",n),(0,d.fireErrorMessage)("ERROR: Failed to add user skill!"),o):o.profileForHandle!==n.handle?o:(0,i.default)({},o,{skills:n.skills})}function I(e,t){var n=t.payload,r=t.error,o=(0,i.default)({},e,{hidingSkill:!1});return r?(c.default.error("Failed to remove user skill",n),(0,d.fireErrorMessage)("ERROR: Failed to remove user skill!"),o):o.profileForHandle!==n.handle?o:(0,i.default)({},o,{skills:n.skills})}function k(e,t){var n=t.payload,r=t.error,o=(0,i.default)({},e,{addingWebLink:!1});return r?(c.default.error("Failed to add web link",n),(0,d.fireErrorMessage)("ERROR: Failed to add web link!"),o):o.profileForHandle===n.handle&&n.data?(0,i.default)({},o,{externalLinks:[].concat((0,a.default)(o.externalLinks),[n.data])}):o}function O(e,t){var n=t.payload,r=t.error,o=(0,i.default)({},e,{deletingWebLink:!1});return r?(c.default.error("Failed to delete web link",n),(0,d.fireErrorMessage)("ERROR: Failed to delete web link!"),o):o.profileForHandle===n.handle&&n.data?(0,i.default)({},o,{externalLinks:s.default.filter(o.externalLinks,function(e){return e.key!==n.data.key})}):o}function A(e,t){var n=t.payload,r=t.error,o=(0,i.default)({},e,{linkingExternalAccount:!1});return r?(c.default.error("Failed to link external account",n),(0,d.fireErrorMessage)("ERROR: Failed to link external account!"),o):o.profileForHandle===n.handle&&n.data?(0,i.default)({},o,{linkedAccounts:[].concat((0,a.default)(o.linkedAccounts),[n.data])}):o}function R(e,t){var n=t.payload,r=t.error,o=(0,i.default)({},e,{unlinkingExternalAccount:!1});return r?(c.default.error("Failed to unlink external account",n),(0,d.fireErrorMessage)("ERROR: Failed to unlink external account!"),o):o.profileForHandle!==n.handle?o:(0,i.default)({},o,{linkedAccounts:s.default.filter(o.linkedAccounts,function(e){return e.providerType!==n.providerType})})}function D(e,t){var n=t.payload,r=t.error,o=(0,i.default)({},e,{savingEmailPreferences:!1});return r?(c.default.error("Failed to save email preferences",n),(0,d.fireErrorMessage)("ERROR: Failed to save email preferences!"),o):o.profileForHandle===n.handle&&n.data?(0,i.default)({},o,{emailPreferences:n.data.subscriptions}):o}function P(e,t){var n=t.payload,r=t.error,o=(0,i.default)({},e,{updatingPassword:!1});return r&&(c.default.error("Failed to update password",n),(0,d.fireErrorMessage)("The old password is invalid")),o}function x(e,t){var n=t.payload,r=t.error,o=(0,i.default)({},e,{verifyingEmail:!1});return r?(c.default.error("Failed to verify member new email",n),(0,i.default)({},o,{verifyError:!0})):(0,i.default)({},o,{verifyError:!1})}function N(e,t){var n=t.payload;return(0,i.default)({},e,{isEmailConflict:n})}function U(e){var t,n=l.default.profile;return(0,u.handleActions)((t={},(0,o.default)(t,n.clearProfile,function(e){return(0,i.default)({},e,{achievements:null,country:"",info:null,skills:null,stats:null})}),(0,o.default)(t,n.loadProfile,function(e,t){return(0,i.default)({},e,{profileForHandle:t.payload})}),(0,o.default)(t,n.getAchievementsInit,function(e){return e}),(0,o.default)(t,n.getAchievementsDone,p),(0,o.default)(t,n.getExternalAccountsInit,function(e){return e}),(0,o.default)(t,n.getExternalAccountsDone,h),(0,o.default)(t,n.getExternalLinksInit,function(e){return e}),(0,o.default)(t,n.getExternalLinksDone,m),(0,o.default)(t,n.getInfoInit,function(e){return e}),(0,o.default)(t,n.getInfoDone,g),(0,o.default)(t,n.getSkillsInit,function(e){return e}),(0,o.default)(t,n.getSkillsDone,y),(0,o.default)(t,n.getStatsInit,function(e){return e}),(0,o.default)(t,n.getStatsDone,v),(0,o.default)(t,n.getLinkedAccountsInit,function(e){return e}),(0,o.default)(t,n.getLinkedAccountsDone,b),(0,o.default)(t,n.uploadPhotoInit,function(e){return(0,i.default)({},e,{uploadingPhoto:!0})}),(0,o.default)(t,n.uploadPhotoDone,E),(0,o.default)(t,n.deletePhotoInit,function(e){return(0,i.default)({},e,{deletingPhoto:!0})}),(0,o.default)(t,n.deletePhotoDone,T),(0,o.default)(t,n.updateProfileInit,function(e){return(0,i.default)({},e,{updatingProfile:!0})}),(0,o.default)(t,n.updateProfileDone,C),(0,o.default)(t,n.addSkillInit,function(e){return(0,i.default)({},e,{addingSkill:!0})}),(0,o.default)(t,n.addSkillDone,S),(0,o.default)(t,n.hideSkillInit,function(e){return(0,i.default)({},e,{hidingSkill:!0})}),(0,o.default)(t,n.hideSkillDone,I),(0,o.default)(t,n.addWebLinkInit,function(e){return(0,i.default)({},e,{addingWebLink:!0})}),(0,o.default)(t,n.addWebLinkDone,k),(0,o.default)(t,n.deleteWebLinkInit,function(e){return(0,i.default)({},e,{deletingWebLink:!0})}),(0,o.default)(t,n.deleteWebLinkDone,O),(0,o.default)(t,n.linkExternalAccountInit,function(e){return(0,i.default)({},e,{linkingExternalAccount:!0})}),(0,o.default)(t,n.linkExternalAccountDone,A),(0,o.default)(t,n.unlinkExternalAccountInit,function(e){return(0,i.default)({},e,{unlinkingExternalAccount:!0})}),(0,o.default)(t,n.unlinkExternalAccountDone,R),(0,o.default)(t,n.getCredentialInit,function(e){return e}),(0,o.default)(t,n.getCredentialDone,_),(0,o.default)(t,n.getEmailPreferencesInit,function(e){return e}),(0,o.default)(t,n.getEmailPreferencesDone,w),(0,o.default)(t,n.saveEmailPreferencesInit,function(e){return(0,i.default)({},e,{savingEmailPreferences:!0})}),(0,o.default)(t,n.saveEmailPreferencesDone,D),(0,o.default)(t,n.updatePasswordInit,function(e){return(0,i.default)({},e,{updatingPassword:!0})}),(0,o.default)(t,n.updatePasswordDone,P),(0,o.default)(t,n.verifyMemberNewEmailInit,function(e){return(0,i.default)({},e,{verifyingEmail:!0})}),(0,o.default)(t,n.verifyMemberNewEmailDone,x),(0,o.default)(t,n.updateEmailConflict,N),t),s.default.defaults(e,{achievements:null,copilot:!1,country:"",info:null,loadingError:!1,skills:null,stats:null,verifyError:null,updateProfileSuccess:null}))}t.default=U()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(1)),o=f(n(19)),a=f(n(6)),i=f(n(3));t.factory=function(){return r.default.resolve(x())};var s=f(n(0)),u=n(2),l=f(n(11)),c=f(n(41)),d=n(12);function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){var n=t.payload;return e[n]?s.default.omit(e,n):e}function h(){return{}}function m(e,t){var n=t.payload,r=n.handle,o=n.uuid,u=e[r];return(u=u?s.default.clone(u):{}).achievements={loadingUuid:o},(0,i.default)({},e,(0,a.default)({},r,u))}function g(e,t){var n=t.error,r=t.payload;if(n)return l.default.error("Failed to load member achievements",r),(0,d.fireErrorMessage)("Failed to load member achievements"),e;var o=r.data,u=r.handle;return r.uuid!==s.default.get(e[u],"achievements.loadingUuid")?e:(0,i.default)({},e,(0,a.default)({},u,(0,i.default)({},e[u],{achievements:{data:o,timestamp:Date.now()}})))}function y(e,t){var n=t.payload,r=n.handle,o=n.uuid,s=(0,i.default)({},e[r]||{},{finances:{loadingUuid:o,timestamp:0}});return(0,i.default)({},e,(0,a.default)({},r,s))}function v(e,t){var n=t.error,r=t.payload;if(n)return l.default.error("Failed to get user financial info",r),(0,d.fireErrorMessage)("Failed to get user financial info",""),e;var o=r.data,u=r.handle;return r.uuid!==s.default.get(e[u],"finances.loadingUuid")?e:(0,i.default)({},e,(0,a.default)({},u,(0,i.default)({},e[u],{finances:{data:o,loadingUuid:"",timestamp:Date.now()}})))}function b(e,t){var n=t.payload,r=n.handle,o=n.uuid,u=e[r];return(u=u?s.default.clone(u):{}).stats={loadingUuid:o},(0,i.default)({},e,(0,a.default)({},r,u))}function _(e,t){var n=t.error,r=t.payload;if(n)return l.default.error("Failed to get member stats",r),(0,d.fireErrorMessage)("Failed to get member stats",""),e;var o=r.data,u=r.handle;return r.uuid!==s.default.get(e[u],"stats.loadingUuid")?e:(0,i.default)({},e,(0,a.default)({},u,(0,i.default)({},e[u],{stats:{data:o,timestamp:Date.now()}})))}function w(e,t){var n=t.payload,r=n.handle,o=n.uuid,u=e[r];return(u=u?s.default.clone(u):{}).statsHistory={loadingUuid:o},(0,i.default)({},e,(0,a.default)({},r,u))}function E(e,t){var n=t.error,r=t.payload;if(n)return l.default.error("Failed to get member statsHistory",r),(0,d.fireErrorMessage)("Failed to get member statsHistory",""),e;var o=r.data,u=r.handle;return r.uuid!==s.default.get(e[u],"statsHistory.loadingUuid")?e:(0,i.default)({},e,(0,a.default)({},u,(0,i.default)({},e[u],{statsHistory:{data:o,timestamp:Date.now()}})))}function T(e,t){var n=t.payload,r=n.handle,o=n.uuid,u=e[r];return(u=u?s.default.clone(u):{}).statsDistribution={loadingUuid:o},(0,i.default)({},e,(0,a.default)({},r,u))}function C(e,t){var n=t.error,r=t.payload;if(n)return l.default.error("Failed to get member statsDistribution",r),(0,d.fireErrorMessage)("Failed to get member statsDistribution",""),e;var o=r.data,u=r.handle;return r.uuid!==s.default.get(e[u],"statsDistribution.loadingUuid")?e:(0,i.default)({},e,(0,a.default)({},u,(0,i.default)({},e[u],{statsDistribution:{data:o,timestamp:Date.now()}})))}function S(e,t){var n=t.payload.handle;return(0,i.default)({},e,(0,a.default)({},n,(0,i.default)({},e[n],{activeChallengesCount:null})))}function I(e,t){var n=t.error,r=t.payload;if(n)return l.default.error("Failed to get member active challenges",r),(0,d.fireErrorMessage)("Failed to get member active challenges",""),e;var o=r.handle,s=r.challenges;return(0,i.default)({},e,(0,a.default)({},o,(0,i.default)({},e[o],{activeChallengesCount:s.length})))}function k(e,t){var n=t.payload,r=n.handle,o=n.uuid;return(0,i.default)({},e,(0,a.default)({},r,(0,i.default)({},e[r],{loadingSubTrackChallengesUUID:o})))}function O(e,t){var n=t.error,r=t.payload;if(n)return l.default.error("Failed to get member subtrack challenges",r),(0,d.fireErrorMessage)("Failed to get member subtrack challenges",""),e;var s=r.uuid,u=r.challenges,c=r.refresh,f=r.handle;return s!==e[f].loadingSubTrackChallengesUUID?e:(0,i.default)({},e,(0,a.default)({},f,(0,i.default)({},e[f],{subtrackChallenges:e[f].subtrackChallenges&&!c?[].concat((0,o.default)(e[f].subtrackChallenges),(0,o.default)(u)):u,subtrackChallengesHasMore:u&&u.length>0,loadingSubTrackChallengesUUID:""})))}function A(e,t){var n=t.payload,r=n.handle,o=n.uuid;return(0,i.default)({},e,(0,a.default)({},r,(0,i.default)({},e[r],{loadingSRMUUID:o})))}function R(e,t){var n=t.error,r=t.payload;if(n)return l.default.error("Failed to get member SRMs",r),(0,d.fireErrorMessage)("Failed to get member SRMs",""),e;var s=r.uuid,u=r.srms,c=r.refresh,f=r.handle;return s!==e[f].loadingSRMUUID?e:(0,i.default)({},e,(0,a.default)({},f,(0,i.default)({},e[f],{userSRMs:e[f].userSRMs&&!c?[].concat((0,o.default)(e[f].userSRMs),(0,o.default)(u)):u,userSRMHasMore:u&&u.length>0,loadingSRMUUID:""})))}function D(e,t){var n=t.payload,r=n.handle,o=n.uuid;return(0,i.default)({},e,(0,a.default)({},r,(0,i.default)({},e[r],{loadingMarathonUUID:o})))}function P(e,t){var n=t.error,r=t.payload;if(n)return l.default.error("Failed to get member marathons",r),(0,d.fireErrorMessage)("Failed to get member marathons",""),e;var s=r.uuid,u=r.marathons,c=r.refresh,f=r.handle;return s!==e[f].loadingMarathonUUID?e:(0,i.default)({},e,(0,a.default)({},f,(0,i.default)({},e[f],{userMarathons:e[f].userMarathons&&!c?[].concat((0,o.default)(e[f].userMarathons),(0,o.default)(u.challenges)):u.challenges,userMarathonHasMore:u&&u.challenges&&u.challenges.length>0,loadingMarathonUUID:""})))}function x(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=c.default.members;return(0,u.handleActions)((e={},(0,a.default)(e,n.drop,p),(0,a.default)(e,n.dropAll,h),(0,a.default)(e,n.getAchievementsInit,m),(0,a.default)(e,n.getAchievementsDone,g),(0,a.default)(e,n.getFinancesInit,y),(0,a.default)(e,n.getFinancesDone,v),(0,a.default)(e,n.getStatsInit,b),(0,a.default)(e,n.getStatsDone,_),(0,a.default)(e,n.getStatsHistoryInit,w),(0,a.default)(e,n.getStatsHistoryDone,E),(0,a.default)(e,n.getStatsDistributionInit,T),(0,a.default)(e,n.getStatsDistributionDone,C),(0,a.default)(e,n.getActiveChallengesInit,S),(0,a.default)(e,n.getActiveChallengesDone,I),(0,a.default)(e,n.getSubtrackChallengesInit,k),(0,a.default)(e,n.getSubtrackChallengesDone,O),(0,a.default)(e,n.getUserSrmInit,A),(0,a.default)(e,n.getUserSrmDone,R),(0,a.default)(e,n.getUserMarathonInit,D),(0,a.default)(e,n.getUserMarathonDone,P),e),t)}t.default=x()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(1)),o=c(n(6)),a=c(n(3));t.factory=function(){return r.default.resolve(p())};var i=c(n(0)),s=n(2),u=c(n(11)),l=c(n(45));function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t){var n=t.payload;return t.error?(u.default.error("Failed to get skill tags",n),(0,a.default)({},e,{loadingSkillTagsError:!0})):(0,a.default)({},e,{loadingSkillTagsError:!1,skillTags:n})}function f(e,t){var n=t.payload;return t.error?(u.default.error("Failed to get countries",n),(0,a.default)({},e,{loadingCountriesError:!0})):(0,a.default)({},e,{loadingCountriesError:!1,countries:n})}function p(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=l.default.lookup;return(0,s.handleActions)((e={},(0,o.default)(e,n.getSkillTagsInit,function(e){return e}),(0,o.default)(e,n.getSkillTagsDone,d),(0,o.default)(e,n.getCountriesInit,function(e){return e}),(0,o.default)(e,n.getCountriesDone,f),e),i.default.defaults(t,{skillTags:[],countries:[]}))}t.default=p()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(1)),o=d(n(6)),a=d(n(3));t.factory=function(){return r.default.resolve(m())};var i=d(n(0)),s=n(8),u=d(n(11)),l=n(42),c=d(l);function d(e){return e&&e.__esModule?e:{default:e}}function f(e){return(0,a.default)({},e,{allLoaded:!1,lastRequestedPageNum:-1,loadingUuid:"",tasks:[],timestamp:0})}function p(e,t){var n=t.payload;return(0,a.default)({},e,{lastRequestedPageNum:n.pageNum,loadingUuid:n.uuid})}function h(e,t){var n=t.error,r=t.payload;if(n)return u.default.error(r),s.isomorphy.isClientSide()&&alert("Failed to load member tasks"),e;var o=r.projectId,c=r.tasks;if(r.uuid!==e.loadingUuid)return e;var d={};e.tasks.forEach(function(e){d[e.id]=e}),c.forEach(function(e){d[e.id]=e});var f=e.timestamps;return e.lastRequestedPageNum||((f=i.default.clone(f))[o]=Date.now()),(0,a.default)({},e,{allLoaded:c.length0&&void 0!==arguments[0]?arguments[0]:{},n=c.default.memberTasks;return s.redux.handleActions((e={},(0,o.default)(e,n.dropAll,f),(0,o.default)(e,n.getInit,p),(0,o.default)(e,n.getDone,h),e),i.default.defaults(t,{allLoaded:!1,lastRequestedPageNum:-1,loadingUuid:"",tasks:[],timestamps:{}}))}t.default=m()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(1)),o=l(n(6)),a=l(n(3));t.factory=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=i.default.get(e,"reviewOpportunity.challenge.id");if(t){var n={tokenV2:i.default.get(e.auth,"tokenV2"),tokenV3:i.default.get(e.auth,"tokenV3")},o=u.default.reviewOpportunity;return s.redux.resolveAction(o.getDetailsDone(t,n.tokenV3)).then(function(e){var t=e.error,n=e.payload,r={};r.details=t?null:n,r.requiredTerms=t?[]:c(n),f(r)})}return r.default.resolve(f())};var i=l(n(0)),s=n(8),u=l(n(43));function l(e){return e&&e.__esModule?e:{default:e}}function c(e){var t=e.payments.map(function(e){return e.role});return i.default.uniqBy(e.challenge.terms.filter(function(e){return"Reviewer"===e.role||i.default.includes(t,e.role)}).map(function(e){return i.default.pick(e,["termsOfUseId","agreed","title"])}),function(e){return e.termsOfUseId})||[]}function d(e,t){var n=t.payload;return t.error?(0,a.default)({},e,{authError:!0,isLoadingDetails:!1}):(0,a.default)({},e,{details:n,isLoadingDetails:!1,requiredTerms:c(n)})}function f(e){var t,n=u.default.reviewOpportunity;return s.redux.handleActions((t={},(0,o.default)(t,n.cancelApplicationsInit,function(e){return e}),(0,o.default)(t,n.cancelApplicationsDone,function(e){return e}),(0,o.default)(t,n.getDetailsInit,function(e){return(0,a.default)({},e,{isLoadingDetails:!0})}),(0,o.default)(t,n.getDetailsDone,d),(0,o.default)(t,n.submitApplicationsInit,function(e){return e}),(0,o.default)(t,n.submitApplicationsDone,function(e){return e}),t),i.default.defaults(e,{authError:!1,details:null,isLoadingDetails:!1,requiredTerms:[]}))}t.default=f()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(1)),o=d(n(6)),a=d(n(19)),i=d(n(3));t.factory=function(){return r.default.resolve(y())};var s=n(2),u=d(n(11)),l=d(n(47)),c=n(12);function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){var n=t.error,r=t.payload;return n?(u.default.error("Failed to get all user traits",r),(0,i.default)({},e,{userTraits:[]})):(0,i.default)({},e,{userTraits:r.data})}function p(e){return(0,i.default)({},e,{traitRequestCount:e.traitRequestCount+1})}function h(e,t){var n=t.error,r=t.payload;if(n)return u.default.error("Failed to add user trait",r),(0,c.fireErrorMessage)("Failed to add user trait",""),(0,i.default)({},e,{traitRequestCount:e.traitRequestCount-1});var o=r.result[0];return(0,i.default)({},e,{userTraits:[].concat((0,a.default)(e.userTraits),[o]),traitRequestCount:e.traitRequestCount-1})}function m(e,t){var n=t.error,r=t.payload;if(n)return u.default.error("Failed to update user trait",r),(0,c.fireErrorMessage)("Failed to update user trait",""),(0,i.default)({},e,{traitRequestCount:e.traitRequestCount-1});var o=r.result[0],a=e.userTraits.filter(function(e){return e.traitId!==r.traitId});return a.push(o),(0,i.default)({},e,{userTraits:a,traitRequestCount:e.traitRequestCount-1})}function g(e,t){var n=t.error,r=t.payload;if(n)return u.default.error("Failed to delete user trait",r),(0,c.fireErrorMessage)("Failed to delete user trait",""),(0,i.default)({},e,{traitRequestCount:e.traitRequestCount-1});var o=e.userTraits.filter(function(e){return e.traitId!==r.traitId});return(0,i.default)({},e,{userTraits:o,traitRequestCount:e.traitRequestCount-1})}function y(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{traitRequestCount:0,userTraits:[]},n=l.default.settings;return(0,s.handleActions)((e={},(0,o.default)(e,n.getAllUserTraits,f),(0,o.default)(e,n.modifyUserTraitInit,p),(0,o.default)(e,n.addUserTrait,h),(0,o.default)(e,n.deleteUserTrait,g),(0,o.default)(e,n.updateUserTrait,m),e),t)}t.default=y()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(1)),o=l(n(6)),a=l(n(3));t.factory=function(){return r.default.resolve(d())};var i=l(n(0)),s=n(2),u=l(n(49));function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){var n=t.payload,r=n.data,o=r.res,i=r.error,s=n.lookerId,u=(0,a.default)({},e.dataSet);return u[s]={lookerData:o,error:i,msg:o.message},(0,a.default)({},e,{dataSet:u})}function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=u.default.looker;return(0,s.handleActions)((0,o.default)({},t.getLookerDone,c),i.default.defaults(e,{dataSet:{}}))}t.default=d()}])});
\ No newline at end of file
+ */!function(e,t,r){module.exports?module.exports=r():void 0===(__WEBPACK_AMD_DEFINE_RESULT__="function"==typeof(__WEBPACK_AMD_DEFINE_FACTORY__=r)?__WEBPACK_AMD_DEFINE_FACTORY__.call(exports,__webpack_require__,exports,module):__WEBPACK_AMD_DEFINE_FACTORY__)||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)}(0,0,function(){var win=window,doc=document,httpsRe=/^http/,protocolRe=/(^\w+):\/\//,twoHundo=/^(20\d|1223)$/,byTag="getElementsByTagName",readyState="readyState",contentType="Content-Type",requestedWith="X-Requested-With",head=doc[byTag]("head")[0],uniqid=0,callbackPrefix="reqwest_"+ +new Date,lastValue,xmlHttpRequest="XMLHttpRequest",xDomainRequest="XDomainRequest",noop=function(){},isArray="function"==typeof Array.isArray?Array.isArray:function(e){return e instanceof Array},defaultHeaders={contentType:"application/x-www-form-urlencoded",requestedWith:xmlHttpRequest,accept:{"*":"text/javascript, text/html, application/xml, text/xml, */*",xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript",js:"application/javascript, text/javascript"}},xhr=function(e){if(!0===e.crossOrigin){var t=win[xmlHttpRequest]?new XMLHttpRequest:null;if(t&&"withCredentials"in t)return t;if(win[xDomainRequest])return new XDomainRequest;throw new Error("Browser does not support cross-origin requests")}return win[xmlHttpRequest]?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")},globalSetupOptions={dataFilter:function(e){return e}};function succeed(e){var t=protocolRe.exec(e.url);return t=t&&t[1]||window.location.protocol,httpsRe.test(t)?twoHundo.test(e.request.status):!!e.request.response}function handleReadyState(e,t,r){return function(){return e._aborted?r(e.request):e._timedOut?r(e.request,"Request is aborted: timeout"):void(e.request&&4==e.request[readyState]&&(e.request.onreadystatechange=noop,succeed(e)?t(e.request):r(e.request)))}}function setHeaders(e,t){var r,n=t.headers||{};n.Accept=n.Accept||defaultHeaders.accept[t.type]||defaultHeaders.accept["*"];var o="function"==typeof FormData&&t.data instanceof FormData;for(r in t.crossOrigin||n[requestedWith]||(n[requestedWith]=defaultHeaders.requestedWith),n[contentType]||o||(n[contentType]=t.contentType||defaultHeaders.contentType),n)n.hasOwnProperty(r)&&"setRequestHeader"in e&&e.setRequestHeader(r,n[r])}function setCredentials(e,t){void 0!==t.withCredentials&&void 0!==e.withCredentials&&(e.withCredentials=!!t.withCredentials)}function generalCallback(e){lastValue=e}function urlappend(e,t){return e+(/\?/.test(e)?"&":"?")+t}function handleJsonp(e,t,r,n){var o=uniqid++,a=e.jsonpCallback||"callback",i=e.jsonpCallbackName||reqwest.getcallbackPrefix(o),s=new RegExp("((^|\\?|&)"+a+")=([^&]+)"),u=n.match(s),l=doc.createElement("script"),c=0,d=-1!==navigator.userAgent.indexOf("MSIE 10.0");return u?"?"===u[3]?n=n.replace(s,"$1="+i):i=u[3]:n=urlappend(n,a+"="+i),win[i]=generalCallback,l.type="text/javascript",l.src=n,l.async=!0,void 0===l.onreadystatechange||d||(l.htmlFor=l.id="_reqwest_"+o),l.onload=l.onreadystatechange=function(){if(l[readyState]&&"complete"!==l[readyState]&&"loaded"!==l[readyState]||c)return!1;l.onload=l.onreadystatechange=null,l.onclick&&l.onclick(),t(lastValue),lastValue=void 0,head.removeChild(l),c=1},head.appendChild(l),{abort:function(){l.onload=l.onreadystatechange=null,r({},"Request is aborted: timeout",{}),lastValue=void 0,head.removeChild(l),c=1}}}function getRequest(e,t){var r,n=this.o,o=(n.method||"GET").toUpperCase(),a="string"==typeof n?n:n.url,i=!1!==n.processData&&n.data&&"string"!=typeof n.data?reqwest.toQueryString(n.data):n.data||null,s=!1;return"jsonp"!=n.type&&"GET"!=o||!i||(a=urlappend(a,i),i=null),"jsonp"==n.type?handleJsonp(n,e,t,a):((r=n.xhr&&n.xhr(n)||xhr(n)).open(o,a,!1!==n.async),setHeaders(r,n),setCredentials(r,n),win[xDomainRequest]&&r instanceof win[xDomainRequest]?(r.onload=e,r.onerror=t,r.onprogress=function(){},s=!0):r.onreadystatechange=handleReadyState(this,e,t),n.before&&n.before(r),s?setTimeout(function(){r.send(i)},200):r.send(i),r)}function Reqwest(e,t){this.o=e,this.fn=t,init.apply(this,arguments)}function setType(e){return e.match("json")?"json":e.match("javascript")?"js":e.match("text")?"html":e.match("xml")?"xml":void 0}function init(o,fn){this.url="string"==typeof o?o:o.url,this.timeout=null,this._fulfilled=!1,this._successHandler=function(){},this._fulfillmentHandlers=[],this._errorHandlers=[],this._completeHandlers=[],this._erred=!1,this._responseArgs={};var self=this;function complete(e){for(o.timeout&&clearTimeout(self.timeout),self.timeout=null;self._completeHandlers.length>0;)self._completeHandlers.shift()(e)}function success(resp){var type=o.type||resp&&setType(resp.getResponseHeader("Content-Type"));resp="jsonp"!==type?self.request:resp;var filteredResponse=globalSetupOptions.dataFilter(resp.responseText,type),r=filteredResponse;try{resp.responseText=r}catch(e){}if(r)switch(type){case"json":try{resp=win.JSON?win.JSON.parse(r):eval("("+r+")")}catch(e){return error(resp,"Could not parse JSON in response",e)}break;case"js":resp=eval(r);break;case"html":resp=r;break;case"xml":resp=resp.responseXML&&resp.responseXML.parseError&&resp.responseXML.parseError.errorCode&&resp.responseXML.parseError.reason?null:resp.responseXML}for(self._responseArgs.resp=resp,self._fulfilled=!0,fn(resp),self._successHandler(resp);self._fulfillmentHandlers.length>0;)resp=self._fulfillmentHandlers.shift()(resp);complete(resp)}function timedOut(){self._timedOut=!0,self.request.abort()}function error(e,t,r){for(e=self.request,self._responseArgs.resp=e,self._responseArgs.msg=t,self._responseArgs.t=r,self._erred=!0;self._errorHandlers.length>0;)self._errorHandlers.shift()(e,t,r);complete(e)}fn=fn||function(){},o.timeout&&(this.timeout=setTimeout(function(){timedOut()},o.timeout)),o.success&&(this._successHandler=function(){o.success.apply(o,arguments)}),o.error&&this._errorHandlers.push(function(){o.error.apply(o,arguments)}),o.complete&&this._completeHandlers.push(function(){o.complete.apply(o,arguments)}),this.request=getRequest.call(this,success,error)}function reqwest(e,t){return new Reqwest(e,t)}function normalize(e){return e?e.replace(/\r?\n/g,"\r\n"):""}function serial(e,t){var r,n,o,a,i=e.name,s=e.tagName.toLowerCase(),u=function(e){e&&!e.disabled&&t(i,normalize(e.attributes.value&&e.attributes.value.specified?e.value:e.text))};if(!e.disabled&&i)switch(s){case"input":/reset|button|image|file/i.test(e.type)||(r=/checkbox/i.test(e.type),n=/radio/i.test(e.type),o=e.value,(!r&&!n||e.checked)&&t(i,normalize(r&&""===o?"on":o)));break;case"textarea":t(i,normalize(e.value));break;case"select":if("select-one"===e.type.toLowerCase())u(e.selectedIndex>=0?e.options[e.selectedIndex]:null);else for(a=0;e.length&&a-1&&null!==new RegExp("rv:([0-9]{2,2}[.0-9]{0,})").exec(t)&&(e=parseFloat(RegExp.$1));return e>=8}();return"undefined"!=typeof window&&window.JSON&&window.JSON.stringify&&window.JSON.parse&&window.postMessage?{open:function(i,s){if(!s)throw"missing required callback argument";var u,l;i.url||(u="missing required 'url' parameter"),i.relay_url||(u="missing required 'relay_url' parameter"),u&&setTimeout(function(){s(u)},0),i.window_name||(i.window_name=null),i.window_features&&!function(){try{var e=navigator.userAgent;return-1!=e.indexOf("Fennec/")||-1!=e.indexOf("Firefox/")&&-1!=e.indexOf("Android")}catch(e){}return!1}()||(i.window_features=void 0);var c,d=o(i.url);if(d!==o(i.relay_url))return setTimeout(function(){s("invalid arguments: origin of url and relay_url must match")},0);a&&((l=document.createElement("iframe")).setAttribute("src",i.relay_url),l.style.display="none",l.setAttribute("name",e),document.body.appendChild(l),c=l.contentWindow);var f=i.popup||window.open(i.url,i.window_name,i.window_features);i.popup&&(f.location.href=i.url),c||(c=f);var p=setInterval(function(){f&&f.closed&&(m(),s&&(s("User closed the popup window"),s=null))},500),h=JSON.stringify({a:"request",d:i.params});function m(){if(l&&document.body.removeChild(l),l=void 0,p&&(p=clearInterval(p)),n(window,"message",g),n(window,"unload",m),f)try{f.close()}catch(e){c.postMessage(t,d)}f=c=void 0}function g(e){if(e.origin===d)try{var t=JSON.parse(e.data);"ready"===t.a?c.postMessage(h,d):"error"===t.a?(m(),s&&(s(t.d),s=null)):"response"===t.a&&(m(),s&&(s(null,t.d),s=null))}catch(e){}}return r(window,"unload",m),r(window,"message",g),{close:m,focus:function(){if(f)try{f.focus()}catch(e){}}}},onOpen:function(o){var i="*",s=a?function(){window.location;for(var t=window.opener.frames,r=t.length-1;r>=0;r--)try{if(t[r].location.protocol===window.location.protocol&&t[r].location.host===window.location.host&&t[r].name===e)return t[r]}catch(e){}}():window.opener;if(!s)throw"can't find relay frame";function u(e){e=JSON.stringify(e),a?s.doPost(e,i):s.postMessage(e,i)}function l(e){if(e.data===t)try{window.close()}catch(e){}}r(a?s:window,"message",function e(t){var r;try{r=JSON.parse(t.data)}catch(e){}r&&"request"===r.a&&(n(window,"message",e),i=t.origin,o&&setTimeout(function(){o(i,r.d,function(e){o=void 0,u({a:"response",d:e})})},0))}),r(a?s:window,"message",l);try{u({a:"ready"})}catch(e){r(s,"load",function(e){u({a:"ready"})})}var c=function(){try{n(a?s:window,"message",l)}catch(e){}o&&u({a:"error",d:"client closed window"}),o=void 0;try{window.close()}catch(e){}};return r(window,"unload",c),{detach:function(){n(window,"unload",c)}}}}:{open:function(e,t,r,n){setTimeout(function(){n("unsupported browser")},0)},onOpen:function(e){setTimeout(function(){e("unsupported browser")},0)}}}();e.exports&&(e.exports=n)},function(e,t,r){var n=r(81)("jsonp");e.exports=function(e,t,r){"function"==typeof t&&(r=t,t={});t||(t={});var i,s,u=t.prefix||"__jp",l=t.param||"callback",c=null!=t.timeout?t.timeout:6e4,d=encodeURIComponent,f=document.getElementsByTagName("script")[0]||document.head,p=u+o++;c&&(s=setTimeout(function(){h(),r&&r(new Error("Timeout"))},c));function h(){i.parentNode.removeChild(i),window[p]=a}window[p]=function(e){n("jsonp got",e),s&&clearTimeout(s),h(),r&&r(null,e)},e=(e+=(~e.indexOf("?")?"&":"?")+l+"="+d(p)).replace("?&","?"),n('jsonp req "%s"',e),(i=document.createElement("script")).src=e,f.parentNode.insertBefore(i,f)};var o=0;function a(){}},function(e,t,r){(function(n){t.log=function(...e){return"object"==typeof console&&console.log&&console.log(...e)},t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&"%c"===e&&(o=++n)}),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&void 0!==n&&"env"in n&&(e=Object({BABEL_ENV:"production",NODE_ENV:"production"}).DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=r(83)(t);const{formatters:o}=e.exports;o.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,r(82))},function(e,t){var r,n,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var u,l=[],c=!1,d=-1;function f(){c&&u&&(c=!1,u.length?l=u.concat(l):d=-1,l.length&&p())}function p(){if(!c){var e=s(f);c=!0;for(var t=l.length;t;){for(u=l,l=[];++d1)for(var r=1;r{if("%%"===r)return r;s++;const a=n.formatters[o];if("function"==typeof a){const n=e[s];r=a.call(t,n),e.splice(s,1),s--}return r}),n.formatArgs.call(t,e),(t.log||n.log).apply(t,e)}return i.namespace=e,i.enabled=n.enabled(e),i.useColors=n.useColors(),i.color=t(e),i.destroy=o,i.extend=a,"function"==typeof n.init&&n.init(i),n.instances.push(i),i}function o(){const e=n.instances.indexOf(this);return-1!==e&&(n.instances.splice(e,1),!0)}function a(e,t){return n(this.namespace+(void 0===t?":":t)+e)}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return n.debug=n,n.default=n,n.coerce=function(e){return e instanceof Error?e.stack||e.message:e},n.disable=function(){const e=[...n.names.map(i),...n.skips.map(i).map(e=>"-"+e)].join(",");return n.enable(""),e},n.enable=function(e){let t;n.save(e),n.names=[],n.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(t=0;t{n[t]=e[t]}),n.instances=[],n.names=[],n.skips=[],n.formatters={},n.selectColor=t,n.enable(n.load()),n}},function(e,t){var r=1e3,n=60*r,o=60*n,a=24*o,i=7*a,s=365.25*a;function u(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}e.exports=function(e,t){t=t||{};var l=typeof e;if("string"===l&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var u=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*s;case"weeks":case"week":case"w":return u*i;case"days":case"day":case"d":return u*a;case"hours":case"hour":case"hrs":case"hr":case"h":return u*o;case"minutes":case"minute":case"mins":case"min":case"m":return u*n;case"seconds":case"second":case"secs":case"sec":case"s":return u*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(e);if("number"===l&&!1===isNaN(e))return t.long?function(e){var t=Math.abs(e);if(t>=a)return u(e,t,a,"day");if(t>=o)return u(e,t,o,"hour");if(t>=n)return u(e,t,n,"minute");if(t>=r)return u(e,t,r,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=a)return Math.round(e/a)+"d";if(t>=o)return Math.round(e/o)+"h";if(t>=n)return Math.round(e/n)+"m";if(t>=r)return Math.round(e/r)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t){var r=window.location.protocol,n=window.location.hostname,o=window.location.port;e.exports=function(e,t,a){return a=a||"",r===e&&n===t&&o===a}},function(module,exports){var JSON={};!function(){"use strict";function f(e){return e<10?"0"+e:e}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(e){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(e){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var r,n,o,a,i,s=gap,u=t[e];switch(u&&"object"==typeof u&&"function"==typeof u.toJSON&&(u=u.toJSON(e)),"function"==typeof rep&&(u=rep.call(t,e,u)),typeof u){case"string":return quote(u);case"number":return isFinite(u)?String(u):"null";case"boolean":case"null":return String(u);case"object":if(!u)return"null";if(gap+=indent,i=[],"[object Array]"===Object.prototype.toString.apply(u)){for(a=u.length,r=0;r0&&void 0!==arguments[0]?arguments[0]:{};return n.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t={tokenV2:s.default.get(o.auth,"tokenV2"),tokenV3:s.default.get(o.auth,"tokenV3")}).tokenV3){e.next=8;break}return t.user=(0,u.decodeToken)(t.tokenV3),r=c.default.auth.loadProfile(t.tokenV3),e.next=6,l.redux.resolveAction(r);case 6:return r=e.sent,e.abrupt("return",h(p(t,r)));case 8:return e.abrupt("return",h(t));case 9:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),f(r(0))),u=r(17),l=r(8),c=f(r(28)),d=f(r(25));function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){return(0,i.default)({},e,{authenticating:!1,profile:t.payload})}function h(e){var t;return l.redux.handleActions((t={},(0,a.default)(t,c.default.auth.loadProfile,p),(0,a.default)(t,c.default.auth.setTcTokenV2,function(e,t){return(0,i.default)({},e,{tokenV2:t.payload})}),(0,a.default)(t,c.default.auth.setTcTokenV3,function(e,t){var r=t.payload;return(0,i.default)({},e,{tokenV3:r,user:r?(0,u.decodeToken)(r):null})}),(0,a.default)(t,"COMMUNITY_ACTIONS/TC_COMMUNITY/JOIN_DONE",function(e,t){var r=t.payload;return(0,i.default)({},e,{profile:(0,i.default)({},e.profile,{groups:e.profile.groups.concat({id:r.groupId.toString()})})})}),(0,a.default)(t,d.default.profile.uploadPhotoDone,function(e,t){var r=t.payload;return t.error?e:e.profile&&e.profile.handle===r.handle?(0,i.default)({},e,{profile:(0,i.default)({},e.profile,{photoURL:r.photoURL})}):e}),(0,a.default)(t,d.default.profile.deletePhotoDone,function(e,t){var r=t.payload;return t.error?e:e.profile&&e.profile.handle===r.handle?(0,i.default)({},e,{profile:(0,i.default)({},e.profile,{photoURL:null})}):e}),(0,a.default)(t,d.default.profile.updateProfileDone,function(e,t){var r=t.payload;return t.error?e:e.profile&&e.profile.handle===r.handle?(0,i.default)({},e,{profile:(0,i.default)({},e.profile,r)}):e}),t),s.default.defaults(e,{authenticating:!0,profile:null,tokenV2:"",tokenV3:"",user:null}))}t.default=h()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=d(r(1)),o=d(r(6)),a=d(r(3));t.factory=function(){return n.default.resolve(h())};var i=d(r(0)),s=r(2),u=d(r(11)),l=d(r(31)),c=r(12);function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){var r=t.payload,n=r.community,s=r.uuid,u=e.communities[n];return(u=u?i.default.clone(u):{}).loadingUuid=s,(0,a.default)({},e,{communities:(0,a.default)({},e.communities,(0,o.default)({},n,u))})}function p(e,t){var r=t.error,n=t.payload;if(r)return u.default.error("Failed to load community stats",n),(0,c.fireErrorMessage)("Failed to load community stats",""),e;var s=n.community,l=n.stats,d=n.uuid;return i.default.get(e.communities[s],"loadingUuid")!==d?e:(0,a.default)({},e,{communities:(0,a.default)({},e.communities,(0,o.default)({},s,{data:l,timestamp:Date.now()}))})}function h(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=l.default.stats;return(0,s.handleActions)((e={},(0,o.default)(e,r.getCommunityStatsInit,f),(0,o.default)(e,r.getCommunityStatsDone,p),e),i.default.defaults(i.default.clone(t),{communities:{}}))}t.default=h()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=c(r(1)),o=c(r(6)),a=c(r(3));t.factory=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=i.default.get(e,"terms.entity.type"),r=i.default.get(e,"terms.entity.id");if(t&&r){var o=e.terms.entity,a={tokenV2:i.default.get(e.auth,"tokenV2"),tokenV3:i.default.get(e.auth,"tokenV3")};return s.redux.resolveAction(l.default.terms.getTermsDone(o,a)).then(function(e){var t=p({},l.default.terms.getTermsInit(o));return v(t=f(t,e))})}return n.default.resolve(v())};var i=c(r(0)),s=r(8),u=c(r(11)),l=c(r(33));function c(e){return e&&e.__esModule?e:{default:e}}function d(e){return i.default.sortBy(e,function(e){return e.agreed?0:1})}function f(e,t){return t.error?(u.default.error("Failed to get terms!",t.payload),(0,a.default)({},e,{terms:[],getTermsFailure:t.error,loadingTermsForEntity:null})):i.default.isEqual(t.payload.entity,e.loadingTermsForEntity)?(0,a.default)({},e,{entity:t.payload.entity,terms:d(t.payload.terms),getTermsFailure:!1,loadingTermsForEntity:null}):e}function p(e,t){return(0,a.default)({},e,{getTermsFailure:!1,loadingTermsForEntity:t.payload,terms:[],entity:t.payload})}function h(e,t){if(t.error)return u.default.error("Check terms status failed!",t.payload),(0,a.default)({},e,{checkingStatus:!1,checkStatusError:t.payload,canRegister:!1});var r=i.default.every(t.payload,"agreed"),n=i.default.find(t.payload,function(e){return!e.agreed});return(0,a.default)({},e,{checkingStatus:!1,checkStatusError:!1,canRegister:r,terms:d(t.payload),selectedTerm:n})}function m(e,t){return t.error?(u.default.error("Failed to get term details!",t.payload),(0,a.default)({},e,{details:null,getTermDetailsFailure:t.payload,loadingDetailsForTermId:""})):i.default.toString(t.payload.termId)!==e.loadingDetailsForTermId?e:(0,a.default)({},e,t.payload,{getTermDetailsFailure:!1,loadingDetailsForTermId:""})}function g(e,t){return t.error?(u.default.error("Failed to get docu sign url!",t.payload),(0,a.default)({},e,{docuSignUrl:"",getDocuSignUrlFailure:t.payload,loadingDocuSignUrl:""})):i.default.toString(t.payload.templateId)!==e.loadingDocuSignUrl?e:(0,a.default)({},e,t.payload,{getDocuSignUrlFailure:!1,loadingDocuSignUrl:""})}function y(e,t){if(t.error)return u.default.error("Failed to agree term!",t.payload),(0,a.default)({},e,{agreeTermFailure:t.payload,agreeingTerm:""});if(i.default.toString(t.payload.termId)!==e.agreeingTerm)return e;if(t.payload.success){var r=i.default.cloneDeep(e.terms);i.default.find(r,["termsOfUseId",t.payload.termId]).agreed=!0;var n=i.default.find(r,function(e){return!e.agreed});return(0,a.default)({},e,{terms:r,selectedTerm:n,agreeTermFailure:!1,agreeingTerm:""})}return(0,a.default)({},e,{agreeTermFailure:!1,agreeingTerm:""})}function v(e){var t;return s.redux.handleActions((t={},(0,o.default)(t,l.default.terms.getTermsInit,p),(0,o.default)(t,l.default.terms.getTermsDone,f),(0,o.default)(t,l.default.terms.getTermDetailsInit,function(e,t){var r=t.payload;return(0,a.default)({},e,{getTermDetailsFailure:!1,loadingDetailsForTermId:r,details:null,termId:r})}),(0,o.default)(t,l.default.terms.getTermDetailsDone,m),(0,o.default)(t,l.default.terms.getDocuSignUrlInit,function(e,t){var r=t.payload;return(0,a.default)({},e,{getDocuSignUrlFailure:!1,loadingDocuSignUrl:r,docuSignUrl:"",templateId:r})}),(0,o.default)(t,l.default.terms.getDocuSignUrlDone,g),(0,o.default)(t,l.default.terms.agreeTermInit,function(e,t){var r=t.payload;return(0,a.default)({},e,{agreeTermFailure:!1,agreeingTerm:r})}),(0,o.default)(t,l.default.terms.agreeTermDone,y),(0,o.default)(t,l.default.terms.checkStatusInit,function(e){return(0,a.default)({},e,{checkingStatus:!0})}),(0,o.default)(t,l.default.terms.checkStatusDone,h),t),i.default.defaults(e,{terms:[],selectedTerm:null}))}t.default=v()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=f(r(1)),o=f(r(6)),a=f(r(3));t.factory=function(){return n.default.resolve(w())};var i=f(r(0)),s=r(2),u=r(17),l=f(r(36)),c=f(r(11)),d=r(12);function f(e){return e&&e.__esModule?e:{default:e}}var p="Cannot get user projects without auth token";function h(e){return(0,a.default)({},e,{loadingProjectDetailsForId:0,loadingProjectsForUsername:"",projectDetails:{},projects:[]})}function m(e,t){var r=t.payload;return(0,a.default)({},e,{loadingProjectDetailsForId:r})}function g(e,t){var r=t.error,n=t.payload;if(r)throw c.default.error("Failed to load project details",n),n;return n.project.projectId!==e.loadingProjectDetailsForId?e:(0,a.default)({},e,{loadingProjectDetailsForId:0,projectDetails:n})}function y(e,t){var r=t.payload,n=(0,a.default)({},e.projectPermissions,{loadingForProjectId:r});return(0,a.default)({},e,{projectPermissions:n})}function v(e,t){var r=t.error,n=t.payload;r&&((0,d.fireErrorMessage)("Failed to load project permissions",""),c.default.error("Failed to load project permissions",n));var o=n.permissions,i=n.projectId;if(i!==e.projectPermissions.loadingForProjectId)return e;var s={loadingForProjectId:0,permissions:o,projectId:i,timestamp:Date.now()};return(0,a.default)({},e,{projectPermissions:s})}function b(e,t){var r=t.payload;if(!r)throw c.default.error(p),new Error(p);return(0,a.default)({},e,{loadingProjectsForUsername:(0,u.decodeToken)(r).handle})}function _(e,t){var r=t.error,n=t.payload;if(r)throw c.default.error(n),n;var o=n.projects,i=n.tokenV3;if(!i)throw c.default.error(p),new Error(p);return(0,u.decodeToken)(i).handle!==e.loadingProjectsForUsername?e:(0,a.default)({},e,{loadingProjectsForUsername:"",projects:o.sort(function(e,t){return e.name.localeCompare(t.name)})})}function w(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=l.default.direct;return(0,s.handleActions)((e={},(0,o.default)(e,r.dropAll,h),(0,o.default)(e,r.getProjectDetailsInit,m),(0,o.default)(e,r.getProjectDetailsDone,g),(0,o.default)(e,r.getProjectPermissionsInit,y),(0,o.default)(e,r.getProjectPermissionsDone,v),(0,o.default)(e,r.getUserProjectsInit,b),(0,o.default)(e,r.getUserProjectsDone,_),e),i.default.defaults(t,{loadingProjectDetailsForId:0,loadingProjectsForUsername:"",projectDetails:{},projectPermissions:{loadingForProjectId:0,permissions:[],projectId:0,timestamp:0},projects:[]}))}t.default=w()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=c(r(1)),o=c(r(6)),a=c(r(104)),i=c(r(3));t.factory=function(){return n.default.resolve(h())};var s=c(r(0)),u=r(2),l=c(r(38));function c(e){return e&&e.__esModule?e:{default:e}}function d(e){return(0,i.default)({},e,{groups:{},loading:{}})}function f(e,t){var r=t.payload,n=s.default.isArray(r)?r:[r],o=s.default.clone(e.loading);return n.forEach(function(e){o[e]=!0}),(0,i.default)({},e,{loading:o})}function p(e,t){var r=s.default.clone(e.groups),n=s.default.clone(e.loading),o=t.payload;return(0,a.default)(o).forEach(function(e){var t=e.id;n[t]&&(!function e(t,r,n){var o=r[n];t[n]=o,o.subGroupIds&&o.subGroupIds.forEach(function(n){return e(t,r,n)})}(r,o,t),delete n[t])}),(0,i.default)({},e,{groups:r,loading:n})}function h(e){var t,r=l.default.groups;return(0,u.handleActions)((t={},(0,o.default)(t,r.dropGroups,d),(0,o.default)(t,r.getGroupsInit,f),(0,o.default)(t,r.getGroupsDone,p),t),s.default.defaults(e?s.default.clone(e):{},{groups:{},loading:{}}))}t.default=h()},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__104__},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=f(r(1)),a=f(r(19)),i=f(r(3)),s=f(r(6));t.factory=function(){return o.default.resolve(h())};var u=f(r(0)),l=r(2),c=f(r(21)),d=r(12);function f(e){return e&&e.__esModule?e:{default:e}}var p=(n={},(0,s.default)(n,d.ERROR_ICON_TYPES.NETWORK,[]),(0,s.default)(n,d.ERROR_ICON_TYPES.API,[]),n);function h(e){var t,r=c.default.errors;return(0,l.handleActions)((t={},(0,s.default)(t,r.clearError,function(e){return(0,i.default)({},e,{alerts:e.alerts.slice(1)})}),(0,s.default)(t,r.newError,function(e,t){var r=t.payload;return(0,i.default)({},e,{alerts:[].concat((0,a.default)(e.alerts),[{title:r.title,details:r.details}])})}),(0,s.default)(t,r.clearAllErrorIcons,function(e){return(0,i.default)({},e,{icons:p})}),(0,s.default)(t,r.setErrorIcon,function(e,t){var r=t.payload,n=r.id,o=r.title,u=r.message;return(0,i.default)({},e,{icons:(0,i.default)({},e.icons,(0,s.default)({},n,[].concat((0,a.default)(e.icons[n]),[{title:o,message:u}])))})}),(0,s.default)(t,r.clearErrorIcon,function(e,t){var r=t.payload.id;return(0,i.default)({},e,{icons:(0,i.default)({},e.icons,(0,s.default)({},r,[]))})}),t),u.default.defaults(e,{alerts:[],icons:p}))}t.default=h()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=m(r(16)),o=m(r(1)),a=m(r(6)),i=m(r(3));t.factory=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={tokenV2:s.default.get(e.auth,"tokenV2"),tokenV3:s.default.get(e.auth,"tokenV3")},r={},a=s.default.get(e,"challenge.challengeDetails.id"),u=s.default.get(e,"challenge.challengeDetails.mySubmission");if(a&&!u)return l.redux.resolveAction(c.default.challenge.getDetailsDone(a,t.tokenV3,t.tokenV2)).then(function(e){var r=s.default.get(e,"payload.track","").toLowerCase(),n="design"===r?l.redux.resolveAction(c.default.challenge.fetchCheckpointsDone(t.tokenV2,a)):null,i="COMPLETED"===s.default.get(e,"payload.status","")?l.redux.resolveAction(c.default.challenge.loadResultsDone(t,a,r)):null;return o.default.all([e,n,i])}).then(function(e){var t=(0,n.default)(e,3),o=t[0],s=t[1],u=t[2];return r=y(r=(0,i.default)({},r,{loadingCheckpoints:!0,loadingDetailsForChallengeId:a,loadingResultsForChallengeId:a}),o),s&&(r=_(r,s)),u&&(r=E(r,u)),r}).then(function(e){return l.redux.combineReducers(O(e),{mySubmissionsManagement:h.default})});if(a&&u)return o.default.all([l.redux.resolveAction(c.default.challenge.getDetailsDone(a,t.tokenV3,t.tokenV2)),l.redux.resolveAction(c.default.challenge.getSubmissionsDone(a,t.tokenV2))]).then(function(e){var t=(0,n.default)(e,2),o=t[0],s=t[1];return b(r=y(r=(0,i.default)({},r,{loadingSubmissionsForChallengeId:a,loadingDetailsForChallengeId:a}),o),s)}).then(function(e){return l.redux.combineReducers(O(e),{mySubmissionsManagement:h.default})});return o.default.resolve(l.redux.combineReducers(O(r),{mySubmissionsManagement:h.default}))};var s=m(r(0)),u=r(2),l=r(8),c=m(r(39)),d=m(r(22)),f=m(r(11)),p=r(12),h=m(r(50));function m(e){return e&&e.__esModule?e:{default:e}}function g(e,t){var r=t.payload;return e.details&&s.default.toString(e.details.id)!==r?(0,i.default)({},e,{fetchChallengeFailure:!1,loadingDetailsForChallengeId:r,details:null}):(0,i.default)({},e,{fetchChallengeFailure:!1,loadingDetailsForChallengeId:r})}function y(e,t){if(t.error)return f.default.error("Failed to get challenge details!",t.payload),(0,p.fireErrorMessage)("ERROR: Failed to load the challenge","Please, try again a bit later"),(0,i.default)({},e,{fetchChallengeFailure:t.error,loadingDetailsForChallengeId:""});var r=t.payload;return s.default.toString(r.id)!==e.loadingDetailsForChallengeId?e:(0,i.default)({},e,{details:r,fetchChallengeFailure:!1,loadingDetailsForChallengeId:""})}function v(e,t){return(0,i.default)({},e,{loadingSubmissionsForChallengeId:t.payload,mySubmissions:{challengeId:"",v2:null}})}function b(e,t){if(t.error)return f.default.error("Failed to get user's submissions for the challenge",t.payload),(0,i.default)({},e,{loadingSubmissionsForChallengeId:"",mySubmissions:{challengeId:"",v2:null}});var r=t.payload,n=r.challengeId,o=r.submissions;return n!==e.loadingSubmissionsForChallengeId?e:(0,i.default)({},e,{loadingSubmissionsForChallengeId:"",mySubmissions:{challengeId:n,v2:o}})}function _(e,t){return t.error?(0,i.default)({},e,{loadingCheckpoints:!1}):e.details&&e.details.id===t.payload.challengeId?(0,i.default)({},e,{checkpoints:t.payload.checkpoints,loadingCheckpoints:!1}):e}function w(e,t){var r=t.payload;return(0,i.default)({},e,{loadingResultsForChallengeId:r})}function E(e,t){return t.payload.challengeId!==e.loadingResultsForChallengeId?e:t.error?(f.default.error(t.payload),(0,i.default)({},e,{loadingResultsForChallengeId:"",results:null,resultsLoadedForChallengeId:""})):(0,i.default)({},e,{loadingResultsForChallengeId:"",results:t.payload.results,resultsLoadedForChallengeId:t.payload.challengeId})}function T(e,t){return t.error?(f.default.error("Failed to register for the challenge!",t.payload),(0,p.fireErrorMessage)("ERROR: Failed to register for the challenge!"),(0,i.default)({},e,{registering:!1})):y((0,i.default)({},e,{registering:!1,loadingDetailsForChallengeId:s.default.toString(e.details.id)}),t)}function C(e,t){return t.error?(f.default.error("Failed to register for the challenge!",t.payload),(0,p.fireErrorMessage)("ERROR: Failed to unregister for the challenge!"),(0,i.default)({},e,{unregistering:!1})):y((0,i.default)({},e,{unregistering:!1,loadingDetailsForChallengeId:s.default.toString(e.details.id)}),t)}function S(e,t){var r=t.payload;return(0,i.default)({},e,{updatingChallengeUuid:r})}function I(e,t){var r=t.error,n=t.payload;if(r)return(0,p.fireErrorMessage)("Failed to save the challenge!",""),f.default.error("Failed to save the challenge",n),e;if(n.uuid!==e.updatingChallengeUuid)return e;var o=s.default.pick(n.res,["detailedRequirements","introduction","round1Introduction","round2Introduction","submissionGuidelines"]);return(0,i.default)({},e,{details:(0,i.default)({},e.details,o),updatingChallengeUuid:""})}function k(e,t){var r=t.payload;return t.error?((0,p.fireErrorMessage)("Failed to get active challenges count!",""),f.default.error("Failed to get active challenges count",r),e):(0,i.default)({},e,{activeChallengesCount:r})}function O(e){var t,r=c.default.challenge;return(0,u.handleActions)((t={},(0,a.default)(t,r.dropCheckpoints,function(e){return(0,i.default)({},e,{checkpoints:null})}),(0,a.default)(t,r.dropResults,function(e){return(0,i.default)({},e,{results:null})}),(0,a.default)(t,r.getDetailsInit,g),(0,a.default)(t,r.getDetailsDone,y),(0,a.default)(t,r.getSubmissionsInit,v),(0,a.default)(t,r.getSubmissionsDone,b),(0,a.default)(t,d.default.smp.deleteSubmissionDone,function(e,t){var r=t.payload;return(0,i.default)({},e,{mySubmissions:(0,i.default)({},e.mySubmissions,{v2:e.mySubmissions.v2.filter(function(e){return e.submissionId!==r})})})}),(0,a.default)(t,r.registerInit,function(e){return(0,i.default)({},e,{registering:!0})}),(0,a.default)(t,r.registerDone,T),(0,a.default)(t,r.unregisterInit,function(e){return(0,i.default)({},e,{unregistering:!0})}),(0,a.default)(t,r.unregisterDone,C),(0,a.default)(t,r.loadResultsInit,w),(0,a.default)(t,r.loadResultsDone,E),(0,a.default)(t,r.fetchCheckpointsInit,function(e){return(0,i.default)({},e,{checkpoints:null,loadingCheckpoints:!0})}),(0,a.default)(t,r.fetchCheckpointsDone,_),(0,a.default)(t,r.updateChallengeInit,S),(0,a.default)(t,r.updateChallengeDone,I),(0,a.default)(t,r.getActiveChallengesCountInit,function(e){return e}),(0,a.default)(t,r.getActiveChallengesCountDone,k),t),s.default.defaults(e,{details:null,loadingCheckpoints:!1,loadingDetailsForChallengeId:"",loadingResultsForChallengeId:"",mySubmissions:{},checkpoints:null,registering:!1,results:null,resultsLoadedForChallengeId:"",unregistering:!1,updatingChallengeUuid:""}))}t.default=l.redux.combineReducers(O(),{mySubmissionsManagement:h.default})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=f(r(1)),o=f(r(6)),a=f(r(19)),i=f(r(3));t.factory=function(){return n.default.resolve(L())};var s=f(r(0)),u=r(2),l=f(r(25)),c=f(r(11)),d=r(12);function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){var r=t.payload;return t.error?(0,i.default)({},e,{loadingError:!0}):(0,i.default)({},e,{achievements:r.Achievements,copilot:r.copilot,country:r.country,loadingError:!1})}function h(e,t){var r=t.payload;return t.error?(0,i.default)({},e,{loadingError:!0}):(0,i.default)({},e,{achievements:r.achievements||[],copilot:r.copilot,country:r.country,loadingError:!1})}function m(e,t){var r=t.payload;return t.error?(0,i.default)({},e,{loadingError:!0}):(0,i.default)({},e,{externalAccounts:r})}function g(e,t){var r=t.payload;return t.error?(0,i.default)({},e,{loadingError:!0}):(0,i.default)({},e,{externalLinks:r})}function y(e,t){var r=t.payload;return t.error?(0,i.default)({},e,{loadingError:!0}):(0,i.default)({},e,{info:r,loadingError:!1})}function v(e,t){var r=t.payload;return t.error?(0,i.default)({},e,{loadingError:!0}):(0,i.default)({},e,{skills:r.skills,loadingError:!1})}function b(e,t){var r=t.payload;return t.error?(0,i.default)({},e,{loadingError:!0}):(0,i.default)({},e,{stats:r,loadingError:!1})}function _(e,t){var r=t.payload;return t.error?(0,i.default)({},e,{loadingError:!0}):(0,i.default)({},e,{linkedAccounts:r.profiles,loadingError:!1})}function w(e,t){var r=t.payload;return t.error?(0,i.default)({},e,{loadingError:!0}):(0,i.default)({},e,{credential:r.credential,loadingError:!1})}function E(e,t){var r=t.payload;return t.error?(0,i.default)({},e,{loadingError:!0}):(0,i.default)({},e,{emailPreferences:r.subscriptions,loadingError:!1})}function T(e,t){var r=t.payload,n=t.error,o=(0,i.default)({},e,{uploadingPhoto:!1});return n?(c.default.error("Failed to upload user photo",r),(0,d.fireErrorMessage)("ERROR: Failed to upload photo!"),o):o.info&&o.info.handle===r.handle?(0,i.default)({},o,{info:(0,i.default)({},o.info,{photoURL:r.photoURL})}):o}function C(e,t){var r=t.payload,n=t.error,o=(0,i.default)({},e,{deletingPhoto:!1});return n?(c.default.error("Failed to delete user photo",r),(0,d.fireErrorMessage)("ERROR: Failed to delete photo!"),o):o.info&&o.info.handle===r.handle?(0,i.default)({},o,{info:(0,i.default)({},o.info,{photoURL:null})}):o}function S(e,t){var r=t.payload,n=t.error,o=(0,i.default)({},e,{updatingProfile:!1});return r.isEmailConflict?(0,i.default)({},o,{isEmailConflict:!0,updateProfileSuccess:!1}):n?(c.default.error("Failed to update user profile",r),(0,d.fireErrorMessage)("ERROR: Failed to update user profile!"),(0,i.default)({},o,{updateProfileSuccess:!1})):o.info&&o.info.handle===r.handle?(0,i.default)({},o,{info:(0,i.default)({},o.info,r),updateProfileSuccess:!0}):(0,i.default)({},o,{updateProfileSuccess:!0})}function I(e,t){var r=t.payload,n=t.error,o=(0,i.default)({},e,{addingSkill:!1});return n?(c.default.error("Failed to add user skill",r),(0,d.fireErrorMessage)("ERROR: Failed to add user skill!"),o):o.profileForHandle!==r.handle?o:(0,i.default)({},o,{skills:r.skills})}function k(e,t){var r=t.payload,n=t.error,o=(0,i.default)({},e,{hidingSkill:!1});return n?(c.default.error("Failed to remove user skill",r),(0,d.fireErrorMessage)("ERROR: Failed to remove user skill!"),o):o.profileForHandle!==r.handle?o:(0,i.default)({},o,{skills:r.skills})}function O(e,t){var r=t.payload,n=t.error,o=(0,i.default)({},e,{addingWebLink:!1});return n?(c.default.error("Failed to add web link",r),(0,d.fireErrorMessage)("ERROR: Failed to add web link!"),o):o.profileForHandle===r.handle&&r.data?(0,i.default)({},o,{externalLinks:[].concat((0,a.default)(o.externalLinks),[r.data])}):o}function A(e,t){var r=t.payload,n=t.error,o=(0,i.default)({},e,{deletingWebLink:!1});return n?(c.default.error("Failed to delete web link",r),(0,d.fireErrorMessage)("ERROR: Failed to delete web link!"),o):o.profileForHandle===r.handle&&r.data?(0,i.default)({},o,{externalLinks:s.default.filter(o.externalLinks,function(e){return e.key!==r.data.key})}):o}function R(e,t){var r=t.payload,n=t.error,o=(0,i.default)({},e,{linkingExternalAccount:!1});return n?(c.default.error("Failed to link external account",r),(0,d.fireErrorMessage)("ERROR: Failed to link external account!"),o):o.profileForHandle===r.handle&&r.data?(0,i.default)({},o,{linkedAccounts:[].concat((0,a.default)(o.linkedAccounts),[r.data])}):o}function D(e,t){var r=t.payload,n=t.error,o=(0,i.default)({},e,{unlinkingExternalAccount:!1});return n?(c.default.error("Failed to unlink external account",r),(0,d.fireErrorMessage)("ERROR: Failed to unlink external account!"),o):o.profileForHandle!==r.handle?o:(0,i.default)({},o,{linkedAccounts:s.default.filter(o.linkedAccounts,function(e){return e.providerType!==r.providerType})})}function P(e,t){var r=t.payload,n=t.error,o=(0,i.default)({},e,{savingEmailPreferences:!1});return n?(c.default.error("Failed to save email preferences",r),(0,d.fireErrorMessage)("ERROR: Failed to save email preferences!"),o):o.profileForHandle===r.handle&&r.data?(0,i.default)({},o,{emailPreferences:r.data.subscriptions}):o}function x(e,t){var r=t.payload,n=t.error,o=(0,i.default)({},e,{updatingPassword:!1});return n&&(c.default.error("Failed to update password",r),(0,d.fireErrorMessage)("The old password is invalid")),o}function N(e,t){var r=t.payload,n=t.error,o=(0,i.default)({},e,{verifyingEmail:!1});return n?(c.default.error("Failed to verify member new email",r),(0,i.default)({},o,{verifyError:!0})):(0,i.default)({},o,{verifyError:!1,emailChangeResult:r.data})}function U(e,t){var r=t.payload;return(0,i.default)({},e,{isEmailConflict:r})}function L(e){var t,r=l.default.profile;return(0,u.handleActions)((t={},(0,o.default)(t,r.clearProfile,function(e){return(0,i.default)({},e,{achievements:null,country:"",info:null,skills:null,stats:null})}),(0,o.default)(t,r.loadProfile,function(e,t){return(0,i.default)({},e,{profileForHandle:t.payload})}),(0,o.default)(t,r.getAchievementsInit,function(e){return e}),(0,o.default)(t,r.getAchievementsDone,p),(0,o.default)(t,r.getAchievementsV3Done,h),(0,o.default)(t,r.getExternalAccountsInit,function(e){return e}),(0,o.default)(t,r.getExternalAccountsDone,m),(0,o.default)(t,r.getExternalLinksInit,function(e){return e}),(0,o.default)(t,r.getExternalLinksDone,g),(0,o.default)(t,r.getInfoInit,function(e){return e}),(0,o.default)(t,r.getInfoDone,y),(0,o.default)(t,r.getSkillsInit,function(e){return e}),(0,o.default)(t,r.getSkillsDone,v),(0,o.default)(t,r.getStatsInit,function(e){return e}),(0,o.default)(t,r.getStatsDone,b),(0,o.default)(t,r.getLinkedAccountsInit,function(e){return e}),(0,o.default)(t,r.getLinkedAccountsDone,_),(0,o.default)(t,r.uploadPhotoInit,function(e){return(0,i.default)({},e,{uploadingPhoto:!0})}),(0,o.default)(t,r.uploadPhotoDone,T),(0,o.default)(t,r.deletePhotoInit,function(e){return(0,i.default)({},e,{deletingPhoto:!0})}),(0,o.default)(t,r.deletePhotoDone,C),(0,o.default)(t,r.updateProfileInit,function(e){return(0,i.default)({},e,{updatingProfile:!0})}),(0,o.default)(t,r.updateProfileDone,S),(0,o.default)(t,r.addSkillInit,function(e){return(0,i.default)({},e,{addingSkill:!0})}),(0,o.default)(t,r.addSkillDone,I),(0,o.default)(t,r.hideSkillInit,function(e){return(0,i.default)({},e,{hidingSkill:!0})}),(0,o.default)(t,r.hideSkillDone,k),(0,o.default)(t,r.addWebLinkInit,function(e){return(0,i.default)({},e,{addingWebLink:!0})}),(0,o.default)(t,r.addWebLinkDone,O),(0,o.default)(t,r.deleteWebLinkInit,function(e){return(0,i.default)({},e,{deletingWebLink:!0})}),(0,o.default)(t,r.deleteWebLinkDone,A),(0,o.default)(t,r.linkExternalAccountInit,function(e){return(0,i.default)({},e,{linkingExternalAccount:!0})}),(0,o.default)(t,r.linkExternalAccountDone,R),(0,o.default)(t,r.unlinkExternalAccountInit,function(e){return(0,i.default)({},e,{unlinkingExternalAccount:!0})}),(0,o.default)(t,r.unlinkExternalAccountDone,D),(0,o.default)(t,r.getCredentialInit,function(e){return e}),(0,o.default)(t,r.getCredentialDone,w),(0,o.default)(t,r.getEmailPreferencesInit,function(e){return e}),(0,o.default)(t,r.getEmailPreferencesDone,E),(0,o.default)(t,r.saveEmailPreferencesInit,function(e){return(0,i.default)({},e,{savingEmailPreferences:!0})}),(0,o.default)(t,r.saveEmailPreferencesDone,P),(0,o.default)(t,r.updatePasswordInit,function(e){return(0,i.default)({},e,{updatingPassword:!0})}),(0,o.default)(t,r.updatePasswordDone,x),(0,o.default)(t,r.verifyMemberNewEmailInit,function(e){return(0,i.default)({},e,{verifyingEmail:!0})}),(0,o.default)(t,r.verifyMemberNewEmailDone,N),(0,o.default)(t,r.updateEmailConflict,U),t),s.default.defaults(e,{achievements:null,copilot:!1,country:"",info:null,loadingError:!1,skills:null,stats:null,verifyError:null,updateProfileSuccess:null}))}t.default=L()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=f(r(1)),o=f(r(19)),a=f(r(6)),i=f(r(3));t.factory=function(){return n.default.resolve(x())};var s=f(r(0)),u=r(2),l=f(r(11)),c=f(r(41)),d=r(12);function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){var r=t.payload;return e[r]?s.default.omit(e,r):e}function h(){return{}}function m(e,t){var r=t.payload,n=r.handle,o=r.uuid,u=e[n];return(u=u?s.default.clone(u):{}).achievements={loadingUuid:o},(0,i.default)({},e,(0,a.default)({},n,u))}function g(e,t){var r=t.error,n=t.payload;if(r)return l.default.error("Failed to load member achievements",n),(0,d.fireErrorMessage)("Failed to load member achievements"),e;var o=n.data,u=n.handle;return n.uuid!==s.default.get(e[u],"achievements.loadingUuid")?e:(0,i.default)({},e,(0,a.default)({},u,(0,i.default)({},e[u],{achievements:{data:o,timestamp:Date.now()}})))}function y(e,t){var r=t.payload,n=r.handle,o=r.uuid,s=(0,i.default)({},e[n]||{},{finances:{loadingUuid:o,timestamp:0}});return(0,i.default)({},e,(0,a.default)({},n,s))}function v(e,t){var r=t.error,n=t.payload;if(r)return l.default.error("Failed to get user financial info",n),(0,d.fireErrorMessage)("Failed to get user financial info",""),e;var o=n.data,u=n.handle;return n.uuid!==s.default.get(e[u],"finances.loadingUuid")?e:(0,i.default)({},e,(0,a.default)({},u,(0,i.default)({},e[u],{finances:{data:o,loadingUuid:"",timestamp:Date.now()}})))}function b(e,t){var r=t.payload,n=r.handle,o=r.uuid,u=e[n];return(u=u?s.default.clone(u):{}).stats={loadingUuid:o},(0,i.default)({},e,(0,a.default)({},n,u))}function _(e,t){var r=t.error,n=t.payload;if(r)return l.default.error("Failed to get member stats",n),(0,d.fireErrorMessage)("Failed to get member stats",""),e;var o=n.data,u=n.handle;return n.uuid!==s.default.get(e[u],"stats.loadingUuid")?e:(0,i.default)({},e,(0,a.default)({},u,(0,i.default)({},e[u],{stats:{data:o,timestamp:Date.now()}})))}function w(e,t){var r=t.payload,n=r.handle,o=r.uuid,u=e[n];return(u=u?s.default.clone(u):{}).statsHistory={loadingUuid:o},(0,i.default)({},e,(0,a.default)({},n,u))}function E(e,t){var r=t.error,n=t.payload;if(r)return l.default.error("Failed to get member statsHistory",n),(0,d.fireErrorMessage)("Failed to get member statsHistory",""),e;var o=n.data,u=n.handle;return n.uuid!==s.default.get(e[u],"statsHistory.loadingUuid")?e:(0,i.default)({},e,(0,a.default)({},u,(0,i.default)({},e[u],{statsHistory:{data:o,timestamp:Date.now()}})))}function T(e,t){var r=t.payload,n=r.handle,o=r.uuid,u=e[n];return(u=u?s.default.clone(u):{}).statsDistribution={loadingUuid:o},(0,i.default)({},e,(0,a.default)({},n,u))}function C(e,t){var r=t.error,n=t.payload;if(r)return l.default.error("Failed to get member statsDistribution",n),(0,d.fireErrorMessage)("Failed to get member statsDistribution",""),e;var o=n.data,u=n.handle;return n.uuid!==s.default.get(e[u],"statsDistribution.loadingUuid")?e:(0,i.default)({},e,(0,a.default)({},u,(0,i.default)({},e[u],{statsDistribution:{data:o,timestamp:Date.now()}})))}function S(e,t){var r=t.payload.handle;return(0,i.default)({},e,(0,a.default)({},r,(0,i.default)({},e[r],{activeChallengesCount:null})))}function I(e,t){var r=t.error,n=t.payload;if(r)return l.default.error("Failed to get member active challenges",n),(0,d.fireErrorMessage)("Failed to get member active challenges",""),e;var o=n.handle,s=n.challenges;return(0,i.default)({},e,(0,a.default)({},o,(0,i.default)({},e[o],{activeChallengesCount:s.length})))}function k(e,t){var r=t.payload,n=r.handle,o=r.uuid;return(0,i.default)({},e,(0,a.default)({},n,(0,i.default)({},e[n],{loadingSubTrackChallengesUUID:o})))}function O(e,t){var r=t.error,n=t.payload;if(r)return l.default.error("Failed to get member subtrack challenges",n),(0,d.fireErrorMessage)("Failed to get member subtrack challenges",""),e;var s=n.uuid,u=n.challenges,c=n.refresh,f=n.handle;return s!==e[f].loadingSubTrackChallengesUUID?e:(0,i.default)({},e,(0,a.default)({},f,(0,i.default)({},e[f],{subtrackChallenges:e[f].subtrackChallenges&&!c?[].concat((0,o.default)(e[f].subtrackChallenges),(0,o.default)(u)):u,subtrackChallengesHasMore:u&&u.length>0,loadingSubTrackChallengesUUID:""})))}function A(e,t){var r=t.payload,n=r.handle,o=r.uuid;return(0,i.default)({},e,(0,a.default)({},n,(0,i.default)({},e[n],{loadingSRMUUID:o})))}function R(e,t){var r=t.error,n=t.payload;if(r)return l.default.error("Failed to get member SRMs",n),(0,d.fireErrorMessage)("Failed to get member SRMs",""),e;var s=n.uuid,u=n.srms,c=n.refresh,f=n.handle;return s!==e[f].loadingSRMUUID?e:(0,i.default)({},e,(0,a.default)({},f,(0,i.default)({},e[f],{userSRMs:e[f].userSRMs&&!c?[].concat((0,o.default)(e[f].userSRMs),(0,o.default)(u)):u,userSRMHasMore:u&&u.length>0,loadingSRMUUID:""})))}function D(e,t){var r=t.payload,n=r.handle,o=r.uuid;return(0,i.default)({},e,(0,a.default)({},n,(0,i.default)({},e[n],{loadingMarathonUUID:o})))}function P(e,t){var r=t.error,n=t.payload;if(r)return l.default.error("Failed to get member marathons",n),(0,d.fireErrorMessage)("Failed to get member marathons",""),e;var s=n.uuid,u=n.marathons,c=n.refresh,f=n.handle;return s!==e[f].loadingMarathonUUID?e:(0,i.default)({},e,(0,a.default)({},f,(0,i.default)({},e[f],{userMarathons:e[f].userMarathons&&!c?[].concat((0,o.default)(e[f].userMarathons),(0,o.default)(u.challenges)):u.challenges,userMarathonHasMore:u&&u.challenges&&u.challenges.length>0,loadingMarathonUUID:""})))}function x(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=c.default.members;return(0,u.handleActions)((e={},(0,a.default)(e,r.drop,p),(0,a.default)(e,r.dropAll,h),(0,a.default)(e,r.getAchievementsInit,m),(0,a.default)(e,r.getAchievementsDone,g),(0,a.default)(e,r.getAchievementsV3Done,g),(0,a.default)(e,r.getFinancesInit,y),(0,a.default)(e,r.getFinancesDone,v),(0,a.default)(e,r.getStatsInit,b),(0,a.default)(e,r.getStatsDone,_),(0,a.default)(e,r.getStatsHistoryInit,w),(0,a.default)(e,r.getStatsHistoryDone,E),(0,a.default)(e,r.getStatsDistributionInit,T),(0,a.default)(e,r.getStatsDistributionDone,C),(0,a.default)(e,r.getActiveChallengesInit,S),(0,a.default)(e,r.getActiveChallengesDone,I),(0,a.default)(e,r.getSubtrackChallengesInit,k),(0,a.default)(e,r.getSubtrackChallengesDone,O),(0,a.default)(e,r.getUserSrmInit,A),(0,a.default)(e,r.getUserSrmDone,R),(0,a.default)(e,r.getUserMarathonInit,D),(0,a.default)(e,r.getUserMarathonDone,P),e),t)}t.default=x()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=c(r(1)),o=c(r(6)),a=c(r(3));t.factory=function(){return n.default.resolve(p())};var i=c(r(0)),s=r(2),u=c(r(11)),l=c(r(45));function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t){var r=t.payload;return t.error?(u.default.error("Failed to get skill tags",r),(0,a.default)({},e,{loadingSkillTagsError:!0})):(0,a.default)({},e,{loadingSkillTagsError:!1,skillTags:r})}function f(e,t){var r=t.payload;return t.error?(u.default.error("Failed to get countries",r),(0,a.default)({},e,{loadingCountriesError:!0})):(0,a.default)({},e,{loadingCountriesError:!1,countries:r})}function p(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=l.default.lookup;return(0,s.handleActions)((e={},(0,o.default)(e,r.getSkillTagsInit,function(e){return e}),(0,o.default)(e,r.getSkillTagsDone,d),(0,o.default)(e,r.getCountriesInit,function(e){return e}),(0,o.default)(e,r.getCountriesDone,f),e),i.default.defaults(t,{skillTags:[],countries:[]}))}t.default=p()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=d(r(1)),o=d(r(6)),a=d(r(3));t.factory=function(){return n.default.resolve(m())};var i=d(r(0)),s=r(8),u=d(r(11)),l=r(42),c=d(l);function d(e){return e&&e.__esModule?e:{default:e}}function f(e){return(0,a.default)({},e,{allLoaded:!1,lastRequestedPageNum:-1,loadingUuid:"",tasks:[],timestamp:0})}function p(e,t){var r=t.payload;return(0,a.default)({},e,{lastRequestedPageNum:r.pageNum,loadingUuid:r.uuid})}function h(e,t){var r=t.error,n=t.payload;if(r)return u.default.error(n),s.isomorphy.isClientSide()&&alert("Failed to load member tasks"),e;var o=n.projectId,c=n.tasks;if(n.uuid!==e.loadingUuid)return e;var d={};e.tasks.forEach(function(e){d[e.id]=e}),c.forEach(function(e){d[e.id]=e});var f=e.timestamps;return e.lastRequestedPageNum||((f=i.default.clone(f))[o]=Date.now()),(0,a.default)({},e,{allLoaded:c.length0&&void 0!==arguments[0]?arguments[0]:{},r=c.default.memberTasks;return s.redux.handleActions((e={},(0,o.default)(e,r.dropAll,f),(0,o.default)(e,r.getInit,p),(0,o.default)(e,r.getDone,h),e),i.default.defaults(t,{allLoaded:!1,lastRequestedPageNum:-1,loadingUuid:"",tasks:[],timestamps:{}}))}t.default=m()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=l(r(1)),o=l(r(6)),a=l(r(3));t.factory=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=i.default.get(e,"reviewOpportunity.challenge.id");if(t){var r={tokenV2:i.default.get(e.auth,"tokenV2"),tokenV3:i.default.get(e.auth,"tokenV3")},o=u.default.reviewOpportunity;return s.redux.resolveAction(o.getDetailsDone(t,r.tokenV3)).then(function(e){var t=e.error,r=e.payload,n={};n.details=t?null:r,n.requiredTerms=t?[]:c(r),f(n)})}return n.default.resolve(f())};var i=l(r(0)),s=r(8),u=l(r(43));function l(e){return e&&e.__esModule?e:{default:e}}function c(e){var t=e.payments.map(function(e){return e.role});return i.default.uniqBy(e.challenge.terms.filter(function(e){return"Reviewer"===e.role||i.default.includes(t,e.role)}).map(function(e){return i.default.pick(e,["termsOfUseId","agreed","title"])}),function(e){return e.termsOfUseId})||[]}function d(e,t){var r=t.payload;return t.error?(0,a.default)({},e,{authError:!0,isLoadingDetails:!1}):(0,a.default)({},e,{details:r,isLoadingDetails:!1,requiredTerms:c(r)})}function f(e){var t,r=u.default.reviewOpportunity;return s.redux.handleActions((t={},(0,o.default)(t,r.cancelApplicationsInit,function(e){return e}),(0,o.default)(t,r.cancelApplicationsDone,function(e){return e}),(0,o.default)(t,r.getDetailsInit,function(e){return(0,a.default)({},e,{isLoadingDetails:!0})}),(0,o.default)(t,r.getDetailsDone,d),(0,o.default)(t,r.submitApplicationsInit,function(e){return e}),(0,o.default)(t,r.submitApplicationsDone,function(e){return e}),t),i.default.defaults(e,{authError:!1,details:null,isLoadingDetails:!1,requiredTerms:[]}))}t.default=f()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=d(r(1)),o=d(r(6)),a=d(r(19)),i=d(r(3));t.factory=function(){return n.default.resolve(y())};var s=r(2),u=d(r(11)),l=d(r(47)),c=r(12);function d(e){return e&&e.__esModule?e:{default:e}}function f(e,t){var r=t.error,n=t.payload;return r?(u.default.error("Failed to get all user traits",n),(0,i.default)({},e,{userTraits:[]})):(0,i.default)({},e,{userTraits:n.data})}function p(e){return(0,i.default)({},e,{traitRequestCount:e.traitRequestCount+1})}function h(e,t){var r=t.error,n=t.payload;if(r)return u.default.error("Failed to add user trait",n),(0,c.fireErrorMessage)("Failed to add user trait",""),(0,i.default)({},e,{traitRequestCount:e.traitRequestCount-1});var o=n.result[0];return(0,i.default)({},e,{userTraits:[].concat((0,a.default)(e.userTraits),[o]),traitRequestCount:e.traitRequestCount-1})}function m(e,t){var r=t.error,n=t.payload;if(r)return u.default.error("Failed to update user trait",n),(0,c.fireErrorMessage)("Failed to update user trait",""),(0,i.default)({},e,{traitRequestCount:e.traitRequestCount-1});var o=n.result[0],a=e.userTraits.filter(function(e){return e.traitId!==n.traitId});return a.push(o),(0,i.default)({},e,{userTraits:a,traitRequestCount:e.traitRequestCount-1})}function g(e,t){var r=t.error,n=t.payload;if(r)return u.default.error("Failed to delete user trait",n),(0,c.fireErrorMessage)("Failed to delete user trait",""),(0,i.default)({},e,{traitRequestCount:e.traitRequestCount-1});var o=e.userTraits.filter(function(e){return e.traitId!==n.traitId});return(0,i.default)({},e,{userTraits:o,traitRequestCount:e.traitRequestCount-1})}function y(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{traitRequestCount:0,userTraits:[]},r=l.default.settings;return(0,s.handleActions)((e={},(0,o.default)(e,r.getAllUserTraits,f),(0,o.default)(e,r.modifyUserTraitInit,p),(0,o.default)(e,r.addUserTrait,h),(0,o.default)(e,r.deleteUserTrait,g),(0,o.default)(e,r.updateUserTrait,m),e),t)}t.default=y()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=l(r(1)),o=l(r(6)),a=l(r(3));t.factory=function(){return n.default.resolve(d())};var i=l(r(0)),s=r(2),u=l(r(49));function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){var r=t.payload,n=r.data,o=n.res,i=n.error,s=r.lookerId,u=(0,a.default)({},e.dataSet);return u[s]={lookerData:o,error:i,msg:o.message},(0,a.default)({},e,{dataSet:u})}function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=u.default.looker;return(0,s.handleActions)((0,o.default)({},t.getLookerDone,c),i.default.defaults(e,{dataSet:{}}))}t.default=d()}])});
\ No newline at end of file
diff --git a/docs/actions.members.md b/docs/actions.members.md
index 7a04f558..0a0e18e8 100644
--- a/docs/actions.members.md
+++ b/docs/actions.members.md
@@ -9,6 +9,7 @@ Actions related to members data.
* [.dropAll()](#module_actions.members.dropAll) ⇒ Action
* [.getAchievementsInit(handle, uuid)](#module_actions.members.getAchievementsInit) ⇒ Action
* [.getAchievementsDone(handle, uuid)](#module_actions.members.getAchievementsDone) ⇒ Action
+ * [.getAchievementsV3Done(handle, uuid)](#module_actions.members.getAchievementsV3Done) ⇒ Action
* [.getFinancesInit(handle, uuid)](#module_actions.members.getFinancesInit) ⇒ Action
* [.getFinancesDone(handle, uuid, tokenV3)](#module_actions.members.getFinancesDone) ⇒ Action
* [.getStatsInit(handle, uuid)](#module_actions.members.getStatsInit) ⇒ Action
@@ -55,7 +56,19 @@ Creates an action that signals beginning of member achievements
### actions.members.getAchievementsDone(handle, uuid) ⇒ Action
-Creates an action that loads member achievements.
+Creates an action that loads member achievements from v2 API.
+
+**Kind**: static method of [actions.members
](#module_actions.members)
+
+| Param | Type | Description |
+| --- | --- | --- |
+| handle | String
| Member handle. |
+| uuid | String
| Loading operation |
+
+
+
+### actions.members.getAchievementsV3Done(handle, uuid) ⇒ Action
+Creates an action that loads member achievements from v3 API.
**Kind**: static method of [actions.members
](#module_actions.members)
diff --git a/docs/actions.profile.md b/docs/actions.profile.md
index 528d0612..9129918d 100644
--- a/docs/actions.profile.md
+++ b/docs/actions.profile.md
@@ -14,6 +14,7 @@ Actions for interactions with profile details API.
* [.clearProfile()](#module_actions.profile.clearProfile) ⇒ Action
* [.getAchievementsInit()](#module_actions.profile.getAchievementsInit) ⇒ Action
* [.getAchievementsDone(handle)](#module_actions.profile.getAchievementsDone) ⇒ Action
+ * [.getAchievementsV3Done(handle)](#module_actions.profile.getAchievementsV3Done) ⇒ Action
* [.getExternalAccountsInit()](#module_actions.profile.getExternalAccountsInit) ⇒ Action
* [.getExternalAccountsDone(handle)](#module_actions.profile.getExternalAccountsDone) ⇒ Action
* [.getExternalLinksInit()](#module_actions.profile.getExternalLinksInit) ⇒ Action
@@ -94,7 +95,7 @@ Creates an action that signals beginning of user achievements loading.
### actions.profile.getAchievementsDone(handle) ⇒ Action
-Creates an action that loads user achievements.
+Creates an action that loads user achievements from v2 API.
**Kind**: static method of [actions.profile
](#module_actions.profile)
**Todo**
@@ -106,6 +107,13 @@ Creates an action that loads user achievements.
| --- | --- | --- |
| handle | String
| User handle. |
+
+
+### actions.profile.getAchievementsV3Done(handle) ⇒ Action
+Creates an action that loads user achievements from V3 API.
+
+**Kind**: static method of [actions.profile
](#module_actions.profile)
+
### actions.profile.getExternalAccountsInit() ⇒ Action
diff --git a/docs/reducers.members.md b/docs/reducers.members.md
index 4d75fcfc..56811eb3 100644
--- a/docs/reducers.members.md
+++ b/docs/reducers.members.md
@@ -17,6 +17,7 @@ Reducer for the Redux store segment that holds members data.
* [~onDropAll()](#module_reducers.members..onDropAll) ⇒ Object
* [~onGetAchievementsInit(state)](#module_reducers.members..onGetAchievementsInit) ⇒ Object
* [~onGetAchievementsDone(state, error)](#module_reducers.members..onGetAchievementsDone) ⇒ Object
+ * [~onGetAchievementsV3Done(state, error)](#module_reducers.members..onGetAchievementsV3Done) ⇒ Object
* [~onGetFinancesInit(state)](#module_reducers.members..onGetFinancesInit) ⇒ Object
* [~onGetFinancesDone(state, action)](#module_reducers.members..onGetFinancesDone) ⇒ Object
* [~onGetStatsInit(state, action)](#module_reducers.members..onGetStatsInit) ⇒ Object
@@ -81,7 +82,23 @@ Inits the loading of member achievements.
### reducers.members~onGetAchievementsDone(state, error) ⇒ Object
-Finalizes the loading of member achievements.
+Finalizes the loading of member achievements from v2 API.
+
+**Kind**: inner method of [reducers.members
](#module_reducers.members)
+**Returns**: Object
- New state.
+
+| Param | Type |
+| --- | --- |
+| state | Object
|
+| error | Object
|
+| payload.data | Array
|
+| payload.handle | String
|
+| payload.uuid | String
|
+
+
+
+### reducers.members~onGetAchievementsV3Done(state, error) ⇒ Object
+Finalizes the loading of member achievements from v3 API.
**Kind**: inner method of [reducers.members
](#module_reducers.members)
**Returns**: Object
- New state.
diff --git a/docs/reducers.profile.md b/docs/reducers.profile.md
index 43d9ad78..21ae1d12 100644
--- a/docs/reducers.profile.md
+++ b/docs/reducers.profile.md
@@ -14,6 +14,7 @@ Actions for interactions with profile details API.
* [.clearProfile()](#module_actions.profile.clearProfile) ⇒ Action
* [.getAchievementsInit()](#module_actions.profile.getAchievementsInit) ⇒ Action
* [.getAchievementsDone(handle)](#module_actions.profile.getAchievementsDone) ⇒ Action
+ * [.getAchievementsV3Done(handle)](#module_actions.profile.getAchievementsV3Done) ⇒ Action
* [.getExternalAccountsInit()](#module_actions.profile.getExternalAccountsInit) ⇒ Action
* [.getExternalAccountsDone(handle)](#module_actions.profile.getExternalAccountsDone) ⇒ Action
* [.getExternalLinksInit()](#module_actions.profile.getExternalLinksInit) ⇒ Action
@@ -94,7 +95,22 @@ Creates an action that signals beginning of user achievements loading.
### actions.profile.getAchievementsDone(handle) ⇒ Action
-Creates an action that loads user achievements.
+Creates an action that loads user achievements from v2 API.
+
+**Kind**: static method of [actions.profile
](#module_actions.profile)
+**Todo**
+
+- [ ] This duplicates similar action in [actions.members.md](actions.members.md)!
+
+
+| Param | Type | Description |
+| --- | --- | --- |
+| handle | String
| User handle. |
+
+
+
+### actions.profile.getAchievementsV3Done(handle) ⇒ Action
+Creates an action that loads user achievements from v3 API.
**Kind**: static method of [actions.profile
](#module_actions.profile)
**Todo**
diff --git a/docs/services.user.md b/docs/services.user.md
index de282529..fc039b68 100644
--- a/docs/services.user.md
+++ b/docs/services.user.md
@@ -14,6 +14,7 @@ The User service provides functionality related to Topcoder user
* [new User(tokenV3, tokenV2)](#new_module_services.user..User_new)
* [.getAchievements(username)](#module_services.user..User+getAchievements) ⇒ Object
* [.getUserPublic(username)](#module_services.user..User+getUserPublic) ⇒ Object
+ * [.getUserPublicV3(username)](#module_services.user..User+getUserPublicV3) ⇒ Object
* [.getUser(username)](#module_services.user..User+getUser) ⇒ Promise
* [.getEmailPreferences(userId)](#module_services.user..User+getEmailPreferences) ⇒ Promise
* [.saveEmailPreferences(user, preferences)](#module_services.user..User+saveEmailPreferences) ⇒ Promise
@@ -54,6 +55,7 @@ Service class.
* [new User(tokenV3, tokenV2)](#new_module_services.user..User_new)
* [.getAchievements(username)](#module_services.user..User+getAchievements) ⇒ Object
* [.getUserPublic(username)](#module_services.user..User+getUserPublic) ⇒ Object
+ * [.getUserPublicV3(username)](#module_services.user..User+getUserPublicV3) ⇒ Object
* [.getUser(username)](#module_services.user..User+getUser) ⇒ Promise
* [.getEmailPreferences(userId)](#module_services.user..User+getEmailPreferences) ⇒ Promise
* [.saveEmailPreferences(user, preferences)](#module_services.user..User+saveEmailPreferences) ⇒ Promise
@@ -88,7 +90,18 @@ Gets user achievements. Does not need auth.
#### user.getUserPublic(username) ⇒ Object
-Gets public user info. Does not need auth.
+Gets public user info from v2 API. Does not need auth.
+
+**Kind**: instance method of [User
](#module_services.user..User)
+
+| Param | Type |
+| --- | --- |
+| username | String
|
+
+
+
+#### user.getUserPublicV3(username) ⇒ Object
+Gets public user info from v3 API. Does not need auth.
**Kind**: instance method of [User
](#module_services.user..User)
diff --git a/docs/tc.md b/docs/tc.md
index e1e92105..8e060798 100644
--- a/docs/tc.md
+++ b/docs/tc.md
@@ -21,7 +21,7 @@ Review Opportunity types
### tc.getApiResponsePayload(res) ⇒ Promise
-Gets payload from a standard success response from TC API; or throws
+Gets payload from a standard success response from TC v2 API; or throws
an error in case of a failure response.
**Kind**: static method of [tc
](#module_tc)
diff --git a/package-lock.json b/package-lock.json
index 05183fd7..c1a94426 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "topcoder-react-lib",
- "version": "0.7.10",
+ "version": "0.7.11",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/package.json b/package.json
index 3bd6da7c..cc4ec5c2 100644
--- a/package.json
+++ b/package.json
@@ -31,7 +31,7 @@
"lint:js": "./node_modules/.bin/eslint --ext .js,.jsx .",
"test": "npm run lint && npm run jest"
},
- "version": "0.7.10",
+ "version": "0.7.11",
"dependencies": {
"auth0-js": "^6.8.4",
"isomorphic-fetch": "^2.2.1",
diff --git a/src/actions/members.js b/src/actions/members.js
index 34425a6d..38b25a1c 100644
--- a/src/actions/members.js
+++ b/src/actions/members.js
@@ -57,6 +57,23 @@ async function getAchievementsDone(handle, uuid) {
return { data, handle, uuid };
}
+/**
+ * @static
+ * @desc Creates an action that loads member achievements from v3 API.
+ * @param {String} handle Member handle.
+ * @param {String} uuid Loading operation
+ * @return {Action}
+ */
+async function getAchievementsV3Done(handle, uuid) {
+ let data;
+ try {
+ data = await getUserService().getAchievementsV3(handle);
+ } catch (e) {
+ data = [];
+ }
+ return { data, handle, uuid };
+}
+
/**
* @static
* @desc Creates an action that signals beginning of loading the member's
@@ -344,6 +361,7 @@ export default createActions({
DROP_ALL: dropAll,
GET_ACHIEVEMENTS_INIT: getAchievementsInit,
GET_ACHIEVEMENTS_DONE: getAchievementsDone,
+ GET_ACHIEVEMENTS_V3_DONE: getAchievementsV3Done,
GET_FINANCES_INIT: getFinancesInit,
GET_FINANCES_DONE: getFinancesDone,
GET_STATS_INIT: getStatsInit,
diff --git a/src/actions/profile.js b/src/actions/profile.js
index 3996263c..21643c99 100644
--- a/src/actions/profile.js
+++ b/src/actions/profile.js
@@ -31,7 +31,7 @@ function getAchievementsInit() {}
/**
* @static
- * @desc Creates an action that loads user achievements.
+ * @desc Creates an action that loads user achievements from API v2.
* @todo This duplicates similar action in {@link actions.members.md}!
* @param {String} handle User handle.
* @return {Action}
@@ -40,6 +40,17 @@ function getAchievementsDone(handle) {
return getUserService().getUserPublic(handle);
}
+/**
+ * @static
+ * @desc Creates an action that loads user achievements from API v3.
+ * @todo This duplicates similar action in {@link actions.members.md}!
+ * @param {String} handle User handle.
+ * @return {Action}
+ */
+function getAchievementsV3Done(handle) {
+ return getUserService().getUserPublicV3(handle);
+}
+
/**
* @static
* @todo To be documented.
@@ -450,6 +461,7 @@ export default createActions({
CLEAR_PROFILE: _.noop,
GET_ACHIEVEMENTS_INIT: getAchievementsInit,
GET_ACHIEVEMENTS_DONE: getAchievementsDone,
+ GET_ACHIEVEMENTS_V3_DONE: getAchievementsV3Done,
GET_EXTERNAL_ACCOUNTS_INIT: getExternalAccountsInit,
GET_EXTERNAL_ACCOUNTS_DONE: getExternalAccountsDone,
GET_EXTERNAL_LINKS_INIT: getExternalLinksInit,
diff --git a/src/actions/settings.js b/src/actions/settings.js
index f0f506f3..7c538300 100644
--- a/src/actions/settings.js
+++ b/src/actions/settings.js
@@ -10,11 +10,10 @@ import { getService } from '../services/user-traits';
/**
* @static
* @desc Creates an action that loads user's all traits.
- * @param {String} uuid Operation UUID.
+ * @param {String} handle the topcoder member handle
* @param {String} tokenV3 v3 auth token.
* @return {Action}
*/
-
async function getAllUserTraits(handle, tokenV3) {
const data = await getService(tokenV3).getAllUserTraits(handle);
return { data, handle };
diff --git a/src/reducers/members.js b/src/reducers/members.js
index f4cce8cf..23d0a08b 100644
--- a/src/reducers/members.js
+++ b/src/reducers/members.js
@@ -438,6 +438,7 @@ function create(initialState = {}) {
[a.dropAll]: onDropAll,
[a.getAchievementsInit]: onGetAchievementsInit,
[a.getAchievementsDone]: onGetAchievementsDone,
+ [a.getAchievementsV3Done]: onGetAchievementsDone,
[a.getFinancesInit]: onGetFinancesInit,
[a.getFinancesDone]: onGetFinancesDone,
[a.getStatsInit]: onGetStatsInit,
diff --git a/src/reducers/profile.js b/src/reducers/profile.js
index 1d7711a7..8ca03fdf 100644
--- a/src/reducers/profile.js
+++ b/src/reducers/profile.js
@@ -29,6 +29,26 @@ function onGetAchievementsDone(state, { payload, error }) {
});
}
+/**
+ * Handles PROFILE/GET_ACHIEVEMENTS_V3_DONE action.
+ * @param {Object} state
+ * @param {Object} action Payload will be JSON from api call
+ * @return {Object} New state
+ */
+function onGetAchievementsV3Done(state, { payload, error }) {
+ if (error) {
+ return { ...state, loadingError: true };
+ }
+
+ return ({
+ ...state,
+ achievements: payload.achievements || [],
+ copilot: payload.copilot,
+ country: payload.country,
+ loadingError: false,
+ });
+}
+
/**
* Handles PROFILE/GET_EXTERNAL_ACCOUNTS_DONE action.
* @param {Object} state
@@ -460,6 +480,7 @@ function onVerifyMemberNewEmailDone(state, { payload, error }) {
return {
...newState,
verifyError: false,
+ emailChangeResult: payload.data,
};
}
@@ -490,6 +511,7 @@ function create(initialState) {
[a.loadProfile]: (state, action) => ({ ...state, profileForHandle: action.payload }),
[a.getAchievementsInit]: state => state,
[a.getAchievementsDone]: onGetAchievementsDone,
+ [a.getAchievementsV3Done]: onGetAchievementsV3Done,
[a.getExternalAccountsInit]: state => state,
[a.getExternalAccountsDone]: onGetExternalAccountsDone,
[a.getExternalLinksInit]: state => state,
diff --git a/src/services/user.js b/src/services/user.js
index 7da7f53b..802f5af3 100644
--- a/src/services/user.js
+++ b/src/services/user.js
@@ -141,6 +141,16 @@ class User {
return res.json() || null;
}
+ /**
+ * Gets public user info from v3 API. Does not need auth.
+ * @param {String} username
+ * @return {Object}
+ */
+ async getUserPublicV3(username) {
+ const res = await this.private.api.get(`/members/${username}`);
+ return getApiResponsePayload(res);
+ }
+
/**
* Gets user data object for the specified username.
*
diff --git a/src/utils/tc.js b/src/utils/tc.js
index 16d47b3d..77fce85a 100644
--- a/src/utils/tc.js
+++ b/src/utils/tc.js
@@ -38,7 +38,6 @@ export async function getApiResponsePayload(res) {
return x.content;
}
-
/**
* Gets payload from a standard success response from TC LOOKER API; or throws
* an error in case of a failure response.