{"version":3,"sources":["webpack:/// [synthetic:util/global] ","webpack:/// [synthetic:es6/symbol] ","webpack:///luminous.min.js","webpack:///webpack/bootstrap","webpack:///./src/js/LuminousGallery.js","webpack:///./src/js/Luminous.js","webpack:///./src/js/injectBaseStylesheet.js","webpack:///./src/js/Lightbox.js","webpack:///./src/js/util/dom.js","webpack:///./src/js/util/throwIfMissing.js","webpack:///./src/js/lum-browser.js"],"names":["$jscomp.global","$jscomp.initSymbol","$jscomp.Symbol","$jscomp.symbolCounter_","$jscomp.SYMBOL_PREFIX","modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","d","__webpack_require__.d","name","getter","o","Object","defineProperty","enumerable","get","r","__webpack_require__.r","Symbol","toStringTag","value","t","__webpack_require__.t","mode","__esModule","ns","create","key","bind","n","__webpack_require__.n","getDefault","getModuleExports","__webpack_require__.o","object","property","prototype","hasOwnProperty","p","s","__webpack_exports__","constructor","LuminousGallery_LuminousGallery","triggers","options","luminousOpts","settings","arrowNavigation","onChange","_constructLuminousInstances","Luminous_Luminous","trigger","destroy","open","close","_handleKeyup","isOpen","isDOMElement","TypeError","rootNode","document","getRootNode","appendToNode","body","namespace","sourceAttribute","caption","openTrigger","closeTrigger","closeWithEscape","closeOnScroll","closeButtonEnabled","appendToSelector","onOpen","onClose","includeImgixJSClass","injectBaseStyles","_gallery","_arrowNavigation","_onChange","injectionRoot","node","head","querySelector","styleEl","createElement","type","classList","add","appendChild","createTextNode","RULES","insertBefore","firstChild","_buildLightbox","_bindEventListeners","Lightbox_Lightbox","_sizeImgWrapperEl","showNext","showPrevious","_completeOpen","_completeClose","_handleKeydown","_handleClose","parentEl","throwIfMissing","triggerEl","currentTrigger","openClasses","_buildClasses","openingClasses","closingClasses","elementBuilt","hasBeenLoaded","obj","HAS_SHADOW","ShadowRoot","HAS_DOM_2","HTMLElement","nodeType","nodeName","addClasses","el","classNames","forEach","className","removeClasses","remove","Error","HAS_ANIMATION","style","e","preventDefault","target","contains","addEventListener","closeButtonEl","suffix","classes","push","_buildElement","innerEl","loaderEl","imgWrapperEl","positionHelperEl","imgEl","captionEl","_setUpGalleryElements","_updateImgSrc","_updateCaption","_buildGalleryButton","fn","btn","innerText","stopPropagation","width","this","clientWidth","maxWidth","height","clientHeight","maxHeight","captionType","innerHTML","imageURL","getAttribute","loadingClasses","onload","this.imgEl.onload","setAttribute","LEFT_ARROW","keyCode","RIGHT_ARROW","nextTrigger","previousTrigger","window","removeEventListener","removeChild","lightbox","_unbindEvents","luminousInstances","triggerLen","length","lum","nextTriggerIndex","Array","indexOf","prevTriggerIndex","instance"],"mappings":";;;;;AA2CA,IAAAA,EAb2B,oBAAV,QAAyB,SAaP,UAXX,oBAAV,QAAmC,MAAV,OAAkB,OAWtB,KChBd,aAEnBC,EAAqB,aAEhBD,EAAA,SACHA,EAAA,OAA2BE,GAM/B,IAAAC,EAAyB,EASR,WAAS,GACxB,MA5BsBC,kBA6BO,GAAmB,IAAOD,KCjD/C,SAASE,GCInBC,WAAAC,GAGA,GAAAC,EAAAD,GACA,OAACC,EAADD,GAAAE,EAGA,IAAAC,EAAAF,EAAAD,GAAA,CACAI,GAAAJ,EACAK,IAAA,EACAH,EAAA,IAUA,OANAJ,EAAAE,GAAAM,KAAAH,EAAAD,EAAAC,IAAAD,EAAAH,GAGAI,EAAAE,IAAA,EAGCF,EAADD,EAvBA,IAAAD,EAAA,GA4BAF,EAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAAC,SAAAR,EAAAS,EAAAC,GACAb,EAAAc,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,EAAA,CAA0CK,YAAA,EAAAC,IAAAL,KAK1Cb,EAAAmB,EAAAC,SAAAjB,GACAR,QAAA,oBAAC0B,QAADA,OAAAC,cACA3B,IAAAoB,OAAAC,eAAAb,EAAAkB,OAAAC,YAAA,CAAwDC,MAAA,YAExDR,OAAAC,eAAAb,EAAA,cAAiDoB,OAAA,KAQjDvB,EAAAwB,EAA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/ (function(modules) { // webpackBootstrap\n/******/ \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 = 0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n// ESM COMPAT FLAG\n__webpack_require__.r(__webpack_exports__);\n\n// CONCATENATED MODULE: ./src/js/util/dom.js\n// This is not really a perfect check, but works fine.\n// From http://stackoverflow.com/questions/384286\nconst HAS_DOM_2 = typeof HTMLElement === \"object\";\nconst HAS_SHADOW = typeof ShadowRoot !== \"undefined\";\n\n/**\n * Determines whether an object is a DOM element or not.\n * @param {!Object} obj Object to check\n * @return {boolean} True if object is an element\n */\nfunction isDOMElement(obj) {\n if (HAS_SHADOW && obj instanceof ShadowRoot) {\n return true;\n }\n return HAS_DOM_2\n ? obj instanceof HTMLElement\n : obj &&\n typeof obj === \"object\" &&\n obj !== null &&\n obj.nodeType === 1 &&\n typeof obj.nodeName === \"string\";\n}\n\n/**\n * Adds an array of classes to an element\n * @param {!Element} el Element to add classes to\n * @param {!Array} classNames Class names to add\n * @return {void}\n */\nfunction addClasses(el, classNames) {\n classNames.forEach(function(className) {\n el.classList.add(className);\n });\n}\n\n/**\n * Removes an array of classes from an element\n * @param {!Element} el Element to remove classes from\n * @param {!Array} classNames Classes to remove\n * @return {void}\n */\nfunction removeClasses(el, classNames) {\n classNames.forEach(function(className) {\n el.classList.remove(className);\n });\n}\n\n// CONCATENATED MODULE: ./src/js/injectBaseStylesheet.js\n/* UNMINIFIED RULES\n\n@keyframes lum-noop {\n 0% { zoom: 1; }\n}\n\n.lum-lightbox {\n position: fixed;\n display: none;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n}\n\n.lum-lightbox.lum-open {\n display: block;\n}\n\n.lum-lightbox.lum-opening, .lum-lightbox.lum-closing {\n animation: lum-noop 1ms;\n}\n\n.lum-lightbox-inner {\n position: absolute;\n top: 0%;\n right: 0%;\n bottom: 0%;\n left: 0%;\n\n overflow: hidden;\n}\n\n.lum-lightbox-loader {\n display: none;\n}\n\n.lum-lightbox-inner img {\n max-width: 100%;\n max-height: 100%;\n}\n\n.lum-lightbox-image-wrapper {\n vertical-align: middle;\n display: table-cell;\n text-align: center;\n}\n*/\n\nconst RULES = `@keyframes lum-noop{0%{zoom:1}}.lum-lightbox{position:fixed;display:none;top:0;right:0;bottom:0;left:0}.lum-lightbox.lum-open{display:block}.lum-lightbox.lum-closing,.lum-lightbox.lum-opening{animation:lum-noop 1ms}.lum-lightbox-inner{position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden}.lum-lightbox-loader{display:none}.lum-lightbox-inner img{max-width:100%;max-height:100%}.lum-lightbox-image-wrapper{vertical-align:middle;display:table-cell;text-align:center}`;\n\n/**\n * Injects the base stylesheet needed to display the lightbox\n * element.\n * If `node` is the document, the stylesheet will be appended to ``.\n * @param {!Node} node Node to append stylesheet to\n * @return {void}\n */\nfunction injectBaseStylesheet(node) {\n if (!node || node === document) {\n node = document.head;\n }\n\n if (node.querySelector(\".lum-base-styles\")) {\n return;\n }\n\n const styleEl = document.createElement(\"style\");\n styleEl.type = \"text/css\";\n styleEl.classList.add(\"lum-base-styles\");\n\n styleEl.appendChild(document.createTextNode(RULES));\n\n node.insertBefore(styleEl, node.firstChild);\n}\n\n// CONCATENATED MODULE: ./src/js/util/throwIfMissing.js\n/**\n * Throws a missing parameter error\n */\nfunction throwIfMissing() {\n throw new Error(\"Missing parameter\");\n}\n\n// CONCATENATED MODULE: ./src/js/Lightbox.js\n\n\n\nconst LEFT_ARROW = 37;\nconst RIGHT_ARROW = 39;\n\n// All officially-supported browsers have this, but it's easy to\n// account for, just in case.\nconst HAS_ANIMATION =\n typeof document === \"undefined\"\n ? false\n : \"animation\" in document.createElement(\"div\").style;\n\n/**\n * Represents the default lightbox implementation\n */\nclass Lightbox_Lightbox {\n /**\n * Constructor\n * @param {Object=} options Lightbox options\n */\n constructor(options = {}) {\n this._sizeImgWrapperEl = this._sizeImgWrapperEl.bind(this);\n this.showNext = this.showNext.bind(this);\n this.showPrevious = this.showPrevious.bind(this);\n this._completeOpen = this._completeOpen.bind(this);\n this._completeClose = this._completeClose.bind(this);\n this._handleKeydown = this._handleKeydown.bind(this);\n this._handleClose = this._handleClose.bind(this);\n\n const {\n namespace = null,\n parentEl = throwIfMissing(),\n triggerEl = throwIfMissing(),\n sourceAttribute = throwIfMissing(),\n caption = null,\n includeImgixJSClass = false,\n _gallery = null,\n _arrowNavigation = null,\n closeButtonEnabled = true,\n closeTrigger = \"click\"\n } = options;\n\n this.settings = {\n namespace,\n parentEl,\n triggerEl,\n sourceAttribute,\n caption,\n includeImgixJSClass,\n _gallery,\n _arrowNavigation,\n closeButtonEnabled,\n onClose: options.onClose,\n closeTrigger\n };\n\n if (!isDOMElement(this.settings.parentEl)) {\n throw new TypeError(\n \"`new Lightbox` requires a DOM element passed as `parentEl`.\"\n );\n }\n\n this.currentTrigger = this.settings.triggerEl;\n\n this.openClasses = this._buildClasses(\"open\");\n this.openingClasses = this._buildClasses(\"opening\");\n this.closingClasses = this._buildClasses(\"closing\");\n\n this.hasBeenLoaded = false;\n this.elementBuilt = false;\n }\n\n /**\n * Handles closing of the lightbox\n * @param {!Event} e Event that triggered closing\n * @return {void}\n * @protected\n */\n _handleClose(e) {\n if (e && typeof e.preventDefault === \"function\") {\n e.preventDefault();\n }\n if(e && e.type == \"click\" && e.target.classList.contains(\"lum-img\")) {\n //if click is on img don't close\n return;\n }\n\n const onClose = this.settings.onClose;\n if (onClose && typeof onClose === \"function\") {\n onClose();\n }\n }\n\n /**\n * Binds event listeners to the trigger element\n * @return {void}\n * @protected\n */\n _bindEventListeners() {\n this.el.addEventListener(this.settings.closeTrigger, this._handleClose);\n if (this.closeButtonEl) {\n this.closeButtonEl.addEventListener(\"click\", this._handleClose);\n }\n }\n\n /**\n * Builds a class list using the namespace and suffix, if any.\n * @param {string} suffix Suffix to add to each class\n * @return {!Array} Class list\n * @protected\n */\n _buildClasses(suffix) {\n const classes = [`lum-${suffix}`];\n\n const ns = this.settings.namespace;\n if (ns) {\n classes.push(`${ns}-${suffix}`);\n }\n\n return classes;\n }\n\n /**\n * Creates the lightbox element\n * @return {void}\n * @protected\n */\n _buildElement() {\n this.el = document.createElement(\"div\");\n addClasses(this.el, this._buildClasses(\"lightbox\"));\n\n this.innerEl = document.createElement(\"div\");\n addClasses(this.innerEl, this._buildClasses(\"lightbox-inner\"));\n this.el.appendChild(this.innerEl);\n\n const loaderEl = document.createElement(\"div\");\n addClasses(loaderEl, this._buildClasses(\"lightbox-loader\"));\n this.innerEl.appendChild(loaderEl);\n\n this.imgWrapperEl = document.createElement(\"div\");\n addClasses(this.imgWrapperEl, this._buildClasses(\"lightbox-image-wrapper\"));\n this.innerEl.appendChild(this.imgWrapperEl);\n\n const positionHelperEl = document.createElement(\"span\");\n addClasses(\n positionHelperEl,\n this._buildClasses(\"lightbox-position-helper\")\n );\n this.imgWrapperEl.appendChild(positionHelperEl);\n\n this.imgEl = document.createElement(\"img\");\n addClasses(this.imgEl, this._buildClasses(\"img\"));\n positionHelperEl.appendChild(this.imgEl);\n\n this.captionEl = document.createElement(\"p\");\n addClasses(this.captionEl, this._buildClasses(\"lightbox-caption\"));\n positionHelperEl.appendChild(this.captionEl);\n\n if (this.settings.closeButtonEnabled) {\n this.closeButtonEl = document.createElement(\"div\");\n addClasses(this.closeButtonEl, this._buildClasses(\"close-button\"));\n this.el.appendChild(this.closeButtonEl);\n }\n\n if (this.settings._gallery) {\n this._setUpGalleryElements();\n }\n\n this.settings.parentEl.appendChild(this.el);\n\n this._updateImgSrc();\n this._updateCaption();\n\n if (this.settings.includeImgixJSClass) {\n this.imgEl.classList.add(\"imgix-fluid\");\n }\n }\n\n /**\n * Creates gallery elements such as previous/next buttons\n * @return {void}\n * @protected\n */\n _setUpGalleryElements() {\n this._buildGalleryButton(\"previous\", this.showPrevious);\n this._buildGalleryButton(\"next\", this.showNext);\n }\n\n /**\n * Creates a gallery button\n * @param {string} name Name of button\n * @param {!Function} fn Click handler\n * @return {void}\n * @protected\n */\n _buildGalleryButton(name, fn) {\n const btn = document.createElement(\"button\");\n this[`${name}Button`] = btn;\n\n btn.innerText = name;\n addClasses(btn, this._buildClasses(`${name}-button`));\n addClasses(btn, this._buildClasses(\"gallery-button\"));\n this.innerEl.appendChild(btn);\n\n btn.addEventListener(\n \"click\",\n e => {\n e.stopPropagation();\n\n fn();\n },\n false\n );\n }\n\n /**\n * Sizes the image wrapper\n * @return {void}\n * @protected\n */\n _sizeImgWrapperEl() {\n const style = this.imgWrapperEl.style;\n style.width = `${this.innerEl.clientWidth}px`;\n style.maxWidth = `${this.innerEl.clientWidth}px`;\n style.height = `${this.innerEl.clientHeight -\n this.captionEl.clientHeight}px`;\n style.maxHeight = `${this.innerEl.clientHeight -\n this.captionEl.clientHeight}px`;\n }\n\n /**\n * Updates caption from settings\n * @return {void}\n * @protected\n */\n _updateCaption() {\n const captionType = typeof this.settings.caption;\n let caption = \"\";\n\n if (captionType === \"string\") {\n caption = this.settings.caption;\n } else if (captionType === \"function\") {\n caption = this.settings.caption(this.currentTrigger);\n }\n\n this.captionEl.innerHTML = caption;\n }\n\n /**\n * Updates image element from the trigger element's attributes\n * @return {void}\n * @protected\n */\n _updateImgSrc() {\n const imageURL = this.currentTrigger.getAttribute(\n this.settings.sourceAttribute\n );\n\n if (!imageURL) {\n throw new Error(\n `No image URL was found in the ${\n this.settings.sourceAttribute\n } attribute of the trigger.`\n );\n }\n\n const loadingClasses = this._buildClasses(\"loading\");\n\n if (!this.hasBeenLoaded) {\n addClasses(this.el, loadingClasses);\n }\n\n this.imgEl.onload = () => {\n removeClasses(this.el, loadingClasses);\n this.hasBeenLoaded = true;\n };\n\n this.imgEl.setAttribute(\"src\", imageURL);\n }\n\n /**\n * Handles key up/down events for moving between items\n * @param {!Event} e Keyboard event\n * @return {void}\n * @protected\n */\n _handleKeydown(e) {\n if (e.keyCode == LEFT_ARROW) {\n this.showPrevious();\n } else if (e.keyCode == RIGHT_ARROW) {\n this.showNext();\n }\n }\n\n /**\n * Shows the next item if in a gallery\n * @return {void}\n */\n showNext() {\n if (!this.settings._gallery) {\n return;\n }\n\n this.currentTrigger = this.settings._gallery.nextTrigger(\n this.currentTrigger\n );\n this.hasBeenLoaded = false;\n this._updateImgSrc();\n this._updateCaption();\n this._sizeImgWrapperEl();\n this.settings._gallery.onChange({ imgEl: this.imgEl });\n }\n\n /**\n * Shows the previous item if in a gallery\n * @return {void}\n */\n showPrevious() {\n if (!this.settings._gallery) {\n return;\n }\n\n this.currentTrigger = this.settings._gallery.previousTrigger(\n this.currentTrigger\n );\n this.hasBeenLoaded = false;\n this._updateImgSrc();\n this._updateCaption();\n this._sizeImgWrapperEl();\n this.settings._gallery.onChange({ imgEl: this.imgEl });\n }\n\n /**\n * Opens the lightbox\n * @return {void}\n */\n open() {\n if (!this.elementBuilt) {\n this._buildElement();\n this._bindEventListeners();\n this.elementBuilt = true;\n }\n\n // When opening, always reset to the trigger we were passed\n this.currentTrigger = this.settings.triggerEl;\n\n // Make sure to re-set the `img` `src`, in case it's been changed\n // by someone/something else.\n this._updateImgSrc();\n this._updateCaption();\n\n addClasses(this.el, this.openClasses);\n\n this._sizeImgWrapperEl();\n window.addEventListener(\"resize\", this._sizeImgWrapperEl, false);\n\n if (this.settings._arrowNavigation) {\n window.addEventListener(\"keydown\", this._handleKeydown, false);\n }\n\n if (HAS_ANIMATION) {\n this.el.addEventListener(\"animationend\", this._completeOpen, false);\n addClasses(this.el, this.openingClasses);\n }\n }\n\n /**\n * Closes the lightbox\n * @return {void}\n */\n close() {\n window.removeEventListener(\"resize\", this._sizeImgWrapperEl, false);\n\n if (this.settings._arrowNavigation) {\n window.removeEventListener(\"keydown\", this._handleKeydown, false);\n }\n\n if (HAS_ANIMATION) {\n this.el.addEventListener(\"animationend\", this._completeClose, false);\n addClasses(this.el, this.closingClasses);\n } else {\n removeClasses(this.el, this.openClasses);\n }\n }\n\n /**\n * Handles animations on completion of opening the lightbox\n * @return {void}\n * @protected\n */\n _completeOpen() {\n this.el.removeEventListener(\"animationend\", this._completeOpen, false);\n\n removeClasses(this.el, this.openingClasses);\n }\n\n /**\n * Handles animations on completion of closing the lightbox\n * @return {void}\n * @protected\n */\n _completeClose() {\n this.el.removeEventListener(\"animationend\", this._completeClose, false);\n\n removeClasses(this.el, this.openClasses);\n removeClasses(this.el, this.closingClasses);\n }\n\n /**\n * Destroys the lightbox\n * @return {void}\n */\n destroy() {\n if (this.el) {\n this.settings.parentEl.removeChild(this.el);\n }\n }\n}\n\n// CONCATENATED MODULE: ./src/js/Luminous.js\n\n\n\n\n/**\n * Represents the default luminous lightbox\n */\nclass Luminous_Luminous {\n /**\n * Constructor\n * @param {!Element} trigger Trigger element to open lightbox\n * @param {Object=} options Luminous options\n */\n constructor(trigger, options = {}) {\n this.VERSION = \"2.4.0\";\n this.destroy = this.destroy.bind(this);\n this.open = this.open.bind(this);\n this.close = this.close.bind(this);\n this._handleKeyup = this._handleKeyup.bind(this);\n\n this.isOpen = false;\n\n this.trigger = trigger;\n\n if (!isDOMElement(this.trigger)) {\n throw new TypeError(\n \"`new Luminous` requires a DOM element as its first argument.\"\n );\n }\n\n let rootNode = document;\n if (\"getRootNode\" in this.trigger) {\n rootNode = this.trigger.getRootNode();\n }\n // Prefix for generated element class names (e.g. `my-ns` will\n // result in classes such as `my-ns-lightbox`. Default `lum-`\n // prefixed classes will always be added as well.\n const namespace = options[\"namespace\"] || null;\n // Which attribute to pull the lightbox image source from.\n const sourceAttribute = options[\"sourceAttribute\"] || \"href\";\n // Captions can be a literal string, or a function that receives the Luminous instance's trigger element as an argument and returns a string. Supports HTML, so use caution when dealing with user input.\n const caption = options[\"caption\"] || null;\n // The event to listen to on the _trigger_ element: triggers opening.\n const openTrigger = options[\"openTrigger\"] || \"click\";\n // The event to listen to on the _lightbox_ element: triggers closing.\n const closeTrigger = options[\"closeTrigger\"] || \"click\";\n // Allow closing by pressing escape.\n const closeWithEscape = \"closeWithEscape\" in options ? !!options[\"closeWithEscape\"] : true;\n // Automatically close when the page is scrolled.\n const closeOnScroll = options[\"closeOnScroll\"] || false;\n const closeButtonEnabled =\n options[\"showCloseButton\"] != null ? options[\"showCloseButton\"] : true;\n const appendToNode =\n options[\"appendToNode\"] ||\n (rootNode === document ? document.body : rootNode);\n // A selector defining what to append the lightbox element to.\n const appendToSelector = options[\"appendToSelector\"] || null;\n // If present (and a function), this will be called\n // whenever the lightbox is opened.\n const onOpen = options[\"onOpen\"] || null;\n // If present (and a function), this will be called\n // whenever the lightbox is closed.\n const onClose = options[\"onClose\"] || null;\n // When true, adds the `imgix-fluid` class to the `img`\n // inside the lightbox. See https://github.com/imgix/imgix.js\n // for more information.\n const includeImgixJSClass = options[\"includeImgixJSClass\"] || false;\n // Add base styles to the page. See the \"Theming\"\n // section of README.md for more information.\n const injectBaseStyles = \"injectBaseStyles\" in options ? !!options[\"injectBaseStyles\"] : true;\n // Internal use only!\n const _gallery = options[\"_gallery\"] || null;\n const _arrowNavigation = options[\"_arrowNavigation\"] || null;\n const _onChange = options[\"_onChange\"] || null;\n\n this.settings = {\n namespace,\n sourceAttribute,\n caption,\n openTrigger,\n closeTrigger,\n closeWithEscape,\n closeOnScroll,\n closeButtonEnabled,\n appendToNode,\n appendToSelector,\n onOpen,\n onClose,\n includeImgixJSClass,\n injectBaseStyles,\n _gallery,\n _arrowNavigation,\n _onChange\n };\n\n let injectionRoot = document.body;\n if (appendToNode && \"getRootNode\" in appendToNode) {\n injectionRoot = appendToNode.getRootNode();\n }\n\n if (this.settings.injectBaseStyles) {\n injectBaseStylesheet(injectionRoot);\n }\n\n this._buildLightbox();\n this._bindEventListeners();\n }\n\n /**\n * Opens the lightbox\n * @param {Event=} e Event which triggered opening\n * @return {void}\n */\n open(e) {\n if (e && typeof e.preventDefault === \"function\") {\n e.preventDefault();\n }\n\n this.lightbox.open();\n\n if (this.settings.closeOnScroll) {\n window.addEventListener(\"scroll\", this.close, false);\n }\n\n const onOpen = this.settings.onOpen;\n if (onOpen && typeof onOpen === \"function\") {\n onOpen();\n }\n\n this.isOpen = true;\n }\n\n /**\n * Closes the lightbox\n * @param {Event=} e Event which triggered closing\n * @return {void}\n */\n close(e) {\n if (this.settings.closeOnScroll) {\n window.removeEventListener(\"scroll\", this.close, false);\n }\n\n this.lightbox.close();\n\n const onClose = this.settings.onClose;\n if (onClose && typeof onClose === \"function\") {\n onClose();\n }\n\n this.isOpen = false;\n }\n\n /**\n * Builds the internal lightbox instance\n * @protected\n * @return {void}\n */\n _buildLightbox() {\n let parentEl = this.settings.appendToNode;\n\n if (this.settings.appendToSelector) {\n parentEl = document.querySelector(this.settings.appendToSelector);\n }\n\n this.lightbox = new Lightbox_Lightbox({\n namespace: this.settings.namespace,\n parentEl: parentEl,\n triggerEl: this.trigger,\n sourceAttribute: this.settings.sourceAttribute,\n caption: this.settings.caption,\n includeImgixJSClass: this.settings.includeImgixJSClass,\n closeButtonEnabled: this.settings.closeButtonEnabled,\n _gallery: this.settings._gallery,\n _arrowNavigation: this.settings._arrowNavigation,\n closeTrigger: this.settings.closeTrigger,\n onClose: this.close\n });\n }\n\n /**\n * Binds lightbox events to the trigger element\n * @protected\n * @return {void}\n */\n _bindEventListeners() {\n this.trigger.addEventListener(this.settings.openTrigger, this.open, false);\n\n if (this.settings.closeWithEscape) {\n window.addEventListener(\"keyup\", this._handleKeyup, false);\n }\n }\n\n /**\n * Unbinds all events\n * @protected\n * @return {void}\n */\n _unbindEvents() {\n this.trigger.removeEventListener(\n this.settings.openTrigger,\n this.open,\n false\n );\n if (this.lightbox.el) {\n this.lightbox.el.removeEventListener(\n this.settings.closeTrigger,\n this.close,\n false\n );\n }\n\n if (this.settings.closeWithEscape) {\n window.removeEventListener(\"keyup\", this._handleKeyup, false);\n }\n }\n\n /**\n * Handles key up events and closes lightbox when esc is pressed\n * @param {!Event} e Keyboard event\n * @return {void}\n * @protected\n */\n _handleKeyup(e) {\n if (this.isOpen && e.keyCode === 27) {\n this.close();\n }\n }\n\n /**\n * Destroys internal lightbox and unbinds events\n * @return {void}\n */\n destroy() {\n this._unbindEvents();\n this.lightbox.destroy();\n }\n}\n\n/* eslint-disable no-self-assign */\nLuminous_Luminous.prototype[\"open\"] = Luminous_Luminous.prototype.open;\nLuminous_Luminous.prototype[\"close\"] = Luminous_Luminous.prototype.close;\nLuminous_Luminous.prototype[\"destroy\"] = Luminous_Luminous.prototype.destroy;\n/* eslint-enable no-self-assign */\n\n// CONCATENATED MODULE: ./src/js/LuminousGallery.js\n\n\n/**\n * Represents a gallery-style lightbox\n */\nclass LuminousGallery_LuminousGallery {\n /**\n * Constructor\n * @param {!Array} triggers Array of trigger elements\n * @param {Object=} options Gallery options\n * @param {Object=} luminousOpts Luminous options\n */\n constructor(triggers, options = {}, luminousOpts = {}) { \n const arrowNavigation = options[\"arrowNavigation\"] || true;\n const onChange = options[\"onChange\"] || null;\n\n this.settings = {\n arrowNavigation,\n onChange\n }\n\n this.triggers = triggers;\n this.luminousOpts = luminousOpts;\n this.luminousOpts[\"_gallery\"] = this;\n this.luminousOpts[\"_arrowNavigation\"] = this.settings.arrowNavigation;\n this._constructLuminousInstances();\n }\n\n /**\n * Creates internal luminous instances\n * @protected\n * @return {void}\n */\n _constructLuminousInstances() {\n this.luminousInstances = [];\n\n const triggerLen = this.triggers.length;\n for (let i = 0; i < triggerLen; i++) {\n const trigger = this.triggers[i];\n const lum = new Luminous_Luminous(trigger, this.luminousOpts);\n this.luminousInstances.push(lum);\n }\n }\n\n /**\n * Determines the next trigger element\n * @param {!Element} trigger Current trigger element\n * @return {!Element}\n */\n nextTrigger(trigger) {\n const nextTriggerIndex =\n Array.prototype.indexOf.call(this.triggers, trigger) + 1;\n\n return nextTriggerIndex >= this.triggers.length\n ? this.triggers[0]\n : this.triggers[nextTriggerIndex];\n }\n\n /**\n * Determines the previous trigger element\n * @param {!Element} trigger Current trigger element\n * @return {!Element}\n */\n previousTrigger(trigger) {\n const prevTriggerIndex =\n Array.prototype.indexOf.call(this.triggers, trigger) - 1;\n\n return prevTriggerIndex < 0\n ? this.triggers[this.triggers.length - 1]\n : this.triggers[prevTriggerIndex];\n }\n\n /**\n * Callback called when current image is changed\n * @param {Object} params\n * @param {!Element} params.imgEl New image element\n */\n onChange({ imgEl }) {\n const onChange = this.settings.onChange;\n if (onChange && typeof onChange === \"function\") {\n onChange({ \"imgEl\": imgEl });\n }\n }\n\n /**\n * Destroys the internal luminous instances\n * @return {void}\n */\n destroy() {\n this.luminousInstances.forEach(instance => instance.destroy());\n }\n}\n\n/* eslint-disable-next-line no-self-assign */\nLuminousGallery_LuminousGallery.prototype[\"destroy\"] = LuminousGallery_LuminousGallery.prototype.destroy;\n\n// CONCATENATED MODULE: ./src/js/lum-browser.js\n// This file is used for the standalone browser build\n\n\n\n\nwindow[\"LuminousGallery\"] = LuminousGallery_LuminousGallery;\nwindow[\"Luminous\"] = Luminous_Luminous;\n\n\n/***/ })\n/******/ ]);"," \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 = 0);\n","import Luminous from \"./Luminous\";\n\n/**\n * Represents a gallery-style lightbox\n */\nexport default class LuminousGallery {\n /**\n * Constructor\n * @param {!Array} triggers Array of trigger elements\n * @param {Object=} options Gallery options\n * @param {Object=} luminousOpts Luminous options\n */\n constructor(triggers, options = {}, luminousOpts = {}) { \n const arrowNavigation = options[\"arrowNavigation\"] || true;\n const onChange = options[\"onChange\"] || null;\n\n this.settings = {\n arrowNavigation,\n onChange\n }\n\n this.triggers = triggers;\n this.luminousOpts = luminousOpts;\n this.luminousOpts[\"_gallery\"] = this;\n this.luminousOpts[\"_arrowNavigation\"] = this.settings.arrowNavigation;\n this._constructLuminousInstances();\n }\n\n /**\n * Creates internal luminous instances\n * @protected\n * @return {void}\n */\n _constructLuminousInstances() {\n this.luminousInstances = [];\n\n const triggerLen = this.triggers.length;\n for (let i = 0; i < triggerLen; i++) {\n const trigger = this.triggers[i];\n const lum = new Luminous(trigger, this.luminousOpts);\n this.luminousInstances.push(lum);\n }\n }\n\n /**\n * Determines the next trigger element\n * @param {!Element} trigger Current trigger element\n * @return {!Element}\n */\n nextTrigger(trigger) {\n const nextTriggerIndex =\n Array.prototype.indexOf.call(this.triggers, trigger) + 1;\n\n return nextTriggerIndex >= this.triggers.length\n ? this.triggers[0]\n : this.triggers[nextTriggerIndex];\n }\n\n /**\n * Determines the previous trigger element\n * @param {!Element} trigger Current trigger element\n * @return {!Element}\n */\n previousTrigger(trigger) {\n const prevTriggerIndex =\n Array.prototype.indexOf.call(this.triggers, trigger) - 1;\n\n return prevTriggerIndex < 0\n ? this.triggers[this.triggers.length - 1]\n : this.triggers[prevTriggerIndex];\n }\n\n /**\n * Callback called when current image is changed\n * @param {Object} params\n * @param {!Element} params.imgEl New image element\n */\n onChange({ imgEl }) {\n const onChange = this.settings.onChange;\n if (onChange && typeof onChange === \"function\") {\n onChange({ \"imgEl\": imgEl });\n }\n }\n\n /**\n * Destroys the internal luminous instances\n * @return {void}\n */\n destroy() {\n this.luminousInstances.forEach(instance => instance.destroy());\n }\n}\n\n/* eslint-disable-next-line no-self-assign */\nLuminousGallery.prototype[\"destroy\"] = LuminousGallery.prototype.destroy;\n","import { isDOMElement } from \"./util/dom\";\nimport injectBaseStylesheet from \"./injectBaseStylesheet\";\nimport Lightbox from \"./Lightbox\";\n\n/**\n * Represents the default luminous lightbox\n */\nexport default class Luminous {\n /**\n * Constructor\n * @param {!Element} trigger Trigger element to open lightbox\n * @param {Object=} options Luminous options\n */\n constructor(trigger, options = {}) {\n this.VERSION = \"2.4.0\";\n this.destroy = this.destroy.bind(this);\n this.open = this.open.bind(this);\n this.close = this.close.bind(this);\n this._handleKeyup = this._handleKeyup.bind(this);\n\n this.isOpen = false;\n\n this.trigger = trigger;\n\n if (!isDOMElement(this.trigger)) {\n throw new TypeError(\n \"`new Luminous` requires a DOM element as its first argument.\"\n );\n }\n\n let rootNode = document;\n if (\"getRootNode\" in this.trigger) {\n rootNode = this.trigger.getRootNode();\n }\n // Prefix for generated element class names (e.g. `my-ns` will\n // result in classes such as `my-ns-lightbox`. Default `lum-`\n // prefixed classes will always be added as well.\n const namespace = options[\"namespace\"] || null;\n // Which attribute to pull the lightbox image source from.\n const sourceAttribute = options[\"sourceAttribute\"] || \"href\";\n // Captions can be a literal string, or a function that receives the Luminous instance's trigger element as an argument and returns a string. Supports HTML, so use caution when dealing with user input.\n const caption = options[\"caption\"] || null;\n // The event to listen to on the _trigger_ element: triggers opening.\n const openTrigger = options[\"openTrigger\"] || \"click\";\n // The event to listen to on the _lightbox_ element: triggers closing.\n const closeTrigger = options[\"closeTrigger\"] || \"click\";\n // Allow closing by pressing escape.\n const closeWithEscape = \"closeWithEscape\" in options ? !!options[\"closeWithEscape\"] : true;\n // Automatically close when the page is scrolled.\n const closeOnScroll = options[\"closeOnScroll\"] || false;\n const closeButtonEnabled =\n options[\"showCloseButton\"] != null ? options[\"showCloseButton\"] : true;\n const appendToNode =\n options[\"appendToNode\"] ||\n (rootNode === document ? document.body : rootNode);\n // A selector defining what to append the lightbox element to.\n const appendToSelector = options[\"appendToSelector\"] || null;\n // If present (and a function), this will be called\n // whenever the lightbox is opened.\n const onOpen = options[\"onOpen\"] || null;\n // If present (and a function), this will be called\n // whenever the lightbox is closed.\n const onClose = options[\"onClose\"] || null;\n // When true, adds the `imgix-fluid` class to the `img`\n // inside the lightbox. See https://github.com/imgix/imgix.js\n // for more information.\n const includeImgixJSClass = options[\"includeImgixJSClass\"] || false;\n // Add base styles to the page. See the \"Theming\"\n // section of README.md for more information.\n const injectBaseStyles = \"injectBaseStyles\" in options ? !!options[\"injectBaseStyles\"] : true;\n // Internal use only!\n const _gallery = options[\"_gallery\"] || null;\n const _arrowNavigation = options[\"_arrowNavigation\"] || null;\n const _onChange = options[\"_onChange\"] || null;\n\n this.settings = {\n namespace,\n sourceAttribute,\n caption,\n openTrigger,\n closeTrigger,\n closeWithEscape,\n closeOnScroll,\n closeButtonEnabled,\n appendToNode,\n appendToSelector,\n onOpen,\n onClose,\n includeImgixJSClass,\n injectBaseStyles,\n _gallery,\n _arrowNavigation,\n _onChange\n };\n\n let injectionRoot = document.body;\n if (appendToNode && \"getRootNode\" in appendToNode) {\n injectionRoot = appendToNode.getRootNode();\n }\n\n if (this.settings.injectBaseStyles) {\n injectBaseStylesheet(injectionRoot);\n }\n\n this._buildLightbox();\n this._bindEventListeners();\n }\n\n /**\n * Opens the lightbox\n * @param {Event=} e Event which triggered opening\n * @return {void}\n */\n open(e) {\n if (e && typeof e.preventDefault === \"function\") {\n e.preventDefault();\n }\n\n this.lightbox.open();\n\n if (this.settings.closeOnScroll) {\n window.addEventListener(\"scroll\", this.close, false);\n }\n\n const onOpen = this.settings.onOpen;\n if (onOpen && typeof onOpen === \"function\") {\n onOpen();\n }\n\n this.isOpen = true;\n }\n\n /**\n * Closes the lightbox\n * @param {Event=} e Event which triggered closing\n * @return {void}\n */\n close(e) {\n if (this.settings.closeOnScroll) {\n window.removeEventListener(\"scroll\", this.close, false);\n }\n\n this.lightbox.close();\n\n const onClose = this.settings.onClose;\n if (onClose && typeof onClose === \"function\") {\n onClose();\n }\n\n this.isOpen = false;\n }\n\n /**\n * Builds the internal lightbox instance\n * @protected\n * @return {void}\n */\n _buildLightbox() {\n let parentEl = this.settings.appendToNode;\n\n if (this.settings.appendToSelector) {\n parentEl = document.querySelector(this.settings.appendToSelector);\n }\n\n this.lightbox = new Lightbox({\n namespace: this.settings.namespace,\n parentEl: parentEl,\n triggerEl: this.trigger,\n sourceAttribute: this.settings.sourceAttribute,\n caption: this.settings.caption,\n includeImgixJSClass: this.settings.includeImgixJSClass,\n closeButtonEnabled: this.settings.closeButtonEnabled,\n _gallery: this.settings._gallery,\n _arrowNavigation: this.settings._arrowNavigation,\n closeTrigger: this.settings.closeTrigger,\n onClose: this.close\n });\n }\n\n /**\n * Binds lightbox events to the trigger element\n * @protected\n * @return {void}\n */\n _bindEventListeners() {\n this.trigger.addEventListener(this.settings.openTrigger, this.open, false);\n\n if (this.settings.closeWithEscape) {\n window.addEventListener(\"keyup\", this._handleKeyup, false);\n }\n }\n\n /**\n * Unbinds all events\n * @protected\n * @return {void}\n */\n _unbindEvents() {\n this.trigger.removeEventListener(\n this.settings.openTrigger,\n this.open,\n false\n );\n if (this.lightbox.el) {\n this.lightbox.el.removeEventListener(\n this.settings.closeTrigger,\n this.close,\n false\n );\n }\n\n if (this.settings.closeWithEscape) {\n window.removeEventListener(\"keyup\", this._handleKeyup, false);\n }\n }\n\n /**\n * Handles key up events and closes lightbox when esc is pressed\n * @param {!Event} e Keyboard event\n * @return {void}\n * @protected\n */\n _handleKeyup(e) {\n if (this.isOpen && e.keyCode === 27) {\n this.close();\n }\n }\n\n /**\n * Destroys internal lightbox and unbinds events\n * @return {void}\n */\n destroy() {\n this._unbindEvents();\n this.lightbox.destroy();\n }\n}\n\n/* eslint-disable no-self-assign */\nLuminous.prototype[\"open\"] = Luminous.prototype.open;\nLuminous.prototype[\"close\"] = Luminous.prototype.close;\nLuminous.prototype[\"destroy\"] = Luminous.prototype.destroy;\n/* eslint-enable no-self-assign */\n","/* UNMINIFIED RULES\n\n@keyframes lum-noop {\n 0% { zoom: 1; }\n}\n\n.lum-lightbox {\n position: fixed;\n display: none;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n}\n\n.lum-lightbox.lum-open {\n display: block;\n}\n\n.lum-lightbox.lum-opening, .lum-lightbox.lum-closing {\n animation: lum-noop 1ms;\n}\n\n.lum-lightbox-inner {\n position: absolute;\n top: 0%;\n right: 0%;\n bottom: 0%;\n left: 0%;\n\n overflow: hidden;\n}\n\n.lum-lightbox-loader {\n display: none;\n}\n\n.lum-lightbox-inner img {\n max-width: 100%;\n max-height: 100%;\n}\n\n.lum-lightbox-image-wrapper {\n vertical-align: middle;\n display: table-cell;\n text-align: center;\n}\n*/\n\nconst RULES = `@keyframes lum-noop{0%{zoom:1}}.lum-lightbox{position:fixed;display:none;top:0;right:0;bottom:0;left:0}.lum-lightbox.lum-open{display:block}.lum-lightbox.lum-closing,.lum-lightbox.lum-opening{animation:lum-noop 1ms}.lum-lightbox-inner{position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden}.lum-lightbox-loader{display:none}.lum-lightbox-inner img{max-width:100%;max-height:100%}.lum-lightbox-image-wrapper{vertical-align:middle;display:table-cell;text-align:center}`;\n\n/**\n * Injects the base stylesheet needed to display the lightbox\n * element.\n * If `node` is the document, the stylesheet will be appended to ``.\n * @param {!Node} node Node to append stylesheet to\n * @return {void}\n */\nexport default function injectBaseStylesheet(node) {\n if (!node || node === document) {\n node = document.head;\n }\n\n if (node.querySelector(\".lum-base-styles\")) {\n return;\n }\n\n const styleEl = document.createElement(\"style\");\n styleEl.type = \"text/css\";\n styleEl.classList.add(\"lum-base-styles\");\n\n styleEl.appendChild(document.createTextNode(RULES));\n\n node.insertBefore(styleEl, node.firstChild);\n}\n","import { isDOMElement, addClasses, removeClasses } from \"./util/dom\";\nimport throwIfMissing from \"./util/throwIfMissing\";\n\nconst LEFT_ARROW = 37;\nconst RIGHT_ARROW = 39;\n\n// All officially-supported browsers have this, but it's easy to\n// account for, just in case.\nconst HAS_ANIMATION =\n typeof document === \"undefined\"\n ? false\n : \"animation\" in document.createElement(\"div\").style;\n\n/**\n * Represents the default lightbox implementation\n */\nexport default class Lightbox {\n /**\n * Constructor\n * @param {Object=} options Lightbox options\n */\n constructor(options = {}) {\n this._sizeImgWrapperEl = this._sizeImgWrapperEl.bind(this);\n this.showNext = this.showNext.bind(this);\n this.showPrevious = this.showPrevious.bind(this);\n this._completeOpen = this._completeOpen.bind(this);\n this._completeClose = this._completeClose.bind(this);\n this._handleKeydown = this._handleKeydown.bind(this);\n this._handleClose = this._handleClose.bind(this);\n\n const {\n namespace = null,\n parentEl = throwIfMissing(),\n triggerEl = throwIfMissing(),\n sourceAttribute = throwIfMissing(),\n caption = null,\n includeImgixJSClass = false,\n _gallery = null,\n _arrowNavigation = null,\n closeButtonEnabled = true,\n closeTrigger = \"click\"\n } = options;\n\n this.settings = {\n namespace,\n parentEl,\n triggerEl,\n sourceAttribute,\n caption,\n includeImgixJSClass,\n _gallery,\n _arrowNavigation,\n closeButtonEnabled,\n onClose: options.onClose,\n closeTrigger\n };\n\n if (!isDOMElement(this.settings.parentEl)) {\n throw new TypeError(\n \"`new Lightbox` requires a DOM element passed as `parentEl`.\"\n );\n }\n\n this.currentTrigger = this.settings.triggerEl;\n\n this.openClasses = this._buildClasses(\"open\");\n this.openingClasses = this._buildClasses(\"opening\");\n this.closingClasses = this._buildClasses(\"closing\");\n\n this.hasBeenLoaded = false;\n this.elementBuilt = false;\n }\n\n /**\n * Handles closing of the lightbox\n * @param {!Event} e Event that triggered closing\n * @return {void}\n * @protected\n */\n _handleClose(e) {\n if (e && typeof e.preventDefault === \"function\") {\n e.preventDefault();\n }\n if(e && e.type == \"click\" && e.target.classList.contains(\"lum-img\")) {\n //if click is on img don't close\n return;\n }\n\n const onClose = this.settings.onClose;\n if (onClose && typeof onClose === \"function\") {\n onClose();\n }\n }\n\n /**\n * Binds event listeners to the trigger element\n * @return {void}\n * @protected\n */\n _bindEventListeners() {\n this.el.addEventListener(this.settings.closeTrigger, this._handleClose);\n if (this.closeButtonEl) {\n this.closeButtonEl.addEventListener(\"click\", this._handleClose);\n }\n }\n\n /**\n * Builds a class list using the namespace and suffix, if any.\n * @param {string} suffix Suffix to add to each class\n * @return {!Array} Class list\n * @protected\n */\n _buildClasses(suffix) {\n const classes = [`lum-${suffix}`];\n\n const ns = this.settings.namespace;\n if (ns) {\n classes.push(`${ns}-${suffix}`);\n }\n\n return classes;\n }\n\n /**\n * Creates the lightbox element\n * @return {void}\n * @protected\n */\n _buildElement() {\n this.el = document.createElement(\"div\");\n addClasses(this.el, this._buildClasses(\"lightbox\"));\n\n this.innerEl = document.createElement(\"div\");\n addClasses(this.innerEl, this._buildClasses(\"lightbox-inner\"));\n this.el.appendChild(this.innerEl);\n\n const loaderEl = document.createElement(\"div\");\n addClasses(loaderEl, this._buildClasses(\"lightbox-loader\"));\n this.innerEl.appendChild(loaderEl);\n\n this.imgWrapperEl = document.createElement(\"div\");\n addClasses(this.imgWrapperEl, this._buildClasses(\"lightbox-image-wrapper\"));\n this.innerEl.appendChild(this.imgWrapperEl);\n\n const positionHelperEl = document.createElement(\"span\");\n addClasses(\n positionHelperEl,\n this._buildClasses(\"lightbox-position-helper\")\n );\n this.imgWrapperEl.appendChild(positionHelperEl);\n\n this.imgEl = document.createElement(\"img\");\n addClasses(this.imgEl, this._buildClasses(\"img\"));\n positionHelperEl.appendChild(this.imgEl);\n\n this.captionEl = document.createElement(\"p\");\n addClasses(this.captionEl, this._buildClasses(\"lightbox-caption\"));\n positionHelperEl.appendChild(this.captionEl);\n\n if (this.settings.closeButtonEnabled) {\n this.closeButtonEl = document.createElement(\"div\");\n addClasses(this.closeButtonEl, this._buildClasses(\"close-button\"));\n this.el.appendChild(this.closeButtonEl);\n }\n\n if (this.settings._gallery) {\n this._setUpGalleryElements();\n }\n\n this.settings.parentEl.appendChild(this.el);\n\n this._updateImgSrc();\n this._updateCaption();\n\n if (this.settings.includeImgixJSClass) {\n this.imgEl.classList.add(\"imgix-fluid\");\n }\n }\n\n /**\n * Creates gallery elements such as previous/next buttons\n * @return {void}\n * @protected\n */\n _setUpGalleryElements() {\n this._buildGalleryButton(\"previous\", this.showPrevious);\n this._buildGalleryButton(\"next\", this.showNext);\n }\n\n /**\n * Creates a gallery button\n * @param {string} name Name of button\n * @param {!Function} fn Click handler\n * @return {void}\n * @protected\n */\n _buildGalleryButton(name, fn) {\n const btn = document.createElement(\"button\");\n this[`${name}Button`] = btn;\n\n btn.innerText = name;\n addClasses(btn, this._buildClasses(`${name}-button`));\n addClasses(btn, this._buildClasses(\"gallery-button\"));\n this.innerEl.appendChild(btn);\n\n btn.addEventListener(\n \"click\",\n e => {\n e.stopPropagation();\n\n fn();\n },\n false\n );\n }\n\n /**\n * Sizes the image wrapper\n * @return {void}\n * @protected\n */\n _sizeImgWrapperEl() {\n const style = this.imgWrapperEl.style;\n style.width = `${this.innerEl.clientWidth}px`;\n style.maxWidth = `${this.innerEl.clientWidth}px`;\n style.height = `${this.innerEl.clientHeight -\n this.captionEl.clientHeight}px`;\n style.maxHeight = `${this.innerEl.clientHeight -\n this.captionEl.clientHeight}px`;\n }\n\n /**\n * Updates caption from settings\n * @return {void}\n * @protected\n */\n _updateCaption() {\n const captionType = typeof this.settings.caption;\n let caption = \"\";\n\n if (captionType === \"string\") {\n caption = this.settings.caption;\n } else if (captionType === \"function\") {\n caption = this.settings.caption(this.currentTrigger);\n }\n\n this.captionEl.innerHTML = caption;\n }\n\n /**\n * Updates image element from the trigger element's attributes\n * @return {void}\n * @protected\n */\n _updateImgSrc() {\n const imageURL = this.currentTrigger.getAttribute(\n this.settings.sourceAttribute\n );\n\n if (!imageURL) {\n throw new Error(\n `No image URL was found in the ${\n this.settings.sourceAttribute\n } attribute of the trigger.`\n );\n }\n\n const loadingClasses = this._buildClasses(\"loading\");\n\n if (!this.hasBeenLoaded) {\n addClasses(this.el, loadingClasses);\n }\n\n this.imgEl.onload = () => {\n removeClasses(this.el, loadingClasses);\n this.hasBeenLoaded = true;\n };\n\n this.imgEl.setAttribute(\"src\", imageURL);\n }\n\n /**\n * Handles key up/down events for moving between items\n * @param {!Event} e Keyboard event\n * @return {void}\n * @protected\n */\n _handleKeydown(e) {\n if (e.keyCode == LEFT_ARROW) {\n this.showPrevious();\n } else if (e.keyCode == RIGHT_ARROW) {\n this.showNext();\n }\n }\n\n /**\n * Shows the next item if in a gallery\n * @return {void}\n */\n showNext() {\n if (!this.settings._gallery) {\n return;\n }\n\n this.currentTrigger = this.settings._gallery.nextTrigger(\n this.currentTrigger\n );\n this.hasBeenLoaded = false;\n this._updateImgSrc();\n this._updateCaption();\n this._sizeImgWrapperEl();\n this.settings._gallery.onChange({ imgEl: this.imgEl });\n }\n\n /**\n * Shows the previous item if in a gallery\n * @return {void}\n */\n showPrevious() {\n if (!this.settings._gallery) {\n return;\n }\n\n this.currentTrigger = this.settings._gallery.previousTrigger(\n this.currentTrigger\n );\n this.hasBeenLoaded = false;\n this._updateImgSrc();\n this._updateCaption();\n this._sizeImgWrapperEl();\n this.settings._gallery.onChange({ imgEl: this.imgEl });\n }\n\n /**\n * Opens the lightbox\n * @return {void}\n */\n open() {\n if (!this.elementBuilt) {\n this._buildElement();\n this._bindEventListeners();\n this.elementBuilt = true;\n }\n\n // When opening, always reset to the trigger we were passed\n this.currentTrigger = this.settings.triggerEl;\n\n // Make sure to re-set the `img` `src`, in case it's been changed\n // by someone/something else.\n this._updateImgSrc();\n this._updateCaption();\n\n addClasses(this.el, this.openClasses);\n\n this._sizeImgWrapperEl();\n window.addEventListener(\"resize\", this._sizeImgWrapperEl, false);\n\n if (this.settings._arrowNavigation) {\n window.addEventListener(\"keydown\", this._handleKeydown, false);\n }\n\n if (HAS_ANIMATION) {\n this.el.addEventListener(\"animationend\", this._completeOpen, false);\n addClasses(this.el, this.openingClasses);\n }\n }\n\n /**\n * Closes the lightbox\n * @return {void}\n */\n close() {\n window.removeEventListener(\"resize\", this._sizeImgWrapperEl, false);\n\n if (this.settings._arrowNavigation) {\n window.removeEventListener(\"keydown\", this._handleKeydown, false);\n }\n\n if (HAS_ANIMATION) {\n this.el.addEventListener(\"animationend\", this._completeClose, false);\n addClasses(this.el, this.closingClasses);\n } else {\n removeClasses(this.el, this.openClasses);\n }\n }\n\n /**\n * Handles animations on completion of opening the lightbox\n * @return {void}\n * @protected\n */\n _completeOpen() {\n this.el.removeEventListener(\"animationend\", this._completeOpen, false);\n\n removeClasses(this.el, this.openingClasses);\n }\n\n /**\n * Handles animations on completion of closing the lightbox\n * @return {void}\n * @protected\n */\n _completeClose() {\n this.el.removeEventListener(\"animationend\", this._completeClose, false);\n\n removeClasses(this.el, this.openClasses);\n removeClasses(this.el, this.closingClasses);\n }\n\n /**\n * Destroys the lightbox\n * @return {void}\n */\n destroy() {\n if (this.el) {\n this.settings.parentEl.removeChild(this.el);\n }\n }\n}\n","// This is not really a perfect check, but works fine.\n// From http://stackoverflow.com/questions/384286\nconst HAS_DOM_2 = typeof HTMLElement === \"object\";\nconst HAS_SHADOW = typeof ShadowRoot !== \"undefined\";\n\n/**\n * Determines whether an object is a DOM element or not.\n * @param {!Object} obj Object to check\n * @return {boolean} True if object is an element\n */\nexport function isDOMElement(obj) {\n if (HAS_SHADOW && obj instanceof ShadowRoot) {\n return true;\n }\n return HAS_DOM_2\n ? obj instanceof HTMLElement\n : obj &&\n typeof obj === \"object\" &&\n obj !== null &&\n obj.nodeType === 1 &&\n typeof obj.nodeName === \"string\";\n}\n\n/**\n * Adds an array of classes to an element\n * @param {!Element} el Element to add classes to\n * @param {!Array} classNames Class names to add\n * @return {void}\n */\nexport function addClasses(el, classNames) {\n classNames.forEach(function(className) {\n el.classList.add(className);\n });\n}\n\n/**\n * Removes an array of classes from an element\n * @param {!Element} el Element to remove classes from\n * @param {!Array} classNames Classes to remove\n * @return {void}\n */\nexport function removeClasses(el, classNames) {\n classNames.forEach(function(className) {\n el.classList.remove(className);\n });\n}\n","/**\n * Throws a missing parameter error\n */\nexport default function throwIfMissing() {\n throw new Error(\"Missing parameter\");\n}\n","// This file is used for the standalone browser build\n\nimport Luminous from \"./Luminous\";\nimport LuminousGallery from \"./LuminousGallery\";\n\nwindow[\"LuminousGallery\"] = LuminousGallery;\nwindow[\"Luminous\"] = Luminous;\n"],"sourceRoot":""}