'use strict';

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }

var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
require('./_to-object-329a650b.js');
require('./es6.string.iterator-cc0bbaa4.js');
require('./_library-dd23b178.js');
require('./_iter-detect-60b2f026.js');
require('./toConsumableArray-9a3476fe.js');
require('./core.get-iterator-method-f62321d4.js');
require('./_object-pie-68c5bcbc.js');
var _extends$1 = require('./extends-60837c34.js');
require('./_object-sap-5e74ba08.js');
require('./inherits-513d81cd.js');
require('./define-property-f4d12f4e.js');
require('./web.dom.iterable-a0e279c1.js');
require('./typeof-725500bc.js');
require('./_is-array-754e012d.js');
var React = require('react');
var React__default = _interopDefault(React);
require('./index-fa8ed292.js');
var PropTypes = require('prop-types');
var PropTypes__default = _interopDefault(PropTypes);
require('react-bootstrap/Row');
require('react-bootstrap/Col');
require('react-bootstrap/Card');
var moment = require('./moment-575fe24c.js');
require('next/router');
require('./isSymbol-04666465.js');
require('./debounce-eb287781.js');
require('./index.es-9110add6.js');
require('react-dom');
require('./visibility-sensor-0c45a583.js');
var index$1 = require('./index-be0c82be.js');
require('./index-da796b8c.js');
require('./main-a4cb15bb.js');
require('./entities-310b46ee.js');
require('./stringify-7c5aff47.js');
var slicedToArray = require('./slicedToArray-8f385299.js');
var asyncToGenerator = require('./asyncToGenerator-533d476a.js');
require('./_set-species-f92c67c5.js');
require('./Segment.js');
require('./Beam.js');
require('./AdSlot.js');
require('./ADInfeed-2fe7211c.js');
require('./lodash-fc2922d0.js');
require('./ADlgInfeed-14e17b43.js');
require('./getContentCategory-f38a4c00.js');
require('./AuthorComponent-bb831b74.js');
var BlockContent = require('./BlockContent-091a991f.js');
var smoothscroll = require('./smoothscroll-95231a70.js');
require('./GroupDeck.js');
require('react-bootstrap');
require('./timeDifferenceCalc.js');
var QueueDeckExpanded = require('./QueueDeckExpanded.js');
require('./iconBase-68959171.js');
require('./index.esm-90433435.js');
require('react-bootstrap/Button');
var getSerializers = require('./index-a5919bab.js');
require('./util-f2c1b65b.js');
require('./brightcove-react-player-loader.es-156bd4d6.js');
require('react-bootstrap/Pagination');
require('next/head');
require('react-bootstrap/Carousel');
var Feature = require('./Feature.js');
require('react-bootstrap/Breadcrumb');
var Breadcrumbs = require('./Breadcrumbs.js');
var urlFor = require('./urlFor.js');

function _classCallCheck(instance, Constructor) {
  if (!(instance instanceof Constructor)) {
    throw new TypeError("Cannot call a class as a function");
  }
}

function _defineProperties(target, props) {
  for (var i = 0; i < props.length; i++) {
    var descriptor = props[i];
    descriptor.enumerable = descriptor.enumerable || false;
    descriptor.configurable = true;
    if ("value" in descriptor) descriptor.writable = true;
    Object.defineProperty(target, descriptor.key, descriptor);
  }
}

function _createClass(Constructor, protoProps, staticProps) {
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  if (staticProps) _defineProperties(Constructor, staticProps);
  return Constructor;
}

function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); }

function _typeof(obj) {
  if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") {
    _typeof = function _typeof(obj) {
      return _typeof2(obj);
    };
  } else {
    _typeof = function _typeof(obj) {
      return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
    };
  }

  return _typeof(obj);
}

function _assertThisInitialized(self) {
  if (self === void 0) {
    throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  }

  return self;
}

function _possibleConstructorReturn(self, call) {
  if (call && (_typeof(call) === "object" || typeof call === "function")) {
    return call;
  }

  return _assertThisInitialized(self);
}

function _getPrototypeOf(o) {
  _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
    return o.__proto__ || Object.getPrototypeOf(o);
  };
  return _getPrototypeOf(o);
}

function _setPrototypeOf(o, p) {
  _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
    o.__proto__ = p;
    return o;
  };

  return _setPrototypeOf(o, p);
}

function _inherits(subClass, superClass) {
  if (typeof superClass !== "function" && superClass !== null) {
    throw new TypeError("Super expression must either be null or a function");
  }

  subClass.prototype = Object.create(superClass && superClass.prototype, {
    constructor: {
      value: subClass,
      writable: true,
      configurable: true
    }
  });
  if (superClass) _setPrototypeOf(subClass, superClass);
}

function _defineProperty(obj, key, value) {
  if (key in obj) {
    Object.defineProperty(obj, key, {
      value: value,
      enumerable: true,
      configurable: true,
      writable: true
    });
  } else {
    obj[key] = value;
  }

  return obj;
}

var isRequiredIf_1 = _commonjsHelpers.createCommonjsModule(function (module, exports) {
Object.defineProperty(exports,'__esModule',{value:!0});var VALIDATOR_ARG_ERROR_MESSAGE='The typeValidator argument must be a function with the signature function(props, propName, componentName).',MESSAGE_ARG_ERROR_MESSAGE='The error message is optional, but must be a string if provided.',propIsRequired=function propIsRequired(a,b,c,d){if('boolean'==typeof a)return a;return 'function'==typeof a?a(b,c,d):!(!0!==!!a)&&!!a},propExists=function propExists(a,b){return Object.hasOwnProperty.call(a,b)},missingPropError=function missingPropError(a,b,c,d){return d?new Error(d):new Error('Required '+a[b]+' `'+b+'`'+(' was not specified in `'+c+'`.'))},guardAgainstInvalidArgTypes=function guardAgainstInvalidArgTypes(a,b){if('function'!=typeof a)throw new TypeError(VALIDATOR_ARG_ERROR_MESSAGE);if(!!b&&'string'!=typeof b)throw new TypeError(MESSAGE_ARG_ERROR_MESSAGE)},isRequiredIf=function isRequiredIf(a,b,c){return guardAgainstInvalidArgTypes(a,c),function(d,e,f){for(var _len=arguments.length,g=Array(3<_len?_len-3:0),_key=3;_key<_len;_key++)g[_key-3]=arguments[_key];return propIsRequired(b,d,e,f)?propExists(d,e)?a.apply(void 0,[d,e,f].concat(g)):missingPropError(d,e,f,c):a.apply(void 0,[d,e,f].concat(g));// Is not required, so just run typeValidator.
}};exports.default=isRequiredIf;


});

var isRequiredIf = _commonjsHelpers.unwrapExports(isRequiredIf_1);

var exenv = _commonjsHelpers.createCommonjsModule(function (module) {
/*!
  Copyright (c) 2015 Jed Watson.
  Based on code that is Copyright 2013-2015, Facebook, Inc.
  All rights reserved.
*/
/* global define */

(function () {

	var canUseDOM = !!(
		typeof window !== 'undefined' &&
		window.document &&
		window.document.createElement
	);

	var ExecutionEnvironment = {

		canUseDOM: canUseDOM,

		canUseWorkers: typeof Worker !== 'undefined',

		canUseEventListeners:
			canUseDOM && !!(window.addEventListener || window.attachEvent),

		canUseViewport: canUseDOM && !!window.screen

	};

	if ( module.exports) {
		module.exports = ExecutionEnvironment;
	} else {
		window.ExecutionEnvironment = ExecutionEnvironment;
	}

}());
});

var twitterWidgetJs = 'https://platform.twitter.com/widgets.js';

var TwitterTimelineEmbed =
/*#__PURE__*/
function (_Component) {
  _inherits(TwitterTimelineEmbed, _Component);

  function TwitterTimelineEmbed(props) {
    var _this;

    _classCallCheck(this, TwitterTimelineEmbed);

    _this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterTimelineEmbed).call(this, props));
    _this.state = {
      isLoading: true
    };
    return _this;
  }

  _createClass(TwitterTimelineEmbed, [{
    key: "buildChromeOptions",
    value: function buildChromeOptions(options) {
      options.chrome = '';

      if (this.props.noHeader) {
        options.chrome = options.chrome + ' noheader';
      }

      if (this.props.noFooter) {
        options.chrome = options.chrome + ' nofooter';
      }

      if (this.props.noBorders) {
        options.chrome = options.chrome + ' noborders';
      }

      if (this.props.noScrollbar) {
        options.chrome = options.chrome + ' noscrollbar';
      }

      if (this.props.transparent) {
        options.chrome = options.chrome + ' transparent';
      }

      return options;
    }
  }, {
    key: "buildOptions",
    value: function buildOptions() {
      var options = Object.assign({}, this.props.options);

      if (this.props.autoHeight) {
        options.height = this.refs.embedContainer.parentNode.offsetHeight;
      }

      options = Object.assign({}, options, {
        theme: this.props.theme,
        linkColor: this.props.linkColor,
        borderColor: this.props.borderColor,
        lang: this.props.lang
      });
      return options;
    }
  }, {
    key: "renderWidget",
    value: function renderWidget(options) {
      var _this2 = this;

      var onLoad = this.props.onLoad;

      if (!this.isMountCanceled) {
        window.twttr.widgets.createTimeline({
          sourceType: this.props.sourceType,
          screenName: this.props.screenName,
          userId: this.props.userId,
          ownerScreenName: this.props.ownerScreenName,
          slug: this.props.slug,
          id: this.props.id || this.props.widgetId,
          url: this.props.url
        }, this.refs.embedContainer, options).then(function (element) {
          _this2.setState({
            isLoading: false
          });

          if (onLoad) {
            onLoad(element);
          }
        });
      }
    }
  }, {
    key: "componentDidMount",
    value: function componentDidMount() {
      var _this3 = this;

      if (exenv.canUseDOM) {
        var script = require('scriptjs');

        script(twitterWidgetJs, 'twitter-embed', function () {
          if (!window.twttr) {
            console.error('Failure to load window.twttr in TwitterTimelineEmbed, aborting load.');
            return;
          }

          var options = _this3.buildOptions();
          /** Append chrome options */


          options = _this3.buildChromeOptions(options);

          _this3.renderWidget(options);
        });
      }
    }
  }, {
    key: "componentWillUnmount",
    value: function componentWillUnmount() {
      this.isMountCanceled = true;
    }
  }, {
    key: "render",
    value: function render() {
      var isLoading = this.state.isLoading;
      var placeholder = this.props.placeholder;
      return React__default.createElement(React__default.Fragment, null, isLoading && placeholder, React__default.createElement("div", {
        ref: "embedContainer"
      }));
    }
  }]);

  return TwitterTimelineEmbed;
}(React.Component);

_defineProperty(TwitterTimelineEmbed, "propTypes", {
  /**
       * This can be either of profile, likes, list, collection, URL, widget
       */
  sourceType: PropTypes__default.oneOf(['profile', 'likes', 'list', 'collection', 'url', 'widget']).isRequired,

  /**
       * username of twitter handle as String
       */
  screenName: isRequiredIf(PropTypes__default.string, function (props) {
    return !props.hasOwnProperty('userId') && (props.sourceType === 'profile' || props.sourceType === 'likes');
  }),

  /**
       * UserId of twitter handle as number
       */
  userId: isRequiredIf(PropTypes__default.number, function (props) {
    return !props.hasOwnProperty('screenName') && (props.sourceType === 'profile' || props.sourceType === 'likes');
  }),

  /**
       * To show list, used along with slug
       */
  ownerScreenName: isRequiredIf(PropTypes__default.string, function (props) {
    return props.sourceType === 'list' && !props.hasOwnProperty('id');
  }),

  /**
       * To show list, used along with ownerScreenName
       */
  slug: isRequiredIf(PropTypes__default.string, function (props) {
    return props.sourceType === 'list' && !props.hasOwnProperty('id');
  }),

  /**
       * To show list, unique list id
       * Also used with collections, in that case its valid collection id
       */
  id: isRequiredIf(PropTypes__default.oneOfType([PropTypes__default.number, PropTypes__default.string]), function (props) {
    return props.sourceType === 'list' && !props.hasOwnProperty('ownerScreenName') && !props.hasOwnProperty('slug') || props.sourceType === 'collection';
  }),

  /**
       * To show twitter content with url.
       * Supported content includes profiles, likes, lists, and collections.
       */
  url: isRequiredIf(PropTypes__default.string, function (props) {
    return props.sourceType === 'url';
  }),

  /**
       * To show custom widget
       */
  widgetId: isRequiredIf(PropTypes__default.string, function (props) {
    return props.sourceType === 'widget';
  }),

  /**
       * Additional options to pass to twitter widget plugin
       */
  options: PropTypes__default.object,

  /**
       * Automatically fit into parent container height
       */
  autoHeight: PropTypes__default.bool,

  /**
       * With dark or light theme
       */
  theme: PropTypes__default.oneOf(['dark', 'light']),

  /**
       * With custom link colors. Note: Only Hex colors are supported.
       */
  linkColor: PropTypes__default.string,

  /**
       * With custom border colors. Note: Only Hex colors are supported.
       */
  borderColor: PropTypes__default.string,

  /**
       * Hide the header from timeline
       */
  noHeader: PropTypes__default.bool,

  /**
       * Hide the footer from timeline
       */
  noFooter: PropTypes__default.bool,

  /**
       * Hide the border from timeline
       */
  noBorders: PropTypes__default.bool,

  /**
       * Hide the scrollbars
       */
  noScrollbar: PropTypes__default.bool,

  /**
       * Enable Transparancy
       */
  transparent: PropTypes__default.bool,

  /**
       * Custom language code. Supported codes here: https://developer.twitter.com/en/docs/twitter-for-websites/twitter-for-websites-supported-languages/overview.html
       */
  lang: PropTypes__default.string,

  /**
   * Placeholder while tweet is loading
   */
  placeholder: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.element]),

  /**
   * Function to execute after load, return html element
   */
  onLoad: PropTypes__default.func
});

var TwitterShareButton =
/*#__PURE__*/
function (_Component) {
  _inherits(TwitterShareButton, _Component);

  function TwitterShareButton(props) {
    var _this;

    _classCallCheck(this, TwitterShareButton);

    _this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterShareButton).call(this, props));
    _this.state = {
      isLoading: true
    };
    return _this;
  }

  _createClass(TwitterShareButton, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      var _this2 = this;

      var onLoad = this.props.onLoad;

      if (exenv.canUseDOM) {
        var script = require('scriptjs');

        script(twitterWidgetJs, 'twitter-embed', function () {
          if (!window.twttr) {
            console.error('Failure to load window.twttr in TwitterShareButton, aborting load.');
            return;
          }

          if (!_this2.isMountCanceled) {
            window.twttr.widgets.createShareButton(_this2.props.url, _this2.refs.embedContainer, _this2.props.options).then(function (element) {
              _this2.setState({
                isLoading: false
              });

              if (onLoad) {
                onLoad(element);
              }
            });
          }
        });
      }
    }
  }, {
    key: "componentWillUnmount",
    value: function componentWillUnmount() {
      this.isMountCanceled = true;
    }
  }, {
    key: "render",
    value: function render() {
      var isLoading = this.state.isLoading;
      var placeholder = this.props.placeholder;
      return React__default.createElement(React__default.Fragment, null, isLoading && placeholder, React__default.createElement("div", {
        ref: "embedContainer"
      }));
    }
  }]);

  return TwitterShareButton;
}(React.Component);

_defineProperty(TwitterShareButton, "propTypes", {
  /**
  * Url for sharing
  */
  url: PropTypes__default.string.isRequired,

  /**
  * Additional options for overriding config. Details at : https://dev.twitter.com/web/tweet-button/parameters
  */
  options: PropTypes__default.object,

  /**
   * Placeholder while tweet is loading
   */
  placeholder: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.element]),

  /**
   * Function to execute after load, return html element
   */
  onLoad: PropTypes__default.func
});

var TwitterFollowButton =
/*#__PURE__*/
function (_Component) {
  _inherits(TwitterFollowButton, _Component);

  function TwitterFollowButton(props) {
    var _this;

    _classCallCheck(this, TwitterFollowButton);

    _this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterFollowButton).call(this, props));
    _this.state = {
      isLoading: true
    };
    return _this;
  }

  _createClass(TwitterFollowButton, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      var _this2 = this;

      var onLoad = this.props.onLoad;

      if (exenv.canUseDOM) {
        var script = require('scriptjs');

        script(twitterWidgetJs, 'twitter-embed', function () {
          if (!window.twttr) {
            console.error('Failure to load window.twttr in TwitterFollowButton, aborting load.');
            return;
          }

          if (!_this2.isMountCanceled) {
            window.twttr.widgets.createFollowButton(_this2.props.screenName, _this2.refs.embedContainer, _this2.props.options).then(function (element) {
              _this2.setState({
                isLoading: false
              });

              if (onLoad) {
                onLoad(element);
              }
            });
          }
        });
      }
    }
  }, {
    key: "componentWillUnmount",
    value: function componentWillUnmount() {
      this.isMountCanceled = true;
    }
  }, {
    key: "render",
    value: function render() {
      var isLoading = this.state.isLoading;
      var placeholder = this.props.placeholder;
      return React__default.createElement(React__default.Fragment, null, isLoading && placeholder, React__default.createElement("div", {
        ref: "embedContainer"
      }));
    }
  }]);

  return TwitterFollowButton;
}(React.Component);

_defineProperty(TwitterFollowButton, "propTypes", {
  /**
       * Username of twitter user which will be followed on click
       */
  screenName: PropTypes__default.string.isRequired,

  /**
       * Additional options to be added to the button
       */
  options: PropTypes__default.object,

  /**
   * Placeholder while tweet is loading
   */
  placeholder: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.element]),

  /**
   * Function to execute after load, return html element
   */
  onLoad: PropTypes__default.func
});

var TwitterHashtagButton =
/*#__PURE__*/
function (_Component) {
  _inherits(TwitterHashtagButton, _Component);

  function TwitterHashtagButton(props) {
    var _this;

    _classCallCheck(this, TwitterHashtagButton);

    _this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterHashtagButton).call(this, props));
    _this.state = {
      isLoading: true
    };
    return _this;
  }

  _createClass(TwitterHashtagButton, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      var _this2 = this;

      var onLoad = this.props.onLoad;

      if (exenv.canUseDOM) {
        var script = require('scriptjs');

        script(twitterWidgetJs, 'twitter-embed', function () {
          if (!window.twttr) {
            console.error('Failure to load window.twttr in TwitterHashtagButton, aborting load.');
            return;
          }

          if (!_this2.isMountCanceled) {
            window.twttr.widgets.createHashtagButton(_this2.props.tag, _this2.refs.embedContainer, _this2.props.options).then(function (element) {
              _this2.setState({
                isLoading: false
              });

              if (onLoad) {
                onLoad(element);
              }
            });
          }
        });
      }
    }
  }, {
    key: "componentWillUnmount",
    value: function componentWillUnmount() {
      this.isMountCanceled = true;
    }
  }, {
    key: "render",
    value: function render() {
      var isLoading = this.state.isLoading;
      var placeholder = this.props.placeholder;
      return React__default.createElement(React__default.Fragment, null, isLoading && placeholder, React__default.createElement("div", {
        ref: "embedContainer"
      }));
    }
  }]);

  return TwitterHashtagButton;
}(React.Component);

_defineProperty(TwitterHashtagButton, "propTypes", {
  /**
       * Tag name for hashtag button
       */
  tag: PropTypes__default.string.isRequired,

  /**
       * Additional options to be added to the button
       */
  options: PropTypes__default.object,

  /**
   * Placeholder while tweet is loading
   */
  placeholder: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.element]),

  /**
   * Function to execute after load, return html element
   */
  onLoad: PropTypes__default.func
});

var TwitterMentionButton =
/*#__PURE__*/
function (_Component) {
  _inherits(TwitterMentionButton, _Component);

  function TwitterMentionButton(props) {
    var _this;

    _classCallCheck(this, TwitterMentionButton);

    _this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterMentionButton).call(this, props));
    _this.state = {
      isLoading: true
    };
    return _this;
  }

  _createClass(TwitterMentionButton, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      var _this2 = this;

      var onLoad = this.props.onLoad;

      if (exenv.canUseDOM) {
        var script = require('scriptjs');

        script(twitterWidgetJs, 'twitter-embed', function () {
          if (!window.twttr) {
            console.error('Failure to load window.twttr in TwitterMentionButton, aborting load.');
            return;
          }

          if (!_this2.isMountCanceled) {
            window.twttr.widgets.createMentionButton(_this2.props.screenName, _this2.refs.embedContainer, _this2.props.options).then(function (element) {
              _this2.setState({
                isLoading: false
              });

              if (onLoad) {
                onLoad(element);
              }
            });
          }
        });
      }
    }
  }, {
    key: "componentWillUnmount",
    value: function componentWillUnmount() {
      this.isMountCanceled = true;
    }
  }, {
    key: "render",
    value: function render() {
      var isLoading = this.state.isLoading;
      var placeholder = this.props.placeholder;
      return React__default.createElement(React__default.Fragment, null, isLoading && placeholder, React__default.createElement("div", {
        ref: "embedContainer"
      }));
    }
  }]);

  return TwitterMentionButton;
}(React.Component);

_defineProperty(TwitterMentionButton, "propTypes", {
  /**
   * Username to which you will need to tweet
   */
  screenName: PropTypes__default.string.isRequired,

  /**
   * Additional options for overriding config.
   */
  options: PropTypes__default.object,

  /**
   * Placeholder while tweet is loading
   */
  placeholder: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.element]),

  /**
   * Function to execute after load, return html element
   */
  onLoad: PropTypes__default.func
});

var TwitterTweetEmbed =
/*#__PURE__*/
function (_Component) {
  _inherits(TwitterTweetEmbed, _Component);

  function TwitterTweetEmbed(props) {
    var _this;

    _classCallCheck(this, TwitterTweetEmbed);

    _this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterTweetEmbed).call(this, props));
    _this.state = {
      isLoading: true
    };
    return _this;
  }

  _createClass(TwitterTweetEmbed, [{
    key: "renderWidget",
    value: function renderWidget() {
      var _this2 = this;

      var onLoad = this.props.onLoad;

      if (!window.twttr) {
        console.error('Failure to load window.twttr in TwitterTweetEmbed, aborting load.');
        return;
      }

      if (!this.isMountCanceled) {
        window.twttr.widgets.createTweet(this.props.tweetId, this.refs.embedContainer, this.props.options).then(function (element) {
          _this2.setState({
            isLoading: false
          });

          if (onLoad) {
            onLoad(element);
          }
        });
      }
    }
  }, {
    key: "componentDidMount",
    value: function componentDidMount() {
      var _this3 = this;

      if (exenv.canUseDOM) {
        var script = require('scriptjs');

        script(twitterWidgetJs, 'twitter-embed', function () {
          _this3.renderWidget();
        });
      }
    }
  }, {
    key: "componentWillUnmount",
    value: function componentWillUnmount() {
      this.isMountCanceled = true;
    }
  }, {
    key: "render",
    value: function render() {
      var isLoading = this.state.isLoading;
      var placeholder = this.props.placeholder;
      return React__default.createElement(React__default.Fragment, null, isLoading && placeholder, React__default.createElement("div", {
        ref: "embedContainer"
      }));
    }
  }]);

  return TwitterTweetEmbed;
}(React.Component);

_defineProperty(TwitterTweetEmbed, "propTypes", {
  /**
       * Tweet id that needs to be shown
       */
  tweetId: PropTypes__default.string.isRequired,

  /**
       * Additional options to pass to twitter widget plugin
       */
  options: PropTypes__default.object,

  /**
   * Placeholder while tweet is loading
   */
  placeholder: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.element]),

  /**
   * Function to execute after load, return html element
   */
  onLoad: PropTypes__default.func
});

var TwitterMomentShare =
/*#__PURE__*/
function (_Component) {
  _inherits(TwitterMomentShare, _Component);

  function TwitterMomentShare(props) {
    var _this;

    _classCallCheck(this, TwitterMomentShare);

    _this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterMomentShare).call(this, props));
    _this.state = {
      isLoading: true
    };
    return _this;
  }

  _createClass(TwitterMomentShare, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      var _this2 = this;

      var onLoad = this.props.onLoad;

      if (exenv.canUseDOM) {
        var script = require('scriptjs');

        script(twitterWidgetJs, 'twitter-embed', function () {
          if (!window.twttr) {
            console.error('Failure to load window.twttr in TwitterMomentShare, aborting load.');
            return;
          }

          if (!_this2.isMountCanceled) {
            window.twttr.widgets.createMoment(_this2.props.momentId, _this2.refs.shareMoment, _this2.props.options).then(function (element) {
              _this2.setState({
                isLoading: false
              });

              if (onLoad) {
                onLoad(element);
              }
            });
          }
        });
      }
    }
  }, {
    key: "componentWillUnmount",
    value: function componentWillUnmount() {
      this.isMountCanceled = true;
    }
  }, {
    key: "render",
    value: function render() {
      var isLoading = this.state.isLoading;
      var placeholder = this.props.placeholder;
      return React__default.createElement(React__default.Fragment, null, isLoading && placeholder, React__default.createElement("div", {
        ref: "shareMoment"
      }));
    }
  }]);

  return TwitterMomentShare;
}(React.Component);

_defineProperty(TwitterMomentShare, "propTypes", {
  /**
   * id of Twitter moment to show
   */
  momentId: PropTypes__default.string.isRequired,

  /**
   * Additional options for overriding config.
   */
  options: PropTypes__default.object,

  /**
   * Placeholder while tweet is loading
   */
  placeholder: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.element]),

  /**
   * Function to execute after load, return html element
   */
  onLoad: PropTypes__default.func
});

var TwitterDMButton =
/*#__PURE__*/
function (_Component) {
  _inherits(TwitterDMButton, _Component);

  function TwitterDMButton(props) {
    var _this;

    _classCallCheck(this, TwitterDMButton);

    _this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterDMButton).call(this, props));
    _this.state = {
      isLoading: true
    };
    return _this;
  }

  _createClass(TwitterDMButton, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      var _this2 = this;

      var onLoad = this.props.onLoad;

      if (exenv.canUseDOM) {
        var script = require('scriptjs');

        script(twitterWidgetJs, 'twitter-embed', function () {
          if (!window.twttr) {
            console.error('Failure to load window.twttr in TwitterDMButton, aborting load.');
            return;
          }

          if (!_this2.isMountCanceled) {
            window.twttr.widgets.createDMButton(_this2.props.id, _this2.refs.embedContainer, _this2.props.options).then(function (element) {
              _this2.setState({
                isLoading: false
              });

              if (onLoad) {
                onLoad(element);
              }
            });
          }
        });
      }
    }
  }, {
    key: "componentWillUnmount",
    value: function componentWillUnmount() {
      this.isMountCanceled = true;
    }
  }, {
    key: "render",
    value: function render() {
      var isLoading = this.state.isLoading;
      var placeholder = this.props.placeholder;
      return React__default.createElement(React__default.Fragment, null, isLoading && placeholder, React__default.createElement("div", {
        ref: "embedContainer"
      }));
    }
  }]);

  return TwitterDMButton;
}(React.Component);

_defineProperty(TwitterDMButton, "propTypes", {
  /**
  * Twitter user id for DM button
  */
  id: PropTypes__default.number.isRequired,

  /**
  * Additional options to be added to the button
  */
  options: PropTypes__default.object,

  /**
   * Placeholder while tweet is loading
   */
  placeholder: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.element]),

  /**
   * Function to execute after load, return html element
   */
  onLoad: PropTypes__default.func
});

var TwitterVideoEmbed =
/*#__PURE__*/
function (_Component) {
  _inherits(TwitterVideoEmbed, _Component);

  function TwitterVideoEmbed(props) {
    var _this;

    _classCallCheck(this, TwitterVideoEmbed);

    _this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterVideoEmbed).call(this, props));
    _this.state = {
      isLoading: true
    };
    return _this;
  }

  _createClass(TwitterVideoEmbed, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      var _this2 = this;

      var onLoad = this.props.onLoad;

      if (exenv.canUseDOM) {
        var script = require('scriptjs');

        script(twitterWidgetJs, 'twitter-embed', function () {
          if (!window.twttr) {
            console.error('Failure to load window.twttr in TwitterVideoEmbed, aborting load.');
            return;
          }

          if (!_this2.isMountCanceled) {
            window.twttr.widgets.createVideo(_this2.props.id, _this2.refs.embedContainer).then(function (element) {
              _this2.setState({
                isLoading: false
              });

              if (onLoad) {
                onLoad(element);
              }
            });
          }
        });
      }
    }
  }, {
    key: "componentWillUnmount",
    value: function componentWillUnmount() {
      this.isMountCanceled = true;
    }
  }, {
    key: "render",
    value: function render() {
      var isLoading = this.state.isLoading;
      var placeholder = this.props.placeholder;
      return React__default.createElement(React__default.Fragment, null, isLoading && placeholder, React__default.createElement("div", {
        ref: "embedContainer"
      }));
    }
  }]);

  return TwitterVideoEmbed;
}(React.Component);

_defineProperty(TwitterVideoEmbed, "propTypes", {
  /**
       * Id of video tweet.
       */
  id: PropTypes__default.string.isRequired,

  /**
   * Placeholder while tweet is loading
   */
  placeholder: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.element]),

  /**
   * Function to execute after load, return html element
   */
  onLoad: PropTypes__default.func
});

var TwitterOnAirButton =
/*#__PURE__*/
function (_Component) {
  _inherits(TwitterOnAirButton, _Component);

  function TwitterOnAirButton(props) {
    var _this;

    _classCallCheck(this, TwitterOnAirButton);

    _this = _possibleConstructorReturn(this, _getPrototypeOf(TwitterOnAirButton).call(this, props));
    _this.state = {
      isLoading: true
    };
    return _this;
  }

  _createClass(TwitterOnAirButton, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      var _this2 = this;

      var onLoad = this.props.onLoad;

      if (exenv.canUseDOM) {
        var script = require('scriptjs');

        script(twitterWidgetJs, 'twitter-embed', function () {
          if (!window.twttr) {
            console.error('Failure to load window.twttr in TwitterOnAirButton, aborting load.');
            return;
          }

          if (!_this2.isMountCanceled) {
            window.twttr.widgets.createPeriscopeOnAirButton(_this2.props.username, _this2.refs.embedContainer, _this2.props.options).then(function (element) {
              _this2.setState({
                isLoading: false
              });

              if (onLoad) {
                onLoad(element);
              }
            });
          }
        });
      }
    }
  }, {
    key: "componentWillUnmount",
    value: function componentWillUnmount() {
      this.isMountCanceled = true;
    }
  }, {
    key: "render",
    value: function render() {
      var isLoading = this.state.isLoading;
      var placeholder = this.props.placeholder;
      return React__default.createElement(React__default.Fragment, null, isLoading && placeholder, React__default.createElement("div", {
        ref: "embedContainer"
      }));
    }
  }]);

  return TwitterOnAirButton;
}(React.Component);

_defineProperty(TwitterOnAirButton, "propTypes", {
  /**
   * Username for which you require periscope on air button
   */
  username: PropTypes__default.string.isRequired,

  /**
   * Additional options for overriding config.
   */
  options: PropTypes__default.object,

  /**
   * Placeholder while tweet is loading
   */
  placeholder: PropTypes__default.oneOfType([PropTypes__default.string, PropTypes__default.element]),

  /**
   * Function to execute after load, return html element
   */
  onLoad: PropTypes__default.func
});

var ImageSlider = function ImageSlider(props) {
  var innerSlider = React.useRef(null);
  var tile = React.useRef(null);
  var viewableWindow = React.useRef(null);

  var _useState = React.useState(0),
      _useState2 = slicedToArray._slicedToArray(_useState, 2),
      tileSize = _useState2[0],
      setTileSize = _useState2[1];

  var _useState3 = React.useState(false),
      _useState4 = slicedToArray._slicedToArray(_useState3, 2),
      showScroller = _useState4[0],
      setShowScroller = _useState4[1];

  var _useState5 = React.useState(0),
      _useState6 = slicedToArray._slicedToArray(_useState5, 2),
      scrollPosition = _useState6[0],
      setScrollPosition = _useState6[1];

  var builder = index$1.imageUrlBuilder(props.client);
  function urlFor(source) {
    return builder.image(source);
  }
  function scrollSlider(e, direction) {
    var slide = e.target.parentElement;
    var scrollOffset = scrollPosition;
    var viewableWidth = slide.clientWidth;
    //calculate viewable size / slide
    var numberOfSlidesToScroll = Math.floor(tile.current.clientWidth + 25); //width of the tile plus margin
    var scrollDirection = void 0;
    if (direction === 'next') {
      scrollDirection = scrollOffset + numberOfSlidesToScroll;
      if (scrollOffset + viewableWidth + 25 >= innerSlider.current.offsetWidth) {
        scrollDirection = 0;
      }
    }
    if (direction === 'prev') {
      scrollDirection = scrollOffset - numberOfSlidesToScroll;
      if (scrollOffset === 0) {
        if (window.innerWidth > 1399) {
          scrollDirection = innerSlider.current.offsetWidth - tileSize * 3 - 70;
        }
        if (window.innerWidth < 1399 && window.innerWidth > 592) {
          scrollDirection = innerSlider.current.offsetWidth - tileSize * 2 - 40;
        }
        if (window.innerWidth < 592) {
          scrollDirection = innerSlider.current.offsetWidth - tileSize * 1 - 24;
        }
      }
    }
    slide.scrollTo({
      left: scrollDirection,
      behavior: 'smooth'
    });
    setScrollPosition(scrollDirection);
  }
  var setThumbSize = function setThumbSize() {
    var thumbSize = void 0;
    var scrollerVisible = false;
    if (window.innerWidth > 1399) {
      thumbSize = Math.floor(viewableWindow.current.clientWidth / 3 - 40);
      if (props.data.slides.length > 3) {
        scrollerVisible = true;
      }
    }
    if (window.innerWidth < 1399 && window.innerWidth > 592) {
      thumbSize = Math.floor(viewableWindow.current.clientWidth / 2 - 48);
      if (props.data.slides.length > 2) {
        scrollerVisible = true;
      }
    }
    if (window.innerWidth < 592) {
      thumbSize = Math.floor(viewableWindow.current.clientWidth / 1 - 64);
      if (props.data.slides.length > 1) {
        scrollerVisible = true;
      }
    }
    if (thumbSize !== tileSize) {
      setTileSize(thumbSize);
      setScrollPosition(0);
      setShowScroller(scrollerVisible);
      var videoRows = document.querySelectorAll('#vid-slider .row');
      for (var i = 0; i < videoRows.length; i++) {
        videoRows[i].scrollTo({
          left: 0,
          behavior: 'smooth'
        });
      }
    }
  };
  React.useEffect(function () {
    //IE11 Polyfill
    smoothscroll.smoothscroll.polyfill();
    setThumbSize();

    window.addEventListener('resize', setThumbSize);

    return function () {
      return window.removeEventListener('resize', setThumbSize);
    };
  }, []);

  var variant = 'black';
  return React__default.createElement(
    React__default.Fragment,
    null,
    React__default.createElement(
      'div',
      { ref: viewableWindow, id: 'vid-slider', className: 'col' },
      React__default.createElement(
        'div',
        { className: 'row' },
        showScroller && React__default.createElement(
          'div',
          { onClick: function onClick(e) {
              return scrollSlider(e, 'prev');
            }, className: 'tile__slider-prev', style: { color: variant } },
          React__default.createElement('i', { style: { border: 'solid ' + variant, borderWidth: '0 4px 4px 0' }, className: 'arrow left' })
        ),
        showScroller && React__default.createElement(
          'div',
          { onClick: function onClick(e) {
              return scrollSlider(e, 'next');
            }, className: 'tile__slider-next', style: { color: variant } },
          React__default.createElement('i', { style: { border: 'solid ' + variant, borderWidth: '0 4px 4px 0' }, className: 'arrow right' })
        ),
        React__default.createElement(
          'div',
          { ref: innerSlider, className: 'row__inner' },
          props.data.slides.map(function (img, index) {
            var thumbnail = urlFor(img.slideshowImage).width(250);
            if (!img.slideshowImage.link) {
              return React__default.createElement(
                'div',
                { ref: tile, key: index, className: 'tile', style: { width: tileSize + 'px' } },
                React__default.createElement(
                  'div',
                  { className: 'tile__media' },
                  React__default.createElement('img', { className: 'tile__img', src: thumbnail, alt: img.slideshowImage.alt ? img.slideshowImage.alt : '', style: { width: tileSize + 'px' } })
                ),
                React__default.createElement('div', { style: { color: variant }, className: 'tile__info' })
              );
            } else {
              return React__default.createElement(
                'a',
                { ref: tile, key: index, href: img.slideshowImage.link, target: img.slideshowImage.blank ? '_target' : '_self', className: 'tile', style: { width: tileSize + 'px' } },
                React__default.createElement(
                  'div',
                  { className: 'tile__media' },
                  React__default.createElement('img', { className: 'tile__img', src: thumbnail, alt: img.slideshowImage.alt ? img.slideshowImage.alt : '', style: { width: tileSize + 'px' } })
                ),
                React__default.createElement('div', { style: { color: variant }, className: 'tile__info' })
              );
            }
          })
        )
      ),
      React__default.createElement(
        'style',
        { jsx: 'true' },
        '\n          #vid-slider * {\n            box-sizing: border-box;\n            -ms-overflow-style: none;\n          }\n          #vid-slider::-webkit-scrollbar-thumb {\n            display: none;\n          }\n          #vid-slider::-webkit-scrollbar {\n            display: none;\n          }\n          #vid-slider .row::-webkit-scrollbar {\n            display: none;\n          }\n          #vid-slider .row::-webkit-scrollbar-thumb {\n            display: none;\n          }\n          #vid-slider {\n            position: relative;\n            -ms-overflow-style: none;\n            padding: 0 1.5rem;\n            margin-bottom: 0 !important;\n          }\n          #vid-slider .now-playing {\n            position: absolute;\n            top: 0.5rem;\n            left: 1rem;\n            color: white;\n            background: rgba(0, 0, 0, 0.75);\n          }\n          #vid-slider h1,\n          #vid-slider p {\n            text-align: center;\n            width: 100%;\n            max-width: 500px;\n            margin: auto;\n          }\n          #vid-slider,\n          #vidHolder {\n            max-width: 805px;\n          }\n          #vid-slider a:link,\n          #vid-slider a:hover,\n          #vid-slider a:active,\n          #vid-slider a:visited {\n            transition: color 150ms;\n            color: #95a5a6;\n            text-decoration: none;\n          }\n          #vid-slider a:hover {\n            color: #7f8c8d;\n            text-decoration: underline;\n          }\n          #vid-slider .contain {\n            width: 100%;\n          }\n          #vid-slider .row {\n            overflow-x: scroll;\n            width: 100%;\n            -ms-overflow-style: none;\n            overflow-y: hidden !important;\n          }\n          #vid-slider .tile__info {\n            white-space: normal !important;\n            position: absolute;\n            text-align: center;\n            color: ' + (props.dark ? 'white' : '#383838') + ';\n            opacity: 1;\n            font-size: 0.9rem;\n            font-weight: bold;\n            transition: opacity 0.25s;\n          }\n          #vid-slider .row__inner {\n            transition: 450ms -webkit-transform;\n            transition: 450ms transform;\n            transition: 450ms transform, 450ms -webkit-transform;\n            font-size: 0;\n            white-space: nowrap;\n            margin: 25px 0 70px !important;\n            padding-bottom: 10px;\n            padding-left: 0;\n          }\n          #vid-slider .tile {\n            position: relative;\n            display: inline-block;\n            margin: 0 12px;\n            font-size: 20px;\n            transition: 450ms all;\n            -webkit-transform-origin: center left;\n            transform-origin: center left;\n          }\n  \n          #vid-slider .tile:first-child {\n            margin-left: 15px;\n          }\n          #vid-slider .tile__img {\n            height: auto;\n            -o-object-fit: contain;\n            object-fit: contain;\n            object-position: center;\n          }\n          #vid-slider .tile__details {\n            position: absolute;\n            bottom: 0;\n            left: 0;\n            right: 0;\n            top: 0;\n            font-size: 10px;\n            opacity: 0;\n            background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);\n            transition: 450ms opacity;\n          }\n          #vid-slider .tile__details:after,\n          #vid-slider .tile__details:before {\n            content: \'\';\n  \n            position: absolute;\n            top: 50%;\n            left: 50%;\n            display: #000;\n          }\n          #vid-slider .tile__details:after {\n            margin-top: -25px;\n            margin-left: -25px;\n            width: 50px;\n            height: 50px;\n            border: 3px solid #ecf0f1;\n            line-height: 50px;\n            text-align: center;\n            border-radius: 100%;\n            background: rgba(0, 0, 0, 0.5);\n            z-index: 1;\n          }\n          #vid-slider .tile__details:before {\n            content: \'\';\n            background: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 64 64\' width=\'64\' height=\'64\' fill=\'white\'><path d=\'M26 46 L46 32 L26 18 Z\'/></svg>")\n              no-repeat center center;\n            left: 0;\n            width: 100%;\n            height: 3rem;\n            font-size: 30px;\n            margin-right: 12px;\n            margin-top: -24px;\n            text-align: center;\n            z-index: 2;\n            color: white;\n          }\n  \n          #vid-slider .tile__title {\n            position: absolute;\n            bottom: 0;\n            padding: 10px;\n            max-width: 250px;\n          }\n          #vid-slider .tile__title_text {\n            position: relative;\n            left: 0;\n            white-space: normal;\n          }\n  \n          #vid-slider .tile__slider-prev,\n          #vid-slider .tile__slider-next {\n            width: 30px;\n            background: transparent;\n            border: none;\n            position: absolute;\n            top: 50%;\n            transform: translateY(-50%);\n            z-index: 99;\n            cursor: pointer;\n            color: ' + (props.dark ? 'white' : 'black') + ';\n            display: flex;\n            justify-content: center;\n            align-items: center;\n            font-size: 2rem;\n          }\n          #vid-slider .tile__slider-prev {\n            left: -0.5rem;\n            padding: 1rem;\n          }\n          #vid-slider .tile__slider-next {\n            right: -0.5rem;\n            padding: 1rem;\n          }\n          #vid-slider,\n          #vid-slider .row {\n            margin: 0;\n          }\n  \n          #vid-slider .row::-webkit-scrollbar-thumb {\n            background-color: transparent !important;\n          }\n          #vid-slider i {\n            border: solid ' + (props.dark ? 'white' : 'black') + ';\n            border-width: 0 4px 4px 0;\n            display: inline-block;\n            padding: 4px;\n            pointer-events: none;\n          }\n          #vid-slider .right {\n            transform: rotate(-45deg);\n            -webkit-transform: rotate(-45deg);\n          }\n          #vid-slider .left {\n            transform: rotate(135deg);\n            -webkit-transform: rotate(135deg);\n          }\n          @media screen and (min-width: 1399px) {\n            .block-content #vid-slider .tile__img {\n              height: auto;\n            }\n            .block-content #vid-slider .tile {\n              height: auto;\n            }\n          }\n  \n          @media screen and (max-width: 1399px) {\n            #vid-slider,\n            #vidHolder {\n              max-width: 620px;\n            }\n          }\n          @media screen and (max-width: 1200px) {\n            #vid-slider,\n            #vidHolder {\n              max-width: 580px;\n            }\n          }\n          @media screen and (max-width: 967px) {\n            #vid-slider {\n              max-width: 100%;\n            }\n  \n            #vid-slider .row__inner {\n              margin: 60px 0 50px !important;\n            }\n          }\n  \n          @media screen and (max-width: 768px) {\n            #vidHolder {\n              position: unset;\n              width: 100%;\n            }\n          }\n          @media screen and (max-width: 568px) {\n            #vidHolder {\n              position: unset;\n              width: 100%;\n            }\n  \n            #vid-slider .row__inner {\n              margin: 30px 0 70px;\n            }\n          }\n        '
      )
    )
  );
};

var _this = undefined;

var PartnerDetails = function PartnerDetails(_ref) {
  var posts = _ref.posts,
      query = _ref.query,
      params = _ref.params,
      features = _ref.features,
      currentPage = _ref.currentPage,
      partnerDetails = _ref.partnerDetails,
      client = _ref.client,
      Settings = _ref.Settings,
      pageview = _ref.pageview,
      page = _ref.page;

  return React__default.createElement(
    React__default.Fragment,
    null,
    React__default.createElement(Breadcrumbs, null),
    React__default.createElement(
      'div',
      { className: 'partners-page' },
      React__default.createElement(
        'div',
        { className: 'my-5 partner-logo-wrap', style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' } },
        partnerDetails.thumbnail && partnerDetails.thumbnail.link ? React__default.createElement(
          'a',
          { className: 'partners-logo', style: { width: '25%', minWidth: '25%' }, href: partnerDetails.thumbnail.link, target: partnerDetails.thumbnail.blank ? '_blank' : '' },
          React__default.createElement(
            'figure',
            { style: { width: '100%', textAlign: 'center' } },
            React__default.createElement('img', {
              alt: partnerDetails.thumbnail && partnerDetails.thumbnail.alt ? partnerDetails.thumbnail.alt : partnerDetails.name,
              style: { maxWidth: '100%' },
              src: partnerDetails.thumbnail ? urlFor(client, partnerDetails.thumbnail.asset) : '' }),
            partnerDetails.thumbnail && partnerDetails.thumbnail.caption && React__default.createElement(
              'figcaption',
              null,
              partnerDetails.thumbnail.caption
            )
          )
        ) : React__default.createElement(
          'figure',
          { className: 'partners-logo', style: { width: '25%', minWidth: '25%', textAlign: 'center' } },
          React__default.createElement('img', {
            alt: partnerDetails.thumbnail && partnerDetails.thumbnail.alt ? partnerDetails.thumbnail.alt : partnerDetails.name,
            style: { maxWidth: '100%' },
            src: partnerDetails.thumbnail ? urlFor(client, partnerDetails.thumbnail.asset) : '' }),
          partnerDetails.thumbnail && partnerDetails.thumbnail.caption && React__default.createElement(
            'figcaption',
            null,
            partnerDetails.thumbnail.caption
          )
        ),
        React__default.createElement(
          'style',
          { jsx: 'true' },
          '\n            @media screen and (max-width: 768px) {\n              .partners-logo {\n                width: 100%;\n                min-width: 100%;\n              }\n              .partner-logo-wrap {\n                flex-wrap: wrap;\n              }\n              .block-content-partners {\n                padding-left: 0 !important;\n              }\n            }\n          '
        ),
        partnerDetails.description && React__default.createElement(
          'div',
          { className: 'block-content-partners my-4', style: { maxWidth: '100%', paddingLeft: '2rem', flex: '1 1 auto' } },
          React__default.createElement(BlockContent.BlockContent, _extends$1._extends({ serializers: getSerializers.getSerializers(client), blocks: partnerDetails.description, imageOptions: { w: 320, h: 240, fit: 'max' } }, client.config()))
        )
      ),
      partnerDetails.affiliates && partnerDetails.affiliates[0] && partnerDetails.affiliates[0].slides && React__default.createElement(
        'div',
        { className: 'mb-4', style: { padding: '0 15px' } },
        partnerDetails.affiliates[0].title && React__default.createElement(
          'h2',
          { className: 'bb-gold' },
          partnerDetails.affiliates[0].title
        ),
        React__default.createElement(ImageSlider, { client: client, data: partnerDetails.affiliates[0] })
      ),
      features.length > 0 && React__default.createElement(
        'div',
        { className: ' mb-5' },
        React__default.createElement(Feature, { dataset: features, client: client })
      ),
      partnerDetails.twitter && React__default.createElement(
        React__default.Fragment,
        null,
        React__default.createElement(
          'div',
          { className: 'mb-5', style: { width: '100%', textAlign: 'center', padding: '0 15px', border: '2px solid #aaa', borderRadius: '15px' } },
          React__default.createElement(TwitterTimelineEmbed, { sourceType: 'url', url: partnerDetails.twitter, options: { height: 400 } })
        )
      ),
      React__default.createElement(
        'div',
        null,
        posts && posts.length > 0 && React__default.createElement(
          React__default.Fragment,
          null,
          React__default.createElement(
            'h2',
            { className: 'bb-gold mb-2' },
            'Latest from ',
            partnerDetails.name
          ),
          React__default.createElement('hr', null)
        ),
        React__default.createElement(QueueDeckExpanded, {
          client: client,
          mapping: Settings.mapping,
          dataRecord: posts,
          query: query,
          params: params,
          currentPage: currentPage,
          seoPaginate: true,
          columns: 'rotate',
          variant: 'top',
          page: page,
          autoScroll: true,
          defaultImage: Settings.logo,
          showPublished: true,
          showCategory: true,
          pageview: pageview
        })
      )
    )
  );
};

PartnerDetails.returnGetInitialProps = function () {
  var _ref2 = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee(identifier, partnerPageUrl, partnerDocumentGroupID, params, currentPage, client) {
    var category = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;

    var today, featureQuery, partnerQuery, taxonomyQuery, _ref3, _ref4, features, partnerDetails, taxonomyDetails, articlesQuery, articles;

    return asyncToGenerator.regenerator.wrap(function _callee$(_context) {
      while (1) {
        switch (_context.prev = _context.next) {
          case 0:
            today = moment.moment().utc().format();
            featureQuery = '*[_type == \'feature\' && is_active == true && feature_url == \'/' + partnerPageUrl + '/' + (category ? category + '/' : null) + identifier + '\'] | order(_updatedAt asc)[0..5]{\n      ...,\n       \'feature_img\' : feature_img.asset->url\n      }';
            partnerQuery = '*[_type == \'documentGroup\' \n      && !(_id in path("drafts.**"))\n      && references(\'' + partnerDocumentGroupID + '\')\n      && identifier.current == \'' + identifier + '\'] | order(name asc) [0] {\n        description,\n          name,\n          identifier,\n          thumbnail,\n          twitter,\n          "affiliates": description[_type==\'slideshows\']{\n            ...,\n            slides->{...}\n          }\n      }';


            if (category) {
              //if partners page has a sub category such as onclive
              //e.g. /sap-partner/[category]/[partner]

              partnerQuery = '*[_type == \'documentGroup\' && !(_id in path("drafts.**")) && identifier.current == \'' + category + '\' && references(\'' + partnerDocumentGroupID + '\')] [0] {\n    ...,\n    \'partner\': *[_type == \'documentGroup\' && identifier.current == \'' + identifier + '\' && references(^._id)] [0] {\n          description,\n          name,\n          identifier,\n          thumbnail,\n          twitter,\n          "affiliates": description[_type==\'slideshows\']{\n            ...,\n            slides->{...}\n          }\n    \n    }\n  }';
            }

            taxonomyQuery = '*[_type == \'documentGroup\' \n      && !(_id in path("drafts.**"))\n      && references(\'' + partnerDocumentGroupID + '\')\n      && identifier.current == \'' + identifier + '\'] [0] {\n          \'id\': _id,\n          \'title\': name\n      }';

            if (category) {
              taxonomyQuery = '*[_type == \'documentGroup\' \n     && !(_id in path("drafts.**"))\n     && identifier.current == \'' + identifier + '\' && references(*[_type == \'documentGroup\' && identifier.current == \'' + category + '\' && references(\'' + partnerDocumentGroupID + '\')]._id)] [0] {\n         \'id\': _id,\n         \'title\': name\n     }';
            }
            _context.next = 8;
            return asyncToGenerator._Promise.all([client.fetch(featureQuery), client.fetch(partnerQuery), client.fetch(taxonomyQuery)]);

          case 8:
            _ref3 = _context.sent;
            _ref4 = slicedToArray._slicedToArray(_ref3, 3);
            features = _ref4[0];
            partnerDetails = _ref4[1];
            taxonomyDetails = _ref4[2];
            articlesQuery = '*[_type == \'article\' && !(_id in path("drafts.**")) && defined(title) && is_visible == true && defined(url) && dateTime(published) <= dateTime(\'' + today + '\') && passwordLocked != true && references(\'' + taxonomyDetails.id + '\')] | order(published desc)[$from...$to]{\n          title,\n          summary,\n          thumbnail,\n      url,\n      published,\n      contentCategory->,\n      \'pageNumber\': ' + currentPage + '\n    }';
            _context.next = 16;
            return client.fetch(articlesQuery, params);

          case 16:
            articles = _context.sent;


            //need to exclude slideshows from body due to the affiliate slider
            if (partnerDetails && partnerDetails.description) {
              partnerDetails.description = partnerDetails.description.filter(function (block) {
                return block._type !== 'slideshows';
              });
            }

            return _context.abrupt('return', { articles: articles, taxonomyDetails: taxonomyDetails, partnerDetails: category ? partnerDetails.partner : partnerDetails, features: features, featureQuery: featureQuery, partnerQuery: partnerQuery, taxonomyQuery: taxonomyQuery, articlesQuery: articlesQuery });

          case 19:
          case 'end':
            return _context.stop();
        }
      }
    }, _callee, _this);
  }));

  return function (_x, _x2, _x3, _x4, _x5, _x6) {
    return _ref2.apply(this, arguments);
  };
}();

module.exports = PartnerDetails;
