{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./Content/js/app/lib/util.js","webpack:///./Content/js/app/lib/module.js","webpack:///./Content/js/app/modules/banner-tiles.js"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","1","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","$","ReferenceError","Util","desktopWideBreakpoint","desktopNarrowBreakpoint","tabletBreakpoint","getViewPort","func","delay","immediate","timeout","context","this","args","arguments","later","callNow","clearTimeout","setTimeout","method","message","jQuery","selector","currentTallest","currentRowStart","rowDivs","each","el","elem","outerHeight","currentDiv","topPostion","position","top","url","hasValue","location","href","replace","results","RegExp","exec","decodeURIComponent","width","innerWidth","ViewPort","DesktopWide","DesktopNarrow","Tablet","Mobile","str","char","trim","global","__module","__module_instances","Map","__module_registry","instances","registry","validateModuleOptions","options","errors","success","Module","bindEvents","_bindEvents","init","_init","intialization","emit","_main","Date","now","main","target","descriptor","TypeError","validation","Error","join","set","has","M","definition","instance","load","async","item","EventEmitter","define","bannerTileMain","thumbnail","on","e","tileSwitch","$this","currentTarget","mainImage","hasClass","removeClass","addClass","find","css","replaceWith","clone"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GA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AAKC,WAAWD,Q,iCAG/CA,GAEP,IAAIE,EAAQhG,EAAE8F,EAAEG,eACZC,EAAYF,EAAM9J,KAAK,cAGtB8J,EAAMG,SAAS,YAEhBvF,KAAKgF,UAAUQ,YAAY,UAC3BJ,EAAMK,SAAS,UAGfzF,KAAK+E,eAAeW,KAAK,UAAUC,IAAI,mBAAoB,QAAUL,EAAY,MAEjFtF,KAAK+E,eAAeW,KAAK,gBAAgBE,YAAYR,EAAMM,KAAK,gBAAgBG,e,8BA9BlEzC","file":"banner-tiles.min.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t1: 0\n \t};\n\n \tvar deferredModules = [];\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 \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([132,0]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","// check for jquery\r\nif ('undefined' === typeof $) throw new ReferenceError('jQuery ($) is undefined. Please load jquery before your bundle.')\r\n//\r\n/**\r\n * Static class of utility functions, and the like.\r\n * \r\n * @namespace Util\r\n */\r\nclass Util {\r\n /**\r\n * Check the viewport type, based on the specified breakpoints\r\n * \r\n * @deprecated Use Util.getViewPort() instead.\r\n * @static\r\n * @param {number} [desktopWideBreakpoint=1170] desktop\r\n * @param {number} [desktopNarrowBreakpoint=970] narrow\r\n * @param {number} [tabletBreakpoint=750] tablet\r\n * @returns {ViewPort} The viewport (desktop|mobile|tablet)\r\n * @memberof Util\r\n */\r\n\tstatic checkWidth(desktopWideBreakpoint, desktopNarrowBreakpoint, tabletBreakpoint) {\r\n // Util.deprecate('Util.checkWidth()', 'Use Util.getViewPort() instead')\r\n return Util.getViewPort(desktopWideBreakpoint, desktopNarrowBreakpoint, tabletBreakpoint);\r\n }\r\n\r\n /**\r\n * Debounce a function\r\n * \r\n * @static\r\n * @param {function} func func\r\n * @param {number} [delay=150] delay\r\n * @param {boolean} [immediate=false] immediate\r\n * @returns {function} function\r\n * @memberof Util\r\n */\r\n static debounce(func, delay, immediate) {\r\n delay = delay || 150;\r\n immediate = immediate === true || false;\r\n\r\n var timeout;\r\n return function () {\r\n var context = this;\r\n var args = arguments;\r\n\r\n var later = function () {\r\n timeout = null;\r\n if (!immediate) {\r\n func.apply(context, args);\r\n }\r\n };\r\n\r\n var callNow = immediate && !timeout;\r\n window.clearTimeout(timeout);\r\n timeout = window.setTimeout(later, delay);\r\n if (callNow) {\r\n func.apply(context, args);\r\n }\r\n };\r\n }\r\n\r\n /**\r\n * Logs a depreciation notice to the console\r\n * \r\n * @static\r\n * @param {string|function} method The name of the method, or the method being deprecated\r\n * @param {string} [message=''] An additional message\r\n * @memberof Util\r\n */\r\n static deprecate(method, message) {\r\n message = message || '';\r\n var name = method;\r\n\r\n if ('function' === typeof method) {\r\n name = method.name;\r\n }\r\n\r\n console.warn(`[Deprecation] ${name}. ${message}`);\r\n }\r\n\r\n /**\r\n * Throws an error if `window.$` or `window.jQuery` is undefined\r\n * \r\n * @static\r\n * @memberof Util\r\n * @throws {ReferenceError}\r\n */\r\n static ensureJQuery() {\r\n if ('undefined' === typeof $ || 'undefined' === typeof jQuery) throw new ReferenceError('jQuery ($) is undefined. Please load jQuery before your bundle.');\r\n }\r\n\r\n /**\r\n * Set all elements in jquery-compatible selection to the height of the element in the collection with the largest height (within a row)\r\n * \r\n * @static\r\n * @param {string|JObject} selector selector\r\n * @memberof Util\r\n */\r\n static equalHeight(selector) {\r\n var currentTallest = 0;\r\n var currentRowStart = 0;\r\n var rowDivs = [];\r\n\r\n $(selector).each((i, el) => {\r\n var elem = $(el);\r\n elem.outerHeight('auto');\r\n var topPostion = elem.position().top;\r\n var currentDiv;\r\n\r\n if (currentRowStart !== topPostion) {\r\n for (currentDiv = 0; currentDiv < rowDivs.length; currentDiv++) {\r\n rowDivs[currentDiv].outerHeight(currentTallest);\r\n }\r\n rowDivs.length = 0; // empty the array\r\n currentRowStart = topPostion;\r\n currentTallest = elem.outerHeight();\r\n rowDivs.push(elem);\r\n } else {\r\n rowDivs.push(elem);\r\n currentTallest = currentTallest < elem.outerHeight() ? elem.outerHeight() : currentTallest;\r\n }\r\n for (currentDiv = 0; currentDiv < rowDivs.length; currentDiv++) {\r\n rowDivs[currentDiv].outerHeight(currentTallest);\r\n }\r\n });\r\n }\r\n\r\n\r\n static equalHeightAll(selector) {\r\n var currentTallest = 0;\r\n var currentRowStart = 0;\r\n var rowDivs = [];\r\n\r\n $(selector).each((i, el) => {\r\n var elem = $(el);\r\n elem.outerHeight('auto');\r\n var currentDiv;\r\n\r\n rowDivs.push(elem);\r\n currentTallest = currentTallest < elem.outerHeight() ? elem.outerHeight() : currentTallest;\r\n\r\n for (currentDiv = 0; currentDiv < rowDivs.length; currentDiv++) {\r\n rowDivs[currentDiv].outerHeight(currentTallest);\r\n }\r\n });\r\n }\r\n\r\n static getQueryString(name, url) {\r\n if (!Util.hasValue(url)) url = window.location.href;\r\n\r\n name = name.replace(/[\\[\\]]/g, '\\\\$&');\r\n\r\n let regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)');\r\n let results = regex.exec(url);\r\n\r\n if (!results) return null;\r\n if (!results[2]) return '';\r\n let value = decodeURIComponent(results[2].replace(/\\+/g, ' '));\r\n return value;\r\n }\r\n\r\n\r\n\tstatic getViewPort(desktopWideBreakpoint, desktopNarrowBreakpoint, tabletBreakpoint) {\r\n\t\tdesktopWideBreakpoint = desktopWideBreakpoint || 1170\r\n desktopNarrowBreakpoint = desktopNarrowBreakpoint || 992\r\n tabletBreakpoint = tabletBreakpoint || 621\r\n\r\n var width = window.innerWidth;\r\n\r\n\t\tif (width >= desktopWideBreakpoint) {\r\n\t\t\treturn ViewPort.DesktopWide\r\n\t\t}else if (width >= desktopNarrowBreakpoint) {\r\n return ViewPort.DesktopNarrow;\r\n } else if (width >= tabletBreakpoint) {\r\n return ViewPort.Tablet;\r\n }\r\n return ViewPort.Mobile;\r\n }\r\n\r\n /**\r\n * Determine if `value` is NOT null, or undefined, or if `value` is a string, is NOT empty\r\n * \r\n * @static\r\n * @param {any} value value\r\n * @returns {boolean} A boolean indication if `value` is not undefined, null, or an empty string\r\n * @memberof Util\r\n */\r\n static hasValue(value) {\r\n var hasValue = value !== undefined && value !== null;\r\n\r\n if (hasValue && 'string' === typeof (value)) {\r\n hasValue = hasValue && value !== \"\";\r\n }\r\n\r\n return hasValue;\r\n }\r\n\r\n /**\r\n * Trim whitespace from both sides of a string, as well as occurences of the specified character\r\n * \r\n * @static\r\n * @param {string} str str\r\n * @param {string} char char\r\n * @returns {string} The trimmed string\r\n * @memberof Util\r\n */\r\n static trim(str, char) {\r\n if (str === null || str === undefined) return \"\";\r\n\r\n let value = str.trim();\r\n if (Util.hasValue(char)) value = value.replace(new RegExp(`(^${char}|${char}$)`, \"g\"), \"\");\r\n\r\n return value;\r\n }\r\n}\r\n\r\nexport default Util;\r\n\r\n\r\n/**\r\n * @enum {string} ViewPort\r\n * @memberof Util\r\n * @example\r\n * import Util, { ViewPort } from './util';\r\n * console.log(Util.getViewPort() === ViewPort.Desktop) // -> true\r\n */\r\nconst ViewPort = {\r\n\tDesktopWide: 'desktopWide',\r\n\tDesktopNarrow: 'desktopNarrow',\r\n Mobile: 'mobile',\r\n Tablet: 'tablet'\r\n};\r\nexport { ViewPort };\r\n","import EventEmitter from 'events'\r\n\r\nimport Util from './util'\r\n\r\nif (!global.__module) {\r\n global.__module_instances = new Map()\r\n global.__module_registry = new Map()\r\n\r\n global.__module = true\r\n}\r\n\r\nconst instances = window.__module_instances\r\nconst registry = window.__module_registry\r\n\r\nconst validateModuleOptions = (options = {}) => {\r\n const errors = []\r\n\r\n if (!Util.hasValue(options.name)) errors.push('name is required')\r\n\r\n return {\r\n errors,\r\n success: errors.length === 0\r\n }\r\n}\r\n\r\nclass Module extends EventEmitter {\r\n static define(options = {}) {\r\n return (target, key, descriptor) => {\r\n if (typeof target !== 'function' || !(target.prototype instanceof Module)) throw new TypeError('target is not a subclass of Module')\r\n\r\n if (typeof options === 'string') {\r\n options = {\r\n name: options\r\n }\r\n }\r\n\r\n const validation = validateModuleOptions(options)\r\n if (!validation.success) throw new Error(`Invalid Module Definition: \\n${validation.errors.join('\\n')}`)\r\n\r\n registry.set(options.name, {\r\n options,\r\n module: target\r\n })\r\n }\r\n }\r\n\r\n async _bindEvents() {\r\n return this.bindEvents()\r\n }\r\n\r\n async bindEvents() { }\r\n\r\n static get(name) {\r\n if (instances.has(name)) return instances.get(name)\r\n\r\n if (registry.has(name)) console.warn(`[Module] Module has ${name} registered, but an instance hasn't been loaded`)\r\n\r\n return undefined\r\n }\r\n\r\n async _init() {\r\n await this._bindEvents()\r\n return this.init()\r\n }\r\n\r\n async init() {\r\n return true\r\n }\r\n\r\n async load() {\r\n const intialization = await this._init()\r\n this.emit('init', intialization)\r\n\r\n // no await, make it async\r\n this._main()\r\n\r\n this.emit('loaded', Date.now())\r\n\r\n return this\r\n }\r\n\r\n static async load(M, definition) {\r\n let instance = new M()\r\n instances.set(definition, instance)\r\n\r\n await instance.load()\r\n\r\n return instance\r\n }\r\n\r\n static async loadAll(options = {}) {\r\n const async = !!options.async\r\n for (let [name, item] of registry) {\r\n if (async) {\r\n Module.load(item.module, item.options)\r\n } else {\r\n await Module.load(item.module, item.options)\r\n }\r\n }\r\n }\r\n\r\n async _main() {\r\n return this.main()\r\n }\r\n\r\n async main() { }\r\n}\r\n\r\nexport default Module\r\n","import Module from 'lib/module';\r\nimport Util from 'lib/util';\r\n\r\n@Module.define('banner-tiles')\r\nclass BannerTiles extends Module {\r\n\r\n constructor(options) {\r\n super(options);\r\n\r\n this.bannerTileMain = $('.js-banner-tile-main');\r\n this.thumbnail = $('.js-banner-tile-thumbs li');\r\n }\r\n\r\n main() {\r\n }\r\n\r\n bindEvents() {\r\n this.thumbnail.on('click touch', e => this.tileSwitch(e));\r\n }\r\n\r\n tileSwitch(e) {\r\n // Set variables for dynamic items we need to grab\r\n let $this = $(e.currentTarget);\r\n let mainImage = $this.data('image-main');\r\n\r\n // If tile is already active, bail\r\n if (!$this.hasClass('active')) {\r\n // Switch active class\r\n this.thumbnail.removeClass('active');\r\n $this.addClass('active');\r\n\r\n // Swtich out image\r\n this.bannerTileMain.find('.image').css('background-image', 'url(\"' + mainImage + '\")');\r\n // Switch out copy\r\n this.bannerTileMain.find('.description').replaceWith($this.find('.description').clone());\r\n }\r\n }\r\n}"],"sourceRoot":""}