{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/pubsub-js/src/pubsub.js","webpack:///./node_modules/nodelist-foreach-polyfill/index.js","webpack:///./node_modules/intersection-observer/intersection-observer.js","webpack:///./node_modules/delegate/src/delegate.js","webpack:///./node_modules/debounce/index.js","webpack:///./node_modules/imagesloaded/imagesloaded.js","webpack:///(webpack)/buildin/module.js","webpack:///./node_modules/delegate/src/closest.js","webpack:///./node_modules/ev-emitter/ev-emitter.js","webpack:///./node_modules/smoothscroll-polyfill/dist/smoothscroll.js","webpack:///./source/_assets/scss/screen.scss","webpack:///./node_modules/@wearegood/good-utilities/Events/messages.js","webpack:///./node_modules/@wearegood/good-utilities/Events/createCustomEvent.js","webpack:///./node_modules/@wearegood/good-utilities/Events/createDelegatedEventListener.js","webpack:///./source/_assets/js/modules/SmartImage/constants.js","webpack:///./source/_assets/js/modules/SmartImage/SmartImage.js","webpack:///./source/_assets/js/modules/SmartImage/SmartImageInline.js","webpack:///./source/_assets/js/modules/SmartImage/SmartImageManager.js","webpack:///./source/_assets/js/modules/SmartImage/SmartImageBackground.js","webpack:///./source/_assets/js/modules/SmartImage/index.js","webpack:///./source/_assets/js/modules/Navigation/MainNavToggle.js","webpack:///./source/_assets/js/modules/Navigation/NavigationManager.js","webpack:///./source/_assets/js/modules/Navigation/InPageLink.js","webpack:///./node_modules/@wearegood/good-utilities/DOM/getOffset.js","webpack:///./node_modules/@wearegood/good-utilities/DOM/getOuterHeight.js","webpack:///./source/_assets/js/modules/Navigation/InPageManager.js","webpack:///./source/_assets/js/modules/Navigation/index.js","webpack:///./source/_assets/js/modules/Animation/ParallaxPanel.js","webpack:///./source/_assets/js/modules/Animation/ParallaxManager.js","webpack:///./source/_assets/js/modules/Animation/ParallaxContainer.js","webpack:///./source/_assets/js/modules/Animation/index.js","webpack:///./source/_assets/js/modules/VideoEmbedPlayer/VideoEmbedPlayer.js","webpack:///./node_modules/@wearegood/good-utilities/DOM/createNodeFromHTML.js","webpack:///./source/_assets/js/modules/VideoEmbedPlayer/VideoEmbedManager.js","webpack:///./source/_assets/js/modules/VideoEmbedPlayer/index.js","webpack:///./node_modules/@wearegood/good-utilities/DOM/ready.js","webpack:///./source/_assets/js/index.js","webpack:///./node_modules/@wearegood/good-utilities/Events/bindGlobalMessages.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","root","factory","PubSub","define","messages","lastUid","hasKeys","obj","callSubscriberWithDelayedExceptions","subscriber","message","data","ex","setTimeout","throwException","callSubscriberWithImmediateExceptions","deliverMessage","originalMessage","matchedMessage","immediateExceptions","subscribers","callSubscriber","publish","sync","deliver","topic","String","position","lastIndexOf","substr","createDeliveryFunction","_typeof","toString","hasSubscribers","found","Boolean","messageHasSubscribers","publishSync","subscribe","func","token","subscribeOnce","unsubscribe","apply","this","arguments","clearAllSubscriptions","clearSubscriptions","indexOf","isTopic","descendantTopicExists","isToken","isFunction","result","amd","undefined","window","NodeList","forEach","callback","thisArg","length","document","IntersectionObserverEntry","intersectionRatio","registry","IntersectionObserver","THROTTLE_TIMEOUT","POLL_INTERVAL","USE_MUTATION_OBSERVER","observe","target","_observationTargets","some","item","element","nodeType","Error","_registerInstance","push","entry","_monitorIntersections","_checkForIntersections","unobserve","filter","_unmonitorIntersections","_unregisterInstance","disconnect","takeRecords","records","_queuedEntries","slice","_initThresholds","opt_threshold","threshold","Array","isArray","sort","a","isNaN","_parseRootMargin","opt_rootMargin","margins","split","map","margin","parts","exec","parseFloat","unit","_monitoringIntersections","_monitoringInterval","setInterval","addEvent","_domObserver","MutationObserver","attributes","childList","characterData","subtree","clearInterval","removeEvent","rootIsInDom","_rootIsInDom","rootRect","_getRootRect","top","bottom","left","right","width","height","targetRect","getBoundingClientRect","rootContainsTarget","_rootContainsTarget","oldEntry","intersectionRect","_computeTargetAndRootIntersection","newEntry","time","performance","now","boundingClientRect","rootBounds","_hasCrossedThreshold","isIntersecting","_callback","getComputedStyle","display","rect1","rect2","parent","getParentNode","atRoot","parentRect","parentComputedStyle","body","documentElement","overflow","Math","max","min","html","clientWidth","clientHeight","_expandRectByRootMargin","rect","_rootMarginValues","newRect","oldRatio","newRatio","thresholds","containsDeep","index","splice","targetArea","intersectionArea","Number","toFixed","opt_options","fn","timeout","timer","options","rootMargin","join","node","event","opt_useCapture","addEventListener","attachEvent","removeEventListener","detatchEvent","el","err","child","parentNode","host","closest","require","_delegate","selector","type","useCapture","listenerFn","e","delegateTarget","destroy","elements","querySelectorAll","debounce","wait","immediate","args","context","timestamp","later","last","Date","debounced","callNow","clear","clearTimeout","flush","__WEBPACK_AMD_DEFINE_RESULT__","EvEmitter","$","jQuery","console","extend","b","prop","arraySlice","ImagesLoaded","elem","onAlways","queryElem","makeArray","on","getImages","jqDeferred","Deferred","check","error","images","addElementImages","nodeName","addImage","background","addElementBackgroundImages","elementNodeTypes","childImgs","img","children","1","9","11","LoadingImage","Background","url","Image","style","reURL","matches","backgroundImage","addBackground","loadingImage","_this","onProgress","image","progress","progressedCount","hasAnyBroken","once","complete","isLoaded","emitEvent","notify","debug","log","eventName","isComplete","jqMethod","getIsImageComplete","confirm","naturalWidth","proxyImage","src","handleEvent","method","onload","unbindEvents","onerror","makeJQueryPlugin","imagesLoaded","promise","__WEBPACK_AMD_DEFINE_ARRAY__","webpackPolyfill","deprecate","paths","DOCUMENT_NODE_TYPE","Element","proto","matchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","listener","events","_events","listeners","onceEvents","_onceEvents","off","onceListeners","allOff","__WEBPACK_AMD_DEFINE_FACTORY__","polyfill","w","__forceSmoothScrollPolyfill__","userAgent","HTMLElement","SCROLL_TIME","original","scroll","scrollTo","scrollBy","elementScroll","scrollElement","scrollIntoView","ROUNDING_TOLERANCE","navigator","RegExp","test","shouldBailOut","smoothScroll","scrollX","pageXOffset","scrollY","pageYOffset","scrollLeft","scrollTop","SyntaxError","behavior","scrollableParent","isScrollable","findScrollableParent","parentRects","clientRects","x","y","firstArg","TypeError","hasScrollableSpace","axis","scrollHeight","scrollWidth","canOverflow","overflowValue","isScrollableY","isScrollableX","step","currentX","currentY","k","elapsed","startTime","cos","PI","startX","startY","scrollable","requestAnimationFrame","MESSAGES","resize","load","contentChange","contentDisplayed","layoutChange","breakChange","imageLoaded","modalOpened","displayModal","stopMedia","createCustomEvent","eventData","customEvent","CustomEvent","detail","bubbles","createEvent","initCustomEvent","createDelegatedEventListener","eventType","eventToTrigger","delegate","preventDefault","stopPropagation","dispatchEvent","SEL_PLACEHOLDER_IMAGE","SmartImage","observer","_classCallCheck","smartImageElem","placeholderImage","querySelector","CONSTANTS","loadingMethod","dataset","imageLoad","config","JSON","parse","imageConfig","imageType","imageReloader","reload","imageTargetSel","imageTarget","imageToAdd","createElement","srcset","srcSet","bindCustomMessageEvents","subscribeToEvents","getImageFile","PAGE_WIDTH","innerWidth","imageSrcKey","parseInt","THIS_IMAGE_URL","calculateImageBreakpointToUse","classList","remove","displayImage","add","loadImage","loadSmartImage","reloadImage","loadSmartImageOnClick","_this2","SmartImageInline","SmartImageInline_classCallCheck","_possibleConstructorReturn","_getPrototypeOf","IMAGE_ALT","alt","IMAGE_WIDTH","IMAGE_CLASS","class","removeAttribute","updateImageAttributes","insertBefore","imageObserver","SmartImageBackground","SmartImageBackground_classCallCheck","SmartImageBackground_possibleConstructorReturn","SmartImageBackground_getPrototypeOf","SMART_IMAGE_CSS","IMAGE_BACKGROUND_POS","IMAGE_BACKGROUND_COLOR","backgroundColor","SEL_SMART_IMAGE","SEL_CLICK_TO_LOAD_SMART_IMAGE","OBSERVER_OPTIONS","handleSmartImageIntersection","entries","modules_SmartImage","initSmartImages","SmartInlineImage","SmartBackgroundImage","MainNavToggle","MainNavToggle_classCallCheck","menuToggle","toggle","toggleMenu","openMenu","closeMenu","SEL_MAIN_NAV_TOGGLE","InPageLink","InPageLink_classCallCheck","inpageLinkElement","inpageURL","getAttribute","headerHeight","PAGE_SECTION","HEADER","SCROLL_OFFSET","offsetHeight","STYLE","marginTop","marginBottom","getOuterHeight","goToPageSection","SEL_INPAGE_LINK","Navigation","initialiseNavigation","NAV_TOGGLE","initialiseInPageNav","SEL_PANEl_CONTENT","ParallaxPanel","ParallaxPanel_classCallCheck","panelElem","panelContentElem","currThreshold","prevThreshold","thresholdRatio","STAGE_NUMBER","floor","ceil","updateParallaxPanel","panelObserver","containerObserver","ParallaxContainer","ParallaxContainer_classCallCheck","containerElem","inView","elemOffset","calculatedOffset","innerHeight","setProperty","updateOffset","checkInView","SEL_PARALLAX_CONTAINER","SEL_PARALLAX_PANEL","thresholdArray","num","arr","levels","handleParallaxPanelIntersection","handleParallaxContainerIntersection","Animation","initParallax","PARALLAX_CONTAINERS","IFRAME_TEMPLATE","VideoEmbedPlayer","htmlString","CONTAINER_ELEMENT","VideoEmbedPlayer_classCallCheck","videoPlayer","videoURL","videoUrl","videoIframe","innerHTML","trim","childNodes","videoLoaded","setAttribute","appendChild","removeChild","openVideo","closeVideo","SEL_VIDEO_EMBED_PLAYER","SEL_VIDEO_EMBED_OPEN","SEL_VIDEO_EMBED_CLOSE","modules_VideoEmbedPlayer","initVideoEmbedPlayers","onresize","NavigationAPI","SmartImageAPI","AnimationAPI","VideoEmbedAPI","readyState"],"mappings":"aACA,IAAAA,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,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,EAAA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+T,EAA6B,QAASiK,GAAsB,aAC5DjK,EAA6B,QAASkK,GAAuB,gBEpBjCvX,GCU9B,WCAE7H,OAAOsI,iBAAiB,SAAU,WAEhC5L,IAAOoB,QAAQiW,EAASjD,UAI1B9Q,OAAOuf,SAAW5V,IAAS,WAEzBjN,IAAOoB,QAAQiW,EAASC,SACvB,KDNHwL,EAAc5D,sBACd4D,EAAc9D,uBACd+D,EAAc3F,kBAEd4F,GAAa5B,eACb6B,GAAcL,0BDjBVhf,SAASiI,YAAsC,aAAxBjI,SAASsf,WAAoD,YAAxBtf,SAASsf,YACvE/X,KAEAvH,SAASgI,iBAAiB,mBAAoBT","file":"assets/js/site.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, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\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 = \".\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","/**\n * Copyright (c) 2010,2011,2012,2013,2014 Morgan Roderick http://roderick.dk\n * License: MIT - http://mrgnrdrck.mit-license.org\n *\n * https://github.com/mroderick/PubSubJS\n */\n\n(function (root, factory){\n 'use strict';\n\n var PubSub = {};\n root.PubSub = PubSub;\n\n var define = root.define;\n\n factory(PubSub);\n\n // AMD support\n if (typeof define === 'function' && define.amd){\n define(function() { return PubSub; });\n\n // CommonJS and Node.js module support\n } else if (typeof exports === 'object'){\n if (module !== undefined && module.exports) {\n exports = module.exports = PubSub; // Node.js specific `module.exports`\n }\n exports.PubSub = PubSub; // CommonJS module 1.1.1 spec\n module.exports = exports = PubSub; // CommonJS\n }\n\n}(( typeof window === 'object' && window ) || this, function (PubSub){\n 'use strict';\n\n var messages = {},\n lastUid = -1;\n\n function hasKeys(obj){\n var key;\n\n for (key in obj){\n if ( obj.hasOwnProperty(key) ){\n return true;\n }\n }\n return false;\n }\n\n /**\n * Returns a function that throws the passed exception, for use as argument for setTimeout\n * @alias throwException\n * @function\n * @param { Object } ex An Error object\n */\n function throwException( ex ){\n return function reThrowException(){\n throw ex;\n };\n }\n\n function callSubscriberWithDelayedExceptions( subscriber, message, data ){\n try {\n subscriber( message, data );\n } catch( ex ){\n setTimeout( throwException( ex ), 0);\n }\n }\n\n function callSubscriberWithImmediateExceptions( subscriber, message, data ){\n subscriber( message, data );\n }\n\n function deliverMessage( originalMessage, matchedMessage, data, immediateExceptions ){\n var subscribers = messages[matchedMessage],\n callSubscriber = immediateExceptions ? callSubscriberWithImmediateExceptions : callSubscriberWithDelayedExceptions,\n s;\n\n if ( !messages.hasOwnProperty( matchedMessage ) ) {\n return;\n }\n\n for (s in subscribers){\n if ( subscribers.hasOwnProperty(s)){\n callSubscriber( subscribers[s], originalMessage, data );\n }\n }\n }\n\n function createDeliveryFunction( message, data, immediateExceptions ){\n return function deliverNamespaced(){\n var topic = String( message ),\n position = topic.lastIndexOf( '.' );\n\n // deliver the message as it is now\n deliverMessage(message, message, data, immediateExceptions);\n\n // trim the hierarchy and deliver message to each level\n while( position !== -1 ){\n topic = topic.substr( 0, position );\n position = topic.lastIndexOf('.');\n deliverMessage( message, topic, data, immediateExceptions );\n }\n };\n }\n\n function messageHasSubscribers( message ){\n var topic = String( message ),\n found = Boolean(messages.hasOwnProperty( topic ) && hasKeys(messages[topic])),\n position = topic.lastIndexOf( '.' );\n\n while ( !found && position !== -1 ){\n topic = topic.substr( 0, position );\n position = topic.lastIndexOf( '.' );\n found = Boolean(messages.hasOwnProperty( topic ) && hasKeys(messages[topic]));\n }\n\n return found;\n }\n\n function publish( message, data, sync, immediateExceptions ){\n message = (typeof message === 'symbol') ? message.toString() : message;\n\n var deliver = createDeliveryFunction( message, data, immediateExceptions ),\n hasSubscribers = messageHasSubscribers( message );\n\n if ( !hasSubscribers ){\n return false;\n }\n\n if ( sync === true ){\n deliver();\n } else {\n setTimeout( deliver, 0 );\n }\n return true;\n }\n\n /**\n * Publishes the message, passing the data to it's subscribers\n * @function\n * @alias publish\n * @param { String } message The message to publish\n * @param {} data The data to pass to subscribers\n * @return { Boolean }\n */\n PubSub.publish = function( message, data ){\n return publish( message, data, false, PubSub.immediateExceptions );\n };\n\n /**\n * Publishes the the message synchronously, passing the data to it's subscribers\n * @function\n * @alias publishSync\n * @param { String } message The message to publish\n * @param {} data The data to pass to subscribers\n * @return { Boolean }\n */\n PubSub.publishSync = function( message, data ){\n return publish( message, data, true, PubSub.immediateExceptions );\n };\n\n /**\n * Subscribes the passed function to the passed message. Every returned token is unique and should be stored if you need to unsubscribe\n * @function\n * @alias subscribe\n * @param { String } message The message to subscribe to\n * @param { Function } func The function to call when a new message is published\n * @return { String }\n */\n PubSub.subscribe = function( message, func ){\n if ( typeof func !== 'function'){\n return false;\n }\n\n message = (typeof message === 'symbol') ? message.toString() : message;\n\n // message is not registered yet\n if ( !messages.hasOwnProperty( message ) ){\n messages[message] = {};\n }\n\n // forcing token as String, to allow for future expansions without breaking usage\n // and allow for easy use as key names for the 'messages' object\n var token = 'uid_' + String(++lastUid);\n messages[message][token] = func;\n \n // return token for unsubscribing\n return token;\n };\n\n /**\n * Subscribes the passed function to the passed message once\n * @function\n * @alias subscribeOnce\n * @param { String } message The message to subscribe to\n * @param { Function } func The function to call when a new message is published\n * @return { PubSub }\n */\n PubSub.subscribeOnce = function( message, func ){\n var token = PubSub.subscribe( message, function(){\n // before func apply, unsubscribe message\n PubSub.unsubscribe( token );\n func.apply( this, arguments );\n });\n return PubSub;\n };\n\n /**\n * Clears all subscriptions\n * @function\n * @public\n * @alias clearAllSubscriptions\n */\n PubSub.clearAllSubscriptions = function clearAllSubscriptions(){\n messages = {};\n };\n\n /**\n * Clear subscriptions by the topic\n * @function\n * @public\n * @alias clearAllSubscriptions\n */\n PubSub.clearSubscriptions = function clearSubscriptions(topic){\n var m;\n for (m in messages){\n if (messages.hasOwnProperty(m) && m.indexOf(topic) === 0){\n delete messages[m];\n }\n }\n };\n\n /**\n * Removes subscriptions\n *\n * - When passed a token, removes a specific subscription.\n *\n\t * - When passed a function, removes all subscriptions for that function\n *\n\t * - When passed a topic, removes all subscriptions for that topic (hierarchy)\n * @function\n * @public\n * @alias subscribeOnce\n * @param { String | Function } value A token, function or topic to unsubscribe from\n * @example // Unsubscribing with a token\n * var token = PubSub.subscribe('mytopic', myFunc);\n * PubSub.unsubscribe(token);\n * @example // Unsubscribing with a function\n * PubSub.unsubscribe(myFunc);\n * @example // Unsubscribing from a topic\n * PubSub.unsubscribe('mytopic');\n */\n PubSub.unsubscribe = function(value){\n var descendantTopicExists = function(topic) {\n var m;\n for ( m in messages ){\n if ( messages.hasOwnProperty(m) && m.indexOf(topic) === 0 ){\n // a descendant of the topic exists:\n return true;\n }\n }\n\n return false;\n },\n isTopic = typeof value === 'string' && ( messages.hasOwnProperty(value) || descendantTopicExists(value) ),\n isToken = !isTopic && typeof value === 'string',\n isFunction = typeof value === 'function',\n result = false,\n m, message, t;\n\n if (isTopic){\n PubSub.clearSubscriptions(value);\n return;\n }\n\n for ( m in messages ){\n if ( messages.hasOwnProperty( m ) ){\n message = messages[m];\n\n if ( isToken && message[value] ){\n delete message[value];\n result = value;\n // tokens are unique, so we can just stop here\n break;\n }\n\n if (isFunction) {\n for ( t in message ){\n if (message.hasOwnProperty(t) && message[t] === value){\n delete message[t];\n result = true;\n }\n }\n }\n }\n }\n\n return result;\n };\n}));\n","if (window.NodeList && !NodeList.prototype.forEach) {\r\n NodeList.prototype.forEach = function (callback, thisArg) {\r\n thisArg = thisArg || window;\r\n for (var i = 0; i < this.length; i++) {\r\n callback.call(thisArg, this[i], i, this);\r\n }\r\n };\r\n}\r\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 observing 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 // Round the intersection ratio to avoid floating point math issues:\n // https://github.com/w3c/IntersectionObserver/issues/324\n this.intersectionRatio = Number((intersectionArea / targetArea).toFixed(4));\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 visibility 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 execution, 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 element (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","var closest = require('./closest');\n\n/**\n * Delegates event to a selector.\n *\n * @param {Element} element\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @param {Boolean} useCapture\n * @return {Object}\n */\nfunction _delegate(element, selector, type, callback, useCapture) {\n var listenerFn = listener.apply(this, arguments);\n\n element.addEventListener(type, listenerFn, useCapture);\n\n return {\n destroy: function() {\n element.removeEventListener(type, listenerFn, useCapture);\n }\n }\n}\n\n/**\n * Delegates event to a selector.\n *\n * @param {Element|String|Array} [elements]\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @param {Boolean} useCapture\n * @return {Object}\n */\nfunction delegate(elements, selector, type, callback, useCapture) {\n // Handle the regular Element usage\n if (typeof elements.addEventListener === 'function') {\n return _delegate.apply(null, arguments);\n }\n\n // Handle Element-less usage, it defaults to global delegation\n if (typeof type === 'function') {\n // Use `document` as the first parameter, then apply arguments\n // This is a short way to .unshift `arguments` without running into deoptimizations\n return _delegate.bind(null, document).apply(null, arguments);\n }\n\n // Handle Selector-based usage\n if (typeof elements === 'string') {\n elements = document.querySelectorAll(elements);\n }\n\n // Handle Array-like based usage\n return Array.prototype.map.call(elements, function (element) {\n return _delegate(element, selector, type, callback, useCapture);\n });\n}\n\n/**\n * Finds closest match and invokes callback.\n *\n * @param {Element} element\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @return {Function}\n */\nfunction listener(element, selector, type, callback) {\n return function(e) {\n e.delegateTarget = closest(e.target, selector);\n\n if (e.delegateTarget) {\n callback.call(element, e);\n }\n }\n}\n\nmodule.exports = delegate;\n","/**\n * Returns a function, that, as long as it continues to be invoked, will not\n * be triggered. The function will be called after it stops being called for\n * N milliseconds. If `immediate` is passed, trigger the function on the\n * leading edge, instead of the trailing. The function also has a property 'clear' \n * that is a function which will clear the timer to prevent previously scheduled executions. \n *\n * @source underscore.js\n * @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/\n * @param {Function} function to wrap\n * @param {Number} timeout in ms (`100`)\n * @param {Boolean} whether to execute at the beginning (`false`)\n * @api public\n */\nfunction debounce(func, wait, immediate){\n var timeout, args, context, timestamp, result;\n if (null == wait) wait = 100;\n\n function later() {\n var last = Date.now() - timestamp;\n\n if (last < wait && last >= 0) {\n timeout = setTimeout(later, wait - last);\n } else {\n timeout = null;\n if (!immediate) {\n result = func.apply(context, args);\n context = args = null;\n }\n }\n };\n\n var debounced = function(){\n context = this;\n args = arguments;\n timestamp = Date.now();\n var callNow = immediate && !timeout;\n if (!timeout) timeout = setTimeout(later, wait);\n if (callNow) {\n result = func.apply(context, args);\n context = args = null;\n }\n\n return result;\n };\n\n debounced.clear = function() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n };\n \n debounced.flush = function() {\n if (timeout) {\n result = func.apply(context, args);\n context = args = null;\n \n clearTimeout(timeout);\n timeout = null;\n }\n };\n\n return debounced;\n};\n\n// Adds compatibility for ES modules\ndebounce.debounce = debounce;\n\nmodule.exports = debounce;\n","/*!\n * imagesLoaded v4.1.4\n * JavaScript is all like \"You images are done yet or what?\"\n * MIT License\n */\n\n( function( window, factory ) { 'use strict';\n // universal module definition\n\n /*global define: false, module: false, require: false */\n\n if ( typeof define == 'function' && define.amd ) {\n // AMD\n define( [\n 'ev-emitter/ev-emitter'\n ], function( EvEmitter ) {\n return factory( window, EvEmitter );\n });\n } else if ( typeof module == 'object' && module.exports ) {\n // CommonJS\n module.exports = factory(\n window,\n require('ev-emitter')\n );\n } else {\n // browser global\n window.imagesLoaded = factory(\n window,\n window.EvEmitter\n );\n }\n\n})( typeof window !== 'undefined' ? window : this,\n\n// -------------------------- factory -------------------------- //\n\nfunction factory( window, EvEmitter ) {\n\n'use strict';\n\nvar $ = window.jQuery;\nvar console = window.console;\n\n// -------------------------- helpers -------------------------- //\n\n// extend objects\nfunction extend( a, b ) {\n for ( var prop in b ) {\n a[ prop ] = b[ prop ];\n }\n return a;\n}\n\nvar arraySlice = Array.prototype.slice;\n\n// turn element or nodeList into an array\nfunction makeArray( obj ) {\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n return obj;\n }\n\n var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number';\n if ( isArrayLike ) {\n // convert nodeList to array\n return arraySlice.call( obj );\n }\n\n // array of single index\n return [ obj ];\n}\n\n// -------------------------- imagesLoaded -------------------------- //\n\n/**\n * @param {Array, Element, NodeList, String} elem\n * @param {Object or Function} options - if function, use as callback\n * @param {Function} onAlways - callback function\n */\nfunction ImagesLoaded( elem, options, onAlways ) {\n // coerce ImagesLoaded() without new, to be new ImagesLoaded()\n if ( !( this instanceof ImagesLoaded ) ) {\n return new ImagesLoaded( elem, options, onAlways );\n }\n // use elem as selector string\n var queryElem = elem;\n if ( typeof elem == 'string' ) {\n queryElem = document.querySelectorAll( elem );\n }\n // bail if bad element\n if ( !queryElem ) {\n console.error( 'Bad element for imagesLoaded ' + ( queryElem || elem ) );\n return;\n }\n\n this.elements = makeArray( queryElem );\n this.options = extend( {}, this.options );\n // shift arguments if no options set\n if ( typeof options == 'function' ) {\n onAlways = options;\n } else {\n extend( this.options, options );\n }\n\n if ( onAlways ) {\n this.on( 'always', onAlways );\n }\n\n this.getImages();\n\n if ( $ ) {\n // add jQuery Deferred object\n this.jqDeferred = new $.Deferred();\n }\n\n // HACK check async to allow time to bind listeners\n setTimeout( this.check.bind( this ) );\n}\n\nImagesLoaded.prototype = Object.create( EvEmitter.prototype );\n\nImagesLoaded.prototype.options = {};\n\nImagesLoaded.prototype.getImages = function() {\n this.images = [];\n\n // filter & find items if we have an item selector\n this.elements.forEach( this.addElementImages, this );\n};\n\n/**\n * @param {Node} element\n */\nImagesLoaded.prototype.addElementImages = function( elem ) {\n // filter siblings\n if ( elem.nodeName == 'IMG' ) {\n this.addImage( elem );\n }\n // get background image on element\n if ( this.options.background === true ) {\n this.addElementBackgroundImages( elem );\n }\n\n // find children\n // no non-element nodes, #143\n var nodeType = elem.nodeType;\n if ( !nodeType || !elementNodeTypes[ nodeType ] ) {\n return;\n }\n var childImgs = elem.querySelectorAll('img');\n // concat childElems to filterFound array\n for ( var i=0; i < childImgs.length; i++ ) {\n var img = childImgs[i];\n this.addImage( img );\n }\n\n // get child background images\n if ( typeof this.options.background == 'string' ) {\n var children = elem.querySelectorAll( this.options.background );\n for ( i=0; i < children.length; i++ ) {\n var child = children[i];\n this.addElementBackgroundImages( child );\n }\n }\n};\n\nvar elementNodeTypes = {\n 1: true,\n 9: true,\n 11: true\n};\n\nImagesLoaded.prototype.addElementBackgroundImages = function( elem ) {\n var style = getComputedStyle( elem );\n if ( !style ) {\n // Firefox returns null if in a hidden iframe https://bugzil.la/548397\n return;\n }\n // get url inside url(\"...\")\n var reURL = /url\\((['\"])?(.*?)\\1\\)/gi;\n var matches = reURL.exec( style.backgroundImage );\n while ( matches !== null ) {\n var url = matches && matches[2];\n if ( url ) {\n this.addBackground( url, elem );\n }\n matches = reURL.exec( style.backgroundImage );\n }\n};\n\n/**\n * @param {Image} img\n */\nImagesLoaded.prototype.addImage = function( img ) {\n var loadingImage = new LoadingImage( img );\n this.images.push( loadingImage );\n};\n\nImagesLoaded.prototype.addBackground = function( url, elem ) {\n var background = new Background( url, elem );\n this.images.push( background );\n};\n\nImagesLoaded.prototype.check = function() {\n var _this = this;\n this.progressedCount = 0;\n this.hasAnyBroken = false;\n // complete if no images\n if ( !this.images.length ) {\n this.complete();\n return;\n }\n\n function onProgress( image, elem, message ) {\n // HACK - Chrome triggers event before object properties have changed. #83\n setTimeout( function() {\n _this.progress( image, elem, message );\n });\n }\n\n this.images.forEach( function( loadingImage ) {\n loadingImage.once( 'progress', onProgress );\n loadingImage.check();\n });\n};\n\nImagesLoaded.prototype.progress = function( image, elem, message ) {\n this.progressedCount++;\n this.hasAnyBroken = this.hasAnyBroken || !image.isLoaded;\n // progress event\n this.emitEvent( 'progress', [ this, image, elem ] );\n if ( this.jqDeferred && this.jqDeferred.notify ) {\n this.jqDeferred.notify( this, image );\n }\n // check if completed\n if ( this.progressedCount == this.images.length ) {\n this.complete();\n }\n\n if ( this.options.debug && console ) {\n console.log( 'progress: ' + message, image, elem );\n }\n};\n\nImagesLoaded.prototype.complete = function() {\n var eventName = this.hasAnyBroken ? 'fail' : 'done';\n this.isComplete = true;\n this.emitEvent( eventName, [ this ] );\n this.emitEvent( 'always', [ this ] );\n if ( this.jqDeferred ) {\n var jqMethod = this.hasAnyBroken ? 'reject' : 'resolve';\n this.jqDeferred[ jqMethod ]( this );\n }\n};\n\n// -------------------------- -------------------------- //\n\nfunction LoadingImage( img ) {\n this.img = img;\n}\n\nLoadingImage.prototype = Object.create( EvEmitter.prototype );\n\nLoadingImage.prototype.check = function() {\n // If complete is true and browser supports natural sizes,\n // try to check for image status manually.\n var isComplete = this.getIsImageComplete();\n if ( isComplete ) {\n // report based on naturalWidth\n this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );\n return;\n }\n\n // If none of the checks above matched, simulate loading on detached element.\n this.proxyImage = new Image();\n this.proxyImage.addEventListener( 'load', this );\n this.proxyImage.addEventListener( 'error', this );\n // bind to image as well for Firefox. #191\n this.img.addEventListener( 'load', this );\n this.img.addEventListener( 'error', this );\n this.proxyImage.src = this.img.src;\n};\n\nLoadingImage.prototype.getIsImageComplete = function() {\n // check for non-zero, non-undefined naturalWidth\n // fixes Safari+InfiniteScroll+Masonry bug infinite-scroll#671\n return this.img.complete && this.img.naturalWidth;\n};\n\nLoadingImage.prototype.confirm = function( isLoaded, message ) {\n this.isLoaded = isLoaded;\n this.emitEvent( 'progress', [ this, this.img, message ] );\n};\n\n// ----- events ----- //\n\n// trigger specified handler for event type\nLoadingImage.prototype.handleEvent = function( event ) {\n var method = 'on' + event.type;\n if ( this[ method ] ) {\n this[ method ]( event );\n }\n};\n\nLoadingImage.prototype.onload = function() {\n this.confirm( true, 'onload' );\n this.unbindEvents();\n};\n\nLoadingImage.prototype.onerror = function() {\n this.confirm( false, 'onerror' );\n this.unbindEvents();\n};\n\nLoadingImage.prototype.unbindEvents = function() {\n this.proxyImage.removeEventListener( 'load', this );\n this.proxyImage.removeEventListener( 'error', this );\n this.img.removeEventListener( 'load', this );\n this.img.removeEventListener( 'error', this );\n};\n\n// -------------------------- Background -------------------------- //\n\nfunction Background( url, element ) {\n this.url = url;\n this.element = element;\n this.img = new Image();\n}\n\n// inherit LoadingImage prototype\nBackground.prototype = Object.create( LoadingImage.prototype );\n\nBackground.prototype.check = function() {\n this.img.addEventListener( 'load', this );\n this.img.addEventListener( 'error', this );\n this.img.src = this.url;\n // check if image is already complete\n var isComplete = this.getIsImageComplete();\n if ( isComplete ) {\n this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );\n this.unbindEvents();\n }\n};\n\nBackground.prototype.unbindEvents = function() {\n this.img.removeEventListener( 'load', this );\n this.img.removeEventListener( 'error', this );\n};\n\nBackground.prototype.confirm = function( isLoaded, message ) {\n this.isLoaded = isLoaded;\n this.emitEvent( 'progress', [ this, this.element, message ] );\n};\n\n// -------------------------- jQuery -------------------------- //\n\nImagesLoaded.makeJQueryPlugin = function( jQuery ) {\n jQuery = jQuery || window.jQuery;\n if ( !jQuery ) {\n return;\n }\n // set local variable\n $ = jQuery;\n // $().imagesLoaded()\n $.fn.imagesLoaded = function( options, callback ) {\n var instance = new ImagesLoaded( this, options, callback );\n return instance.jqDeferred.promise( $(this) );\n };\n};\n// try making plugin\nImagesLoaded.makeJQueryPlugin();\n\n// -------------------------- -------------------------- //\n\nreturn ImagesLoaded;\n\n});\n","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","var DOCUMENT_NODE_TYPE = 9;\n\n/**\n * A polyfill for Element.matches()\n */\nif (typeof Element !== 'undefined' && !Element.prototype.matches) {\n var proto = Element.prototype;\n\n proto.matches = proto.matchesSelector ||\n proto.mozMatchesSelector ||\n proto.msMatchesSelector ||\n proto.oMatchesSelector ||\n proto.webkitMatchesSelector;\n}\n\n/**\n * Finds the closest parent that matches a selector.\n *\n * @param {Element} element\n * @param {String} selector\n * @return {Function}\n */\nfunction closest (element, selector) {\n while (element && element.nodeType !== DOCUMENT_NODE_TYPE) {\n if (typeof element.matches === 'function' &&\n element.matches(selector)) {\n return element;\n }\n element = element.parentNode;\n }\n}\n\nmodule.exports = closest;\n","/**\n * EvEmitter v1.1.0\n * Lil' event emitter\n * MIT License\n */\n\n/* jshint unused: true, undef: true, strict: true */\n\n( function( global, factory ) {\n // universal module definition\n /* jshint strict: false */ /* globals define, module, window */\n if ( typeof define == 'function' && define.amd ) {\n // AMD - RequireJS\n define( factory );\n } else if ( typeof module == 'object' && module.exports ) {\n // CommonJS - Browserify, Webpack\n module.exports = factory();\n } else {\n // Browser globals\n global.EvEmitter = factory();\n }\n\n}( typeof window != 'undefined' ? window : this, function() {\n\n\"use strict\";\n\nfunction EvEmitter() {}\n\nvar proto = EvEmitter.prototype;\n\nproto.on = function( eventName, listener ) {\n if ( !eventName || !listener ) {\n return;\n }\n // set events hash\n var events = this._events = this._events || {};\n // set listeners array\n var listeners = events[ eventName ] = events[ eventName ] || [];\n // only add once\n if ( listeners.indexOf( listener ) == -1 ) {\n listeners.push( listener );\n }\n\n return this;\n};\n\nproto.once = function( eventName, listener ) {\n if ( !eventName || !listener ) {\n return;\n }\n // add event\n this.on( eventName, listener );\n // set once flag\n // set onceEvents hash\n var onceEvents = this._onceEvents = this._onceEvents || {};\n // set onceListeners object\n var onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {};\n // set flag\n onceListeners[ listener ] = true;\n\n return this;\n};\n\nproto.off = function( eventName, listener ) {\n var listeners = this._events && this._events[ eventName ];\n if ( !listeners || !listeners.length ) {\n return;\n }\n var index = listeners.indexOf( listener );\n if ( index != -1 ) {\n listeners.splice( index, 1 );\n }\n\n return this;\n};\n\nproto.emitEvent = function( eventName, args ) {\n var listeners = this._events && this._events[ eventName ];\n if ( !listeners || !listeners.length ) {\n return;\n }\n // copy over to avoid interference if .off() in listener\n listeners = listeners.slice(0);\n args = args || [];\n // once stuff\n var onceListeners = this._onceEvents && this._onceEvents[ eventName ];\n\n for ( var i=0; i < listeners.length; i++ ) {\n var listener = listeners[i]\n var isOnce = onceListeners && onceListeners[ listener ];\n if ( isOnce ) {\n // remove listener\n // remove before trigger to prevent recursion\n this.off( eventName, listener );\n // unset once flag\n delete onceListeners[ listener ];\n }\n // trigger listener\n listener.apply( this, args );\n }\n\n return this;\n};\n\nproto.allOff = function() {\n delete this._events;\n delete this._onceEvents;\n};\n\nreturn EvEmitter;\n\n}));\n","/* smoothscroll v0.4.4 - 2019 - Dustan Kasten, Jeremias Menichelli - MIT License */\n(function () {\n 'use strict';\n\n // polyfill\n function polyfill() {\n // aliases\n var w = window;\n var d = document;\n\n // return if scroll behavior is supported and polyfill is not forced\n if (\n 'scrollBehavior' in d.documentElement.style &&\n w.__forceSmoothScrollPolyfill__ !== true\n ) {\n return;\n }\n\n // globals\n var Element = w.HTMLElement || w.Element;\n var SCROLL_TIME = 468;\n\n // object gathering original scroll methods\n var original = {\n scroll: w.scroll || w.scrollTo,\n scrollBy: w.scrollBy,\n elementScroll: Element.prototype.scroll || scrollElement,\n scrollIntoView: Element.prototype.scrollIntoView\n };\n\n // define timing method\n var now =\n w.performance && w.performance.now\n ? w.performance.now.bind(w.performance)\n : Date.now;\n\n /**\n * indicates if a the current browser is made by Microsoft\n * @method isMicrosoftBrowser\n * @param {String} userAgent\n * @returns {Boolean}\n */\n function isMicrosoftBrowser(userAgent) {\n var userAgentPatterns = ['MSIE ', 'Trident/', 'Edge/'];\n\n return new RegExp(userAgentPatterns.join('|')).test(userAgent);\n }\n\n /*\n * IE has rounding bug rounding down clientHeight and clientWidth and\n * rounding up scrollHeight and scrollWidth causing false positives\n * on hasScrollableSpace\n */\n var ROUNDING_TOLERANCE = isMicrosoftBrowser(w.navigator.userAgent) ? 1 : 0;\n\n /**\n * changes scroll position inside an element\n * @method scrollElement\n * @param {Number} x\n * @param {Number} y\n * @returns {undefined}\n */\n function scrollElement(x, y) {\n this.scrollLeft = x;\n this.scrollTop = y;\n }\n\n /**\n * returns result of applying ease math function to a number\n * @method ease\n * @param {Number} k\n * @returns {Number}\n */\n function ease(k) {\n return 0.5 * (1 - Math.cos(Math.PI * k));\n }\n\n /**\n * indicates if a smooth behavior should be applied\n * @method shouldBailOut\n * @param {Number|Object} firstArg\n * @returns {Boolean}\n */\n function shouldBailOut(firstArg) {\n if (\n firstArg === null ||\n typeof firstArg !== 'object' ||\n firstArg.behavior === undefined ||\n firstArg.behavior === 'auto' ||\n firstArg.behavior === 'instant'\n ) {\n // first argument is not an object/null\n // or behavior is auto, instant or undefined\n return true;\n }\n\n if (typeof firstArg === 'object' && firstArg.behavior === 'smooth') {\n // first argument is an object and behavior is smooth\n return false;\n }\n\n // throw error when behavior is not supported\n throw new TypeError(\n 'behavior member of ScrollOptions ' +\n firstArg.behavior +\n ' is not a valid value for enumeration ScrollBehavior.'\n );\n }\n\n /**\n * indicates if an element has scrollable space in the provided axis\n * @method hasScrollableSpace\n * @param {Node} el\n * @param {String} axis\n * @returns {Boolean}\n */\n function hasScrollableSpace(el, axis) {\n if (axis === 'Y') {\n return el.clientHeight + ROUNDING_TOLERANCE < el.scrollHeight;\n }\n\n if (axis === 'X') {\n return el.clientWidth + ROUNDING_TOLERANCE < el.scrollWidth;\n }\n }\n\n /**\n * indicates if an element has a scrollable overflow property in the axis\n * @method canOverflow\n * @param {Node} el\n * @param {String} axis\n * @returns {Boolean}\n */\n function canOverflow(el, axis) {\n var overflowValue = w.getComputedStyle(el, null)['overflow' + axis];\n\n return overflowValue === 'auto' || overflowValue === 'scroll';\n }\n\n /**\n * indicates if an element can be scrolled in either axis\n * @method isScrollable\n * @param {Node} el\n * @param {String} axis\n * @returns {Boolean}\n */\n function isScrollable(el) {\n var isScrollableY = hasScrollableSpace(el, 'Y') && canOverflow(el, 'Y');\n var isScrollableX = hasScrollableSpace(el, 'X') && canOverflow(el, 'X');\n\n return isScrollableY || isScrollableX;\n }\n\n /**\n * finds scrollable parent of an element\n * @method findScrollableParent\n * @param {Node} el\n * @returns {Node} el\n */\n function findScrollableParent(el) {\n while (el !== d.body && isScrollable(el) === false) {\n el = el.parentNode || el.host;\n }\n\n return el;\n }\n\n /**\n * self invoked function that, given a context, steps through scrolling\n * @method step\n * @param {Object} context\n * @returns {undefined}\n */\n function step(context) {\n var time = now();\n var value;\n var currentX;\n var currentY;\n var elapsed = (time - context.startTime) / SCROLL_TIME;\n\n // avoid elapsed times higher than one\n elapsed = elapsed > 1 ? 1 : elapsed;\n\n // apply easing to elapsed time\n value = ease(elapsed);\n\n currentX = context.startX + (context.x - context.startX) * value;\n currentY = context.startY + (context.y - context.startY) * value;\n\n context.method.call(context.scrollable, currentX, currentY);\n\n // scroll more if we have not reached our destination\n if (currentX !== context.x || currentY !== context.y) {\n w.requestAnimationFrame(step.bind(w, context));\n }\n }\n\n /**\n * scrolls window or element with a smooth behavior\n * @method smoothScroll\n * @param {Object|Node} el\n * @param {Number} x\n * @param {Number} y\n * @returns {undefined}\n */\n function smoothScroll(el, x, y) {\n var scrollable;\n var startX;\n var startY;\n var method;\n var startTime = now();\n\n // define scroll context\n if (el === d.body) {\n scrollable = w;\n startX = w.scrollX || w.pageXOffset;\n startY = w.scrollY || w.pageYOffset;\n method = original.scroll;\n } else {\n scrollable = el;\n startX = el.scrollLeft;\n startY = el.scrollTop;\n method = scrollElement;\n }\n\n // scroll looping over a frame\n step({\n scrollable: scrollable,\n method: method,\n startTime: startTime,\n startX: startX,\n startY: startY,\n x: x,\n y: y\n });\n }\n\n // ORIGINAL METHODS OVERRIDES\n // w.scroll and w.scrollTo\n w.scroll = w.scrollTo = function() {\n // avoid action when no arguments are passed\n if (arguments[0] === undefined) {\n return;\n }\n\n // avoid smooth behavior if not required\n if (shouldBailOut(arguments[0]) === true) {\n original.scroll.call(\n w,\n arguments[0].left !== undefined\n ? arguments[0].left\n : typeof arguments[0] !== 'object'\n ? arguments[0]\n : w.scrollX || w.pageXOffset,\n // use top prop, second argument if present or fallback to scrollY\n arguments[0].top !== undefined\n ? arguments[0].top\n : arguments[1] !== undefined\n ? arguments[1]\n : w.scrollY || w.pageYOffset\n );\n\n return;\n }\n\n // LET THE SMOOTHNESS BEGIN!\n smoothScroll.call(\n w,\n d.body,\n arguments[0].left !== undefined\n ? ~~arguments[0].left\n : w.scrollX || w.pageXOffset,\n arguments[0].top !== undefined\n ? ~~arguments[0].top\n : w.scrollY || w.pageYOffset\n );\n };\n\n // w.scrollBy\n w.scrollBy = function() {\n // avoid action when no arguments are passed\n if (arguments[0] === undefined) {\n return;\n }\n\n // avoid smooth behavior if not required\n if (shouldBailOut(arguments[0])) {\n original.scrollBy.call(\n w,\n arguments[0].left !== undefined\n ? arguments[0].left\n : typeof arguments[0] !== 'object' ? arguments[0] : 0,\n arguments[0].top !== undefined\n ? arguments[0].top\n : arguments[1] !== undefined ? arguments[1] : 0\n );\n\n return;\n }\n\n // LET THE SMOOTHNESS BEGIN!\n smoothScroll.call(\n w,\n d.body,\n ~~arguments[0].left + (w.scrollX || w.pageXOffset),\n ~~arguments[0].top + (w.scrollY || w.pageYOffset)\n );\n };\n\n // Element.prototype.scroll and Element.prototype.scrollTo\n Element.prototype.scroll = Element.prototype.scrollTo = function() {\n // avoid action when no arguments are passed\n if (arguments[0] === undefined) {\n return;\n }\n\n // avoid smooth behavior if not required\n if (shouldBailOut(arguments[0]) === true) {\n // if one number is passed, throw error to match Firefox implementation\n if (typeof arguments[0] === 'number' && arguments[1] === undefined) {\n throw new SyntaxError('Value could not be converted');\n }\n\n original.elementScroll.call(\n this,\n // use left prop, first number argument or fallback to scrollLeft\n arguments[0].left !== undefined\n ? ~~arguments[0].left\n : typeof arguments[0] !== 'object' ? ~~arguments[0] : this.scrollLeft,\n // use top prop, second argument or fallback to scrollTop\n arguments[0].top !== undefined\n ? ~~arguments[0].top\n : arguments[1] !== undefined ? ~~arguments[1] : this.scrollTop\n );\n\n return;\n }\n\n var left = arguments[0].left;\n var top = arguments[0].top;\n\n // LET THE SMOOTHNESS BEGIN!\n smoothScroll.call(\n this,\n this,\n typeof left === 'undefined' ? this.scrollLeft : ~~left,\n typeof top === 'undefined' ? this.scrollTop : ~~top\n );\n };\n\n // Element.prototype.scrollBy\n Element.prototype.scrollBy = function() {\n // avoid action when no arguments are passed\n if (arguments[0] === undefined) {\n return;\n }\n\n // avoid smooth behavior if not required\n if (shouldBailOut(arguments[0]) === true) {\n original.elementScroll.call(\n this,\n arguments[0].left !== undefined\n ? ~~arguments[0].left + this.scrollLeft\n : ~~arguments[0] + this.scrollLeft,\n arguments[0].top !== undefined\n ? ~~arguments[0].top + this.scrollTop\n : ~~arguments[1] + this.scrollTop\n );\n\n return;\n }\n\n this.scroll({\n left: ~~arguments[0].left + this.scrollLeft,\n top: ~~arguments[0].top + this.scrollTop,\n behavior: arguments[0].behavior\n });\n };\n\n // Element.prototype.scrollIntoView\n Element.prototype.scrollIntoView = function() {\n // avoid smooth behavior if not required\n if (shouldBailOut(arguments[0]) === true) {\n original.scrollIntoView.call(\n this,\n arguments[0] === undefined ? true : arguments[0]\n );\n\n return;\n }\n\n // LET THE SMOOTHNESS BEGIN!\n var scrollableParent = findScrollableParent(this);\n var parentRects = scrollableParent.getBoundingClientRect();\n var clientRects = this.getBoundingClientRect();\n\n if (scrollableParent !== d.body) {\n // reveal element inside parent\n smoothScroll.call(\n this,\n scrollableParent,\n scrollableParent.scrollLeft + clientRects.left - parentRects.left,\n scrollableParent.scrollTop + clientRects.top - parentRects.top\n );\n\n // reveal parent in viewport unless is fixed\n if (w.getComputedStyle(scrollableParent).position !== 'fixed') {\n w.scrollBy({\n left: parentRects.left,\n top: parentRects.top,\n behavior: 'smooth'\n });\n }\n } else {\n // reveal element in viewport\n w.scrollBy({\n left: clientRects.left,\n top: clientRects.top,\n behavior: 'smooth'\n });\n }\n };\n }\n\n if (typeof exports === 'object' && typeof module !== 'undefined') {\n // commonjs\n module.exports = { polyfill: polyfill };\n } else {\n // global\n polyfill();\n }\n\n}());\n","module.exports = \"build/assets/css/screen.css\";","// Messages\n// --------\n// Keeping all the global messages as values in an object means errors can be found at runtime,\n// rather than mismatched message strings being hidden.\n\n/**\n * Object containing pub-sub message strings\n *\n * @constant\n */\nconst MESSAGES = {\n \"resize\": \"page/resize\",\n \"scroll\": \"page/scroll\",\n \"load\": \"page/loaded\",\n \"contentChange\": \"page-content/change\",\n \"contentDisplayed\": \"page-content/displayed\",\n \"layoutChange\": \"layout/change\",\n \"breakChange\": \"breakpoint/change\",\n \"imageLoaded\": \"image/loaded\",\n \"modalOpened\": \"modal/opened\",\n \"displayModal\": \"modal/display\",\n \"stopMedia\" : \"media/stop\"\n}\n\nexport default MESSAGES;\n","/**\n * createCustomEvent - Returns a custom event object\n *\n * @param {string} eventName Name of the custom event\n * @param {object} eventData Associated data passed through as part of the event object\n *\n * @returns {object} Custom Event object\n */\nexport default function createCustomEvent(eventName, eventData) {\n let customEvent;\n\n if (window.CustomEvent) {\n customEvent = new CustomEvent(eventName, { detail: { data: eventData }, bubbles: true });\n } else {\n customEvent = document.createEvent('CustomEvent');\n customEvent.initCustomEvent(eventName, true, true, { data: eventData });\n }\n\n return customEvent;\n}\n","import delegate from \"delegate\";\nimport createCustomEvent from \"./createCustomEvent\";\n\n/**\n * createDelegatedEventListener - Simple factory function to bind a common delegated event listener to the element\n *\n * @param {string} eventType the event type we're listening for\n * @param {string} selector the selector for the element event is triggered on\n * @param {string} eventToTrigger custom event we want to send back to target element\n * @param {object} eventData data passed as part of triggered custom event\n */\nexport default function createDelegatedEventListener(eventType, selector, eventToTrigger, eventData = null) {\n delegate(document.body, selector, eventType, (e) => {\n e.preventDefault();\n e.stopPropagation();\n const customEvent = createCustomEvent(eventToTrigger, eventData);\n e.target.dispatchEvent(customEvent);\n }, false);\n}\n","// Constants for the SmartImage Component\n\n// Templates\nexport const SEL_PLACEHOLDER_IMAGE = \"img\";\n\n// HTML Classes\nexport const IMAGE_LOADING_CLASS = \"ob_Media--loading\";\nexport const IMAGE_LOADED_CLASS = \"ob_Media--loaded\";\nexport const IMAGE_DISPLAYED_CLASS = \"ob_Media--displayed\";\nexport const IMAGE_FLEX_CLASS = \"ob_Media--flex\";\nexport const IMAGE_HIDDEN_CLASS = \"ob_Media--isHidden\";\n","\n/////////////\n// Imports //\n/////////////\n\nimport \"intersection-observer\";\nimport PubSub from \"pubsub-js\";\nimport imagesLoaded from \"imagesloaded\";\nimport { createCustomEvent, messages as MESSAGES } from \"@wearegood/good-utilities\";\n\n///////////////\n// Constants //\n///////////////\n\nimport * as CONSTANTS from \"Modules/SmartImage/constants\";\n\n/////////////////////////\n// Classes & Functions //\n/////////////////////////\n\n/**\n * SmartImage - Class representing a Smart Image component that loads optimised images based on screen size\n *\n * @export\n * @class SmartImage\n */\nexport default class SmartImage { \n constructor(element, observer) {\n // Set properties\n this.smartImageElem = element;\n this.observer = observer;\n\n this.placeholderImage = this.smartImageElem.querySelector(CONSTANTS.SEL_PLACEHOLDER_IMAGE);\n this.loadingMethod = this.smartImageElem.dataset.imageLoad;\n this.config = JSON.parse(this.smartImageElem.dataset.imageConfig);\n this.imageType = this.config.type || false;\n this.imageReloader = this.config.reload || false;\n this.imageTargetSel = this.smartImageElem.dataset.imageTarget || null;\n this.imageLoaded = false;\n this.imageToAdd = document.createElement(\"img\");\n this.srcset = JSON.parse(this.smartImageElem.dataset.srcSet) || {};\n \n // Add Image Element to observer if it has the \"view\" loading method\n if(this.loadingMethod === 'view') {\n this.observer.observe(this.smartImageElem);\n }\n\n // Call initial methods\n this.bindCustomMessageEvents();\n this.subscribeToEvents();\n\n // Load image immediately if loading method is pageload\n if (this.loadingMethod === \"pageload\") {\n this.getImageFile();\n }\n }\n\n /**\n * calculateImageBreakpointToUse - Description\n *\n * @returns {string} Description\n */\n calculateImageBreakpointToUse() {\n const PAGE_WIDTH = window.innerWidth;\n let imageSrcKey = \"max\";\n\n for (let key in this.srcset) {\n if (this.srcset.hasOwnProperty(key)) {\n // If the current key is not 'max' check that the page width is less than it,\n // and it is less than the current value for imageSrcKey\n if (key !== \"max\") {\n // If imageSrcKey is not set to 'max' check if the key\n // is greater or equal than the page width and also if it\n // is less than the current value of imageSrcKey\n if (imageSrcKey !== \"max\") {\n if (parseInt(key) >= PAGE_WIDTH && parseInt(key) < imageSrcKey) {\n imageSrcKey = key;\n }\n } else {\n // If imageSrcKey is still set to 'max' just check if the key\n // is greater or equal than the page width\n if (parseInt(key) > PAGE_WIDTH) {\n imageSrcKey = key;\n }\n }\n }\n }\n }\n\n // Return the correct key\n return imageSrcKey;\n }\n\n /**\n *\n *\n */\n displayImage() {\n // Stub that is implemented inheritors of this class:\n // * SmartImageBackground\n // * SmartImageInline\n }\n\n /**\n * Load and display a smart image - use this when being in view doesn't matter\n */\n loadImage() {\n if (this.imageLoaded === false || this.imageReloader === true) {\n this.getImageFile(this.smartImageElem);\n }\n }\n\n /**\n * getImageFile - Description\n *\n */\n getImageFile() {\n const THIS_IMAGE_URL = this.srcset[this.calculateImageBreakpointToUse()];\n\n if (THIS_IMAGE_URL !== \"none\") {\n this.smartImageElem.classList.remove(\"is_Hidden\");\n this.imageToAdd.src = THIS_IMAGE_URL;\n\n const IMAGE_LOADER = imagesLoaded(this.imageToAdd);\n\n IMAGE_LOADER.on(\"done\", () => {\n this.displayImage();\n });\n\n } else {\n this.smartImageElem.classList.add(CONSTANTS.IMAGE_HIDDEN_CLASS);\n }\n\n PubSub.publish(MESSAGES.imageLoaded);\n PubSub.publish(MESSAGES.layoutChange);\n }\n\n /**\n * loadSmartImage - Description\n *\n * @param {event} e Description\n */\n loadSmartImage(e) {\n e.preventDefault();\n\n if (this.imageLoaded === false) {\n this.loadImage();\n }\n }\n\n /**\n * reloadImage - Description\n *\n * @param {event} e Description\n */\n reloadImage(e) {\n e.preventDefault();\n\n if (this.imageLoaded === true && this.imageReloader === true) {\n this.getImageFile();\n }\n }\n\n /**\n * loadSmartImageOnClick - Description\n *\n * @param {event} e Description\n */\n loadSmartImageOnClick(e) { \n e.preventDefault();\n\n if (this.imageLoaded === false) {\n this.loadImage(this.smartImageElem);\n }\n }\n\n /**\n * bindCustomMessageEvents - Binds custom event listeners to the Smart Image DOM Element\n *\n */\n bindCustomMessageEvents() {\n this.smartImageElem.addEventListener(\n \"siLoad\",\n this.loadSmartImage.bind(this)\n );\n\n this.smartImageElem.addEventListener(\n \"imageObservedInView\",\n this.loadSmartImage.bind(this)\n );\n \n this.smartImageElem.addEventListener(\n \"siReload\",\n this.reloadImage.bind(this)\n );\n\n this.smartImageElem.addEventListener(\n \"siClickLoad\",\n this.loadSmartImageOnClick.bind(this)\n );\n }\n\n /**\n * subscribeToEvents - Subscribes the component to global messages and sets the component's responses via internal custom events\n *\n */\n subscribeToEvents() {\n if (this.loadingMethod === \"view\") { \n PubSub.subscribe(MESSAGES.load, () => {\n this.smartImageElem.dispatchEvent(createCustomEvent(\"siLoad\"));\n });\n\n PubSub.subscribe(MESSAGES.layoutChange, () => {\n this.smartImageElem.dispatchEvent(createCustomEvent(\"siLoad\"));\n });\n }\n\n PubSub.subscribe(MESSAGES.resize, () => {\n this.smartImageElem.dispatchEvent(createCustomEvent(\"siReload\"));\n });\n\n PubSub.subscribe(MESSAGES.breakChange, () => {\n this.smartImageElem.dispatchEvent(createCustomEvent(\"siReload\"));\n });\n }\n}\n","/////////////\n// Imports //\n/////////////\n\nimport PubSub from \"pubsub-js\";\nimport SmartImage from 'Modules/SmartImage/SmartImage';\n\n///////////////\n// Constants //\n///////////////\n\nimport * as CONSTANTS from \"Modules/SmartImage/constants\";\n\n/////////////////////////\n// Classes & Functions //\n/////////////////////////\n\n/**\n *\n *\n * @export\n * @class SmartImageInline\n * @extends {SmartImage}\n */\nexport default class SmartImageInline extends SmartImage {\n constructor(element, observer) {\n super(element, observer);\n }\n\n /**\n * updateImageAttributes - Description\n *\n * @param {Element} image html element\n *\n */\n updateImageAttributes(image) {\n const IMAGE_ALT = this.smartImageElem.dataset.alt || \"image\";\n const IMAGE_WIDTH = this.smartImageElem.dataset.width;\n const IMAGE_CLASS = this.smartImageElem.dataset.class;\n\n if (IMAGE_ALT.length > 0) {\n image.alt = IMAGE_ALT;\n }\n\n if (IMAGE_WIDTH) {\n image.width = IMAGE_WIDTH;\n }\n\n if (IMAGE_CLASS) {\n image.classList.add(IMAGE_CLASS);\n }\n }\n\n /**\n * displayImage - Display the image as an inline image\n *\n */\n displayImage() {\n // Add 'loading' class to SmartImage container\n this.smartImageElem.classList.add(CONSTANTS.IMAGE_LOADING_CLASS);\n\n if (this.placeholderImage) {\n this.placeholderImage.src = this.imageToAdd.src;\n this.placeholderImage.classList.remove(\"placeholder\");\n this.placeholderImage.removeAttribute(\"width\");\n this.placeholderImage.removeAttribute(\"height\");\n\n this.updateImageAttributes(this.placeholderImage);\n } else {\n this.updateImageAttributes(this.imageToAdd);\n\n if (this.imageTargetSel === null) {\n this.smartImageElem.insertBefore(this.imageToAdd, null);\n }\n\n this.placeholderImage = this.imageToAdd;\n }\n\n this.smartImageElem.classList.add(CONSTANTS.IMAGE_LOADED_CLASS);\n // Need to allow browser a moment to process the addition of the image before displaying it\n window.setTimeout(() => {\n this.smartImageElem.classList.add(CONSTANTS.IMAGE_DISPLAYED_CLASS);\n PubSub.publish(\"content/update\");\n }, 50);\n\n this.imageLoaded = true;\n this.observer.unobserve(this.smartImageElem);\n }\n}","// Image Components module\n\n////////////////////\n// Module Imports //\n//////////////////// \n\nimport \"nodelist-foreach-polyfill\";\nimport \"intersection-observer\";\n\nimport { createCustomEvent, createDelegatedEventListener } from \"@wearegood/good-utilities\";\n\nimport SmartInlineImage from \"Modules/SmartImage/SmartImageInline\";\nimport SmartBackgroundImage from \"Modules/SmartImage/SmartImageBackground\";\n\n////////////////////// \n// Module Constants //\n//////////////////////\n\n// Selectors\nconst SEL_SMART_IMAGE = \"[data-image-load]\";\nconst SEL_CLICK_TO_LOAD_SMART_IMAGE = \"[data-image-load=click] img.placeholder\";\n\n// Image Observer\nconst OBSERVER_OPTIONS = {\n root: null,\n rootMargin: \"0px\",\n threshold: 0\n};\n\nlet imageObserver;\n\n////////////////////////////////\n// Module Classes & Functions //\n////////////////////////////////\n\n/**\n * delegateEvents - Create delegated event listeners for the components managed within this module\n *\n * @returns {type} Description\n */\nfunction delegateEvents() {\n createDelegatedEventListener(\"click\", SEL_CLICK_TO_LOAD_SMART_IMAGE, \"siClickLoad\");\n}\n\n/**\n *\n * Instantiate objects to manage smart image components\n */\nfunction initialiseSmartImages() {\n const SMART_IMAGES = document.querySelectorAll(SEL_SMART_IMAGE);\n\n SMART_IMAGES.forEach(element => {\n const imageType = JSON.parse(element.dataset.imageConfig).type;\n\n if (imageType === \"inline\") {\n let smartImage = new SmartInlineImage(element, imageObserver);\n } else if(imageType === \"background\") {\n let smartImage = new SmartBackgroundImage(element, imageObserver);\n } \n })\n}\n\n/**\n * Handle observed intersections for smart image components\n *\n * @param {*} entries\n * @param {*} observer\n */\nfunction handleSmartImageIntersection(entries, observer) {\n entries.forEach(function (entry) {\n if (entry.intersectionRatio > 0) {\n entry.target.dispatchEvent(\n createCustomEvent(\"imageObservedInView\")\n );\n }\n });\n} \n\n/**\n * Instantiate an IntersectionObserver object for the smart image components\n *\n */\nfunction initialiseSmartImageObserver() {\n if (typeof (window.IntersectionObserver) !== 'undefined') {\n imageObserver = new IntersectionObserver(handleSmartImageIntersection, OBSERVER_OPTIONS);\n }\n}\n\n/**\n * initModule - Initialise this module and the components contained in it\n *\n * @returns {type} Description\n */\nexport default function initSmartImages() {\n // Create delegated event listeners for the components within this module\n delegateEvents();\n\n // Initialise an observer object to detect when smart image elements are in view\n initialiseSmartImageObserver();\n\n // Find and initialise Show/Hide components using the ShowHide class\n initialiseSmartImages();\n}","/////////////\n// Imports //\n/////////////\n\nimport PubSub from \"pubsub-js\";\nimport { messages as MESSAGES} from \"@wearegood/good-utilities\";\nimport SmartImage from \"Modules/SmartImage/SmartImage\";\n\n///////////////\n// Constants //\n///////////////\n\nimport * as CONSTANTS from \"Modules/SmartImage/constants\";\n\n/////////////////////////\n// Classes & Functions //\n/////////////////////////\n\n/**\n *\n *\n * @export\n * @class SmartImageBackground\n * @extends {SmartImage}\n */\nexport default class SmartImageBackground extends SmartImage {\n constructor(element, observer) {\n super(element, observer);\n }\n\n /**\n * displayImage - Display the image as a background image\n *\n * @param {string} path Description\n *\n */\n displayImage() {\n const SMART_IMAGE_CSS = \"url(\" + this.imageToAdd.src + \")\";\n const IMAGE_BACKGROUND_POS = this.smartImageElem.dataset.position;\n const IMAGE_BACKGROUND_COLOR = this.smartImageElem.dataset.backgroundColor;\n \n this.smartImageElem.classList.add(CONSTANTS.IMAGE_FLEX_CLASS);\n this.smartImageElem.classList.add(CONSTANTS.IMAGE_LOADED_CLASS);\n this.smartImageElem.style.backgroundImage = SMART_IMAGE_CSS;\n this.smartImageElem.classList.add(IMAGE_BACKGROUND_POS);\n this.smartImageElem.style.backgroundColor = IMAGE_BACKGROUND_COLOR;\n\n window.setTimeout(() => {\n this.smartImageElem.classList.add(CONSTANTS.IMAGE_DISPLAYED_CLASS);\n PubSub.publish(MESSAGES.contentChange);\n }, 50);\n\n this.imageLoaded = true;\n this.observer.unobserve(this.smartImageElem);\n }\n}","// images module API\nimport initSmartImages from \"Modules/SmartImage/SmartImageManager\";\n\n// API\nexport default {\n initSmartImages: initSmartImages \n}","\nimport PubSub from \"pubsub-js\";\nimport { createCustomEvent } from \"@wearegood/good-utilities\";\n\n///////////////\n// Constants //\n///////////////\n\nconst CLASS_BODY_NAV_VISIBLE = \"nav_Visible\";\n\n/////////////////////////\n// Classes & Functions //\n/////////////////////////\n\n/**\n * Class to manage the toggle control for display of the main navigation menu\n *\n * @export\n * @class MainNavToggle\n */\nexport default class MainNavToggle {\n constructor(element) {\n this.menuToggle = element;\n\n this.bindCustomMessageEvents();\n this.subscribeToEvents();\n }\n\n toggleMenu() {\n document.body.classList.toggle(CLASS_BODY_NAV_VISIBLE);\n }\n \n openMenu() {\n document.body.classList.add(CLASS_BODY_NAV_VISIBLE);\n }\n\n closeMenu() {\n document.body.classList.remove(CLASS_BODY_NAV_VISIBLE);\n }\n\n subscribeToEvents() {\n PubSub.subscribe('navigation/scroll', () => {\n this.menuToggle.dispatchEvent(createCustomEvent(\"closeMainNav\"));\n });\n }\n\n /**\n * Add event handler for main navigation toggle\n * @function\n */\n bindCustomMessageEvents() {\n this.menuToggle.addEventListener(\"toggleMainNav\", this.toggleMenu.bind(this));\n this.menuToggle.addEventListener(\"openMainNav\", this.openMenu.bind(this));\n this.menuToggle.addEventListener(\"closeMainNav\", this.closeMenu.bind(this));\n }\n}","// Navigation Manager \n\n////////////////////\n// Module Imports //\n////////////////////\n\nimport \"nodelist-foreach-polyfill\";\nimport { createDelegatedEventListener } from \"@wearegood/good-utilities\";\nimport MainNavToggle from \"Modules/Navigation/MainNavToggle\";\n\n//////////////////////\n// Module Constants //\n//////////////////////\n\nconst SEL_MAIN_NAV = \"[data-main-nav=component]\";\nconst SEL_MAIN_NAV_TOGGLE = \"[data-main-nav=toggle]\";\nconst SEL_MAIN_NAV_TOGGLE_GLOBAL = \"[data-main-nav=component] [data-main-nav=toggle]\";\nconst SEL_MAIN_NAV_MENU = \"[data-main-nav=menu]\";\nconst SEL_MAIN_NAV_CLOSE_GLOBAL = \"[data-main-nav=component] [data-main-nav=close]\";\nconst SEL_MAIN_NAV_SECONDARY_MENU_CONTAINER = \".cp_MainNav__secondaryMenu\";\nconst SEL_MAIN_NAV_SECONDARY_ITEM = \"li.secondary\";\nconst MENU_SHOW_HIDE_TRANSITION_TIME = 350;\n\n////////////////////////////////\n// Module Classes & Functions //\n////////////////////////////////\n\nfunction initialiseMainNavigation() {\n const NAV_TOGGLE = document.querySelectorAll(SEL_MAIN_NAV_TOGGLE);\n\n Array.prototype.forEach.call(NAV_TOGGLE, element => {\n const newMainNavToggle = new MainNavToggle(element);\n });\n}\n\n/**\n * delegateEvents - Create delegated event listeners for the components managed within this module\n *\n * @returns {type} Description\n */\nfunction delegateEvents() {\n createDelegatedEventListener(\"click\", SEL_MAIN_NAV_TOGGLE, \"toggleMainNav\");\n}\n\n\n/**\n * initModule - Initialise this module and the components contained in it\n *\n * @returns {type} Description\n */\nexport default function initialiseNavigation() {\n // Create delegated event listeners for the components within this module\n delegateEvents();\n initialiseMainNavigation();\n}","////////////////////\n// Module Imports //\n//////////////////// \nimport \"smoothscroll-polyfill\";\nimport PubSub from \"pubsub-js\";\nimport { getOffset, getOuterHeight } from \"@wearegood/good-utilities\";\n\n////////////////////// \n// Module Constants //\n//////////////////////\n\nconst SEL_HEADER = \"#header\";\n\n////////////////////////////////\n// Module Classes & Functions //\n////////////////////////////////\n\nexport default class InPageLink {\n constructor(element) {\n this.inpageLinkElement = element;\n this.inpageURL = this.inpageLinkElement.getAttribute('href');\n\n this.headerHeight = \n\n\n this.bindCustomMessageEvents();\n }\n\n goToPageSection(e) {\n e.preventDefault();\n \n const PAGE_SECTION = document.querySelector(this.inpageURL);\n const HEADER = document.querySelector(SEL_HEADER);\n\n if(PAGE_SECTION) {\n const TOP_OFFSET = getOffset(PAGE_SECTION).top;\n const HEADER_HEIGHT = getOuterHeight(HEADER);\n\n const SCROLL_OFFSET = TOP_OFFSET - HEADER_HEIGHT;\n\n window.scroll({\n top: SCROLL_OFFSET,\n left: 0,\n behavior: 'smooth'\n });\n\n PubSub.publish('navigation/scroll');\n }\n }\n\n bindCustomMessageEvents() {\n this.inpageLinkElement.addEventListener(\"goToPageSection\", this.goToPageSection.bind(this));\n }\n}","/**\n * getOffset - Return an object with the top and left offsets of an element\n *\n * @param {element} el Single DOM element\n *\n * @returns {object} Simple object with left and top properties\n */\nexport default function getOffset(el) {\n const element = el.getBoundingClientRect();\n\n return {\n left: element.left + window.scrollX,\n top: element.top + window.scrollY\n }\n}\n","/**\n * Returns the height of an element including vertical margins\n * \n * @param {Element} el\n */\nexport default function getOuterHeight(el) {\n let height = parseInt(el.offsetHeight);\n const STYLE = getComputedStyle(el);\n\n height += parseInt(STYLE.marginTop) + parseInt(STYLE.marginBottom);\n return height;\n}","////////////////////\n// Module Imports //\n//////////////////// \n\n\nimport \"nodelist-foreach-polyfill\";\nimport { createDelegatedEventListener } from \"@wearegood/good-utilities\";\n\nimport InPageLink from \"Modules/Navigation/InPageLink\";\n\n////////////////////// \n// Module Constants //\n//////////////////////\n\nconst SEL_INPAGE_LINK = \"[data-inpage-link=component]\";\n\n////////////////////////////////\n// Module Classes & Functions //\n////////////////////////////////\n\nfunction initialiseInPageLinks() {\n const INPAGE_LINKS = document.querySelectorAll(SEL_INPAGE_LINK);\n\n INPAGE_LINKS.forEach(element => {\n let inpageLink = new InPageLink(element); \n })\n}\n\n/**\n * delegateEvents - Create delegated event listeners for the components managed within this module\n *\n * @returns {type} Description\n */\nfunction delegateEvents() {\n createDelegatedEventListener(\"click\", SEL_INPAGE_LINK, \"goToPageSection\");\n}\n\n\n/**\n * initModule - Initialise this module and the components contained in it\n *\n * @returns {type} Description\n */\nexport default function initialiseInPageNav() {\n // Create delegated event listeners for the components within this module\n delegateEvents(); \n initialiseInPageLinks();\n}","// Public API for this module\nimport initialiseNavigation from \"Modules/Navigation/NavigationManager\";\nimport initialiseInPageNav from \"Modules/Navigation/InPageManager\";\n\n// API\nexport default {\n initialiseNavigation: initialiseNavigation,\n initialiseInPageNav: initialiseInPageNav\n}","\n/////////////\n// Imports //\n/////////////\n\nimport \"intersection-observer\";\nimport PubSub from \"pubsub-js\";\nimport { createCustomEvent, messages as MESSAGES } from \"@wearegood/good-utilities\";\n\n///////////////\n// Constants //\n///////////////\n\nconst CLASS_VISIBLE = \"is_Visible\";\nconst CLASS_STEP_BASE = \"stage-\";\nconst SEL_PANEl_CONTENT = \"[data-parallax=content]\";\n\n////////////////////////////////\n// Module Classes & Functions //\n////////////////////////////////\n\nexport default class ParallaxPanel {\n constructor(element, observer) {\n this.panelElem = element;\n this.panelContentElem = this.panelElem.querySelector(SEL_PANEl_CONTENT);\n this.observer = observer;\n\n this.panelElem.classList.add('has_Motion');\n \n this.currThreshold = 0;\n this.prevThreshold = 0;\n \n this.observer.observe(this.panelElem); \n this.bindCustomMessageEvents();\n }\n\n updateParallaxPanel(e) {\n this.currThreshold = e.detail.data.thresholdRatio;\n\n // Set the visibility of the panel contents, controlled by a single class\n if (this.currThreshold > this.prevThreshold) {\n const STAGE_NUMBER = Math.floor(this.currThreshold * 10);\n this.panelElem.classList.add(CLASS_STEP_BASE + STAGE_NUMBER);\n } else if (this.currThreshold < this.prevThreshold) {\n const STAGE_NUMBER = Math.ceil(this.currThreshold * 10);\n this.panelElem.classList.remove(CLASS_STEP_BASE + STAGE_NUMBER);\n }\n\n // Set the transform offset to keep the contents relatively fixed in position\n //this.panelContentElem.setAttribute('style','transform:translateY(calc((' + this.currThreshold + ' * 50vh)) * -1');\n\n // Update previous threshold for next time around...\n this.prevThreshold = this.currThreshold;\n }\n\n bindCustomMessageEvents() {\n this.panelElem.addEventListener(\n \"parallaxPanelObservedInView\",\n this.updateParallaxPanel.bind(this)\n );\n }\n}\n","\n////////////////////\n// Module Imports //\n//////////////////// \n\nimport \"nodelist-foreach-polyfill\";\nimport \"intersection-observer\";\nimport { createCustomEvent } from \"@wearegood/good-utilities\";\nimport ParallaxPanel from \"Modules/Animation/ParallaxPanel\";\nimport ParallaxContainer from \"Modules/Animation/ParallaxContainer\";\n\n////////////////////// \n// Module Constants //\n//////////////////////\n\nconst SEL_PARALLAX_CONTAINER = \"[data-parallax=container]\";\nconst SEL_PARALLAX_PANEL = \"[data-parallax=panel]\";\n\n// Image Observer\nconst OBSERVER_OPTIONS = {\n root: null,\n rootMargin: \"0px\",\n threshold: 0\n};\n\nlet panelObserver;\nlet containerObserver; \n\n////////////////////////////////\n// Module Classes & Functions //\n////////////////////////////////\n\nconst thresholdArray = function (num) {\n const arr = []\n const levels = num\n while (num--) {\n arr[num] = num / levels\n }\n return arr\n}\n\n\n/**\n * Handle observed intersections for parallax panel components\n *\n * @param {*} entries\n * @param {*} observer\n */\nfunction handleParallaxPanelIntersection(entries, observer) {\n entries.forEach(function (entry) {\n if (entry.intersectionRatio > 0) {\n entry.target.dispatchEvent(createCustomEvent(\"parallaxPanelObservedInView\", { thresholdRatio: entry.intersectionRatio}));\n }\n });\n}\n\n\nfunction handleParallaxContainerIntersection(entries, observer) {\n entries.forEach(function (entry) {\n entry.target.dispatchEvent(createCustomEvent(\"parallaxContainerObservedIntersecting\", { thresholdRatio: entry.intersectionRatio }));\n });\n}\n\n/**\n * Instantiate an IntersectionObserver object for the parallax panel components\n *\n */\nfunction initialiseParallaxPanelObserver() {\n if (typeof (window.IntersectionObserver) !== 'undefined') {\n OBSERVER_OPTIONS.threshold = thresholdArray(10);\n panelObserver = new IntersectionObserver(handleParallaxPanelIntersection, OBSERVER_OPTIONS);\n }\n}\n\n/**\n *\n *\n */\nfunction initialiseParallaxContainerObserver() {\n if (typeof (window.IntersectionObserver) !== 'undefined') {\n OBSERVER_OPTIONS.threshold = 0;\n containerObserver = new IntersectionObserver(handleParallaxContainerIntersection, OBSERVER_OPTIONS);\n }\n}\n \n/**\n *\n *\n */\nfunction initialiseParallaxPanels() {\n const PARALLAX_PANELS = document.querySelectorAll(SEL_PARALLAX_PANEL);\n\n PARALLAX_PANELS.forEach(element => {\n let parallaxPanel = new ParallaxPanel(element, panelObserver);\n })\n}\n\n/**\n *\n *\n */\nfunction initialiseParallaxContainers() {\n const PARALLAX_CONTAINERS = document.querySelectorAll(SEL_PARALLAX_CONTAINER);\n console.log(containerObserver);\n PARALLAX_CONTAINERS.forEach(element => {\n let parallaxContainer = new ParallaxContainer(element, containerObserver);\n })\n}\n\n/**\n *\n *\n * @export\n */\nexport default function initParallax() {\n initialiseParallaxContainerObserver();\n initialiseParallaxPanelObserver();\n \n initialiseParallaxContainers();\n initialiseParallaxPanels();\n}","\n////////////////////\n// Module Imports //\n//////////////////// \n\nimport PubSub from \"pubsub-js\";\nimport { messages as MESSAGES, createCustomEvent } from \"@wearegood/good-utilities\";\n \n////////////////////// \n// Module Constants //\n//////////////////////\n\n\n////////////////////////////////\n// Module Classes & Functions //\n////////////////////////////////\n\nexport default class ParallaxContainer {\n \n /**\n * Creates an instance of ParallaxContainer.\n * @param {*} element\n * @param {*} observer\n * @memberof ParallaxContainer\n */\n constructor(element, observer) {\n this.containerElem = element;\n this.observer = observer;\n\n this.observer.observe(this.containerElem); \n\n this.inView = false;\n\n this.bindCustomMessageEvents();\n this.subscribeToEvents();\n }\n\n /** \n *\n *\n * @param {*} e\n * @memberof ParallaxContainer\n */\n updateOffset(e) {\n e.preventDefault();\n\n const elemOffset = this.containerElem.getBoundingClientRect().top;\n const scrollPos = window.scrollY;\n\n let calculatedOffset = (elemOffset * -1) + (window.innerHeight / 4);\n\n if(calculatedOffset < 0) {\n calculatedOffset = 0;\n }\n\n if (this.inView && calculatedOffset > 0) {\n calculatedOffset = calculatedOffset + 'px'; \n this.containerElem.style.setProperty('--offset', calculatedOffset);\n this.containerElem.classList.add('is_Offset');\n } else {\n this.containerElem.classList.remove('is_Offset');\n }\n };\n\n checkInView(e) {\n const threshold = e.detail.data.thresholdRatio;\n\n if(threshold > 0) {\n this.inView = true;\n } else {\n this.inView = false;\n }\n }\n\n /**\n *\n *\n * @memberof ParallaxContainer\n */\n bindCustomMessageEvents() {\n this.containerElem.addEventListener(\n \"updateOffset\", \n this.updateOffset.bind(this)\n );\n\n this.containerElem.addEventListener(\n \"parallaxContainerObservedIntersecting\",\n this.checkInView.bind(this)\n );\n }\n\n /**\n * Subscribe object to Global Messages\n *\n * @memberof ParallaxContainer\n */\n subscribeToEvents() {\n window.addEventListener('scroll', (event) => {\n // Publish global message\n this.updateOffset(event);\n }); \n }\n}\n\n\n\n","// Public API for this module\nimport initParallax from \"Modules/Animation/ParallaxManager\";\n\n// API\nexport default {\n initParallax: initParallax\n} ","\n/////////////\n// Imports //\n/////////////\n\nimport { createNodeFromHTML, createDelegatedEventListener, createCustomEvent, createGlobalMessenger as createGlobal, messages as MESSAGES, trackPageEvent } from \"@wearegood/good-utilities\";\n\n\n///////////////\n// Constants //\n///////////////\n\nconst CLASS_VIDEO_DISPLAYED = \"is_Visible\";\nconst SEL_VIDEO_POSTER = \"[data-video-embed-player=poster]\";\n\nconst IFRAME_TEMPLATE = `\n \n`\n\n////////////////////////////////\n// Module Classes & Functions //\n////////////////////////////////\n\nexport default class VideoEmbedPlayer {\n constructor(element) {\n this.videoPlayer = element;\n this.videoURL = this.videoPlayer.dataset.videoUrl;\n this.videoIframe = createNodeFromHTML(IFRAME_TEMPLATE).item(0);\n this.videoLoaded = false;\n\n this.bindCustomMessageEvents();\n }\n\n openVideo(e) {\n e.preventDefault();\n // If the video has previously been loaded, don't do it again. Just display\n // the existing iframe.\n if(!this.videoLoaded && this.videoURL) {\n if (this.videoURL.indexOf('youtube') > -1) {\n if (this.videoURL.indexOf('?') > -1 && this.videoURL.indexOf('enablejsapi=1') === -1) {\n this.videoURL = this.videoURL + '&enablejsapi=1';\n }\n }\n\n this.videoIframe.setAttribute('src', this.videoURL);\n this.videoPlayer.appendChild(this.videoIframe);\n\n }\n\n this.videoPlayer.classList.add(CLASS_VIDEO_DISPLAYED);\n this.videoLoaded = true;\n }\n\n closeVideo(e) {\n e.preventDefault();\n this.videoPlayer.classList.remove(CLASS_VIDEO_DISPLAYED);\n this.videoPlayer.removeChild(this.videoIframe);\n this.videoLoaded = false;\n }\n\n bindCustomMessageEvents() {\n this.videoPlayer.addEventListener(\"openVideo\", this.openVideo.bind(this));\n this.videoPlayer.addEventListener(\"closeVideo\", this.closeVideo.bind(this));\n }\n}","/**\n * Create HTML elements from a string containing HTML tags and content\n *\n * @export\n * @param {*} htmlString\n * @returns\n */\nexport default function createNodeFromHTML(htmlString) {\n const CONTAINER_ELEMENT = document.createElement('div');\n \n CONTAINER_ELEMENT.innerHTML = htmlString.trim();\n \n // Change this to div.childNodes to support multiple top-level nodes\n // return CONTAINER_ELEMENT.firstChild;\n return CONTAINER_ELEMENT.childNodes;\n}","\n////////////////////\n// Module Imports //\n//////////////////// \n\nimport \"nodelist-foreach-polyfill\";\nimport \"intersection-observer\";\nimport { createDelegatedEventListener } from \"@wearegood/good-utilities\";\n\nimport VideoEmbedPlayer from \"Modules/VideoEmbedPlayer/VideoEmbedPlayer\";\n\n////////////////////// \n// Module Constants //\n//////////////////////\n\nconst SEL_VIDEO_EMBED_PLAYER = \"[data-video-embed-player=component]\";\nconst SEL_VIDEO_EMBED_OPEN = \"[data-video-embed-player=open]\";\nconst SEL_VIDEO_EMBED_CLOSE = \"[data-video-embed-player=close]\";\n\n////////////////////////////////\n// Module Classes & Functions //\n////////////////////////////////\n\nfunction delegateEvents() { \n createDelegatedEventListener(\"click\", SEL_VIDEO_EMBED_OPEN, \"openVideo\");\n createDelegatedEventListener(\"click\", SEL_VIDEO_EMBED_CLOSE, \"closeVideo\");\n}\n\n/**\n *\n *\n */\nfunction initialiseVideoEmbedPlayers() {\n const VIDEO_EMBED_PLAYERS = document.querySelectorAll(SEL_VIDEO_EMBED_PLAYER);\n\n VIDEO_EMBED_PLAYERS.forEach(element => {\n let videoPlayer = new VideoEmbedPlayer(element);\n })\n}\n\nexport default function initVideoEmbedPlayers() {\n initialiseVideoEmbedPlayers();\n delegateEvents(); \n}","\nimport initVideoEmbedPlayers from \"Modules/VideoEmbedPlayer/VideoEmbedManager\";\n\n// API\nexport default {\n initVideoEmbedPlayers: initVideoEmbedPlayers\n}","/**\n * ready - Call a function when the page DOM is loaded and complete\n *\n * @param {function} fn Description\n */\nexport default function ready(fn) {\n if (document.attachEvent ? document.readyState === \"complete\" : document.readyState !== \"loading\") {\n fn();\n } else {\n document.addEventListener('DOMContentLoaded', fn);\n }\n}","\"use strict\";\n\nimport { ready, bindGlobalMessages } from \"@wearegood/good-utilities\";\n\n//import ModalAPI from \"Modules/Modal\";\nimport SmartImageAPI from \"Modules/SmartImage\";\nimport NavigationAPI from \"Modules/Navigation\";\nimport AnimationAPI from \"Modules/Animation\"; \nimport VideoEmbedAPI from \"Modules/VideoEmbedPlayer\"; \n\n/**\n * initialiseComponentModules - call module init functions\n *\n * @returns {type} Description\n */ \nfunction initialiseComponentModules() { \n bindGlobalMessages();\n\n NavigationAPI.initialiseInPageNav();\n NavigationAPI.initialiseNavigation();\n SmartImageAPI.initSmartImages(); \n //ModalAPI.initialiseModals();\n AnimationAPI.initParallax();\n VideoEmbedAPI.initVideoEmbedPlayers();\n}\n\nready(initialiseComponentModules);\n","import PubSub from \"pubsub-js\";\nimport debounce from \"debounce\";\n\nimport MESSAGES from \"./messages\";\n\n/**\n * bindGlobalMessages - Binds event listeners to global browser events and fires global messages in response\n *\n * @returns {type} Description\n */\nexport default function bindGlobalMessages() {\n // Handle page scroll if browser doesn't support IntersectionObserver API.\n // This may have to be updated if we're looking to bind events and activity\n // to the actual page scroll, rather than using it as a IO fallback, but for\n // now let's assume that's what's going on here.\n window.addEventListener('scroll', function () {\n // Publish global message\n PubSub.publish(MESSAGES.scroll);\n });\n\n // Handle debounced resize\n window.onresize = debounce(function () {\n // Publish global message\n PubSub.publish(MESSAGES.resize);\n }, 200);\n}\n"],"sourceRoot":""}