{"version":3,"sources":["fjGallery.js"],"names":["modules","installedModules","__webpack_require__","moduleId","exports","module","i","l","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","__webpack_exports__","lite_ready__WEBPACK_IMPORTED_MODULE_0__","lite_ready__WEBPACK_IMPORTED_MODULE_0___default","global__WEBPACK_IMPORTED_MODULE_1__","_fjGallery_esm__WEBPACK_IMPORTED_MODULE_2__","_typeof","obj","iterator","constructor","oldInit","oldDestroy","jQueryPlugin","oldJqPlugin","oldPlugin","fjGallery","noConflict","this","init","jQcontainer","$container","data","destroy","removeData","args","arguments","Array","unshift","res","apply","fn","document","querySelectorAll","callback","readyState","attachEvent","addEventListener","global","win","window","self","g","Function","e","throttle_debounce__WEBPACK_IMPORTED_MODULE_0__","raf_schd__WEBPACK_IMPORTED_MODULE_1__","merge__WEBPACK_IMPORTED_MODULE_2__","merge__WEBPACK_IMPORTED_MODULE_2___default","lite_ready__WEBPACK_IMPORTED_MODULE_3__","lite_ready__WEBPACK_IMPORTED_MODULE_3___default","justified_layout__WEBPACK_IMPORTED_MODULE_4__","justified_layout__WEBPACK_IMPORTED_MODULE_4___default","global__WEBPACK_IMPORTED_MODULE_5__","_defineProperties","target","props","length","descriptor","configurable","writable","fjGalleryList","updateFjGallery","forEach","item","resize","plugin","items","HTMLElement","nodeType","nodeName","ret","options","slice","len","k","instanceID","container","userOptions","instance","Constructor","TypeError","_classCallCheck","images","defaults","itemSelector","imageSelector","gutter","rowHeight","rowHeightTolerance","calculateItemsHeight","resizeDebounce","isRtl","css","onInit","onDestroy","onAppendImages","onBeforeJustify","onJustify","dataOptions","dataset","pureDataOptions","keys","loweCaseOption","substr","toLowerCase","resizeThrottle","console","warning","pureOptions","justify","protoProps","staticProps","el","styles","getComputedStyle","getPropertyValue","transform","style","push","splice","appendImages","addToFjGalleryList","$images","jQuery","$item","$image","fjGalleryImage","querySelector","width","parseFloat","getAttribute","height","loadSizes","img","cb","interval","hasSize","addedListeners","removeListeners","itemData","onHasSize","naturalWidth","naturalHeight","clearInterval","onLoaded","onError","checkSize","dimensions","removeEventListener","setInterval","justifyArray","justifiedData","containerWidth","getBoundingClientRect","containerPadding","top","right","bottom","left","boxSpacing","targetRowHeight","targetRowHeightTolerance","additionalTopOffset","rowsMaxHeight","imgI","rect","boxes","pop","position","concat","containerHeight","removeFromFjGalleryList","val","__WEBPACK_AMD_DEFINE_FACTORY__","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","factory","throttle","delay","noTrailing","debounceMode","timeoutID","cancelled","lastExec","clearExistingTimeout","clearTimeout","wrapper","_len","arguments_","_key","elapsed","Date","now","exec","undefined","setTimeout","cancel","debounce","atBegin","wrapperFn","lastArgs","frameId","requestAnimationFrame","cancelAnimationFrame","merge","clone","recursive","argv","result","size","typeOf","index","sitem","Public","merge_recursive","base","extend","input","toString","isNode","output","type","webpackPolyfill","deprecate","paths","children","Row","createNewRow","layoutConfig","layoutData","isBreakoutRow","fullWidthBreakoutRowCadence","_rows","_containerHeight","spacing","horizontal","edgeCaseMinRowHeight","edgeCaseMaxRowHeight","rightToLeft","widowLayoutStyle","addRow","row","_layoutItems","getItems","vertical","config","itemLayoutData","itemAdded","currentRow","nextToLastRowHeight","laidOutItems","maxNumRows","Number","POSITIVE_INFINITY","forceAspectRatio","showWidows","isNaN","_awakeItems","_inViewportItems","_leadingOrphans","_trailingOrphans","_orphans","_widowCount","map","aspectRatio","forcedAspectRatio","some","Error","addItem","isLayoutComplete","forceComplete","widowCount","params","minAspectRatio","maxAspectRatio","previousRowWidthWithoutSpacing","previousAspectRatio","previousTargetAspectRatio","newItems","rowWidthWithoutSpacing","newAspectRatio","reduce","sum","targetAspectRatio","completeLayout","Math","abs","newHeight","clampedToNativeRatio","clampedHeight","errorWidthPerItem","roundedCumulativeErrors","centerOffset","itemWidthSum","indexOf","max","min","round","fitToWidth"],"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,EAAA,IAEA6F,EAAAiE,OAAAmK,EAAAjU,MAIA,WAAA6Q,IAEAqD,GAAAnR,KAAA+G,MAAAqK,GAAA,EACApR,KAAAiD,MAAAJ,QAAA,SAAAC,GACAA,EAAA+F,MAAAsI,EAAAnR,KAAAyN,SACAzN,QAYA6P,cAAA,SAAA4B,EAAAnN,GAMA,iBAAAA,EACAtE,KAAA2Q,eAAArM,EAAAtE,KAAA8N,kBAGA9N,KAAA2Q,eAAA3Q,KAAA+I,gBAAA/I,KAAA8N,mBAWAI,SAAA,WACA,OAAAlO,KAAAiD","file":"fjGallery.min.js","sourcesContent":["/*!\n * Name : Flickr's Justified Gallery [fjGallery]\n * Version : 1.0.7\n * Author : nK \n * GitHub : https://github.com/nk-o/flickr-justified-gallery\n */\n/******/ (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, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(1);\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var lite_ready__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);\n/* harmony import */ var lite_ready__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lite_ready__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);\n/* harmony import */ var global__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(global__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _fjGallery_esm__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n\n\n // no conflict\n\nvar oldPlugin = global__WEBPACK_IMPORTED_MODULE_1__[\"window\"].fjGallery;\nglobal__WEBPACK_IMPORTED_MODULE_1__[\"window\"].fjGallery = _fjGallery_esm__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\n\nglobal__WEBPACK_IMPORTED_MODULE_1__[\"window\"].fjGallery.noConflict = function () {\n global__WEBPACK_IMPORTED_MODULE_1__[\"window\"].fjGallery = oldPlugin;\n return this;\n}; // jQuery support\n\n\nif (typeof global__WEBPACK_IMPORTED_MODULE_1__[\"jQuery\"] !== 'undefined') {\n // add data to jQuery .data('fjGallery')\n var oldInit = global__WEBPACK_IMPORTED_MODULE_1__[\"window\"].fjGallery.constructor.prototype.init;\n\n global__WEBPACK_IMPORTED_MODULE_1__[\"window\"].fjGallery.constructor.prototype.init = function () {\n this.jQcontainer = Object(global__WEBPACK_IMPORTED_MODULE_1__[\"jQuery\"])(this.$container);\n this.jQcontainer.data('fjGallery', this);\n\n if (oldInit) {\n oldInit.call(this);\n }\n }; // remove data from jQuery .data('fjGallery')\n\n\n var oldDestroy = global__WEBPACK_IMPORTED_MODULE_1__[\"window\"].fjGallery.constructor.prototype.destroy;\n\n global__WEBPACK_IMPORTED_MODULE_1__[\"window\"].fjGallery.constructor.prototype.destroy = function () {\n if (this.jQcontainer) {\n this.jQcontainer.removeData('fjGallery');\n }\n\n if (oldDestroy) {\n oldDestroy.call(this);\n }\n };\n\n var jQueryPlugin = function jQueryPlugin() {\n var args = arguments || [];\n Array.prototype.unshift.call(args, this);\n var res = _fjGallery_esm__WEBPACK_IMPORTED_MODULE_2__[\"default\"].apply(global__WEBPACK_IMPORTED_MODULE_1__[\"window\"], args);\n return _typeof(res) !== 'object' ? res : this;\n };\n\n jQueryPlugin.constructor = _fjGallery_esm__WEBPACK_IMPORTED_MODULE_2__[\"default\"].constructor; // no conflict\n\n var oldJqPlugin = global__WEBPACK_IMPORTED_MODULE_1__[\"jQuery\"].fn.fjGallery;\n global__WEBPACK_IMPORTED_MODULE_1__[\"jQuery\"].fn.fjGallery = jQueryPlugin;\n\n global__WEBPACK_IMPORTED_MODULE_1__[\"jQuery\"].fn.fjGallery.noConflict = function () {\n global__WEBPACK_IMPORTED_MODULE_1__[\"jQuery\"].fn.fjGallery = oldJqPlugin;\n return this;\n };\n} // .fj-gallery initialization\n\n\nlite_ready__WEBPACK_IMPORTED_MODULE_0___default()(function () {\n Object(_fjGallery_esm__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(document.querySelectorAll('.fj-gallery'));\n});\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = function (callback) {\n if (document.readyState === 'complete' || document.readyState === 'interactive') {\n // Already ready or interactive, execute callback\n callback.call();\n } else if (document.attachEvent) {\n // Old browsers\n document.attachEvent('onreadystatechange', function () {\n if (document.readyState === 'interactive') callback.call();\n });\n } else if (document.addEventListener) {\n // Modern browsers\n document.addEventListener('DOMContentLoaded', callback);\n }\n};\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(global) {var win;\n\nif (typeof window !== \"undefined\") {\n win = window;\n} else if (typeof global !== \"undefined\") {\n win = global;\n} else if (typeof self !== \"undefined\") {\n win = self;\n} else {\n win = {};\n}\n\nmodule.exports = win;\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar g; // This works in non-strict mode\n\ng = function () {\n return this;\n}();\n\ntry {\n // This works if eval is allowed (see CSP)\n g = g || new Function(\"return this\")();\n} catch (e) {\n // This works if the window reference is available\n if ((typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) === \"object\") g = window;\n} // g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\n\nmodule.exports = g;\n\n/***/ }),\n/* 5 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var throttle_debounce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6);\n/* harmony import */ var throttle_debounce__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(throttle_debounce__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var raf_schd__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);\n/* harmony import */ var merge__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8);\n/* harmony import */ var merge__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(merge__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var lite_ready__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2);\n/* harmony import */ var lite_ready__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lite_ready__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var justified_layout__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(10);\n/* harmony import */ var justified_layout__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(justified_layout__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var global__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3);\n/* harmony import */ var global__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(global__WEBPACK_IMPORTED_MODULE_5__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n\n\n\n // list with all fjGallery instances\n// need to render all in one scroll/resize event\n\nvar fjGalleryList = [];\nvar updateFjGallery = Object(raf_schd__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(function () {\n fjGalleryList.forEach(function (item) {\n item.resize();\n });\n});\nglobal__WEBPACK_IMPORTED_MODULE_5__[\"window\"].addEventListener('resize', updateFjGallery);\nglobal__WEBPACK_IMPORTED_MODULE_5__[\"window\"].addEventListener('orientationchange', updateFjGallery);\nglobal__WEBPACK_IMPORTED_MODULE_5__[\"window\"].addEventListener('load', updateFjGallery);\nlite_ready__WEBPACK_IMPORTED_MODULE_3___default()(function () {\n updateFjGallery();\n}); // get image dimensions\n// thanks https://gist.github.com/dimsemenov/5382856\n\nfunction getImgDimensions(img, cb) {\n var interval;\n var hasSize = false;\n var addedListeners = false;\n\n var onHasSize = function onHasSize() {\n if (hasSize) {\n cb(hasSize);\n return;\n }\n\n hasSize = {\n width: img.naturalWidth,\n height: img.naturalHeight\n };\n cb(hasSize);\n clearInterval(interval);\n\n if (addedListeners) {\n // eslint-disable-next-line no-use-before-define\n removeListeners();\n }\n };\n\n var onLoaded = function onLoaded() {\n onHasSize();\n };\n\n var onError = function onError() {\n onHasSize();\n };\n\n var checkSize = function checkSize() {\n if (img.naturalWidth > 0) {\n onHasSize();\n }\n };\n\n var addListeners = function addListeners() {\n addedListeners = true;\n img.addEventListener('load', onLoaded);\n img.addEventListener('error', onError);\n };\n\n var removeListeners = function removeListeners() {\n addedListeners = false;\n img.removeEventListener('load', onLoaded);\n img.removeEventListener('error', onError);\n };\n\n checkSize();\n\n if (!hasSize) {\n addListeners();\n interval = setInterval(checkSize, 100);\n }\n}\n\nvar instanceID = 0; // fjGallery class\n\nvar fjGallery = /*#__PURE__*/function () {\n function fjGallery(container, userOptions) {\n _classCallCheck(this, fjGallery);\n\n var self = this;\n self.instanceID = instanceID++;\n self.$container = container;\n self.images = [];\n self.defaults = {\n itemSelector: '.fj-gallery-item',\n imageSelector: 'img',\n gutter: 10,\n // supports object like `{ horizontal: 10, vertical: 10 }`.\n rowHeight: 320,\n rowHeightTolerance: 0.25,\n // [0, 1]\n calculateItemsHeight: false,\n resizeDebounce: 100,\n isRtl: self.css(self.$container, 'direction') === 'rtl',\n // events\n onInit: null,\n // function() {}\n onDestroy: null,\n // function() {}\n onAppendImages: null,\n // function() {}\n onBeforeJustify: null,\n // function() {}\n onJustify: null // function() {}\n\n }; // prepare data-options\n\n var dataOptions = self.$container.dataset || {};\n var pureDataOptions = {};\n Object.keys(dataOptions).forEach(function (key) {\n var loweCaseOption = key.substr(0, 1).toLowerCase() + key.substr(1);\n\n if (loweCaseOption && typeof self.defaults[loweCaseOption] !== 'undefined') {\n pureDataOptions[loweCaseOption] = dataOptions[key];\n }\n });\n self.options = merge__WEBPACK_IMPORTED_MODULE_2___default()({}, self.defaults, pureDataOptions, userOptions); // deprecated resizeThrottle option.\n\n if (typeof self.options.resizeThrottle !== 'undefined') {\n // eslint-disable-next-line no-console\n console.warning('`resizeThrottle` option is deprecated, use `resizeDebounce` instead');\n self.options.resizeDebounce = self.options.resizeThrottle;\n }\n\n self.pureOptions = merge__WEBPACK_IMPORTED_MODULE_2___default()({}, self.options); // debounce for resize\n\n self.resize = Object(throttle_debounce__WEBPACK_IMPORTED_MODULE_0__[\"debounce\"])(self.options.resizeDebounce, self.resize);\n self.justify = Object(raf_schd__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(self.justify.bind(self));\n self.init();\n } // add styles to element\n\n\n _createClass(fjGallery, [{\n key: \"css\",\n value: function css(el, styles) {\n if (typeof styles === 'string') {\n return global__WEBPACK_IMPORTED_MODULE_5__[\"window\"].getComputedStyle(el).getPropertyValue(styles);\n } // add transform property with vendor prefix\n\n\n if (styles.transform) {\n styles['-webkit-transform'] = styles.transform;\n }\n\n Object.keys(styles).forEach(function (key) {\n el.style[key] = styles[key];\n });\n return el;\n } // add to fjGallery instances list\n\n }, {\n key: \"addToFjGalleryList\",\n value: function addToFjGalleryList() {\n fjGalleryList.push(this);\n updateFjGallery();\n } // remove from fjGallery instances list\n\n }, {\n key: \"removeFromFjGalleryList\",\n value: function removeFromFjGalleryList() {\n var self = this;\n fjGalleryList.forEach(function (item, key) {\n if (item.instanceID === self.instanceID) {\n fjGalleryList.splice(key, 1);\n }\n });\n }\n }, {\n key: \"init\",\n value: function init() {\n var self = this;\n self.appendImages(self.$container.querySelectorAll(self.options.itemSelector));\n self.addToFjGalleryList(); // call onInit event\n\n if (self.options.onInit) {\n self.options.onInit.call(self);\n }\n } // append images\n\n }, {\n key: \"appendImages\",\n value: function appendImages($images) {\n var self = this; // check if jQuery\n\n if (global__WEBPACK_IMPORTED_MODULE_5__[\"window\"].jQuery && $images instanceof global__WEBPACK_IMPORTED_MODULE_5__[\"window\"].jQuery) {\n $images = $images.get();\n }\n\n if (!$images || !$images.length) {\n return;\n }\n\n $images.forEach(function ($item) {\n // if $images is jQuery, for some reason in this array there is undefined item, that not a DOM,\n // so we need to check for $item.querySelector.\n if ($item && !$item.fjGalleryImage && $item.querySelector) {\n var $image = $item.querySelector(self.options.imageSelector);\n\n if ($image) {\n $item.fjGalleryImage = self;\n var data = {\n $item: $item,\n $image: $image,\n width: parseFloat($image.getAttribute('width')) || false,\n height: parseFloat($image.getAttribute('height')) || false,\n loadSizes: function loadSizes() {\n var itemData = this;\n getImgDimensions($image, function (dimensions) {\n if (itemData.width !== dimensions.width || itemData.height !== dimensions.height) {\n itemData.width = dimensions.width;\n itemData.height = dimensions.height;\n self.resize();\n }\n });\n }\n };\n data.loadSizes();\n self.images.push(data);\n }\n }\n }); // call onAppendImages event\n\n if (self.options.onAppendImages) {\n self.options.onAppendImages.call(self, [$images]);\n }\n\n self.justify();\n } // justify images\n\n }, {\n key: \"justify\",\n value: function justify() {\n var self = this;\n var justifyArray = []; // call onBeforeJustify event\n\n if (self.options.onBeforeJustify) {\n self.options.onBeforeJustify.call(self);\n }\n\n self.images.forEach(function (data) {\n if (data.width && data.height) {\n justifyArray.push(data.width / data.height);\n }\n });\n var justifiedData = justified_layout__WEBPACK_IMPORTED_MODULE_4___default()(justifyArray, {\n containerWidth: self.$container.getBoundingClientRect().width,\n containerPadding: {\n top: parseFloat(self.css(self.$container, 'padding-top')) || 0,\n right: parseFloat(self.css(self.$container, 'padding-right')) || 0,\n bottom: parseFloat(self.css(self.$container, 'padding-bottom')) || 0,\n left: parseFloat(self.css(self.$container, 'padding-left')) || 0\n },\n boxSpacing: self.options.gutter,\n targetRowHeight: self.options.rowHeight,\n targetRowHeightTolerance: self.options.rowHeightTolerance\n });\n var i = 0;\n var additionalTopOffset = 0;\n var rowsMaxHeight = {}; // Set image sizes.\n\n self.images.forEach(function (data, imgI) {\n if (data.width && data.height) {\n // calculate additional offset based on actual items height.\n if (self.options.calculateItemsHeight && typeof rowsMaxHeight[justifiedData.boxes[i].top] === 'undefined' && Object.keys(rowsMaxHeight).length) {\n additionalTopOffset += rowsMaxHeight[Object.keys(rowsMaxHeight).pop()] - justifiedData.boxes[imgI - 1].height;\n }\n\n self.css(data.$item, {\n position: 'absolute',\n transform: \"translateX(\".concat((self.options.isRtl ? -1 : 1) * justifiedData.boxes[i].left, \"px) translateY(\").concat(justifiedData.boxes[i].top + additionalTopOffset, \"px) translateZ(0)\"),\n width: \"\".concat(justifiedData.boxes[i].width, \"px\")\n }); // calculate actual items height.\n\n if (self.options.calculateItemsHeight) {\n var rect = data.$item.getBoundingClientRect();\n\n if (typeof rowsMaxHeight[justifiedData.boxes[i].top] === 'undefined' || rowsMaxHeight[justifiedData.boxes[i].top] < rect.height) {\n rowsMaxHeight[justifiedData.boxes[i].top] = rect.height;\n }\n }\n\n i++;\n }\n }); // increase additional offset based on the latest row items height.\n\n if (self.options.calculateItemsHeight && Object.keys(rowsMaxHeight).length) {\n additionalTopOffset += rowsMaxHeight[Object.keys(rowsMaxHeight).pop()] - justifiedData.boxes[justifiedData.boxes.length - 1].height;\n } // Set container height.\n\n\n self.css(self.$container, {\n height: \"\".concat(justifiedData.containerHeight + additionalTopOffset, \"px\")\n }); // call onJustify event\n\n if (self.options.onJustify) {\n self.options.onJustify.call(self);\n }\n } // update options and resize gallery items\n\n }, {\n key: \"updateOptions\",\n value: function updateOptions(options) {\n var self = this;\n self.options = merge__WEBPACK_IMPORTED_MODULE_2___default()({}, self.options, options);\n self.justify();\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n var self = this;\n self.removeFromFjGalleryList(); // call onDestroy event\n\n if (self.options.onDestroy) {\n self.options.onDestroy.call(self);\n } // remove styles.\n\n\n self.css(self.$container, {\n height: ''\n });\n self.images.forEach(function (data) {\n self.css(data.$item, {\n position: '',\n transform: '',\n width: '',\n height: ''\n });\n }); // delete fjGalleryImage instance from images\n\n self.images.forEach(function (val) {\n delete val.$item.fjGalleryImage;\n }); // delete fjGallery instance from container\n\n delete self.$container.fjGallery;\n }\n }, {\n key: \"resize\",\n value: function resize() {\n var self = this;\n self.justify();\n }\n }]);\n\n return fjGallery;\n}(); // global definition\n\n\nvar plugin = function plugin(items) {\n // check for dom element\n // thanks: http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object\n if ((typeof HTMLElement === \"undefined\" ? \"undefined\" : _typeof(HTMLElement)) === 'object' ? items instanceof HTMLElement : items && _typeof(items) === 'object' && items !== null && items.nodeType === 1 && typeof items.nodeName === 'string') {\n items = [items];\n }\n\n var options = arguments[1];\n var args = Array.prototype.slice.call(arguments, 2);\n var len = items.length;\n var k = 0;\n var ret;\n\n for (k; k < len; k++) {\n if (_typeof(options) === 'object' || typeof options === 'undefined') {\n if (!items[k].fjGallery) {\n // eslint-disable-next-line new-cap\n items[k].fjGallery = new fjGallery(items[k], options);\n }\n } else if (items[k].fjGallery) {\n // eslint-disable-next-line prefer-spread\n ret = items[k].fjGallery[options].apply(items[k].fjGallery, args);\n }\n\n if (typeof ret !== 'undefined') {\n return ret;\n }\n }\n\n return items;\n};\n\nplugin.constructor = fjGallery;\n/* harmony default export */ __webpack_exports__[\"default\"] = (plugin);\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n(function (global, factory) {\n ( false ? undefined : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? factory(exports) : true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : (undefined);\n})(this, function (exports) {\n 'use strict';\n /* eslint-disable no-undefined,no-param-reassign,no-shadow */\n\n /**\n * Throttle execution of a function. Especially useful for rate limiting\n * execution of handlers on events like resize and scroll.\n *\n * @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param {boolean} [noTrailing] - Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds while the\n * throttled-function is being called. If noTrailing is false or unspecified, callback will be executed one final time\n * after the last throttled-function call. (After the throttled-function has not been called for `delay` milliseconds,\n * the internal counter is reset).\n * @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n * to `callback` when the throttled-function is executed.\n * @param {boolean} [debounceMode] - If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is false (at end),\n * schedule `callback` to execute after `delay` ms.\n *\n * @returns {Function} A new, throttled, function.\n */\n\n function throttle(delay, noTrailing, callback, debounceMode) {\n /*\n * After wrapper has stopped being called, this timeout ensures that\n * `callback` is executed at the proper times in `throttle` and `end`\n * debounce modes.\n */\n var timeoutID;\n var cancelled = false; // Keep track of the last time `callback` was executed.\n\n var lastExec = 0; // Function to clear existing timeout\n\n function clearExistingTimeout() {\n if (timeoutID) {\n clearTimeout(timeoutID);\n }\n } // Function to cancel next exec\n\n\n function cancel() {\n clearExistingTimeout();\n cancelled = true;\n } // `noTrailing` defaults to falsy.\n\n\n if (typeof noTrailing !== 'boolean') {\n debounceMode = callback;\n callback = noTrailing;\n noTrailing = undefined;\n }\n /*\n * The `wrapper` function encapsulates all of the throttling / debouncing\n * functionality and when executed will limit the rate at which `callback`\n * is executed.\n */\n\n\n function wrapper() {\n for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {\n arguments_[_key] = arguments[_key];\n }\n\n var self = this;\n var elapsed = Date.now() - lastExec;\n\n if (cancelled) {\n return;\n } // Execute `callback` and update the `lastExec` timestamp.\n\n\n function exec() {\n lastExec = Date.now();\n callback.apply(self, arguments_);\n }\n /*\n * If `debounceMode` is true (at begin) this is used to clear the flag\n * to allow future `callback` executions.\n */\n\n\n function clear() {\n timeoutID = undefined;\n }\n\n if (debounceMode && !timeoutID) {\n /*\n * Since `wrapper` is being called for the first time and\n * `debounceMode` is true (at begin), execute `callback`.\n */\n exec();\n }\n\n clearExistingTimeout();\n\n if (debounceMode === undefined && elapsed > delay) {\n /*\n * In throttle mode, if `delay` time has been exceeded, execute\n * `callback`.\n */\n exec();\n } else if (noTrailing !== true) {\n /*\n * In trailing throttle mode, since `delay` time has not been\n * exceeded, schedule `callback` to execute `delay` ms after most\n * recent execution.\n *\n * If `debounceMode` is true (at begin), schedule `clear` to execute\n * after `delay` ms.\n *\n * If `debounceMode` is false (at end), schedule `callback` to\n * execute after `delay` ms.\n */\n timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n }\n }\n\n wrapper.cancel = cancel; // Return the wrapper function.\n\n return wrapper;\n }\n /* eslint-disable no-undefined */\n\n /**\n * Debounce execution of a function. Debouncing, unlike throttling,\n * guarantees that a function is only executed a single time, either at the\n * very beginning of a series of calls, or at the very end.\n *\n * @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param {boolean} [atBegin] - Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds\n * after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.\n * (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).\n * @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n * to `callback` when the debounced-function is executed.\n *\n * @returns {Function} A new, debounced function.\n */\n\n\n function debounce(delay, atBegin, callback) {\n return callback === undefined ? throttle(delay, atBegin, false) : throttle(delay, callback, atBegin !== false);\n }\n\n exports.debounce = debounce;\n exports.throttle = throttle;\n Object.defineProperty(exports, '__esModule', {\n value: true\n });\n});\n\n/***/ }),\n/* 7 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\nvar rafSchd = function rafSchd(fn) {\n var lastArgs = [];\n var frameId = null;\n\n var wrapperFn = function wrapperFn() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n lastArgs = args;\n\n if (frameId) {\n return;\n }\n\n frameId = requestAnimationFrame(function () {\n frameId = null;\n fn.apply(void 0, lastArgs);\n });\n };\n\n wrapperFn.cancel = function () {\n if (!frameId) {\n return;\n }\n\n cancelAnimationFrame(frameId);\n frameId = null;\n };\n\n return wrapperFn;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (rafSchd);\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(module) {function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/*!\r\n * @name JavaScript/NodeJS Merge v1.2.1\r\n * @author yeikos\r\n * @repository https://github.com/yeikos/js.merge\r\n\r\n * Copyright 2014 yeikos - MIT license\r\n * https://raw.github.com/yeikos/js.merge/master/LICENSE\r\n */\n;\n\n(function (isNode) {\n /**\r\n * Merge one or more objects \r\n * @param bool? clone\r\n * @param mixed,... arguments\r\n * @return object\r\n */\n var Public = function Public(clone) {\n return merge(clone === true, false, arguments);\n },\n publicName = 'merge';\n /**\r\n * Merge two or more objects recursively \r\n * @param bool? clone\r\n * @param mixed,... arguments\r\n * @return object\r\n */\n\n\n Public.recursive = function (clone) {\n return merge(clone === true, true, arguments);\n };\n /**\r\n * Clone the input removing any reference\r\n * @param mixed input\r\n * @return mixed\r\n */\n\n\n Public.clone = function (input) {\n var output = input,\n type = typeOf(input),\n index,\n size;\n\n if (type === 'array') {\n output = [];\n size = input.length;\n\n for (index = 0; index < size; ++index) {\n output[index] = Public.clone(input[index]);\n }\n } else if (type === 'object') {\n output = {};\n\n for (index in input) {\n output[index] = Public.clone(input[index]);\n }\n }\n\n return output;\n };\n /**\r\n * Merge two objects recursively\r\n * @param mixed input\r\n * @param mixed extend\r\n * @return mixed\r\n */\n\n\n function merge_recursive(base, extend) {\n if (typeOf(base) !== 'object') return extend;\n\n for (var key in extend) {\n if (typeOf(base[key]) === 'object' && typeOf(extend[key]) === 'object') {\n base[key] = merge_recursive(base[key], extend[key]);\n } else {\n base[key] = extend[key];\n }\n }\n\n return base;\n }\n /**\r\n * Merge two or more objects\r\n * @param bool clone\r\n * @param bool recursive\r\n * @param array argv\r\n * @return object\r\n */\n\n\n function merge(clone, recursive, argv) {\n var result = argv[0],\n size = argv.length;\n if (clone || typeOf(result) !== 'object') result = {};\n\n for (var index = 0; index < size; ++index) {\n var item = argv[index],\n type = typeOf(item);\n if (type !== 'object') continue;\n\n for (var key in item) {\n if (key === '__proto__') continue;\n var sitem = clone ? Public.clone(item[key]) : item[key];\n\n if (recursive) {\n result[key] = merge_recursive(result[key], sitem);\n } else {\n result[key] = sitem;\n }\n }\n }\n\n return result;\n }\n /**\r\n * Get type of variable\r\n * @param mixed input\r\n * @return string\r\n *\r\n * @see http://jsperf.com/typeofvar\r\n */\n\n\n function typeOf(input) {\n return {}.toString.call(input).slice(8, -1).toLowerCase();\n }\n\n if (isNode) {\n module.exports = Public;\n } else {\n window[publicName] = Public;\n }\n})(( false ? undefined : _typeof(module)) === 'object' && module && _typeof(module.exports) === 'object' && module.exports);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(9)(module)))\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\nmodule.exports = function (module) {\n if (!module.webpackPolyfill) {\n module.deprecate = function () {};\n\n module.paths = []; // module.parent = undefined by default\n\n if (!module.children) module.children = [];\n Object.defineProperty(module, \"loaded\", {\n enumerable: true,\n get: function get() {\n return module.l;\n }\n });\n Object.defineProperty(module, \"id\", {\n enumerable: true,\n get: function get() {\n return module.i;\n }\n });\n module.webpackPolyfill = 1;\n }\n\n return module;\n};\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/*!\n * Copyright 2019 SmugMug, Inc.\n * Licensed under the terms of the MIT license. Please see LICENSE file in the project root for terms.\n * @license\n */\n\n\nvar merge = __webpack_require__(8),\n Row = __webpack_require__(11);\n/**\n * Create a new, empty row.\n *\n * @method createNewRow\n * @param layoutConfig {Object} The layout configuration\n * @param layoutData {Object} The current state of the layout\n * @return A new, empty row of the type specified by this layout.\n */\n\n\nfunction createNewRow(layoutConfig, layoutData) {\n var isBreakoutRow; // Work out if this is a full width breakout row\n\n if (layoutConfig.fullWidthBreakoutRowCadence !== false) {\n if ((layoutData._rows.length + 1) % layoutConfig.fullWidthBreakoutRowCadence === 0) {\n isBreakoutRow = true;\n }\n }\n\n return new Row({\n top: layoutData._containerHeight,\n left: layoutConfig.containerPadding.left,\n width: layoutConfig.containerWidth - layoutConfig.containerPadding.left - layoutConfig.containerPadding.right,\n spacing: layoutConfig.boxSpacing.horizontal,\n targetRowHeight: layoutConfig.targetRowHeight,\n targetRowHeightTolerance: layoutConfig.targetRowHeightTolerance,\n edgeCaseMinRowHeight: 0.5 * layoutConfig.targetRowHeight,\n edgeCaseMaxRowHeight: 2 * layoutConfig.targetRowHeight,\n rightToLeft: false,\n isBreakoutRow: isBreakoutRow,\n widowLayoutStyle: layoutConfig.widowLayoutStyle\n });\n}\n/**\n * Add a completed row to the layout.\n * Note: the row must have already been completed.\n *\n * @method addRow\n * @param layoutConfig {Object} The layout configuration\n * @param layoutData {Object} The current state of the layout\n * @param row {Row} The row to add.\n * @return {Array} Each item added to the row.\n */\n\n\nfunction addRow(layoutConfig, layoutData, row) {\n layoutData._rows.push(row);\n\n layoutData._layoutItems = layoutData._layoutItems.concat(row.getItems()); // Increment the container height\n\n layoutData._containerHeight += row.height + layoutConfig.boxSpacing.vertical;\n return row.items;\n}\n/**\n * Calculate the current layout for all items in the list that require layout.\n * \"Layout\" means geometry: position within container and size\n *\n * @method computeLayout\n * @param layoutConfig {Object} The layout configuration\n * @param layoutData {Object} The current state of the layout\n * @param itemLayoutData {Array} Array of items to lay out, with data required to lay out each item\n * @return {Object} The newly-calculated layout, containing the new container height, and lists of layout items\n */\n\n\nfunction computeLayout(layoutConfig, layoutData, itemLayoutData) {\n var laidOutItems = [],\n itemAdded,\n currentRow,\n nextToLastRowHeight; // Apply forced aspect ratio if specified, and set a flag.\n\n if (layoutConfig.forceAspectRatio) {\n itemLayoutData.forEach(function (itemData) {\n itemData.forcedAspectRatio = true;\n itemData.aspectRatio = layoutConfig.forceAspectRatio;\n });\n } // Loop through the items\n\n\n itemLayoutData.some(function (itemData, i) {\n if (isNaN(itemData.aspectRatio)) {\n throw new Error(\"Item \" + i + \" has an invalid aspect ratio\");\n } // If not currently building up a row, make a new one.\n\n\n if (!currentRow) {\n currentRow = createNewRow(layoutConfig, layoutData);\n } // Attempt to add item to the current row.\n\n\n itemAdded = currentRow.addItem(itemData);\n\n if (currentRow.isLayoutComplete()) {\n // Row is filled; add it and start a new one\n laidOutItems = laidOutItems.concat(addRow(layoutConfig, layoutData, currentRow));\n\n if (layoutData._rows.length >= layoutConfig.maxNumRows) {\n currentRow = null;\n return true;\n }\n\n currentRow = createNewRow(layoutConfig, layoutData); // Item was rejected; add it to its own row\n\n if (!itemAdded) {\n itemAdded = currentRow.addItem(itemData);\n\n if (currentRow.isLayoutComplete()) {\n // If the rejected item fills a row on its own, add the row and start another new one\n laidOutItems = laidOutItems.concat(addRow(layoutConfig, layoutData, currentRow));\n\n if (layoutData._rows.length >= layoutConfig.maxNumRows) {\n currentRow = null;\n return true;\n }\n\n currentRow = createNewRow(layoutConfig, layoutData);\n }\n }\n }\n }); // Handle any leftover content (orphans) depending on where they lie\n // in this layout update, and in the total content set.\n\n if (currentRow && currentRow.getItems().length && layoutConfig.showWidows) {\n // Last page of all content or orphan suppression is suppressed; lay out orphans.\n if (layoutData._rows.length) {\n // Only Match previous row's height if it exists and it isn't a breakout row\n if (layoutData._rows[layoutData._rows.length - 1].isBreakoutRow) {\n nextToLastRowHeight = layoutData._rows[layoutData._rows.length - 1].targetRowHeight;\n } else {\n nextToLastRowHeight = layoutData._rows[layoutData._rows.length - 1].height;\n }\n\n currentRow.forceComplete(false, nextToLastRowHeight);\n } else {\n // ...else use target height if there is no other row height to reference.\n currentRow.forceComplete(false);\n }\n\n laidOutItems = laidOutItems.concat(addRow(layoutConfig, layoutData, currentRow));\n layoutConfig._widowCount = currentRow.getItems().length;\n } // We need to clean up the bottom container padding\n // First remove the height added for box spacing\n\n\n layoutData._containerHeight = layoutData._containerHeight - layoutConfig.boxSpacing.vertical; // Then add our bottom container padding\n\n layoutData._containerHeight = layoutData._containerHeight + layoutConfig.containerPadding.bottom;\n return {\n containerHeight: layoutData._containerHeight,\n widowCount: layoutConfig._widowCount,\n boxes: layoutData._layoutItems\n };\n}\n/**\n * Takes in a bunch of box data and config. Returns\n * geometry to lay them out in a justified view.\n *\n * @method covertSizesToAspectRatios\n * @param sizes {Array} Array of objects with widths and heights\n * @return {Array} A list of aspect ratios\n */\n\n\nmodule.exports = function (input, config) {\n var layoutConfig = {};\n var layoutData = {}; // Defaults\n\n var defaults = {\n containerWidth: 1060,\n containerPadding: 10,\n boxSpacing: 10,\n targetRowHeight: 320,\n targetRowHeightTolerance: 0.25,\n maxNumRows: Number.POSITIVE_INFINITY,\n forceAspectRatio: false,\n showWidows: true,\n fullWidthBreakoutRowCadence: false,\n widowLayoutStyle: 'left'\n };\n var containerPadding = {};\n var boxSpacing = {};\n config = config || {}; // Merge defaults and config passed in\n\n layoutConfig = merge(defaults, config); // Sort out padding and spacing values\n\n containerPadding.top = !isNaN(parseFloat(layoutConfig.containerPadding.top)) ? layoutConfig.containerPadding.top : layoutConfig.containerPadding;\n containerPadding.right = !isNaN(parseFloat(layoutConfig.containerPadding.right)) ? layoutConfig.containerPadding.right : layoutConfig.containerPadding;\n containerPadding.bottom = !isNaN(parseFloat(layoutConfig.containerPadding.bottom)) ? layoutConfig.containerPadding.bottom : layoutConfig.containerPadding;\n containerPadding.left = !isNaN(parseFloat(layoutConfig.containerPadding.left)) ? layoutConfig.containerPadding.left : layoutConfig.containerPadding;\n boxSpacing.horizontal = !isNaN(parseFloat(layoutConfig.boxSpacing.horizontal)) ? layoutConfig.boxSpacing.horizontal : layoutConfig.boxSpacing;\n boxSpacing.vertical = !isNaN(parseFloat(layoutConfig.boxSpacing.vertical)) ? layoutConfig.boxSpacing.vertical : layoutConfig.boxSpacing;\n layoutConfig.containerPadding = containerPadding;\n layoutConfig.boxSpacing = boxSpacing; // Local\n\n layoutData._layoutItems = [];\n layoutData._awakeItems = [];\n layoutData._inViewportItems = [];\n layoutData._leadingOrphans = [];\n layoutData._trailingOrphans = [];\n layoutData._containerHeight = layoutConfig.containerPadding.top;\n layoutData._rows = [];\n layoutData._orphans = [];\n layoutConfig._widowCount = 0; // Convert widths and heights to aspect ratios if we need to\n\n return computeLayout(layoutConfig, layoutData, input.map(function (item) {\n if (item.width && item.height) {\n return {\n aspectRatio: item.width / item.height\n };\n } else {\n return {\n aspectRatio: item\n };\n }\n }));\n};\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/*!\n * Copyright 2019 SmugMug, Inc.\n * Licensed under the terms of the MIT license. Please see LICENSE file in the project root for terms.\n * @license\n */\nvar merge = __webpack_require__(8);\n/**\n * Row\n * Wrapper for each row in a justified layout.\n * Stores relevant values and provides methods for calculating layout of individual rows.\n *\n * @param {Object} layoutConfig - The same as that passed\n * @param {Object} Initialization parameters. The following are all required:\n * @param params.top {Number} Top of row, relative to container\n * @param params.left {Number} Left side of row relative to container (equal to container left padding)\n * @param params.width {Number} Width of row, not including container padding\n * @param params.spacing {Number} Horizontal spacing between items\n * @param params.targetRowHeight {Number} Layout algorithm will aim for this row height\n * @param params.targetRowHeightTolerance {Number} Row heights may vary +/- (`targetRowHeight` x `targetRowHeightTolerance`)\n * @param params.edgeCaseMinRowHeight {Number} Absolute minimum row height for edge cases that cannot be resolved within tolerance.\n * @param params.edgeCaseMaxRowHeight {Number} Absolute maximum row height for edge cases that cannot be resolved within tolerance.\n * @param params.isBreakoutRow {Boolean} Is this row in particular one of those breakout rows? Always false if it's not that kind of photo list\n * @param params.widowLayoutStyle {String} If widows are visible, how should they be laid out?\n * @constructor\n */\n\n\nvar Row = module.exports = function (params) {\n // Top of row, relative to container\n this.top = params.top; // Left side of row relative to container (equal to container left padding)\n\n this.left = params.left; // Width of row, not including container padding\n\n this.width = params.width; // Horizontal spacing between items\n\n this.spacing = params.spacing; // Row height calculation values\n\n this.targetRowHeight = params.targetRowHeight;\n this.targetRowHeightTolerance = params.targetRowHeightTolerance;\n this.minAspectRatio = this.width / params.targetRowHeight * (1 - params.targetRowHeightTolerance);\n this.maxAspectRatio = this.width / params.targetRowHeight * (1 + params.targetRowHeightTolerance); // Edge case row height minimum/maximum\n\n this.edgeCaseMinRowHeight = params.edgeCaseMinRowHeight;\n this.edgeCaseMaxRowHeight = params.edgeCaseMaxRowHeight; // Widow layout direction\n\n this.widowLayoutStyle = params.widowLayoutStyle; // Full width breakout rows\n\n this.isBreakoutRow = params.isBreakoutRow; // Store layout data for each item in row\n\n this.items = []; // Height remains at 0 until it's been calculated\n\n this.height = 0;\n};\n\nRow.prototype = {\n /**\n * Attempt to add a single item to the row.\n * This is the heart of the justified algorithm.\n * This method is direction-agnostic; it deals only with sizes, not positions.\n *\n * If the item fits in the row, without pushing row height beyond min/max tolerance,\n * the item is added and the method returns true.\n *\n * If the item leaves row height too high, there may be room to scale it down and add another item.\n * In this case, the item is added and the method returns true, but the row is incomplete.\n *\n * If the item leaves row height too short, there are too many items to fit within tolerance.\n * The method will either accept or reject the new item, favoring the resulting row height closest to within tolerance.\n * If the item is rejected, left/right padding will be required to fit the row height within tolerance;\n * if the item is accepted, top/bottom cropping will be required to fit the row height within tolerance.\n *\n * @method addItem\n * @param itemData {Object} Item layout data, containing item aspect ratio.\n * @return {Boolean} True if successfully added; false if rejected.\n */\n addItem: function addItem(itemData) {\n var newItems = this.items.concat(itemData),\n // Calculate aspect ratios for items only; exclude spacing\n rowWidthWithoutSpacing = this.width - (newItems.length - 1) * this.spacing,\n newAspectRatio = newItems.reduce(function (sum, item) {\n return sum + item.aspectRatio;\n }, 0),\n targetAspectRatio = rowWidthWithoutSpacing / this.targetRowHeight,\n previousRowWidthWithoutSpacing,\n previousAspectRatio,\n previousTargetAspectRatio; // Handle big full-width breakout photos if we're doing them\n\n if (this.isBreakoutRow) {\n // Only do it if there's no other items in this row\n if (this.items.length === 0) {\n // Only go full width if this photo is a square or landscape\n if (itemData.aspectRatio >= 1) {\n // Close out the row with a full width photo\n this.items.push(itemData);\n this.completeLayout(rowWidthWithoutSpacing / itemData.aspectRatio, 'justify');\n return true;\n }\n }\n }\n\n if (newAspectRatio < this.minAspectRatio) {\n // New aspect ratio is too narrow / scaled row height is too tall.\n // Accept this item and leave row open for more items.\n this.items.push(merge(itemData));\n return true;\n } else if (newAspectRatio > this.maxAspectRatio) {\n // New aspect ratio is too wide / scaled row height will be too short.\n // Accept item if the resulting aspect ratio is closer to target than it would be without the item.\n // NOTE: Any row that falls into this block will require cropping/padding on individual items.\n if (this.items.length === 0) {\n // When there are no existing items, force acceptance of the new item and complete the layout.\n // This is the pano special case.\n this.items.push(merge(itemData));\n this.completeLayout(rowWidthWithoutSpacing / newAspectRatio, 'justify');\n return true;\n } // Calculate width/aspect ratio for row before adding new item\n\n\n previousRowWidthWithoutSpacing = this.width - (this.items.length - 1) * this.spacing;\n previousAspectRatio = this.items.reduce(function (sum, item) {\n return sum + item.aspectRatio;\n }, 0);\n previousTargetAspectRatio = previousRowWidthWithoutSpacing / this.targetRowHeight;\n\n if (Math.abs(newAspectRatio - targetAspectRatio) > Math.abs(previousAspectRatio - previousTargetAspectRatio)) {\n // Row with new item is us farther away from target than row without; complete layout and reject item.\n this.completeLayout(previousRowWidthWithoutSpacing / previousAspectRatio, 'justify');\n return false;\n } else {\n // Row with new item is us closer to target than row without;\n // accept the new item and complete the row layout.\n this.items.push(merge(itemData));\n this.completeLayout(rowWidthWithoutSpacing / newAspectRatio, 'justify');\n return true;\n }\n } else {\n // New aspect ratio / scaled row height is within tolerance;\n // accept the new item and complete the row layout.\n this.items.push(merge(itemData));\n this.completeLayout(rowWidthWithoutSpacing / newAspectRatio, 'justify');\n return true;\n }\n },\n\n /**\n * Check if a row has completed its layout.\n *\n * @method isLayoutComplete\n * @return {Boolean} True if complete; false if not.\n */\n isLayoutComplete: function isLayoutComplete() {\n return this.height > 0;\n },\n\n /**\n * Set row height and compute item geometry from that height.\n * Will justify items within the row unless instructed not to.\n *\n * @method completeLayout\n * @param newHeight {Number} Set row height to this value.\n * @param widowLayoutStyle {String} How should widows display? Supported: left | justify | center\n */\n completeLayout: function completeLayout(newHeight, widowLayoutStyle) {\n var itemWidthSum = this.left,\n rowWidthWithoutSpacing = this.width - (this.items.length - 1) * this.spacing,\n clampedToNativeRatio,\n clampedHeight,\n errorWidthPerItem,\n roundedCumulativeErrors,\n singleItemGeometry,\n centerOffset; // Justify unless explicitly specified otherwise.\n\n if (typeof widowLayoutStyle === 'undefined' || ['justify', 'center', 'left'].indexOf(widowLayoutStyle) < 0) {\n widowLayoutStyle = 'left';\n } // Clamp row height to edge case minimum/maximum.\n\n\n clampedHeight = Math.max(this.edgeCaseMinRowHeight, Math.min(newHeight, this.edgeCaseMaxRowHeight));\n\n if (newHeight !== clampedHeight) {\n // If row height was clamped, the resulting row/item aspect ratio will be off,\n // so force it to fit the width (recalculate aspectRatio to match clamped height).\n // NOTE: this will result in cropping/padding commensurate to the amount of clamping.\n this.height = clampedHeight;\n clampedToNativeRatio = rowWidthWithoutSpacing / clampedHeight / (rowWidthWithoutSpacing / newHeight);\n } else {\n // If not clamped, leave ratio at 1.0.\n this.height = newHeight;\n clampedToNativeRatio = 1.0;\n } // Compute item geometry based on newHeight.\n\n\n this.items.forEach(function (item) {\n item.top = this.top;\n item.width = item.aspectRatio * this.height * clampedToNativeRatio;\n item.height = this.height; // Left-to-right.\n // TODO right to left\n // item.left = this.width - itemWidthSum - item.width;\n\n item.left = itemWidthSum; // Increment width.\n\n itemWidthSum += item.width + this.spacing;\n }, this); // If specified, ensure items fill row and distribute error\n // caused by rounding width and height across all items.\n\n if (widowLayoutStyle === 'justify') {\n itemWidthSum -= this.spacing + this.left;\n errorWidthPerItem = (itemWidthSum - this.width) / this.items.length;\n roundedCumulativeErrors = this.items.map(function (item, i) {\n return Math.round((i + 1) * errorWidthPerItem);\n });\n\n if (this.items.length === 1) {\n // For rows with only one item, adjust item width to fill row.\n singleItemGeometry = this.items[0];\n singleItemGeometry.width -= Math.round(errorWidthPerItem);\n } else {\n // For rows with multiple items, adjust item width and shift items to fill the row,\n // while maintaining equal spacing between items in the row.\n this.items.forEach(function (item, i) {\n if (i > 0) {\n item.left -= roundedCumulativeErrors[i - 1];\n item.width -= roundedCumulativeErrors[i] - roundedCumulativeErrors[i - 1];\n } else {\n item.width -= roundedCumulativeErrors[i];\n }\n });\n }\n } else if (widowLayoutStyle === 'center') {\n // Center widows\n centerOffset = (this.width - itemWidthSum) / 2;\n this.items.forEach(function (item) {\n item.left += centerOffset + this.spacing;\n }, this);\n }\n },\n\n /**\n * Force completion of row layout with current items.\n *\n * @method forceComplete\n * @param fitToWidth {Boolean} Stretch current items to fill the row width.\n * This will likely result in padding.\n * @param fitToWidth {Number}\n */\n forceComplete: function forceComplete(fitToWidth, rowHeight) {\n // TODO Handle fitting to width\n // var rowWidthWithoutSpacing = this.width - (this.items.length - 1) * this.spacing,\n // \tcurrentAspectRatio = this.items.reduce(function (sum, item) {\n // \t\treturn sum + item.aspectRatio;\n // \t}, 0);\n if (typeof rowHeight === 'number') {\n this.completeLayout(rowHeight, this.widowLayoutStyle);\n } else {\n // Complete using target row height.\n this.completeLayout(this.targetRowHeight, this.widowLayoutStyle);\n }\n },\n\n /**\n * Return layout data for items within row.\n * Note: returns actual list, not a copy.\n *\n * @method getItems\n * @return Layout data for items within row.\n */\n getItems: function getItems() {\n return this.items;\n }\n};\n\n/***/ })\n/******/ ]);"]}