'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

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

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');
require('./extends-60837c34.js');
require('./_object-sap-5e74ba08.js');
require('./inherits-c9f99d47.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-8bf6c863.js');
require('prop-types');
require('react-bootstrap/Container');
var Row = _interopDefault(require('react-bootstrap/Row'));
var Col = _interopDefault(require('react-bootstrap/Col'));
require('react-bootstrap/Card');
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');
var index$2 = require('./index-da796b8c.js');
require('./main-02daeefe.js');
require('./entities-310b46ee.js');
require('./slicedToArray-8f385299.js');
require('./stringify-7c5aff47.js');
require('./asyncToGenerator-533d476a.js');
require('./_set-species-f92c67c5.js');
var Segment = require('./Segment.js');
var Beam = require('./Beam.js');
var AdSlot = require('./AdSlot.js');
require('./ADInfeed-547e399f.js');
var DeckContent = require('./DeckContent.js');
require('./lodash-fc2922d0.js');
require('./ADlgInfeed-84cd6750.js');
require('./getContentCategory-f38a4c00.js');
require('./get-68c52cb1.js');
var AD = require('./AD.js');
require('./AuthorComponent-bb831b74.js');
var GridContent = require('./GridContent.js');
var DeckQueue = require('./DeckQueue.js');
require('react-bootstrap/Media');
var ThumbnailCard = require('./ThumbnailCard.js');
require('./BlockContent-091a991f.js');
require('./react-social-icons-f7f48f71.js');
var TaxonomyCard = require('./TaxonomyCard.js');
var RolesDeck = require('./RolesDeck.js');
require('./index-187c967e.js');
require('./smoothscroll-5054361f.js');
var GroupDeck = require('./GroupDeck.js');
var YoutubeGroup = require('./YoutubeGroup.js');
require('react-bootstrap');
require('./timeDifferenceCalc.js');
var QueueDeckExpanded = require('./QueueDeckExpanded.js');
require('./iconBase-68959171.js');
require('./index.esm-90433435.js');
var VideoSeriesListing = require('./VideoSeriesListing.js');
var ArticleSeriesListing = require('./ArticleSeriesListing.js');
var ArticleCarousel = require('./ArticleCarousel.js');
var getSerializers = require('./index-4ec63018.js');
require('./util-f2c1b65b.js');
require('./brightcove-react-player-loader.es-156bd4d6.js');
require('next/head');
require('react-share');
var SocialShare = require('./SocialShare.js');
require('./_object-to-array-5762f850.js');
require('react-bootstrap/Pagination');
require('react-bootstrap/Button');
require('react-bootstrap/Figure');
var HorizontalArticleListing = require('./HorizontalArticleListing.js');
var MasterDeck = require('./MasterDeck.js');
var PublicationDeck = require('./PublicationDeck.js');
var IssueDeck = require('./IssueDeck.js');
require('react-bootstrap/Badge');
var IssueContentDeck = require('./IssueContentDeck.js');
require('./defineProperty-55548b25.js');
var EventsDeck = require('./EventsDeck.js');
require('react-bootstrap/Spinner');
require('react-bootstrap/Form');
require('./index-3294d3bc.js');
require('./js.cookie-a511c430.js');
var CMEDeck = require('./CMEDeck.js');
var ExternalResources = require('./ExternalResources.js');
var Column1 = require('./Column1.js');
var SideFooter = require('./SideFooter.js');
require('./ConferenceBanner-4a16fddc.js');
var Column2 = require('./Column2.js');
var ADSponsoredResources = require('./ADSponsoredResources.js');
require('react-bootstrap/ListGroup');
var ADWebcast = require('./ADWebcast.js');
var LeftNav = require('./LeftNav.js');
var PageFilter = require('./PageFilter.js');
var Column3 = require('./Column3.js');
var Header = require('./Header.js');
require('react-bootstrap/Accordion');
require('react-bootstrap/AccordionToggle');
var AccordionPanel = require('./AccordionPanel.js');
var VideoSeriesFilter = require('./VideoSeriesFilter.js');
require('react-bootstrap/Nav');
require('react-bootstrap/Navbar');
require('react-bootstrap/NavDropdown');
require('./index.esm-66ffa47a.js');
require('./NavFooter-76c913e3.js');
require('./index.esm-4d410430.js');
var SocialIcons = require('./SocialIcons.js');
require('react-bootstrap/FormControl');
require('./SocialSearchComponent-8dd468fd.js');
var NavMagazine = require('./NavMagazine.js');
var NavNative = require('./NavNative.js');
var Search = require('./Search.js');
var NavNormal = require('./NavNormal.js');
var NavDvm = require('./NavDvm.js');
var HamMagazine = require('./HamMagazine.js');
var ADGutter = require('./ADGutter.js');
var AD728x90 = require('./AD728x90.js');
var TemplateNormal = require('./TemplateNormal.js');
var AD300x250 = require('./AD300x250.js');
var AD300x250x600 = require('./AD300x250x600.js');
var ADFooter = require('./ADFooter.js');
var AdSlotsProvider = require('./AdSlotsProvider.js');
var ADFloatingFooter = require('./ADFloatingFooter.js');
var ADWelcome = require('./ADWelcome.js');
var ADSkyscraper = require('./ADSkyscraper.js');
require('react-bootstrap/Carousel');
var Feature = require('./Feature.js');
require('react-bootstrap/Breadcrumb');
var Breadcrumbs = require('./Breadcrumbs.js');
var Hero = require('./Hero.js');
require('./keys-a586b7a0.js');
var AlphabeticList = require('./AlphabeticList.js');
var PdfDownload = require('./PdfDownload.js');
require('react-bootstrap/DropdownButton');
require('react-bootstrap/Dropdown');
var RelatedTopicsDropdown = require('./RelatedTopicsDropdown.js');
require('./index.esm-ff47db6f.js');
var Ustream = require('./Ustream.js');
var HighlightenVideo = require('./HighlightenVideo.js');
var PublicationLanding = require('./PublicationLanding.js');
var IssueLanding = require('./IssueLanding.js');
require('react-bootstrap/Modal');
var PopUpModal = require('./PopUpModal.js');
var RelatedContent = require('./RelatedContent.js');
var TaxonomyDescription = require('./TaxonomyDescription.js');
var PubToc = require('./PubToc.js');
var PubSection = require('./PubSection.js');
var ForbesHero = require('./ForbesHero.js');
var HorizontalHero = require('./HorizontalHero.js');
var OncliveHero = require('./OncliveHero.js');
var OncliveLargeHero = require('./OncliveLargeHero.js');
var VerticalHero = require('./VerticalHero.js');
var YahooHero = require('./YahooHero.js');
var GridHero = require('./GridHero.js');
var ConferenceArticleCard = require('./ConferenceArticleCard.js');
var KMTracker = require('./KMTracker.js');
var getSeriesDetail = require('./getSeriesDetail.js');
var SetCookie = require('./SetCookie.js');
require('nookies');
var getQuery = require('./getQuery.js');
var getRelatedArticle = require('./getRelatedArticle.js');
var Auth = require('./Auth.js');
require('swr');
require('cookie');
require('passport-local');
require('mysql');
require('./SeriesSlider-0a4b30a7.js');
var getTargeting = require('./getTargeting-9af0ef69.js');
var View = require('./View.js');
var getKeywords = require('./getKeywords.js');
var urlFor = require('./urlFor.js');
require('./style-inject.es-dcee06b6.js');
require('disqus-react');
require('react-twitter-embed');
var PartnerDetailListing = require('./PartnerDetailListing.js');
var VideoProgramLandingPage = require('./VideoProgramLandingPage.js');
require('./VideoSeriesCard.js');
var VideoSeriesLandingPage = require('./VideoSeriesLandingPage.js');
var ArticleProgramLandingPage = require('./ArticleProgramLandingPage.js');
var ArticleSeriesLandingPage = require('./ArticleSeriesLandingPage.js');

//Feature query to be used
// const featureQuery = `*[_type == 'feature' && is_active == true && feature_url == "/"] | order(_updatedAt asc)[0..5]{
//     ...,
//      feature_img { asset-> {url} }
//    }`

//Update*  Added control toggle for features.  Will default to off -
//<Feature controls dataset={props.features} /></div>

var FeatureArticles = function FeatureArticles(props) {
  var data = props.dataset;

  var client = props.client,
      _props$imageWidth = props.imageWidth,
      imageWidth = _props$imageWidth === undefined ? 200 : _props$imageWidth,
      imageHeight = props.imageHeight,
      defaultImage = props.defaultImage,
      _props$styles = props.styles,
      styles = _props$styles === undefined ? null : _props$styles;


  var urlFor = function urlFor(source) {
    var builder = index$1.imageUrlBuilder(client);
    return builder.image(source).auto('format');
  };

  var renderImage = function renderImage(thumbnail, imageWidth, imageHeight) {
    var url = urlFor(thumbnail);
    if (imageHeight) url = url.height(imageHeight);
    if (imageWidth) url = url.width(imageWidth);
    return url.url();
  };

  //image width updated.

  return React__default.createElement(
    'div',
    { className: 'featured-articles-wrapper' },
    data.map(function (article, index) {
      return React__default.createElement(
        React__default.Fragment,
        null,
        React__default.createElement(
          Row,
          { className: 'article-wrap' },
          React__default.createElement(
            Col,
            { className: 'mb-4 m-fl-center deck', xs: 12, sm: 4, md: 4, lg: 3, xl: 3 },
            React__default.createElement(
              'a',
              { href: '' + article.feature_link },
              React__default.createElement(
                'figure',
                { style: { marginTop: '1rem' } },
                React__default.createElement(
                  index$2.LazyLoad,
                  { height: imageHeight },
                  React__default.createElement('img', { style: { width: '100%', borderRadius: '10px' }, src: article.feature_img ? renderImage(article.feature_img, imageWidth, imageHeight) : defaultImage })
                )
              )
            )
          ),
          React__default.createElement(
            Col,
            { className: 'article-wrap-body', xs: 12, sm: 8, md: 8, lg: 9, xl: 9, style: { paddingTop: '10px' } },
            React__default.createElement(
              'a',
              { href: '' + article.feature_link },
              React__default.createElement(
                'h4',
                { className: 'mb-1', style: { fontWeight: '600', fontSize: '22px' } },
                article.feature_title
              ),
              React__default.createElement(
                'p',
                { style: { fontSize: '1.1em' } },
                article.feature_body
              )
            )
          ),
          index !== data.length - 1 && React__default.createElement('hr', null)
        ),
        React__default.createElement(
          'style',
          { jsx: 'true' },
          '\n              .featured-articles-wrapper {\n                background: ' + props.backgroundColor + ';\n                padding: 1rem;\n                border-radius: 10px;\n                box-shadow: #0000002b 1px 3px 3px 3px;\n              }\n              hr {\n                width: 100%;\n                height: 1px;\n                margin-left: 15px;\n                margin-right: 15px;\n              }\n              ' + styles + '\n            '
        )
      );
    })
  );
};

exports.Segment = Segment;
exports.Beam = Beam;
exports.AdSlot = AdSlot;
exports.DeckContent = DeckContent;
exports.AD = AD;
exports.GridContent = GridContent;
exports.DeckQueue = DeckQueue;
exports.ThumbnailCard = ThumbnailCard;
exports.TaxonomyCard = TaxonomyCard;
exports.RolesDeck = RolesDeck;
exports.GroupDeck = GroupDeck;
exports.YoutubeGroup = YoutubeGroup;
exports.QueueDeckExpanded = QueueDeckExpanded;
exports.VideoSeriesListing = VideoSeriesListing;
exports.ArticleSeriesListing = ArticleSeriesListing;
exports.ArticleCarousel = ArticleCarousel;
exports.getSerializers = getSerializers.getSerializers;
exports.SocialShare = SocialShare;
exports.HorizontalArticleListing = HorizontalArticleListing;
exports.MasterDeck = MasterDeck;
exports.PublicationDeck = PublicationDeck;
exports.IssueDeck = IssueDeck;
exports.IssueContentDeck = IssueContentDeck;
exports.EventsDeck = EventsDeck;
exports.CMEDeck = CMEDeck;
exports.ExternalResources = ExternalResources;
exports.Column1 = Column1.Column1;
exports.SideFooter = SideFooter;
exports.Column2 = Column2.Column2;
exports.ADSponsoredResources = ADSponsoredResources;
exports.ADWebcast = ADWebcast;
exports.LeftNav = LeftNav.default;
exports.PageFilter = PageFilter;
exports.Column3 = Column3.Column3;
exports.Header = Header.default;
exports.AccordionPanel = AccordionPanel;
exports.VideoSeriesFilter = VideoSeriesFilter;
exports.SocialIcons = SocialIcons;
exports.NavMagazine = NavMagazine.default;
exports.NavNative = NavNative.NavNative;
exports.Search = Search;
exports.NavNormal = NavNormal.NavNormal;
exports.NavDvm = NavDvm.NavDvm;
exports.HamMagazine = HamMagazine.HamMagazine;
exports.ADGutter = ADGutter;
exports.AD728x90 = AD728x90;
exports.TemplateNormal = TemplateNormal;
exports.AD300x250 = AD300x250;
exports.AD300x250x600 = AD300x250x600;
exports.ADFooter = ADFooter;
exports.AdSlotsProvider = AdSlotsProvider;
exports.ADFloatingFooter = ADFloatingFooter;
exports.ADWelcome = ADWelcome;
exports.ADSkyscraper = ADSkyscraper;
exports.Feature = Feature;
exports.Breadcrumbs = Breadcrumbs;
exports.Hero = Hero;
exports.AlphabeticList = AlphabeticList;
exports.PdfDownload = PdfDownload;
exports.RelatedTopicsDropdown = RelatedTopicsDropdown;
exports.Ustream = Ustream;
exports.HighlightenVideo = HighlightenVideo;
exports.PublicationLanding = PublicationLanding;
exports.IssueLanding = IssueLanding;
exports.PopUpModal = PopUpModal;
exports.RelatedContent = RelatedContent;
exports.TaxonomyDescription = TaxonomyDescription;
exports.PubToc = PubToc;
exports.PubSection = PubSection;
exports.ForbesHero = ForbesHero;
exports.HorizontalHero = HorizontalHero;
exports.OncliveHero = OncliveHero;
exports.OncliveLargeHero = OncliveLargeHero;
exports.VerticalHero = VerticalHero;
exports.YahooHero = YahooHero;
exports.GridHero = GridHero;
exports.ConferenceArticleCard = ConferenceArticleCard;
exports.KMTracker = KMTracker;
exports.getSeriesDetail = getSeriesDetail;
exports.SetCookie = SetCookie;
exports.getQuery = getQuery;
exports.getRelatedArticle = getRelatedArticle;
exports.Auth = Auth.default;
exports.getTargeting = getTargeting.getTargeting;
exports.View = View;
exports.getKeywords = getKeywords;
exports.urlFor = urlFor;
exports.PartnerDetailListing = PartnerDetailListing;
exports.VideoProgramLandingPage = VideoProgramLandingPage;
exports.VideoSeriesLandingPage = VideoSeriesLandingPage;
exports.ArticleProgramLandingPage = ArticleProgramLandingPage;
exports.ArticleSeriesLandingPage = ArticleSeriesLandingPage;
exports.FeatureArticles = FeatureArticles;
