{"ast":null,"code":"import _Reflect$construct from \"@babel/runtime-corejs2/core-js/reflect/construct\";\nimport _classCallCheck from \"@babel/runtime-corejs2/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime-corejs2/helpers/createClass\";\nimport _assertThisInitialized from \"@babel/runtime-corejs2/helpers/assertThisInitialized\";\nimport _inherits from \"@babel/runtime-corejs2/helpers/inherits\";\nimport _possibleConstructorReturn from \"@babel/runtime-corejs2/helpers/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime-corejs2/helpers/getPrototypeOf\";\nimport _defineProperty from \"@babel/runtime-corejs2/helpers/defineProperty\";\nimport _JSXStyle from \"styled-jsx/style\";\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(_Reflect$construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nimport * as React from \"react\";\nimport Link from \"next/link\";\nimport NProgress from \"nprogress\";\nimport Router from \"next/router\";\n\nRouter.onRouteChangeStart = function () {\n  NProgress.start();\n};\n\nRouter.onRouteChangeComplete = function () {\n  return NProgress.done();\n};\n\nRouter.onRouteChangeError = function () {\n  return NProgress.done();\n};\n\nimport { theme } from \"../theme\";\n\nvar CommuterMenu = /*#__PURE__*/function (_React$Component) {\n  _inherits(CommuterMenu, _React$Component);\n\n  var _super = _createSuper(CommuterMenu);\n\n  function CommuterMenu() {\n    var _this;\n\n    _classCallCheck(this, CommuterMenu);\n\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    _this = _super.call.apply(_super, [this].concat(args));\n\n    _defineProperty(_assertThisInitialized(_this), \"props\", void 0);\n\n    _defineProperty(_assertThisInitialized(_this), \"handleItemClick\", function (e, _ref) {\n      var name = _ref.name;\n      Router.push(name);\n    });\n\n    _defineProperty(_assertThisInitialized(_this), \"isActiveClass\", function (current) {\n      return _this.props.active === current ? \"active\" : \"\";\n    });\n\n    return _this;\n  }\n\n  _createClass(CommuterMenu, [{\n    key: \"render\",\n    value: function render() {\n      return /*#__PURE__*/React.createElement(\"nav\", {\n        className: _JSXStyle.dynamic([[\"2822350633\", [theme.background, theme.outline, theme.primary, theme.primary, theme.active]]]) + \" \" + \"main-header\"\n      }, /*#__PURE__*/React.createElement(\"ul\", {\n        className: _JSXStyle.dynamic([[\"2822350633\", [theme.background, theme.outline, theme.primary, theme.primary, theme.active]]]) + \" \" + \"items\"\n      }, /*#__PURE__*/React.createElement(\"li\", {\n        className: _JSXStyle.dynamic([[\"2822350633\", [theme.background, theme.outline, theme.primary, theme.primary, theme.active]]])\n      }, /*#__PURE__*/React.createElement(Link, {\n        href: \"/view\"\n      }, /*#__PURE__*/React.createElement(\"img\", {\n        src: \"/static/logo.png\",\n        alt: \"nteract logo\",\n        className: _JSXStyle.dynamic([[\"2822350633\", [theme.background, theme.outline, theme.primary, theme.primary, theme.active]]])\n      }))), /*#__PURE__*/React.createElement(\"li\", {\n        className: _JSXStyle.dynamic([[\"2822350633\", [theme.background, theme.outline, theme.primary, theme.primary, theme.active]]]) + \" \" + (this.isActiveClass(\"view\") || \"\")\n      }, /*#__PURE__*/React.createElement(Link, {\n        href: \"/view\"\n      }, /*#__PURE__*/React.createElement(\"a\", {\n        className: _JSXStyle.dynamic([[\"2822350633\", [theme.background, theme.outline, theme.primary, theme.primary, theme.active]]])\n      }, \"Browse\"))), this.props.discoveryEnabled ? /*#__PURE__*/React.createElement(\"li\", {\n        className: _JSXStyle.dynamic([[\"2822350633\", [theme.background, theme.outline, theme.primary, theme.primary, theme.active]]]) + \" \" + (this.isActiveClass(\"discover\") || \"\")\n      }, /*#__PURE__*/React.createElement(Link, {\n        href: \"/discover\"\n      }, /*#__PURE__*/React.createElement(\"a\", {\n        className: _JSXStyle.dynamic([[\"2822350633\", [theme.background, theme.outline, theme.primary, theme.primary, theme.active]]])\n      }, \"Discover\"))) : null), /*#__PURE__*/React.createElement(_JSXStyle, {\n        id: \"2822350633\",\n        dynamic: [theme.background, theme.outline, theme.primary, theme.primary, theme.active]\n      }, [\"nav.__jsx-style-dynamic-selector{background:\".concat(theme.background, \";border:1px solid \").concat(theme.outline, \";font-family:\\\"Source Sans Pro\\\";font-size:16px;color:\").concat(theme.primary, \";padding-left:1.5em;}\"), \"img.__jsx-style-dynamic-selector{padding-right:1em;}\", \"ul.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:100%;position:relative;margin:0;padding:0;text-align:center;list-style:none;}\", \"ul.__jsx-style-dynamic-selector li.__jsx-style-dynamic-selector{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;list-style-type:none;display:inline;text-align:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}\", \"ul.__jsx-style-dynamic-selector li.__jsx-style-dynamic-selector a.__jsx-style-dynamic-selector{vertical-align:middle;display:table;padding:1em;color:\".concat(theme.primary, \";-webkit-text-decoration:none;text-decoration:none;}\"), \"ul.__jsx-style-dynamic-selector li.active.__jsx-style-dynamic-selector a.__jsx-style-dynamic-selector{color:\".concat(theme.active, \";font-weight:500;-webkit-text-decoration:none;text-decoration:none;cursor:default;}\"), \"a.__jsx-style-dynamic-selector:hover{-webkit-text-decoration:underline;text-decoration:underline;}\", \"img.__jsx-style-dynamic-selector{height:2.5rem;vertical-align:middle;}\"]));\n    }\n  }]);\n\n  return CommuterMenu;\n}(React.Component);\n\n_defineProperty(CommuterMenu, \"defaultProps\", {\n  active: \"view\",\n  discoveryEnabled: true\n});\n\nexport default CommuterMenu;","map":null,"metadata":{},"sourceType":"module"}