{"ast":null,"code":"\"use strict\";\n\nvar _toConsumableArray = require(\"/home/jjglover/goallinestats/node_modules/@babel/runtime/helpers/toConsumableArray\");\n\nvar _classCallCheck = require(\"/home/jjglover/goallinestats/node_modules/@babel/runtime/helpers/classCallCheck\");\n\nvar _createClass = require(\"/home/jjglover/goallinestats/node_modules/@babel/runtime/helpers/createClass\");\n\nvar _assertThisInitialized = require(\"/home/jjglover/goallinestats/node_modules/@babel/runtime/helpers/assertThisInitialized\");\n\nvar _inherits = require(\"/home/jjglover/goallinestats/node_modules/@babel/runtime/helpers/inherits\");\n\nvar _possibleConstructorReturn = require(\"/home/jjglover/goallinestats/node_modules/@babel/runtime/helpers/possibleConstructorReturn\");\n\nvar _getPrototypeOf = require(\"/home/jjglover/goallinestats/node_modules/@babel/runtime/helpers/getPrototypeOf\");\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { 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\nexports.__esModule = true;\nexports[\"default\"] = void 0;\n\nvar _react = require(\"react\");\n\nvar isServer = false;\n\nvar _default = /*#__PURE__*/function (_react$Component) {\n  _inherits(_default, _react$Component);\n\n  var _super = _createSuper(_default);\n\n  function _default(props) {\n    var _this;\n\n    _classCallCheck(this, _default);\n\n    _this = _super.call(this, props);\n    _this._hasHeadManager = void 0;\n\n    _this.emitChange = function () {\n      if (_this._hasHeadManager) {\n        _this.props.headManager.updateHead(_this.props.reduceComponentsToState(_toConsumableArray(_this.props.headManager.mountedInstances), _this.props));\n      }\n    };\n\n    _this._hasHeadManager = _this.props.headManager && _this.props.headManager.mountedInstances;\n\n    if (isServer && _this._hasHeadManager) {\n      _this.props.headManager.mountedInstances.add(_assertThisInitialized(_this));\n\n      _this.emitChange();\n    }\n\n    return _this;\n  }\n\n  _createClass(_default, [{\n    key: \"componentDidMount\",\n    value: function componentDidMount() {\n      if (this._hasHeadManager) {\n        this.props.headManager.mountedInstances.add(this);\n      }\n\n      this.emitChange();\n    }\n  }, {\n    key: \"componentDidUpdate\",\n    value: function componentDidUpdate() {\n      this.emitChange();\n    }\n  }, {\n    key: \"componentWillUnmount\",\n    value: function componentWillUnmount() {\n      if (this._hasHeadManager) {\n        this.props.headManager.mountedInstances[\"delete\"](this);\n      }\n\n      this.emitChange();\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      return null;\n    }\n  }]);\n\n  return _default;\n}(_react.Component);\n\nexports[\"default\"] = _default;","map":null,"metadata":{},"sourceType":"script"}