{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/date-fns/parse/index.js","webpack:///./node_modules/preact/dist/preact.esm.js","webpack:///./node_modules/@nrk/dh-feature-components/dist/module/lib/preact-pure-component.js","webpack:///./node_modules/@nrk/dh-utils/dist/module/index.js","webpack:///./node_modules/@nrk/dh-feature-components/dist/module/index.js","webpack:///./node_modules/date-fns/start_of_day/index.js","webpack:///./node_modules/date-fns/start_of_iso_week/index.js","webpack:///./node_modules/date-fns/get_iso_year/index.js","webpack:///./node_modules/@nrk/serum-imagecrop-utils/lib/index.js","webpack:///./src/lib/preact-pure-component.js","webpack:///./node_modules/date-fns/compare_asc/index.js","webpack:///./node_modules/date-fns/start_of_iso_year/index.js","webpack:///./node_modules/date-fns/add_milliseconds/index.js","webpack:///./node_modules/date-fns/add_days/index.js","webpack:///./src/v1/components/VisualStory/index.css?4678","webpack:///./src/v1/components/Article/index.css?f088","webpack:///./node_modules/date-fns/difference_in_milliseconds/index.js","webpack:///./node_modules/date-fns/add_months/index.js","webpack:///./node_modules/date-fns/difference_in_calendar_days/index.js","webpack:///./node_modules/date-fns/start_of_week/index.js","webpack:///./node_modules/date-fns/is_same_week/index.js","webpack:///./node_modules/date-fns/get_iso_week/index.js","webpack:///./node_modules/date-fns/end_of_day/index.js","webpack:///./node_modules/date-fns/locale/en/index.js","webpack:///./node_modules/date-fns/difference_in_seconds/index.js","webpack:///./node_modules/date-fns/difference_in_months/index.js","webpack:///./node_modules/date-fns/compare_desc/index.js","webpack:///./node_modules/date-fns/add_weeks/index.js","webpack:///./node_modules/date-fns/get_days_in_month/index.js","webpack:///./node_modules/date-fns/is_date/index.js","webpack:///./src/v1/components/VideoPlayer/index.css?1c3a","webpack:///./node_modules/@nrk/dh-feature-components/dist/module/serum/helpers.js","webpack:///./node_modules/@nrk/dh-feature-components/dist/module/ChatLog/lib/image-url.js","webpack:///./node_modules/@nrk/dh-feature-components/dist/module/ChatLog/Avatar/index.js","webpack:///./node_modules/date-fns/set_month/index.js","webpack:///./node_modules/date-fns/last_day_of_week/index.js","webpack:///./node_modules/date-fns/is_same_year/index.js","webpack:///./node_modules/date-fns/start_of_second/index.js","webpack:///./node_modules/date-fns/is_same_second/index.js","webpack:///./node_modules/date-fns/start_of_quarter/index.js","webpack:///./node_modules/date-fns/is_same_quarter/index.js","webpack:///./node_modules/date-fns/is_same_month/index.js","webpack:///./node_modules/date-fns/start_of_minute/index.js","webpack:///./node_modules/date-fns/is_same_minute/index.js","webpack:///./node_modules/date-fns/is_same_iso_year/index.js","webpack:///./node_modules/date-fns/is_same_iso_week/index.js","webpack:///./node_modules/date-fns/start_of_hour/index.js","webpack:///./node_modules/date-fns/is_same_hour/index.js","webpack:///./node_modules/date-fns/get_iso_day/index.js","webpack:///./node_modules/date-fns/is_leap_year/index.js","webpack:///./node_modules/date-fns/is_valid/index.js","webpack:///./node_modules/date-fns/start_of_year/index.js","webpack:///./node_modules/date-fns/get_day_of_year/index.js","webpack:///./node_modules/date-fns/end_of_month/index.js","webpack:///./node_modules/date-fns/end_of_week/index.js","webpack:///./node_modules/date-fns/distance_in_words/index.js","webpack:///./node_modules/date-fns/sub_iso_years/index.js","webpack:///./node_modules/date-fns/difference_in_days/index.js","webpack:///./node_modules/date-fns/difference_in_calendar_years/index.js","webpack:///./node_modules/date-fns/get_quarter/index.js","webpack:///./node_modules/date-fns/difference_in_calendar_months/index.js","webpack:///./node_modules/date-fns/difference_in_calendar_iso_years/index.js","webpack:///./node_modules/date-fns/add_years/index.js","webpack:///./node_modules/date-fns/add_seconds/index.js","webpack:///./node_modules/date-fns/add_quarters/index.js","webpack:///./node_modules/date-fns/add_minutes/index.js","webpack:///./node_modules/date-fns/set_iso_year/index.js","webpack:///./node_modules/date-fns/add_iso_years/index.js","webpack:///./node_modules/date-fns/add_hours/index.js","webpack:///./src/v1/components/Article/Header.js","webpack:///./src/v1/components/VisualStory/cards/DefaultCard.js","webpack:///./src/v1/components/VisualStory/cards/FactBoxCard.js","webpack:///./src/v1/components/VideoPlayer/ResponsiveVideo.js","webpack:///./src/v1/components/VideoPlayer/MuteButton.css?291d","webpack:///./src/v1/components/VideoPlayer/MuteButton.js","webpack:///./src/v1/components/VideoPlayer/TogglePlayButton.css?4bd1","webpack:///./src/v1/components/VideoPlayer/TogglePlayButton.js","webpack:///./src/v1/components/VideoPlayer/Scrubber.css?cede","webpack:///./src/v1/components/VideoPlayer/Scrubber.js","webpack:///./src/v1/components/VideoPlayer/index.js","webpack:///./src/v1/components/VisualStory/MediaSlide.js","webpack:///./src/v1/components/VisualStory/index.js","webpack:///./node_modules/@nrk/dh-feature-components/dist/module/Video/index.js","webpack:///./node_modules/@nrk/dh-feature-components/dist/module/ViewportIntersections/index.js","webpack:///./node_modules/@nrk/dh-feature-components/dist/module/Slideshow/index.js","webpack:///./node_modules/@nrk/dh-feature-components/dist/module/Slideshow/Slide.js","webpack:///./node_modules/@nrk/dh-feature-components/dist/module/serum/SerumSmartPicture/index.js","webpack:///./node_modules/@nrk/dh-feature-components/dist/module/serum/SerumResponsivePicture/index.js","webpack:///./node_modules/@nrk/dh-feature-components/dist/module/serum/SerumImage/index.js","webpack:///./node_modules/@nrk/dh-feature-components/dist/module/PullQuote/index.js","webpack:///./node_modules/@nrk/dh-feature-components/dist/module/Paragraph/index.js","webpack:///./node_modules/@nrk/dh-feature-components/dist/module/List/ListItem.js","webpack:///./node_modules/@nrk/dh-feature-components/dist/module/List/index.js","webpack:///./node_modules/@nrk/dh-feature-components/dist/module/Heading/index.js","webpack:///./node_modules/@nrk/dh-feature-components/dist/module/Figure/index.js","webpack:///./node_modules/@nrk/dh-feature-components/dist/module/ChatLog/Date/index.js","webpack:///./node_modules/@nrk/dh-feature-components/dist/module/ChatLog/Message/TextMessage/index.js","webpack:///./node_modules/@nrk/dh-feature-components/dist/module/ChatLog/Avatar/AvatarImage/index.js","webpack:///./node_modules/@nrk/dh-feature-components/dist/module/ChatLog/Message/ImageMessage/index.js","webpack:///./node_modules/@nrk/dh-feature-components/dist/module/ChatLog/Message/index.js","webpack:///./node_modules/@nrk/dh-feature-components/dist/module/ChatLog/index.js","webpack:///./node_modules/@nrk/dh-feature-components/dist/module/Byline/index.js","webpack:///./src/v1/components/Article/Section.js","webpack:///./src/v1/components/Article/Content.js","webpack:///./node_modules/date-fns/sub_years/index.js","webpack:///./node_modules/date-fns/sub_weeks/index.js","webpack:///./node_modules/date-fns/sub_seconds/index.js","webpack:///./node_modules/date-fns/sub_quarters/index.js","webpack:///./node_modules/date-fns/sub_months/index.js","webpack:///./node_modules/date-fns/sub_minutes/index.js","webpack:///./node_modules/date-fns/sub_milliseconds/index.js","webpack:///./node_modules/date-fns/sub_hours/index.js","webpack:///./node_modules/date-fns/sub_days/index.js","webpack:///./node_modules/date-fns/start_of_yesterday/index.js","webpack:///./node_modules/date-fns/start_of_tomorrow/index.js","webpack:///./node_modules/date-fns/start_of_today/index.js","webpack:///./node_modules/date-fns/start_of_month/index.js","webpack:///./node_modules/date-fns/set_year/index.js","webpack:///./node_modules/date-fns/set_seconds/index.js","webpack:///./node_modules/date-fns/set_quarter/index.js","webpack:///./node_modules/date-fns/set_minutes/index.js","webpack:///./node_modules/date-fns/set_milliseconds/index.js","webpack:///./node_modules/date-fns/set_iso_week/index.js","webpack:///./node_modules/date-fns/set_iso_day/index.js","webpack:///./node_modules/date-fns/set_hours/index.js","webpack:///./node_modules/date-fns/set_day_of_year/index.js","webpack:///./node_modules/date-fns/set_day/index.js","webpack:///./node_modules/date-fns/set_date/index.js","webpack:///./node_modules/date-fns/min/index.js","webpack:///./node_modules/date-fns/max/index.js","webpack:///./node_modules/date-fns/last_day_of_year/index.js","webpack:///./node_modules/date-fns/last_day_of_quarter/index.js","webpack:///./node_modules/date-fns/last_day_of_month/index.js","webpack:///./node_modules/date-fns/last_day_of_iso_year/index.js","webpack:///./node_modules/date-fns/last_day_of_iso_week/index.js","webpack:///./node_modules/date-fns/is_yesterday/index.js","webpack:///./node_modules/date-fns/is_within_range/index.js","webpack:///./node_modules/date-fns/is_weekend/index.js","webpack:///./node_modules/date-fns/is_wednesday/index.js","webpack:///./node_modules/date-fns/is_tuesday/index.js","webpack:///./node_modules/date-fns/is_tomorrow/index.js","webpack:///./node_modules/date-fns/is_today/index.js","webpack:///./node_modules/date-fns/is_thursday/index.js","webpack:///./node_modules/date-fns/is_this_year/index.js","webpack:///./node_modules/date-fns/is_this_week/index.js","webpack:///./node_modules/date-fns/is_this_second/index.js","webpack:///./node_modules/date-fns/is_this_quarter/index.js","webpack:///./node_modules/date-fns/is_this_month/index.js","webpack:///./node_modules/date-fns/is_this_minute/index.js","webpack:///./node_modules/date-fns/is_this_iso_year/index.js","webpack:///./node_modules/date-fns/is_this_iso_week/index.js","webpack:///./node_modules/date-fns/is_this_hour/index.js","webpack:///./node_modules/date-fns/is_sunday/index.js","webpack:///./node_modules/date-fns/is_saturday/index.js","webpack:///./node_modules/date-fns/is_same_day/index.js","webpack:///./node_modules/date-fns/is_past/index.js","webpack:///./node_modules/date-fns/is_monday/index.js","webpack:///./node_modules/date-fns/is_last_day_of_month/index.js","webpack:///./node_modules/date-fns/is_future/index.js","webpack:///./node_modules/date-fns/is_friday/index.js","webpack:///./node_modules/date-fns/is_first_day_of_month/index.js","webpack:///./node_modules/date-fns/is_equal/index.js","webpack:///./node_modules/date-fns/is_before/index.js","webpack:///./node_modules/date-fns/is_after/index.js","webpack:///./node_modules/date-fns/get_year/index.js","webpack:///./node_modules/date-fns/get_time/index.js","webpack:///./node_modules/date-fns/get_seconds/index.js","webpack:///./node_modules/date-fns/get_overlapping_days_in_ranges/index.js","webpack:///./node_modules/date-fns/get_month/index.js","webpack:///./node_modules/date-fns/get_minutes/index.js","webpack:///./node_modules/date-fns/get_milliseconds/index.js","webpack:///./node_modules/date-fns/get_iso_weeks_in_year/index.js","webpack:///./node_modules/date-fns/get_hours/index.js","webpack:///./node_modules/date-fns/get_days_in_year/index.js","webpack:///./node_modules/date-fns/get_day/index.js","webpack:///./node_modules/date-fns/get_date/index.js","webpack:///./node_modules/date-fns/format/index.js","webpack:///./node_modules/date-fns/end_of_yesterday/index.js","webpack:///./node_modules/date-fns/end_of_year/index.js","webpack:///./node_modules/date-fns/end_of_tomorrow/index.js","webpack:///./node_modules/date-fns/end_of_today/index.js","webpack:///./node_modules/date-fns/end_of_second/index.js","webpack:///./node_modules/date-fns/end_of_quarter/index.js","webpack:///./node_modules/date-fns/end_of_minute/index.js","webpack:///./node_modules/date-fns/end_of_iso_year/index.js","webpack:///./node_modules/date-fns/end_of_iso_week/index.js","webpack:///./node_modules/date-fns/end_of_hour/index.js","webpack:///./node_modules/date-fns/each_day/index.js","webpack:///./node_modules/date-fns/distance_in_words_to_now/index.js","webpack:///./node_modules/date-fns/distance_in_words_strict/index.js","webpack:///./node_modules/date-fns/locale/_lib/build_formatting_tokens_reg_exp/index.js","webpack:///./node_modules/date-fns/locale/en/build_format_locale/index.js","webpack:///./node_modules/date-fns/locale/en/build_distance_in_words_locale/index.js","webpack:///./node_modules/date-fns/difference_in_years/index.js","webpack:///./node_modules/date-fns/difference_in_weeks/index.js","webpack:///./node_modules/date-fns/difference_in_quarters/index.js","webpack:///./node_modules/date-fns/difference_in_minutes/index.js","webpack:///./node_modules/date-fns/difference_in_iso_years/index.js","webpack:///./node_modules/date-fns/difference_in_hours/index.js","webpack:///./node_modules/date-fns/difference_in_calendar_weeks/index.js","webpack:///./node_modules/date-fns/difference_in_calendar_quarters/index.js","webpack:///./node_modules/date-fns/difference_in_calendar_iso_weeks/index.js","webpack:///./node_modules/date-fns/closest_to/index.js","webpack:///./node_modules/date-fns/closest_index_to/index.js","webpack:///./node_modules/date-fns/are_ranges_overlapping/index.js","webpack:///./node_modules/date-fns/index.js","webpack:///./node_modules/@nrk/max-viewport-observable/dist/max-viewport-observable.module.js","webpack:///./src/v1/components/Article/index.js","webpack:///./src/v1/client.css?3bc8","webpack:///./src/lib/google-analytics.js","webpack:///./node_modules/domready/ready.js","webpack:///./node_modules/@nrk/feature-tests/dist/feature-tests.module.js","webpack:///./node_modules/@nrk/dh-utils/dist/module/string.js","webpack:///./node_modules/@nrk/dh-utils/dist/module/scroll.js","webpack:///./node_modules/@nrk/dh-utils/dist/module/bem.js","webpack:///./node_modules/@nrk/dh-utils/dist/module/array.js","webpack:///./src/v1/client.js","webpack:///./node_modules/intersection-observer/intersection-observer.js","webpack:///./src/v1/client.polyfill.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","r","value","n","__esModule","object","property","prototype","hasOwnProperty","p","s","isDate","MILLISECONDS_IN_HOUR","MILLISECONDS_IN_MINUTE","DEFAULT_ADDITIONAL_DIGITS","parseTokenDateTimeDelimeter","parseTokenPlainTime","parseTokenYY","parseTokensYYY","parseTokenYYYY","parseTokensYYYYY","parseTokenMM","parseTokenDDD","parseTokenMMDD","parseTokenWww","parseTokenWwwD","parseTokenHH","parseTokenHHMM","parseTokenHHMMSS","parseTokenTimezone","parseTokenTimezoneZ","parseTokenTimezoneHH","parseTokenTimezoneHHMM","dayOfISOYear","isoYear","week","day","date","Date","setUTCFullYear","diff","getUTCDay","setUTCDate","getUTCDate","argument","dirtyOptions","getTime","additionalDigits","Number","dateStrings","dateString","timeString","array","split","test","token","exec","time","replace","timezone","splitDateString","parseYearResult","parseTokenYYY","parseTokenYYYYY","yearString","year","parseInt","restDateString","slice","length","centuryString","parseYear","month","dayOfYear","dayOfWeek","parseDate","offset","timestamp","hours","minutes","parseFloat","seconds","parseTime","timezoneString","absoluteOffset","getTimezoneOffset","options","stack","EMPTY_CHILDREN","h","nodeName","attributes","lastSimple","child","simple","children","arguments","push","pop","undefined","String","key","vnode","extend","obj","props","defer","Promise","resolve","then","bind","setTimeout","cloneElement","IS_NON_DIMENSIONAL","items","enqueueRender","component","_dirty","debounceRendering","rerender","list","renderComponent","isNamedNode","node","normalizedNodeName","toLowerCase","getNodeProps","defaultProps","removeNode","parentNode","removeChild","setAccessor","old","isSvg","style","cssText","_typeof","innerHTML","__html","useCapture","substring","addEventListener","eventProxy","removeEventListener","_listeners","e","setProperty","removeAttribute","ns","removeAttributeNS","setAttributeNS","setAttribute","className","this","type","event","mounts","diffLevel","isSvgMode","hydrating","flushMounts","afterMount","componentDidMount","dom","context","mountAll","parent","componentRoot","ownerSVGElement","ret","idiff","appendChild","out","prevSvgMode","splitText","_component","nodeValue","document","createTextNode","replaceChild","recollectNodeTree","vnodeName","originalComponent","oldDom","isDirectOwner","_componentConstructor","isOwner","_parentComponent","constructor","setComponentProps","base","unmountComponent","createComponent","nextBase","buildComponentFromVNode","createElementNS","createElement","firstChild","fc","vchildren","a","nextSibling","isHydrating","j","f","vchild","originalChildren","childNodes","keyed","keyedLen","min","len","childrenLen","vlen","_child","__key","trim","insertBefore","innerDiffNode","dangerouslySetInnerHTML","attrs","diffAttributes","unmountOnly","ref","removeChildren","lastChild","next","previousSibling","components","Ctor","inst","render","Component","doRender","splice","state","opts","_disable","__ref","componentWillMount","componentWillReceiveProps","prevContext","prevProps","syncComponentUpdates","isChild","rendered","cbase","previousProps","previousState","prevState","previousContext","isUpdate","initialBase","initialChildComponent","skip","shouldComponentUpdate","componentWillUpdate","getChildContext","toUnmount","childComponent","childProps","baseParent","componentRef","t","unshift","componentDidUpdate","afterUpdate","_renderCallbacks","beforeUnmount","componentWillUnmount","inner","collectComponent","merge","setState","callback","forceUpdate","preact","_preact","_createClass","defineProperties","target","descriptor","writable","Constructor","protoProps","staticProps","shallowEqual","b","_key","PureComponent","_Component","instance","TypeError","_classCallCheck","self","ReferenceError","_possibleConstructorReturn","__proto__","getPrototypeOf","apply","subClass","superClass","create","setPrototypeOf","_inherits","_array","_bem","_scroll","_string","bem","createUniqueId","getScrollLeft","getScrollTop","toArray","Byline","ChatLog","Figure","Heading","List","ListItem","Paragraph","PullQuote","SerumImage","SerumSmartPicture","SerumResponsivePicture","Slide","Slideshow","ViewportIntersections","Video","parse","dirtyDate","setHours","startOfWeek","weekStartsOn","startOfISOWeek","getFullYear","fourthOfJanuaryOfNextYear","setFullYear","startOfNextYear","fourthOfJanuaryOfThisYear","startOfThisYear","factory","isPolopolyIdRegex","isPolopolyId","id","widths","ratios","qualities","_baseUrl","hasOption","option","createImageUrl","polopolyId","width","ratio","quality","Error","number","args","supportedRatios","Array","isArray","includes","isValidRatio","toString","supportedQualities","isValidQuality","isInteger","isSupportedWidth","closestWidth","goal","targets","isValidGoal","isValid","isValidTargets","reduce","prev","curr","Math","abs","getClosestNumber","_ref","url","queryString","_ref2","createQueryString","createUrl","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","__WEBPACK_AMD_DEFINE_FACTORY__","dirtyDateLeft","dirtyDateRight","timeLeft","timeRight","getISOYear","fourthOfJanuary","dirtyAmount","amount","setDate","getDate","visualStory","root--js","visualStory__slideshow","visualStory__slide","root--noJs","visualStory__cards","defaultCard","defaultCard__wrapper","defaultCard--right","defaultCard--left","factBoxCard","factBoxCard__wrapper","factBoxCard--right","factBoxCard--left","factBoxCard__title","factBoxCard__list","article","article__header","article__leadMediaWrapper","article__leadMedia","article__headerText","article__title","article__intro","article__authors","article__content","article__paragraph","section","section__heading","section__content","article__publishedAt","dateLeft","dateRight","getDaysInMonth","desiredMonth","getMonth","dateWithDesiredMonth","daysInMonth","setMonth","startOfDay","MILLISECONDS_IN_DAY","startOfDayLeft","startOfDayRight","timestampLeft","timestampRight","round","getDay","dateLeftStartOfWeek","dateRightStartOfWeek","startOfISOYear","MILLISECONDS_IN_WEEK","buildDistanceInWordsLocale","buildFormatLocale","distanceInWords","format","differenceInMilliseconds","floor","ceil","differenceInCalendarMonths","compareAsc","sign","difference","addDays","monthIndex","lastDayOfMonth","videoPlayer","videoPlayer__videoWrapper","videoPlayer__video","videoPlayer__horizontalVideo","videoPlayer__video--vertical","videoPlayer__verticalVideo","videoPlayer__togglePlayButton","videoPlayer__muteButton","videoPlayer__captionContainer","videoPlayer__caption","createResponsiveSrcSet","IMAGE_WIDTHS","map","imageUrl","_serumImagecropUtils","join","getImageUrl","image","_ref$width","_ref$ratio","_dhUtils","_AvatarImage","styles","Avatar","person","displayImage","aria-hidden","side","AvatarImage","alt","title","initials","item","charAt","toUpperCase","getInitials","dirtyMonth","setMilliseconds","startOfSecond","dateLeftStartOfSecond","dateRightStartOfSecond","currentMonth","startOfQuarter","dateLeftStartOfQuarter","dateRightStartOfQuarter","setSeconds","startOfMinute","dateLeftStartOfMinute","dateRightStartOfMinute","dateLeftStartOfYear","dateRightStartOfYear","isSameWeek","setMinutes","startOfHour","dateLeftStartOfHour","dateRightStartOfHour","isNaN","cleanDate","startOfYear","differenceInCalendarDays","compareDesc","differenceInSeconds","differenceInMonths","enLocale","MINUTES_IN_DAY","MINUTES_IN_ALMOST_TWO_DAYS","MINUTES_IN_MONTH","MINUTES_IN_TWO_MONTHS","dirtyDateToCompare","comparison","locale","localize","localizeOptions","addSuffix","Boolean","months","includeSeconds","monthsSinceStartOfYear","years","addISOYears","addMonths","addMilliseconds","dirtyISOYear","setISOYear","_dhFeatureComponents","Header","_props$data","data","authors","intro","leadMedia","_props","mediaBaseUrl","viewport","inlineStyle","leadMediaWrapperInlineStyle","height","_index2","default","loop","playing","muted","poster","sources","source","src","_index","_props$value","align","content","wrapperInlineStyle","marginTop","itemIdx","html","ResponsiveVideo","currentTime","handleTimeUpdate","_this","onTimeUpdate","isVerticalViewport","updateTime","verticalVideo","play","horizontalVideo","_this2","captions","preload","horizontal","vertical","onCaptionCueEnter","onCaptionCueExit","onDurationChange","onPlay","onPause","onEnded","commonProps","_extends","muteButton","muteButton__volumeIcon","muteButton--muted","muteButton__mutedIcon","_MuteButton2","onClick","_MuteButton","togglePlayButton","togglePlayButton__playIcon","togglePlayButton--paused","togglePlayButton__pauseIcon","paused","_TogglePlayButton2","_TogglePlayButton","scrubber","scrubber__bgBar","scrubber__bufferedBar","scrubber__playedBar","_Scrubber","Scrubber","left","isScrubbing","position","handleKeyDown","evt","_this$props","duration","onPositionUpdate","nextTime","max","handleMouseDown","preventDefault","focus","start","pageX","elm","handleMouseMove","window","handleMouseUp","move","end","handleResize","rect","bgElm","getBoundingClientRect","handleTouchStart","touches","clientX","handleTouchMove","handleTouchEnd","handleElm","positionTimeout","clearTimeout","_this3","class","_Scrubber2","role","aria-valuemin","aria-valuemax","aria-valuenow","VideoPlayer","handleCaptionCueEnter","cue","caption","text","handleCaptionCueExit","handleDurationChange","handlePositionUpdate","video","handleTogglePlay","userPaused","handlePlay","handlePause","handleEnded","onToggleMute","_state","_ResponsiveVideo2","active","onAnalyticsEvent","stacked","visible","media","_VideoPlayer2","in","action","VisualStory","scrollTop","top","bottom","handleChange","intersections","intersectionRatio","visibleIndex","handleEnter","entry","idx","slides","onRegisterTriggerElement","sectionIndex","index","isIntersecting","startVisibilityListener","stopVisibilityListener","halfHeight","innerHeight","visibleRaf","requestAnimationFrame","cancelAnimationFrame","_state2","cardsInlineStyle","paddingBottom","slide","_MediaSlide2","onChange","onEnter","threshold","_FactBoxCard2","_DefaultCard2","_preactPureComponent","_PureComponent","_temp","_len","concat","handleCanPlay","onCanPlay","_preactPureComponent2","track","addTextTrack","forEach","addCue","VTTCue","ex","TextTrackCue","mode","_loop","cues","onenter","onexit","_","_props2","pause","_props3","controls","playsInline","onLeave","rootMargin","intersectionObserver","IntersectionObserver","entries","indexOf","prevIntersection","childElm","observe","disconnect","_helpers","assign","defaultUrl","horizontalSourceSet","verticalSourceSet","srcSet","cite","viewBox","cx","cy","level","htmlProps","credit","isFirst","_Avatar","TextMessage","message","isLastInGroup","from","display","showAvatar","showName","avatarImage","_imageUrl","nopin","data-pin-nopin","chatLog","avatar","avatar__placeholder","avatar--right","date--isFirst","message--left","message--showAvatar","message--right","message--isLastInGroup","message__text","message__text--right","message__text--left","message__image","message__image--expanded","message__image--clickable","message__image--hover","message__image--left","message__image--right","message__name","message__content","message__content--left","message__content--right","message__content--showName","ImageMessage","imageSrc","_ImageMessage","_TextMessage","Message","_Message","_Date","messages","author","Section","seen","onRegisterSectionElement","_VisualStory2","Content","handleRegisterSectionElement","sectionElm","sectionElms","handleRegisterTriggerElement","triggerElm","triggerElms","sections","sectionIntersections","triggerIntersections","triggerIndex","_Section2","addYears","addWeeks","addSeconds","addQuarters","addMinutes","addHours","now","dirtyYear","dirtySeconds","dirtyQuarter","dirtyMinutes","dirtyMilliseconds","milliseconds","getISOWeek","dirtyISOWeek","isoWeek","getISODay","dirtyDay","currentDay","dirtyHours","dirtyDayOfYear","dirtyDayOfMonth","dayOfMonth","dates","earliestTimestamp","latestTimestamp","lastDayOfWeek","yesterday","dirtyStartDate","dirtyEndDate","startTime","endTime","tomorrow","isSameYear","isSameSecond","isSameQuarter","isSameMonth","isSameMinute","isSameISOYear","isSameISOWeek","isSameHour","dateLeftStartOfDay","dateRightStartOfDay","endOfDay","endOfMonth","dirtyLeftDate","dirtyRightDate","dateToCompare","getSeconds","dirtyInitialRangeStartDate","dirtyInitialRangeEndDate","dirtyComparedRangeStartDate","dirtyComparedRangeEndDate","initialStartTime","initialEndTime","comparedStartTime","comparedEndTime","differenceInMs","getMinutes","getMilliseconds","thisYear","valueOf","getHours","isLeapYear","getDayOfYear","formatters","M","MM","addLeadingZeros","Q","D","DD","DDD","DDDD","E","W","WW","YY","substr","YYYY","GG","GGGG","H","HH","hh","mm","ss","S","SS","SSS","Z","formatTimezone","ZZ","X","x","delimeter","absOffset","targetLength","output","dirtyFormatStr","formatStr","localeFormatters","formattingTokensRegExp","formatter","input","match","Function","buildFormatFn","formatFn","endOfWeek","dirtyStep","startDate","endDate","step","currentDate","MINUTES_IN_YEAR","unit","mathPartial","partialMethod","commonFormatterKeys","formatterKeys","formattingTokens","sort","reverse","RegExp","buildFormattingTokensRegExp","months3char","monthsFull","weekdays2char","weekdays3char","weekdaysFull","meridiemUppercase","meridiemLowercase","meridiemFull","MMM","MMMM","dd","ddd","dddd","A","aa","formatterToken","rem100","ordinal","distanceInWordsLocale","lessThanXSeconds","one","other","xSeconds","halfAMinute","lessThanXMinutes","xMinutes","aboutXHours","xHours","xDays","aboutXMonths","xMonths","aboutXYears","xYears","overXYears","almostXYears","count","result","differenceInCalendarYears","differenceInDays","differenceInCalendarISOYears","subISOYears","startOfWeekLeft","startOfWeekRight","getQuarter","startOfISOWeekLeft","startOfISOWeekRight","dirtyDatesArray","minDistance","timeToCompare","distance","areRangesOverlapping","closestIndexTo","closestTo","differenceInCalendarISOWeeks","differenceInCalendarQuarters","differenceInCalendarWeeks","differenceInHours","differenceInISOYears","differenceInMinutes","differenceInQuarters","differenceInWeeks","differenceInYears","distanceInWordsStrict","distanceInWordsToNow","eachDay","endOfHour","endOfISOWeek","endOfISOYear","endOfMinute","endOfQuarter","endOfSecond","endOfToday","endOfTomorrow","endOfYear","endOfYesterday","getDaysInYear","getISOWeeksInYear","getOverlappingDaysInRanges","getYear","isAfter","isBefore","isEqual","isFirstDayOfMonth","isFriday","isFuture","isLastDayOfMonth","isMonday","isPast","isSameDay","isSaturday","isSunday","isThisHour","isThisISOWeek","isThisISOYear","isThisMinute","isThisMonth","isThisQuarter","isThisSecond","isThisWeek","isThisYear","isThursday","isToday","isTomorrow","isTuesday","isWednesday","isWeekend","isWithinRange","isYesterday","lastDayOfISOWeek","lastDayOfISOYear","lastDayOfQuarter","lastDayOfYear","setDay","setDayOfYear","setISODay","setISOWeek","setQuarter","setYear","startOfMonth","startOfToday","startOfTomorrow","startOfYesterday","subDays","subHours","subMilliseconds","subMinutes","subMonths","subQuarters","subSeconds","subWeeks","subYears","root","subscribe","observer","isDynamicViewport","isTouching","listeners","orientationchange","resize","prevRect","Element","innerWidth","getRect","scroll","touchstart","touchend","unsubscribe","_dateFns","Article","handleToggleMute","viewport$","_maxViewportObservable2","viewportSubscription","publishedAt","_Header2","_Content2","saksuniversContainer","sendEvent","category","label","ga","console","log","listener","fns","doc","loaded","documentElement","doScroll","readyState","shift","fn","hasSupportCache","testEventPassiveListener","testJs","testJs$1","objectFit","testPositionSticky","el","videoAutoPlayCache","testVideoAutoPlay","videoElm","isPlaying","canPlayType","load","playPromise","catch","oncanplay","onplay","testObjectFit","prefix","random","pageXOffset","scrollLeft","pageYOffset","_toConsumableArray","arr","arr2","blockName","modifiers","strings","filter","modifier","objectString","keys","toStrings","nodeList","_featureTests","_googleAnalytics","handleAnalyticsEvent","analyticsEvent","_client2","_domready2","getElementsByClassName","isInitialized","callbackFn","hasSupport","preloadedState","JSON","getAttribute","renderApp","IntersectionObserverEntry","registry","THROTTLE_TIMEOUT","POLL_INTERVAL","USE_MUTATION_OBSERVER","_observationTargets","some","element","nodeType","_registerInstance","_monitorIntersections","_checkForIntersections","unobserve","_unmonitorIntersections","_unregisterInstance","takeRecords","records","_queuedEntries","_initThresholds","opt_threshold","_parseRootMargin","opt_rootMargin","margins","margin","parts","_monitoringIntersections","_monitoringInterval","setInterval","addEvent","_domObserver","MutationObserver","childList","characterData","subtree","clearInterval","removeEvent","rootIsInDom","_rootIsInDom","rootRect","_getRootRect","right","targetRect","rootContainsTarget","_rootContainsTarget","oldEntry","intersectionRect","_computeTargetAndRootIntersection","newEntry","performance","boundingClientRect","rootBounds","_hasCrossedThreshold","_callback","getComputedStyle","rect1","rect2","getParentNode","atRoot","parentRect","parentComputedStyle","body","overflow","clientWidth","clientHeight","_expandRectByRootMargin","_rootMarginValues","newRect","oldRatio","newRatio","thresholds","containsDeep","targetArea","intersectionArea","opt_options","timeout","timer","opt_useCapture","attachEvent","detatchEvent","err","host"],"mappings":"aACA,IAAAA,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,IACAG,EAAAH,EACAI,GAAA,EACAH,YAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,E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KnF,SACvBmF,GACE6C,IAAK7C,EAAK6C,IACVghB,MAAO7jB,EAAK6jB,MACZ/gB,OAAQ9C,EAAK8C,OACbpE,KAAMsB,EAAKtB,KACX5Q,MAAOkS,EAAK6jB,MAAQ7jB,EAAKtB,KACzB7D,OAAQmF,EAAK8C,OAAS9C,EAAK6C,MAGxB7C,IAWL6C,IAAK,EACLC,OAAQ,EACRpE,KAAM,EACNmlB,MAAO,EACP/1B,MAAO,EACP+M,OAAQ,GAWZ,SAAS8qB,EAAaxjC,EAAQzE,GAE5B,IADA,IAAI8B,EAAO9B,EACJ8B,GAAM,CACX,GAAIA,GAAQ2C,EAAQ,OAAO,EAE3B3C,EAAOqlC,EAAcrlC,GAEvB,OAAO,EAUT,SAASqlC,EAAcrlC,GACrB,IAAI2C,EAAS3C,EAAKM,WAElB,OAAIqC,GAA6B,IAAnBA,EAAO0/B,UAAkB1/B,EAAOkkC,KAErClkC,EAAOkkC,KAETlkC,GAlsBR,CA0sBCwd,OAAQ7c,wCCntBVnM,EAAA","file":"trygd-tryl-v1-38cfe2ad829b8c36e3ca.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/static/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 238);\n","var isDate = require('../is_date/index.js')\n\nvar MILLISECONDS_IN_HOUR = 3600000\nvar MILLISECONDS_IN_MINUTE = 60000\nvar DEFAULT_ADDITIONAL_DIGITS = 2\n\nvar parseTokenDateTimeDelimeter = /[T ]/\nvar parseTokenPlainTime = /:/\n\n// year tokens\nvar parseTokenYY = /^(\\d{2})$/\nvar parseTokensYYY = [\n /^([+-]\\d{2})$/, // 0 additional digits\n /^([+-]\\d{3})$/, // 1 additional digit\n /^([+-]\\d{4})$/ // 2 additional digits\n]\n\nvar parseTokenYYYY = /^(\\d{4})/\nvar parseTokensYYYYY = [\n /^([+-]\\d{4})/, // 0 additional digits\n /^([+-]\\d{5})/, // 1 additional digit\n /^([+-]\\d{6})/ // 2 additional digits\n]\n\n// date tokens\nvar parseTokenMM = /^-(\\d{2})$/\nvar parseTokenDDD = /^-?(\\d{3})$/\nvar parseTokenMMDD = /^-?(\\d{2})-?(\\d{2})$/\nvar parseTokenWww = /^-?W(\\d{2})$/\nvar parseTokenWwwD = /^-?W(\\d{2})-?(\\d{1})$/\n\n// time tokens\nvar parseTokenHH = /^(\\d{2}([.,]\\d*)?)$/\nvar parseTokenHHMM = /^(\\d{2}):?(\\d{2}([.,]\\d*)?)$/\nvar parseTokenHHMMSS = /^(\\d{2}):?(\\d{2}):?(\\d{2}([.,]\\d*)?)$/\n\n// timezone tokens\nvar parseTokenTimezone = /([Z+-].*)$/\nvar parseTokenTimezoneZ = /^(Z)$/\nvar parseTokenTimezoneHH = /^([+-])(\\d{2})$/\nvar parseTokenTimezoneHHMM = /^([+-])(\\d{2}):?(\\d{2})$/\n\n/**\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If an argument is a string, the function tries to parse it.\n * Function accepts complete ISO 8601 formats as well as partial implementations.\n * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601\n *\n * If all above fails, the function passes the given argument to Date constructor.\n *\n * @param {Date|String|Number} argument - the value to convert\n * @param {Object} [options] - the object with options\n * @param {0 | 1 | 2} [options.additionalDigits=2] - the additional number of digits in the extended year format\n * @returns {Date} the parsed date in the local time zone\n *\n * @example\n * // Convert string '2014-02-11T11:30:30' to date:\n * var result = parse('2014-02-11T11:30:30')\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Parse string '+02014101',\n * // if the additional number of digits in the extended year format is 1:\n * var result = parse('+02014101', {additionalDigits: 1})\n * //=> Fri Apr 11 2014 00:00:00\n */\nfunction parse (argument, dirtyOptions) {\n if (isDate(argument)) {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new Date(argument.getTime())\n } else if (typeof argument !== 'string') {\n return new Date(argument)\n }\n\n var options = dirtyOptions || {}\n var additionalDigits = options.additionalDigits\n if (additionalDigits == null) {\n additionalDigits = DEFAULT_ADDITIONAL_DIGITS\n } else {\n additionalDigits = Number(additionalDigits)\n }\n\n var dateStrings = splitDateString(argument)\n\n var parseYearResult = parseYear(dateStrings.date, additionalDigits)\n var year = parseYearResult.year\n var restDateString = parseYearResult.restDateString\n\n var date = parseDate(restDateString, year)\n\n if (date) {\n var timestamp = date.getTime()\n var time = 0\n var offset\n\n if (dateStrings.time) {\n time = parseTime(dateStrings.time)\n }\n\n if (dateStrings.timezone) {\n offset = parseTimezone(dateStrings.timezone)\n } else {\n // get offset accurate to hour in timezones that change offset\n offset = new Date(timestamp + time).getTimezoneOffset()\n offset = new Date(timestamp + time + offset * MILLISECONDS_IN_MINUTE).getTimezoneOffset()\n }\n\n return new Date(timestamp + time + offset * MILLISECONDS_IN_MINUTE)\n } else {\n return new Date(argument)\n }\n}\n\nfunction splitDateString (dateString) {\n var dateStrings = {}\n var array = dateString.split(parseTokenDateTimeDelimeter)\n var timeString\n\n if (parseTokenPlainTime.test(array[0])) {\n dateStrings.date = null\n timeString = array[0]\n } else {\n dateStrings.date = array[0]\n timeString = array[1]\n }\n\n if (timeString) {\n var token = parseTokenTimezone.exec(timeString)\n if (token) {\n dateStrings.time = timeString.replace(token[1], '')\n dateStrings.timezone = token[1]\n } else {\n dateStrings.time = timeString\n }\n }\n\n return dateStrings\n}\n\nfunction parseYear (dateString, additionalDigits) {\n var parseTokenYYY = parseTokensYYY[additionalDigits]\n var parseTokenYYYYY = parseTokensYYYYY[additionalDigits]\n\n var token\n\n // YYYY or ±YYYYY\n token = parseTokenYYYY.exec(dateString) || parseTokenYYYYY.exec(dateString)\n if (token) {\n var yearString = token[1]\n return {\n year: parseInt(yearString, 10),\n restDateString: dateString.slice(yearString.length)\n }\n }\n\n // YY or ±YYY\n token = parseTokenYY.exec(dateString) || parseTokenYYY.exec(dateString)\n if (token) {\n var centuryString = token[1]\n return {\n year: parseInt(centuryString, 10) * 100,\n restDateString: dateString.slice(centuryString.length)\n }\n }\n\n // Invalid ISO-formatted year\n return {\n year: null\n }\n}\n\nfunction parseDate (dateString, year) {\n // Invalid ISO-formatted year\n if (year === null) {\n return null\n }\n\n var token\n var date\n var month\n var week\n\n // YYYY\n if (dateString.length === 0) {\n date = new Date(0)\n date.setUTCFullYear(year)\n return date\n }\n\n // YYYY-MM\n token = parseTokenMM.exec(dateString)\n if (token) {\n date = new Date(0)\n month = parseInt(token[1], 10) - 1\n date.setUTCFullYear(year, month)\n return date\n }\n\n // YYYY-DDD or YYYYDDD\n token = parseTokenDDD.exec(dateString)\n if (token) {\n date = new Date(0)\n var dayOfYear = parseInt(token[1], 10)\n date.setUTCFullYear(year, 0, dayOfYear)\n return date\n }\n\n // YYYY-MM-DD or YYYYMMDD\n token = parseTokenMMDD.exec(dateString)\n if (token) {\n date = new Date(0)\n month = parseInt(token[1], 10) - 1\n var day = parseInt(token[2], 10)\n date.setUTCFullYear(year, month, day)\n return date\n }\n\n // YYYY-Www or YYYYWww\n token = parseTokenWww.exec(dateString)\n if (token) {\n week = parseInt(token[1], 10) - 1\n return dayOfISOYear(year, week)\n }\n\n // YYYY-Www-D or YYYYWwwD\n token = parseTokenWwwD.exec(dateString)\n if (token) {\n week = parseInt(token[1], 10) - 1\n var dayOfWeek = parseInt(token[2], 10) - 1\n return dayOfISOYear(year, week, dayOfWeek)\n }\n\n // Invalid ISO-formatted date\n return null\n}\n\nfunction parseTime (timeString) {\n var token\n var hours\n var minutes\n\n // hh\n token = parseTokenHH.exec(timeString)\n if (token) {\n hours = parseFloat(token[1].replace(',', '.'))\n return (hours % 24) * MILLISECONDS_IN_HOUR\n }\n\n // hh:mm or hhmm\n token = parseTokenHHMM.exec(timeString)\n if (token) {\n hours = parseInt(token[1], 10)\n minutes = parseFloat(token[2].replace(',', '.'))\n return (hours % 24) * MILLISECONDS_IN_HOUR +\n minutes * MILLISECONDS_IN_MINUTE\n }\n\n // hh:mm:ss or hhmmss\n token = parseTokenHHMMSS.exec(timeString)\n if (token) {\n hours = parseInt(token[1], 10)\n minutes = parseInt(token[2], 10)\n var seconds = parseFloat(token[3].replace(',', '.'))\n return (hours % 24) * MILLISECONDS_IN_HOUR +\n minutes * MILLISECONDS_IN_MINUTE +\n seconds * 1000\n }\n\n // Invalid ISO-formatted time\n return null\n}\n\nfunction parseTimezone (timezoneString) {\n var token\n var absoluteOffset\n\n // Z\n token = parseTokenTimezoneZ.exec(timezoneString)\n if (token) {\n return 0\n }\n\n // ±hh\n token = parseTokenTimezoneHH.exec(timezoneString)\n if (token) {\n absoluteOffset = parseInt(token[2], 10) * 60\n return (token[1] === '+') ? -absoluteOffset : absoluteOffset\n }\n\n // ±hh:mm or ±hhmm\n token = parseTokenTimezoneHHMM.exec(timezoneString)\n if (token) {\n absoluteOffset = parseInt(token[2], 10) * 60 + parseInt(token[3], 10)\n return (token[1] === '+') ? -absoluteOffset : absoluteOffset\n }\n\n return 0\n}\n\nfunction dayOfISOYear (isoYear, week, day) {\n week = week || 0\n day = day || 0\n var date = new Date(0)\n date.setUTCFullYear(isoYear, 0, 4)\n var fourthOfJanuaryDay = date.getUTCDay() || 7\n var diff = week * 7 + day + 1 - fourthOfJanuaryDay\n date.setUTCDate(date.getUTCDate() + diff)\n return date\n}\n\nmodule.exports = parse\n","/** Virtual DOM Node */\nfunction VNode() {}\n\n/** Global options\n *\t@public\n *\t@namespace options {Object}\n */\nvar options = {\n\n\t/** If `true`, `prop` changes trigger synchronous component updates.\n *\t@name syncComponentUpdates\n *\t@type Boolean\n *\t@default true\n */\n\t//syncComponentUpdates: true,\n\n\t/** Processes all created VNodes.\n *\t@param {VNode} vnode\tA newly-created VNode to normalize/process\n */\n\t//vnode(vnode) { }\n\n\t/** Hook invoked after a component is mounted. */\n\t// afterMount(component) { }\n\n\t/** Hook invoked after the DOM is updated with a component's latest render. */\n\t// afterUpdate(component) { }\n\n\t/** Hook invoked immediately before a component is unmounted. */\n\t// beforeUnmount(component) { }\n};\n\nvar stack = [];\n\nvar EMPTY_CHILDREN = [];\n\n/**\n * JSX/hyperscript reviver.\n * @see http://jasonformat.com/wtf-is-jsx\n * Benchmarks: https://esbench.com/bench/57ee8f8e330ab09900a1a1a0\n *\n * Note: this is exported as both `h()` and `createElement()` for compatibility reasons.\n *\n * Creates a VNode (virtual DOM element). A tree of VNodes can be used as a lightweight representation\n * of the structure of a DOM tree. This structure can be realized by recursively comparing it against\n * the current _actual_ DOM structure, and applying only the differences.\n *\n * `h()`/`createElement()` accepts an element name, a list of attributes/props,\n * and optionally children to append to the element.\n *\n * @example The following DOM tree\n *\n * `
Hello!
`\n *\n * can be constructed using this function as:\n *\n * `h('div', { id: 'foo', name : 'bar' }, 'Hello!');`\n *\n * @param {string} nodeName\tAn element name. Ex: `div`, `a`, `span`, etc.\n * @param {Object} attributes\tAny attributes/props to set on the created element.\n * @param rest\t\t\tAdditional arguments are taken to be children to append. Can be infinitely nested Arrays.\n *\n * @public\n */\nfunction h(nodeName, attributes) {\n\tvar children = EMPTY_CHILDREN,\n\t lastSimple,\n\t child,\n\t simple,\n\t i;\n\tfor (i = arguments.length; i-- > 2;) {\n\t\tstack.push(arguments[i]);\n\t}\n\tif (attributes && attributes.children != null) {\n\t\tif (!stack.length) stack.push(attributes.children);\n\t\tdelete attributes.children;\n\t}\n\twhile (stack.length) {\n\t\tif ((child = stack.pop()) && child.pop !== undefined) {\n\t\t\tfor (i = child.length; i--;) {\n\t\t\t\tstack.push(child[i]);\n\t\t\t}\n\t\t} else {\n\t\t\tif (typeof child === 'boolean') child = null;\n\n\t\t\tif (simple = typeof nodeName !== 'function') {\n\t\t\t\tif (child == null) child = '';else if (typeof child === 'number') child = String(child);else if (typeof child !== 'string') simple = false;\n\t\t\t}\n\n\t\t\tif (simple && lastSimple) {\n\t\t\t\tchildren[children.length - 1] += child;\n\t\t\t} else if (children === EMPTY_CHILDREN) {\n\t\t\t\tchildren = [child];\n\t\t\t} else {\n\t\t\t\tchildren.push(child);\n\t\t\t}\n\n\t\t\tlastSimple = simple;\n\t\t}\n\t}\n\n\tvar p = new VNode();\n\tp.nodeName = nodeName;\n\tp.children = children;\n\tp.attributes = attributes == null ? undefined : attributes;\n\tp.key = attributes == null ? undefined : attributes.key;\n\n\t// if a \"vnode hook\" is defined, pass every created VNode to it\n\tif (options.vnode !== undefined) options.vnode(p);\n\n\treturn p;\n}\n\n/**\n * Copy all properties from `props` onto `obj`.\n * @param {Object} obj\t\tObject onto which properties should be copied.\n * @param {Object} props\tObject from which to copy properties.\n * @returns obj\n * @private\n */\nfunction extend(obj, props) {\n for (var i in props) {\n obj[i] = props[i];\n }return obj;\n}\n\n/**\n * Call a function asynchronously, as soon as possible. Makes\n * use of HTML Promise to schedule the callback if available,\n * otherwise falling back to `setTimeout` (mainly for IE<11).\n *\n * @param {Function} callback\n */\nvar defer = typeof Promise == 'function' ? Promise.resolve().then.bind(Promise.resolve()) : setTimeout;\n\n/**\n * Clones the given VNode, optionally adding attributes/props and replacing its children.\n * @param {VNode} vnode\t\tThe virutal DOM element to clone\n * @param {Object} props\tAttributes/props to add when cloning\n * @param {VNode} rest\t\tAny additional arguments will be used as replacement children.\n */\nfunction cloneElement(vnode, props) {\n return h(vnode.nodeName, extend(extend({}, vnode.attributes), props), arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children);\n}\n\n// DOM properties that should NOT have \"px\" added when numeric\nvar IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;\n\n/** Managed queue of dirty components to be re-rendered */\n\nvar items = [];\n\nfunction enqueueRender(component) {\n\tif (!component._dirty && (component._dirty = true) && items.push(component) == 1) {\n\t\t(options.debounceRendering || defer)(rerender);\n\t}\n}\n\nfunction rerender() {\n\tvar p,\n\t list = items;\n\titems = [];\n\twhile (p = list.pop()) {\n\t\tif (p._dirty) renderComponent(p);\n\t}\n}\n\n/**\n * Check if two nodes are equivalent.\n *\n * @param {Node} node\t\t\tDOM Node to compare\n * @param {VNode} vnode\t\t\tVirtual DOM node to compare\n * @param {boolean} [hyrdating=false]\tIf true, ignores component constructors when comparing.\n * @private\n */\nfunction isSameNodeType(node, vnode, hydrating) {\n if (typeof vnode === 'string' || typeof vnode === 'number') {\n return node.splitText !== undefined;\n }\n if (typeof vnode.nodeName === 'string') {\n return !node._componentConstructor && isNamedNode(node, vnode.nodeName);\n }\n return hydrating || node._componentConstructor === vnode.nodeName;\n}\n\n/**\n * Check if an Element has a given nodeName, case-insensitively.\n *\n * @param {Element} node\tA DOM Element to inspect the name of.\n * @param {String} nodeName\tUnnormalized name to compare against.\n */\nfunction isNamedNode(node, nodeName) {\n return node.normalizedNodeName === nodeName || node.nodeName.toLowerCase() === nodeName.toLowerCase();\n}\n\n/**\n * Reconstruct Component-style `props` from a VNode.\n * Ensures default/fallback values from `defaultProps`:\n * Own-properties of `defaultProps` not present in `vnode.attributes` are added.\n *\n * @param {VNode} vnode\n * @returns {Object} props\n */\nfunction getNodeProps(vnode) {\n var props = extend({}, vnode.attributes);\n props.children = vnode.children;\n\n var defaultProps = vnode.nodeName.defaultProps;\n if (defaultProps !== undefined) {\n for (var i in defaultProps) {\n if (props[i] === undefined) {\n props[i] = defaultProps[i];\n }\n }\n }\n\n return props;\n}\n\n/** Create an element with the given nodeName.\n *\t@param {String} nodeName\n *\t@param {Boolean} [isSvg=false]\tIf `true`, creates an element within the SVG namespace.\n *\t@returns {Element} node\n */\nfunction createNode(nodeName, isSvg) {\n\tvar node = isSvg ? document.createElementNS('http://www.w3.org/2000/svg', nodeName) : document.createElement(nodeName);\n\tnode.normalizedNodeName = nodeName;\n\treturn node;\n}\n\n/** Remove a child node from its parent if attached.\n *\t@param {Element} node\t\tThe node to remove\n */\nfunction removeNode(node) {\n\tvar parentNode = node.parentNode;\n\tif (parentNode) parentNode.removeChild(node);\n}\n\n/** Set a named attribute on the given Node, with special behavior for some names and event handlers.\n *\tIf `value` is `null`, the attribute/handler will be removed.\n *\t@param {Element} node\tAn element to mutate\n *\t@param {string} name\tThe name/key to set, such as an event or attribute name\n *\t@param {any} old\tThe last value that was set for this name/node pair\n *\t@param {any} value\tAn attribute value, such as a function to be used as an event handler\n *\t@param {Boolean} isSvg\tAre we currently diffing inside an svg?\n *\t@private\n */\nfunction setAccessor(node, name, old, value, isSvg) {\n\tif (name === 'className') name = 'class';\n\n\tif (name === 'key') {\n\t\t// ignore\n\t} else if (name === 'ref') {\n\t\tif (old) old(null);\n\t\tif (value) value(node);\n\t} else if (name === 'class' && !isSvg) {\n\t\tnode.className = value || '';\n\t} else if (name === 'style') {\n\t\tif (!value || typeof value === 'string' || typeof old === 'string') {\n\t\t\tnode.style.cssText = value || '';\n\t\t}\n\t\tif (value && typeof value === 'object') {\n\t\t\tif (typeof old !== 'string') {\n\t\t\t\tfor (var i in old) {\n\t\t\t\t\tif (!(i in value)) node.style[i] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (var i in value) {\n\t\t\t\tnode.style[i] = typeof value[i] === 'number' && IS_NON_DIMENSIONAL.test(i) === false ? value[i] + 'px' : value[i];\n\t\t\t}\n\t\t}\n\t} else if (name === 'dangerouslySetInnerHTML') {\n\t\tif (value) node.innerHTML = value.__html || '';\n\t} else if (name[0] == 'o' && name[1] == 'n') {\n\t\tvar useCapture = name !== (name = name.replace(/Capture$/, ''));\n\t\tname = name.toLowerCase().substring(2);\n\t\tif (value) {\n\t\t\tif (!old) node.addEventListener(name, eventProxy, useCapture);\n\t\t} else {\n\t\t\tnode.removeEventListener(name, eventProxy, useCapture);\n\t\t}\n\t\t(node._listeners || (node._listeners = {}))[name] = value;\n\t} else if (name !== 'list' && name !== 'type' && !isSvg && name in node) {\n\t\tsetProperty(node, name, value == null ? '' : value);\n\t\tif (value == null || value === false) node.removeAttribute(name);\n\t} else {\n\t\tvar ns = isSvg && name !== (name = name.replace(/^xlink\\:?/, ''));\n\t\tif (value == null || value === false) {\n\t\t\tif (ns) node.removeAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase());else node.removeAttribute(name);\n\t\t} else if (typeof value !== 'function') {\n\t\t\tif (ns) node.setAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase(), value);else node.setAttribute(name, value);\n\t\t}\n\t}\n}\n\n/** Attempt to set a DOM property to the given value.\n *\tIE & FF throw for certain property-value combinations.\n */\nfunction setProperty(node, name, value) {\n\ttry {\n\t\tnode[name] = value;\n\t} catch (e) {}\n}\n\n/** Proxy an event to hooked event handlers\n *\t@private\n */\nfunction eventProxy(e) {\n\treturn this._listeners[e.type](options.event && options.event(e) || e);\n}\n\n/** Queue of components that have been mounted and are awaiting componentDidMount */\nvar mounts = [];\n\n/** Diff recursion count, used to track the end of the diff cycle. */\nvar diffLevel = 0;\n\n/** Global flag indicating if the diff is currently within an SVG */\nvar isSvgMode = false;\n\n/** Global flag indicating if the diff is performing hydration */\nvar hydrating = false;\n\n/** Invoke queued componentDidMount lifecycle methods */\nfunction flushMounts() {\n\tvar c;\n\twhile (c = mounts.pop()) {\n\t\tif (options.afterMount) options.afterMount(c);\n\t\tif (c.componentDidMount) c.componentDidMount();\n\t}\n}\n\n/** Apply differences in a given vnode (and it's deep children) to a real DOM Node.\n *\t@param {Element} [dom=null]\t\tA DOM node to mutate into the shape of the `vnode`\n *\t@param {VNode} vnode\t\t\tA VNode (with descendants forming a tree) representing the desired DOM structure\n *\t@returns {Element} dom\t\t\tThe created/mutated element\n *\t@private\n */\nfunction diff(dom, vnode, context, mountAll, parent, componentRoot) {\n\t// diffLevel having been 0 here indicates initial entry into the diff (not a subdiff)\n\tif (!diffLevel++) {\n\t\t// when first starting the diff, check if we're diffing an SVG or within an SVG\n\t\tisSvgMode = parent != null && parent.ownerSVGElement !== undefined;\n\n\t\t// hydration is indicated by the existing element to be diffed not having a prop cache\n\t\thydrating = dom != null && !('__preactattr_' in dom);\n\t}\n\n\tvar ret = idiff(dom, vnode, context, mountAll, componentRoot);\n\n\t// append the element if its a new parent\n\tif (parent && ret.parentNode !== parent) parent.appendChild(ret);\n\n\t// diffLevel being reduced to 0 means we're exiting the diff\n\tif (! --diffLevel) {\n\t\thydrating = false;\n\t\t// invoke queued componentDidMount lifecycle methods\n\t\tif (!componentRoot) flushMounts();\n\t}\n\n\treturn ret;\n}\n\n/** Internals of `diff()`, separated to allow bypassing diffLevel / mount flushing. */\nfunction idiff(dom, vnode, context, mountAll, componentRoot) {\n\tvar out = dom,\n\t prevSvgMode = isSvgMode;\n\n\t// empty values (null, undefined, booleans) render as empty Text nodes\n\tif (vnode == null || typeof vnode === 'boolean') vnode = '';\n\n\t// Fast case: Strings & Numbers create/update Text nodes.\n\tif (typeof vnode === 'string' || typeof vnode === 'number') {\n\n\t\t// update if it's already a Text node:\n\t\tif (dom && dom.splitText !== undefined && dom.parentNode && (!dom._component || componentRoot)) {\n\t\t\t/* istanbul ignore if */ /* Browser quirk that can't be covered: https://github.com/developit/preact/commit/fd4f21f5c45dfd75151bd27b4c217d8003aa5eb9 */\n\t\t\tif (dom.nodeValue != vnode) {\n\t\t\t\tdom.nodeValue = vnode;\n\t\t\t}\n\t\t} else {\n\t\t\t// it wasn't a Text node: replace it with one and recycle the old Element\n\t\t\tout = document.createTextNode(vnode);\n\t\t\tif (dom) {\n\t\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n\t\t\t\trecollectNodeTree(dom, true);\n\t\t\t}\n\t\t}\n\n\t\tout['__preactattr_'] = true;\n\n\t\treturn out;\n\t}\n\n\t// If the VNode represents a Component, perform a component diff:\n\tvar vnodeName = vnode.nodeName;\n\tif (typeof vnodeName === 'function') {\n\t\treturn buildComponentFromVNode(dom, vnode, context, mountAll);\n\t}\n\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\n\tisSvgMode = vnodeName === 'svg' ? true : vnodeName === 'foreignObject' ? false : isSvgMode;\n\n\t// If there's no existing element or it's the wrong type, create a new one:\n\tvnodeName = String(vnodeName);\n\tif (!dom || !isNamedNode(dom, vnodeName)) {\n\t\tout = createNode(vnodeName, isSvgMode);\n\n\t\tif (dom) {\n\t\t\t// move children into the replacement node\n\t\t\twhile (dom.firstChild) {\n\t\t\t\tout.appendChild(dom.firstChild);\n\t\t\t} // if the previous Element was mounted into the DOM, replace it inline\n\t\t\tif (dom.parentNode) dom.parentNode.replaceChild(out, dom);\n\n\t\t\t// recycle the old element (skips non-Element node types)\n\t\t\trecollectNodeTree(dom, true);\n\t\t}\n\t}\n\n\tvar fc = out.firstChild,\n\t props = out['__preactattr_'],\n\t vchildren = vnode.children;\n\n\tif (props == null) {\n\t\tprops = out['__preactattr_'] = {};\n\t\tfor (var a = out.attributes, i = a.length; i--;) {\n\t\t\tprops[a[i].name] = a[i].value;\n\t\t}\n\t}\n\n\t// Optimization: fast-path for elements containing a single TextNode:\n\tif (!hydrating && vchildren && vchildren.length === 1 && typeof vchildren[0] === 'string' && fc != null && fc.splitText !== undefined && fc.nextSibling == null) {\n\t\tif (fc.nodeValue != vchildren[0]) {\n\t\t\tfc.nodeValue = vchildren[0];\n\t\t}\n\t}\n\t// otherwise, if there are existing or new children, diff them:\n\telse if (vchildren && vchildren.length || fc != null) {\n\t\t\tinnerDiffNode(out, vchildren, context, mountAll, hydrating || props.dangerouslySetInnerHTML != null);\n\t\t}\n\n\t// Apply attributes/props from VNode to the DOM Element:\n\tdiffAttributes(out, vnode.attributes, props);\n\n\t// restore previous SVG mode: (in case we're exiting an SVG namespace)\n\tisSvgMode = prevSvgMode;\n\n\treturn out;\n}\n\n/** Apply child and attribute changes between a VNode and a DOM Node to the DOM.\n *\t@param {Element} dom\t\t\tElement whose children should be compared & mutated\n *\t@param {Array} vchildren\t\tArray of VNodes to compare to `dom.childNodes`\n *\t@param {Object} context\t\t\tImplicitly descendant context object (from most recent `getChildContext()`)\n *\t@param {Boolean} mountAll\n *\t@param {Boolean} isHydrating\tIf `true`, consumes externally created elements similar to hydration\n */\nfunction innerDiffNode(dom, vchildren, context, mountAll, isHydrating) {\n\tvar originalChildren = dom.childNodes,\n\t children = [],\n\t keyed = {},\n\t keyedLen = 0,\n\t min = 0,\n\t len = originalChildren.length,\n\t childrenLen = 0,\n\t vlen = vchildren ? vchildren.length : 0,\n\t j,\n\t c,\n\t f,\n\t vchild,\n\t child;\n\n\t// Build up a map of keyed children and an Array of unkeyed children:\n\tif (len !== 0) {\n\t\tfor (var i = 0; i < len; i++) {\n\t\t\tvar _child = originalChildren[i],\n\t\t\t props = _child['__preactattr_'],\n\t\t\t key = vlen && props ? _child._component ? _child._component.__key : props.key : null;\n\t\t\tif (key != null) {\n\t\t\t\tkeyedLen++;\n\t\t\t\tkeyed[key] = _child;\n\t\t\t} else if (props || (_child.splitText !== undefined ? isHydrating ? _child.nodeValue.trim() : true : isHydrating)) {\n\t\t\t\tchildren[childrenLen++] = _child;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (vlen !== 0) {\n\t\tfor (var i = 0; i < vlen; i++) {\n\t\t\tvchild = vchildren[i];\n\t\t\tchild = null;\n\n\t\t\t// attempt to find a node based on key matching\n\t\t\tvar key = vchild.key;\n\t\t\tif (key != null) {\n\t\t\t\tif (keyedLen && keyed[key] !== undefined) {\n\t\t\t\t\tchild = keyed[key];\n\t\t\t\t\tkeyed[key] = undefined;\n\t\t\t\t\tkeyedLen--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// attempt to pluck a node of the same type from the existing children\n\t\t\telse if (!child && min < childrenLen) {\n\t\t\t\t\tfor (j = min; j < childrenLen; j++) {\n\t\t\t\t\t\tif (children[j] !== undefined && isSameNodeType(c = children[j], vchild, isHydrating)) {\n\t\t\t\t\t\t\tchild = c;\n\t\t\t\t\t\t\tchildren[j] = undefined;\n\t\t\t\t\t\t\tif (j === childrenLen - 1) childrenLen--;\n\t\t\t\t\t\t\tif (j === min) min++;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// morph the matched/found/created DOM child to match vchild (deep)\n\t\t\tchild = idiff(child, vchild, context, mountAll);\n\n\t\t\tf = originalChildren[i];\n\t\t\tif (child && child !== dom && child !== f) {\n\t\t\t\tif (f == null) {\n\t\t\t\t\tdom.appendChild(child);\n\t\t\t\t} else if (child === f.nextSibling) {\n\t\t\t\t\tremoveNode(f);\n\t\t\t\t} else {\n\t\t\t\t\tdom.insertBefore(child, f);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// remove unused keyed children:\n\tif (keyedLen) {\n\t\tfor (var i in keyed) {\n\t\t\tif (keyed[i] !== undefined) recollectNodeTree(keyed[i], false);\n\t\t}\n\t}\n\n\t// remove orphaned unkeyed children:\n\twhile (min <= childrenLen) {\n\t\tif ((child = children[childrenLen--]) !== undefined) recollectNodeTree(child, false);\n\t}\n}\n\n/** Recursively recycle (or just unmount) a node and its descendants.\n *\t@param {Node} node\t\t\t\t\t\tDOM node to start unmount/removal from\n *\t@param {Boolean} [unmountOnly=false]\tIf `true`, only triggers unmount lifecycle, skips removal\n */\nfunction recollectNodeTree(node, unmountOnly) {\n\tvar component = node._component;\n\tif (component) {\n\t\t// if node is owned by a Component, unmount that component (ends up recursing back here)\n\t\tunmountComponent(component);\n\t} else {\n\t\t// If the node's VNode had a ref function, invoke it with null here.\n\t\t// (this is part of the React spec, and smart for unsetting references)\n\t\tif (node['__preactattr_'] != null && node['__preactattr_'].ref) node['__preactattr_'].ref(null);\n\n\t\tif (unmountOnly === false || node['__preactattr_'] == null) {\n\t\t\tremoveNode(node);\n\t\t}\n\n\t\tremoveChildren(node);\n\t}\n}\n\n/** Recollect/unmount all children.\n *\t- we use .lastChild here because it causes less reflow than .firstChild\n *\t- it's also cheaper than accessing the .childNodes Live NodeList\n */\nfunction removeChildren(node) {\n\tnode = node.lastChild;\n\twhile (node) {\n\t\tvar next = node.previousSibling;\n\t\trecollectNodeTree(node, true);\n\t\tnode = next;\n\t}\n}\n\n/** Apply differences in attributes from a VNode to the given DOM Element.\n *\t@param {Element} dom\t\tElement with attributes to diff `attrs` against\n *\t@param {Object} attrs\t\tThe desired end-state key-value attribute pairs\n *\t@param {Object} old\t\t\tCurrent/previous attributes (from previous VNode or element's prop cache)\n */\nfunction diffAttributes(dom, attrs, old) {\n\tvar name;\n\n\t// remove attributes no longer present on the vnode by setting them to undefined\n\tfor (name in old) {\n\t\tif (!(attrs && attrs[name] != null) && old[name] != null) {\n\t\t\tsetAccessor(dom, name, old[name], old[name] = undefined, isSvgMode);\n\t\t}\n\t}\n\n\t// add new & update changed attributes\n\tfor (name in attrs) {\n\t\tif (name !== 'children' && name !== 'innerHTML' && (!(name in old) || attrs[name] !== (name === 'value' || name === 'checked' ? dom[name] : old[name]))) {\n\t\t\tsetAccessor(dom, name, old[name], old[name] = attrs[name], isSvgMode);\n\t\t}\n\t}\n}\n\n/** Retains a pool of Components for re-use, keyed on component name.\n *\tNote: since component names are not unique or even necessarily available, these are primarily a form of sharding.\n *\t@private\n */\nvar components = {};\n\n/** Reclaim a component for later re-use by the recycler. */\nfunction collectComponent(component) {\n\tvar name = component.constructor.name;\n\t(components[name] || (components[name] = [])).push(component);\n}\n\n/** Create a component. Normalizes differences between PFC's and classful Components. */\nfunction createComponent(Ctor, props, context) {\n\tvar list = components[Ctor.name],\n\t inst;\n\n\tif (Ctor.prototype && Ctor.prototype.render) {\n\t\tinst = new Ctor(props, context);\n\t\tComponent.call(inst, props, context);\n\t} else {\n\t\tinst = new Component(props, context);\n\t\tinst.constructor = Ctor;\n\t\tinst.render = doRender;\n\t}\n\n\tif (list) {\n\t\tfor (var i = list.length; i--;) {\n\t\t\tif (list[i].constructor === Ctor) {\n\t\t\t\tinst.nextBase = list[i].nextBase;\n\t\t\t\tlist.splice(i, 1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn inst;\n}\n\n/** The `.render()` method for a PFC backing instance. */\nfunction doRender(props, state, context) {\n\treturn this.constructor(props, context);\n}\n\n/** Set a component's `props` (generally derived from JSX attributes).\n *\t@param {Object} props\n *\t@param {Object} [opts]\n *\t@param {boolean} [opts.renderSync=false]\tIf `true` and {@link options.syncComponentUpdates} is `true`, triggers synchronous rendering.\n *\t@param {boolean} [opts.render=true]\t\t\tIf `false`, no render will be triggered.\n */\nfunction setComponentProps(component, props, opts, context, mountAll) {\n\tif (component._disable) return;\n\tcomponent._disable = true;\n\n\tif (component.__ref = props.ref) delete props.ref;\n\tif (component.__key = props.key) delete props.key;\n\n\tif (!component.base || mountAll) {\n\t\tif (component.componentWillMount) component.componentWillMount();\n\t} else if (component.componentWillReceiveProps) {\n\t\tcomponent.componentWillReceiveProps(props, context);\n\t}\n\n\tif (context && context !== component.context) {\n\t\tif (!component.prevContext) component.prevContext = component.context;\n\t\tcomponent.context = context;\n\t}\n\n\tif (!component.prevProps) component.prevProps = component.props;\n\tcomponent.props = props;\n\n\tcomponent._disable = false;\n\n\tif (opts !== 0) {\n\t\tif (opts === 1 || options.syncComponentUpdates !== false || !component.base) {\n\t\t\trenderComponent(component, 1, mountAll);\n\t\t} else {\n\t\t\tenqueueRender(component);\n\t\t}\n\t}\n\n\tif (component.__ref) component.__ref(component);\n}\n\n/** Render a Component, triggering necessary lifecycle events and taking High-Order Components into account.\n *\t@param {Component} component\n *\t@param {Object} [opts]\n *\t@param {boolean} [opts.build=false]\t\tIf `true`, component will build and store a DOM node if not already associated with one.\n *\t@private\n */\nfunction renderComponent(component, opts, mountAll, isChild) {\n\tif (component._disable) return;\n\n\tvar props = component.props,\n\t state = component.state,\n\t context = component.context,\n\t previousProps = component.prevProps || props,\n\t previousState = component.prevState || state,\n\t previousContext = component.prevContext || context,\n\t isUpdate = component.base,\n\t nextBase = component.nextBase,\n\t initialBase = isUpdate || nextBase,\n\t initialChildComponent = component._component,\n\t skip = false,\n\t rendered,\n\t inst,\n\t cbase;\n\n\t// if updating\n\tif (isUpdate) {\n\t\tcomponent.props = previousProps;\n\t\tcomponent.state = previousState;\n\t\tcomponent.context = previousContext;\n\t\tif (opts !== 2 && component.shouldComponentUpdate && component.shouldComponentUpdate(props, state, context) === false) {\n\t\t\tskip = true;\n\t\t} else if (component.componentWillUpdate) {\n\t\t\tcomponent.componentWillUpdate(props, state, context);\n\t\t}\n\t\tcomponent.props = props;\n\t\tcomponent.state = state;\n\t\tcomponent.context = context;\n\t}\n\n\tcomponent.prevProps = component.prevState = component.prevContext = component.nextBase = null;\n\tcomponent._dirty = false;\n\n\tif (!skip) {\n\t\trendered = component.render(props, state, context);\n\n\t\t// context to pass to the child, can be updated via (grand-)parent component\n\t\tif (component.getChildContext) {\n\t\t\tcontext = extend(extend({}, context), component.getChildContext());\n\t\t}\n\n\t\tvar childComponent = rendered && rendered.nodeName,\n\t\t toUnmount,\n\t\t base;\n\n\t\tif (typeof childComponent === 'function') {\n\t\t\t// set up high order component link\n\n\t\t\tvar childProps = getNodeProps(rendered);\n\t\t\tinst = initialChildComponent;\n\n\t\t\tif (inst && inst.constructor === childComponent && childProps.key == inst.__key) {\n\t\t\t\tsetComponentProps(inst, childProps, 1, context, false);\n\t\t\t} else {\n\t\t\t\ttoUnmount = inst;\n\n\t\t\t\tcomponent._component = inst = createComponent(childComponent, childProps, context);\n\t\t\t\tinst.nextBase = inst.nextBase || nextBase;\n\t\t\t\tinst._parentComponent = component;\n\t\t\t\tsetComponentProps(inst, childProps, 0, context, false);\n\t\t\t\trenderComponent(inst, 1, mountAll, true);\n\t\t\t}\n\n\t\t\tbase = inst.base;\n\t\t} else {\n\t\t\tcbase = initialBase;\n\n\t\t\t// destroy high order component link\n\t\t\ttoUnmount = initialChildComponent;\n\t\t\tif (toUnmount) {\n\t\t\t\tcbase = component._component = null;\n\t\t\t}\n\n\t\t\tif (initialBase || opts === 1) {\n\t\t\t\tif (cbase) cbase._component = null;\n\t\t\t\tbase = diff(cbase, rendered, context, mountAll || !isUpdate, initialBase && initialBase.parentNode, true);\n\t\t\t}\n\t\t}\n\n\t\tif (initialBase && base !== initialBase && inst !== initialChildComponent) {\n\t\t\tvar baseParent = initialBase.parentNode;\n\t\t\tif (baseParent && base !== baseParent) {\n\t\t\t\tbaseParent.replaceChild(base, initialBase);\n\n\t\t\t\tif (!toUnmount) {\n\t\t\t\t\tinitialBase._component = null;\n\t\t\t\t\trecollectNodeTree(initialBase, false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (toUnmount) {\n\t\t\tunmountComponent(toUnmount);\n\t\t}\n\n\t\tcomponent.base = base;\n\t\tif (base && !isChild) {\n\t\t\tvar componentRef = component,\n\t\t\t t = component;\n\t\t\twhile (t = t._parentComponent) {\n\t\t\t\t(componentRef = t).base = base;\n\t\t\t}\n\t\t\tbase._component = componentRef;\n\t\t\tbase._componentConstructor = componentRef.constructor;\n\t\t}\n\t}\n\n\tif (!isUpdate || mountAll) {\n\t\tmounts.unshift(component);\n\t} else if (!skip) {\n\t\t// Ensure that pending componentDidMount() hooks of child components\n\t\t// are called before the componentDidUpdate() hook in the parent.\n\t\t// Note: disabled as it causes duplicate hooks, see https://github.com/developit/preact/issues/750\n\t\t// flushMounts();\n\n\t\tif (component.componentDidUpdate) {\n\t\t\tcomponent.componentDidUpdate(previousProps, previousState, previousContext);\n\t\t}\n\t\tif (options.afterUpdate) options.afterUpdate(component);\n\t}\n\n\tif (component._renderCallbacks != null) {\n\t\twhile (component._renderCallbacks.length) {\n\t\t\tcomponent._renderCallbacks.pop().call(component);\n\t\t}\n\t}\n\n\tif (!diffLevel && !isChild) flushMounts();\n}\n\n/** Apply the Component referenced by a VNode to the DOM.\n *\t@param {Element} dom\tThe DOM node to mutate\n *\t@param {VNode} vnode\tA Component-referencing VNode\n *\t@returns {Element} dom\tThe created/mutated element\n *\t@private\n */\nfunction buildComponentFromVNode(dom, vnode, context, mountAll) {\n\tvar c = dom && dom._component,\n\t originalComponent = c,\n\t oldDom = dom,\n\t isDirectOwner = c && dom._componentConstructor === vnode.nodeName,\n\t isOwner = isDirectOwner,\n\t props = getNodeProps(vnode);\n\twhile (c && !isOwner && (c = c._parentComponent)) {\n\t\tisOwner = c.constructor === vnode.nodeName;\n\t}\n\n\tif (c && isOwner && (!mountAll || c._component)) {\n\t\tsetComponentProps(c, props, 3, context, mountAll);\n\t\tdom = c.base;\n\t} else {\n\t\tif (originalComponent && !isDirectOwner) {\n\t\t\tunmountComponent(originalComponent);\n\t\t\tdom = oldDom = null;\n\t\t}\n\n\t\tc = createComponent(vnode.nodeName, props, context);\n\t\tif (dom && !c.nextBase) {\n\t\t\tc.nextBase = dom;\n\t\t\t// passing dom/oldDom as nextBase will recycle it if unused, so bypass recycling on L229:\n\t\t\toldDom = null;\n\t\t}\n\t\tsetComponentProps(c, props, 1, context, mountAll);\n\t\tdom = c.base;\n\n\t\tif (oldDom && dom !== oldDom) {\n\t\t\toldDom._component = null;\n\t\t\trecollectNodeTree(oldDom, false);\n\t\t}\n\t}\n\n\treturn dom;\n}\n\n/** Remove a component from the DOM and recycle it.\n *\t@param {Component} component\tThe Component instance to unmount\n *\t@private\n */\nfunction unmountComponent(component) {\n\tif (options.beforeUnmount) options.beforeUnmount(component);\n\n\tvar base = component.base;\n\n\tcomponent._disable = true;\n\n\tif (component.componentWillUnmount) component.componentWillUnmount();\n\n\tcomponent.base = null;\n\n\t// recursively tear down & recollect high-order component children:\n\tvar inner = component._component;\n\tif (inner) {\n\t\tunmountComponent(inner);\n\t} else if (base) {\n\t\tif (base['__preactattr_'] && base['__preactattr_'].ref) base['__preactattr_'].ref(null);\n\n\t\tcomponent.nextBase = base;\n\n\t\tremoveNode(base);\n\t\tcollectComponent(component);\n\n\t\tremoveChildren(base);\n\t}\n\n\tif (component.__ref) component.__ref(null);\n}\n\n/** Base Component class.\n *\tProvides `setState()` and `forceUpdate()`, which trigger rendering.\n *\t@public\n *\n *\t@example\n *\tclass MyFoo extends Component {\n *\t\trender(props, state) {\n *\t\t\treturn
;\n *\t\t}\n *\t}\n */\nfunction Component(props, context) {\n\tthis._dirty = true;\n\n\t/** @public\n *\t@type {object}\n */\n\tthis.context = context;\n\n\t/** @public\n *\t@type {object}\n */\n\tthis.props = props;\n\n\t/** @public\n *\t@type {object}\n */\n\tthis.state = this.state || {};\n}\n\nextend(Component.prototype, {\n\n\t/** Returns a `boolean` indicating if the component should re-render when receiving the given `props` and `state`.\n *\t@param {object} nextProps\n *\t@param {object} nextState\n *\t@param {object} nextContext\n *\t@returns {Boolean} should the component re-render\n *\t@name shouldComponentUpdate\n *\t@function\n */\n\n\t/** Update component state by copying properties from `state` to `this.state`.\n *\t@param {object} state\t\tA hash of state properties to update with new values\n *\t@param {function} callback\tA function to be called once component state is updated\n */\n\tsetState: function setState(state, callback) {\n\t\tvar s = this.state;\n\t\tif (!this.prevState) this.prevState = extend({}, s);\n\t\textend(s, typeof state === 'function' ? state(s, this.props) : state);\n\t\tif (callback) (this._renderCallbacks = this._renderCallbacks || []).push(callback);\n\t\tenqueueRender(this);\n\t},\n\n\n\t/** Immediately perform a synchronous re-render of the component.\n *\t@param {function} callback\t\tA function to be called after component is re-rendered.\n *\t@private\n */\n\tforceUpdate: function forceUpdate(callback) {\n\t\tif (callback) (this._renderCallbacks = this._renderCallbacks || []).push(callback);\n\t\trenderComponent(this, 2);\n\t},\n\n\n\t/** Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n *\tVirtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\n *\t@param {object} props\t\tProps (eg: JSX attributes) received from parent element/component\n *\t@param {object} state\t\tThe component's current state\n *\t@param {object} context\t\tContext object (if a parent component has provided context)\n *\t@returns VNode\n */\n\trender: function render() {}\n});\n\n/** Render JSX into a `parent` Element.\n *\t@param {VNode} vnode\t\tA (JSX) VNode to render\n *\t@param {Element} parent\t\tDOM element to render into\n *\t@param {Element} [merge]\tAttempt to re-use an existing DOM tree rooted at `merge`\n *\t@public\n *\n *\t@example\n *\t// render a div into :\n *\trender(
hello!
, document.body);\n *\n *\t@example\n *\t// render a \"Thing\" component into #foo:\n *\tconst Thing = ({ name }) => { name };\n *\trender(, document.querySelector('#foo'));\n */\nfunction render(vnode, parent, merge) {\n return diff(merge, vnode, {}, false, parent, false);\n}\n\nvar preact = {\n\th: h,\n\tcreateElement: h,\n\tcloneElement: cloneElement,\n\tComponent: Component,\n\trender: render,\n\trerender: rerender,\n\toptions: options\n};\n\nexport { h, h as createElement, cloneElement, Component, render, rerender, options };\nexport default preact;\n//# sourceMappingURL=preact.esm.js.map\n","var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport { Component } from 'preact';\n\nfunction shallowEqual(a, b) {\n for (var key in a) {\n if (a[key] !== b[key]) return false;\n }for (var _key in b) {\n if (!(_key in a)) return false;\n }return true;\n}\n\nvar PureComponent = function (_Component) {\n _inherits(PureComponent, _Component);\n\n function PureComponent() {\n _classCallCheck(this, PureComponent);\n\n return _possibleConstructorReturn(this, (PureComponent.__proto__ || Object.getPrototypeOf(PureComponent)).apply(this, arguments));\n }\n\n _createClass(PureComponent, [{\n key: 'shouldComponentUpdate',\n value: function shouldComponentUpdate(props, state) {\n return !(shallowEqual(props, this.props) && shallowEqual(state, this.state));\n }\n }]);\n\n return PureComponent;\n}(Component);\n\nexport default PureComponent;","import { toArray } from './array';\nimport bem from './bem';\nimport { getScrollLeft, getScrollTop } from './scroll';\nimport { createUniqueId } from './string';\n\nexport { bem, createUniqueId, getScrollLeft, getScrollTop, toArray };","import Byline from './Byline';\nimport ChatLog from './ChatLog';\nimport Figure from './Figure';\nimport Heading from './Heading';\nimport List from './List';\nimport ListItem from './List/ListItem';\nimport Paragraph from './Paragraph';\nimport PullQuote from './PullQuote';\nimport SerumImage from './serum/SerumImage';\nimport SerumResponsivePicture from './serum/SerumResponsivePicture';\nimport SerumSmartPicture from './serum/SerumSmartPicture';\nimport Slide from './Slideshow/Slide';\nimport Slideshow from './Slideshow';\nimport ViewportIntersections from './ViewportIntersections';\nimport Video from './Video';\n\nexport { Byline, ChatLog, Figure, Heading, List, ListItem, Paragraph, PullQuote, SerumImage, SerumSmartPicture, SerumResponsivePicture, Slide, Slideshow, ViewportIntersections, Video };","var parse = require('../parse/index.js')\n\n/**\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of a day\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * var result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\nfunction startOfDay (dirtyDate) {\n var date = parse(dirtyDate)\n date.setHours(0, 0, 0, 0)\n return date\n}\n\nmodule.exports = startOfDay\n","var startOfWeek = require('../start_of_week/index.js')\n\n/**\n * @category ISO Week Helpers\n * @summary Return the start of an ISO week for the given date.\n *\n * @description\n * Return the start of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of an ISO week\n *\n * @example\n * // The start of an ISO week for 2 September 2014 11:55:00:\n * var result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nfunction startOfISOWeek (dirtyDate) {\n return startOfWeek(dirtyDate, {weekStartsOn: 1})\n}\n\nmodule.exports = startOfISOWeek\n","var parse = require('../parse/index.js')\nvar startOfISOWeek = require('../start_of_iso_week/index.js')\n\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the ISO week-numbering year of the given date.\n *\n * @description\n * Get the ISO week-numbering year of the given date,\n * which always starts 3 days before the year's first Thursday.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the ISO week-numbering year\n *\n * @example\n * // Which ISO-week numbering year is 2 January 2005?\n * var result = getISOYear(new Date(2005, 0, 2))\n * //=> 2004\n */\nfunction getISOYear (dirtyDate) {\n var date = parse(dirtyDate)\n var year = date.getFullYear()\n\n var fourthOfJanuaryOfNextYear = new Date(0)\n fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4)\n fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0)\n var startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear)\n\n var fourthOfJanuaryOfThisYear = new Date(0)\n fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4)\n fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0)\n var startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear)\n\n if (date.getTime() >= startOfNextYear.getTime()) {\n return year + 1\n } else if (date.getTime() >= startOfThisYear.getTime()) {\n return year\n } else {\n return year - 1\n }\n}\n\nmodule.exports = getISOYear\n","(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\t(factory((global['@nrk/serum-imagecrop-utils'] = {})));\n}(this, (function (exports) { 'use strict';\n\nvar isPolopolyIdRegex = /^[1-9]{1,2}\\.\\d+$/;\n\nfunction isPolopolyId(id) {\n if (!id) {\n return false;\n }\n return isPolopolyIdRegex.test(id);\n}\n\nvar widths = [100, 120, 150, 174, 200, 206, 225, 244, 250, 252, 300, 320, 350, 400, 450, 452, 460, 462, 500, 600, 650, 665, 682, 700, 734, 768, 900, 974, 1200, 1280, 1360, 1450, 1550, 1600, 1700, 1800, 1920, 2000, 2100, 2200, 2300, 2400];\n\nvar ratios = ['1:1', '11', '16:9', '169', '16:3', '163', '3:4', '34'];\n\nvar qualities = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0];\n\nvar _baseUrl = 'https://nrk.no/serum/api/imagecrop/';\n\nfunction createUrl(_ref) {\n var id = _ref.id,\n ratio = _ref.ratio,\n width = _ref.width,\n quality = _ref.quality;\n\n var url = '' + _baseUrl + id;\n var queryString = createQueryString({ ratio: ratio, width: width, quality: quality });\n if (queryString) {\n url += '?' + queryString;\n }\n return url;\n}\n\nfunction createQueryString(_ref2) {\n var ratio = _ref2.ratio,\n width = _ref2.width,\n quality = _ref2.quality;\n\n if (!ratio && !width) {\n return quality ? 'quality=' + quality : '';\n }\n var ratioPart = ratio ? 'f' + ratio.replace(':', '') : '';\n var widthPart = width ? 'w' + width : '';\n var qualityPart = quality ? '&quality=' + quality : '';\n return 'cropid=' + ratioPart + widthPart + qualityPart;\n}\n\nfunction getClosestNumber(goal, targets) {\n if (!isValidGoal(goal)) {\n throw new Error('\\n getClosestNumber(goal, targets): passing a goal of ' + goal + '\\n is not supported. Pass a number');\n }\n if (!isValidTargets(targets)) {\n throw new Error('\\n getClosestNumber(goal, targets): targets ' + targets.toString() + ' is invald.\\n Pass an array of numbers');\n }\n if (!targets.length) {\n // eslint-disable-next-line no-undefined\n return undefined;\n }\n return targets.reduce(function (prev, curr) {\n return Math.abs(curr - goal) < Math.abs(prev - goal) ? curr : prev;\n });\n}\n\nfunction isValidGoal(goal) {\n return typeof goal === 'number';\n}\n\nfunction isValidTargets(targets) {\n if (!targets) {\n return false;\n }\n var isValid = true;\n for (var i = 0; i < targets.length; i++) {\n if (typeof targets[i] !== 'number') {\n isValid = false;\n break;\n }\n }\n // return targets.some((target) => {\n // return (typeof target !== 'number')\n // })\n return isValid;\n}\n\nfunction isValidRatio(ratio, supportedRatios) {\n if (!Array.isArray(supportedRatios)) {\n // eslint-disable-next-line no-useless-escape\n throw new Error(\"isValidRatio(ratio, supportedRatios): supportedRatios '\" + supportedRatios + \"' is not supported. Pass an array of supported ratios\");\n }\n if (!ratio) {\n return false;\n }\n return supportedRatios.includes(ratio);\n}\n\nfunction isValidQuality(quality, supportedQualities) {\n if (!Array.isArray(supportedQualities)) {\n // eslint-disable-next-line no-useless-escape\n throw new Error(\"isValidQuality(quality, supportedQualities): supportedQualities '\" + supportedQualities + \"' is not supported. Pass an array of supported qualities\");\n }\n if (!quality) {\n return false;\n }\n return supportedQualities.includes(quality);\n}\n\n/* eslint-disable complexity */\n\nfunction createImageUrl(options) {\n var polopolyId = options.id,\n width = options.width,\n ratio = options.ratio,\n quality = options.quality;\n\n\n if (!isPolopolyId(polopolyId)) {\n throw new Error('createSerumImageUrl(): invalid polopolyId. Got ' + polopolyId);\n }\n\n var args = {\n id: polopolyId,\n ratio: null,\n quality: 0.8,\n width: 0\n\n // If a ratio is provided, ensure that it is valid\n };if (hasOption(ratio)) {\n if (!isValidRatio(ratio, ratios)) {\n throw new Error('\\n createSerumImageUrl(): ratio ' + ratio + ' is not supported.\\n Supported ratios are ' + ratios.toString());\n }\n args.ratio = ratio;\n }\n\n // If a quality is provided, ensure that it is valid\n if (hasOption(quality)) {\n if (!isValidQuality(quality, qualities)) {\n throw new Error('\\n createSerumImageUrl(): quality ' + quality + ' is not supported.\\n Supported qualities are ' + qualities.toString());\n }\n args.quality = quality;\n }\n\n // If a width is provided, ensure that is is a positive integer\n if (hasOption(width)) {\n if (!isNumber(width) || width <= 0) {\n var errorMessage = 'createSerumImageUrl(): width must be a positive integer, got ' + width;\n throw new Error(errorMessage);\n }\n var isSupportedWidth = widths.includes(width);\n var closestWidth = getClosestNumber(width, widths);\n if (typeof closestWidth !== 'undefined' && closestWidth) {\n args.width = isSupportedWidth ? width : closestWidth;\n }\n }\n\n return createUrl(args);\n}\n\nfunction hasOption(option) {\n return typeof option !== 'undefined' && option;\n}\n\nfunction isNumber(number) {\n return Number.isInteger(number);\n}\n\nexports.createImageUrl = createImageUrl;\nexports.ratios = ratios;\nexports.widths = widths;\nexports.qualities = qualities;\nexports.isPolopolyId = isPolopolyId;\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n})));\n","// @flow\n\nimport { Component } from 'preact'\n\nfunction shallowEqual (a: any, b: any) {\n for (let key in a) if (a[key] !== b[key]) return false\n for (let key in b) if (!(key in a)) return false\n return true\n}\n\nclass PureComponent extends Component {\n shouldComponentUpdate (props: Props, state: State) {\n return !(shallowEqual(props, this.props) && shallowEqual(state, this.state))\n }\n}\n\nexport default PureComponent\n","var parse = require('../parse/index.js')\n\n/**\n * @category Common Helpers\n * @summary Compare the two dates and return -1, 0 or 1.\n *\n * @description\n * Compare the two dates and return 1 if the first date is after the second,\n * -1 if the first date is before the second or 0 if dates are equal.\n *\n * @param {Date|String|Number} dateLeft - the first date to compare\n * @param {Date|String|Number} dateRight - the second date to compare\n * @returns {Number} the result of the comparison\n *\n * @example\n * // Compare 11 February 1987 and 10 July 1989:\n * var result = compareAsc(\n * new Date(1987, 1, 11),\n * new Date(1989, 6, 10)\n * )\n * //=> -1\n *\n * @example\n * // Sort the array of dates:\n * var result = [\n * new Date(1995, 6, 2),\n * new Date(1987, 1, 11),\n * new Date(1989, 6, 10)\n * ].sort(compareAsc)\n * //=> [\n * // Wed Feb 11 1987 00:00:00,\n * // Mon Jul 10 1989 00:00:00,\n * // Sun Jul 02 1995 00:00:00\n * // ]\n */\nfunction compareAsc (dirtyDateLeft, dirtyDateRight) {\n var dateLeft = parse(dirtyDateLeft)\n var timeLeft = dateLeft.getTime()\n var dateRight = parse(dirtyDateRight)\n var timeRight = dateRight.getTime()\n\n if (timeLeft < timeRight) {\n return -1\n } else if (timeLeft > timeRight) {\n return 1\n } else {\n return 0\n }\n}\n\nmodule.exports = compareAsc\n","var getISOYear = require('../get_iso_year/index.js')\nvar startOfISOWeek = require('../start_of_iso_week/index.js')\n\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Return the start of an ISO week-numbering year for the given date.\n *\n * @description\n * Return the start of an ISO week-numbering year,\n * which always starts 3 days before the year's first Thursday.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of an ISO year\n *\n * @example\n * // The start of an ISO week-numbering year for 2 July 2005:\n * var result = startOfISOYear(new Date(2005, 6, 2))\n * //=> Mon Jan 03 2005 00:00:00\n */\nfunction startOfISOYear (dirtyDate) {\n var year = getISOYear(dirtyDate)\n var fourthOfJanuary = new Date(0)\n fourthOfJanuary.setFullYear(year, 0, 4)\n fourthOfJanuary.setHours(0, 0, 0, 0)\n var date = startOfISOWeek(fourthOfJanuary)\n return date\n}\n\nmodule.exports = startOfISOYear\n","var parse = require('../parse/index.js')\n\n/**\n * @category Millisecond Helpers\n * @summary Add the specified number of milliseconds to the given date.\n *\n * @description\n * Add the specified number of milliseconds to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be added\n * @returns {Date} the new date with the milliseconds added\n *\n * @example\n * // Add 750 milliseconds to 10 July 2014 12:45:30.000:\n * var result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:30.750\n */\nfunction addMilliseconds (dirtyDate, dirtyAmount) {\n var timestamp = parse(dirtyDate).getTime()\n var amount = Number(dirtyAmount)\n return new Date(timestamp + amount)\n}\n\nmodule.exports = addMilliseconds\n","var parse = require('../parse/index.js')\n\n/**\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be added\n * @returns {Date} the new date with the days added\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * var result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\nfunction addDays (dirtyDate, dirtyAmount) {\n var date = parse(dirtyDate)\n var amount = Number(dirtyAmount)\n date.setDate(date.getDate() + amount)\n return date\n}\n\nmodule.exports = addDays\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visualStory\":\"dh-trygd-tryl-visualStory\",\"root--js\":\"dh-trygd-tryl-root--js\",\"visualStory__slideshow\":\"dh-trygd-tryl-visualStory__slideshow\",\"visualStory__slide\":\"dh-trygd-tryl-visualStory__slide\",\"root--noJs\":\"dh-trygd-tryl-root--noJs\",\"visualStory__cards\":\"dh-trygd-tryl-visualStory__cards\",\"defaultCard\":\"dh-trygd-tryl-defaultCard\",\"defaultCard__wrapper\":\"dh-trygd-tryl-defaultCard__wrapper\",\"defaultCard--right\":\"dh-trygd-tryl-defaultCard--right\",\"defaultCard--left\":\"dh-trygd-tryl-defaultCard--left\",\"factBoxCard\":\"dh-trygd-tryl-factBoxCard\",\"factBoxCard__wrapper\":\"dh-trygd-tryl-factBoxCard__wrapper\",\"factBoxCard--right\":\"dh-trygd-tryl-factBoxCard--right\",\"factBoxCard--left\":\"dh-trygd-tryl-factBoxCard--left\",\"factBoxCard__title\":\"dh-trygd-tryl-factBoxCard__title\",\"factBoxCard__list\":\"dh-trygd-tryl-factBoxCard__list\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"article\":\"dh-trygd-tryl-article\",\"article__header\":\"dh-trygd-tryl-article__header\",\"article__leadMediaWrapper\":\"dh-trygd-tryl-article__leadMediaWrapper\",\"article__leadMedia\":\"dh-trygd-tryl-article__leadMedia\",\"article__headerText\":\"dh-trygd-tryl-article__headerText\",\"article__title\":\"dh-trygd-tryl-article__title\",\"article__intro\":\"dh-trygd-tryl-article__intro\",\"article__authors\":\"dh-trygd-tryl-article__authors\",\"article__content\":\"dh-trygd-tryl-article__content\",\"article__paragraph\":\"dh-trygd-tryl-article__paragraph\",\"section\":\"dh-trygd-tryl-section\",\"section__heading\":\"dh-trygd-tryl-section__heading\",\"section__content\":\"dh-trygd-tryl-section__content\",\"article__publishedAt\":\"dh-trygd-tryl-article__publishedAt\"};","var parse = require('../parse/index.js')\n\n/**\n * @category Millisecond Helpers\n * @summary Get the number of milliseconds between the given dates.\n *\n * @description\n * Get the number of milliseconds between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of milliseconds\n *\n * @example\n * // How many milliseconds are between\n * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?\n * var result = differenceInMilliseconds(\n * new Date(2014, 6, 2, 12, 30, 21, 700),\n * new Date(2014, 6, 2, 12, 30, 20, 600)\n * )\n * //=> 1100\n */\nfunction differenceInMilliseconds (dirtyDateLeft, dirtyDateRight) {\n var dateLeft = parse(dirtyDateLeft)\n var dateRight = parse(dirtyDateRight)\n return dateLeft.getTime() - dateRight.getTime()\n}\n\nmodule.exports = differenceInMilliseconds\n","var parse = require('../parse/index.js')\nvar getDaysInMonth = require('../get_days_in_month/index.js')\n\n/**\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be added\n * @returns {Date} the new date with the months added\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * var result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n */\nfunction addMonths (dirtyDate, dirtyAmount) {\n var date = parse(dirtyDate)\n var amount = Number(dirtyAmount)\n var desiredMonth = date.getMonth() + amount\n var dateWithDesiredMonth = new Date(0)\n dateWithDesiredMonth.setFullYear(date.getFullYear(), desiredMonth, 1)\n dateWithDesiredMonth.setHours(0, 0, 0, 0)\n var daysInMonth = getDaysInMonth(dateWithDesiredMonth)\n // Set the last day of the new month\n // if the original date was the last day of the longer month\n date.setMonth(desiredMonth, Math.min(daysInMonth, date.getDate()))\n return date\n}\n\nmodule.exports = addMonths\n","var startOfDay = require('../start_of_day/index.js')\n\nvar MILLISECONDS_IN_MINUTE = 60000\nvar MILLISECONDS_IN_DAY = 86400000\n\n/**\n * @category Day Helpers\n * @summary Get the number of calendar days between the given dates.\n *\n * @description\n * Get the number of calendar days between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar days\n *\n * @example\n * // How many calendar days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * var result = differenceInCalendarDays(\n * new Date(2012, 6, 2, 0, 0),\n * new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 366\n */\nfunction differenceInCalendarDays (dirtyDateLeft, dirtyDateRight) {\n var startOfDayLeft = startOfDay(dirtyDateLeft)\n var startOfDayRight = startOfDay(dirtyDateRight)\n\n var timestampLeft = startOfDayLeft.getTime() -\n startOfDayLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE\n var timestampRight = startOfDayRight.getTime() -\n startOfDayRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE\n\n // Round the number of days to the nearest integer\n // because the number of milliseconds in a day is not constant\n // (e.g. it's different in the day of the daylight saving time clock shift)\n return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY)\n}\n\nmodule.exports = differenceInCalendarDays\n","var parse = require('../parse/index.js')\n\n/**\n * @category Week Helpers\n * @summary Return the start of a week for the given date.\n *\n * @description\n * Return the start of a week for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @param {Object} [options] - the object with options\n * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the start of a week\n *\n * @example\n * // The start of a week for 2 September 2014 11:55:00:\n * var result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:\n * var result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), {weekStartsOn: 1})\n * //=> Mon Sep 01 2014 00:00:00\n */\nfunction startOfWeek (dirtyDate, dirtyOptions) {\n var weekStartsOn = dirtyOptions ? (Number(dirtyOptions.weekStartsOn) || 0) : 0\n\n var date = parse(dirtyDate)\n var day = date.getDay()\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn\n\n date.setDate(date.getDate() - diff)\n date.setHours(0, 0, 0, 0)\n return date\n}\n\nmodule.exports = startOfWeek\n","var startOfWeek = require('../start_of_week/index.js')\n\n/**\n * @category Week Helpers\n * @summary Are the given dates in the same week?\n *\n * @description\n * Are the given dates in the same week?\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @param {Object} [options] - the object with options\n * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Boolean} the dates are in the same week\n *\n * @example\n * // Are 31 August 2014 and 4 September 2014 in the same week?\n * var result = isSameWeek(\n * new Date(2014, 7, 31),\n * new Date(2014, 8, 4)\n * )\n * //=> true\n *\n * @example\n * // If week starts with Monday,\n * // are 31 August 2014 and 4 September 2014 in the same week?\n * var result = isSameWeek(\n * new Date(2014, 7, 31),\n * new Date(2014, 8, 4),\n * {weekStartsOn: 1}\n * )\n * //=> false\n */\nfunction isSameWeek (dirtyDateLeft, dirtyDateRight, dirtyOptions) {\n var dateLeftStartOfWeek = startOfWeek(dirtyDateLeft, dirtyOptions)\n var dateRightStartOfWeek = startOfWeek(dirtyDateRight, dirtyOptions)\n\n return dateLeftStartOfWeek.getTime() === dateRightStartOfWeek.getTime()\n}\n\nmodule.exports = isSameWeek\n","var parse = require('../parse/index.js')\nvar startOfISOWeek = require('../start_of_iso_week/index.js')\nvar startOfISOYear = require('../start_of_iso_year/index.js')\n\nvar MILLISECONDS_IN_WEEK = 604800000\n\n/**\n * @category ISO Week Helpers\n * @summary Get the ISO week of the given date.\n *\n * @description\n * Get the ISO week of the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the ISO week\n *\n * @example\n * // Which week of the ISO-week numbering year is 2 January 2005?\n * var result = getISOWeek(new Date(2005, 0, 2))\n * //=> 53\n */\nfunction getISOWeek (dirtyDate) {\n var date = parse(dirtyDate)\n var diff = startOfISOWeek(date).getTime() - startOfISOYear(date).getTime()\n\n // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1\n}\n\nmodule.exports = getISOWeek\n","var parse = require('../parse/index.js')\n\n/**\n * @category Day Helpers\n * @summary Return the end of a day for the given date.\n *\n * @description\n * Return the end of a day for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the end of a day\n *\n * @example\n * // The end of a day for 2 September 2014 11:55:00:\n * var result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 23:59:59.999\n */\nfunction endOfDay (dirtyDate) {\n var date = parse(dirtyDate)\n date.setHours(23, 59, 59, 999)\n return date\n}\n\nmodule.exports = endOfDay\n","var buildDistanceInWordsLocale = require('./build_distance_in_words_locale/index.js')\nvar buildFormatLocale = require('./build_format_locale/index.js')\n\n/**\n * @category Locales\n * @summary English locale.\n */\nmodule.exports = {\n distanceInWords: buildDistanceInWordsLocale(),\n format: buildFormatLocale()\n}\n","var differenceInMilliseconds = require('../difference_in_milliseconds/index.js')\n\n/**\n * @category Second Helpers\n * @summary Get the number of seconds between the given dates.\n *\n * @description\n * Get the number of seconds between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of seconds\n *\n * @example\n * // How many seconds are between\n * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?\n * var result = differenceInSeconds(\n * new Date(2014, 6, 2, 12, 30, 20, 0),\n * new Date(2014, 6, 2, 12, 30, 7, 999)\n * )\n * //=> 12\n */\nfunction differenceInSeconds (dirtyDateLeft, dirtyDateRight) {\n var diff = differenceInMilliseconds(dirtyDateLeft, dirtyDateRight) / 1000\n return diff > 0 ? Math.floor(diff) : Math.ceil(diff)\n}\n\nmodule.exports = differenceInSeconds\n","var parse = require('../parse/index.js')\nvar differenceInCalendarMonths = require('../difference_in_calendar_months/index.js')\nvar compareAsc = require('../compare_asc/index.js')\n\n/**\n * @category Month Helpers\n * @summary Get the number of full months between the given dates.\n *\n * @description\n * Get the number of full months between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of full months\n *\n * @example\n * // How many full months are between 31 January 2014 and 1 September 2014?\n * var result = differenceInMonths(\n * new Date(2014, 8, 1),\n * new Date(2014, 0, 31)\n * )\n * //=> 7\n */\nfunction differenceInMonths (dirtyDateLeft, dirtyDateRight) {\n var dateLeft = parse(dirtyDateLeft)\n var dateRight = parse(dirtyDateRight)\n\n var sign = compareAsc(dateLeft, dateRight)\n var difference = Math.abs(differenceInCalendarMonths(dateLeft, dateRight))\n dateLeft.setMonth(dateLeft.getMonth() - sign * difference)\n\n // Math.abs(diff in full months - diff in calendar months) === 1 if last calendar month is not full\n // If so, result must be decreased by 1 in absolute value\n var isLastMonthNotFull = compareAsc(dateLeft, dateRight) === -sign\n return sign * (difference - isLastMonthNotFull)\n}\n\nmodule.exports = differenceInMonths\n","var parse = require('../parse/index.js')\n\n/**\n * @category Common Helpers\n * @summary Compare the two dates reverse chronologically and return -1, 0 or 1.\n *\n * @description\n * Compare the two dates and return -1 if the first date is after the second,\n * 1 if the first date is before the second or 0 if dates are equal.\n *\n * @param {Date|String|Number} dateLeft - the first date to compare\n * @param {Date|String|Number} dateRight - the second date to compare\n * @returns {Number} the result of the comparison\n *\n * @example\n * // Compare 11 February 1987 and 10 July 1989 reverse chronologically:\n * var result = compareDesc(\n * new Date(1987, 1, 11),\n * new Date(1989, 6, 10)\n * )\n * //=> 1\n *\n * @example\n * // Sort the array of dates in reverse chronological order:\n * var result = [\n * new Date(1995, 6, 2),\n * new Date(1987, 1, 11),\n * new Date(1989, 6, 10)\n * ].sort(compareDesc)\n * //=> [\n * // Sun Jul 02 1995 00:00:00,\n * // Mon Jul 10 1989 00:00:00,\n * // Wed Feb 11 1987 00:00:00\n * // ]\n */\nfunction compareDesc (dirtyDateLeft, dirtyDateRight) {\n var dateLeft = parse(dirtyDateLeft)\n var timeLeft = dateLeft.getTime()\n var dateRight = parse(dirtyDateRight)\n var timeRight = dateRight.getTime()\n\n if (timeLeft > timeRight) {\n return -1\n } else if (timeLeft < timeRight) {\n return 1\n } else {\n return 0\n }\n}\n\nmodule.exports = compareDesc\n","var addDays = require('../add_days/index.js')\n\n/**\n * @category Week Helpers\n * @summary Add the specified number of weeks to the given date.\n *\n * @description\n * Add the specified number of week to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of weeks to be added\n * @returns {Date} the new date with the weeks added\n *\n * @example\n * // Add 4 weeks to 1 September 2014:\n * var result = addWeeks(new Date(2014, 8, 1), 4)\n * //=> Mon Sep 29 2014 00:00:00\n */\nfunction addWeeks (dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount)\n var days = amount * 7\n return addDays(dirtyDate, days)\n}\n\nmodule.exports = addWeeks\n","var parse = require('../parse/index.js')\n\n/**\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the number of days in a month\n *\n * @example\n * // How many days are in February 2000?\n * var result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\nfunction getDaysInMonth (dirtyDate) {\n var date = parse(dirtyDate)\n var year = date.getFullYear()\n var monthIndex = date.getMonth()\n var lastDayOfMonth = new Date(0)\n lastDayOfMonth.setFullYear(year, monthIndex + 1, 0)\n lastDayOfMonth.setHours(0, 0, 0, 0)\n return lastDayOfMonth.getDate()\n}\n\nmodule.exports = getDaysInMonth\n","/**\n * @category Common Helpers\n * @summary Is the given argument an instance of Date?\n *\n * @description\n * Is the given argument an instance of Date?\n *\n * @param {*} argument - the argument to check\n * @returns {Boolean} the given argument is an instance of Date\n *\n * @example\n * // Is 'mayonnaise' a Date?\n * var result = isDate('mayonnaise')\n * //=> false\n */\nfunction isDate (argument) {\n return argument instanceof Date\n}\n\nmodule.exports = isDate\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"videoPlayer\":\"dh-trygd-tryl-videoPlayer\",\"videoPlayer__videoWrapper\":\"dh-trygd-tryl-videoPlayer__videoWrapper\",\"videoPlayer__video\":\"dh-trygd-tryl-videoPlayer__video\",\"videoPlayer__horizontalVideo\":\"dh-trygd-tryl-videoPlayer__horizontalVideo\",\"videoPlayer__video--vertical\":\"dh-trygd-tryl-videoPlayer__video--vertical\",\"videoPlayer__verticalVideo\":\"dh-trygd-tryl-videoPlayer__verticalVideo\",\"videoPlayer__togglePlayButton\":\"dh-trygd-tryl-videoPlayer__togglePlayButton\",\"root--js\":\"dh-trygd-tryl-root--js\",\"videoPlayer__muteButton\":\"dh-trygd-tryl-videoPlayer__muteButton\",\"videoPlayer__captionContainer\":\"dh-trygd-tryl-videoPlayer__captionContainer\",\"videoPlayer__caption\":\"dh-trygd-tryl-videoPlayer__caption\"};","import { createImageUrl } from '@nrk/serum-imagecrop-utils';\n\nexport var IMAGE_WIDTHS = [320, 450, 650, 768, 900, 1280, 1600, 1920, 2400];\n\nexport function createResponsiveSrcSet(opts) {\n var id = opts.id,\n ratio = opts.ratio,\n quality = opts.quality;\n\n\n return IMAGE_WIDTHS.map(function (width) {\n var imageUrl = createImageUrl({ id: id, width: width, ratio: ratio, quality: quality });\n return imageUrl + ' ' + width + 'w';\n }).join(', ');\n}","import { createImageUrl } from '@nrk/serum-imagecrop-utils';\n\n\nexport function getImageUrl(image, options) {\n var _ref = options || {},\n _ref$width = _ref.width,\n width = _ref$width === undefined ? 120 : _ref$width,\n _ref$ratio = _ref.ratio,\n ratio = _ref$ratio === undefined ? '1:1' : _ref$ratio;\n\n switch (image.type) {\n case 'polopoly-image':\n {\n return createImageUrl({ id: image.id, width: width, ratio: ratio });\n }\n case 'url-image':\n {\n return image.url;\n }\n }\n}","var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n/** @jsx h */\nimport { Component, h } from 'preact';\nimport { bem } from '@nrk/dh-utils';\nimport { AvatarImage } from './AvatarImage';\n\nvar styles = {\n 'chatLog': 'dhfc-1_0_0-beta_11-chatLog',\n 'avatarImage': 'dhfc-1_0_0-beta_11-avatarImage',\n 'avatar': 'dhfc-1_0_0-beta_11-avatar',\n 'avatar__placeholder': 'dhfc-1_0_0-beta_11-avatar__placeholder',\n 'avatar--right': 'dhfc-1_0_0-beta_11-avatar--right',\n 'date': 'dhfc-1_0_0-beta_11-date',\n 'date--isFirst': 'dhfc-1_0_0-beta_11-date--isFirst',\n 'message': 'dhfc-1_0_0-beta_11-message',\n 'message--left': 'dhfc-1_0_0-beta_11-message--left',\n 'message--showAvatar': 'dhfc-1_0_0-beta_11-message--showAvatar',\n 'message--right': 'dhfc-1_0_0-beta_11-message--right',\n 'message--isLastInGroup': 'dhfc-1_0_0-beta_11-message--isLastInGroup',\n 'message__text': 'dhfc-1_0_0-beta_11-message__text',\n 'message__text--right': 'dhfc-1_0_0-beta_11-message__text--right',\n 'message__text--left': 'dhfc-1_0_0-beta_11-message__text--left',\n 'message__image': 'dhfc-1_0_0-beta_11-message__image',\n 'message__image--expanded': 'dhfc-1_0_0-beta_11-message__image--expanded',\n 'message__image--clickable': 'dhfc-1_0_0-beta_11-message__image--clickable',\n 'message__image--hover': 'dhfc-1_0_0-beta_11-message__image--hover',\n 'message__image--left': 'dhfc-1_0_0-beta_11-message__image--left',\n 'message__image--right': 'dhfc-1_0_0-beta_11-message__image--right',\n 'message__name': 'dhfc-1_0_0-beta_11-message__name',\n 'message__content': 'dhfc-1_0_0-beta_11-message__content',\n 'message__content--left': 'dhfc-1_0_0-beta_11-message__content--left',\n 'message__content--right': 'dhfc-1_0_0-beta_11-message__content--right',\n 'message__content--showName': 'dhfc-1_0_0-beta_11-message__content--showName'\n};\n\n\nexport var Avatar = function (_Component) {\n _inherits(Avatar, _Component);\n\n function Avatar() {\n _classCallCheck(this, Avatar);\n\n return _possibleConstructorReturn(this, (Avatar.__proto__ || Object.getPrototypeOf(Avatar)).apply(this, arguments));\n }\n\n _createClass(Avatar, [{\n key: 'render',\n value: function render() {\n var person = this.props.person;\n var name = person.name,\n image = person.image;\n\n var displayImage = image && image.type !== 'none';\n return h(\n 'div',\n { 'aria-hidden': true, className: bem(styles.avatar, person.side) },\n displayImage && h(AvatarImage, { image: image, alt: person.name, title: person.name }),\n !displayImage && h(\n 'span',\n { className: styles.avatar__placeholder, title: name },\n getInitials(name)\n )\n );\n }\n }]);\n\n return Avatar;\n}(Component);\n\nfunction getInitials() {\n var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n\n var initials = name.trim().split(/[ -]/).map(function (item) {\n return item.charAt(0).toUpperCase();\n });\n\n if (initials.length < 2) return initials[0];\n return [initials[0], initials[initials.length - 1]].join('');\n}","var parse = require('../parse/index.js')\nvar getDaysInMonth = require('../get_days_in_month/index.js')\n\n/**\n * @category Month Helpers\n * @summary Set the month to the given date.\n *\n * @description\n * Set the month to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} month - the month of the new date\n * @returns {Date} the new date with the month setted\n *\n * @example\n * // Set February to 1 September 2014:\n * var result = setMonth(new Date(2014, 8, 1), 1)\n * //=> Sat Feb 01 2014 00:00:00\n */\nfunction setMonth (dirtyDate, dirtyMonth) {\n var date = parse(dirtyDate)\n var month = Number(dirtyMonth)\n var year = date.getFullYear()\n var day = date.getDate()\n\n var dateWithDesiredMonth = new Date(0)\n dateWithDesiredMonth.setFullYear(year, month, 15)\n dateWithDesiredMonth.setHours(0, 0, 0, 0)\n var daysInMonth = getDaysInMonth(dateWithDesiredMonth)\n // Set the last day of the new month\n // if the original date was the last day of the longer month\n date.setMonth(month, Math.min(day, daysInMonth))\n return date\n}\n\nmodule.exports = setMonth\n","var parse = require('../parse/index.js')\n\n/**\n * @category Week Helpers\n * @summary Return the last day of a week for the given date.\n *\n * @description\n * Return the last day of a week for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @param {Object} [options] - the object with options\n * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the last day of a week\n *\n * @example\n * // The last day of a week for 2 September 2014 11:55:00:\n * var result = lastDayOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sat Sep 06 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the last day of the week for 2 September 2014 11:55:00:\n * var result = lastDayOfWeek(new Date(2014, 8, 2, 11, 55, 0), {weekStartsOn: 1})\n * //=> Sun Sep 07 2014 00:00:00\n */\nfunction lastDayOfWeek (dirtyDate, dirtyOptions) {\n var weekStartsOn = dirtyOptions ? (Number(dirtyOptions.weekStartsOn) || 0) : 0\n\n var date = parse(dirtyDate)\n var day = date.getDay()\n var diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn)\n\n date.setHours(0, 0, 0, 0)\n date.setDate(date.getDate() + diff)\n return date\n}\n\nmodule.exports = lastDayOfWeek\n","var parse = require('../parse/index.js')\n\n/**\n * @category Year Helpers\n * @summary Are the given dates in the same year?\n *\n * @description\n * Are the given dates in the same year?\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same year\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same year?\n * var result = isSameYear(\n * new Date(2014, 8, 2),\n * new Date(2014, 8, 25)\n * )\n * //=> true\n */\nfunction isSameYear (dirtyDateLeft, dirtyDateRight) {\n var dateLeft = parse(dirtyDateLeft)\n var dateRight = parse(dirtyDateRight)\n return dateLeft.getFullYear() === dateRight.getFullYear()\n}\n\nmodule.exports = isSameYear\n","var parse = require('../parse/index.js')\n\n/**\n * @category Second Helpers\n * @summary Return the start of a second for the given date.\n *\n * @description\n * Return the start of a second for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of a second\n *\n * @example\n * // The start of a second for 1 December 2014 22:15:45.400:\n * var result = startOfSecond(new Date(2014, 11, 1, 22, 15, 45, 400))\n * //=> Mon Dec 01 2014 22:15:45.000\n */\nfunction startOfSecond (dirtyDate) {\n var date = parse(dirtyDate)\n date.setMilliseconds(0)\n return date\n}\n\nmodule.exports = startOfSecond\n","var startOfSecond = require('../start_of_second/index.js')\n\n/**\n * @category Second Helpers\n * @summary Are the given dates in the same second?\n *\n * @description\n * Are the given dates in the same second?\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same second\n *\n * @example\n * // Are 4 September 2014 06:30:15.000 and 4 September 2014 06:30.15.500\n * // in the same second?\n * var result = isSameSecond(\n * new Date(2014, 8, 4, 6, 30, 15),\n * new Date(2014, 8, 4, 6, 30, 15, 500)\n * )\n * //=> true\n */\nfunction isSameSecond (dirtyDateLeft, dirtyDateRight) {\n var dateLeftStartOfSecond = startOfSecond(dirtyDateLeft)\n var dateRightStartOfSecond = startOfSecond(dirtyDateRight)\n\n return dateLeftStartOfSecond.getTime() === dateRightStartOfSecond.getTime()\n}\n\nmodule.exports = isSameSecond\n","var parse = require('../parse/index.js')\n\n/**\n * @category Quarter Helpers\n * @summary Return the start of a year quarter for the given date.\n *\n * @description\n * Return the start of a year quarter for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of a quarter\n *\n * @example\n * // The start of a quarter for 2 September 2014 11:55:00:\n * var result = startOfQuarter(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Jul 01 2014 00:00:00\n */\nfunction startOfQuarter (dirtyDate) {\n var date = parse(dirtyDate)\n var currentMonth = date.getMonth()\n var month = currentMonth - currentMonth % 3\n date.setMonth(month, 1)\n date.setHours(0, 0, 0, 0)\n return date\n}\n\nmodule.exports = startOfQuarter\n","var startOfQuarter = require('../start_of_quarter/index.js')\n\n/**\n * @category Quarter Helpers\n * @summary Are the given dates in the same year quarter?\n *\n * @description\n * Are the given dates in the same year quarter?\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same quarter\n *\n * @example\n * // Are 1 January 2014 and 8 March 2014 in the same quarter?\n * var result = isSameQuarter(\n * new Date(2014, 0, 1),\n * new Date(2014, 2, 8)\n * )\n * //=> true\n */\nfunction isSameQuarter (dirtyDateLeft, dirtyDateRight) {\n var dateLeftStartOfQuarter = startOfQuarter(dirtyDateLeft)\n var dateRightStartOfQuarter = startOfQuarter(dirtyDateRight)\n\n return dateLeftStartOfQuarter.getTime() === dateRightStartOfQuarter.getTime()\n}\n\nmodule.exports = isSameQuarter\n","var parse = require('../parse/index.js')\n\n/**\n * @category Month Helpers\n * @summary Are the given dates in the same month?\n *\n * @description\n * Are the given dates in the same month?\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same month\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same month?\n * var result = isSameMonth(\n * new Date(2014, 8, 2),\n * new Date(2014, 8, 25)\n * )\n * //=> true\n */\nfunction isSameMonth (dirtyDateLeft, dirtyDateRight) {\n var dateLeft = parse(dirtyDateLeft)\n var dateRight = parse(dirtyDateRight)\n return dateLeft.getFullYear() === dateRight.getFullYear() &&\n dateLeft.getMonth() === dateRight.getMonth()\n}\n\nmodule.exports = isSameMonth\n","var parse = require('../parse/index.js')\n\n/**\n * @category Minute Helpers\n * @summary Return the start of a minute for the given date.\n *\n * @description\n * Return the start of a minute for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of a minute\n *\n * @example\n * // The start of a minute for 1 December 2014 22:15:45.400:\n * var result = startOfMinute(new Date(2014, 11, 1, 22, 15, 45, 400))\n * //=> Mon Dec 01 2014 22:15:00\n */\nfunction startOfMinute (dirtyDate) {\n var date = parse(dirtyDate)\n date.setSeconds(0, 0)\n return date\n}\n\nmodule.exports = startOfMinute\n","var startOfMinute = require('../start_of_minute/index.js')\n\n/**\n * @category Minute Helpers\n * @summary Are the given dates in the same minute?\n *\n * @description\n * Are the given dates in the same minute?\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same minute\n *\n * @example\n * // Are 4 September 2014 06:30:00 and 4 September 2014 06:30:15\n * // in the same minute?\n * var result = isSameMinute(\n * new Date(2014, 8, 4, 6, 30),\n * new Date(2014, 8, 4, 6, 30, 15)\n * )\n * //=> true\n */\nfunction isSameMinute (dirtyDateLeft, dirtyDateRight) {\n var dateLeftStartOfMinute = startOfMinute(dirtyDateLeft)\n var dateRightStartOfMinute = startOfMinute(dirtyDateRight)\n\n return dateLeftStartOfMinute.getTime() === dateRightStartOfMinute.getTime()\n}\n\nmodule.exports = isSameMinute\n","var startOfISOYear = require('../start_of_iso_year/index.js')\n\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Are the given dates in the same ISO week-numbering year?\n *\n * @description\n * Are the given dates in the same ISO week-numbering year?\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same ISO week-numbering year\n *\n * @example\n * // Are 29 December 2003 and 2 January 2005 in the same ISO week-numbering year?\n * var result = isSameISOYear(\n * new Date(2003, 11, 29),\n * new Date(2005, 0, 2)\n * )\n * //=> true\n */\nfunction isSameISOYear (dirtyDateLeft, dirtyDateRight) {\n var dateLeftStartOfYear = startOfISOYear(dirtyDateLeft)\n var dateRightStartOfYear = startOfISOYear(dirtyDateRight)\n\n return dateLeftStartOfYear.getTime() === dateRightStartOfYear.getTime()\n}\n\nmodule.exports = isSameISOYear\n","var isSameWeek = require('../is_same_week/index.js')\n\n/**\n * @category ISO Week Helpers\n * @summary Are the given dates in the same ISO week?\n *\n * @description\n * Are the given dates in the same ISO week?\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same ISO week\n *\n * @example\n * // Are 1 September 2014 and 7 September 2014 in the same ISO week?\n * var result = isSameISOWeek(\n * new Date(2014, 8, 1),\n * new Date(2014, 8, 7)\n * )\n * //=> true\n */\nfunction isSameISOWeek (dirtyDateLeft, dirtyDateRight) {\n return isSameWeek(dirtyDateLeft, dirtyDateRight, {weekStartsOn: 1})\n}\n\nmodule.exports = isSameISOWeek\n","var parse = require('../parse/index.js')\n\n/**\n * @category Hour Helpers\n * @summary Return the start of an hour for the given date.\n *\n * @description\n * Return the start of an hour for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of an hour\n *\n * @example\n * // The start of an hour for 2 September 2014 11:55:00:\n * var result = startOfHour(new Date(2014, 8, 2, 11, 55))\n * //=> Tue Sep 02 2014 11:00:00\n */\nfunction startOfHour (dirtyDate) {\n var date = parse(dirtyDate)\n date.setMinutes(0, 0, 0)\n return date\n}\n\nmodule.exports = startOfHour\n","var startOfHour = require('../start_of_hour/index.js')\n\n/**\n * @category Hour Helpers\n * @summary Are the given dates in the same hour?\n *\n * @description\n * Are the given dates in the same hour?\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same hour\n *\n * @example\n * // Are 4 September 2014 06:00:00 and 4 September 06:30:00 in the same hour?\n * var result = isSameHour(\n * new Date(2014, 8, 4, 6, 0),\n * new Date(2014, 8, 4, 6, 30)\n * )\n * //=> true\n */\nfunction isSameHour (dirtyDateLeft, dirtyDateRight) {\n var dateLeftStartOfHour = startOfHour(dirtyDateLeft)\n var dateRightStartOfHour = startOfHour(dirtyDateRight)\n\n return dateLeftStartOfHour.getTime() === dateRightStartOfHour.getTime()\n}\n\nmodule.exports = isSameHour\n","var parse = require('../parse/index.js')\n\n/**\n * @category Weekday Helpers\n * @summary Get the day of the ISO week of the given date.\n *\n * @description\n * Get the day of the ISO week of the given date,\n * which is 7 for Sunday, 1 for Monday etc.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the day of ISO week\n *\n * @example\n * // Which day of the ISO week is 26 February 2012?\n * var result = getISODay(new Date(2012, 1, 26))\n * //=> 7\n */\nfunction getISODay (dirtyDate) {\n var date = parse(dirtyDate)\n var day = date.getDay()\n\n if (day === 0) {\n day = 7\n }\n\n return day\n}\n\nmodule.exports = getISODay\n","var parse = require('../parse/index.js')\n\n/**\n * @category Year Helpers\n * @summary Is the given date in the leap year?\n *\n * @description\n * Is the given date in the leap year?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in the leap year\n *\n * @example\n * // Is 1 September 2012 in the leap year?\n * var result = isLeapYear(new Date(2012, 8, 1))\n * //=> true\n */\nfunction isLeapYear (dirtyDate) {\n var date = parse(dirtyDate)\n var year = date.getFullYear()\n return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0\n}\n\nmodule.exports = isLeapYear\n","var isDate = require('../is_date/index.js')\n\n/**\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param {Date} date - the date to check\n * @returns {Boolean} the date is valid\n * @throws {TypeError} argument must be an instance of Date\n *\n * @example\n * // For the valid date:\n * var result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the invalid date:\n * var result = isValid(new Date(''))\n * //=> false\n */\nfunction isValid (dirtyDate) {\n if (isDate(dirtyDate)) {\n return !isNaN(dirtyDate)\n } else {\n throw new TypeError(toString.call(dirtyDate) + ' is not an instance of Date')\n }\n}\n\nmodule.exports = isValid\n","var parse = require('../parse/index.js')\n\n/**\n * @category Year Helpers\n * @summary Return the start of a year for the given date.\n *\n * @description\n * Return the start of a year for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of a year\n *\n * @example\n * // The start of a year for 2 September 2014 11:55:00:\n * var result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Jan 01 2014 00:00:00\n */\nfunction startOfYear (dirtyDate) {\n var cleanDate = parse(dirtyDate)\n var date = new Date(0)\n date.setFullYear(cleanDate.getFullYear(), 0, 1)\n date.setHours(0, 0, 0, 0)\n return date\n}\n\nmodule.exports = startOfYear\n","var parse = require('../parse/index.js')\nvar startOfYear = require('../start_of_year/index.js')\nvar differenceInCalendarDays = require('../difference_in_calendar_days/index.js')\n\n/**\n * @category Day Helpers\n * @summary Get the day of the year of the given date.\n *\n * @description\n * Get the day of the year of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the day of year\n *\n * @example\n * // Which day of the year is 2 July 2014?\n * var result = getDayOfYear(new Date(2014, 6, 2))\n * //=> 183\n */\nfunction getDayOfYear (dirtyDate) {\n var date = parse(dirtyDate)\n var diff = differenceInCalendarDays(date, startOfYear(date))\n var dayOfYear = diff + 1\n return dayOfYear\n}\n\nmodule.exports = getDayOfYear\n","var parse = require('../parse/index.js')\n\n/**\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the end of a month\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * var result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nfunction endOfMonth (dirtyDate) {\n var date = parse(dirtyDate)\n var month = date.getMonth()\n date.setFullYear(date.getFullYear(), month + 1, 0)\n date.setHours(23, 59, 59, 999)\n return date\n}\n\nmodule.exports = endOfMonth\n","var parse = require('../parse/index.js')\n\n/**\n * @category Week Helpers\n * @summary Return the end of a week for the given date.\n *\n * @description\n * Return the end of a week for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @param {Object} [options] - the object with options\n * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the end of a week\n *\n * @example\n * // The end of a week for 2 September 2014 11:55:00:\n * var result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sat Sep 06 2014 23:59:59.999\n *\n * @example\n * // If the week starts on Monday, the end of the week for 2 September 2014 11:55:00:\n * var result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), {weekStartsOn: 1})\n * //=> Sun Sep 07 2014 23:59:59.999\n */\nfunction endOfWeek (dirtyDate, dirtyOptions) {\n var weekStartsOn = dirtyOptions ? (Number(dirtyOptions.weekStartsOn) || 0) : 0\n\n var date = parse(dirtyDate)\n var day = date.getDay()\n var diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn)\n\n date.setDate(date.getDate() + diff)\n date.setHours(23, 59, 59, 999)\n return date\n}\n\nmodule.exports = endOfWeek\n","var compareDesc = require('../compare_desc/index.js')\nvar parse = require('../parse/index.js')\nvar differenceInSeconds = require('../difference_in_seconds/index.js')\nvar differenceInMonths = require('../difference_in_months/index.js')\nvar enLocale = require('../locale/en/index.js')\n\nvar MINUTES_IN_DAY = 1440\nvar MINUTES_IN_ALMOST_TWO_DAYS = 2520\nvar MINUTES_IN_MONTH = 43200\nvar MINUTES_IN_TWO_MONTHS = 86400\n\n/**\n * @category Common Helpers\n * @summary Return the distance between the given dates in words.\n *\n * @description\n * Return the distance between the given dates in words.\n *\n * | Distance between dates | Result |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs | less than a minute |\n * | 30 secs ... 1 min 30 secs | 1 minute |\n * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n * | 1 yr ... 1 yr 3 months | about 1 year |\n * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n * | 1 yr 9 months ... 2 yrs | almost 2 years |\n * | N yrs ... N yrs 3 months | about N years |\n * | N yrs 3 months ... N yrs 9 months | over N years |\n * | N yrs 9 months ... N+1 yrs | almost N+1 years |\n *\n * With `options.includeSeconds == true`:\n * | Distance between dates | Result |\n * |------------------------|----------------------|\n * | 0 secs ... 5 secs | less than 5 seconds |\n * | 5 secs ... 10 secs | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute |\n * | 40 secs ... 60 secs | less than a minute |\n * | 60 secs ... 90 secs | 1 minute |\n *\n * @param {Date|String|Number} dateToCompare - the date to compare with\n * @param {Date|String|Number} date - the other date\n * @param {Object} [options] - the object with options\n * @param {Boolean} [options.includeSeconds=false] - distances less than a minute are more detailed\n * @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first\n * @param {Object} [options.locale=enLocale] - the locale object\n * @returns {String} the distance in words\n *\n * @example\n * // What is the distance between 2 July 2014 and 1 January 2015?\n * var result = distanceInWords(\n * new Date(2014, 6, 2),\n * new Date(2015, 0, 1)\n * )\n * //=> '6 months'\n *\n * @example\n * // What is the distance between 1 January 2015 00:00:15\n * // and 1 January 2015 00:00:00, including seconds?\n * var result = distanceInWords(\n * new Date(2015, 0, 1, 0, 0, 15),\n * new Date(2015, 0, 1, 0, 0, 0),\n * {includeSeconds: true}\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, with a suffix?\n * var result = distanceInWords(\n * new Date(2016, 0, 1),\n * new Date(2015, 0, 1),\n * {addSuffix: true}\n * )\n * //=> 'about 1 year ago'\n *\n * @example\n * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\n * var eoLocale = require('date-fns/locale/eo')\n * var result = distanceInWords(\n * new Date(2016, 7, 1),\n * new Date(2015, 0, 1),\n * {locale: eoLocale}\n * )\n * //=> 'pli ol 1 jaro'\n */\nfunction distanceInWords (dirtyDateToCompare, dirtyDate, dirtyOptions) {\n var options = dirtyOptions || {}\n\n var comparison = compareDesc(dirtyDateToCompare, dirtyDate)\n\n var locale = options.locale\n var localize = enLocale.distanceInWords.localize\n if (locale && locale.distanceInWords && locale.distanceInWords.localize) {\n localize = locale.distanceInWords.localize\n }\n\n var localizeOptions = {\n addSuffix: Boolean(options.addSuffix),\n comparison: comparison\n }\n\n var dateLeft, dateRight\n if (comparison > 0) {\n dateLeft = parse(dirtyDateToCompare)\n dateRight = parse(dirtyDate)\n } else {\n dateLeft = parse(dirtyDate)\n dateRight = parse(dirtyDateToCompare)\n }\n\n var seconds = differenceInSeconds(dateRight, dateLeft)\n var offset = dateRight.getTimezoneOffset() - dateLeft.getTimezoneOffset()\n var minutes = Math.round(seconds / 60) - offset\n var months\n\n // 0 up to 2 mins\n if (minutes < 2) {\n if (options.includeSeconds) {\n if (seconds < 5) {\n return localize('lessThanXSeconds', 5, localizeOptions)\n } else if (seconds < 10) {\n return localize('lessThanXSeconds', 10, localizeOptions)\n } else if (seconds < 20) {\n return localize('lessThanXSeconds', 20, localizeOptions)\n } else if (seconds < 40) {\n return localize('halfAMinute', null, localizeOptions)\n } else if (seconds < 60) {\n return localize('lessThanXMinutes', 1, localizeOptions)\n } else {\n return localize('xMinutes', 1, localizeOptions)\n }\n } else {\n if (minutes === 0) {\n return localize('lessThanXMinutes', 1, localizeOptions)\n } else {\n return localize('xMinutes', minutes, localizeOptions)\n }\n }\n\n // 2 mins up to 0.75 hrs\n } else if (minutes < 45) {\n return localize('xMinutes', minutes, localizeOptions)\n\n // 0.75 hrs up to 1.5 hrs\n } else if (minutes < 90) {\n return localize('aboutXHours', 1, localizeOptions)\n\n // 1.5 hrs up to 24 hrs\n } else if (minutes < MINUTES_IN_DAY) {\n var hours = Math.round(minutes / 60)\n return localize('aboutXHours', hours, localizeOptions)\n\n // 1 day up to 1.75 days\n } else if (minutes < MINUTES_IN_ALMOST_TWO_DAYS) {\n return localize('xDays', 1, localizeOptions)\n\n // 1.75 days up to 30 days\n } else if (minutes < MINUTES_IN_MONTH) {\n var days = Math.round(minutes / MINUTES_IN_DAY)\n return localize('xDays', days, localizeOptions)\n\n // 1 month up to 2 months\n } else if (minutes < MINUTES_IN_TWO_MONTHS) {\n months = Math.round(minutes / MINUTES_IN_MONTH)\n return localize('aboutXMonths', months, localizeOptions)\n }\n\n months = differenceInMonths(dateRight, dateLeft)\n\n // 2 months up to 12 months\n if (months < 12) {\n var nearestMonth = Math.round(minutes / MINUTES_IN_MONTH)\n return localize('xMonths', nearestMonth, localizeOptions)\n\n // 1 year up to max Date\n } else {\n var monthsSinceStartOfYear = months % 12\n var years = Math.floor(months / 12)\n\n // N years up to 1 years 3 months\n if (monthsSinceStartOfYear < 3) {\n return localize('aboutXYears', years, localizeOptions)\n\n // N years 3 months up to N years 9 months\n } else if (monthsSinceStartOfYear < 9) {\n return localize('overXYears', years, localizeOptions)\n\n // N years 9 months up to N year 12 months\n } else {\n return localize('almostXYears', years + 1, localizeOptions)\n }\n }\n}\n\nmodule.exports = distanceInWords\n","var addISOYears = require('../add_iso_years/index.js')\n\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Subtract the specified number of ISO week-numbering years from the given date.\n *\n * @description\n * Subtract the specified number of ISO week-numbering years from the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of ISO week-numbering years to be subtracted\n * @returns {Date} the new date with the ISO week-numbering years subtracted\n *\n * @example\n * // Subtract 5 ISO week-numbering years from 1 September 2014:\n * var result = subISOYears(new Date(2014, 8, 1), 5)\n * //=> Mon Aug 31 2009 00:00:00\n */\nfunction subISOYears (dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount)\n return addISOYears(dirtyDate, -amount)\n}\n\nmodule.exports = subISOYears\n","var parse = require('../parse/index.js')\nvar differenceInCalendarDays = require('../difference_in_calendar_days/index.js')\nvar compareAsc = require('../compare_asc/index.js')\n\n/**\n * @category Day Helpers\n * @summary Get the number of full days between the given dates.\n *\n * @description\n * Get the number of full days between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of full days\n *\n * @example\n * // How many full days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * var result = differenceInDays(\n * new Date(2012, 6, 2, 0, 0),\n * new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 365\n */\nfunction differenceInDays (dirtyDateLeft, dirtyDateRight) {\n var dateLeft = parse(dirtyDateLeft)\n var dateRight = parse(dirtyDateRight)\n\n var sign = compareAsc(dateLeft, dateRight)\n var difference = Math.abs(differenceInCalendarDays(dateLeft, dateRight))\n dateLeft.setDate(dateLeft.getDate() - sign * difference)\n\n // Math.abs(diff in full days - diff in calendar days) === 1 if last calendar day is not full\n // If so, result must be decreased by 1 in absolute value\n var isLastDayNotFull = compareAsc(dateLeft, dateRight) === -sign\n return sign * (difference - isLastDayNotFull)\n}\n\nmodule.exports = differenceInDays\n","var parse = require('../parse/index.js')\n\n/**\n * @category Year Helpers\n * @summary Get the number of calendar years between the given dates.\n *\n * @description\n * Get the number of calendar years between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar years\n *\n * @example\n * // How many calendar years are between 31 December 2013 and 11 February 2015?\n * var result = differenceInCalendarYears(\n * new Date(2015, 1, 11),\n * new Date(2013, 11, 31)\n * )\n * //=> 2\n */\nfunction differenceInCalendarYears (dirtyDateLeft, dirtyDateRight) {\n var dateLeft = parse(dirtyDateLeft)\n var dateRight = parse(dirtyDateRight)\n\n return dateLeft.getFullYear() - dateRight.getFullYear()\n}\n\nmodule.exports = differenceInCalendarYears\n","var parse = require('../parse/index.js')\n\n/**\n * @category Quarter Helpers\n * @summary Get the year quarter of the given date.\n *\n * @description\n * Get the year quarter of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the quarter\n *\n * @example\n * // Which quarter is 2 July 2014?\n * var result = getQuarter(new Date(2014, 6, 2))\n * //=> 3\n */\nfunction getQuarter (dirtyDate) {\n var date = parse(dirtyDate)\n var quarter = Math.floor(date.getMonth() / 3) + 1\n return quarter\n}\n\nmodule.exports = getQuarter\n","var parse = require('../parse/index.js')\n\n/**\n * @category Month Helpers\n * @summary Get the number of calendar months between the given dates.\n *\n * @description\n * Get the number of calendar months between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar months\n *\n * @example\n * // How many calendar months are between 31 January 2014 and 1 September 2014?\n * var result = differenceInCalendarMonths(\n * new Date(2014, 8, 1),\n * new Date(2014, 0, 31)\n * )\n * //=> 8\n */\nfunction differenceInCalendarMonths (dirtyDateLeft, dirtyDateRight) {\n var dateLeft = parse(dirtyDateLeft)\n var dateRight = parse(dirtyDateRight)\n\n var yearDiff = dateLeft.getFullYear() - dateRight.getFullYear()\n var monthDiff = dateLeft.getMonth() - dateRight.getMonth()\n\n return yearDiff * 12 + monthDiff\n}\n\nmodule.exports = differenceInCalendarMonths\n","var getISOYear = require('../get_iso_year/index.js')\n\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the number of calendar ISO week-numbering years between the given dates.\n *\n * @description\n * Get the number of calendar ISO week-numbering years between the given dates.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar ISO week-numbering years\n *\n * @example\n * // How many calendar ISO week-numbering years are 1 January 2010 and 1 January 2012?\n * var result = differenceInCalendarISOYears(\n * new Date(2012, 0, 1),\n * new Date(2010, 0, 1)\n * )\n * //=> 2\n */\nfunction differenceInCalendarISOYears (dirtyDateLeft, dirtyDateRight) {\n return getISOYear(dirtyDateLeft) - getISOYear(dirtyDateRight)\n}\n\nmodule.exports = differenceInCalendarISOYears\n","var addMonths = require('../add_months/index.js')\n\n/**\n * @category Year Helpers\n * @summary Add the specified number of years to the given date.\n *\n * @description\n * Add the specified number of years to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of years to be added\n * @returns {Date} the new date with the years added\n *\n * @example\n * // Add 5 years to 1 September 2014:\n * var result = addYears(new Date(2014, 8, 1), 5)\n * //=> Sun Sep 01 2019 00:00:00\n */\nfunction addYears (dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount)\n return addMonths(dirtyDate, amount * 12)\n}\n\nmodule.exports = addYears\n","var addMilliseconds = require('../add_milliseconds/index.js')\n\n/**\n * @category Second Helpers\n * @summary Add the specified number of seconds to the given date.\n *\n * @description\n * Add the specified number of seconds to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of seconds to be added\n * @returns {Date} the new date with the seconds added\n *\n * @example\n * // Add 30 seconds to 10 July 2014 12:45:00:\n * var result = addSeconds(new Date(2014, 6, 10, 12, 45, 0), 30)\n * //=> Thu Jul 10 2014 12:45:30\n */\nfunction addSeconds (dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount)\n return addMilliseconds(dirtyDate, amount * 1000)\n}\n\nmodule.exports = addSeconds\n","var addMonths = require('../add_months/index.js')\n\n/**\n * @category Quarter Helpers\n * @summary Add the specified number of year quarters to the given date.\n *\n * @description\n * Add the specified number of year quarters to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of quarters to be added\n * @returns {Date} the new date with the quarters added\n *\n * @example\n * // Add 1 quarter to 1 September 2014:\n * var result = addQuarters(new Date(2014, 8, 1), 1)\n * //=> Mon Dec 01 2014 00:00:00\n */\nfunction addQuarters (dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount)\n var months = amount * 3\n return addMonths(dirtyDate, months)\n}\n\nmodule.exports = addQuarters\n","var addMilliseconds = require('../add_milliseconds/index.js')\n\nvar MILLISECONDS_IN_MINUTE = 60000\n\n/**\n * @category Minute Helpers\n * @summary Add the specified number of minutes to the given date.\n *\n * @description\n * Add the specified number of minutes to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of minutes to be added\n * @returns {Date} the new date with the minutes added\n *\n * @example\n * // Add 30 minutes to 10 July 2014 12:00:00:\n * var result = addMinutes(new Date(2014, 6, 10, 12, 0), 30)\n * //=> Thu Jul 10 2014 12:30:00\n */\nfunction addMinutes (dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount)\n return addMilliseconds(dirtyDate, amount * MILLISECONDS_IN_MINUTE)\n}\n\nmodule.exports = addMinutes\n","var parse = require('../parse/index.js')\nvar startOfISOYear = require('../start_of_iso_year/index.js')\nvar differenceInCalendarDays = require('../difference_in_calendar_days/index.js')\n\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Set the ISO week-numbering year to the given date.\n *\n * @description\n * Set the ISO week-numbering year to the given date,\n * saving the week number and the weekday number.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} isoYear - the ISO week-numbering year of the new date\n * @returns {Date} the new date with the ISO week-numbering year setted\n *\n * @example\n * // Set ISO week-numbering year 2007 to 29 December 2008:\n * var result = setISOYear(new Date(2008, 11, 29), 2007)\n * //=> Mon Jan 01 2007 00:00:00\n */\nfunction setISOYear (dirtyDate, dirtyISOYear) {\n var date = parse(dirtyDate)\n var isoYear = Number(dirtyISOYear)\n var diff = differenceInCalendarDays(date, startOfISOYear(date))\n var fourthOfJanuary = new Date(0)\n fourthOfJanuary.setFullYear(isoYear, 0, 4)\n fourthOfJanuary.setHours(0, 0, 0, 0)\n date = startOfISOYear(fourthOfJanuary)\n date.setDate(date.getDate() + diff)\n return date\n}\n\nmodule.exports = setISOYear\n","var getISOYear = require('../get_iso_year/index.js')\nvar setISOYear = require('../set_iso_year/index.js')\n\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Add the specified number of ISO week-numbering years to the given date.\n *\n * @description\n * Add the specified number of ISO week-numbering years to the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of ISO week-numbering years to be added\n * @returns {Date} the new date with the ISO week-numbering years added\n *\n * @example\n * // Add 5 ISO week-numbering years to 2 July 2010:\n * var result = addISOYears(new Date(2010, 6, 2), 5)\n * //=> Fri Jun 26 2015 00:00:00\n */\nfunction addISOYears (dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount)\n return setISOYear(dirtyDate, getISOYear(dirtyDate) + amount)\n}\n\nmodule.exports = addISOYears\n","var addMilliseconds = require('../add_milliseconds/index.js')\n\nvar MILLISECONDS_IN_HOUR = 3600000\n\n/**\n * @category Hour Helpers\n * @summary Add the specified number of hours to the given date.\n *\n * @description\n * Add the specified number of hours to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of hours to be added\n * @returns {Date} the new date with the hours added\n *\n * @example\n * // Add 2 hours to 10 July 2014 23:00:00:\n * var result = addHours(new Date(2014, 6, 10, 23, 0), 2)\n * //=> Fri Jul 11 2014 01:00:00\n */\nfunction addHours (dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount)\n return addMilliseconds(dirtyDate, amount * MILLISECONDS_IN_HOUR)\n}\n\nmodule.exports = addHours\n","// @flow @jsx h\n\nimport { Byline, Video } from '@nrk/dh-feature-components'\nimport { h } from 'preact'\nimport PureComponent from 'preact-pure-component'\nimport style from './index.css'\n\nimport type { Props as BaseProps, Viewport } from './types'\n\ntype Props = BaseProps & {\n viewport: Viewport\n}\n\nclass Header extends PureComponent {\n render () {\n const { authors, intro, leadMedia, title } = this.props.data\n const { mediaBaseUrl, viewport } = this.props\n\n const inlineStyle = {}\n const leadMediaWrapperInlineStyle = {}\n\n if (viewport.height > -1) {\n if (viewport.width < 720) {\n inlineStyle.height = `${viewport.height - 120}px`\n leadMediaWrapperInlineStyle.height = `${Math.round(\n viewport.height * 0.6\n )}px`\n } else {\n inlineStyle.height = `${viewport.height - 55}px`\n }\n }\n\n return (\n
\n \n {\n return {\n type: source.type,\n src: `${mediaBaseUrl}${source.src}`\n }\n })}\n />\n
\n
\n \n \n \n
\n \n )\n }\n}\n\nexport default Header\n","// @flow @jsx h\n\nimport { bem } from '@nrk/dh-utils'\nimport { Paragraph } from '@nrk/dh-feature-components'\nimport { h } from 'preact'\nimport style from '../index.css'\n\nimport type { DefaultSlideProps } from '../types'\n\nfunction DefaultCard (props: DefaultSlideProps) {\n const { viewport } = props\n const { align, content } = props.value\n\n const wrapperInlineStyle = {}\n\n if (viewport.height > -1) {\n wrapperInlineStyle.marginTop = `${viewport.height - 10}px`\n }\n\n return (\n
\n
\n {content.map((item, itemIdx) => (\n \n ))}\n
\n
\n )\n}\n\nexport default DefaultCard\n","// @flow @jsx h\n\nimport { List, ListItem } from '@nrk/dh-feature-components'\nimport { bem } from '@nrk/dh-utils'\nimport { h } from 'preact'\nimport style from '../index.css'\n\nimport type { FactBoxSlideProps } from '../types'\n\nfunction FactBoxCard (props: FactBoxSlideProps) {\n const { viewport } = props\n const { align, content, title } = props.value\n\n const wrapperInlineStyle = {}\n\n if (viewport.height > -1) {\n wrapperInlineStyle.marginTop = `${viewport.height - 10}px`\n }\n\n return (\n
\n
\n

{title}

\n\n \n {content.map((item, itemIdx) => (\n \n ))}\n \n
\n
\n )\n}\n\nexport default FactBoxCard\n","// @flow\n\n/** @jsx h */\n\nimport { bem } from '@nrk/dh-utils'\nimport { Video } from '@nrk/dh-feature-components'\nimport { h } from 'preact'\nimport PureComponent from 'preact-pure-component'\nimport style from './index.css'\n\nimport type { Caption, VideoProps, Viewport } from './types'\n\ntype Props = {\n captions?: Caption[],\n horizontal: VideoProps,\n vertical: VideoProps,\n playing: boolean,\n preload?: string,\n muted: boolean,\n viewport: Viewport,\n onCaptionCueEnter: Function,\n onCaptionCueExit: Function,\n onDurationChange: Function,\n onPlay: Function,\n onPause: Function,\n onEnded: Function,\n onTimeUpdate: Function\n}\n\ntype State = {\n currentTime: number\n}\n\nclass ResponsiveVideo extends PureComponent {\n state = {\n currentTime: 0\n }\n\n verticalVideo: Video\n horizontalVideo: Video\n\n componentDidUpdate (prevProps: Props, prevState: State) {\n const { viewport } = this.props\n const isVerticalViewport = viewport.width / viewport.height < 1\n const prevIsVerticalViewport =\n prevProps.viewport.width / prevProps.viewport.height < 1\n\n // Update time when switching between vertical/horizontal videos\n if (prevIsVerticalViewport !== isVerticalViewport) {\n this.updateTime(this.state.currentTime)\n }\n }\n\n play () {\n const { viewport } = this.props\n const isVerticalViewport = viewport.width / viewport.height < 1\n\n if (isVerticalViewport) {\n this.verticalVideo.play()\n } else {\n this.horizontalVideo.play()\n }\n }\n\n updateTime (time: number) {\n this.verticalVideo.updateTime(time)\n this.horizontalVideo.updateTime(time)\n }\n\n handleTimeUpdate = (event: any) => {\n this.props.onTimeUpdate(event)\n this.setState({ currentTime: event.target.currentTime })\n }\n\n render () {\n const {\n muted,\n captions,\n preload,\n playing,\n horizontal,\n vertical,\n viewport,\n onCaptionCueEnter,\n onCaptionCueExit,\n onDurationChange,\n onPlay,\n onPause,\n onEnded\n } = this.props\n const isVerticalViewport = viewport.width / viewport.height < 1\n const className = bem(\n style.videoPlayer__video,\n isVerticalViewport ? 'vertical' : 'horizontal'\n )\n\n const commonProps = {\n muted,\n captions,\n preload,\n onCaptionCueEnter,\n onCaptionCueExit,\n onDurationChange,\n onPlay,\n onPause,\n onEnded,\n onTimeUpdate: this.handleTimeUpdate\n }\n\n return (\n
\n (this.verticalVideo = verticalVideo)}\n className={style.videoPlayer__verticalVideo}\n poster={vertical.poster}\n playing={isVerticalViewport && playing}\n sources={vertical.sources}\n />\n (this.horizontalVideo = horizontalVideo)}\n className={style.videoPlayer__horizontalVideo}\n poster={horizontal.poster}\n playing={!isVerticalViewport && playing}\n sources={horizontal.sources}\n />\n
\n )\n }\n}\n\nexport default ResponsiveVideo\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"muteButton\":\"dh-trygd-tryl-muteButton\",\"muteButton__volumeIcon\":\"dh-trygd-tryl-muteButton__volumeIcon\",\"muteButton--muted\":\"dh-trygd-tryl-muteButton--muted\",\"muteButton__mutedIcon\":\"dh-trygd-tryl-muteButton__mutedIcon\"};","// @flow @jsx h\n\nimport { bem } from '@nrk/dh-utils'\nimport { h } from 'preact'\nimport style from './MuteButton.css'\n\ntype Props = {\n className?: string,\n muted: boolean,\n onClick: Function\n}\n\nexport default function MuteButton (props: Props) {\n const { muted } = props\n const className = `${bem(style.muteButton, muted && 'muted')}${\n props.className ? ` ${props.className}` : ''\n }`\n\n return (\n \n )\n}\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"togglePlayButton\":\"dh-trygd-tryl-togglePlayButton\",\"togglePlayButton__playIcon\":\"dh-trygd-tryl-togglePlayButton__playIcon\",\"togglePlayButton--paused\":\"dh-trygd-tryl-togglePlayButton--paused\",\"togglePlayButton__pauseIcon\":\"dh-trygd-tryl-togglePlayButton__pauseIcon\"};","// @flow @jsx h\n\nimport { bem } from '@nrk/dh-utils'\nimport { h } from 'preact'\nimport style from './TogglePlayButton.css'\n\ntype Props = {\n className?: string,\n paused: boolean,\n onClick: Function\n}\n\nexport default function TogglePlayButton (props: Props) {\n const { paused } = props\n const className = `${bem(style.togglePlayButton, paused && 'paused')}${\n props.className ? ` ${props.className}` : ''\n }`\n\n return (\n \n )\n}\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"scrubber\":\"dh-trygd-tryl-scrubber\",\"root--js\":\"dh-trygd-tryl-root--js\",\"scrubber__bgBar\":\"dh-trygd-tryl-scrubber__bgBar\",\"scrubber__bufferedBar\":\"dh-trygd-tryl-scrubber__bufferedBar\",\"scrubber__playedBar\":\"dh-trygd-tryl-scrubber__playedBar\"};","// @flow @jsx h\n\nimport { Component, h } from 'preact'\nimport style from './Scrubber.css'\n\ntype Props = {\n class?: string,\n duration: number,\n time: number,\n onPositionUpdate?: (position: number) => void\n}\n\ntype State = {\n left: number,\n width: number,\n isScrubbing: boolean,\n position: number | null\n}\n\nclass Scrubber extends Component {\n bgElm: HTMLDivElement\n elm: HTMLDivElement\n handleElm: HTMLButtonElement\n positionTimeout: any\n state = {\n left: 0,\n width: 0,\n isScrubbing: false,\n position: null\n }\n\n componentDidMount () {\n if (this.props.onPositionUpdate) {\n this.elm.addEventListener('keydown', this.handleKeyDown)\n this.elm.addEventListener('mousedown', this.handleMouseDown)\n this.elm.addEventListener('touchstart', this.handleTouchStart)\n window.addEventListener('resize', this.handleResize)\n this.handleResize()\n }\n }\n\n componentWillUnmount () {\n if (this.props.onPositionUpdate) {\n this.elm.removeEventListener('keydown', this.handleKeyDown)\n this.elm.removeEventListener('mousedown', this.handleMouseDown)\n this.elm.removeEventListener('touchstart', this.handleTouchStart)\n window.removeEventListener('resize', this.handleResize)\n }\n }\n\n handleKeyDown = (evt: KeyboardEvent) => {\n const { duration, time, onPositionUpdate } = this.props\n\n if (onPositionUpdate) {\n let nextTime = time\n\n switch (evt.key) {\n case 'ArrowLeft':\n nextTime -= 1\n break\n case 'ArrowRight':\n nextTime += 1\n break\n }\n\n onPositionUpdate(Math.max(Math.min(nextTime / duration, 1), 0))\n }\n }\n\n handleMouseDown = (evt: MouseEvent) => {\n evt.preventDefault()\n this.focus()\n this.start(evt.pageX)\n this.elm.addEventListener('mousemove', this.handleMouseMove)\n window.addEventListener('mouseup', this.handleMouseUp)\n }\n\n handleMouseMove = (evt: MouseEvent) => {\n this.move(evt.pageX)\n }\n\n handleMouseUp = (evt: MouseEvent) => {\n this.focus()\n this.end()\n this.elm.removeEventListener('mousemove', this.handleMouseMove)\n window.removeEventListener('mouseup', this.handleMouseUp)\n }\n\n handleResize = () => {\n const rect = this.bgElm.getBoundingClientRect()\n\n this.setState({\n left: Math.floor(rect.left),\n width: rect.width\n })\n }\n\n handleTouchStart = (evt: TouchEvent) => {\n if (evt.touches.length === 1) {\n evt.preventDefault()\n this.focus()\n this.start(evt.touches[0].clientX)\n this.elm.addEventListener('touchmove', this.handleTouchMove)\n window.addEventListener('touchend', this.handleTouchEnd)\n }\n }\n\n handleTouchMove = (evt: TouchEvent) => {\n if (evt.touches.length === 1) {\n this.move(evt.touches[0].clientX)\n }\n }\n\n handleTouchEnd = (evt: TouchEvent) => {\n this.focus()\n this.end()\n this.elm.removeEventListener('touchmove', this.handleTouchMove)\n window.removeEventListener('touchend', this.handleTouchEnd)\n }\n\n focus () {\n this.handleElm.focus()\n }\n\n start (clientX: number) {\n if (this.positionTimeout) {\n clearTimeout(this.positionTimeout)\n }\n\n this.setState({\n position: (clientX - this.state.left) / this.state.width,\n isScrubbing: true\n })\n }\n\n move (clientX: number) {\n this.setState({\n position: Math.max(\n Math.min((clientX - this.state.left) / this.state.width, 1),\n 0\n )\n })\n }\n\n end () {\n if (this.props.onPositionUpdate && this.state.position !== null) {\n this.props.onPositionUpdate(this.state.position)\n }\n\n this.setState({\n isScrubbing: false\n })\n\n this.positionTimeout = setTimeout(() => {\n this.setState({\n position: null\n })\n }, 250)\n }\n\n render () {\n const { duration, time } = this.props\n const className = this.props.class\n const position =\n this.state.position !== null ? this.state.position : time / duration\n\n return (\n (this.elm = elm)}\n >\n (this.bgElm = bgElm)}\n />\n
\n \n (this.handleElm = handleElm)}\n role='slider'\n aria-valuemin='0'\n aria-valuemax={duration * 1000}\n aria-valuenow={time * 1000}\n style={{ left: `${position * 100}%` }}\n />\n
\n )\n }\n}\n\nexport default Scrubber\n","// @flow @jsx h\n\n// import { Video } from '@nrk/dh-feature-components'\nimport { Component, h } from 'preact'\nimport style from './index.css'\nimport Scrubber from './Scrubber'\nimport TogglePlayButton from './TogglePlayButton'\nimport MuteButton from './MuteButton'\nimport ResponsiveVideo from './ResponsiveVideo'\n\nimport type { Props, State } from './types'\n\nclass VideoPlayer extends Component {\n elm: HTMLDivElement\n video: ResponsiveVideo\n\n constructor () {\n super()\n\n this.state = {\n paused: true,\n caption: null,\n muted: true,\n time: 0,\n duration: 0,\n userPaused: false\n }\n }\n\n handleCaptionCueEnter = (cue: any) => {\n this.setState({ caption: cue.text })\n }\n\n handleCaptionCueExit = () => {\n this.setState({ caption: null })\n }\n\n handleDurationChange = (event: Object) => {\n this.setState({ duration: event.target.duration })\n }\n\n handleTimeUpdate = (event: Object) => {\n this.setState({ time: event.target.currentTime })\n }\n\n handlePositionUpdate = (position: number) => {\n this.video.updateTime(position * this.state.duration)\n }\n\n handleTogglePlay = () => {\n const paused = !this.state.paused\n this.setState({ paused, userPaused: paused })\n if (!paused) {\n this.video.play()\n }\n }\n\n handlePlay = () => {\n const { onPlay } = this.props\n\n this.setState({ paused: false })\n\n if (onPlay) {\n onPlay()\n }\n }\n\n handlePause = () => {\n const { onPause } = this.props\n\n this.setState({ paused: true })\n\n if (onPause) {\n onPause()\n }\n }\n\n handleEnded = () => {\n this.setState({ paused: true })\n }\n\n render () {\n const {\n captions,\n horizontal,\n vertical,\n muted,\n onToggleMute,\n viewport\n } = this.props\n const { caption, duration, time, paused, userPaused } = this.state\n const playing = !userPaused && this.props.playing\n\n return (\n (this.elm = elm)}\n className={style.videoPlayer}\n style={this.props.style}\n >\n
\n (this.video = video)}\n preload='auto'\n muted={muted}\n playing={playing}\n captions={captions}\n horizontal={horizontal}\n vertical={vertical}\n onCaptionCueEnter={this.handleCaptionCueEnter}\n onCaptionCueExit={this.handleCaptionCueExit}\n onDurationChange={this.handleDurationChange}\n onPlay={this.handlePlay}\n onPause={this.handlePause}\n onEnded={this.handleEnded}\n onTimeUpdate={this.handleTimeUpdate}\n viewport={viewport}\n />\n \n \n \n {caption && (\n
\n \n
\n )}\n
\n \n )\n }\n}\n\nexport default VideoPlayer\n","// @flow @jsx h\n\nimport { SerumSmartPicture, Slide } from '@nrk/dh-feature-components'\nimport VideoPlayer from '../VideoPlayer'\nimport { h } from 'preact'\nimport style from './index.css'\n\nimport type { DefaultSlideProps } from './types'\n\nfunction DefaultSlide (props: DefaultSlideProps) {\n const {\n active,\n mediaBaseUrl,\n muted,\n onAnalyticsEvent,\n onToggleMute,\n stacked,\n viewport,\n visible\n } = props\n const { media } = props.value\n\n if (!media) {\n return \n }\n\n switch (media.type) {\n case 'image':\n return (\n \n \n \n )\n\n case 'video':\n return (\n \n {\n return {\n in: Number(caption.in),\n out: Number(caption.out),\n text: caption.text\n }\n })\n }\n onPlay={() => {\n onAnalyticsEvent({ action: `video/PLAY/${media.id}` })\n }}\n onPause={() => {\n onAnalyticsEvent({ action: `video/PAUSE/${media.id}` })\n }}\n onToggleMute={onToggleMute}\n playing={active && visible}\n horizontal={{\n poster: `${mediaBaseUrl}${media.horizontal.poster}`,\n sources: media.horizontal.sources.map(source => {\n return {\n type: source.type,\n src: `${mediaBaseUrl}${source.src}`\n }\n })\n }}\n vertical={{\n poster: `${mediaBaseUrl}${media.vertical.poster}`,\n sources: media.vertical.sources.map(source => {\n return {\n type: source.type,\n src: `${mediaBaseUrl}${source.src}`\n }\n })\n }}\n viewport={viewport}\n />\n \n )\n\n default:\n return \n }\n}\n\nexport default DefaultSlide\n","// @flow @jsx h\n\nimport { Slideshow, ViewportIntersections } from '@nrk/dh-feature-components'\nimport { getScrollTop } from '@nrk/dh-utils'\nimport { h } from 'preact'\nimport PureComponent from 'preact-pure-component'\nimport style from './index.css'\nimport MediaSlide from './MediaSlide'\n\n// Import card types\nimport FactBoxCard from './cards/FactBoxCard'\nimport DefaultCard from './cards/DefaultCard'\n\nimport type { Props, State } from './types'\n\ntype Intersection = {\n isIntersecting: boolean,\n ratio: number\n}\n\nclass VisualStory extends PureComponent {\n elm: HTMLDivElement\n visibleRaf: any\n\n constructor (props: Props) {\n super(props)\n\n this.state = {\n intersectionRatio: 0,\n rect: null,\n visibleIndex: props.slides.length ? 0 : -1,\n visible: false\n }\n }\n\n componentDidMount () {\n this.handleResize()\n\n this.props.onRegisterTriggerElement(\n this.elm,\n this.props.sectionIndex,\n this.props.index\n )\n\n window.addEventListener('resize', this.handleResize)\n\n // if (this.props.isIntersecting) {\n // console.log('isIntersecting')\n // }\n }\n\n componentDidUpdate (prevProps: Props, prevState: State) {\n const { isIntersecting } = this.props\n // const { rect } = this.state\n\n // if (rect !== prevState.rect) {\n // console.log('rect changed', rect)\n // }\n\n if (isIntersecting !== prevProps.isIntersecting) {\n if (isIntersecting && !prevProps.isIntersecting) {\n // console.log('start listener')\n this.startVisibilityListener()\n } else {\n this.stopVisibilityListener()\n // console.log('stop listener')\n }\n }\n }\n\n componentWillUnmount () {\n window.removeEventListener('resize', this.handleResize)\n }\n\n handleResize = () => {\n const scrollTop = getScrollTop()\n const rect = this.elm.getBoundingClientRect()\n\n // console.log(scrollTop)\n\n this.setState({\n rect: {\n height: rect.height,\n top: rect.top + scrollTop,\n bottom: rect.bottom + scrollTop\n }\n })\n }\n\n handleChange = (intersections: Intersection[]) => {\n this.setState({\n intersectionRatio: intersections[this.state.visibleIndex].ratio\n })\n }\n\n handleEnter = (entry: any, idx: number) => {\n this.setState({ visibleIndex: idx })\n }\n\n startVisibilityListener () {\n const { rect, visible } = this.state\n const scrollTop = getScrollTop()\n const halfHeight = window.innerHeight / 2\n\n if (rect) {\n if (\n scrollTop > rect.top - halfHeight &&\n scrollTop < rect.bottom - halfHeight\n ) {\n if (!visible) {\n this.setState({ visible: true })\n }\n } else {\n if (visible) {\n this.setState({ visible: false })\n }\n }\n }\n\n this.visibleRaf = requestAnimationFrame(() => {\n this.startVisibilityListener()\n })\n }\n\n stopVisibilityListener () {\n if (this.visibleRaf) {\n // console.log('stop listener')\n cancelAnimationFrame(this.visibleRaf)\n }\n }\n\n render () {\n const {\n isIntersecting,\n mediaBaseUrl,\n muted,\n onAnalyticsEvent,\n onToggleMute,\n slides,\n viewport\n } = this.props\n const { intersectionRatio, visible, visibleIndex } = this.state\n\n const cardsInlineStyle = {}\n\n if (viewport.height > -1) {\n cardsInlineStyle.marginTop = `${0 - viewport.height}px`\n cardsInlineStyle.paddingBottom = `${viewport.height}px`\n }\n\n return (\n
(this.elm = elm)} className={style.visualStory}>\n \n {slides.map((slide, idx) => (\n \n ))}\n \n \n {slides.map((slide, idx) => {\n switch (slide.type) {\n case 'factBoxSlide':\n return (\n \n )\n default:\n return (\n \n )\n }\n })}\n \n
\n )\n }\n}\n\nexport default VisualStory\n","var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// @jsx h\n\n/* eslint-disable jsx-a11y/media-has-caption */\n\nimport { h } from 'preact';\nimport PureComponent from '../lib/preact-pure-component';\n\nvar Video = function (_PureComponent) {\n _inherits(Video, _PureComponent);\n\n function Video() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, Video);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Video.__proto__ || Object.getPrototypeOf(Video)).call.apply(_ref, [this].concat(args))), _this), _this.handleCanPlay = function (event) {\n var onCanPlay = _this.props.onCanPlay;\n\n if (typeof onCanPlay !== 'undefined') {\n onCanPlay(event);\n }\n }, _this.handlePlay = function (event) {\n var onPlay = _this.props.onPlay;\n\n if (onPlay) {\n onPlay(event);\n }\n }, _this.handlePause = function (event) {\n var onPause = _this.props.onPause;\n\n if (onPause) {\n onPause(event);\n }\n }, _this.handleDurationChange = function (event) {\n var onDurationChange = _this.props.onDurationChange;\n\n if (onDurationChange) {\n onDurationChange(event);\n }\n }, _this.handleTimeUpdate = function (event) {\n var onTimeUpdate = _this.props.onTimeUpdate;\n\n if (onTimeUpdate) {\n onTimeUpdate(event);\n }\n }, _this.handleEnded = function (event) {\n var onEnded = _this.props.onEnded;\n\n if (typeof onEnded !== 'undefined') {\n onEnded(event);\n }\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(Video, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _this2 = this;\n\n var elm = this.elm;\n var _props = this.props,\n captions = _props.captions,\n playing = _props.playing,\n onCaptionCueEnter = _props.onCaptionCueEnter,\n onCaptionCueExit = _props.onCaptionCueExit;\n\n elm.addEventListener('canplay', this.handleCanPlay);\n elm.addEventListener('play', this.handlePlay);\n elm.addEventListener('ended', this.handleEnded);\n elm.addEventListener('pause', this.handlePause);\n elm.addEventListener('durationchange', this.handleDurationChange);\n elm.addEventListener('timeupdate', this.handleTimeUpdate);\n\n if (captions) {\n this.track = elm.addTextTrack('subtitles', 'Norsk');\n\n try {\n captions.forEach(function (a) {\n return _this2.track.addCue(new window.VTTCue(Number(a.in), Number(a.out), a.text));\n });\n } catch (ex) {\n captions.forEach(function (a) {\n return _this2.track.addCue(new window.TextTrackCue(Number(a.in), Number(a.out), a.text));\n });\n }\n\n this.track.mode = 'hidden';\n\n var _loop = function _loop(i) {\n var cue = _this2.track.cues[i];\n\n try {\n cue.onenter = function () {\n if (typeof onCaptionCueEnter !== 'undefined') {\n onCaptionCueEnter(cue);\n }\n };\n cue.onexit = function () {\n if (typeof onCaptionCueExit !== 'undefined') {\n onCaptionCueExit();\n }\n };\n } catch (_) {\n // discard error\n }\n };\n\n for (var i = 0; i < this.track.cues.length; i++) {\n _loop(i);\n }\n }\n\n if (playing) {\n elm.play();\n }\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate(prevProps) {\n var _props2 = this.props,\n playing = _props2.playing,\n muted = _props2.muted;\n // Update pause or play state\n\n if (prevProps.playing && !playing) {\n this.elm.pause();\n }\n if (!prevProps.playing && playing) {\n this.elm.play();\n }\n // Updated `muted`\n if (prevProps.muted !== muted) {\n this.elm.muted = muted || false;\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n var elm = this.elm;\n\n elm.removeEventListener('canplay', this.handleCanPlay);\n elm.removeEventListener('play', this.handlePlay);\n elm.removeEventListener('ended', this.handleEnded);\n elm.removeEventListener('pause', this.handlePause);\n elm.removeEventListener('durationchange', this.handleDurationChange);\n elm.removeEventListener('timeupdate', this.handleTimeUpdate);\n }\n }, {\n key: 'play',\n value: function play() {\n this.elm.play();\n }\n }, {\n key: 'updateTime',\n value: function updateTime(time) {\n this.elm.currentTime = time;\n }\n }, {\n key: 'render',\n value: function render() {\n var _this3 = this;\n\n var _props3 = this.props,\n controls = _props3.controls,\n loop = _props3.loop,\n sources = _props3.sources,\n poster = _props3.poster;\n\n var preload = this.props.preload || 'none';\n var muted = this.props.muted || false;\n return h(\n 'video',\n {\n controls: controls,\n preload: preload,\n ref: function ref(elm) {\n return _this3.elm = elm;\n },\n loop: loop,\n muted: muted,\n playsInline: true,\n poster: poster,\n className: this.props.className,\n style: this.props.style\n },\n sources.map(function (source) {\n return h('source', { key: source.src, src: source.src, type: source.type });\n })\n );\n }\n }]);\n\n return Video;\n}(PureComponent);\n\nexport default Video;","var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// @jsx h\n\nimport { toArray } from '@nrk/dh-utils';\nimport { h } from 'preact';\nimport PureComponent from '../lib/preact-pure-component';\n\nvar ViewportIntersections = function (_PureComponent) {\n _inherits(ViewportIntersections, _PureComponent);\n\n function ViewportIntersections(props) {\n _classCallCheck(this, ViewportIntersections);\n\n var _this = _possibleConstructorReturn(this, (ViewportIntersections.__proto__ || Object.getPrototypeOf(ViewportIntersections)).call(this));\n\n _this.state = {\n intersections: props.children.map(function (child, idx) {\n return {\n idx: idx,\n isIntersecting: false,\n ratio: null\n };\n })\n };\n return _this;\n }\n\n _createClass(ViewportIntersections, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var _this2 = this;\n\n var _props = this.props,\n onChange = _props.onChange,\n onEnter = _props.onEnter,\n onLeave = _props.onLeave,\n rootMargin = _props.rootMargin,\n threshold = _props.threshold;\n\n var childNodes = toArray(this.elm.childNodes);\n\n this.intersectionObserver = new IntersectionObserver(function (entries) {\n var intersections = _this2.state.intersections.slice(0);\n\n entries.forEach(function (entry) {\n var idx = childNodes.indexOf(entry.target);\n var prevIntersection = intersections[idx];\n\n intersections.splice(idx, 1, {\n idx: idx,\n isIntersecting: entry.isIntersecting,\n ratio: entry.intersectionRatio\n });\n\n if (onEnter && !prevIntersection.isIntersecting && entry.isIntersecting) {\n onEnter(entry, idx);\n }\n\n if (onLeave && prevIntersection.isIntersecting && !entry.isIntersecting) {\n onLeave(entry, idx);\n }\n });\n\n _this2.setState({ intersections: intersections });\n\n if (onChange) {\n onChange(intersections);\n }\n }, {\n rootMargin: rootMargin || '0px 0px 0px 0px',\n threshold: threshold || 1.0\n });\n\n childNodes.forEach(function (childElm) {\n return _this2.intersectionObserver.observe(childElm);\n });\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.intersectionObserver.disconnect();\n }\n }, {\n key: 'render',\n value: function render() {\n var _this3 = this;\n\n var _props2 = this.props,\n className = _props2.className,\n children = _props2.children,\n style = _props2.style;\n\n\n return h(\n 'div',\n { ref: function ref(elm) {\n return _this3.elm = elm;\n }, className: className, style: style },\n children\n );\n }\n }]);\n\n return ViewportIntersections;\n}(PureComponent);\n\nexport default ViewportIntersections;","var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// @jsx h\n\nimport { h } from 'preact';\nimport PureComponent from '../lib/preact-pure-component';\nvar style = {\n 'slideshow': 'dhfc-1_0_0-beta_11-slideshow',\n 'slideshow__slide': 'dhfc-1_0_0-beta_11-slideshow__slide',\n 'slideshow__slide--stacked': 'dhfc-1_0_0-beta_11-slideshow__slide--stacked'\n};\n\nvar Slideshow = function (_PureComponent) {\n _inherits(Slideshow, _PureComponent);\n\n function Slideshow() {\n _classCallCheck(this, Slideshow);\n\n return _possibleConstructorReturn(this, (Slideshow.__proto__ || Object.getPrototypeOf(Slideshow)).apply(this, arguments));\n }\n\n _createClass(Slideshow, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n children = _props.children,\n viewport = _props.viewport,\n visibleIndex = _props.visibleIndex;\n\n var className = '' + style.slideshow + (this.props.className ? ' ' + this.props.className : '');\n\n var inlineStyle = {};\n\n if (viewport && viewport.height > -1) {\n inlineStyle.height = viewport.height + 'px';\n }\n\n return h(\n 'div',\n { className: className, style: inlineStyle },\n children.map(function (child, idx) {\n if (idx <= visibleIndex) {\n child.attributes.stacked = true;\n }\n\n child.attributes.active = idx === visibleIndex;\n\n return child;\n })\n );\n }\n }]);\n\n return Slideshow;\n}(PureComponent);\n\nexport default Slideshow;","var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// @jsx h\n\nimport { bem } from '@nrk/dh-utils';\nimport { h } from 'preact';\nimport PureComponent from '../lib/preact-pure-component';\nvar style = {\n 'slideshow': 'dhfc-1_0_0-beta_11-slideshow',\n 'slideshow__slide': 'dhfc-1_0_0-beta_11-slideshow__slide',\n 'slideshow__slide--stacked': 'dhfc-1_0_0-beta_11-slideshow__slide--stacked'\n};\n\nvar Slide = function (_PureComponent) {\n _inherits(Slide, _PureComponent);\n\n function Slide() {\n _classCallCheck(this, Slide);\n\n return _possibleConstructorReturn(this, (Slide.__proto__ || Object.getPrototypeOf(Slide)).apply(this, arguments));\n }\n\n _createClass(Slide, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n active = _props.active,\n children = _props.children,\n stacked = _props.stacked;\n\n var className = '' + bem(style.slideshow__slide, active && 'active', stacked && 'stacked') + (this.props.className ? ' ' + this.props.className : '');\n\n return h(\n 'div',\n { className: className },\n children\n );\n }\n }]);\n\n return Slide;\n}(PureComponent);\n\nexport default Slide;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n/** @jsx h */\n\nimport { createImageUrl } from '@nrk/serum-imagecrop-utils';\nimport { h } from 'preact';\nimport PureComponent from '../../lib/preact-pure-component';\nimport { createResponsiveSrcSet } from '../helpers';\n\nvar SerumSmartPicture = function (_PureComponent) {\n _inherits(SerumSmartPicture, _PureComponent);\n\n function SerumSmartPicture() {\n _classCallCheck(this, SerumSmartPicture);\n\n return _possibleConstructorReturn(this, (SerumSmartPicture.__proto__ || Object.getPrototypeOf(SerumSmartPicture)).apply(this, arguments));\n }\n\n _createClass(SerumSmartPicture, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n className = _props.className,\n alt = _props.alt,\n horizontal = _props.horizontal,\n vertical = _props.vertical;\n\n\n var defaultUrl = createImageUrl(_extends({}, horizontal, {\n width: 1600,\n ratio: '16:9'\n }));\n\n var horizontalSourceSet = createResponsiveSrcSet(_extends({}, horizontal, {\n ratio: '16:9'\n }));\n\n var verticalSourceSet = createResponsiveSrcSet(_extends({}, vertical, {\n ratio: '3:4'\n }));\n\n return h(\n 'picture',\n { className: className },\n h('source', { media: '(min-aspect-ratio: 4/5)', srcSet: horizontalSourceSet }),\n h('source', { media: '(max-aspect-ratio: 4/5)', srcSet: verticalSourceSet }),\n h('img', { src: defaultUrl, alt: alt })\n );\n }\n }]);\n\n return SerumSmartPicture;\n}(PureComponent);\n\nexport default SerumSmartPicture;","var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n/** @jsx h */\n\nimport { createImageUrl } from '@nrk/serum-imagecrop-utils';\nimport { h } from 'preact';\nimport PureComponent from '../../lib/preact-pure-component';\nimport { createResponsiveSrcSet } from '../helpers';\n\nvar SerumResponsivePicture = function (_PureComponent) {\n _inherits(SerumResponsivePicture, _PureComponent);\n\n function SerumResponsivePicture() {\n _classCallCheck(this, SerumResponsivePicture);\n\n return _possibleConstructorReturn(this, (SerumResponsivePicture.__proto__ || Object.getPrototypeOf(SerumResponsivePicture)).apply(this, arguments));\n }\n\n _createClass(SerumResponsivePicture, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n className = _props.className,\n alt = _props.alt,\n id = _props.id,\n quality = _props.quality,\n ratio = _props.ratio;\n\n\n var defaultUrl = createImageUrl({\n id: id,\n width: 1600,\n quality: quality,\n ratio: ratio || '16:9'\n });\n\n var horizontalSourceSet = createResponsiveSrcSet({\n id: id,\n quality: quality,\n ratio: ratio || '16:9'\n });\n\n return h(\n 'picture',\n { className: className },\n h('source', { srcSet: horizontalSourceSet }),\n h('img', { src: defaultUrl, alt: alt })\n );\n }\n }]);\n\n return SerumResponsivePicture;\n}(PureComponent);\n\nexport default SerumResponsivePicture;","var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n/** @jsx h */\n\nimport { createImageUrl } from '@nrk/serum-imagecrop-utils';\nimport { h } from 'preact';\nimport PureComponent from '../../lib/preact-pure-component';\n\nvar SerumImage = function (_PureComponent) {\n _inherits(SerumImage, _PureComponent);\n\n function SerumImage() {\n _classCallCheck(this, SerumImage);\n\n return _possibleConstructorReturn(this, (SerumImage.__proto__ || Object.getPrototypeOf(SerumImage)).apply(this, arguments));\n }\n\n _createClass(SerumImage, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n className = _props.className,\n alt = _props.alt,\n id = _props.id,\n quality = _props.quality,\n ratio = _props.ratio,\n width = _props.width;\n\n\n var src = createImageUrl({\n id: id,\n width: width,\n quality: quality,\n ratio: ratio\n });\n\n return h('img', { className: className, src: src, alt: alt });\n }\n }]);\n\n return SerumImage;\n}(PureComponent);\n\nexport default SerumImage;","var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// @jsx h\n\nimport { h } from 'preact';\nimport PureComponent from '../lib/preact-pure-component';\nvar style = {\n 'quote': 'dhfc-1_0_0-beta_11-quote',\n 'quote__content': 'dhfc-1_0_0-beta_11-quote__content',\n 'quote__footer': 'dhfc-1_0_0-beta_11-quote__footer'\n};\n\nvar PullQuote = function (_PureComponent) {\n _inherits(PullQuote, _PureComponent);\n\n function PullQuote() {\n _classCallCheck(this, PullQuote);\n\n return _possibleConstructorReturn(this, (PullQuote.__proto__ || Object.getPrototypeOf(PullQuote)).apply(this, arguments));\n }\n\n _createClass(PullQuote, [{\n key: 'render',\n value: function render() {\n var value = this.props.value;\n\n var className = '' + style.quote + (this.props.className ? ' ' + this.props.className : '');\n\n return h(\n 'blockquote',\n { className: className },\n h(\n 'div',\n { className: style.quote__content },\n h('p', { dangerouslySetInnerHTML: { __html: value.text } })\n ),\n value.cite && h(\n 'footer',\n { className: style.quote__footer },\n h(\n 'cite',\n null,\n h(\n 'svg',\n { viewBox: '0 0 20 30' },\n h('path', { d: 'M 5.5,5.5 L5.5,24.5 L14.5,24.5' }),\n h('circle', { cx: '5.5', cy: '5.5', r: '3.5' })\n ),\n h('span', {\n dangerouslySetInnerHTML: {\n __html: '\\u2013 ' + (value.cite || '')\n }\n })\n )\n )\n );\n }\n }]);\n\n return PullQuote;\n}(PureComponent);\n\nexport default PullQuote;","var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// @jsx h\n\nimport { h } from 'preact';\nimport PureComponent from '../lib/preact-pure-component';\nvar style = {\n 'paragraph': 'dhfc-1_0_0-beta_11-paragraph'\n};\n\nvar Paragraph = function (_PureComponent) {\n _inherits(Paragraph, _PureComponent);\n\n function Paragraph() {\n _classCallCheck(this, Paragraph);\n\n return _possibleConstructorReturn(this, (Paragraph.__proto__ || Object.getPrototypeOf(Paragraph)).apply(this, arguments));\n }\n\n _createClass(Paragraph, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n children = _props.children,\n html = _props.html;\n\n var className = '' + style.paragraph + (this.props.className ? ' ' + this.props.className : '');\n\n if (html) {\n return h('p', { className: className, dangerouslySetInnerHTML: { __html: html } });\n }\n\n return h(\n 'p',\n { className: className },\n children\n );\n }\n }]);\n\n return Paragraph;\n}(PureComponent);\n\nexport default Paragraph;","var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// @jsx h\n\nimport { h } from 'preact';\nimport PureComponent from '../lib/preact-pure-component';\n\nvar ListItem = function (_PureComponent) {\n _inherits(ListItem, _PureComponent);\n\n function ListItem() {\n _classCallCheck(this, ListItem);\n\n return _possibleConstructorReturn(this, (ListItem.__proto__ || Object.getPrototypeOf(ListItem)).apply(this, arguments));\n }\n\n _createClass(ListItem, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n children = _props.children,\n html = _props.html;\n\n\n if (html) {\n return h('li', { dangerouslySetInnerHTML: { __html: html } });\n }\n\n return h(\n 'li',\n null,\n children\n );\n }\n }]);\n\n return ListItem;\n}(PureComponent);\n\nexport default ListItem;","var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// @jsx h\n\nimport { h } from 'preact';\nimport PureComponent from '../lib/preact-pure-component';\nvar style = {\n 'list': 'dhfc-1_0_0-beta_11-list'\n};\n\nvar List = function (_PureComponent) {\n _inherits(List, _PureComponent);\n\n function List() {\n _classCallCheck(this, List);\n\n return _possibleConstructorReturn(this, (List.__proto__ || Object.getPrototypeOf(List)).apply(this, arguments));\n }\n\n _createClass(List, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n children = _props.children,\n type = _props.type;\n\n var className = '' + style.list + (this.props.className ? ' ' + this.props.className : '');\n\n if (type === 'numbered') {\n return h(\n 'ol',\n { className: className },\n children\n );\n }\n\n return h(\n 'ul',\n { className: className },\n children\n );\n }\n }]);\n\n return List;\n}(PureComponent);\n\nexport default List;","var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// @jsx h\n\n/* eslint-disable jsx-a11y/heading-has-content */\n\nimport { h } from 'preact';\nimport PureComponent from '../lib/preact-pure-component';\nvar style = {\n 'heading': 'dhfc-1_0_0-beta_11-heading'\n};\n\nvar Heading = function (_PureComponent) {\n _inherits(Heading, _PureComponent);\n\n function Heading() {\n _classCallCheck(this, Heading);\n\n return _possibleConstructorReturn(this, (Heading.__proto__ || Object.getPrototypeOf(Heading)).apply(this, arguments));\n }\n\n _createClass(Heading, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n children = _props.children,\n html = _props.html,\n level = _props.level;\n\n var className = '' + style.heading + (this.props.className ? ' ' + this.props.className : '');\n\n var htmlProps = {\n className: className\n };\n\n if (html) {\n htmlProps.dangerouslySetInnerHTML = { __html: html };\n } else {\n htmlProps.children = children;\n }\n\n switch (level) {\n case 1:\n return h('h1', htmlProps);\n\n case 3:\n return h('h3', htmlProps);\n\n case 4:\n return h('h4', htmlProps);\n\n case 5:\n return h('h5', htmlProps);\n\n case 6:\n return h('h6', htmlProps);\n\n default:\n return h('h2', htmlProps);\n }\n }\n }]);\n\n return Heading;\n}(PureComponent);\n\nexport default Heading;","var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// @jsx h\n\nimport { h } from 'preact';\nimport PureComponent from '../lib/preact-pure-component';\nvar style = {\n 'figure': 'dhfc-1_0_0-beta_11-figure',\n 'figure__credit': 'dhfc-1_0_0-beta_11-figure__credit'\n};\n\nvar Figure = function (_PureComponent) {\n _inherits(Figure, _PureComponent);\n\n function Figure() {\n _classCallCheck(this, Figure);\n\n return _possibleConstructorReturn(this, (Figure.__proto__ || Object.getPrototypeOf(Figure)).apply(this, arguments));\n }\n\n _createClass(Figure, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n caption = _props.caption,\n credit = _props.credit,\n media = _props.media;\n\n\n return h(\n 'figure',\n { className: style.figure },\n media,\n caption && h(\n 'figcaption',\n null,\n caption.map(function (text, idx) {\n return h('p', { dangerouslySetInnerHTML: { __html: text }, key: String(idx) });\n }),\n credit && h(\n 'div',\n { className: style.figure__credit },\n credit\n )\n )\n );\n }\n }]);\n\n return Figure;\n}(PureComponent);\n\nexport default Figure;","var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n/** @jsx h */\nimport { Component, h } from 'preact';\nimport { bem } from '@nrk/dh-utils';\n\nvar styles = {\n 'chatLog': 'dhfc-1_0_0-beta_11-chatLog',\n 'avatarImage': 'dhfc-1_0_0-beta_11-avatarImage',\n 'avatar': 'dhfc-1_0_0-beta_11-avatar',\n 'avatar__placeholder': 'dhfc-1_0_0-beta_11-avatar__placeholder',\n 'avatar--right': 'dhfc-1_0_0-beta_11-avatar--right',\n 'date': 'dhfc-1_0_0-beta_11-date',\n 'date--isFirst': 'dhfc-1_0_0-beta_11-date--isFirst',\n 'message': 'dhfc-1_0_0-beta_11-message',\n 'message--left': 'dhfc-1_0_0-beta_11-message--left',\n 'message--showAvatar': 'dhfc-1_0_0-beta_11-message--showAvatar',\n 'message--right': 'dhfc-1_0_0-beta_11-message--right',\n 'message--isLastInGroup': 'dhfc-1_0_0-beta_11-message--isLastInGroup',\n 'message__text': 'dhfc-1_0_0-beta_11-message__text',\n 'message__text--right': 'dhfc-1_0_0-beta_11-message__text--right',\n 'message__text--left': 'dhfc-1_0_0-beta_11-message__text--left',\n 'message__image': 'dhfc-1_0_0-beta_11-message__image',\n 'message__image--expanded': 'dhfc-1_0_0-beta_11-message__image--expanded',\n 'message__image--clickable': 'dhfc-1_0_0-beta_11-message__image--clickable',\n 'message__image--hover': 'dhfc-1_0_0-beta_11-message__image--hover',\n 'message__image--left': 'dhfc-1_0_0-beta_11-message__image--left',\n 'message__image--right': 'dhfc-1_0_0-beta_11-message__image--right',\n 'message__name': 'dhfc-1_0_0-beta_11-message__name',\n 'message__content': 'dhfc-1_0_0-beta_11-message__content',\n 'message__content--left': 'dhfc-1_0_0-beta_11-message__content--left',\n 'message__content--right': 'dhfc-1_0_0-beta_11-message__content--right',\n 'message__content--showName': 'dhfc-1_0_0-beta_11-message__content--showName'\n};\n\n\nexport var Date = function (_Component) {\n _inherits(Date, _Component);\n\n function Date() {\n _classCallCheck(this, Date);\n\n return _possibleConstructorReturn(this, (Date.__proto__ || Object.getPrototypeOf(Date)).apply(this, arguments));\n }\n\n _createClass(Date, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n date = _props.date,\n index = _props.index;\n\n if (!date) return null;\n\n return h('h4', {\n className: bem(styles.date, { isFirst: index === 0 }),\n dangerouslySetInnerHTML: { __html: date }\n });\n }\n }]);\n\n return Date;\n}(Component);","\n/** @jsx h */\nimport { h } from 'preact';\nimport { bem } from '@nrk/dh-utils';\nimport { Avatar } from '../../Avatar';\n\nvar styles = {\n 'chatLog': 'dhfc-1_0_0-beta_11-chatLog',\n 'avatarImage': 'dhfc-1_0_0-beta_11-avatarImage',\n 'avatar': 'dhfc-1_0_0-beta_11-avatar',\n 'avatar__placeholder': 'dhfc-1_0_0-beta_11-avatar__placeholder',\n 'avatar--right': 'dhfc-1_0_0-beta_11-avatar--right',\n 'date': 'dhfc-1_0_0-beta_11-date',\n 'date--isFirst': 'dhfc-1_0_0-beta_11-date--isFirst',\n 'message': 'dhfc-1_0_0-beta_11-message',\n 'message--left': 'dhfc-1_0_0-beta_11-message--left',\n 'message--showAvatar': 'dhfc-1_0_0-beta_11-message--showAvatar',\n 'message--right': 'dhfc-1_0_0-beta_11-message--right',\n 'message--isLastInGroup': 'dhfc-1_0_0-beta_11-message--isLastInGroup',\n 'message__text': 'dhfc-1_0_0-beta_11-message__text',\n 'message__text--right': 'dhfc-1_0_0-beta_11-message__text--right',\n 'message__text--left': 'dhfc-1_0_0-beta_11-message__text--left',\n 'message__image': 'dhfc-1_0_0-beta_11-message__image',\n 'message__image--expanded': 'dhfc-1_0_0-beta_11-message__image--expanded',\n 'message__image--clickable': 'dhfc-1_0_0-beta_11-message__image--clickable',\n 'message__image--hover': 'dhfc-1_0_0-beta_11-message__image--hover',\n 'message__image--left': 'dhfc-1_0_0-beta_11-message__image--left',\n 'message__image--right': 'dhfc-1_0_0-beta_11-message__image--right',\n 'message__name': 'dhfc-1_0_0-beta_11-message__name',\n 'message__content': 'dhfc-1_0_0-beta_11-message__content',\n 'message__content--left': 'dhfc-1_0_0-beta_11-message__content--left',\n 'message__content--right': 'dhfc-1_0_0-beta_11-message__content--right',\n 'message__content--showName': 'dhfc-1_0_0-beta_11-message__content--showName'\n};\n\n\nexport var TextMessage = function TextMessage(props) {\n var message = props.message,\n isLastInGroup = props.isLastInGroup;\n var from = message.from,\n content = message.content;\n var name = from.name,\n side = from.side,\n display = from.display;\n\n var showAvatar = ['avatar', 'both'].indexOf(display) !== -1;\n var showName = ['name', 'both'].indexOf(display) !== -1;\n\n return h(\n 'div',\n { className: bem(styles.message, side, { showAvatar: showAvatar, isLastInGroup: isLastInGroup }) },\n h(\n 'span',\n { className: 'nrk-sr' },\n name,\n ':'\n ),\n showAvatar && h(Avatar, { person: from }),\n h(\n 'div',\n { className: bem(styles.message__content, side, { showName: showName }) },\n h(\n 'span',\n { 'aria-hidden': true, className: bem(styles.message__name, side) },\n showName && name\n ),\n h('span', {\n className: bem(styles.message__text, side),\n dangerouslySetInnerHTML: { __html: content.message }\n })\n )\n );\n};","\n/** @jsx h */\nimport { h } from 'preact';\nimport { getImageUrl } from '../../lib/image-url';\n\nvar styles = {\n 'chatLog': 'dhfc-1_0_0-beta_11-chatLog',\n 'avatarImage': 'dhfc-1_0_0-beta_11-avatarImage',\n 'avatar': 'dhfc-1_0_0-beta_11-avatar',\n 'avatar__placeholder': 'dhfc-1_0_0-beta_11-avatar__placeholder',\n 'avatar--right': 'dhfc-1_0_0-beta_11-avatar--right',\n 'date': 'dhfc-1_0_0-beta_11-date',\n 'date--isFirst': 'dhfc-1_0_0-beta_11-date--isFirst',\n 'message': 'dhfc-1_0_0-beta_11-message',\n 'message--left': 'dhfc-1_0_0-beta_11-message--left',\n 'message--showAvatar': 'dhfc-1_0_0-beta_11-message--showAvatar',\n 'message--right': 'dhfc-1_0_0-beta_11-message--right',\n 'message--isLastInGroup': 'dhfc-1_0_0-beta_11-message--isLastInGroup',\n 'message__text': 'dhfc-1_0_0-beta_11-message__text',\n 'message__text--right': 'dhfc-1_0_0-beta_11-message__text--right',\n 'message__text--left': 'dhfc-1_0_0-beta_11-message__text--left',\n 'message__image': 'dhfc-1_0_0-beta_11-message__image',\n 'message__image--expanded': 'dhfc-1_0_0-beta_11-message__image--expanded',\n 'message__image--clickable': 'dhfc-1_0_0-beta_11-message__image--clickable',\n 'message__image--hover': 'dhfc-1_0_0-beta_11-message__image--hover',\n 'message__image--left': 'dhfc-1_0_0-beta_11-message__image--left',\n 'message__image--right': 'dhfc-1_0_0-beta_11-message__image--right',\n 'message__name': 'dhfc-1_0_0-beta_11-message__name',\n 'message__content': 'dhfc-1_0_0-beta_11-message__content',\n 'message__content--left': 'dhfc-1_0_0-beta_11-message__content--left',\n 'message__content--right': 'dhfc-1_0_0-beta_11-message__content--right',\n 'message__content--showName': 'dhfc-1_0_0-beta_11-message__content--showName'\n};\n\n\nexport function AvatarImage(props) {\n var image = props.image,\n alt = props.alt,\n title = props.title;\n\n return h('img', {\n className: styles.avatarImage,\n title: title,\n src: getImageUrl(image),\n alt: alt,\n nopin: 'no-pin',\n 'data-pin-nopin': 'true'\n });\n}","\n/** @jsx h */\nimport { h } from 'preact';\nimport { bem } from '@nrk/dh-utils';\nimport { Avatar } from '../../Avatar/index';\nimport { getImageUrl } from '../../lib/image-url';\n\nvar styles = {\n 'chatLog': 'dhfc-1_0_0-beta_11-chatLog',\n 'avatarImage': 'dhfc-1_0_0-beta_11-avatarImage',\n 'avatar': 'dhfc-1_0_0-beta_11-avatar',\n 'avatar__placeholder': 'dhfc-1_0_0-beta_11-avatar__placeholder',\n 'avatar--right': 'dhfc-1_0_0-beta_11-avatar--right',\n 'date': 'dhfc-1_0_0-beta_11-date',\n 'date--isFirst': 'dhfc-1_0_0-beta_11-date--isFirst',\n 'message': 'dhfc-1_0_0-beta_11-message',\n 'message--left': 'dhfc-1_0_0-beta_11-message--left',\n 'message--showAvatar': 'dhfc-1_0_0-beta_11-message--showAvatar',\n 'message--right': 'dhfc-1_0_0-beta_11-message--right',\n 'message--isLastInGroup': 'dhfc-1_0_0-beta_11-message--isLastInGroup',\n 'message__text': 'dhfc-1_0_0-beta_11-message__text',\n 'message__text--right': 'dhfc-1_0_0-beta_11-message__text--right',\n 'message__text--left': 'dhfc-1_0_0-beta_11-message__text--left',\n 'message__image': 'dhfc-1_0_0-beta_11-message__image',\n 'message__image--expanded': 'dhfc-1_0_0-beta_11-message__image--expanded',\n 'message__image--clickable': 'dhfc-1_0_0-beta_11-message__image--clickable',\n 'message__image--hover': 'dhfc-1_0_0-beta_11-message__image--hover',\n 'message__image--left': 'dhfc-1_0_0-beta_11-message__image--left',\n 'message__image--right': 'dhfc-1_0_0-beta_11-message__image--right',\n 'message__name': 'dhfc-1_0_0-beta_11-message__name',\n 'message__content': 'dhfc-1_0_0-beta_11-message__content',\n 'message__content--left': 'dhfc-1_0_0-beta_11-message__content--left',\n 'message__content--right': 'dhfc-1_0_0-beta_11-message__content--right',\n 'message__content--showName': 'dhfc-1_0_0-beta_11-message__content--showName'\n};\n\n\nexport var ImageMessage = function ImageMessage(props) {\n var message = props.message,\n isLastInGroup = props.isLastInGroup;\n var from = message.from,\n content = message.content;\n var name = from.name,\n side = from.side,\n display = from.display;\n\n var showAvatar = ['avatar', 'both'].indexOf(display) !== -1;\n var showName = ['name', 'both'].indexOf(display) !== -1;\n var imageSrc = getImageUrl(content.image, { width: 320, ratio: '1:1' });\n\n return h(\n 'div',\n { className: bem(styles.message, side, { showAvatar: showAvatar, isLastInGroup: isLastInGroup }) },\n h(\n 'span',\n { className: 'nrk-sr' },\n name,\n ':'\n ),\n showAvatar && h(Avatar, { person: from }),\n h(\n 'div',\n { className: bem(styles.message__content, side, { showName: showName }) },\n h(\n 'span',\n { 'aria-hidden': true, className: bem(styles.message__name, side) },\n showName && name\n ),\n h(\n 'span',\n { className: bem(styles.message__image, side) },\n h('img', {\n src: imageSrc,\n alt: content.alt,\n nopin: 'nopin',\n 'data-pin-nopin': 'true'\n })\n )\n )\n );\n};","var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n/** @jsx h */\nimport { Component, h } from 'preact';\nimport { ImageMessage } from './ImageMessage';\nimport { TextMessage } from './TextMessage';\n\n\nexport var Message = function (_Component) {\n _inherits(Message, _Component);\n\n function Message() {\n _classCallCheck(this, Message);\n\n return _possibleConstructorReturn(this, (Message.__proto__ || Object.getPrototypeOf(Message)).apply(this, arguments));\n }\n\n _createClass(Message, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n isLastInGroup = _props.isLastInGroup,\n message = _props.message;\n var content = message.content;\n var type = content.type;\n\n\n switch (type) {\n case 'image':\n return h(ImageMessage, { message: message, isLastInGroup: isLastInGroup });\n case 'text':\n return h(TextMessage, { message: message, isLastInGroup: isLastInGroup });\n default:\n throw new Error('Unknown message type ' + type);\n }\n }\n }]);\n\n return Message;\n}(Component);","var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// @jsx h\n\nimport { h } from 'preact';\nimport PureComponent from '../lib/preact-pure-component';\nimport { Message } from './Message';\nimport { Date } from './Date';\nvar styles = {\n 'chatLog': 'dhfc-1_0_0-beta_11-chatLog',\n 'avatarImage': 'dhfc-1_0_0-beta_11-avatarImage',\n 'avatar': 'dhfc-1_0_0-beta_11-avatar',\n 'avatar__placeholder': 'dhfc-1_0_0-beta_11-avatar__placeholder',\n 'avatar--right': 'dhfc-1_0_0-beta_11-avatar--right',\n 'date': 'dhfc-1_0_0-beta_11-date',\n 'date--isFirst': 'dhfc-1_0_0-beta_11-date--isFirst',\n 'message': 'dhfc-1_0_0-beta_11-message',\n 'message--left': 'dhfc-1_0_0-beta_11-message--left',\n 'message--showAvatar': 'dhfc-1_0_0-beta_11-message--showAvatar',\n 'message--right': 'dhfc-1_0_0-beta_11-message--right',\n 'message--isLastInGroup': 'dhfc-1_0_0-beta_11-message--isLastInGroup',\n 'message__text': 'dhfc-1_0_0-beta_11-message__text',\n 'message__text--right': 'dhfc-1_0_0-beta_11-message__text--right',\n 'message__text--left': 'dhfc-1_0_0-beta_11-message__text--left',\n 'message__image': 'dhfc-1_0_0-beta_11-message__image',\n 'message__image--expanded': 'dhfc-1_0_0-beta_11-message__image--expanded',\n 'message__image--clickable': 'dhfc-1_0_0-beta_11-message__image--clickable',\n 'message__image--hover': 'dhfc-1_0_0-beta_11-message__image--hover',\n 'message__image--left': 'dhfc-1_0_0-beta_11-message__image--left',\n 'message__image--right': 'dhfc-1_0_0-beta_11-message__image--right',\n 'message__name': 'dhfc-1_0_0-beta_11-message__name',\n 'message__content': 'dhfc-1_0_0-beta_11-message__content',\n 'message__content--left': 'dhfc-1_0_0-beta_11-message__content--left',\n 'message__content--right': 'dhfc-1_0_0-beta_11-message__content--right',\n 'message__content--showName': 'dhfc-1_0_0-beta_11-message__content--showName'\n};\n\nvar ChatLog = function (_PureComponent) {\n _inherits(ChatLog, _PureComponent);\n\n function ChatLog() {\n _classCallCheck(this, ChatLog);\n\n return _possibleConstructorReturn(this, (ChatLog.__proto__ || Object.getPrototypeOf(ChatLog)).apply(this, arguments));\n }\n\n _createClass(ChatLog, [{\n key: 'render',\n value: function render() {\n var messages = this.props.messages;\n\n return h(\n 'div',\n { className: styles.chatLog },\n messages.map(function (message, idx) {\n return [h(Date, { date: message.date, index: idx, key: 'date_' + idx }), h(Message, {\n key: idx,\n isLastInGroup: isLastInGroup(messages, idx),\n message: message\n })];\n })\n );\n }\n }]);\n\n return ChatLog;\n}(PureComponent);\n\nfunction isLastInGroup(messages, index) {\n return messages.length - 1 === index;\n}\n\nexport default ChatLog;","var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// @jsx h\n\nimport { h } from 'preact';\nimport PureComponent from '../lib/preact-pure-component';\nvar style = {\n 'byline': 'dhfc-1_0_0-beta_11-byline',\n 'byline__name': 'dhfc-1_0_0-beta_11-byline__name'\n};\n\nvar Byline = function (_PureComponent) {\n _inherits(Byline, _PureComponent);\n\n function Byline() {\n _classCallCheck(this, Byline);\n\n return _possibleConstructorReturn(this, (Byline.__proto__ || Object.getPrototypeOf(Byline)).apply(this, arguments));\n }\n\n _createClass(Byline, [{\n key: 'render',\n value: function render() {\n var authors = this.props.authors;\n\n var len = authors.length;\n var className = '' + style.byline + (this.props.className ? ' ' + this.props.className : '');\n\n if (len === 0) return null;\n\n return h(\n 'div',\n { className: className },\n 'Av',\n ' ',\n authors.map(function (author, idx) {\n if (len === 1) {\n return h(\n 'span',\n { key: String(idx) },\n h('span', {\n className: style.byline__name,\n dangerouslySetInnerHTML: { __html: author.name }\n })\n );\n }\n\n if (idx === len - 1) {\n return h(\n 'span',\n { key: String(idx) },\n '&',\n ' ',\n h('span', {\n className: style.byline__name,\n dangerouslySetInnerHTML: { __html: author.name }\n })\n );\n }\n\n if (idx === len - 2) {\n return h(\n 'span',\n { key: String(idx) },\n h('span', {\n className: style.byline__name,\n dangerouslySetInnerHTML: { __html: author.name }\n }),\n ' '\n );\n }\n\n return h(\n 'span',\n { key: String(idx) },\n h('span', {\n className: style.byline__name,\n dangerouslySetInnerHTML: { __html: author.name }\n }),\n ',',\n ' '\n );\n })\n );\n }\n }]);\n\n return Byline;\n}(PureComponent);\n\nexport default Byline;","// @flow @jsx h\n\nimport {\n Figure,\n Heading,\n Paragraph,\n SerumSmartPicture\n} from '@nrk/dh-feature-components'\nimport { bem } from '@nrk/dh-utils'\nimport { h } from 'preact'\nimport PureComponent from 'preact-pure-component'\nimport style from './index.css'\nimport VisualStory from '../VisualStory'\n\nimport type { SectionProps as Props } from './types'\n\ntype State = {\n seen: boolean\n}\n\nclass Section extends PureComponent {\n elm: HTMLDivElement\n\n constructor (props: Props) {\n super(props)\n\n this.state = {\n seen: false\n }\n }\n\n componentDidMount () {\n this.props.onRegisterSectionElement(this.elm, this.props.index)\n }\n\n componentDidUpdate (prevProps: Props) {\n const { isIntersecting, onAnalyticsEvent } = this.props\n const { seen } = this.state\n\n if (!seen && isIntersecting && !prevProps.isIntersecting) {\n setTimeout(() => {\n this.setState({ seen: true })\n }, 0)\n\n onAnalyticsEvent({ action: `section/SHOW/${this.props.index}` })\n }\n }\n\n render () {\n const {\n index,\n intersections,\n isIntersecting,\n mediaBaseUrl,\n muted,\n onAnalyticsEvent,\n onRegisterTriggerElement,\n onToggleMute,\n type,\n viewport,\n value\n } = this.props\n\n const visible = isIntersecting\n\n switch (type) {\n case 'section':\n return (\n (this.elm = elm)}\n className={bem(style.section, { visible })}\n >\n {value.title && (\n \n )}\n {value.content && (\n
\n {value.content.map((item, idx) => {\n switch (item.type) {\n case 'text':\n return (\n \n )\n\n case 'figure':\n return (\n \n }\n caption={item.value.caption.map(text => text.value)}\n credit={item.value.credit}\n />\n )\n\n case 'visualStory':\n return (\n \n )\n\n default:\n return
{item.type}
\n }\n })}\n
\n )}\n \n )\n\n default:\n return
(this.elm = elm)}>{type}
\n }\n }\n}\n\nexport default Section\n","// @flow @jsx h\n\n/* eslint-disable compat/compat */\n\nimport { h } from 'preact'\nimport PureComponent from 'preact-pure-component'\nimport style from './index.css'\nimport Section from './Section'\n\nimport type { Intersection, SectionProps } from './types'\n\ntype Props = {\n mediaBaseUrl: string,\n muted: boolean,\n onAnalyticsEvent: Function,\n onToggleMute: Function,\n sections: SectionProps[],\n viewport: any\n}\n\ntype TriggerIntersectionEntries = Array | null\n\ntype State = {\n sectionIntersections: Intersection[],\n triggerIntersections: TriggerIntersectionEntries[]\n}\n\nclass Content extends PureComponent {\n intersectionObserver: IntersectionObserver\n sectionElms: Array\n triggerElms: Array | null>\n\n constructor (props: Props) {\n super(props)\n this.sectionElms = props.sections.map(section => null)\n this.triggerElms = props.sections.map(section => {\n switch (section.type) {\n case 'section':\n return section.value.content\n ? section.value.content.map(item => null)\n : []\n\n default:\n return null\n }\n })\n this.state = {\n sectionIntersections: props.sections.map(section => ({\n isIntersecting: false,\n intersectionRatio: 0\n })),\n triggerIntersections: props.sections.map(section => {\n switch (section.type) {\n case 'section':\n return section.value.content\n ? section.value.content.map(item => ({\n intersectionRatio: -1,\n isIntersecting: false\n }))\n : []\n\n default:\n return null\n }\n })\n }\n }\n\n componentDidMount () {\n this.intersectionObserver = new IntersectionObserver(\n entries => {\n entries.forEach(entry => {\n let sectionIndex = -1\n let index = -1\n\n // Find indexes\n this.triggerElms.forEach((triggerElms, idx) => {\n if (triggerElms) {\n const triggerIndex = triggerElms.indexOf(entry.target)\n\n if (triggerIndex > -1) {\n sectionIndex = idx\n index = triggerIndex\n }\n }\n })\n\n // Update triggerIntersections\n if (index > -1) {\n const triggerIntersections = this.state.triggerIntersections.slice(\n 0\n )\n\n if (triggerIntersections[sectionIndex]) {\n const intersections = triggerIntersections[sectionIndex].slice(0)\n\n intersections[index] = {\n isIntersecting: entry.isIntersecting,\n intersectionRatio: entry.intersectionRatio\n }\n\n triggerIntersections[sectionIndex] = intersections\n }\n\n this.setState({ triggerIntersections })\n\n return\n }\n\n sectionIndex = this.sectionElms.indexOf(entry.target)\n\n // Update sectionIntersections\n if (sectionIndex > -1) {\n const sectionIntersections = this.state.sectionIntersections.slice(\n 0\n )\n\n sectionIntersections[sectionIndex] = {\n isIntersecting: entry.isIntersecting,\n intersectionRatio: entry.intersectionRatio\n }\n\n this.setState({ sectionIntersections })\n }\n })\n },\n {\n rootMargin: '0px 0px 0px 0px',\n threshold: 0\n }\n )\n\n // Observe intersection of section elements\n this.sectionElms.forEach(sectionElm => {\n if (sectionElm) {\n this.intersectionObserver.observe(sectionElm)\n }\n })\n\n // Observe intersections of trigger elements\n this.triggerElms.forEach(triggerElms => {\n if (triggerElms) {\n triggerElms.forEach(triggerElm => {\n if (triggerElm) {\n this.intersectionObserver.observe(triggerElm)\n }\n })\n }\n })\n }\n\n handleRegisterSectionElement = (\n sectionElm: HTMLElement,\n sectionIndex: number\n ) => {\n this.sectionElms[sectionIndex] = sectionElm\n }\n\n handleRegisterTriggerElement = (\n triggerElm: HTMLElement,\n sectionIndex: number,\n index: number\n ) => {\n if (this.triggerElms[sectionIndex]) {\n this.triggerElms[sectionIndex][index] = triggerElm\n }\n }\n\n render () {\n const {\n mediaBaseUrl,\n muted,\n onAnalyticsEvent,\n onToggleMute,\n sections,\n viewport\n } = this.props\n const { sectionIntersections, triggerIntersections } = this.state\n\n return (\n
\n {sections.map((item, idx) => {\n switch (item.type) {\n case 'section':\n return (\n \n )\n }\n })}\n
\n )\n }\n}\n\nexport default Content\n","var addYears = require('../add_years/index.js')\n\n/**\n * @category Year Helpers\n * @summary Subtract the specified number of years from the given date.\n *\n * @description\n * Subtract the specified number of years from the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of years to be subtracted\n * @returns {Date} the new date with the years subtracted\n *\n * @example\n * // Subtract 5 years from 1 September 2014:\n * var result = subYears(new Date(2014, 8, 1), 5)\n * //=> Tue Sep 01 2009 00:00:00\n */\nfunction subYears (dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount)\n return addYears(dirtyDate, -amount)\n}\n\nmodule.exports = subYears\n","var addWeeks = require('../add_weeks/index.js')\n\n/**\n * @category Week Helpers\n * @summary Subtract the specified number of weeks from the given date.\n *\n * @description\n * Subtract the specified number of weeks from the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of weeks to be subtracted\n * @returns {Date} the new date with the weeks subtracted\n *\n * @example\n * // Subtract 4 weeks from 1 September 2014:\n * var result = subWeeks(new Date(2014, 8, 1), 4)\n * //=> Mon Aug 04 2014 00:00:00\n */\nfunction subWeeks (dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount)\n return addWeeks(dirtyDate, -amount)\n}\n\nmodule.exports = subWeeks\n","var addSeconds = require('../add_seconds/index.js')\n\n/**\n * @category Second Helpers\n * @summary Subtract the specified number of seconds from the given date.\n *\n * @description\n * Subtract the specified number of seconds from the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of seconds to be subtracted\n * @returns {Date} the new date with the seconds subtracted\n *\n * @example\n * // Subtract 30 seconds from 10 July 2014 12:45:00:\n * var result = subSeconds(new Date(2014, 6, 10, 12, 45, 0), 30)\n * //=> Thu Jul 10 2014 12:44:30\n */\nfunction subSeconds (dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount)\n return addSeconds(dirtyDate, -amount)\n}\n\nmodule.exports = subSeconds\n","var addQuarters = require('../add_quarters/index.js')\n\n/**\n * @category Quarter Helpers\n * @summary Subtract the specified number of year quarters from the given date.\n *\n * @description\n * Subtract the specified number of year quarters from the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of quarters to be subtracted\n * @returns {Date} the new date with the quarters subtracted\n *\n * @example\n * // Subtract 3 quarters from 1 September 2014:\n * var result = subQuarters(new Date(2014, 8, 1), 3)\n * //=> Sun Dec 01 2013 00:00:00\n */\nfunction subQuarters (dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount)\n return addQuarters(dirtyDate, -amount)\n}\n\nmodule.exports = subQuarters\n","var addMonths = require('../add_months/index.js')\n\n/**\n * @category Month Helpers\n * @summary Subtract the specified number of months from the given date.\n *\n * @description\n * Subtract the specified number of months from the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be subtracted\n * @returns {Date} the new date with the months subtracted\n *\n * @example\n * // Subtract 5 months from 1 February 2015:\n * var result = subMonths(new Date(2015, 1, 1), 5)\n * //=> Mon Sep 01 2014 00:00:00\n */\nfunction subMonths (dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount)\n return addMonths(dirtyDate, -amount)\n}\n\nmodule.exports = subMonths\n","var addMinutes = require('../add_minutes/index.js')\n\n/**\n * @category Minute Helpers\n * @summary Subtract the specified number of minutes from the given date.\n *\n * @description\n * Subtract the specified number of minutes from the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of minutes to be subtracted\n * @returns {Date} the new date with the mintues subtracted\n *\n * @example\n * // Subtract 30 minutes from 10 July 2014 12:00:00:\n * var result = subMinutes(new Date(2014, 6, 10, 12, 0), 30)\n * //=> Thu Jul 10 2014 11:30:00\n */\nfunction subMinutes (dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount)\n return addMinutes(dirtyDate, -amount)\n}\n\nmodule.exports = subMinutes\n","var addMilliseconds = require('../add_milliseconds/index.js')\n\n/**\n * @category Millisecond Helpers\n * @summary Subtract the specified number of milliseconds from the given date.\n *\n * @description\n * Subtract the specified number of milliseconds from the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be subtracted\n * @returns {Date} the new date with the milliseconds subtracted\n *\n * @example\n * // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:\n * var result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:29.250\n */\nfunction subMilliseconds (dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount)\n return addMilliseconds(dirtyDate, -amount)\n}\n\nmodule.exports = subMilliseconds\n","var addHours = require('../add_hours/index.js')\n\n/**\n * @category Hour Helpers\n * @summary Subtract the specified number of hours from the given date.\n *\n * @description\n * Subtract the specified number of hours from the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of hours to be subtracted\n * @returns {Date} the new date with the hours subtracted\n *\n * @example\n * // Subtract 2 hours from 11 July 2014 01:00:00:\n * var result = subHours(new Date(2014, 6, 11, 1, 0), 2)\n * //=> Thu Jul 10 2014 23:00:00\n */\nfunction subHours (dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount)\n return addHours(dirtyDate, -amount)\n}\n\nmodule.exports = subHours\n","var addDays = require('../add_days/index.js')\n\n/**\n * @category Day Helpers\n * @summary Subtract the specified number of days from the given date.\n *\n * @description\n * Subtract the specified number of days from the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be subtracted\n * @returns {Date} the new date with the days subtracted\n *\n * @example\n * // Subtract 10 days from 1 September 2014:\n * var result = subDays(new Date(2014, 8, 1), 10)\n * //=> Fri Aug 22 2014 00:00:00\n */\nfunction subDays (dirtyDate, dirtyAmount) {\n var amount = Number(dirtyAmount)\n return addDays(dirtyDate, -amount)\n}\n\nmodule.exports = subDays\n","/**\n * @category Day Helpers\n * @summary Return the start of yesterday.\n *\n * @description\n * Return the start of yesterday.\n *\n * @returns {Date} the start of yesterday\n *\n * @example\n * // If today is 6 October 2014:\n * var result = startOfYesterday()\n * //=> Sun Oct 5 2014 00:00:00\n */\nfunction startOfYesterday () {\n var now = new Date()\n var year = now.getFullYear()\n var month = now.getMonth()\n var day = now.getDate()\n\n var date = new Date(0)\n date.setFullYear(year, month, day - 1)\n date.setHours(0, 0, 0, 0)\n return date\n}\n\nmodule.exports = startOfYesterday\n","/**\n * @category Day Helpers\n * @summary Return the start of tomorrow.\n *\n * @description\n * Return the start of tomorrow.\n *\n * @returns {Date} the start of tomorrow\n *\n * @example\n * // If today is 6 October 2014:\n * var result = startOfTomorrow()\n * //=> Tue Oct 7 2014 00:00:00\n */\nfunction startOfTomorrow () {\n var now = new Date()\n var year = now.getFullYear()\n var month = now.getMonth()\n var day = now.getDate()\n\n var date = new Date(0)\n date.setFullYear(year, month, day + 1)\n date.setHours(0, 0, 0, 0)\n return date\n}\n\nmodule.exports = startOfTomorrow\n","var startOfDay = require('../start_of_day/index.js')\n\n/**\n * @category Day Helpers\n * @summary Return the start of today.\n *\n * @description\n * Return the start of today.\n *\n * @returns {Date} the start of today\n *\n * @example\n * // If today is 6 October 2014:\n * var result = startOfToday()\n * //=> Mon Oct 6 2014 00:00:00\n */\nfunction startOfToday () {\n return startOfDay(new Date())\n}\n\nmodule.exports = startOfToday\n","var parse = require('../parse/index.js')\n\n/**\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the start of a month\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * var result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nfunction startOfMonth (dirtyDate) {\n var date = parse(dirtyDate)\n date.setDate(1)\n date.setHours(0, 0, 0, 0)\n return date\n}\n\nmodule.exports = startOfMonth\n","var parse = require('../parse/index.js')\n\n/**\n * @category Year Helpers\n * @summary Set the year to the given date.\n *\n * @description\n * Set the year to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} year - the year of the new date\n * @returns {Date} the new date with the year setted\n *\n * @example\n * // Set year 2013 to 1 September 2014:\n * var result = setYear(new Date(2014, 8, 1), 2013)\n * //=> Sun Sep 01 2013 00:00:00\n */\nfunction setYear (dirtyDate, dirtyYear) {\n var date = parse(dirtyDate)\n var year = Number(dirtyYear)\n date.setFullYear(year)\n return date\n}\n\nmodule.exports = setYear\n","var parse = require('../parse/index.js')\n\n/**\n * @category Second Helpers\n * @summary Set the seconds to the given date.\n *\n * @description\n * Set the seconds to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} seconds - the seconds of the new date\n * @returns {Date} the new date with the seconds setted\n *\n * @example\n * // Set 45 seconds to 1 September 2014 11:30:40:\n * var result = setSeconds(new Date(2014, 8, 1, 11, 30, 40), 45)\n * //=> Mon Sep 01 2014 11:30:45\n */\nfunction setSeconds (dirtyDate, dirtySeconds) {\n var date = parse(dirtyDate)\n var seconds = Number(dirtySeconds)\n date.setSeconds(seconds)\n return date\n}\n\nmodule.exports = setSeconds\n","var parse = require('../parse/index.js')\nvar setMonth = require('../set_month/index.js')\n\n/**\n * @category Quarter Helpers\n * @summary Set the year quarter to the given date.\n *\n * @description\n * Set the year quarter to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} quarter - the quarter of the new date\n * @returns {Date} the new date with the quarter setted\n *\n * @example\n * // Set the 2nd quarter to 2 July 2014:\n * var result = setQuarter(new Date(2014, 6, 2), 2)\n * //=> Wed Apr 02 2014 00:00:00\n */\nfunction setQuarter (dirtyDate, dirtyQuarter) {\n var date = parse(dirtyDate)\n var quarter = Number(dirtyQuarter)\n var oldQuarter = Math.floor(date.getMonth() / 3) + 1\n var diff = quarter - oldQuarter\n return setMonth(date, date.getMonth() + diff * 3)\n}\n\nmodule.exports = setQuarter\n","var parse = require('../parse/index.js')\n\n/**\n * @category Minute Helpers\n * @summary Set the minutes to the given date.\n *\n * @description\n * Set the minutes to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} minutes - the minutes of the new date\n * @returns {Date} the new date with the minutes setted\n *\n * @example\n * // Set 45 minutes to 1 September 2014 11:30:40:\n * var result = setMinutes(new Date(2014, 8, 1, 11, 30, 40), 45)\n * //=> Mon Sep 01 2014 11:45:40\n */\nfunction setMinutes (dirtyDate, dirtyMinutes) {\n var date = parse(dirtyDate)\n var minutes = Number(dirtyMinutes)\n date.setMinutes(minutes)\n return date\n}\n\nmodule.exports = setMinutes\n","var parse = require('../parse/index.js')\n\n/**\n * @category Millisecond Helpers\n * @summary Set the milliseconds to the given date.\n *\n * @description\n * Set the milliseconds to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} milliseconds - the milliseconds of the new date\n * @returns {Date} the new date with the milliseconds setted\n *\n * @example\n * // Set 300 milliseconds to 1 September 2014 11:30:40.500:\n * var result = setMilliseconds(new Date(2014, 8, 1, 11, 30, 40, 500), 300)\n * //=> Mon Sep 01 2014 11:30:40.300\n */\nfunction setMilliseconds (dirtyDate, dirtyMilliseconds) {\n var date = parse(dirtyDate)\n var milliseconds = Number(dirtyMilliseconds)\n date.setMilliseconds(milliseconds)\n return date\n}\n\nmodule.exports = setMilliseconds\n","var parse = require('../parse/index.js')\nvar getISOWeek = require('../get_iso_week/index.js')\n\n/**\n * @category ISO Week Helpers\n * @summary Set the ISO week to the given date.\n *\n * @description\n * Set the ISO week to the given date, saving the weekday number.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} isoWeek - the ISO week of the new date\n * @returns {Date} the new date with the ISO week setted\n *\n * @example\n * // Set the 53rd ISO week to 7 August 2004:\n * var result = setISOWeek(new Date(2004, 7, 7), 53)\n * //=> Sat Jan 01 2005 00:00:00\n */\nfunction setISOWeek (dirtyDate, dirtyISOWeek) {\n var date = parse(dirtyDate)\n var isoWeek = Number(dirtyISOWeek)\n var diff = getISOWeek(date) - isoWeek\n date.setDate(date.getDate() - diff * 7)\n return date\n}\n\nmodule.exports = setISOWeek\n","var parse = require('../parse/index.js')\nvar addDays = require('../add_days/index.js')\nvar getISODay = require('../get_iso_day/index.js')\n\n/**\n * @category Weekday Helpers\n * @summary Set the day of the ISO week to the given date.\n *\n * @description\n * Set the day of the ISO week to the given date.\n * ISO week starts with Monday.\n * 7 is the index of Sunday, 1 is the index of Monday etc.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} day - the day of the ISO week of the new date\n * @returns {Date} the new date with the day of the ISO week setted\n *\n * @example\n * // Set Sunday to 1 September 2014:\n * var result = setISODay(new Date(2014, 8, 1), 7)\n * //=> Sun Sep 07 2014 00:00:00\n */\nfunction setISODay (dirtyDate, dirtyDay) {\n var date = parse(dirtyDate)\n var day = Number(dirtyDay)\n var currentDay = getISODay(date)\n var diff = day - currentDay\n return addDays(date, diff)\n}\n\nmodule.exports = setISODay\n","var parse = require('../parse/index.js')\n\n/**\n * @category Hour Helpers\n * @summary Set the hours to the given date.\n *\n * @description\n * Set the hours to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} hours - the hours of the new date\n * @returns {Date} the new date with the hours setted\n *\n * @example\n * // Set 4 hours to 1 September 2014 11:30:00:\n * var result = setHours(new Date(2014, 8, 1, 11, 30), 4)\n * //=> Mon Sep 01 2014 04:30:00\n */\nfunction setHours (dirtyDate, dirtyHours) {\n var date = parse(dirtyDate)\n var hours = Number(dirtyHours)\n date.setHours(hours)\n return date\n}\n\nmodule.exports = setHours\n","var parse = require('../parse/index.js')\n\n/**\n * @category Day Helpers\n * @summary Set the day of the year to the given date.\n *\n * @description\n * Set the day of the year to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} dayOfYear - the day of the year of the new date\n * @returns {Date} the new date with the day of the year setted\n *\n * @example\n * // Set the 2nd day of the year to 2 July 2014:\n * var result = setDayOfYear(new Date(2014, 6, 2), 2)\n * //=> Thu Jan 02 2014 00:00:00\n */\nfunction setDayOfYear (dirtyDate, dirtyDayOfYear) {\n var date = parse(dirtyDate)\n var dayOfYear = Number(dirtyDayOfYear)\n date.setMonth(0)\n date.setDate(dayOfYear)\n return date\n}\n\nmodule.exports = setDayOfYear\n","var parse = require('../parse/index.js')\nvar addDays = require('../add_days/index.js')\n\n/**\n * @category Weekday Helpers\n * @summary Set the day of the week to the given date.\n *\n * @description\n * Set the day of the week to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} day - the day of the week of the new date\n * @param {Object} [options] - the object with options\n * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the new date with the day of the week setted\n *\n * @example\n * // Set Sunday to 1 September 2014:\n * var result = setDay(new Date(2014, 8, 1), 0)\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If week starts with Monday, set Sunday to 1 September 2014:\n * var result = setDay(new Date(2014, 8, 1), 0, {weekStartsOn: 1})\n * //=> Sun Sep 07 2014 00:00:00\n */\nfunction setDay (dirtyDate, dirtyDay, dirtyOptions) {\n var weekStartsOn = dirtyOptions ? (Number(dirtyOptions.weekStartsOn) || 0) : 0\n var date = parse(dirtyDate)\n var day = Number(dirtyDay)\n var currentDay = date.getDay()\n\n var remainder = day % 7\n var dayIndex = (remainder + 7) % 7\n\n var diff = (dayIndex < weekStartsOn ? 7 : 0) + day - currentDay\n return addDays(date, diff)\n}\n\nmodule.exports = setDay\n","var parse = require('../parse/index.js')\n\n/**\n * @category Day Helpers\n * @summary Set the day of the month to the given date.\n *\n * @description\n * Set the day of the month to the given date.\n *\n * @param {Date|String|Number} date - the date to be changed\n * @param {Number} dayOfMonth - the day of the month of the new date\n * @returns {Date} the new date with the day of the month setted\n *\n * @example\n * // Set the 30th day of the month to 1 September 2014:\n * var result = setDate(new Date(2014, 8, 1), 30)\n * //=> Tue Sep 30 2014 00:00:00\n */\nfunction setDate (dirtyDate, dirtyDayOfMonth) {\n var date = parse(dirtyDate)\n var dayOfMonth = Number(dirtyDayOfMonth)\n date.setDate(dayOfMonth)\n return date\n}\n\nmodule.exports = setDate\n","var parse = require('../parse/index.js')\n\n/**\n * @category Common Helpers\n * @summary Return the earliest of the given dates.\n *\n * @description\n * Return the earliest of the given dates.\n *\n * @param {...(Date|String|Number)} dates - the dates to compare\n * @returns {Date} the earliest of the dates\n *\n * @example\n * // Which of these dates is the earliest?\n * var result = min(\n * new Date(1989, 6, 10),\n * new Date(1987, 1, 11),\n * new Date(1995, 6, 2),\n * new Date(1990, 0, 1)\n * )\n * //=> Wed Feb 11 1987 00:00:00\n */\nfunction min () {\n var dirtyDates = Array.prototype.slice.call(arguments)\n var dates = dirtyDates.map(function (dirtyDate) {\n return parse(dirtyDate)\n })\n var earliestTimestamp = Math.min.apply(null, dates)\n return new Date(earliestTimestamp)\n}\n\nmodule.exports = min\n","var parse = require('../parse/index.js')\n\n/**\n * @category Common Helpers\n * @summary Return the latest of the given dates.\n *\n * @description\n * Return the latest of the given dates.\n *\n * @param {...(Date|String|Number)} dates - the dates to compare\n * @returns {Date} the latest of the dates\n *\n * @example\n * // Which of these dates is the latest?\n * var result = max(\n * new Date(1989, 6, 10),\n * new Date(1987, 1, 11),\n * new Date(1995, 6, 2),\n * new Date(1990, 0, 1)\n * )\n * //=> Sun Jul 02 1995 00:00:00\n */\nfunction max () {\n var dirtyDates = Array.prototype.slice.call(arguments)\n var dates = dirtyDates.map(function (dirtyDate) {\n return parse(dirtyDate)\n })\n var latestTimestamp = Math.max.apply(null, dates)\n return new Date(latestTimestamp)\n}\n\nmodule.exports = max\n","var parse = require('../parse/index.js')\n\n/**\n * @category Year Helpers\n * @summary Return the last day of a year for the given date.\n *\n * @description\n * Return the last day of a year for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the last day of a year\n *\n * @example\n * // The last day of a year for 2 September 2014 11:55:00:\n * var result = lastDayOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Dec 31 2014 00:00:00\n */\nfunction lastDayOfYear (dirtyDate) {\n var date = parse(dirtyDate)\n var year = date.getFullYear()\n date.setFullYear(year + 1, 0, 0)\n date.setHours(0, 0, 0, 0)\n return date\n}\n\nmodule.exports = lastDayOfYear\n","var parse = require('../parse/index.js')\n\n/**\n * @category Quarter Helpers\n * @summary Return the last day of a year quarter for the given date.\n *\n * @description\n * Return the last day of a year quarter for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the last day of a quarter\n *\n * @example\n * // The last day of a quarter for 2 September 2014 11:55:00:\n * var result = lastDayOfQuarter(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 00:00:00\n */\nfunction lastDayOfQuarter (dirtyDate) {\n var date = parse(dirtyDate)\n var currentMonth = date.getMonth()\n var month = currentMonth - currentMonth % 3 + 3\n date.setMonth(month, 0)\n date.setHours(0, 0, 0, 0)\n return date\n}\n\nmodule.exports = lastDayOfQuarter\n","var parse = require('../parse/index.js')\n\n/**\n * @category Month Helpers\n * @summary Return the last day of a month for the given date.\n *\n * @description\n * Return the last day of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the last day of a month\n *\n * @example\n * // The last day of a month for 2 September 2014 11:55:00:\n * var result = lastDayOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 00:00:00\n */\nfunction lastDayOfMonth (dirtyDate) {\n var date = parse(dirtyDate)\n var month = date.getMonth()\n date.setFullYear(date.getFullYear(), month + 1, 0)\n date.setHours(0, 0, 0, 0)\n return date\n}\n\nmodule.exports = lastDayOfMonth\n","var getISOYear = require('../get_iso_year/index.js')\nvar startOfISOWeek = require('../start_of_iso_week/index.js')\n\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Return the last day of an ISO week-numbering year for the given date.\n *\n * @description\n * Return the last day of an ISO week-numbering year,\n * which always starts 3 days before the year's first Thursday.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the end of an ISO week-numbering year\n *\n * @example\n * // The last day of an ISO week-numbering year for 2 July 2005:\n * var result = lastDayOfISOYear(new Date(2005, 6, 2))\n * //=> Sun Jan 01 2006 00:00:00\n */\nfunction lastDayOfISOYear (dirtyDate) {\n var year = getISOYear(dirtyDate)\n var fourthOfJanuary = new Date(0)\n fourthOfJanuary.setFullYear(year + 1, 0, 4)\n fourthOfJanuary.setHours(0, 0, 0, 0)\n var date = startOfISOWeek(fourthOfJanuary)\n date.setDate(date.getDate() - 1)\n return date\n}\n\nmodule.exports = lastDayOfISOYear\n","var lastDayOfWeek = require('../last_day_of_week/index.js')\n\n/**\n * @category ISO Week Helpers\n * @summary Return the last day of an ISO week for the given date.\n *\n * @description\n * Return the last day of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the last day of an ISO week\n *\n * @example\n * // The last day of an ISO week for 2 September 2014 11:55:00:\n * var result = lastDayOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Sep 07 2014 00:00:00\n */\nfunction lastDayOfISOWeek (dirtyDate) {\n return lastDayOfWeek(dirtyDate, {weekStartsOn: 1})\n}\n\nmodule.exports = lastDayOfISOWeek\n","var startOfDay = require('../start_of_day/index.js')\n\n/**\n * @category Day Helpers\n * @summary Is the given date yesterday?\n *\n * @description\n * Is the given date yesterday?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is yesterday\n *\n * @example\n * // If today is 6 October 2014, is 5 October 14:00:00 yesterday?\n * var result = isYesterday(new Date(2014, 9, 5, 14, 0))\n * //=> true\n */\nfunction isYesterday (dirtyDate) {\n var yesterday = new Date()\n yesterday.setDate(yesterday.getDate() - 1)\n return startOfDay(dirtyDate).getTime() === startOfDay(yesterday).getTime()\n}\n\nmodule.exports = isYesterday\n","var parse = require('../parse/index.js')\n\n/**\n * @category Range Helpers\n * @summary Is the given date within the range?\n *\n * @description\n * Is the given date within the range?\n *\n * @param {Date|String|Number} date - the date to check\n * @param {Date|String|Number} startDate - the start of range\n * @param {Date|String|Number} endDate - the end of range\n * @returns {Boolean} the date is within the range\n * @throws {Error} startDate cannot be after endDate\n *\n * @example\n * // For the date within the range:\n * isWithinRange(\n * new Date(2014, 0, 3), new Date(2014, 0, 1), new Date(2014, 0, 7)\n * )\n * //=> true\n *\n * @example\n * // For the date outside of the range:\n * isWithinRange(\n * new Date(2014, 0, 10), new Date(2014, 0, 1), new Date(2014, 0, 7)\n * )\n * //=> false\n */\nfunction isWithinRange (dirtyDate, dirtyStartDate, dirtyEndDate) {\n var time = parse(dirtyDate).getTime()\n var startTime = parse(dirtyStartDate).getTime()\n var endTime = parse(dirtyEndDate).getTime()\n\n if (startTime > endTime) {\n throw new Error('The start of the range cannot be after the end of the range')\n }\n\n return time >= startTime && time <= endTime\n}\n\nmodule.exports = isWithinRange\n","var parse = require('../parse/index.js')\n\n/**\n * @category Weekday Helpers\n * @summary Does the given date fall on a weekend?\n *\n * @description\n * Does the given date fall on a weekend?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date falls on a weekend\n *\n * @example\n * // Does 5 October 2014 fall on a weekend?\n * var result = isWeekend(new Date(2014, 9, 5))\n * //=> true\n */\nfunction isWeekend (dirtyDate) {\n var date = parse(dirtyDate)\n var day = date.getDay()\n return day === 0 || day === 6\n}\n\nmodule.exports = isWeekend\n","var parse = require('../parse/index.js')\n\n/**\n * @category Weekday Helpers\n * @summary Is the given date Wednesday?\n *\n * @description\n * Is the given date Wednesday?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is Wednesday\n *\n * @example\n * // Is 24 September 2014 Wednesday?\n * var result = isWednesday(new Date(2014, 8, 24))\n * //=> true\n */\nfunction isWednesday (dirtyDate) {\n return parse(dirtyDate).getDay() === 3\n}\n\nmodule.exports = isWednesday\n","var parse = require('../parse/index.js')\n\n/**\n * @category Weekday Helpers\n * @summary Is the given date Tuesday?\n *\n * @description\n * Is the given date Tuesday?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is Tuesday\n *\n * @example\n * // Is 23 September 2014 Tuesday?\n * var result = isTuesday(new Date(2014, 8, 23))\n * //=> true\n */\nfunction isTuesday (dirtyDate) {\n return parse(dirtyDate).getDay() === 2\n}\n\nmodule.exports = isTuesday\n","var startOfDay = require('../start_of_day/index.js')\n\n/**\n * @category Day Helpers\n * @summary Is the given date tomorrow?\n *\n * @description\n * Is the given date tomorrow?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is tomorrow\n *\n * @example\n * // If today is 6 October 2014, is 7 October 14:00:00 tomorrow?\n * var result = isTomorrow(new Date(2014, 9, 7, 14, 0))\n * //=> true\n */\nfunction isTomorrow (dirtyDate) {\n var tomorrow = new Date()\n tomorrow.setDate(tomorrow.getDate() + 1)\n return startOfDay(dirtyDate).getTime() === startOfDay(tomorrow).getTime()\n}\n\nmodule.exports = isTomorrow\n","var startOfDay = require('../start_of_day/index.js')\n\n/**\n * @category Day Helpers\n * @summary Is the given date today?\n *\n * @description\n * Is the given date today?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is today\n *\n * @example\n * // If today is 6 October 2014, is 6 October 14:00:00 today?\n * var result = isToday(new Date(2014, 9, 6, 14, 0))\n * //=> true\n */\nfunction isToday (dirtyDate) {\n return startOfDay(dirtyDate).getTime() === startOfDay(new Date()).getTime()\n}\n\nmodule.exports = isToday\n","var parse = require('../parse/index.js')\n\n/**\n * @category Weekday Helpers\n * @summary Is the given date Thursday?\n *\n * @description\n * Is the given date Thursday?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is Thursday\n *\n * @example\n * // Is 25 September 2014 Thursday?\n * var result = isThursday(new Date(2014, 8, 25))\n * //=> true\n */\nfunction isThursday (dirtyDate) {\n return parse(dirtyDate).getDay() === 4\n}\n\nmodule.exports = isThursday\n","var isSameYear = require('../is_same_year/index.js')\n\n/**\n * @category Year Helpers\n * @summary Is the given date in the same year as the current date?\n *\n * @description\n * Is the given date in the same year as the current date?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in this year\n *\n * @example\n * // If today is 25 September 2014, is 2 July 2014 in this year?\n * var result = isThisYear(new Date(2014, 6, 2))\n * //=> true\n */\nfunction isThisYear (dirtyDate) {\n return isSameYear(new Date(), dirtyDate)\n}\n\nmodule.exports = isThisYear\n","var isSameWeek = require('../is_same_week/index.js')\n\n/**\n * @category Week Helpers\n * @summary Is the given date in the same week as the current date?\n *\n * @description\n * Is the given date in the same week as the current date?\n *\n * @param {Date|String|Number} date - the date to check\n * @param {Object} [options] - the object with options\n * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Boolean} the date is in this week\n *\n * @example\n * // If today is 25 September 2014, is 21 September 2014 in this week?\n * var result = isThisWeek(new Date(2014, 8, 21))\n * //=> true\n *\n * @example\n * // If today is 25 September 2014 and week starts with Monday\n * // is 21 September 2014 in this week?\n * var result = isThisWeek(new Date(2014, 8, 21), {weekStartsOn: 1})\n * //=> false\n */\nfunction isThisWeek (dirtyDate, dirtyOptions) {\n return isSameWeek(new Date(), dirtyDate, dirtyOptions)\n}\n\nmodule.exports = isThisWeek\n","var isSameSecond = require('../is_same_second/index.js')\n\n/**\n * @category Second Helpers\n * @summary Is the given date in the same second as the current date?\n *\n * @description\n * Is the given date in the same second as the current date?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in this second\n *\n * @example\n * // If now is 25 September 2014 18:30:15.500,\n * // is 25 September 2014 18:30:15.000 in this second?\n * var result = isThisSecond(new Date(2014, 8, 25, 18, 30, 15))\n * //=> true\n */\nfunction isThisSecond (dirtyDate) {\n return isSameSecond(new Date(), dirtyDate)\n}\n\nmodule.exports = isThisSecond\n","var isSameQuarter = require('../is_same_quarter/index.js')\n\n/**\n * @category Quarter Helpers\n * @summary Is the given date in the same quarter as the current date?\n *\n * @description\n * Is the given date in the same quarter as the current date?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in this quarter\n *\n * @example\n * // If today is 25 September 2014, is 2 July 2014 in this quarter?\n * var result = isThisQuarter(new Date(2014, 6, 2))\n * //=> true\n */\nfunction isThisQuarter (dirtyDate) {\n return isSameQuarter(new Date(), dirtyDate)\n}\n\nmodule.exports = isThisQuarter\n","var isSameMonth = require('../is_same_month/index.js')\n\n/**\n * @category Month Helpers\n * @summary Is the given date in the same month as the current date?\n *\n * @description\n * Is the given date in the same month as the current date?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in this month\n *\n * @example\n * // If today is 25 September 2014, is 15 September 2014 in this month?\n * var result = isThisMonth(new Date(2014, 8, 15))\n * //=> true\n */\nfunction isThisMonth (dirtyDate) {\n return isSameMonth(new Date(), dirtyDate)\n}\n\nmodule.exports = isThisMonth\n","var isSameMinute = require('../is_same_minute/index.js')\n\n/**\n * @category Minute Helpers\n * @summary Is the given date in the same minute as the current date?\n *\n * @description\n * Is the given date in the same minute as the current date?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in this minute\n *\n * @example\n * // If now is 25 September 2014 18:30:15.500,\n * // is 25 September 2014 18:30:00 in this minute?\n * var result = isThisMinute(new Date(2014, 8, 25, 18, 30))\n * //=> true\n */\nfunction isThisMinute (dirtyDate) {\n return isSameMinute(new Date(), dirtyDate)\n}\n\nmodule.exports = isThisMinute\n","var isSameISOYear = require('../is_same_iso_year/index.js')\n\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Is the given date in the same ISO week-numbering year as the current date?\n *\n * @description\n * Is the given date in the same ISO week-numbering year as the current date?\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in this ISO week-numbering year\n *\n * @example\n * // If today is 25 September 2014,\n * // is 30 December 2013 in this ISO week-numbering year?\n * var result = isThisISOYear(new Date(2013, 11, 30))\n * //=> true\n */\nfunction isThisISOYear (dirtyDate) {\n return isSameISOYear(new Date(), dirtyDate)\n}\n\nmodule.exports = isThisISOYear\n","var isSameISOWeek = require('../is_same_iso_week/index.js')\n\n/**\n * @category ISO Week Helpers\n * @summary Is the given date in the same ISO week as the current date?\n *\n * @description\n * Is the given date in the same ISO week as the current date?\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in this ISO week\n *\n * @example\n * // If today is 25 September 2014, is 22 September 2014 in this ISO week?\n * var result = isThisISOWeek(new Date(2014, 8, 22))\n * //=> true\n */\nfunction isThisISOWeek (dirtyDate) {\n return isSameISOWeek(new Date(), dirtyDate)\n}\n\nmodule.exports = isThisISOWeek\n","var isSameHour = require('../is_same_hour/index.js')\n\n/**\n * @category Hour Helpers\n * @summary Is the given date in the same hour as the current date?\n *\n * @description\n * Is the given date in the same hour as the current date?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in this hour\n *\n * @example\n * // If now is 25 September 2014 18:30:15.500,\n * // is 25 September 2014 18:00:00 in this hour?\n * var result = isThisHour(new Date(2014, 8, 25, 18))\n * //=> true\n */\nfunction isThisHour (dirtyDate) {\n return isSameHour(new Date(), dirtyDate)\n}\n\nmodule.exports = isThisHour\n","var parse = require('../parse/index.js')\n\n/**\n * @category Weekday Helpers\n * @summary Is the given date Sunday?\n *\n * @description\n * Is the given date Sunday?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is Sunday\n *\n * @example\n * // Is 21 September 2014 Sunday?\n * var result = isSunday(new Date(2014, 8, 21))\n * //=> true\n */\nfunction isSunday (dirtyDate) {\n return parse(dirtyDate).getDay() === 0\n}\n\nmodule.exports = isSunday\n","var parse = require('../parse/index.js')\n\n/**\n * @category Weekday Helpers\n * @summary Is the given date Saturday?\n *\n * @description\n * Is the given date Saturday?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is Saturday\n *\n * @example\n * // Is 27 September 2014 Saturday?\n * var result = isSaturday(new Date(2014, 8, 27))\n * //=> true\n */\nfunction isSaturday (dirtyDate) {\n return parse(dirtyDate).getDay() === 6\n}\n\nmodule.exports = isSaturday\n","var startOfDay = require('../start_of_day/index.js')\n\n/**\n * @category Day Helpers\n * @summary Are the given dates in the same day?\n *\n * @description\n * Are the given dates in the same day?\n *\n * @param {Date|String|Number} dateLeft - the first date to check\n * @param {Date|String|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same day\n *\n * @example\n * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?\n * var result = isSameDay(\n * new Date(2014, 8, 4, 6, 0),\n * new Date(2014, 8, 4, 18, 0)\n * )\n * //=> true\n */\nfunction isSameDay (dirtyDateLeft, dirtyDateRight) {\n var dateLeftStartOfDay = startOfDay(dirtyDateLeft)\n var dateRightStartOfDay = startOfDay(dirtyDateRight)\n\n return dateLeftStartOfDay.getTime() === dateRightStartOfDay.getTime()\n}\n\nmodule.exports = isSameDay\n","var parse = require('../parse/index.js')\n\n/**\n * @category Common Helpers\n * @summary Is the given date in the past?\n *\n * @description\n * Is the given date in the past?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in the past\n *\n * @example\n * // If today is 6 October 2014, is 2 July 2014 in the past?\n * var result = isPast(new Date(2014, 6, 2))\n * //=> true\n */\nfunction isPast (dirtyDate) {\n return parse(dirtyDate).getTime() < new Date().getTime()\n}\n\nmodule.exports = isPast\n","var parse = require('../parse/index.js')\n\n/**\n * @category Weekday Helpers\n * @summary Is the given date Monday?\n *\n * @description\n * Is the given date Monday?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is Monday\n *\n * @example\n * // Is 22 September 2014 Monday?\n * var result = isMonday(new Date(2014, 8, 22))\n * //=> true\n */\nfunction isMonday (dirtyDate) {\n return parse(dirtyDate).getDay() === 1\n}\n\nmodule.exports = isMonday\n","var parse = require('../parse/index.js')\nvar endOfDay = require('../end_of_day/index.js')\nvar endOfMonth = require('../end_of_month/index.js')\n\n/**\n * @category Month Helpers\n * @summary Is the given date the last day of a month?\n *\n * @description\n * Is the given date the last day of a month?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is the last day of a month\n *\n * @example\n * // Is 28 February 2014 the last day of a month?\n * var result = isLastDayOfMonth(new Date(2014, 1, 28))\n * //=> true\n */\nfunction isLastDayOfMonth (dirtyDate) {\n var date = parse(dirtyDate)\n return endOfDay(date).getTime() === endOfMonth(date).getTime()\n}\n\nmodule.exports = isLastDayOfMonth\n","var parse = require('../parse/index.js')\n\n/**\n * @category Common Helpers\n * @summary Is the given date in the future?\n *\n * @description\n * Is the given date in the future?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is in the future\n *\n * @example\n * // If today is 6 October 2014, is 31 December 2014 in the future?\n * var result = isFuture(new Date(2014, 11, 31))\n * //=> true\n */\nfunction isFuture (dirtyDate) {\n return parse(dirtyDate).getTime() > new Date().getTime()\n}\n\nmodule.exports = isFuture\n","var parse = require('../parse/index.js')\n\n/**\n * @category Weekday Helpers\n * @summary Is the given date Friday?\n *\n * @description\n * Is the given date Friday?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is Friday\n *\n * @example\n * // Is 26 September 2014 Friday?\n * var result = isFriday(new Date(2014, 8, 26))\n * //=> true\n */\nfunction isFriday (dirtyDate) {\n return parse(dirtyDate).getDay() === 5\n}\n\nmodule.exports = isFriday\n","var parse = require('../parse/index.js')\n\n/**\n * @category Month Helpers\n * @summary Is the given date the first day of a month?\n *\n * @description\n * Is the given date the first day of a month?\n *\n * @param {Date|String|Number} date - the date to check\n * @returns {Boolean} the date is the first day of a month\n *\n * @example\n * // Is 1 September 2014 the first day of a month?\n * var result = isFirstDayOfMonth(new Date(2014, 8, 1))\n * //=> true\n */\nfunction isFirstDayOfMonth (dirtyDate) {\n return parse(dirtyDate).getDate() === 1\n}\n\nmodule.exports = isFirstDayOfMonth\n","var parse = require('../parse/index.js')\n\n/**\n * @category Common Helpers\n * @summary Are the given dates equal?\n *\n * @description\n * Are the given dates equal?\n *\n * @param {Date|String|Number} dateLeft - the first date to compare\n * @param {Date|String|Number} dateRight - the second date to compare\n * @returns {Boolean} the dates are equal\n *\n * @example\n * // Are 2 July 2014 06:30:45.000 and 2 July 2014 06:30:45.500 equal?\n * var result = isEqual(\n * new Date(2014, 6, 2, 6, 30, 45, 0)\n * new Date(2014, 6, 2, 6, 30, 45, 500)\n * )\n * //=> false\n */\nfunction isEqual (dirtyLeftDate, dirtyRightDate) {\n var dateLeft = parse(dirtyLeftDate)\n var dateRight = parse(dirtyRightDate)\n return dateLeft.getTime() === dateRight.getTime()\n}\n\nmodule.exports = isEqual\n","var parse = require('../parse/index.js')\n\n/**\n * @category Common Helpers\n * @summary Is the first date before the second one?\n *\n * @description\n * Is the first date before the second one?\n *\n * @param {Date|String|Number} date - the date that should be before the other one to return true\n * @param {Date|String|Number} dateToCompare - the date to compare with\n * @returns {Boolean} the first date is before the second date\n *\n * @example\n * // Is 10 July 1989 before 11 February 1987?\n * var result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> false\n */\nfunction isBefore (dirtyDate, dirtyDateToCompare) {\n var date = parse(dirtyDate)\n var dateToCompare = parse(dirtyDateToCompare)\n return date.getTime() < dateToCompare.getTime()\n}\n\nmodule.exports = isBefore\n","var parse = require('../parse/index.js')\n\n/**\n * @category Common Helpers\n * @summary Is the first date after the second one?\n *\n * @description\n * Is the first date after the second one?\n *\n * @param {Date|String|Number} date - the date that should be after the other one to return true\n * @param {Date|String|Number} dateToCompare - the date to compare with\n * @returns {Boolean} the first date is after the second date\n *\n * @example\n * // Is 10 July 1989 after 11 February 1987?\n * var result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> true\n */\nfunction isAfter (dirtyDate, dirtyDateToCompare) {\n var date = parse(dirtyDate)\n var dateToCompare = parse(dirtyDateToCompare)\n return date.getTime() > dateToCompare.getTime()\n}\n\nmodule.exports = isAfter\n","var parse = require('../parse/index.js')\n\n/**\n * @category Year Helpers\n * @summary Get the year of the given date.\n *\n * @description\n * Get the year of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the year\n *\n * @example\n * // Which year is 2 July 2014?\n * var result = getYear(new Date(2014, 6, 2))\n * //=> 2014\n */\nfunction getYear (dirtyDate) {\n var date = parse(dirtyDate)\n var year = date.getFullYear()\n return year\n}\n\nmodule.exports = getYear\n","var parse = require('../parse/index.js')\n\n/**\n * @category Timestamp Helpers\n * @summary Get the milliseconds timestamp of the given date.\n *\n * @description\n * Get the milliseconds timestamp of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the timestamp\n *\n * @example\n * // Get the timestamp of 29 February 2012 11:45:05.123:\n * var result = getTime(new Date(2012, 1, 29, 11, 45, 5, 123))\n * //=> 1330515905123\n */\nfunction getTime (dirtyDate) {\n var date = parse(dirtyDate)\n var timestamp = date.getTime()\n return timestamp\n}\n\nmodule.exports = getTime\n","var parse = require('../parse/index.js')\n\n/**\n * @category Second Helpers\n * @summary Get the seconds of the given date.\n *\n * @description\n * Get the seconds of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the seconds\n *\n * @example\n * // Get the seconds of 29 February 2012 11:45:05.123:\n * var result = getSeconds(new Date(2012, 1, 29, 11, 45, 5, 123))\n * //=> 5\n */\nfunction getSeconds (dirtyDate) {\n var date = parse(dirtyDate)\n var seconds = date.getSeconds()\n return seconds\n}\n\nmodule.exports = getSeconds\n","var parse = require('../parse/index.js')\n\nvar MILLISECONDS_IN_DAY = 24 * 60 * 60 * 1000\n\n/**\n * @category Range Helpers\n * @summary Get the number of days that overlap in two date ranges\n *\n * @description\n * Get the number of days that overlap in two date ranges\n *\n * @param {Date|String|Number} initialRangeStartDate - the start of the initial range\n * @param {Date|String|Number} initialRangeEndDate - the end of the initial range\n * @param {Date|String|Number} comparedRangeStartDate - the start of the range to compare it with\n * @param {Date|String|Number} comparedRangeEndDate - the end of the range to compare it with\n * @returns {Number} the number of days that overlap in two date ranges\n * @throws {Error} startDate of a date range cannot be after its endDate\n *\n * @example\n * // For overlapping date ranges adds 1 for each started overlapping day:\n * getOverlappingDaysInRanges(\n * new Date(2014, 0, 10), new Date(2014, 0, 20), new Date(2014, 0, 17), new Date(2014, 0, 21)\n * )\n * //=> 3\n *\n * @example\n * // For non-overlapping date ranges returns 0:\n * getOverlappingDaysInRanges(\n * new Date(2014, 0, 10), new Date(2014, 0, 20), new Date(2014, 0, 21), new Date(2014, 0, 22)\n * )\n * //=> 0\n */\nfunction getOverlappingDaysInRanges (dirtyInitialRangeStartDate, dirtyInitialRangeEndDate, dirtyComparedRangeStartDate, dirtyComparedRangeEndDate) {\n var initialStartTime = parse(dirtyInitialRangeStartDate).getTime()\n var initialEndTime = parse(dirtyInitialRangeEndDate).getTime()\n var comparedStartTime = parse(dirtyComparedRangeStartDate).getTime()\n var comparedEndTime = parse(dirtyComparedRangeEndDate).getTime()\n\n if (initialStartTime > initialEndTime || comparedStartTime > comparedEndTime) {\n throw new Error('The start of the range cannot be after the end of the range')\n }\n\n var isOverlapping = initialStartTime < comparedEndTime && comparedStartTime < initialEndTime\n\n if (!isOverlapping) {\n return 0\n }\n\n var overlapStartDate = comparedStartTime < initialStartTime\n ? initialStartTime\n : comparedStartTime\n\n var overlapEndDate = comparedEndTime > initialEndTime\n ? initialEndTime\n : comparedEndTime\n\n var differenceInMs = overlapEndDate - overlapStartDate\n\n return Math.ceil(differenceInMs / MILLISECONDS_IN_DAY)\n}\n\nmodule.exports = getOverlappingDaysInRanges\n","var parse = require('../parse/index.js')\n\n/**\n * @category Month Helpers\n * @summary Get the month of the given date.\n *\n * @description\n * Get the month of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the month\n *\n * @example\n * // Which month is 29 February 2012?\n * var result = getMonth(new Date(2012, 1, 29))\n * //=> 1\n */\nfunction getMonth (dirtyDate) {\n var date = parse(dirtyDate)\n var month = date.getMonth()\n return month\n}\n\nmodule.exports = getMonth\n","var parse = require('../parse/index.js')\n\n/**\n * @category Minute Helpers\n * @summary Get the minutes of the given date.\n *\n * @description\n * Get the minutes of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the minutes\n *\n * @example\n * // Get the minutes of 29 February 2012 11:45:05:\n * var result = getMinutes(new Date(2012, 1, 29, 11, 45, 5))\n * //=> 45\n */\nfunction getMinutes (dirtyDate) {\n var date = parse(dirtyDate)\n var minutes = date.getMinutes()\n return minutes\n}\n\nmodule.exports = getMinutes\n","var parse = require('../parse/index.js')\n\n/**\n * @category Millisecond Helpers\n * @summary Get the milliseconds of the given date.\n *\n * @description\n * Get the milliseconds of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the milliseconds\n *\n * @example\n * // Get the milliseconds of 29 February 2012 11:45:05.123:\n * var result = getMilliseconds(new Date(2012, 1, 29, 11, 45, 5, 123))\n * //=> 123\n */\nfunction getMilliseconds (dirtyDate) {\n var date = parse(dirtyDate)\n var milliseconds = date.getMilliseconds()\n return milliseconds\n}\n\nmodule.exports = getMilliseconds\n","var startOfISOYear = require('../start_of_iso_year/index.js')\nvar addWeeks = require('../add_weeks/index.js')\n\nvar MILLISECONDS_IN_WEEK = 604800000\n\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the number of weeks in an ISO week-numbering year of the given date.\n *\n * @description\n * Get the number of weeks in an ISO week-numbering year of the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the number of ISO weeks in a year\n *\n * @example\n * // How many weeks are in ISO week-numbering year 2015?\n * var result = getISOWeeksInYear(new Date(2015, 1, 11))\n * //=> 53\n */\nfunction getISOWeeksInYear (dirtyDate) {\n var thisYear = startOfISOYear(dirtyDate)\n var nextYear = startOfISOYear(addWeeks(thisYear, 60))\n var diff = nextYear.valueOf() - thisYear.valueOf()\n // Round the number of weeks to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n return Math.round(diff / MILLISECONDS_IN_WEEK)\n}\n\nmodule.exports = getISOWeeksInYear\n","var parse = require('../parse/index.js')\n\n/**\n * @category Hour Helpers\n * @summary Get the hours of the given date.\n *\n * @description\n * Get the hours of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the hours\n *\n * @example\n * // Get the hours of 29 February 2012 11:45:00:\n * var result = getHours(new Date(2012, 1, 29, 11, 45))\n * //=> 11\n */\nfunction getHours (dirtyDate) {\n var date = parse(dirtyDate)\n var hours = date.getHours()\n return hours\n}\n\nmodule.exports = getHours\n","var isLeapYear = require('../is_leap_year/index.js')\n\n/**\n * @category Year Helpers\n * @summary Get the number of days in a year of the given date.\n *\n * @description\n * Get the number of days in a year of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the number of days in a year\n *\n * @example\n * // How many days are in 2012?\n * var result = getDaysInYear(new Date(2012, 0, 1))\n * //=> 366\n */\nfunction getDaysInYear (dirtyDate) {\n return isLeapYear(dirtyDate) ? 366 : 365\n}\n\nmodule.exports = getDaysInYear\n","var parse = require('../parse/index.js')\n\n/**\n * @category Weekday Helpers\n * @summary Get the day of the week of the given date.\n *\n * @description\n * Get the day of the week of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the day of week\n *\n * @example\n * // Which day of the week is 29 February 2012?\n * var result = getDay(new Date(2012, 1, 29))\n * //=> 3\n */\nfunction getDay (dirtyDate) {\n var date = parse(dirtyDate)\n var day = date.getDay()\n return day\n}\n\nmodule.exports = getDay\n","var parse = require('../parse/index.js')\n\n/**\n * @category Day Helpers\n * @summary Get the day of the month of the given date.\n *\n * @description\n * Get the day of the month of the given date.\n *\n * @param {Date|String|Number} date - the given date\n * @returns {Number} the day of month\n *\n * @example\n * // Which day of the month is 29 February 2012?\n * var result = getDate(new Date(2012, 1, 29))\n * //=> 29\n */\nfunction getDate (dirtyDate) {\n var date = parse(dirtyDate)\n var dayOfMonth = date.getDate()\n return dayOfMonth\n}\n\nmodule.exports = getDate\n","var getDayOfYear = require('../get_day_of_year/index.js')\nvar getISOWeek = require('../get_iso_week/index.js')\nvar getISOYear = require('../get_iso_year/index.js')\nvar parse = require('../parse/index.js')\nvar isValid = require('../is_valid/index.js')\nvar enLocale = require('../locale/en/index.js')\n\n/**\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format.\n *\n * Accepted tokens:\n * | Unit | Token | Result examples |\n * |-------------------------|-------|----------------------------------|\n * | Month | M | 1, 2, ..., 12 |\n * | | Mo | 1st, 2nd, ..., 12th |\n * | | MM | 01, 02, ..., 12 |\n * | | MMM | Jan, Feb, ..., Dec |\n * | | MMMM | January, February, ..., December |\n * | Quarter | Q | 1, 2, 3, 4 |\n * | | Qo | 1st, 2nd, 3rd, 4th |\n * | Day of month | D | 1, 2, ..., 31 |\n * | | Do | 1st, 2nd, ..., 31st |\n * | | DD | 01, 02, ..., 31 |\n * | Day of year | DDD | 1, 2, ..., 366 |\n * | | DDDo | 1st, 2nd, ..., 366th |\n * | | DDDD | 001, 002, ..., 366 |\n * | Day of week | d | 0, 1, ..., 6 |\n * | | do | 0th, 1st, ..., 6th |\n * | | dd | Su, Mo, ..., Sa |\n * | | ddd | Sun, Mon, ..., Sat |\n * | | dddd | Sunday, Monday, ..., Saturday |\n * | Day of ISO week | E | 1, 2, ..., 7 |\n * | ISO week | W | 1, 2, ..., 53 |\n * | | Wo | 1st, 2nd, ..., 53rd |\n * | | WW | 01, 02, ..., 53 |\n * | Year | YY | 00, 01, ..., 99 |\n * | | YYYY | 1900, 1901, ..., 2099 |\n * | ISO week-numbering year | GG | 00, 01, ..., 99 |\n * | | GGGG | 1900, 1901, ..., 2099 |\n * | AM/PM | A | AM, PM |\n * | | a | am, pm |\n * | | aa | a.m., p.m. |\n * | Hour | H | 0, 1, ... 23 |\n * | | HH | 00, 01, ... 23 |\n * | | h | 1, 2, ..., 12 |\n * | | hh | 01, 02, ..., 12 |\n * | Minute | m | 0, 1, ..., 59 |\n * | | mm | 00, 01, ..., 59 |\n * | Second | s | 0, 1, ..., 59 |\n * | | ss | 00, 01, ..., 59 |\n * | 1/10 of second | S | 0, 1, ..., 9 |\n * | 1/100 of second | SS | 00, 01, ..., 99 |\n * | Millisecond | SSS | 000, 001, ..., 999 |\n * | Timezone | Z | -01:00, +00:00, ... +12:00 |\n * | | ZZ | -0100, +0000, ..., +1200 |\n * | Seconds timestamp | X | 512969520 |\n * | Milliseconds timestamp | x | 512969520900 |\n *\n * The characters wrapped in square brackets are escaped.\n *\n * The result may vary by locale.\n *\n * @param {Date|String|Number} date - the original date\n * @param {String} [format='YYYY-MM-DDTHH:mm:ss.SSSZ'] - the string of tokens\n * @param {Object} [options] - the object with options\n * @param {Object} [options.locale=enLocale] - the locale object\n * @returns {String} the formatted date string\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * var result = format(\n * new Date(2014, 1, 11),\n * 'MM/DD/YYYY'\n * )\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * var eoLocale = require('date-fns/locale/eo')\n * var result = format(\n * new Date(2014, 6, 2),\n * 'Do [de] MMMM YYYY',\n * {locale: eoLocale}\n * )\n * //=> '2-a de julio 2014'\n */\nfunction format (dirtyDate, dirtyFormatStr, dirtyOptions) {\n var formatStr = dirtyFormatStr ? String(dirtyFormatStr) : 'YYYY-MM-DDTHH:mm:ss.SSSZ'\n var options = dirtyOptions || {}\n\n var locale = options.locale\n var localeFormatters = enLocale.format.formatters\n var formattingTokensRegExp = enLocale.format.formattingTokensRegExp\n if (locale && locale.format && locale.format.formatters) {\n localeFormatters = locale.format.formatters\n\n if (locale.format.formattingTokensRegExp) {\n formattingTokensRegExp = locale.format.formattingTokensRegExp\n }\n }\n\n var date = parse(dirtyDate)\n\n if (!isValid(date)) {\n return 'Invalid Date'\n }\n\n var formatFn = buildFormatFn(formatStr, localeFormatters, formattingTokensRegExp)\n\n return formatFn(date)\n}\n\nvar formatters = {\n // Month: 1, 2, ..., 12\n 'M': function (date) {\n return date.getMonth() + 1\n },\n\n // Month: 01, 02, ..., 12\n 'MM': function (date) {\n return addLeadingZeros(date.getMonth() + 1, 2)\n },\n\n // Quarter: 1, 2, 3, 4\n 'Q': function (date) {\n return Math.ceil((date.getMonth() + 1) / 3)\n },\n\n // Day of month: 1, 2, ..., 31\n 'D': function (date) {\n return date.getDate()\n },\n\n // Day of month: 01, 02, ..., 31\n 'DD': function (date) {\n return addLeadingZeros(date.getDate(), 2)\n },\n\n // Day of year: 1, 2, ..., 366\n 'DDD': function (date) {\n return getDayOfYear(date)\n },\n\n // Day of year: 001, 002, ..., 366\n 'DDDD': function (date) {\n return addLeadingZeros(getDayOfYear(date), 3)\n },\n\n // Day of week: 0, 1, ..., 6\n 'd': function (date) {\n return date.getDay()\n },\n\n // Day of ISO week: 1, 2, ..., 7\n 'E': function (date) {\n return date.getDay() || 7\n },\n\n // ISO week: 1, 2, ..., 53\n 'W': function (date) {\n return getISOWeek(date)\n },\n\n // ISO week: 01, 02, ..., 53\n 'WW': function (date) {\n return addLeadingZeros(getISOWeek(date), 2)\n },\n\n // Year: 00, 01, ..., 99\n 'YY': function (date) {\n return addLeadingZeros(date.getFullYear(), 4).substr(2)\n },\n\n // Year: 1900, 1901, ..., 2099\n 'YYYY': function (date) {\n return addLeadingZeros(date.getFullYear(), 4)\n },\n\n // ISO week-numbering year: 00, 01, ..., 99\n 'GG': function (date) {\n return String(getISOYear(date)).substr(2)\n },\n\n // ISO week-numbering year: 1900, 1901, ..., 2099\n 'GGGG': function (date) {\n return getISOYear(date)\n },\n\n // Hour: 0, 1, ... 23\n 'H': function (date) {\n return date.getHours()\n },\n\n // Hour: 00, 01, ..., 23\n 'HH': function (date) {\n return addLeadingZeros(date.getHours(), 2)\n },\n\n // Hour: 1, 2, ..., 12\n 'h': function (date) {\n var hours = date.getHours()\n if (hours === 0) {\n return 12\n } else if (hours > 12) {\n return hours % 12\n } else {\n return hours\n }\n },\n\n // Hour: 01, 02, ..., 12\n 'hh': function (date) {\n return addLeadingZeros(formatters['h'](date), 2)\n },\n\n // Minute: 0, 1, ..., 59\n 'm': function (date) {\n return date.getMinutes()\n },\n\n // Minute: 00, 01, ..., 59\n 'mm': function (date) {\n return addLeadingZeros(date.getMinutes(), 2)\n },\n\n // Second: 0, 1, ..., 59\n 's': function (date) {\n return date.getSeconds()\n },\n\n // Second: 00, 01, ..., 59\n 'ss': function (date) {\n return addLeadingZeros(date.getSeconds(), 2)\n },\n\n // 1/10 of second: 0, 1, ..., 9\n 'S': function (date) {\n return Math.floor(date.getMilliseconds() / 100)\n },\n\n // 1/100 of second: 00, 01, ..., 99\n 'SS': function (date) {\n return addLeadingZeros(Math.floor(date.getMilliseconds() / 10), 2)\n },\n\n // Millisecond: 000, 001, ..., 999\n 'SSS': function (date) {\n return addLeadingZeros(date.getMilliseconds(), 3)\n },\n\n // Timezone: -01:00, +00:00, ... +12:00\n 'Z': function (date) {\n return formatTimezone(date.getTimezoneOffset(), ':')\n },\n\n // Timezone: -0100, +0000, ... +1200\n 'ZZ': function (date) {\n return formatTimezone(date.getTimezoneOffset())\n },\n\n // Seconds timestamp: 512969520\n 'X': function (date) {\n return Math.floor(date.getTime() / 1000)\n },\n\n // Milliseconds timestamp: 512969520900\n 'x': function (date) {\n return date.getTime()\n }\n}\n\nfunction buildFormatFn (formatStr, localeFormatters, formattingTokensRegExp) {\n var array = formatStr.match(formattingTokensRegExp)\n var length = array.length\n\n var i\n var formatter\n for (i = 0; i < length; i++) {\n formatter = localeFormatters[array[i]] || formatters[array[i]]\n if (formatter) {\n array[i] = formatter\n } else {\n array[i] = removeFormattingTokens(array[i])\n }\n }\n\n return function (date) {\n var output = ''\n for (var i = 0; i < length; i++) {\n if (array[i] instanceof Function) {\n output += array[i](date, formatters)\n } else {\n output += array[i]\n }\n }\n return output\n }\n}\n\nfunction removeFormattingTokens (input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|]$/g, '')\n }\n return input.replace(/\\\\/g, '')\n}\n\nfunction formatTimezone (offset, delimeter) {\n delimeter = delimeter || ''\n var sign = offset > 0 ? '-' : '+'\n var absOffset = Math.abs(offset)\n var hours = Math.floor(absOffset / 60)\n var minutes = absOffset % 60\n return sign + addLeadingZeros(hours, 2) + delimeter + addLeadingZeros(minutes, 2)\n}\n\nfunction addLeadingZeros (number, targetLength) {\n var output = Math.abs(number).toString()\n while (output.length < targetLength) {\n output = '0' + output\n }\n return output\n}\n\nmodule.exports = format\n","/**\n * @category Day Helpers\n * @summary Return the end of yesterday.\n *\n * @description\n * Return the end of yesterday.\n *\n * @returns {Date} the end of yesterday\n *\n * @example\n * // If today is 6 October 2014:\n * var result = endOfYesterday()\n * //=> Sun Oct 5 2014 23:59:59.999\n */\nfunction endOfYesterday () {\n var now = new Date()\n var year = now.getFullYear()\n var month = now.getMonth()\n var day = now.getDate()\n\n var date = new Date(0)\n date.setFullYear(year, month, day - 1)\n date.setHours(23, 59, 59, 999)\n return date\n}\n\nmodule.exports = endOfYesterday\n","var parse = require('../parse/index.js')\n\n/**\n * @category Year Helpers\n * @summary Return the end of a year for the given date.\n *\n * @description\n * Return the end of a year for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the end of a year\n *\n * @example\n * // The end of a year for 2 September 2014 11:55:00:\n * var result = endOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Dec 31 2014 23:59:59.999\n */\nfunction endOfYear (dirtyDate) {\n var date = parse(dirtyDate)\n var year = date.getFullYear()\n date.setFullYear(year + 1, 0, 0)\n date.setHours(23, 59, 59, 999)\n return date\n}\n\nmodule.exports = endOfYear\n","/**\n * @category Day Helpers\n * @summary Return the end of tomorrow.\n *\n * @description\n * Return the end of tomorrow.\n *\n * @returns {Date} the end of tomorrow\n *\n * @example\n * // If today is 6 October 2014:\n * var result = endOfTomorrow()\n * //=> Tue Oct 7 2014 23:59:59.999\n */\nfunction endOfTomorrow () {\n var now = new Date()\n var year = now.getFullYear()\n var month = now.getMonth()\n var day = now.getDate()\n\n var date = new Date(0)\n date.setFullYear(year, month, day + 1)\n date.setHours(23, 59, 59, 999)\n return date\n}\n\nmodule.exports = endOfTomorrow\n","var endOfDay = require('../end_of_day/index.js')\n\n/**\n * @category Day Helpers\n * @summary Return the end of today.\n *\n * @description\n * Return the end of today.\n *\n * @returns {Date} the end of today\n *\n * @example\n * // If today is 6 October 2014:\n * var result = endOfToday()\n * //=> Mon Oct 6 2014 23:59:59.999\n */\nfunction endOfToday () {\n return endOfDay(new Date())\n}\n\nmodule.exports = endOfToday\n","var parse = require('../parse/index.js')\n\n/**\n * @category Second Helpers\n * @summary Return the end of a second for the given date.\n *\n * @description\n * Return the end of a second for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the end of a second\n *\n * @example\n * // The end of a second for 1 December 2014 22:15:45.400:\n * var result = endOfSecond(new Date(2014, 11, 1, 22, 15, 45, 400))\n * //=> Mon Dec 01 2014 22:15:45.999\n */\nfunction endOfSecond (dirtyDate) {\n var date = parse(dirtyDate)\n date.setMilliseconds(999)\n return date\n}\n\nmodule.exports = endOfSecond\n","var parse = require('../parse/index.js')\n\n/**\n * @category Quarter Helpers\n * @summary Return the end of a year quarter for the given date.\n *\n * @description\n * Return the end of a year quarter for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the end of a quarter\n *\n * @example\n * // The end of a quarter for 2 September 2014 11:55:00:\n * var result = endOfQuarter(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nfunction endOfQuarter (dirtyDate) {\n var date = parse(dirtyDate)\n var currentMonth = date.getMonth()\n var month = currentMonth - currentMonth % 3 + 3\n date.setMonth(month, 0)\n date.setHours(23, 59, 59, 999)\n return date\n}\n\nmodule.exports = endOfQuarter\n","var parse = require('../parse/index.js')\n\n/**\n * @category Minute Helpers\n * @summary Return the end of a minute for the given date.\n *\n * @description\n * Return the end of a minute for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the end of a minute\n *\n * @example\n * // The end of a minute for 1 December 2014 22:15:45.400:\n * var result = endOfMinute(new Date(2014, 11, 1, 22, 15, 45, 400))\n * //=> Mon Dec 01 2014 22:15:59.999\n */\nfunction endOfMinute (dirtyDate) {\n var date = parse(dirtyDate)\n date.setSeconds(59, 999)\n return date\n}\n\nmodule.exports = endOfMinute\n","var getISOYear = require('../get_iso_year/index.js')\nvar startOfISOWeek = require('../start_of_iso_week/index.js')\n\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Return the end of an ISO week-numbering year for the given date.\n *\n * @description\n * Return the end of an ISO week-numbering year,\n * which always starts 3 days before the year's first Thursday.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the end of an ISO week-numbering year\n *\n * @example\n * // The end of an ISO week-numbering year for 2 July 2005:\n * var result = endOfISOYear(new Date(2005, 6, 2))\n * //=> Sun Jan 01 2006 23:59:59.999\n */\nfunction endOfISOYear (dirtyDate) {\n var year = getISOYear(dirtyDate)\n var fourthOfJanuaryOfNextYear = new Date(0)\n fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4)\n fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0)\n var date = startOfISOWeek(fourthOfJanuaryOfNextYear)\n date.setMilliseconds(date.getMilliseconds() - 1)\n return date\n}\n\nmodule.exports = endOfISOYear\n","var endOfWeek = require('../end_of_week/index.js')\n\n/**\n * @category ISO Week Helpers\n * @summary Return the end of an ISO week for the given date.\n *\n * @description\n * Return the end of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the end of an ISO week\n *\n * @example\n * // The end of an ISO week for 2 September 2014 11:55:00:\n * var result = endOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Sep 07 2014 23:59:59.999\n */\nfunction endOfISOWeek (dirtyDate) {\n return endOfWeek(dirtyDate, {weekStartsOn: 1})\n}\n\nmodule.exports = endOfISOWeek\n","var parse = require('../parse/index.js')\n\n/**\n * @category Hour Helpers\n * @summary Return the end of an hour for the given date.\n *\n * @description\n * Return the end of an hour for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|String|Number} date - the original date\n * @returns {Date} the end of an hour\n *\n * @example\n * // The end of an hour for 2 September 2014 11:55:00:\n * var result = endOfHour(new Date(2014, 8, 2, 11, 55))\n * //=> Tue Sep 02 2014 11:59:59.999\n */\nfunction endOfHour (dirtyDate) {\n var date = parse(dirtyDate)\n date.setMinutes(59, 59, 999)\n return date\n}\n\nmodule.exports = endOfHour\n","var parse = require('../parse/index.js')\n\n/**\n * @category Day Helpers\n * @summary Return the array of dates within the specified range.\n *\n * @description\n * Return the array of dates within the specified range.\n *\n * @param {Date|String|Number} startDate - the first date\n * @param {Date|String|Number} endDate - the last date\n * @param {Number} [step=1] - the step between each day\n * @returns {Date[]} the array with starts of days from the day of startDate to the day of endDate\n * @throws {Error} startDate cannot be after endDate\n *\n * @example\n * // Each day between 6 October 2014 and 10 October 2014:\n * var result = eachDay(\n * new Date(2014, 9, 6),\n * new Date(2014, 9, 10)\n * )\n * //=> [\n * // Mon Oct 06 2014 00:00:00,\n * // Tue Oct 07 2014 00:00:00,\n * // Wed Oct 08 2014 00:00:00,\n * // Thu Oct 09 2014 00:00:00,\n * // Fri Oct 10 2014 00:00:00\n * // ]\n */\nfunction eachDay (dirtyStartDate, dirtyEndDate, dirtyStep) {\n var startDate = parse(dirtyStartDate)\n var endDate = parse(dirtyEndDate)\n var step = dirtyStep !== undefined ? dirtyStep : 1\n\n var endTime = endDate.getTime()\n\n if (startDate.getTime() > endTime) {\n throw new Error('The first date cannot be after the second date')\n }\n\n var dates = []\n\n var currentDate = startDate\n currentDate.setHours(0, 0, 0, 0)\n\n while (currentDate.getTime() <= endTime) {\n dates.push(parse(currentDate))\n currentDate.setDate(currentDate.getDate() + step)\n }\n\n return dates\n}\n\nmodule.exports = eachDay\n","var distanceInWords = require('../distance_in_words/index.js')\n\n/**\n * @category Common Helpers\n * @summary Return the distance between the given date and now in words.\n *\n * @description\n * Return the distance between the given date and now in words.\n *\n * | Distance to now | Result |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs | less than a minute |\n * | 30 secs ... 1 min 30 secs | 1 minute |\n * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n * | 1 yr ... 1 yr 3 months | about 1 year |\n * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n * | 1 yr 9 months ... 2 yrs | almost 2 years |\n * | N yrs ... N yrs 3 months | about N years |\n * | N yrs 3 months ... N yrs 9 months | over N years |\n * | N yrs 9 months ... N+1 yrs | almost N+1 years |\n *\n * With `options.includeSeconds == true`:\n * | Distance to now | Result |\n * |---------------------|----------------------|\n * | 0 secs ... 5 secs | less than 5 seconds |\n * | 5 secs ... 10 secs | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute |\n * | 40 secs ... 60 secs | less than a minute |\n * | 60 secs ... 90 secs | 1 minute |\n *\n * @param {Date|String|Number} date - the given date\n * @param {Object} [options] - the object with options\n * @param {Boolean} [options.includeSeconds=false] - distances less than a minute are more detailed\n * @param {Boolean} [options.addSuffix=false] - result specifies if the second date is earlier or later than the first\n * @param {Object} [options.locale=enLocale] - the locale object\n * @returns {String} the distance in words\n *\n * @example\n * // If today is 1 January 2015, what is the distance to 2 July 2014?\n * var result = distanceInWordsToNow(\n * new Date(2014, 6, 2)\n * )\n * //=> '6 months'\n *\n * @example\n * // If now is 1 January 2015 00:00:00,\n * // what is the distance to 1 January 2015 00:00:15, including seconds?\n * var result = distanceInWordsToNow(\n * new Date(2015, 0, 1, 0, 0, 15),\n * {includeSeconds: true}\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 January 2016, with a suffix?\n * var result = distanceInWordsToNow(\n * new Date(2016, 0, 1),\n * {addSuffix: true}\n * )\n * //=> 'in about 1 year'\n *\n * @example\n * // If today is 1 January 2015,\n * // what is the distance to 1 August 2016 in Esperanto?\n * var eoLocale = require('date-fns/locale/eo')\n * var result = distanceInWordsToNow(\n * new Date(2016, 7, 1),\n * {locale: eoLocale}\n * )\n * //=> 'pli ol 1 jaro'\n */\nfunction distanceInWordsToNow (dirtyDate, dirtyOptions) {\n return distanceInWords(Date.now(), dirtyDate, dirtyOptions)\n}\n\nmodule.exports = distanceInWordsToNow\n","var compareDesc = require('../compare_desc/index.js')\nvar parse = require('../parse/index.js')\nvar differenceInSeconds = require('../difference_in_seconds/index.js')\nvar enLocale = require('../locale/en/index.js')\n\nvar MINUTES_IN_DAY = 1440\nvar MINUTES_IN_MONTH = 43200\nvar MINUTES_IN_YEAR = 525600\n\n/**\n * @category Common Helpers\n * @summary Return the distance between the given dates in words.\n *\n * @description\n * Return the distance between the given dates in words, using strict units.\n * This is like `distanceInWords`, but does not use helpers like 'almost', 'over',\n * 'less than' and the like.\n *\n * | Distance between dates | Result |\n * |------------------------|---------------------|\n * | 0 ... 59 secs | [0..59] seconds |\n * | 1 ... 59 mins | [1..59] minutes |\n * | 1 ... 23 hrs | [1..23] hours |\n * | 1 ... 29 days | [1..29] days |\n * | 1 ... 11 months | [1..11] months |\n * | 1 ... N years | [1..N] years |\n *\n * @param {Date|String|Number} dateToCompare - the date to compare with\n * @param {Date|String|Number} date - the other date\n * @param {Object} [options] - the object with options\n * @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first\n * @param {'s'|'m'|'h'|'d'|'M'|'Y'} [options.unit] - if specified, will force a unit\n * @param {'floor'|'ceil'|'round'} [options.partialMethod='floor'] - which way to round partial units\n * @param {Object} [options.locale=enLocale] - the locale object\n * @returns {String} the distance in words\n *\n * @example\n * // What is the distance between 2 July 2014 and 1 January 2015?\n * var result = distanceInWordsStrict(\n * new Date(2014, 6, 2),\n * new Date(2015, 0, 2)\n * )\n * //=> '6 months'\n *\n * @example\n * // What is the distance between 1 January 2015 00:00:15\n * // and 1 January 2015 00:00:00?\n * var result = distanceInWordsStrict(\n * new Date(2015, 0, 1, 0, 0, 15),\n * new Date(2015, 0, 1, 0, 0, 0),\n * )\n * //=> '15 seconds'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, with a suffix?\n * var result = distanceInWordsStrict(\n * new Date(2016, 0, 1),\n * new Date(2015, 0, 1),\n * {addSuffix: true}\n * )\n * //=> '1 year ago'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, in minutes?\n * var result = distanceInWordsStrict(\n * new Date(2016, 0, 1),\n * new Date(2015, 0, 1),\n * {unit: 'm'}\n * )\n * //=> '525600 minutes'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 28 January 2015, in months, rounded up?\n * var result = distanceInWordsStrict(\n * new Date(2015, 0, 28),\n * new Date(2015, 0, 1),\n * {unit: 'M', partialMethod: 'ceil'}\n * )\n * //=> '1 month'\n *\n * @example\n * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\n * var eoLocale = require('date-fns/locale/eo')\n * var result = distanceInWordsStrict(\n * new Date(2016, 7, 1),\n * new Date(2015, 0, 1),\n * {locale: eoLocale}\n * )\n * //=> '1 jaro'\n */\nfunction distanceInWordsStrict (dirtyDateToCompare, dirtyDate, dirtyOptions) {\n var options = dirtyOptions || {}\n\n var comparison = compareDesc(dirtyDateToCompare, dirtyDate)\n\n var locale = options.locale\n var localize = enLocale.distanceInWords.localize\n if (locale && locale.distanceInWords && locale.distanceInWords.localize) {\n localize = locale.distanceInWords.localize\n }\n\n var localizeOptions = {\n addSuffix: Boolean(options.addSuffix),\n comparison: comparison\n }\n\n var dateLeft, dateRight\n if (comparison > 0) {\n dateLeft = parse(dirtyDateToCompare)\n dateRight = parse(dirtyDate)\n } else {\n dateLeft = parse(dirtyDate)\n dateRight = parse(dirtyDateToCompare)\n }\n\n var unit\n var mathPartial = Math[options.partialMethod ? String(options.partialMethod) : 'floor']\n var seconds = differenceInSeconds(dateRight, dateLeft)\n var offset = dateRight.getTimezoneOffset() - dateLeft.getTimezoneOffset()\n var minutes = mathPartial(seconds / 60) - offset\n var hours, days, months, years\n\n if (options.unit) {\n unit = String(options.unit)\n } else {\n if (minutes < 1) {\n unit = 's'\n } else if (minutes < 60) {\n unit = 'm'\n } else if (minutes < MINUTES_IN_DAY) {\n unit = 'h'\n } else if (minutes < MINUTES_IN_MONTH) {\n unit = 'd'\n } else if (minutes < MINUTES_IN_YEAR) {\n unit = 'M'\n } else {\n unit = 'Y'\n }\n }\n\n // 0 up to 60 seconds\n if (unit === 's') {\n return localize('xSeconds', seconds, localizeOptions)\n\n // 1 up to 60 mins\n } else if (unit === 'm') {\n return localize('xMinutes', minutes, localizeOptions)\n\n // 1 up to 24 hours\n } else if (unit === 'h') {\n hours = mathPartial(minutes / 60)\n return localize('xHours', hours, localizeOptions)\n\n // 1 up to 30 days\n } else if (unit === 'd') {\n days = mathPartial(minutes / MINUTES_IN_DAY)\n return localize('xDays', days, localizeOptions)\n\n // 1 up to 12 months\n } else if (unit === 'M') {\n months = mathPartial(minutes / MINUTES_IN_MONTH)\n return localize('xMonths', months, localizeOptions)\n\n // 1 year up to max Date\n } else if (unit === 'Y') {\n years = mathPartial(minutes / MINUTES_IN_YEAR)\n return localize('xYears', years, localizeOptions)\n }\n\n throw new Error('Unknown unit: ' + unit)\n}\n\nmodule.exports = distanceInWordsStrict\n","var commonFormatterKeys = [\n 'M', 'MM', 'Q', 'D', 'DD', 'DDD', 'DDDD', 'd',\n 'E', 'W', 'WW', 'YY', 'YYYY', 'GG', 'GGGG',\n 'H', 'HH', 'h', 'hh', 'm', 'mm',\n 's', 'ss', 'S', 'SS', 'SSS',\n 'Z', 'ZZ', 'X', 'x'\n]\n\nfunction buildFormattingTokensRegExp (formatters) {\n var formatterKeys = []\n for (var key in formatters) {\n if (formatters.hasOwnProperty(key)) {\n formatterKeys.push(key)\n }\n }\n\n var formattingTokens = commonFormatterKeys\n .concat(formatterKeys)\n .sort()\n .reverse()\n var formattingTokensRegExp = new RegExp(\n '(\\\\[[^\\\\[]*\\\\])|(\\\\\\\\)?' + '(' + formattingTokens.join('|') + '|.)', 'g'\n )\n\n return formattingTokensRegExp\n}\n\nmodule.exports = buildFormattingTokensRegExp\n","var buildFormattingTokensRegExp = require('../../_lib/build_formatting_tokens_reg_exp/index.js')\n\nfunction buildFormatLocale () {\n // Note: in English, the names of days of the week and months are capitalized.\n // If you are making a new locale based on this one, check if the same is true for the language you're working on.\n // Generally, formatted dates should look like they are in the middle of a sentence,\n // e.g. in Spanish language the weekdays and months should be in the lowercase.\n var months3char = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']\n var monthsFull = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']\n var weekdays2char = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']\n var weekdays3char = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']\n var weekdaysFull = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']\n var meridiemUppercase = ['AM', 'PM']\n var meridiemLowercase = ['am', 'pm']\n var meridiemFull = ['a.m.', 'p.m.']\n\n var formatters = {\n // Month: Jan, Feb, ..., Dec\n 'MMM': function (date) {\n return months3char[date.getMonth()]\n },\n\n // Month: January, February, ..., December\n 'MMMM': function (date) {\n return monthsFull[date.getMonth()]\n },\n\n // Day of week: Su, Mo, ..., Sa\n 'dd': function (date) {\n return weekdays2char[date.getDay()]\n },\n\n // Day of week: Sun, Mon, ..., Sat\n 'ddd': function (date) {\n return weekdays3char[date.getDay()]\n },\n\n // Day of week: Sunday, Monday, ..., Saturday\n 'dddd': function (date) {\n return weekdaysFull[date.getDay()]\n },\n\n // AM, PM\n 'A': function (date) {\n return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0]\n },\n\n // am, pm\n 'a': function (date) {\n return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0]\n },\n\n // a.m., p.m.\n 'aa': function (date) {\n return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0]\n }\n }\n\n // Generate ordinal version of formatters: M -> Mo, D -> Do, etc.\n var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W']\n ordinalFormatters.forEach(function (formatterToken) {\n formatters[formatterToken + 'o'] = function (date, formatters) {\n return ordinal(formatters[formatterToken](date))\n }\n })\n\n return {\n formatters: formatters,\n formattingTokensRegExp: buildFormattingTokensRegExp(formatters)\n }\n}\n\nfunction ordinal (number) {\n var rem100 = number % 100\n if (rem100 > 20 || rem100 < 10) {\n switch (rem100 % 10) {\n case 1:\n return number + 'st'\n case 2:\n return number + 'nd'\n case 3:\n return number + 'rd'\n }\n }\n return number + 'th'\n}\n\nmodule.exports = buildFormatLocale\n","function buildDistanceInWordsLocale () {\n var distanceInWordsLocale = {\n lessThanXSeconds: {\n one: 'less than a second',\n other: 'less than {{count}} seconds'\n },\n\n xSeconds: {\n one: '1 second',\n other: '{{count}} seconds'\n },\n\n halfAMinute: 'half a minute',\n\n lessThanXMinutes: {\n one: 'less than a minute',\n other: 'less than {{count}} minutes'\n },\n\n xMinutes: {\n one: '1 minute',\n other: '{{count}} minutes'\n },\n\n aboutXHours: {\n one: 'about 1 hour',\n other: 'about {{count}} hours'\n },\n\n xHours: {\n one: '1 hour',\n other: '{{count}} hours'\n },\n\n xDays: {\n one: '1 day',\n other: '{{count}} days'\n },\n\n aboutXMonths: {\n one: 'about 1 month',\n other: 'about {{count}} months'\n },\n\n xMonths: {\n one: '1 month',\n other: '{{count}} months'\n },\n\n aboutXYears: {\n one: 'about 1 year',\n other: 'about {{count}} years'\n },\n\n xYears: {\n one: '1 year',\n other: '{{count}} years'\n },\n\n overXYears: {\n one: 'over 1 year',\n other: 'over {{count}} years'\n },\n\n almostXYears: {\n one: 'almost 1 year',\n other: 'almost {{count}} years'\n }\n }\n\n function localize (token, count, options) {\n options = options || {}\n\n var result\n if (typeof distanceInWordsLocale[token] === 'string') {\n result = distanceInWordsLocale[token]\n } else if (count === 1) {\n result = distanceInWordsLocale[token].one\n } else {\n result = distanceInWordsLocale[token].other.replace('{{count}}', count)\n }\n\n if (options.addSuffix) {\n if (options.comparison > 0) {\n return 'in ' + result\n } else {\n return result + ' ago'\n }\n }\n\n return result\n }\n\n return {\n localize: localize\n }\n}\n\nmodule.exports = buildDistanceInWordsLocale\n","var parse = require('../parse/index.js')\nvar differenceInCalendarYears = require('../difference_in_calendar_years/index.js')\nvar compareAsc = require('../compare_asc/index.js')\n\n/**\n * @category Year Helpers\n * @summary Get the number of full years between the given dates.\n *\n * @description\n * Get the number of full years between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of full years\n *\n * @example\n * // How many full years are between 31 December 2013 and 11 February 2015?\n * var result = differenceInYears(\n * new Date(2015, 1, 11),\n * new Date(2013, 11, 31)\n * )\n * //=> 1\n */\nfunction differenceInYears (dirtyDateLeft, dirtyDateRight) {\n var dateLeft = parse(dirtyDateLeft)\n var dateRight = parse(dirtyDateRight)\n\n var sign = compareAsc(dateLeft, dateRight)\n var difference = Math.abs(differenceInCalendarYears(dateLeft, dateRight))\n dateLeft.setFullYear(dateLeft.getFullYear() - sign * difference)\n\n // Math.abs(diff in full years - diff in calendar years) === 1 if last calendar year is not full\n // If so, result must be decreased by 1 in absolute value\n var isLastYearNotFull = compareAsc(dateLeft, dateRight) === -sign\n return sign * (difference - isLastYearNotFull)\n}\n\nmodule.exports = differenceInYears\n","var differenceInDays = require('../difference_in_days/index.js')\n\n/**\n * @category Week Helpers\n * @summary Get the number of full weeks between the given dates.\n *\n * @description\n * Get the number of full weeks between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of full weeks\n *\n * @example\n * // How many full weeks are between 5 July 2014 and 20 July 2014?\n * var result = differenceInWeeks(\n * new Date(2014, 6, 20),\n * new Date(2014, 6, 5)\n * )\n * //=> 2\n */\nfunction differenceInWeeks (dirtyDateLeft, dirtyDateRight) {\n var diff = differenceInDays(dirtyDateLeft, dirtyDateRight) / 7\n return diff > 0 ? Math.floor(diff) : Math.ceil(diff)\n}\n\nmodule.exports = differenceInWeeks\n","var differenceInMonths = require('../difference_in_months/index.js')\n\n/**\n * @category Quarter Helpers\n * @summary Get the number of full quarters between the given dates.\n *\n * @description\n * Get the number of full quarters between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of full quarters\n *\n * @example\n * // How many full quarters are between 31 December 2013 and 2 July 2014?\n * var result = differenceInQuarters(\n * new Date(2014, 6, 2),\n * new Date(2013, 11, 31)\n * )\n * //=> 2\n */\nfunction differenceInQuarters (dirtyDateLeft, dirtyDateRight) {\n var diff = differenceInMonths(dirtyDateLeft, dirtyDateRight) / 3\n return diff > 0 ? Math.floor(diff) : Math.ceil(diff)\n}\n\nmodule.exports = differenceInQuarters\n","var differenceInMilliseconds = require('../difference_in_milliseconds/index.js')\n\nvar MILLISECONDS_IN_MINUTE = 60000\n\n/**\n * @category Minute Helpers\n * @summary Get the number of minutes between the given dates.\n *\n * @description\n * Get the number of minutes between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of minutes\n *\n * @example\n * // How many minutes are between 2 July 2014 12:07:59 and 2 July 2014 12:20:00?\n * var result = differenceInMinutes(\n * new Date(2014, 6, 2, 12, 20, 0),\n * new Date(2014, 6, 2, 12, 7, 59)\n * )\n * //=> 12\n */\nfunction differenceInMinutes (dirtyDateLeft, dirtyDateRight) {\n var diff = differenceInMilliseconds(dirtyDateLeft, dirtyDateRight) / MILLISECONDS_IN_MINUTE\n return diff > 0 ? Math.floor(diff) : Math.ceil(diff)\n}\n\nmodule.exports = differenceInMinutes\n","var parse = require('../parse/index.js')\nvar differenceInCalendarISOYears = require('../difference_in_calendar_iso_years/index.js')\nvar compareAsc = require('../compare_asc/index.js')\nvar subISOYears = require('../sub_iso_years/index.js')\n\n/**\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the number of full ISO week-numbering years between the given dates.\n *\n * @description\n * Get the number of full ISO week-numbering years between the given dates.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of full ISO week-numbering years\n *\n * @example\n * // How many full ISO week-numbering years are between 1 January 2010 and 1 January 2012?\n * var result = differenceInISOYears(\n * new Date(2012, 0, 1),\n * new Date(2010, 0, 1)\n * )\n * //=> 1\n */\nfunction differenceInISOYears (dirtyDateLeft, dirtyDateRight) {\n var dateLeft = parse(dirtyDateLeft)\n var dateRight = parse(dirtyDateRight)\n\n var sign = compareAsc(dateLeft, dateRight)\n var difference = Math.abs(differenceInCalendarISOYears(dateLeft, dateRight))\n dateLeft = subISOYears(dateLeft, sign * difference)\n\n // Math.abs(diff in full ISO years - diff in calendar ISO years) === 1\n // if last calendar ISO year is not full\n // If so, result must be decreased by 1 in absolute value\n var isLastISOYearNotFull = compareAsc(dateLeft, dateRight) === -sign\n return sign * (difference - isLastISOYearNotFull)\n}\n\nmodule.exports = differenceInISOYears\n","var differenceInMilliseconds = require('../difference_in_milliseconds/index.js')\n\nvar MILLISECONDS_IN_HOUR = 3600000\n\n/**\n * @category Hour Helpers\n * @summary Get the number of hours between the given dates.\n *\n * @description\n * Get the number of hours between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of hours\n *\n * @example\n * // How many hours are between 2 July 2014 06:50:00 and 2 July 2014 19:00:00?\n * var result = differenceInHours(\n * new Date(2014, 6, 2, 19, 0),\n * new Date(2014, 6, 2, 6, 50)\n * )\n * //=> 12\n */\nfunction differenceInHours (dirtyDateLeft, dirtyDateRight) {\n var diff = differenceInMilliseconds(dirtyDateLeft, dirtyDateRight) / MILLISECONDS_IN_HOUR\n return diff > 0 ? Math.floor(diff) : Math.ceil(diff)\n}\n\nmodule.exports = differenceInHours\n","var startOfWeek = require('../start_of_week/index.js')\n\nvar MILLISECONDS_IN_MINUTE = 60000\nvar MILLISECONDS_IN_WEEK = 604800000\n\n/**\n * @category Week Helpers\n * @summary Get the number of calendar weeks between the given dates.\n *\n * @description\n * Get the number of calendar weeks between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @param {Object} [options] - the object with options\n * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Number} the number of calendar weeks\n *\n * @example\n * // How many calendar weeks are between 5 July 2014 and 20 July 2014?\n * var result = differenceInCalendarWeeks(\n * new Date(2014, 6, 20),\n * new Date(2014, 6, 5)\n * )\n * //=> 3\n *\n * @example\n * // If the week starts on Monday,\n * // how many calendar weeks are between 5 July 2014 and 20 July 2014?\n * var result = differenceInCalendarWeeks(\n * new Date(2014, 6, 20),\n * new Date(2014, 6, 5),\n * {weekStartsOn: 1}\n * )\n * //=> 2\n */\nfunction differenceInCalendarWeeks (dirtyDateLeft, dirtyDateRight, dirtyOptions) {\n var startOfWeekLeft = startOfWeek(dirtyDateLeft, dirtyOptions)\n var startOfWeekRight = startOfWeek(dirtyDateRight, dirtyOptions)\n\n var timestampLeft = startOfWeekLeft.getTime() -\n startOfWeekLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE\n var timestampRight = startOfWeekRight.getTime() -\n startOfWeekRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE\n\n // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK)\n}\n\nmodule.exports = differenceInCalendarWeeks\n","var getQuarter = require('../get_quarter/index.js')\nvar parse = require('../parse/index.js')\n\n/**\n * @category Quarter Helpers\n * @summary Get the number of calendar quarters between the given dates.\n *\n * @description\n * Get the number of calendar quarters between the given dates.\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar quarters\n *\n * @example\n * // How many calendar quarters are between 31 December 2013 and 2 July 2014?\n * var result = differenceInCalendarQuarters(\n * new Date(2014, 6, 2),\n * new Date(2013, 11, 31)\n * )\n * //=> 3\n */\nfunction differenceInCalendarQuarters (dirtyDateLeft, dirtyDateRight) {\n var dateLeft = parse(dirtyDateLeft)\n var dateRight = parse(dirtyDateRight)\n\n var yearDiff = dateLeft.getFullYear() - dateRight.getFullYear()\n var quarterDiff = getQuarter(dateLeft) - getQuarter(dateRight)\n\n return yearDiff * 4 + quarterDiff\n}\n\nmodule.exports = differenceInCalendarQuarters\n","var startOfISOWeek = require('../start_of_iso_week/index.js')\n\nvar MILLISECONDS_IN_MINUTE = 60000\nvar MILLISECONDS_IN_WEEK = 604800000\n\n/**\n * @category ISO Week Helpers\n * @summary Get the number of calendar ISO weeks between the given dates.\n *\n * @description\n * Get the number of calendar ISO weeks between the given dates.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|String|Number} dateLeft - the later date\n * @param {Date|String|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar ISO weeks\n *\n * @example\n * // How many calendar ISO weeks are between 6 July 2014 and 21 July 2014?\n * var result = differenceInCalendarISOWeeks(\n * new Date(2014, 6, 21),\n * new Date(2014, 6, 6)\n * )\n * //=> 3\n */\nfunction differenceInCalendarISOWeeks (dirtyDateLeft, dirtyDateRight) {\n var startOfISOWeekLeft = startOfISOWeek(dirtyDateLeft)\n var startOfISOWeekRight = startOfISOWeek(dirtyDateRight)\n\n var timestampLeft = startOfISOWeekLeft.getTime() -\n startOfISOWeekLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE\n var timestampRight = startOfISOWeekRight.getTime() -\n startOfISOWeekRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE\n\n // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK)\n}\n\nmodule.exports = differenceInCalendarISOWeeks\n","var parse = require('../parse/index.js')\n\n/**\n * @category Common Helpers\n * @summary Return a date from the array closest to the given date.\n *\n * @description\n * Return a date from the array closest to the given date.\n *\n * @param {Date|String|Number} dateToCompare - the date to compare with\n * @param {Date[]|String[]|Number[]} datesArray - the array to search\n * @returns {Date} the date from the array closest to the given date\n * @throws {TypeError} the second argument must be an instance of Array\n *\n * @example\n * // Which date is closer to 6 September 2015: 1 January 2000 or 1 January 2030?\n * var dateToCompare = new Date(2015, 8, 6)\n * var result = closestTo(dateToCompare, [\n * new Date(2000, 0, 1),\n * new Date(2030, 0, 1)\n * ])\n * //=> Tue Jan 01 2030 00:00:00\n */\nfunction closestTo (dirtyDateToCompare, dirtyDatesArray) {\n if (!(dirtyDatesArray instanceof Array)) {\n throw new TypeError(toString.call(dirtyDatesArray) + ' is not an instance of Array')\n }\n\n var dateToCompare = parse(dirtyDateToCompare)\n var timeToCompare = dateToCompare.getTime()\n\n var result\n var minDistance\n\n dirtyDatesArray.forEach(function (dirtyDate) {\n var currentDate = parse(dirtyDate)\n var distance = Math.abs(timeToCompare - currentDate.getTime())\n if (result === undefined || distance < minDistance) {\n result = currentDate\n minDistance = distance\n }\n })\n\n return result\n}\n\nmodule.exports = closestTo\n","var parse = require('../parse/index.js')\n\n/**\n * @category Common Helpers\n * @summary Return an index of the closest date from the array comparing to the given date.\n *\n * @description\n * Return an index of the closest date from the array comparing to the given date.\n *\n * @param {Date|String|Number} dateToCompare - the date to compare with\n * @param {Date[]|String[]|Number[]} datesArray - the array to search\n * @returns {Number} an index of the date closest to the given date\n * @throws {TypeError} the second argument must be an instance of Array\n *\n * @example\n * // Which date is closer to 6 September 2015?\n * var dateToCompare = new Date(2015, 8, 6)\n * var datesArray = [\n * new Date(2015, 0, 1),\n * new Date(2016, 0, 1),\n * new Date(2017, 0, 1)\n * ]\n * var result = closestIndexTo(dateToCompare, datesArray)\n * //=> 1\n */\nfunction closestIndexTo (dirtyDateToCompare, dirtyDatesArray) {\n if (!(dirtyDatesArray instanceof Array)) {\n throw new TypeError(toString.call(dirtyDatesArray) + ' is not an instance of Array')\n }\n\n var dateToCompare = parse(dirtyDateToCompare)\n var timeToCompare = dateToCompare.getTime()\n\n var result\n var minDistance\n\n dirtyDatesArray.forEach(function (dirtyDate, index) {\n var currentDate = parse(dirtyDate)\n var distance = Math.abs(timeToCompare - currentDate.getTime())\n if (result === undefined || distance < minDistance) {\n result = index\n minDistance = distance\n }\n })\n\n return result\n}\n\nmodule.exports = closestIndexTo\n","var parse = require('../parse/index.js')\n\n/**\n * @category Range Helpers\n * @summary Is the given date range overlapping with another date range?\n *\n * @description\n * Is the given date range overlapping with another date range?\n *\n * @param {Date|String|Number} initialRangeStartDate - the start of the initial range\n * @param {Date|String|Number} initialRangeEndDate - the end of the initial range\n * @param {Date|String|Number} comparedRangeStartDate - the start of the range to compare it with\n * @param {Date|String|Number} comparedRangeEndDate - the end of the range to compare it with\n * @returns {Boolean} whether the date ranges are overlapping\n * @throws {Error} startDate of a date range cannot be after its endDate\n *\n * @example\n * // For overlapping date ranges:\n * areRangesOverlapping(\n * new Date(2014, 0, 10), new Date(2014, 0, 20), new Date(2014, 0, 17), new Date(2014, 0, 21)\n * )\n * //=> true\n *\n * @example\n * // For non-overlapping date ranges:\n * areRangesOverlapping(\n * new Date(2014, 0, 10), new Date(2014, 0, 20), new Date(2014, 0, 21), new Date(2014, 0, 22)\n * )\n * //=> false\n */\nfunction areRangesOverlapping (dirtyInitialRangeStartDate, dirtyInitialRangeEndDate, dirtyComparedRangeStartDate, dirtyComparedRangeEndDate) {\n var initialStartTime = parse(dirtyInitialRangeStartDate).getTime()\n var initialEndTime = parse(dirtyInitialRangeEndDate).getTime()\n var comparedStartTime = parse(dirtyComparedRangeStartDate).getTime()\n var comparedEndTime = parse(dirtyComparedRangeEndDate).getTime()\n\n if (initialStartTime > initialEndTime || comparedStartTime > comparedEndTime) {\n throw new Error('The start of the range cannot be after the end of the range')\n }\n\n return initialStartTime < comparedEndTime && comparedStartTime < initialEndTime\n}\n\nmodule.exports = areRangesOverlapping\n","module.exports = {\n addDays: require('./add_days/index.js'),\n addHours: require('./add_hours/index.js'),\n addISOYears: require('./add_iso_years/index.js'),\n addMilliseconds: require('./add_milliseconds/index.js'),\n addMinutes: require('./add_minutes/index.js'),\n addMonths: require('./add_months/index.js'),\n addQuarters: require('./add_quarters/index.js'),\n addSeconds: require('./add_seconds/index.js'),\n addWeeks: require('./add_weeks/index.js'),\n addYears: require('./add_years/index.js'),\n areRangesOverlapping: require('./are_ranges_overlapping/index.js'),\n closestIndexTo: require('./closest_index_to/index.js'),\n closestTo: require('./closest_to/index.js'),\n compareAsc: require('./compare_asc/index.js'),\n compareDesc: require('./compare_desc/index.js'),\n differenceInCalendarDays: require('./difference_in_calendar_days/index.js'),\n differenceInCalendarISOWeeks: require('./difference_in_calendar_iso_weeks/index.js'),\n differenceInCalendarISOYears: require('./difference_in_calendar_iso_years/index.js'),\n differenceInCalendarMonths: require('./difference_in_calendar_months/index.js'),\n differenceInCalendarQuarters: require('./difference_in_calendar_quarters/index.js'),\n differenceInCalendarWeeks: require('./difference_in_calendar_weeks/index.js'),\n differenceInCalendarYears: require('./difference_in_calendar_years/index.js'),\n differenceInDays: require('./difference_in_days/index.js'),\n differenceInHours: require('./difference_in_hours/index.js'),\n differenceInISOYears: require('./difference_in_iso_years/index.js'),\n differenceInMilliseconds: require('./difference_in_milliseconds/index.js'),\n differenceInMinutes: require('./difference_in_minutes/index.js'),\n differenceInMonths: require('./difference_in_months/index.js'),\n differenceInQuarters: require('./difference_in_quarters/index.js'),\n differenceInSeconds: require('./difference_in_seconds/index.js'),\n differenceInWeeks: require('./difference_in_weeks/index.js'),\n differenceInYears: require('./difference_in_years/index.js'),\n distanceInWords: require('./distance_in_words/index.js'),\n distanceInWordsStrict: require('./distance_in_words_strict/index.js'),\n distanceInWordsToNow: require('./distance_in_words_to_now/index.js'),\n eachDay: require('./each_day/index.js'),\n endOfDay: require('./end_of_day/index.js'),\n endOfHour: require('./end_of_hour/index.js'),\n endOfISOWeek: require('./end_of_iso_week/index.js'),\n endOfISOYear: require('./end_of_iso_year/index.js'),\n endOfMinute: require('./end_of_minute/index.js'),\n endOfMonth: require('./end_of_month/index.js'),\n endOfQuarter: require('./end_of_quarter/index.js'),\n endOfSecond: require('./end_of_second/index.js'),\n endOfToday: require('./end_of_today/index.js'),\n endOfTomorrow: require('./end_of_tomorrow/index.js'),\n endOfWeek: require('./end_of_week/index.js'),\n endOfYear: require('./end_of_year/index.js'),\n endOfYesterday: require('./end_of_yesterday/index.js'),\n format: require('./format/index.js'),\n getDate: require('./get_date/index.js'),\n getDay: require('./get_day/index.js'),\n getDayOfYear: require('./get_day_of_year/index.js'),\n getDaysInMonth: require('./get_days_in_month/index.js'),\n getDaysInYear: require('./get_days_in_year/index.js'),\n getHours: require('./get_hours/index.js'),\n getISODay: require('./get_iso_day/index.js'),\n getISOWeek: require('./get_iso_week/index.js'),\n getISOWeeksInYear: require('./get_iso_weeks_in_year/index.js'),\n getISOYear: require('./get_iso_year/index.js'),\n getMilliseconds: require('./get_milliseconds/index.js'),\n getMinutes: require('./get_minutes/index.js'),\n getMonth: require('./get_month/index.js'),\n getOverlappingDaysInRanges: require('./get_overlapping_days_in_ranges/index.js'),\n getQuarter: require('./get_quarter/index.js'),\n getSeconds: require('./get_seconds/index.js'),\n getTime: require('./get_time/index.js'),\n getYear: require('./get_year/index.js'),\n isAfter: require('./is_after/index.js'),\n isBefore: require('./is_before/index.js'),\n isDate: require('./is_date/index.js'),\n isEqual: require('./is_equal/index.js'),\n isFirstDayOfMonth: require('./is_first_day_of_month/index.js'),\n isFriday: require('./is_friday/index.js'),\n isFuture: require('./is_future/index.js'),\n isLastDayOfMonth: require('./is_last_day_of_month/index.js'),\n isLeapYear: require('./is_leap_year/index.js'),\n isMonday: require('./is_monday/index.js'),\n isPast: require('./is_past/index.js'),\n isSameDay: require('./is_same_day/index.js'),\n isSameHour: require('./is_same_hour/index.js'),\n isSameISOWeek: require('./is_same_iso_week/index.js'),\n isSameISOYear: require('./is_same_iso_year/index.js'),\n isSameMinute: require('./is_same_minute/index.js'),\n isSameMonth: require('./is_same_month/index.js'),\n isSameQuarter: require('./is_same_quarter/index.js'),\n isSameSecond: require('./is_same_second/index.js'),\n isSameWeek: require('./is_same_week/index.js'),\n isSameYear: require('./is_same_year/index.js'),\n isSaturday: require('./is_saturday/index.js'),\n isSunday: require('./is_sunday/index.js'),\n isThisHour: require('./is_this_hour/index.js'),\n isThisISOWeek: require('./is_this_iso_week/index.js'),\n isThisISOYear: require('./is_this_iso_year/index.js'),\n isThisMinute: require('./is_this_minute/index.js'),\n isThisMonth: require('./is_this_month/index.js'),\n isThisQuarter: require('./is_this_quarter/index.js'),\n isThisSecond: require('./is_this_second/index.js'),\n isThisWeek: require('./is_this_week/index.js'),\n isThisYear: require('./is_this_year/index.js'),\n isThursday: require('./is_thursday/index.js'),\n isToday: require('./is_today/index.js'),\n isTomorrow: require('./is_tomorrow/index.js'),\n isTuesday: require('./is_tuesday/index.js'),\n isValid: require('./is_valid/index.js'),\n isWednesday: require('./is_wednesday/index.js'),\n isWeekend: require('./is_weekend/index.js'),\n isWithinRange: require('./is_within_range/index.js'),\n isYesterday: require('./is_yesterday/index.js'),\n lastDayOfISOWeek: require('./last_day_of_iso_week/index.js'),\n lastDayOfISOYear: require('./last_day_of_iso_year/index.js'),\n lastDayOfMonth: require('./last_day_of_month/index.js'),\n lastDayOfQuarter: require('./last_day_of_quarter/index.js'),\n lastDayOfWeek: require('./last_day_of_week/index.js'),\n lastDayOfYear: require('./last_day_of_year/index.js'),\n max: require('./max/index.js'),\n min: require('./min/index.js'),\n parse: require('./parse/index.js'),\n setDate: require('./set_date/index.js'),\n setDay: require('./set_day/index.js'),\n setDayOfYear: require('./set_day_of_year/index.js'),\n setHours: require('./set_hours/index.js'),\n setISODay: require('./set_iso_day/index.js'),\n setISOWeek: require('./set_iso_week/index.js'),\n setISOYear: require('./set_iso_year/index.js'),\n setMilliseconds: require('./set_milliseconds/index.js'),\n setMinutes: require('./set_minutes/index.js'),\n setMonth: require('./set_month/index.js'),\n setQuarter: require('./set_quarter/index.js'),\n setSeconds: require('./set_seconds/index.js'),\n setYear: require('./set_year/index.js'),\n startOfDay: require('./start_of_day/index.js'),\n startOfHour: require('./start_of_hour/index.js'),\n startOfISOWeek: require('./start_of_iso_week/index.js'),\n startOfISOYear: require('./start_of_iso_year/index.js'),\n startOfMinute: require('./start_of_minute/index.js'),\n startOfMonth: require('./start_of_month/index.js'),\n startOfQuarter: require('./start_of_quarter/index.js'),\n startOfSecond: require('./start_of_second/index.js'),\n startOfToday: require('./start_of_today/index.js'),\n startOfTomorrow: require('./start_of_tomorrow/index.js'),\n startOfWeek: require('./start_of_week/index.js'),\n startOfYear: require('./start_of_year/index.js'),\n startOfYesterday: require('./start_of_yesterday/index.js'),\n subDays: require('./sub_days/index.js'),\n subHours: require('./sub_hours/index.js'),\n subISOYears: require('./sub_iso_years/index.js'),\n subMilliseconds: require('./sub_milliseconds/index.js'),\n subMinutes: require('./sub_minutes/index.js'),\n subMonths: require('./sub_months/index.js'),\n subQuarters: require('./sub_quarters/index.js'),\n subSeconds: require('./sub_seconds/index.js'),\n subWeeks: require('./sub_weeks/index.js'),\n subYears: require('./sub_years/index.js')\n}\n","function create() {\n var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var root = opts.root;\n\n\n var getRect = function getRect() {\n if (root instanceof Element) {\n var rect = root.getBoundingClientRect();\n return {\n width: rect.width,\n height: rect.height\n };\n }\n\n return {\n width: window.innerWidth,\n height: window.innerHeight\n };\n };\n\n var subscribe = function subscribe(observer) {\n var isDynamicViewport = false;\n var isTouching = false;\n var rect = { width: -1, height: -1 };\n\n var listeners = {\n orientationchange: function orientationchange() {\n rect = { width: -1, height: -1 };\n },\n resize: function resize() {\n var prevRect = rect;\n\n rect = getRect();\n\n if (isDynamicViewport && rect.height < prevRect.height) {\n rect.height = prevRect.height;\n }\n\n observer.next(rect);\n },\n scroll: function scroll() {\n if (isTouching) {\n isDynamicViewport = true;\n window.removeEventListener('scroll', listeners.scroll);\n }\n },\n touchstart: function touchstart() {\n isTouching = true;\n },\n touchend: function touchend() {\n isTouching = false;\n }\n };\n\n window.addEventListener('orientationchange', listeners.orientationchange);\n window.addEventListener('resize', listeners.resize);\n window.addEventListener('scroll', listeners.scroll);\n window.addEventListener('touchstart', listeners.touchstart);\n window.addEventListener('touchend', listeners.touchend);\n\n // Trigger initial \"resize\"\n listeners.resize();\n\n return {\n unsubscribe: function unsubscribe() {\n window.removeEventListener('orientationchange', listeners.orientationchange);\n window.removeEventListener('resize', listeners.resize);\n window.removeEventListener('scroll', listeners.scroll);\n window.removeEventListener('touchstart', listeners.touchstart);\n window.removeEventListener('touchend', listeners.touchend);\n }\n };\n };\n\n return { subscribe: subscribe };\n}\n\nvar index = { create: create };\n\nexport { create };\nexport default index;\n","// @flow @jsx h\n\nimport maxViewportObservable from '@nrk/max-viewport-observable'\nimport { format } from 'date-fns'\nimport { Component, h } from 'preact'\nimport style from './index.css'\nimport Content from './Content'\nimport Header from './Header'\n\nimport type { Props, State } from './types'\n\nclass Article extends Component {\n viewport$: any\n viewportSubscription: any\n\n constructor () {\n super()\n this.state = {\n muted: true,\n viewport: {\n width: -1,\n height: -1\n }\n }\n }\n\n componentDidMount () {\n this.viewport$ = maxViewportObservable.create({\n root: window\n })\n\n this.viewportSubscription = this.viewport$.subscribe({\n next: viewport => {\n this.setState({ viewport })\n }\n })\n }\n\n componentWillUnmount () {\n this.viewportSubscription.unsubscribe()\n }\n\n handleToggleMute = () => {\n this.setState({ muted: !this.state.muted })\n }\n\n render () {\n const { mediaBaseUrl, onAnalyticsEvent } = this.props\n const { publishedAt, sections } = this.props.data\n const { muted, viewport } = this.state\n\n return (\n
\n
\n\n \n\n
\n Publisert {format(publishedAt, 'DD.MM.YYYY')}, kl.{' '}\n {format(publishedAt, 'HH:mm')}\n
\n
\n )\n }\n}\n\nexport default Article\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"root\":\"dh-trygd-tryl-root\",\"saksuniversContainer\":\"dh-trygd-tryl-saksuniversContainer\"};","export function sendEvent ({ category, action, label }) {\n if (window.ga) {\n window.ga('send', 'event', category, action, label)\n } else {\n if (typeof console !== 'undefined') {\n console.log('ga.sendEvent', category, action, label)\n }\n }\n}\n","/*!\n * domready (c) Dustin Diaz 2014 - License MIT\n */\n!function (name, definition) {\n\n if (typeof module != 'undefined') module.exports = definition()\n else if (typeof define == 'function' && typeof define.amd == 'object') define(definition)\n else this[name] = definition()\n\n}('domready', function () {\n\n var fns = [], listener\n , doc = document\n , hack = doc.documentElement.doScroll\n , domContentLoaded = 'DOMContentLoaded'\n , loaded = (hack ? /^loaded|^c/ : /^loaded|^i|^c/).test(doc.readyState)\n\n\n if (!loaded)\n doc.addEventListener(domContentLoaded, listener = function () {\n doc.removeEventListener(domContentLoaded, listener)\n loaded = 1\n while (listener = fns.shift()) listener()\n })\n\n return function (fn) {\n loaded ? setTimeout(fn, 0) : fns.push(fn)\n }\n\n});\n","var hasSupportCache = void 0;\n\nfunction testEventPassiveListener(callback) {\n if (hasSupportCache !== undefined) {\n callback(hasSupportCache);\n return;\n }\n\n hasSupportCache = false;\n\n try {\n var opts = Object.defineProperty({}, 'passive', {\n get: function get() {\n hasSupportCache = true;\n }\n });\n\n window.addEventListener('test', null, opts);\n } catch (e) {}\n\n callback(hasSupportCache);\n}\n\nfunction testJs(callback) {\n callback(true);\n}\n\nfunction testJs$1(callback) {\n var el = document.createElement('img');\n\n callback(el.style.objectFit !== undefined);\n}\n\nfunction testPositionSticky(callback) {\n var el = document.createElement('a');\n\n el.style.cssText = 'position: sticky; position: -webkit-sticky; position: -ms-sticky;';\n\n callback(el.style.position.indexOf('sticky') !== -1);\n}\n\nvar videoAutoPlayCache = null;\n\nfunction testVideoAutoPlay(callback) {\n if (typeof window === 'undefined') {\n return callback(false);\n }\n\n if (videoAutoPlayCache !== null) {\n return callback(videoAutoPlayCache);\n }\n\n var videoElm = document.createElement('video');\n\n var isPlaying = false;\n\n videoElm.setAttribute('autoplay', '');\n videoElm.setAttribute('muted', '');\n videoElm.setAttribute('webkit-playsinline', 'webkit-playsinline');\n videoElm.setAttribute('playsinline', 'playsinline');\n\n try {\n if (videoElm.canPlayType('video/ogg')) {\n videoElm.src = 'data:video/ogg;base64,T2dnUwACAAAAAAAAAABmnCATAAAAAHDEixYBKoB0aGVvcmEDAgEAAQABAAAQAAAQAAAAAAAFAAAAAQAAAAAAAAAAAGIAYE9nZ1MAAAAAAAAAAAAAZpwgEwEAAAACrA7TDlj///////////////+QgXRoZW9yYSsAAABYaXBoLk9yZyBsaWJ0aGVvcmEgMS4xIDIwMDkwODIyIChUaHVzbmVsZGEpAQAAABoAAABFTkNPREVSPWZmb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LjEwMQ==';\n } else {\n return callback(false);\n }\n } catch (_) {\n return callback(false);\n }\n\n videoElm.load();\n var playPromise = videoElm.play();\n\n if (playPromise) {\n playPromise.catch(function (e) {\n // Do nothing\n });\n }\n\n videoElm.oncanplay = function () {\n videoAutoPlayCache = isPlaying;\n callback(videoAutoPlayCache);\n };\n\n videoElm.onplay = function () {\n isPlaying = true;\n };\n}\n\nvar index = {\n testEventPassiveListener: testEventPassiveListener,\n testJs: testJs,\n testObjectFit: testJs$1,\n testPositionSticky: testPositionSticky,\n testVideoAutoPlay: testVideoAutoPlay\n};\n\nexport default index;\nexport { testEventPassiveListener, testJs, testJs$1 as testObjectFit, testPositionSticky, testVideoAutoPlay };\n","export function createUniqueId() {\n var len = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;\n var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n return '' + prefix + Math.random().toString(36).substr(2, len - prefix.length);\n}","export function getScrollLeft() {\n if (typeof window === 'undefined') {\n return 0;\n }\n\n return window.pageXOffset || document.documentElement && document.documentElement.scrollLeft || 0;\n}\n\nexport function getScrollTop() {\n if (typeof window === 'undefined') {\n return 0;\n }\n\n return window.pageYOffset || document.documentElement && document.documentElement.scrollTop || 0;\n}","function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nfunction toStrings(object) {\n return Object.keys(object).filter(function (key) {\n return object[key];\n });\n}\n\nexport default (function (blockName) {\n for (var _len = arguments.length, modifiers = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n modifiers[_key - 1] = arguments[_key];\n }\n\n var strings = modifiers.filter(function (modifier) {\n return typeof modifier === 'string';\n });\n var objects = modifiers.filter(function (modifier) {\n return typeof modifier === 'object';\n });\n\n var objectString = objects.map(function (object) {\n return toStrings(object);\n }).reduce(function (a, b) {\n return [].concat(_toConsumableArray(a), _toConsumableArray(b));\n }, []);\n\n return [blockName].concat(strings.map(function (modifier) {\n return blockName + '--' + modifier;\n })).concat(objectString.map(function (modifier) {\n return blockName + '--' + modifier;\n })).join(' ');\n});","export function toArray(nodeList) {\n return [].slice.call(nodeList);\n}","// @jsx h\n\n/* global __HOT__ */\n\nimport { createUniqueId, toArray } from '@nrk/dh-utils'\nimport { testPositionSticky } from '@nrk/feature-tests'\nimport domready from 'domready'\nimport { sendEvent } from 'google-analytics'\nimport { h, render } from 'preact'\n\n// Import CSS\nimport '@nrk/dh-feature-components/dist/module/Byline/index.css'\nimport '@nrk/dh-feature-components/dist/module/Figure/index.css'\nimport '@nrk/dh-feature-components/dist/module/Heading/index.css'\nimport '@nrk/dh-feature-components/dist/module/List/index.css'\nimport '@nrk/dh-feature-components/dist/module/Paragraph/index.css'\nimport '@nrk/dh-feature-components/dist/module/Slideshow/index.css'\nimport style from './client.css'\n\nwindow[style.root] = window[style.root] || {}\n\ndomready(init)\n\nfunction init () {\n findElements().forEach(el => {\n el.id = createUniqueId(10, '_')\n\n window[style.root][el.id] = true\n\n cutTheMustard(hasSupport => {\n if (hasSupport) {\n el.className = el.className.replace('noJs', 'js')\n\n // Extract preloaded state sent from server\n const preloadedState = JSON.parse(\n el.getAttribute('data-preloaded-state')\n )\n\n // ... and render with the exact same props\n renderApp(el, preloadedState)\n\n // Enable webpack hot-reloading\n if (__HOT__) {\n // Reload and re-render React application\n module.hot.accept('./client', () => {\n renderApp(el, preloadedState)\n })\n }\n } else {\n // NO SUPPORT\n }\n })\n })\n}\n\nfunction handleAnalyticsEvent (analyticsEvent = {}) {\n if (typeof analyticsEvent.action === 'string') {\n sendEvent({\n category: 'dh-spesial',\n action: analyticsEvent.action,\n label: 'Spesial – Trygdekontoret – Trylling'\n })\n }\n}\n\nfunction findElements () {\n return toArray(document.getElementsByClassName(style.root)).filter(\n el => !isInitialized(el)\n )\n}\n\nfunction cutTheMustard (callbackFn) {\n return testPositionSticky(callbackFn)\n}\n\nfunction renderApp (el, props) {\n const Article = require('./components/Article').default\n render(\n
,\n el,\n el.firstChild\n )\n}\n\nfunction isInitialized (el) {\n return el.id && window[style.root][el.id]\n}\n","/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE.\n *\n * https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document\n *\n */\n\n(function(window, document) {\n'use strict';\n\n\n// Exits early if all IntersectionObserver and IntersectionObserverEntry\n// features are natively supported.\nif ('IntersectionObserver' in window &&\n 'IntersectionObserverEntry' in window &&\n 'intersectionRatio' in window.IntersectionObserverEntry.prototype) {\n\n // Minimal polyfill for Edge 15's lack of `isIntersecting`\n // See: https://github.com/w3c/IntersectionObserver/issues/211\n if (!('isIntersecting' in window.IntersectionObserverEntry.prototype)) {\n Object.defineProperty(window.IntersectionObserverEntry.prototype,\n 'isIntersecting', {\n get: function () {\n return this.intersectionRatio > 0;\n }\n });\n }\n return;\n}\n\n\n/**\n * An IntersectionObserver registry. This registry exists to hold a strong\n * reference to IntersectionObserver instances currently observering a target\n * element. Without this registry, instances without another reference may be\n * garbage collected.\n */\nvar registry = [];\n\n\n/**\n * Creates the global IntersectionObserverEntry constructor.\n * https://w3c.github.io/IntersectionObserver/#intersection-observer-entry\n * @param {Object} entry A dictionary of instance properties.\n * @constructor\n */\nfunction IntersectionObserverEntry(entry) {\n this.time = entry.time;\n this.target = entry.target;\n this.rootBounds = entry.rootBounds;\n this.boundingClientRect = entry.boundingClientRect;\n this.intersectionRect = entry.intersectionRect || getEmptyRect();\n this.isIntersecting = !!entry.intersectionRect;\n\n // Calculates the intersection ratio.\n var targetRect = this.boundingClientRect;\n var targetArea = targetRect.width * targetRect.height;\n var intersectionRect = this.intersectionRect;\n var intersectionArea = intersectionRect.width * intersectionRect.height;\n\n // Sets intersection ratio.\n if (targetArea) {\n this.intersectionRatio = intersectionArea / targetArea;\n } else {\n // If area is zero and is intersecting, sets to 1, otherwise to 0\n this.intersectionRatio = this.isIntersecting ? 1 : 0;\n }\n}\n\n\n/**\n * Creates the global IntersectionObserver constructor.\n * https://w3c.github.io/IntersectionObserver/#intersection-observer-interface\n * @param {Function} callback The function to be invoked after intersection\n * changes have queued. The function is not invoked if the queue has\n * been emptied by calling the `takeRecords` method.\n * @param {Object=} opt_options Optional configuration options.\n * @constructor\n */\nfunction IntersectionObserver(callback, opt_options) {\n\n var options = opt_options || {};\n\n if (typeof callback != 'function') {\n throw new Error('callback must be a function');\n }\n\n if (options.root && options.root.nodeType != 1) {\n throw new Error('root must be an Element');\n }\n\n // Binds and throttles `this._checkForIntersections`.\n this._checkForIntersections = throttle(\n this._checkForIntersections.bind(this), this.THROTTLE_TIMEOUT);\n\n // Private properties.\n this._callback = callback;\n this._observationTargets = [];\n this._queuedEntries = [];\n this._rootMarginValues = this._parseRootMargin(options.rootMargin);\n\n // Public properties.\n this.thresholds = this._initThresholds(options.threshold);\n this.root = options.root || null;\n this.rootMargin = this._rootMarginValues.map(function(margin) {\n return margin.value + margin.unit;\n }).join(' ');\n}\n\n\n/**\n * The minimum interval within which the document will be checked for\n * intersection changes.\n */\nIntersectionObserver.prototype.THROTTLE_TIMEOUT = 100;\n\n\n/**\n * The frequency in which the polyfill polls for intersection changes.\n * this can be updated on a per instance basis and must be set prior to\n * calling `observe` on the first target.\n */\nIntersectionObserver.prototype.POLL_INTERVAL = null;\n\n/**\n * Use a mutation observer on the root element\n * to detect intersection changes.\n */\nIntersectionObserver.prototype.USE_MUTATION_OBSERVER = true;\n\n\n/**\n * Starts observing a target element for intersection changes based on\n * the thresholds values.\n * @param {Element} target The DOM element to observe.\n */\nIntersectionObserver.prototype.observe = function(target) {\n var isTargetAlreadyObserved = this._observationTargets.some(function(item) {\n return item.element == target;\n });\n\n if (isTargetAlreadyObserved) {\n return;\n }\n\n if (!(target && target.nodeType == 1)) {\n throw new Error('target must be an Element');\n }\n\n this._registerInstance();\n this._observationTargets.push({element: target, entry: null});\n this._monitorIntersections();\n this._checkForIntersections();\n};\n\n\n/**\n * Stops observing a target element for intersection changes.\n * @param {Element} target The DOM element to observe.\n */\nIntersectionObserver.prototype.unobserve = function(target) {\n this._observationTargets =\n this._observationTargets.filter(function(item) {\n\n return item.element != target;\n });\n if (!this._observationTargets.length) {\n this._unmonitorIntersections();\n this._unregisterInstance();\n }\n};\n\n\n/**\n * Stops observing all target elements for intersection changes.\n */\nIntersectionObserver.prototype.disconnect = function() {\n this._observationTargets = [];\n this._unmonitorIntersections();\n this._unregisterInstance();\n};\n\n\n/**\n * Returns any queue entries that have not yet been reported to the\n * callback and clears the queue. This can be used in conjunction with the\n * callback to obtain the absolute most up-to-date intersection information.\n * @return {Array} The currently queued entries.\n */\nIntersectionObserver.prototype.takeRecords = function() {\n var records = this._queuedEntries.slice();\n this._queuedEntries = [];\n return records;\n};\n\n\n/**\n * Accepts the threshold value from the user configuration object and\n * returns a sorted array of unique threshold values. If a value is not\n * between 0 and 1 and error is thrown.\n * @private\n * @param {Array|number=} opt_threshold An optional threshold value or\n * a list of threshold values, defaulting to [0].\n * @return {Array} A sorted list of unique and valid threshold values.\n */\nIntersectionObserver.prototype._initThresholds = function(opt_threshold) {\n var threshold = opt_threshold || [0];\n if (!Array.isArray(threshold)) threshold = [threshold];\n\n return threshold.sort().filter(function(t, i, a) {\n if (typeof t != 'number' || isNaN(t) || t < 0 || t > 1) {\n throw new Error('threshold must be a number between 0 and 1 inclusively');\n }\n return t !== a[i - 1];\n });\n};\n\n\n/**\n * Accepts the rootMargin value from the user configuration object\n * and returns an array of the four margin values as an object containing\n * the value and unit properties. If any of the values are not properly\n * formatted or use a unit other than px or %, and error is thrown.\n * @private\n * @param {string=} opt_rootMargin An optional rootMargin value,\n * defaulting to '0px'.\n * @return {Array} An array of margin objects with the keys\n * value and unit.\n */\nIntersectionObserver.prototype._parseRootMargin = function(opt_rootMargin) {\n var marginString = opt_rootMargin || '0px';\n var margins = marginString.split(/\\s+/).map(function(margin) {\n var parts = /^(-?\\d*\\.?\\d+)(px|%)$/.exec(margin);\n if (!parts) {\n throw new Error('rootMargin must be specified in pixels or percent');\n }\n return {value: parseFloat(parts[1]), unit: parts[2]};\n });\n\n // Handles shorthand.\n margins[1] = margins[1] || margins[0];\n margins[2] = margins[2] || margins[0];\n margins[3] = margins[3] || margins[1];\n\n return margins;\n};\n\n\n/**\n * Starts polling for intersection changes if the polling is not already\n * happening, and if the page's visibilty state is visible.\n * @private\n */\nIntersectionObserver.prototype._monitorIntersections = function() {\n if (!this._monitoringIntersections) {\n this._monitoringIntersections = true;\n\n // If a poll interval is set, use polling instead of listening to\n // resize and scroll events or DOM mutations.\n if (this.POLL_INTERVAL) {\n this._monitoringInterval = setInterval(\n this._checkForIntersections, this.POLL_INTERVAL);\n }\n else {\n addEvent(window, 'resize', this._checkForIntersections, true);\n addEvent(document, 'scroll', this._checkForIntersections, true);\n\n if (this.USE_MUTATION_OBSERVER && 'MutationObserver' in window) {\n this._domObserver = new MutationObserver(this._checkForIntersections);\n this._domObserver.observe(document, {\n attributes: true,\n childList: true,\n characterData: true,\n subtree: true\n });\n }\n }\n }\n};\n\n\n/**\n * Stops polling for intersection changes.\n * @private\n */\nIntersectionObserver.prototype._unmonitorIntersections = function() {\n if (this._monitoringIntersections) {\n this._monitoringIntersections = false;\n\n clearInterval(this._monitoringInterval);\n this._monitoringInterval = null;\n\n removeEvent(window, 'resize', this._checkForIntersections, true);\n removeEvent(document, 'scroll', this._checkForIntersections, true);\n\n if (this._domObserver) {\n this._domObserver.disconnect();\n this._domObserver = null;\n }\n }\n};\n\n\n/**\n * Scans each observation target for intersection changes and adds them\n * to the internal entries queue. If new entries are found, it\n * schedules the callback to be invoked.\n * @private\n */\nIntersectionObserver.prototype._checkForIntersections = function() {\n var rootIsInDom = this._rootIsInDom();\n var rootRect = rootIsInDom ? this._getRootRect() : getEmptyRect();\n\n this._observationTargets.forEach(function(item) {\n var target = item.element;\n var targetRect = getBoundingClientRect(target);\n var rootContainsTarget = this._rootContainsTarget(target);\n var oldEntry = item.entry;\n var intersectionRect = rootIsInDom && rootContainsTarget &&\n this._computeTargetAndRootIntersection(target, rootRect);\n\n var newEntry = item.entry = new IntersectionObserverEntry({\n time: now(),\n target: target,\n boundingClientRect: targetRect,\n rootBounds: rootRect,\n intersectionRect: intersectionRect\n });\n\n if (!oldEntry) {\n this._queuedEntries.push(newEntry);\n } else if (rootIsInDom && rootContainsTarget) {\n // If the new entry intersection ratio has crossed any of the\n // thresholds, add a new entry.\n if (this._hasCrossedThreshold(oldEntry, newEntry)) {\n this._queuedEntries.push(newEntry);\n }\n } else {\n // If the root is not in the DOM or target is not contained within\n // root but the previous entry for this target had an intersection,\n // add a new record indicating removal.\n if (oldEntry && oldEntry.isIntersecting) {\n this._queuedEntries.push(newEntry);\n }\n }\n }, this);\n\n if (this._queuedEntries.length) {\n this._callback(this.takeRecords(), this);\n }\n};\n\n\n/**\n * Accepts a target and root rect computes the intersection between then\n * following the algorithm in the spec.\n * TODO(philipwalton): at this time clip-path is not considered.\n * https://w3c.github.io/IntersectionObserver/#calculate-intersection-rect-algo\n * @param {Element} target The target DOM element\n * @param {Object} rootRect The bounding rect of the root after being\n * expanded by the rootMargin value.\n * @return {?Object} The final intersection rect object or undefined if no\n * intersection is found.\n * @private\n */\nIntersectionObserver.prototype._computeTargetAndRootIntersection =\n function(target, rootRect) {\n\n // If the element isn't displayed, an intersection can't happen.\n if (window.getComputedStyle(target).display == 'none') return;\n\n var targetRect = getBoundingClientRect(target);\n var intersectionRect = targetRect;\n var parent = getParentNode(target);\n var atRoot = false;\n\n while (!atRoot) {\n var parentRect = null;\n var parentComputedStyle = parent.nodeType == 1 ?\n window.getComputedStyle(parent) : {};\n\n // If the parent isn't displayed, an intersection can't happen.\n if (parentComputedStyle.display == 'none') return;\n\n if (parent == this.root || parent == document) {\n atRoot = true;\n parentRect = rootRect;\n } else {\n // If the element has a non-visible overflow, and it's not the \n // or element, update the intersection rect.\n // Note: and cannot be clipped to a rect that's not also\n // the document rect, so no need to compute a new intersection.\n if (parent != document.body &&\n parent != document.documentElement &&\n parentComputedStyle.overflow != 'visible') {\n parentRect = getBoundingClientRect(parent);\n }\n }\n\n // If either of the above conditionals set a new parentRect,\n // calculate new intersection data.\n if (parentRect) {\n intersectionRect = computeRectIntersection(parentRect, intersectionRect);\n\n if (!intersectionRect) break;\n }\n parent = getParentNode(parent);\n }\n return intersectionRect;\n};\n\n\n/**\n * Returns the root rect after being expanded by the rootMargin value.\n * @return {Object} The expanded root rect.\n * @private\n */\nIntersectionObserver.prototype._getRootRect = function() {\n var rootRect;\n if (this.root) {\n rootRect = getBoundingClientRect(this.root);\n } else {\n // Use / instead of window since scroll bars affect size.\n var html = document.documentElement;\n var body = document.body;\n rootRect = {\n top: 0,\n left: 0,\n right: html.clientWidth || body.clientWidth,\n width: html.clientWidth || body.clientWidth,\n bottom: html.clientHeight || body.clientHeight,\n height: html.clientHeight || body.clientHeight\n };\n }\n return this._expandRectByRootMargin(rootRect);\n};\n\n\n/**\n * Accepts a rect and expands it by the rootMargin value.\n * @param {Object} rect The rect object to expand.\n * @return {Object} The expanded rect.\n * @private\n */\nIntersectionObserver.prototype._expandRectByRootMargin = function(rect) {\n var margins = this._rootMarginValues.map(function(margin, i) {\n return margin.unit == 'px' ? margin.value :\n margin.value * (i % 2 ? rect.width : rect.height) / 100;\n });\n var newRect = {\n top: rect.top - margins[0],\n right: rect.right + margins[1],\n bottom: rect.bottom + margins[2],\n left: rect.left - margins[3]\n };\n newRect.width = newRect.right - newRect.left;\n newRect.height = newRect.bottom - newRect.top;\n\n return newRect;\n};\n\n\n/**\n * Accepts an old and new entry and returns true if at least one of the\n * threshold values has been crossed.\n * @param {?IntersectionObserverEntry} oldEntry The previous entry for a\n * particular target element or null if no previous entry exists.\n * @param {IntersectionObserverEntry} newEntry The current entry for a\n * particular target element.\n * @return {boolean} Returns true if a any threshold has been crossed.\n * @private\n */\nIntersectionObserver.prototype._hasCrossedThreshold =\n function(oldEntry, newEntry) {\n\n // To make comparing easier, an entry that has a ratio of 0\n // but does not actually intersect is given a value of -1\n var oldRatio = oldEntry && oldEntry.isIntersecting ?\n oldEntry.intersectionRatio || 0 : -1;\n var newRatio = newEntry.isIntersecting ?\n newEntry.intersectionRatio || 0 : -1;\n\n // Ignore unchanged ratios\n if (oldRatio === newRatio) return;\n\n for (var i = 0; i < this.thresholds.length; i++) {\n var threshold = this.thresholds[i];\n\n // Return true if an entry matches a threshold or if the new ratio\n // and the old ratio are on the opposite sides of a threshold.\n if (threshold == oldRatio || threshold == newRatio ||\n threshold < oldRatio !== threshold < newRatio) {\n return true;\n }\n }\n};\n\n\n/**\n * Returns whether or not the root element is an element and is in the DOM.\n * @return {boolean} True if the root element is an element and is in the DOM.\n * @private\n */\nIntersectionObserver.prototype._rootIsInDom = function() {\n return !this.root || containsDeep(document, this.root);\n};\n\n\n/**\n * Returns whether or not the target element is a child of root.\n * @param {Element} target The target element to check.\n * @return {boolean} True if the target element is a child of root.\n * @private\n */\nIntersectionObserver.prototype._rootContainsTarget = function(target) {\n return containsDeep(this.root || document, target);\n};\n\n\n/**\n * Adds the instance to the global IntersectionObserver registry if it isn't\n * already present.\n * @private\n */\nIntersectionObserver.prototype._registerInstance = function() {\n if (registry.indexOf(this) < 0) {\n registry.push(this);\n }\n};\n\n\n/**\n * Removes the instance from the global IntersectionObserver registry.\n * @private\n */\nIntersectionObserver.prototype._unregisterInstance = function() {\n var index = registry.indexOf(this);\n if (index != -1) registry.splice(index, 1);\n};\n\n\n/**\n * Returns the result of the performance.now() method or null in browsers\n * that don't support the API.\n * @return {number} The elapsed time since the page was requested.\n */\nfunction now() {\n return window.performance && performance.now && performance.now();\n}\n\n\n/**\n * Throttles a function and delays its executiong, so it's only called at most\n * once within a given time period.\n * @param {Function} fn The function to throttle.\n * @param {number} timeout The amount of time that must pass before the\n * function can be called again.\n * @return {Function} The throttled function.\n */\nfunction throttle(fn, timeout) {\n var timer = null;\n return function () {\n if (!timer) {\n timer = setTimeout(function() {\n fn();\n timer = null;\n }, timeout);\n }\n };\n}\n\n\n/**\n * Adds an event handler to a DOM node ensuring cross-browser compatibility.\n * @param {Node} node The DOM node to add the event handler to.\n * @param {string} event The event name.\n * @param {Function} fn The event handler to add.\n * @param {boolean} opt_useCapture Optionally adds the even to the capture\n * phase. Note: this only works in modern browsers.\n */\nfunction addEvent(node, event, fn, opt_useCapture) {\n if (typeof node.addEventListener == 'function') {\n node.addEventListener(event, fn, opt_useCapture || false);\n }\n else if (typeof node.attachEvent == 'function') {\n node.attachEvent('on' + event, fn);\n }\n}\n\n\n/**\n * Removes a previously added event handler from a DOM node.\n * @param {Node} node The DOM node to remove the event handler from.\n * @param {string} event The event name.\n * @param {Function} fn The event handler to remove.\n * @param {boolean} opt_useCapture If the event handler was added with this\n * flag set to true, it should be set to true here in order to remove it.\n */\nfunction removeEvent(node, event, fn, opt_useCapture) {\n if (typeof node.removeEventListener == 'function') {\n node.removeEventListener(event, fn, opt_useCapture || false);\n }\n else if (typeof node.detatchEvent == 'function') {\n node.detatchEvent('on' + event, fn);\n }\n}\n\n\n/**\n * Returns the intersection between two rect objects.\n * @param {Object} rect1 The first rect.\n * @param {Object} rect2 The second rect.\n * @return {?Object} The intersection rect or undefined if no intersection\n * is found.\n */\nfunction computeRectIntersection(rect1, rect2) {\n var top = Math.max(rect1.top, rect2.top);\n var bottom = Math.min(rect1.bottom, rect2.bottom);\n var left = Math.max(rect1.left, rect2.left);\n var right = Math.min(rect1.right, rect2.right);\n var width = right - left;\n var height = bottom - top;\n\n return (width >= 0 && height >= 0) && {\n top: top,\n bottom: bottom,\n left: left,\n right: right,\n width: width,\n height: height\n };\n}\n\n\n/**\n * Shims the native getBoundingClientRect for compatibility with older IE.\n * @param {Element} el The element whose bounding rect to get.\n * @return {Object} The (possibly shimmed) rect of the element.\n */\nfunction getBoundingClientRect(el) {\n var rect;\n\n try {\n rect = el.getBoundingClientRect();\n } catch (err) {\n // Ignore Windows 7 IE11 \"Unspecified error\"\n // https://github.com/w3c/IntersectionObserver/pull/205\n }\n\n if (!rect) return getEmptyRect();\n\n // Older IE\n if (!(rect.width && rect.height)) {\n rect = {\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n left: rect.left,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top\n };\n }\n return rect;\n}\n\n\n/**\n * Returns an empty rect object. An empty rect is returned when an element\n * is not in the DOM.\n * @return {Object} The empty rect.\n */\nfunction getEmptyRect() {\n return {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n width: 0,\n height: 0\n };\n}\n\n/**\n * Checks to see if a parent element contains a child elemnt (including inside\n * shadow DOM).\n * @param {Node} parent The parent element.\n * @param {Node} child The child element.\n * @return {boolean} True if the parent node contains the child node.\n */\nfunction containsDeep(parent, child) {\n var node = child;\n while (node) {\n if (node == parent) return true;\n\n node = getParentNode(node);\n }\n return false;\n}\n\n\n/**\n * Gets the parent node of an element or its host element if the parent node\n * is a shadow root.\n * @param {Node} node The node whose parent to get.\n * @return {Node|null} The parent node or null if no parent exists.\n */\nfunction getParentNode(node) {\n var parent = node.parentNode;\n\n if (parent && parent.nodeType == 11 && parent.host) {\n // If the parent is a shadow root, return the host element.\n return parent.host;\n }\n return parent;\n}\n\n\n// Exposes the constructors globally.\nwindow.IntersectionObserver = IntersectionObserver;\nwindow.IntersectionObserverEntry = IntersectionObserverEntry;\n\n}(window, document));\n","import 'intersection-observer'\n"],"sourceRoot":""}