/*
 * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
 * This devtool is neither made for production nor for readable output files.
 * It uses "eval()" calls to create a separate source file in the browser devtools.
 * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
 * or disable the default devtool with "devtool: false".
 * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
 */
/******/ (() => { // webpackBootstrap
/******/ 	var __webpack_modules__ = ({

/***/ "./packages/module-library/filterable-gallery/filterable-gallery-frontend-init.js"
/*!****************************************************************************************************!*\
  !*** ./packages/module-library/filterable-gallery/filterable-gallery-frontend-init.js + 4 modules ***!
  \****************************************************************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("{// ESM COMPAT FLAG\n__webpack_require__.r(__webpack_exports__);\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n  dsmFilterableGalleryBoot: () => (/* binding */ dsmFilterableGalleryBoot)\n});\n\n// EXTERNAL MODULE: ./node_modules/imagesloaded/imagesloaded.js\nvar imagesloaded = __webpack_require__(\"./node_modules/imagesloaded/imagesloaded.js\");\nvar imagesloaded_default = /*#__PURE__*/__webpack_require__.n(imagesloaded);\n;// ./packages/module-library/filterable-gallery/filterable-gallery-shuffle-gutter.js\n/**\n * Column gutter in px for Shuffle from `data-shuffle-gutter-*` (matches Divi breakpoints).\n *\n * @package DiviSupreme\n */\n\n/**\n * @param {Element|null} el Shuffle root (`.dsm-filterable-gallery-inner-container`).\n * @return {number}\n */\nfunction dsmFilterableGalleryReadShuffleGutterPx(el) {\n  if (!el || !el.dataset) {\n    return 0;\n  }\n  const iw = typeof window !== 'undefined' ? window.innerWidth : 1200;\n  let raw = el.dataset.shuffleGutterDesktop || '0';\n  if (iw <= 767) {\n    raw = el.dataset.shuffleGutterPhone || el.dataset.shuffleGutterTablet || raw;\n  } else if (iw <= 980) {\n    raw = el.dataset.shuffleGutterTablet || raw;\n  }\n  const n = parseFloat(String(raw).replace(/[^0-9.-]/g, ''));\n  return Number.isFinite(n) ? Math.max(0, n) : 0;\n}\n;// ./packages/module-library/filterable-gallery/filterable-gallery-progressive-layout.js\n/**\n * Progressive Shuffle relayout after images load (lazy loaders, delayed src, etc.).\n *\n * @package DiviSupreme\n */\n\n/**\n * @param {Function} fn  Callback.\n * @param {number}   wait Ms.\n * @return {Function}\n */\nfunction dsmFgDebounce(fn, wait) {\n  /** @type {ReturnType<typeof setTimeout>|undefined} */\n  let t;\n  return function debounced(...args) {\n    clearTimeout(t);\n    t = setTimeout(() => {\n      fn.apply(this, args);\n    }, wait);\n  };\n}\n\n/**\n * @param {HTMLImageElement} img Image node.\n * @return {boolean}\n */\nfunction dsmFgImageHasDimensions(img) {\n  return img.naturalWidth > 0 && img.naturalHeight > 0;\n}\n\n/**\n * @param {HTMLElement} root       Gallery inner container.\n * @param {Function}    relayoutFn Debounced Shuffle `update()`.\n * @return {void}\n */\nfunction dsmFgAttachProgressiveImageRelayout(root, relayoutFn) {\n  const imgs = root.querySelectorAll('img');\n  imgs.forEach(img => {\n    if (img.dataset.dsmFgLoadBound === '1') {\n      return;\n    }\n    img.dataset.dsmFgLoadBound = '1';\n    const onImgEvent = () => {\n      if (dsmFgImageHasDimensions(img)) {\n        relayoutFn();\n      }\n    };\n    img.addEventListener('load', onImgEvent, {\n      passive: true\n    });\n    img.addEventListener('error', onImgEvent, {\n      passive: true\n    });\n    if (img.complete && dsmFgImageHasDimensions(img)) {\n      onImgEvent();\n    }\n  });\n}\n\n/**\n * @param {HTMLElement} root       Gallery inner container.\n * @param {Function}    relayoutFn Debounced Shuffle `update()`.\n * @return {Function} Disconnect observer.\n */\nfunction dsmFgObserveLazyImageMutations(root, relayoutFn) {\n  if (typeof MutationObserver === 'undefined') {\n    return () => {};\n  }\n  let rafId = 0;\n  const obs = new MutationObserver(() => {\n    if (rafId) {\n      return;\n    }\n    rafId = window.requestAnimationFrame(() => {\n      rafId = 0;\n      relayoutFn();\n    });\n  });\n  obs.observe(root, {\n    subtree: true,\n    attributes: true,\n    attributeFilter: ['src', 'srcset', 'sizes', 'class', 'style', 'data-src', 'data-lazyloaded', 'data-ll-status', 'width', 'height']\n  });\n  return () => {\n    if (rafId) {\n      window.cancelAnimationFrame(rafId);\n    }\n    obs.disconnect();\n  };\n}\n\n/**\n * Wire imagesLoaded progress/always + native hooks for progressive Shuffle layout.\n *\n * @param {Object}   options\n * @param {HTMLElement} options.root\n * @param {Function} options.relayout Calls `shuffleInstance.update()` (safe if destroyed).\n * @param {import('imagesloaded')} options.imagesLoaded imagesLoaded factory.\n * @return {Function} Cleanup.\n */\nfunction dsmFgBindImagesLoadedProgressiveLayout({\n  root,\n  relayout,\n  imagesLoaded: imagesLoadedFactory\n}) {\n  const debouncedRelayout = dsmFgDebounce(() => {\n    relayout();\n  }, 80);\n  const imgLoad = imagesLoadedFactory(root);\n  imgLoad.on('progress', debouncedRelayout);\n  imgLoad.on('always', debouncedRelayout);\n  dsmFgAttachProgressiveImageRelayout(root, debouncedRelayout);\n  const disconnectObserver = dsmFgObserveLazyImageMutations(root, debouncedRelayout);\n  const onWindowLoad = () => {\n    debouncedRelayout();\n  };\n  window.addEventListener('load', onWindowLoad, {\n    once: true,\n    passive: true\n  });\n  return () => {\n    disconnectObserver();\n    window.removeEventListener('load', onWindowLoad);\n  };\n}\n;// ./packages/module-library/filterable-gallery/filterable-gallery-magnific-title-src.js\n/**\n * Builds Magnific Popup `image.titleSrc` HTML from `.dsm-filterable-gallery-item`\n * `data-lightbox_*` attributes (matches PHP output + REST-derived VB attrs).\n *\n * @package DiviSupreme\n */\n\n/**\n * @param {HTMLElement} rootEl Gallery item root (delegated Magnific element).\n * @return {string} Safe fragment for Magnific title region (`allowHTMLInTemplate`).\n */\nfunction dsmFgMagnificLightboxTitleHtml(rootEl) {\n  var _rootEl$getAttribute, _rootEl$getAttribute2, _rootEl$getAttribute3;\n  if (!rootEl || typeof rootEl.getAttribute !== 'function') {\n    return '';\n  }\n  const lightboxTitle = (_rootEl$getAttribute = rootEl.getAttribute('data-lightbox_title')) !== null && _rootEl$getAttribute !== void 0 ? _rootEl$getAttribute : '';\n  const lightboxCaption = (_rootEl$getAttribute2 = rootEl.getAttribute('data-lightbox_caption')) !== null && _rootEl$getAttribute2 !== void 0 ? _rootEl$getAttribute2 : '';\n  const lightboxDescription = (_rootEl$getAttribute3 = rootEl.getAttribute('data-lightbox_description')) !== null && _rootEl$getAttribute3 !== void 0 ? _rootEl$getAttribute3 : '';\n  const encodeCharRefs = str => str.replace(/[^]/g, c => '&#' + c.charCodeAt(0) + ';');\n  let filterableContent = '';\n  if (lightboxTitle !== '') {\n    filterableContent += encodeCharRefs(lightboxTitle);\n  }\n  if (lightboxCaption !== '') {\n    filterableContent += \"<small class='dsm-filterable-image-caption'>\" + encodeCharRefs(lightboxCaption) + '</small>';\n  }\n  if (lightboxDescription !== '') {\n    filterableContent += \"<small class='dsm-filterableimage-description'>\" + encodeCharRefs(lightboxDescription) + '</small>';\n  }\n  return filterableContent;\n}\n;// ./packages/module-library/filterable-gallery/filterable-gallery-lightbox-scope.js\n/**\n * Scope Magnific Popup gallery navigation to the active filter + pagination set.\n *\n * Magnific delegate mode collects every matching element in the container on each\n * click. Toggle `dsm-fg-lightbox-in-set` so only currently visible gallery items\n * match the delegate selector (see frontend-init.js / edit.js).\n *\n * @package DiviSupreme\n */\n\n/** Magnific delegate — only items in the active filtered set. */\nconst DSM_FG_LIGHTBOX_DELEGATE = '.dsm-filterable-gallery-item.dsm-fg-lightbox-in-set[data-mfp-src]';\n\n/**\n * Whether a gallery item belongs to the active category filter.\n *\n * @param {string} groupsAttr Comma-separated category slugs from `data-groups`.\n * @param {string} category   Active filter slug or `all`.\n * @return {boolean}\n */\nfunction dsmFgItemMatchesFilterCategory(groupsAttr, category) {\n  if (category === 'all') {\n    return true;\n  }\n  return String(groupsAttr || '').split(',').includes(category);\n}\n\n/**\n * Whether a gallery item is on the active pagination page (matches `applyFilter`).\n *\n * @param {string}  inpageAttr       `data-inpage` value.\n * @param {number}  currentPage      Active page from container `data-currentpage`.\n * @param {boolean} usePagination    Container `data-showpagination === 'on'`.\n * @param {string}  paginationType   Container `data-paginationtype`.\n * @return {boolean}\n */\nfunction dsmFgItemMatchesFilterPage(inpageAttr, currentPage, usePagination, paginationType) {\n  const elementPage = Number(inpageAttr);\n  if (!usePagination) {\n    return !inpageAttr || Number.isFinite(elementPage) && elementPage !== -1;\n  }\n  if (!Number.isFinite(elementPage) || elementPage === -1) {\n    return false;\n  }\n  if (paginationType === 'number') {\n    return elementPage === currentPage;\n  }\n  return elementPage <= currentPage;\n}\n\n/**\n * Update which items participate in the Magnific gallery for the current filter.\n *\n * @param {Element|null} itemsContainer `.dsm-filterable-gallery-inner-container`.\n * @param {string}       activeCategory Active category slug or `all`.\n * @param {Object}       pagination     Pagination state from the gallery container.\n * @param {number}       pagination.currentPage\n * @param {boolean}      pagination.usePagination\n * @param {string}       pagination.paginationType\n * @return {void}\n */\nfunction dsmFgSyncLightboxGallerySet(itemsContainer, activeCategory, {\n  currentPage,\n  usePagination,\n  paginationType\n}) {\n  if (!itemsContainer) {\n    return;\n  }\n  const items = itemsContainer.querySelectorAll('.dsm-filterable-gallery-item[data-mfp-src]');\n  items.forEach(item => {\n    const inCategory = dsmFgItemMatchesFilterCategory(item.dataset.groups, activeCategory);\n    const inPage = dsmFgItemMatchesFilterPage(item.dataset.inpage, currentPage, usePagination, paginationType);\n    item.classList.toggle('dsm-fg-lightbox-in-set', inCategory && inPage);\n  });\n}\n;// ./packages/module-library/filterable-gallery/filterable-gallery-frontend-init.js\n/**\n * Supreme Filterable Gallery — Shuffle + imagesLoaded progressive layout.\n *\n * @package DiviSupreme\n */\n\n\n\n\n\n\nconst MAX_TIDY_PAGINATION_LIMIT = 5;\n\n/**\n * @return {boolean} True when Shuffle is available.\n */\nfunction dsmFgShuffleIsReady() {\n  return typeof window !== 'undefined' && typeof window.Shuffle === 'function';\n}\n\n/**\n * Bind Magnific Popup when jQuery + lightbox are available.\n *\n * @return {void}\n */\nfunction dsmFgInitMagnificPopups() {\n  if (typeof jQuery === 'undefined' || typeof jQuery.fn.magnificPopup !== 'function') {\n    return;\n  }\n  const containers = document.querySelectorAll('.dsm-filterable-gallery-container');\n  containers.forEach(item => {\n    if ('on' !== item.dataset.use_lightbox) {\n      return;\n    }\n    const innerContainer = item.querySelector('.dsm-filterable-gallery-inner-container');\n    if (!innerContainer) {\n      return;\n    }\n    jQuery(innerContainer).magnificPopup({\n      delegate: DSM_FG_LIGHTBOX_DELEGATE,\n      type: 'image',\n      mainClass: 'dsm-filterable-gallery-lightbox',\n      tLoading: 'Loading image ',\n      gallery: {\n        enabled: true,\n        navigateByImgClick: true,\n        preload: [0, 1]\n      },\n      image: {\n        titleSrc(mfpItem) {\n          return dsmFgMagnificLightboxTitleHtml(mfpItem.el[0]);\n        }\n      },\n      allowHTMLInTemplate: true\n    });\n  });\n}\n\n/**\n * Boot Filterable Gallery on the frontend (requires global `Shuffle` from library script).\n *\n * @return {boolean} True when at least one gallery initialized.\n */\nfunction dsmFilterableGalleryBoot() {\n  if (!dsmFgShuffleIsReady()) {\n    return false;\n  }\n  dsmFgInitMagnificPopups();\n  const containers = document.querySelectorAll('.dsm-filterable-gallery-container');\n  if (!containers.length) {\n    return false;\n  }\n  containers.forEach(container => {\n    const itemsContainer = container.querySelector('.dsm-filterable-gallery-inner-container');\n    if (!itemsContainer) {\n      return;\n    }\n    if (itemsContainer.dataset.dsmFgShuffleBound === '1') {\n      return;\n    }\n    itemsContainer.dataset.dsmFgShuffleBound = '1';\n    window.requestAnimationFrame(() => {\n      initShuffleGallery(container, itemsContainer);\n    });\n  });\n  return true;\n}\n\n/**\n * Schedule boot; retry on `load` when Shuffle or DOM was not ready (defer / delayed JS).\n *\n * @return {void}\n */\nfunction dsmFgScheduleFilterableGalleryBoot() {\n  const run = () => {\n    if (dsmFilterableGalleryBoot()) {\n      return;\n    }\n    if (!dsmFgShuffleIsReady()) {\n      window.addEventListener('load', () => {\n        dsmFilterableGalleryBoot();\n      }, {\n        once: true,\n        passive: true\n      });\n    }\n  };\n  if (document.readyState === 'loading') {\n    document.addEventListener('DOMContentLoaded', run, {\n      once: true,\n      passive: true\n    });\n  } else {\n    run();\n  }\n}\nif (typeof window !== 'undefined') {\n  window.dsmFilterableGalleryBoot = dsmFilterableGalleryBoot;\n  dsmFgScheduleFilterableGalleryBoot();\n}\n\n/**\n * @param {Element} container\n * @param {Element} itemsContainer\n */\nfunction initShuffleGallery(container, itemsContainer) {\n  var _ref, _selectedTab$dataset$;\n  itemsContainer.classList.remove('dsm-fg-layout-pending');\n  itemsContainer.classList.add('dsm-fg-layout-ready');\n  let paginationI18n = {};\n  try {\n    paginationI18n = JSON.parse(container.dataset.i18nPagination || '{}');\n  } catch (e) {\n    paginationI18n = {};\n  }\n  const goToPageTemplate = paginationI18n.goToPage || 'Go to page %d';\n  const loadMoreWrap = container.querySelector('.dsm-gallery-loadmore-container');\n  const loadMoreButton = loadMoreWrap ? loadMoreWrap.querySelector('.dsm-gallery-loadmore-button') : null;\n  const numberPagination = container.querySelector('.dsm-gallery-number-pagination-container');\n  const filters = container.querySelectorAll('.dsm-filterable-gallery-filter-item');\n  const tablist = container.querySelector('[role=\"tablist\"]');\n  const perPage = Number(container.dataset.per_page);\n  const usePagination = container.dataset.showpagination === 'on';\n  const paginationType = container.dataset.paginationtype;\n  const speed = Number(container.dataset.speed);\n  const isPaginationTidy = numberPagination && 'on' === numberPagination.dataset.tidyPagination;\n  const shuffleInstance = new window.Shuffle(itemsContainer, {\n    itemSelector: '.dsm-filterable-gallery-item',\n    delimiter: ',',\n    speed: speed,\n    buffer: 1,\n    gutterWidth() {\n      return dsmFilterableGalleryReadShuffleGutterPx(itemsContainer);\n    }\n  });\n  const relayoutShuffle = () => {\n    try {\n      shuffleInstance.update();\n    } catch (e) {\n      // Ignore if destroyed.\n    }\n  };\n  dsmFgBindImagesLoadedProgressiveLayout({\n    root: itemsContainer,\n    relayout: relayoutShuffle,\n    imagesLoaded: (imagesloaded_default())\n  });\n  let shuffleResizeTimer;\n  function onShuffleWindowResize() {\n    window.clearTimeout(shuffleResizeTimer);\n    shuffleResizeTimer = window.setTimeout(relayoutShuffle, 150);\n  }\n  window.addEventListener('resize', onShuffleWindowResize);\n  const observer = new IntersectionObserver(entries => {\n    if (entries[0].intersectionRatio >= 0.5) {\n      shuffleInstance.update();\n    }\n    if (entries[0].isIntersecting) {\n      shuffleInstance.update();\n    }\n  });\n  observer.observe(itemsContainer);\n  function chunk(arr, len) {\n    const chunks = [];\n    let i = 0;\n    const n = arr.length;\n    while (i < n) {\n      chunks.push(arr.slice(i, i += len));\n    }\n    return chunks;\n  }\n  function makePageButton(normalizedPageIndex) {\n    const btn = document.createElement('button');\n    btn.type = 'button';\n    btn.classList.add('dsm-gallery-number-pagination');\n    btn.setAttribute('data-pagination', String(normalizedPageIndex));\n    btn.textContent = String(normalizedPageIndex);\n    const label = goToPageTemplate.replace('%d', String(normalizedPageIndex));\n    btn.setAttribute('aria-label', label);\n    return btn;\n  }\n  function updatePagination() {\n    const currentPage = Number(container.dataset.currentpage);\n    const totalPages = Number(container.dataset.totalpages);\n    const canTidy = totalPages > MAX_TIDY_PAGINATION_LIMIT;\n    if (!numberPagination) {\n      return;\n    }\n    numberPagination.innerHTML = '';\n    const prevHtml = numberPagination.getAttribute('data-pagination-prev-text') || '';\n    const prevPlain = (() => {\n      const d = document.createElement('div');\n      d.innerHTML = prevHtml;\n      return (d.textContent || '').trim();\n    })();\n    const prevButton = document.createElement('button');\n    prevButton.type = 'button';\n    prevButton.classList.add('dsm-gallery-number-pagination');\n    prevButton.setAttribute('data-pagination', 'prev');\n    prevButton.setAttribute('aria-label', prevPlain || 'Previous page');\n    prevButton.innerHTML = prevHtml;\n    const prevDot = document.createElement('span');\n    prevDot.classList.add('dsm-gallery-previous-dot');\n    prevDot.setAttribute('aria-hidden', 'true');\n    prevDot.textContent = '...';\n    numberPagination.appendChild(prevButton);\n    if (isPaginationTidy && currentPage > MAX_TIDY_PAGINATION_LIMIT) {\n      numberPagination.appendChild(prevDot);\n    }\n    if (canTidy && isPaginationTidy) {\n      const pageList = new Array(totalPages).fill(0).map((_, idx) => idx + 1);\n      const tidyPageList = currentPage >= 5 ? pageList.slice(currentPage - 3, currentPage + 2) : [1, 2, 3, 4, 5];\n      tidyPageList.forEach(normalizedPageIndex => {\n        numberPagination.appendChild(makePageButton(normalizedPageIndex));\n      });\n    } else {\n      for (let index = 0; index < totalPages; index++) {\n        const normalizedPageIndex = index + 1;\n        numberPagination.appendChild(makePageButton(normalizedPageIndex));\n      }\n    }\n    const nextHtml = numberPagination.getAttribute('data-pagination-next-text') || '';\n    const nextPlain = (() => {\n      const d = document.createElement('div');\n      d.innerHTML = nextHtml;\n      return (d.textContent || '').trim();\n    })();\n    const nextBtn = document.createElement('button');\n    nextBtn.type = 'button';\n    nextBtn.classList.add('dsm-gallery-number-pagination');\n    nextBtn.setAttribute('data-pagination', 'next');\n    nextBtn.setAttribute('aria-label', nextPlain || 'Next page');\n    nextBtn.innerHTML = nextHtml;\n    const nextDot = document.createElement('span');\n    nextDot.classList.add('dsm-gallery-next-dot');\n    nextDot.setAttribute('aria-hidden', 'true');\n    nextDot.textContent = '...';\n    if (isPaginationTidy && currentPage > MAX_TIDY_PAGINATION_LIMIT) {\n      numberPagination.appendChild(nextDot);\n    }\n    numberPagination.appendChild(nextBtn);\n    handleNumberPagination();\n  }\n  function getActiveFilterName() {\n    const activeFilter = Array.from(filters).find(filter => filter.classList.contains('dsm-active-filter'));\n    if (activeFilter && activeFilter.hasAttribute('data-category') && activeFilter.dataset.category !== 'undefined') {\n      return activeFilter.dataset.category;\n    }\n    return 'all';\n  }\n  function updatePaginationIndexes(group) {\n    const items = container.querySelectorAll('.dsm-filterable-gallery-item');\n    const relevantItems = Array.from(items).filter(item => {\n      return item.dataset.groups.split(',').includes(group);\n    });\n    const pageLength = usePagination ? perPage : relevantItems.length;\n    const relevantItemsInPages = chunk(relevantItems, pageLength);\n    items.forEach(item => {\n      item.setAttribute('data-inpage', '-1');\n    });\n    relevantItemsInPages.forEach((itemsInPage, currentPageIndex) => {\n      const normalizedPageIndex = currentPageIndex + 1;\n      itemsInPage.forEach(item => {\n        item.setAttribute('data-inpage', normalizedPageIndex.toString());\n      });\n    });\n    container.setAttribute('data-totalPages', relevantItemsInPages.length);\n    const newItems = container.querySelectorAll('.dsm-filterable-gallery-item');\n    const nextPageItems = Array.from(newItems).filter(item => {\n      const itemPage = Number(item.dataset.inpage);\n      const isRelevant = item.dataset.groups.split(',').includes(group);\n      const nextPageIndex = Number(container.dataset.currentpage) + 1;\n      const isInCurrentPage = itemPage === nextPageIndex;\n      return isInCurrentPage && isRelevant;\n    });\n    const prevPageItems = Array.from(newItems).filter(item => {\n      const itemPage = Number(item.dataset.inpage);\n      const isRelevant = item.dataset.groups.split(',').includes(group);\n      const nextPageIndex = Number(container.dataset.currentpage) - 1;\n      const isInCurrentPage = itemPage === nextPageIndex;\n      return isInCurrentPage && isRelevant;\n    });\n    const hasNextPage = nextPageItems.length > 0;\n    const hasPrevPage = prevPageItems.length > 0;\n    container.setAttribute('data-hasnextpage', String(hasNextPage));\n    container.setAttribute('data-hasPrevpage', String(hasPrevPage));\n    if (isPaginationTidy) {\n      updatePagination();\n    }\n  }\n  function loadMore() {\n    const currentPage = Number(container.dataset.currentpage);\n    const nextPage = currentPage + 1;\n    const activeFilter = getActiveFilterName();\n    container.setAttribute('data-currentpage', nextPage.toString());\n    updatePaginationIndexes(activeFilter);\n    applyFilter(activeFilter, nextPage);\n  }\n  let numberPaginationClickBound = false;\n  function handleNumberPagination() {\n    if (!numberPagination) {\n      return;\n    }\n    const paginations = numberPagination.querySelectorAll('.dsm-gallery-number-pagination');\n    const hasPrevPage = Number(container.dataset.currentpage) > 1;\n    const hasNextPage = container.dataset.hasnextpage === 'true';\n    paginations.forEach(pagination => {\n      pagination.classList.remove('dsm-active-pagination-item');\n      if (!Number.isNaN(Number(pagination.dataset.pagination)) && !hasNextPage && !hasPrevPage) {\n        pagination.style.display = 'none';\n      } else {\n        pagination.style.display = '';\n      }\n      if (Number(container.dataset.currentpage) === Number(pagination.dataset.pagination)) {\n        pagination.classList.add('dsm-active-pagination-item');\n      }\n    });\n    if (numberPaginationClickBound) {\n      return;\n    }\n    numberPaginationClickBound = true;\n    numberPagination.addEventListener('click', e => {\n      const pagination = e.target.closest('.dsm-gallery-number-pagination');\n      if (!pagination) {\n        return;\n      }\n      const hasNext = container.dataset.hasnextpage === 'true';\n      const paginationsLive = numberPagination.querySelectorAll('.dsm-gallery-number-pagination');\n      paginationsLive.forEach(pg => pg.classList.remove('dsm-active-pagination-item'));\n      const currentPage = Number(container.dataset.currentpage);\n      const paginationPage = pagination.dataset.pagination;\n      const activeFilter = getActiveFilterName();\n      const hasPrev = currentPage > 1;\n      switch (paginationPage) {\n        case 'next':\n          {\n            if (!hasNext) {\n              return;\n            }\n            const nextPage = currentPage + 1;\n            paginationsLive.forEach(pg => {\n              const pgPage = pg.dataset.pagination;\n              if (nextPage === Number(pgPage)) {\n                pg.classList.add('dsm-active-pagination-item');\n              }\n            });\n            container.setAttribute('data-currentpage', String(nextPage));\n            applyFilter(activeFilter, nextPage);\n            break;\n          }\n        case 'prev':\n          {\n            if (!hasPrev) {\n              return;\n            }\n            const prevPage = currentPage - 1;\n            paginationsLive.forEach(pg => {\n              const pgPage = pg.dataset.pagination;\n              if (prevPage === Number(pgPage)) {\n                pg.classList.add('dsm-active-pagination-item');\n              }\n            });\n            container.setAttribute('data-currentpage', String(prevPage));\n            applyFilter(activeFilter, prevPage);\n            break;\n          }\n        default:\n          {\n            pagination.classList.add('dsm-active-pagination-item');\n            container.setAttribute('data-currentpage', paginationPage);\n            applyFilter(activeFilter, Number(paginationPage));\n          }\n      }\n    });\n  }\n  function resetPagination() {\n    container.setAttribute('data-currentpage', '1');\n  }\n  function handleFilterState(group) {\n    filters.forEach(filter => {\n      const currentCategory = filter.dataset.category;\n      const selected = group === currentCategory;\n      if (selected) {\n        filter.classList.add('dsm-active-filter');\n        filter.setAttribute('aria-selected', 'true');\n        if (filter.id && itemsContainer.getAttribute('role') === 'tabpanel') {\n          itemsContainer.setAttribute('aria-labelledby', filter.id);\n        }\n      } else {\n        filter.classList.remove('dsm-active-filter');\n        filter.setAttribute('aria-selected', 'false');\n      }\n    });\n  }\n  function applyFilter(group, currentPage = container.dataset.currentpage) {\n    currentPage = Number(container.dataset.currentpage);\n    shuffleInstance.filter(element => {\n      const elementPage = Number(element.dataset.inpage);\n      const elementCategories = element.dataset.groups;\n      const isInCurrentPage = (paginationType === 'number' ? elementPage === currentPage : elementPage <= currentPage) && elementPage !== -1;\n      const isInCurrentCategory = elementCategories.split(',').includes(group);\n      return isInCurrentCategory && isInCurrentPage;\n    });\n    handleFilterState(group);\n    updatePaginationIndexes(group);\n    dsmFgSyncLightboxGallerySet(itemsContainer, group, {\n      currentPage,\n      usePagination,\n      paginationType\n    });\n  }\n  filters.forEach(filter => {\n    filter.addEventListener('click', () => {\n      const currentCategory = filter.dataset.category;\n      updatePaginationIndexes(currentCategory);\n      resetPagination();\n      applyFilter(currentCategory);\n      if (numberPagination) {\n        updatePagination();\n      }\n      if (itemsContainer.getAttribute('role') === 'tabpanel') {\n        itemsContainer.focus({\n          preventScroll: true\n        });\n      }\n    });\n  });\n  if (tablist && filters.length > 1) {\n    tablist.addEventListener('keydown', e => {\n      const keys = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Home', 'End'];\n      if (!keys.includes(e.key)) {\n        return;\n      }\n      const tabButtons = Array.from(tablist.querySelectorAll('[role=\"tab\"]'));\n      if (tabButtons.length < 2) {\n        return;\n      }\n      e.preventDefault();\n      const currentIndex = tabButtons.findIndex(t => t.getAttribute('aria-selected') === 'true');\n      const start = currentIndex >= 0 ? currentIndex : 0;\n      let nextIndex = start;\n      if (e.key === 'ArrowRight' || e.key === 'ArrowDown') {\n        nextIndex = (start + 1) % tabButtons.length;\n      } else if (e.key === 'ArrowLeft' || e.key === 'ArrowUp') {\n        nextIndex = (start - 1 + tabButtons.length) % tabButtons.length;\n      } else if (e.key === 'Home') {\n        nextIndex = 0;\n      } else if (e.key === 'End') {\n        nextIndex = tabButtons.length - 1;\n      }\n      tabButtons[nextIndex].click();\n      tabButtons[nextIndex].focus();\n    });\n  }\n  if (loadMoreButton) {\n    loadMoreButton.addEventListener('click', () => loadMore());\n  }\n  const selectedTab = container.querySelector('.dsm-filterable-gallery-filter-item[aria-selected=\"true\"]');\n  const initiallyActiveCategory = (_ref = (_selectedTab$dataset$ = selectedTab?.dataset?.category) !== null && _selectedTab$dataset$ !== void 0 ? _selectedTab$dataset$ : filters[0]?.dataset?.category) !== null && _ref !== void 0 ? _ref : 'all';\n  updatePaginationIndexes(initiallyActiveCategory);\n  applyFilter(initiallyActiveCategory);\n  updatePagination();\n  relayoutShuffle();\n}\n\n//# sourceURL=webpack://divi-supreme/./packages/module-library/filterable-gallery/filterable-gallery-frontend-init.js_+_4_modules?\n}");

/***/ },

/***/ "./node_modules/ev-emitter/ev-emitter.js"
/*!***********************************************!*\
  !*** ./node_modules/ev-emitter/ev-emitter.js ***!
  \***********************************************/
(module) {

eval("{/**\n * EvEmitter v2.1.1\n * Lil' event emitter\n * MIT License\n */\n\n( function( global, factory ) {\n  // universal module definition\n  if (  true && module.exports ) {\n    // CommonJS - Browserify, Webpack\n    module.exports = factory();\n  } else {\n    // Browser globals\n    global.EvEmitter = factory();\n  }\n\n}( typeof window != 'undefined' ? window : this, function() {\n\nfunction EvEmitter() {}\n\nlet proto = EvEmitter.prototype;\n\nproto.on = function( eventName, listener ) {\n  if ( !eventName || !listener ) return this;\n\n  // set events hash\n  let events = this._events = this._events || {};\n  // set listeners array\n  let listeners = events[ eventName ] = events[ eventName ] || [];\n  // only add once\n  if ( !listeners.includes( listener ) ) {\n    listeners.push( listener );\n  }\n\n  return this;\n};\n\nproto.once = function( eventName, listener ) {\n  if ( !eventName || !listener ) return this;\n\n  // add event\n  this.on( eventName, listener );\n  // set once flag\n  // set onceEvents hash\n  let onceEvents = this._onceEvents = this._onceEvents || {};\n  // set onceListeners object\n  let onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {};\n  // set flag\n  onceListeners[ listener ] = true;\n\n  return this;\n};\n\nproto.off = function( eventName, listener ) {\n  let listeners = this._events && this._events[ eventName ];\n  if ( !listeners || !listeners.length ) return this;\n\n  let index = listeners.indexOf( listener );\n  if ( index != -1 ) {\n    listeners.splice( index, 1 );\n  }\n\n  return this;\n};\n\nproto.emitEvent = function( eventName, args ) {\n  let listeners = this._events && this._events[ eventName ];\n  if ( !listeners || !listeners.length ) return this;\n\n  // copy over to avoid interference if .off() in listener\n  listeners = listeners.slice( 0 );\n  args = args || [];\n  // once stuff\n  let onceListeners = this._onceEvents && this._onceEvents[ eventName ];\n\n  for ( let listener of listeners ) {\n    let isOnce = onceListeners && onceListeners[ listener ];\n    if ( isOnce ) {\n      // remove listener\n      // remove before trigger to prevent recursion\n      this.off( eventName, listener );\n      // unset once flag\n      delete onceListeners[ listener ];\n    }\n    // trigger listener\n    listener.apply( this, args );\n  }\n\n  return this;\n};\n\nproto.allOff = function() {\n  delete this._events;\n  delete this._onceEvents;\n  return this;\n};\n\nreturn EvEmitter;\n\n} ) );\n\n\n//# sourceURL=webpack://divi-supreme/./node_modules/ev-emitter/ev-emitter.js?\n}");

/***/ },

/***/ "./node_modules/imagesloaded/imagesloaded.js"
/*!***************************************************!*\
  !*** ./node_modules/imagesloaded/imagesloaded.js ***!
  \***************************************************/
(module, __unused_webpack_exports, __webpack_require__) {

eval("{/*!\n * imagesLoaded v5.0.0\n * JavaScript is all like \"You images are done yet or what?\"\n * MIT License\n */\n\n( function( window, factory ) {\n  // universal module definition\n  if (  true && module.exports ) {\n    // CommonJS\n    module.exports = factory( window, __webpack_require__(/*! ev-emitter */ \"./node_modules/ev-emitter/ev-emitter.js\") );\n  } else {\n    // browser global\n    window.imagesLoaded = factory( window, window.EvEmitter );\n  }\n\n} )( typeof window !== 'undefined' ? window : this,\n    function factory( window, EvEmitter ) {\n\nlet $ = window.jQuery;\nlet console = window.console;\n\n// -------------------------- helpers -------------------------- //\n\n// turn element or nodeList into an array\nfunction makeArray( obj ) {\n  // use object if already an array\n  if ( Array.isArray( obj ) ) return obj;\n\n  let isArrayLike = typeof obj == 'object' && typeof obj.length == 'number';\n  // convert nodeList to array\n  if ( isArrayLike ) return [ ...obj ];\n\n  // array of single index\n  return [ obj ];\n}\n\n// -------------------------- imagesLoaded -------------------------- //\n\n/**\n * @param {[Array, Element, NodeList, String]} elem\n * @param {[Object, Function]} options - if function, use as callback\n * @param {Function} onAlways - callback function\n * @returns {ImagesLoaded}\n */\nfunction ImagesLoaded( elem, options, onAlways ) {\n  // coerce ImagesLoaded() without new, to be new ImagesLoaded()\n  if ( !( this instanceof ImagesLoaded ) ) {\n    return new ImagesLoaded( elem, options, onAlways );\n  }\n  // use elem as selector string\n  let queryElem = elem;\n  if ( typeof elem == 'string' ) {\n    queryElem = document.querySelectorAll( elem );\n  }\n  // bail if bad element\n  if ( !queryElem ) {\n    console.error(`Bad element for imagesLoaded ${queryElem || elem}`);\n    return;\n  }\n\n  this.elements = makeArray( queryElem );\n  this.options = {};\n  // shift arguments if no options set\n  if ( typeof options == 'function' ) {\n    onAlways = options;\n  } else {\n    Object.assign( this.options, options );\n  }\n\n  if ( onAlways ) this.on( 'always', onAlways );\n\n  this.getImages();\n  // add jQuery Deferred object\n  if ( $ ) this.jqDeferred = new $.Deferred();\n\n  // HACK check async to allow time to bind listeners\n  setTimeout( this.check.bind( this ) );\n}\n\nImagesLoaded.prototype = Object.create( EvEmitter.prototype );\n\nImagesLoaded.prototype.getImages = function() {\n  this.images = [];\n\n  // filter & find items if we have an item selector\n  this.elements.forEach( this.addElementImages, this );\n};\n\nconst elementNodeTypes = [ 1, 9, 11 ];\n\n/**\n * @param {Node} elem\n */\nImagesLoaded.prototype.addElementImages = function( elem ) {\n  // filter siblings\n  if ( elem.nodeName === 'IMG' ) {\n    this.addImage( elem );\n  }\n  // get background image on element\n  if ( this.options.background === true ) {\n    this.addElementBackgroundImages( elem );\n  }\n\n  // find children\n  // no non-element nodes, #143\n  let { nodeType } = elem;\n  if ( !nodeType || !elementNodeTypes.includes( nodeType ) ) return;\n\n  let childImgs = elem.querySelectorAll('img');\n  // concat childElems to filterFound array\n  for ( let img of childImgs ) {\n    this.addImage( img );\n  }\n\n  // get child background images\n  if ( typeof this.options.background == 'string' ) {\n    let children = elem.querySelectorAll( this.options.background );\n    for ( let child of children ) {\n      this.addElementBackgroundImages( child );\n    }\n  }\n};\n\nconst reURL = /url\\((['\"])?(.*?)\\1\\)/gi;\n\nImagesLoaded.prototype.addElementBackgroundImages = function( elem ) {\n  let style = getComputedStyle( elem );\n  // Firefox returns null if in a hidden iframe https://bugzil.la/548397\n  if ( !style ) return;\n\n  // get url inside url(\"...\")\n  let matches = reURL.exec( style.backgroundImage );\n  while ( matches !== null ) {\n    let url = matches && matches[2];\n    if ( url ) {\n      this.addBackground( url, elem );\n    }\n    matches = reURL.exec( style.backgroundImage );\n  }\n};\n\n/**\n * @param {Image} img\n */\nImagesLoaded.prototype.addImage = function( img ) {\n  let loadingImage = new LoadingImage( img );\n  this.images.push( loadingImage );\n};\n\nImagesLoaded.prototype.addBackground = function( url, elem ) {\n  let background = new Background( url, elem );\n  this.images.push( background );\n};\n\nImagesLoaded.prototype.check = function() {\n  this.progressedCount = 0;\n  this.hasAnyBroken = false;\n  // complete if no images\n  if ( !this.images.length ) {\n    this.complete();\n    return;\n  }\n\n  /* eslint-disable-next-line func-style */\n  let onProgress = ( image, elem, message ) => {\n    // HACK - Chrome triggers event before object properties have changed. #83\n    setTimeout( () => {\n      this.progress( image, elem, message );\n    } );\n  };\n\n  this.images.forEach( function( loadingImage ) {\n    loadingImage.once( 'progress', onProgress );\n    loadingImage.check();\n  } );\n};\n\nImagesLoaded.prototype.progress = function( image, elem, message ) {\n  this.progressedCount++;\n  this.hasAnyBroken = this.hasAnyBroken || !image.isLoaded;\n  // progress event\n  this.emitEvent( 'progress', [ this, image, elem ] );\n  if ( this.jqDeferred && this.jqDeferred.notify ) {\n    this.jqDeferred.notify( this, image );\n  }\n  // check if completed\n  if ( this.progressedCount === this.images.length ) {\n    this.complete();\n  }\n\n  if ( this.options.debug && console ) {\n    console.log( `progress: ${message}`, image, elem );\n  }\n};\n\nImagesLoaded.prototype.complete = function() {\n  let eventName = this.hasAnyBroken ? 'fail' : 'done';\n  this.isComplete = true;\n  this.emitEvent( eventName, [ this ] );\n  this.emitEvent( 'always', [ this ] );\n  if ( this.jqDeferred ) {\n    let jqMethod = this.hasAnyBroken ? 'reject' : 'resolve';\n    this.jqDeferred[ jqMethod ]( this );\n  }\n};\n\n// --------------------------  -------------------------- //\n\nfunction LoadingImage( img ) {\n  this.img = img;\n}\n\nLoadingImage.prototype = Object.create( EvEmitter.prototype );\n\nLoadingImage.prototype.check = function() {\n  // If complete is true and browser supports natural sizes,\n  // try to check for image status manually.\n  let isComplete = this.getIsImageComplete();\n  if ( isComplete ) {\n    // report based on naturalWidth\n    this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );\n    return;\n  }\n\n  // If none of the checks above matched, simulate loading on detached element.\n  this.proxyImage = new Image();\n  // add crossOrigin attribute. #204\n  if ( this.img.crossOrigin ) {\n    this.proxyImage.crossOrigin = this.img.crossOrigin;\n  }\n  this.proxyImage.addEventListener( 'load', this );\n  this.proxyImage.addEventListener( 'error', this );\n  // bind to image as well for Firefox. #191\n  this.img.addEventListener( 'load', this );\n  this.img.addEventListener( 'error', this );\n  this.proxyImage.src = this.img.currentSrc || this.img.src;\n};\n\nLoadingImage.prototype.getIsImageComplete = function() {\n  // check for non-zero, non-undefined naturalWidth\n  // fixes Safari+InfiniteScroll+Masonry bug infinite-scroll#671\n  return this.img.complete && this.img.naturalWidth;\n};\n\nLoadingImage.prototype.confirm = function( isLoaded, message ) {\n  this.isLoaded = isLoaded;\n  let { parentNode } = this.img;\n  // emit progress with parent <picture> or self <img>\n  let elem = parentNode.nodeName === 'PICTURE' ? parentNode : this.img;\n  this.emitEvent( 'progress', [ this, elem, message ] );\n};\n\n// ----- events ----- //\n\n// trigger specified handler for event type\nLoadingImage.prototype.handleEvent = function( event ) {\n  let method = 'on' + event.type;\n  if ( this[ method ] ) {\n    this[ method ]( event );\n  }\n};\n\nLoadingImage.prototype.onload = function() {\n  this.confirm( true, 'onload' );\n  this.unbindEvents();\n};\n\nLoadingImage.prototype.onerror = function() {\n  this.confirm( false, 'onerror' );\n  this.unbindEvents();\n};\n\nLoadingImage.prototype.unbindEvents = function() {\n  this.proxyImage.removeEventListener( 'load', this );\n  this.proxyImage.removeEventListener( 'error', this );\n  this.img.removeEventListener( 'load', this );\n  this.img.removeEventListener( 'error', this );\n};\n\n// -------------------------- Background -------------------------- //\n\nfunction Background( url, element ) {\n  this.url = url;\n  this.element = element;\n  this.img = new Image();\n}\n\n// inherit LoadingImage prototype\nBackground.prototype = Object.create( LoadingImage.prototype );\n\nBackground.prototype.check = function() {\n  this.img.addEventListener( 'load', this );\n  this.img.addEventListener( 'error', this );\n  this.img.src = this.url;\n  // check if image is already complete\n  let isComplete = this.getIsImageComplete();\n  if ( isComplete ) {\n    this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );\n    this.unbindEvents();\n  }\n};\n\nBackground.prototype.unbindEvents = function() {\n  this.img.removeEventListener( 'load', this );\n  this.img.removeEventListener( 'error', this );\n};\n\nBackground.prototype.confirm = function( isLoaded, message ) {\n  this.isLoaded = isLoaded;\n  this.emitEvent( 'progress', [ this, this.element, message ] );\n};\n\n// -------------------------- jQuery -------------------------- //\n\nImagesLoaded.makeJQueryPlugin = function( jQuery ) {\n  jQuery = jQuery || window.jQuery;\n  if ( !jQuery ) return;\n\n  // set local variable\n  $ = jQuery;\n  // $().imagesLoaded()\n  $.fn.imagesLoaded = function( options, onAlways ) {\n    let instance = new ImagesLoaded( this, options, onAlways );\n    return instance.jqDeferred.promise( $( this ) );\n  };\n};\n// try making plugin\nImagesLoaded.makeJQueryPlugin();\n\n// --------------------------  -------------------------- //\n\nreturn ImagesLoaded;\n\n} );\n\n\n//# sourceURL=webpack://divi-supreme/./node_modules/imagesloaded/imagesloaded.js?\n}");

/***/ }

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			// no module.id needed
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		if (!(moduleId in __webpack_modules__)) {
/******/ 			delete __webpack_module_cache__[moduleId];
/******/ 			var e = new Error("Cannot find module '" + moduleId + "'");
/******/ 			e.code = 'MODULE_NOT_FOUND';
/******/ 			throw e;
/******/ 		}
/******/ 		__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
/******/ 	/* webpack/runtime/compat get default export */
/******/ 	(() => {
/******/ 		// getDefaultExport function for compatibility with non-harmony modules
/******/ 		__webpack_require__.n = (module) => {
/******/ 			var getter = module && module.__esModule ?
/******/ 				() => (module['default']) :
/******/ 				() => (module);
/******/ 			__webpack_require__.d(getter, { a: getter });
/******/ 			return getter;
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/define property getters */
/******/ 	(() => {
/******/ 		// define getter functions for harmony exports
/******/ 		__webpack_require__.d = (exports, definition) => {
/******/ 			for(var key in definition) {
/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 				}
/******/ 			}
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
/******/ 	(() => {
/******/ 		__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/make namespace object */
/******/ 	(() => {
/******/ 		// define __esModule on exports
/******/ 		__webpack_require__.r = (exports) => {
/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 			}
/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
/******/ 		};
/******/ 	})();
/******/ 	
/************************************************************************/
/******/ 	
/******/ 	// startup
/******/ 	// Load entry module and return exports
/******/ 	// This entry module can't be inlined because the eval devtool is used.
/******/ 	var __webpack_exports__ = __webpack_require__("./packages/module-library/filterable-gallery/filterable-gallery-frontend-init.js");
/******/ 	
/******/ })()
;