{"version":3,"sources":["fjGallery.js"],"names":["__webpack_modules__","module","__unused_webpack_exports","__webpack_require__","win","window","g","self","exports","__unused_webpack_module","__webpack_exports__","r","throttle_debounce__WEBPACK_IMPORTED_MODULE_0__","raf_schd__WEBPACK_IMPORTED_MODULE_4__","lite_ready__WEBPACK_IMPORTED_MODULE_1__","lite_ready__WEBPACK_IMPORTED_MODULE_1___default","n","justified_layout__WEBPACK_IMPORTED_MODULE_2__","justified_layout__WEBPACK_IMPORTED_MODULE_2___default","global__WEBPACK_IMPORTED_MODULE_3__","_typeof","obj","Symbol","iterator","constructor","prototype","ownKeys","object","enumerableOnly","symbols","keys","Object","getOwnPropertySymbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","value","defineProperty","configurable","writable","getOwnPropertyDescriptors","defineProperties","_defineProperties","props","descriptor","fjGalleryList","updateFjGallery","item","resize","getImgDimensions","img","cb","onLoaded","onHasSize","onError","checkSize","naturalWidth","interval","hasSize","addedListeners","width","height","naturalHeight","clearInterval","removeListeners","removeEventListener","addEventListener","setInterval","instanceID","fjGallery","container","userOptions","instance","Constructor","TypeError","_classCallCheck","this","$container","images","defaults","itemSelector","imageSelector","gutter","rowHeight","rowHeightTolerance","maxRowsCount","Number","POSITIVE_INFINITY","lastRow","transitionDuration","calculateItemsHeight","resizeDebounce","isRtl","css","onInit","onDestroy","onAppendImages","onBeforeJustify","onJustify","dataOptions","dataset","pureDataOptions","loweCaseOption","substr","toLowerCase","options","pureOptions","debounce","justify","bind","init","protoProps","staticProps","el","styles","getComputedStyle","getPropertyValue","style","$item","properties","onTransitionEnd","transition-property","join","transition-duration","splice","appendImages","querySelectorAll","addToFjGalleryList","call","$images","jQuery","get","$image","fjGalleryImage","querySelector","data","parseFloat","getAttribute","loadSizes","itemData","dimensions","justifyArray","justifyCount","justifiedOptions","containerWidth","getBoundingClientRect","containerPadding","top","right","bottom","left","boxSpacing","targetRowHeight","targetRowHeightTolerance","maxNumRows","showWidows","justifiedData","widowCount","lastItemData","boxes","gapSize","_i","boxData","additionalTopOffset","rowsMaxHeight","imgI","pop","applyTransition","display","position","transform","concat","rect","containerHeight","removeFromFjGalleryList","transition","val","plugin","items","HTMLElement","nodeType","nodeName","ret","args","Array","slice","len","k","__unused_webpack___webpack_module__","throttle","delay","noTrailing","callback","debounceMode","timeoutID","cancelled","lastExec","clearExistingTimeout","clearTimeout","wrapper","_len","arguments_","_key","elapsed","Date","now","exec","undefined","setTimeout","cancel","atBegin","d","document","readyState","attachEvent","Row","createNewRow","layoutConfig","layoutData","isBreakoutRow","fullWidthBreakoutRowCadence","_rows","_containerHeight","spacing","horizontal","edgeCaseMinRowHeight","edgeCaseMaxRowHeight","rightToLeft","widowLayoutStyle","addRow","row","_layoutItems","getItems","vertical","input","config","itemAdded","currentRow","laidOutItems","forceAspectRatio","assign","isNaN","_awakeItems","_inViewportItems","_leadingOrphans","_trailingOrphans","_orphans","_widowCount","itemLayoutData","map","aspectRatio","forcedAspectRatio","some","Error","addItem","isLayoutComplete","nextToLastRowHeight","forceComplete","params","minAspectRatio","maxAspectRatio","previousRowWidthWithoutSpacing","previousAspectRatio","newItems","rowWidthWithoutSpacing","newAspectRatio","reduce","sum","targetAspectRatio","completeLayout","previousTargetAspectRatio","Math","abs","newHeight","clampedToNativeRatio","clampedHeight","errorWidthPerItem","roundedCumulativeErrors","centerOffset","itemWidthSum","indexOf","max","min","round","fitToWidth","fn","wrapperFn","lastArgs","frameId","requestAnimationFrame","cancelAnimationFrame","__webpack_module_cache__","moduleId","cachedModule","getter","__esModule","a","definition","o","globalThis","Function","e","prop","hasOwnProperty","toStringTag","global__WEBPACK_IMPORTED_MODULE_0__","_fjGallery_esm__WEBPACK_IMPORTED_MODULE_1__","oldInit","oldDestroy","jQueryPlugin","oldJqPlugin","oldPlugin","noConflict","jQcontainer","destroy","removeData","unshift","res"],"mappings":";;;;;IAAA,WACA,IAAAA,EAAA,CACA,CAEA,SAAAC,EAAAC,EA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OAGA/D,YAAAqS,EAAA,QAAArS,YAEAyS,EAAAL,EAAA/K,OAAA2J,GAAAxN,UACA4O,EAAA/K,OAAA2J,GAAAxN,UAAAgP,EAEAJ,EAAA/K,OAAA2J,GAAAxN,UAAAmP,WAAA,WAEA,OADAP,EAAA/K,OAAA2J,GAAAxN,UAAAiP,EACA1O,OA5DA,GAjxCA","file":"fjGallery.min.js","sourcesContent":["/*!\n * Name : Flickr's Justified Gallery [fjGallery]\n * Version : 2.0.0\n * Author : nK \n * GitHub : https://github.com/nk-o/flickr-justified-gallery\n */\n/******/ (function() { // webpackBootstrap\n/******/ \tvar __webpack_modules__ = ([\n/* 0 */,\n/* 1 */\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar win;\n\nif (typeof window !== \"undefined\") {\n win = window;\n} else if (typeof __webpack_require__.g !== \"undefined\") {\n win = __webpack_require__.g;\n} else if (typeof self !== \"undefined\") {\n win = self;\n} else {\n win = {};\n}\n\nmodule.exports = win;\n\n/***/ }),\n/* 2 */\n/***/ (function(__unused_webpack_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__(3);\n/* harmony import */ var raf_schd__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);\n/* harmony import */ var lite_ready__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);\n/* harmony import */ var lite_ready__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lite_ready__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var justified_layout__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5);\n/* harmony import */ var justified_layout__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(justified_layout__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var global__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1);\n/* harmony import */ var global__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(global__WEBPACK_IMPORTED_MODULE_3__);\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 ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return 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 // list with all fjGallery instances\n// need to render all in one scroll/resize event\n\nvar fjGalleryList = [];\nvar updateFjGallery = (0,raf_schd__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(function () {\n fjGalleryList.forEach(function (item) {\n item.resize();\n });\n});\nglobal__WEBPACK_IMPORTED_MODULE_3__.window.addEventListener('resize', updateFjGallery);\nglobal__WEBPACK_IMPORTED_MODULE_3__.window.addEventListener('orientationchange', updateFjGallery);\nglobal__WEBPACK_IMPORTED_MODULE_3__.window.addEventListener('load', updateFjGallery);\nlite_ready__WEBPACK_IMPORTED_MODULE_1___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 maxRowsCount: Number.POSITIVE_INFINITY,\n lastRow: 'left',\n // left, center, right, hide\n transitionDuration: '0.3s',\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 = _objectSpread(_objectSpread(_objectSpread({}, self.defaults), pureDataOptions), userOptions);\n self.pureOptions = _objectSpread({}, self.options); // debounce for resize\n\n self.resize = (0,throttle_debounce__WEBPACK_IMPORTED_MODULE_0__.debounce)(self.options.resizeDebounce, self.resize);\n self.justify = (0,raf_schd__WEBPACK_IMPORTED_MODULE_4__[\"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_3__.window.getComputedStyle(el).getPropertyValue(styles);\n }\n\n Object.keys(styles).forEach(function (key) {\n el.style[key] = styles[key];\n });\n return el;\n } // set temporary transition with event listener\n\n }, {\n key: \"applyTransition\",\n value: function applyTransition($item, properties) {\n var self = this; // Remove previous event listener\n\n self.onTransitionEnd($item)(); // Add transitions\n\n self.css($item, {\n 'transition-property': properties.join(', '),\n 'transition-duration': self.options.transitionDuration\n }); // Add event listener\n\n $item.addEventListener('transitionend', self.onTransitionEnd($item, properties), false);\n }\n }, {\n key: \"onTransitionEnd\",\n value: function onTransitionEnd($item) {\n var self = this;\n return function () {\n self.css($item, {\n 'transition-property': '',\n 'transition-duration': ''\n });\n $item.removeEventListener('transitionend', self.onTransitionEnd($item));\n };\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_3__.window.jQuery && $images instanceof global__WEBPACK_IMPORTED_MODULE_3__.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 = [];\n self.justifyCount = (self.justifyCount || 0) + 1; // 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 justifiedOptions = {\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 maxNumRows: self.options.maxRowsCount,\n showWidows: self.options.lastRow !== 'hide'\n };\n var justifiedData = justified_layout__WEBPACK_IMPORTED_MODULE_2___default()(justifyArray, justifiedOptions); // Align last row\n\n if (justifiedData.widowCount && (self.options.lastRow === 'center' || self.options.lastRow === 'right')) {\n var lastItemData = justifiedData.boxes[justifiedData.boxes.length - 1];\n var gapSize = justifiedOptions.containerWidth - lastItemData.width - lastItemData.left;\n\n if (self.options.lastRow === 'center') {\n gapSize /= 2;\n }\n\n if (self.options.lastRow === 'right') {\n gapSize -= justifiedOptions.containerPadding.right;\n }\n\n for (var _i = 1; _i <= justifiedData.widowCount; _i++) {\n justifiedData.boxes[justifiedData.boxes.length - _i].left = justifiedData.boxes[justifiedData.boxes.length - _i].left + gapSize;\n }\n } // RTL compatibility\n\n\n if (self.options.isRtl) {\n justifiedData.boxes.forEach(function (boxData, i) {\n justifiedData.boxes[i].left = justifiedOptions.containerWidth - justifiedData.boxes[i].left - justifiedData.boxes[i].width - justifiedOptions.containerPadding.right + justifiedOptions.containerPadding.left;\n });\n }\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 (justifiedData.boxes[i] && 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 if (self.options.transitionDuration && self.justifyCount > 1) {\n self.applyTransition(data.$item, ['transform']);\n }\n\n self.css(data.$item, {\n display: '',\n position: 'absolute',\n transform: \"translateX(\".concat(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 } else {\n self.css(data.$item, {\n display: 'none'\n });\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 }\n\n if (self.options.transitionDuration) {\n self.applyTransition(self.$container, ['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 = _objectSpread(_objectSpread({}, self.options), options);\n self.justify();\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n var self = this;\n self.removeFromFjGalleryList();\n self.justifyCount = 0; // 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 transition: ''\n });\n self.images.forEach(function (data) {\n self.css(data.$item, {\n position: '',\n transform: '',\n transition: '',\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/* 3 */\n/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"debounce\": function() { return /* binding */ debounce; },\n/* harmony export */ \"throttle\": function() { return /* binding */ throttle; }\n/* harmony export */ });\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 */\nfunction 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\nfunction debounce(delay, atBegin, callback) {\n return callback === undefined ? throttle(delay, atBegin, false) : throttle(delay, callback, atBegin !== false);\n}\n\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module) {\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/* 5 */\n/***/ (function(module, __unused_webpack_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 Row = __webpack_require__(6);\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 = Object.assign(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/* 6 */\n/***/ (function(module) {\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 */\n\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 */\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(Object.assign({}, 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(Object.assign({}, 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(Object.assign({}, 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(Object.assign({}, 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/* 7 */\n/***/ (function(__unused_webpack_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/******/ \t]);\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tvar cachedModule = __webpack_module_cache__[moduleId];\n/******/ \t\tif (cachedModule !== undefined) {\n/******/ \t\t\treturn cachedModule.exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\t// no module.id needed\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\n/******/ \t/* webpack/runtime/compat get default export */\n/******/ \t!function() {\n/******/ \t\t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t\t__webpack_require__.n = function(module) {\n/******/ \t\t\tvar getter = module && module.__esModule ?\n/******/ \t\t\t\tfunction() { return module['default']; } :\n/******/ \t\t\t\tfunction() { return module; };\n/******/ \t\t\t__webpack_require__.d(getter, { a: getter });\n/******/ \t\t\treturn getter;\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/define property getters */\n/******/ \t!function() {\n/******/ \t\t// define getter functions for harmony exports\n/******/ \t\t__webpack_require__.d = function(exports, definition) {\n/******/ \t\t\tfor(var key in definition) {\n/******/ \t\t\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n/******/ \t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/global */\n/******/ \t!function() {\n/******/ \t\t__webpack_require__.g = (function() {\n/******/ \t\t\tif (typeof globalThis === 'object') return globalThis;\n/******/ \t\t\ttry {\n/******/ \t\t\t\treturn this || new Function('return this')();\n/******/ \t\t\t} catch (e) {\n/******/ \t\t\t\tif (typeof window === 'object') return window;\n/******/ \t\t\t}\n/******/ \t\t})();\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/hasOwnProperty shorthand */\n/******/ \t!function() {\n/******/ \t\t__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/make namespace object */\n/******/ \t!function() {\n/******/ \t\t// define __esModule on exports\n/******/ \t\t__webpack_require__.r = function(exports) {\n/******/ \t\t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t\t}\n/******/ \t\t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/************************************************************************/\nvar __webpack_exports__ = {};\n// This entry need to be wrapped in an IIFE because it need to be in strict mode.\n!function() {\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var global__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);\n/* harmony import */ var global__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(global__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _fjGallery_esm__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);\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 // no conflict\n\nvar oldPlugin = global__WEBPACK_IMPORTED_MODULE_0__.window.fjGallery;\nglobal__WEBPACK_IMPORTED_MODULE_0__.window.fjGallery = _fjGallery_esm__WEBPACK_IMPORTED_MODULE_1__[\"default\"];\n\nglobal__WEBPACK_IMPORTED_MODULE_0__.window.fjGallery.noConflict = function () {\n global__WEBPACK_IMPORTED_MODULE_0__.window.fjGallery = oldPlugin;\n return this;\n}; // jQuery support\n\n\nif (typeof global__WEBPACK_IMPORTED_MODULE_0__.jQuery !== 'undefined') {\n // add data to jQuery .data('fjGallery')\n var oldInit = global__WEBPACK_IMPORTED_MODULE_0__.window.fjGallery.constructor.prototype.init;\n\n global__WEBPACK_IMPORTED_MODULE_0__.window.fjGallery.constructor.prototype.init = function () {\n this.jQcontainer = (0,global__WEBPACK_IMPORTED_MODULE_0__.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_0__.window.fjGallery.constructor.prototype.destroy;\n\n global__WEBPACK_IMPORTED_MODULE_0__.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_1__[\"default\"].apply(global__WEBPACK_IMPORTED_MODULE_0__.window, args);\n return _typeof(res) !== 'object' ? res : this;\n };\n\n jQueryPlugin.constructor = _fjGallery_esm__WEBPACK_IMPORTED_MODULE_1__[\"default\"].constructor; // no conflict\n\n var oldJqPlugin = global__WEBPACK_IMPORTED_MODULE_0__.jQuery.fn.fjGallery;\n global__WEBPACK_IMPORTED_MODULE_0__.jQuery.fn.fjGallery = jQueryPlugin;\n\n global__WEBPACK_IMPORTED_MODULE_0__.jQuery.fn.fjGallery.noConflict = function () {\n global__WEBPACK_IMPORTED_MODULE_0__.jQuery.fn.fjGallery = oldJqPlugin;\n return this;\n };\n}\n}();\n/******/ })()\n;"]}