/*
 * 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
/******/ 	"use strict";
/******/ 	var __webpack_modules__ = ({

/***/ "./packages/extensions/image-parallax/vb-entry.js"
/*!*********************************************************************!*\
  !*** ./packages/extensions/image-parallax/vb-entry.js + 21 modules ***!
  \*********************************************************************/
() {

eval("{\n;// ./packages/extensions/image-parallax/image-parallax.scss\n// extracted by mini-css-extract-plugin\n\n;// external \"window.vendor.wp.hooks\"\nconst external_window_vendor_wp_hooks_namespaceObject = window.vendor.wp.hooks;\n;// ./packages/extensions/shared/extension-runtime.js\n/**\n * Shared extension runtime helpers (VB performance + gating).\n *\n * @package DiviSupreme\n */\n\n/**\n * Opt-in extension: enabled only when PHP sets the flag to true (settings default off).\n *\n * @param {string}      configKey  Key on `window.diviSupreme5` (e.g. `dsmImageParallaxExtensionEnabled`).\n * @param {string}      windowFlag Optional `window.__dsm*ExtensionEnabled` override.\n * @return {boolean}\n */\nfunction dsmExtensionOptInEnabled(configKey, windowFlag) {\n  if (windowFlag && typeof window[windowFlag] === 'boolean') {\n    return window[windowFlag];\n  }\n  return window.diviSupreme5?.[configKey] === true;\n}\n\n/**\n * Opt-out extension: enabled when the flag is not explicitly false (legacy defaults on).\n *\n * @param {string}      configKey  Key on `window.diviSupreme5`.\n * @param {string}      windowFlag Optional `window.__dsm*ExtensionEnabled` override.\n * @return {boolean}\n */\nfunction dsmExtensionOptOutEnabled(configKey, windowFlag) {\n  if (windowFlag && typeof window[windowFlag] === 'boolean') {\n    return window[windowFlag];\n  }\n  return window.diviSupreme5?.[configKey] !== false;\n}\n\n/**\n * @return {boolean}\n */\nfunction dsmPopupExtensionGloballyEnabled() {\n  return dsmExtensionOptOutEnabled('dsmSupremePopupExtensionEnabled', '__dsmSupremePopupExtensionEnabled');\n}\n\n/**\n * @return {boolean}\n */\nfunction dsmSupremeParallaxExtensionGloballyEnabled() {\n  return dsmExtensionOptOutEnabled('dsmSupremeParallaxExtensionEnabled', '__dsmSupremeParallaxExtensionEnabled');\n}\n\n/**\n * @return {boolean}\n */\nfunction dsmLineHoverAnimationExtensionGloballyEnabled() {\n  return dsmExtensionOptOutEnabled('dsmSupremeLineHoverAnimationExtensionEnabled', '__dsmSupremeLineHoverAnimationExtensionEnabled');\n}\n\n/**\n * @return {boolean}\n */\nfunction dsmImageParallaxExtensionGloballyEnabled() {\n  return dsmExtensionOptInEnabled('dsmImageParallaxExtensionEnabled', '__dsmImageParallaxExtensionEnabled');\n}\n\n/**\n * @return {boolean}\n */\nfunction dsmCustomCursorExtensionGloballyEnabled() {\n  return dsmExtensionOptInEnabled('dsmCustomCursorExtensionEnabled', '__dsmCustomCursorExtensionEnabled');\n}\n\n/**\n * @return {boolean}\n */\nfunction dsmIconLibrariesExtensionGloballyEnabled() {\n  return dsmExtensionOptInEnabled('dsmIconLibrariesExtensionEnabled', '__dsmIconLibrariesExtensionEnabled');\n}\n\n/**\n * Coalesce high-frequency VB callbacks (store subscribe, MutationObserver) to one frame.\n *\n * @param {() => void} fn\n * @return {() => void}\n */\nfunction dsmExtensionCreateRafCoalescer(fn) {\n  let queued = false;\n  return () => {\n    if (queued) {\n      return;\n    }\n    queued = true;\n    window.requestAnimationFrame(() => {\n      queued = false;\n      fn();\n    });\n  };\n}\n;// external \"window.vendor.wp.i18n\"\nconst external_window_vendor_wp_i18n_namespaceObject = window.vendor.wp.i18n;\n;// ./packages/extensions/image-parallax/defaults.js\n/**\n * Image Parallax — defaults aligned with simpleParallax.js.\n *\n * @see https://github.com/geosigno/simpleParallax.js/#settings\n *\n * @package DiviSupreme\n */\n\n/**\n * simpleParallax.js default orientation (`orientation` setting).\n *\n * @type {'up'}\n */\nconst DSM_IPX_DEFAULT_ORIENTATION = 'up';\n\n/** @type {readonly string[]} */\nconst DSM_IPX_ORIENTATIONS = /** @type {const} */['up', 'right', 'down', 'left', 'up left', 'up right', 'down left', 'down right'];\n\n/**\n * Capitalize orientation labels for UI (stored values stay lowercase for simpleParallax.js).\n *\n * @param {string} orientation\n * @return {string}\n */\nfunction dsmIpxFormatOrientationLabel(orientation) {\n  return String(orientation).split(' ').filter(part => part.length > 0).map(part => part.charAt(0).toUpperCase() + part.slice(1)).join(' ');\n}\n\n/** @type {Record<string, { label: string }>} */\nconst DSM_IPX_ORIENTATION_SELECT_OPTIONS = Object.fromEntries(DSM_IPX_ORIENTATIONS.map(orientation => [orientation, {\n  label: dsmIpxFormatOrientationLabel(orientation)\n}]));\n\n/**\n * Stored select value when the parallax engine should use its built-in curve.\n *\n * @type {'default'}\n */\nconst DSM_IPX_TRANSITION_DEFAULT = 'default';\n\n/**\n * Placeholder / label for the default transition curve in the Visual Builder.\n *\n * @type {'Smooth default'}\n */\nconst DSM_IPX_TRANSITION_PLACEHOLDER = 'Smooth default';\n\n/**\n * CSS transition timing values for the Parallax Transition dropdown.\n *\n * @type {readonly string[]}\n */\nconst DSM_IPX_TRANSITIONS = /** @type {const} */['ease', 'ease-in', 'ease-out', 'ease-in-out', 'linear', 'cubic-bezier(0,0,0,1)', DSM_IPX_TRANSITION_DEFAULT];\n\n/** @type {Record<string, string>} */\nconst DSM_IPX_TRANSITION_LABELS = {\n  ease: 'Ease',\n  'ease-in': 'Ease In',\n  'ease-out': 'Ease Out',\n  'ease-in-out': 'Ease In Out',\n  linear: 'Linear',\n  'cubic-bezier(0,0,0,1)': 'Cubic Bezier',\n  default: DSM_IPX_TRANSITION_PLACEHOLDER\n};\n\n/** @type {Record<string, { label: string }>} */\nconst DSM_IPX_TRANSITION_SELECT_OPTIONS = Object.fromEntries(DSM_IPX_TRANSITIONS.map(transition => {\n  var _DSM_IPX_TRANSITION_L;\n  return [transition, {\n    label: (_DSM_IPX_TRANSITION_L = DSM_IPX_TRANSITION_LABELS[transition]) !== null && _DSM_IPX_TRANSITION_L !== void 0 ? _DSM_IPX_TRANSITION_L : transition\n  }];\n}));\n\n/**\n * @param {string} transition Stored dropdown value.\n * @return {boolean}\n */\nfunction dsmIpxTransitionIsAllowed(transition) {\n  return DSM_IPX_TRANSITIONS.includes(/** @type {typeof DSM_IPX_TRANSITIONS[number]} */transition);\n}\n\n/**\n * @param {unknown} raw Stored or legacy value.\n * @return {string}\n */\nfunction dsmIpxNormalizeTransitionStored(raw) {\n  const trimmed = String(raw !== null && raw !== void 0 ? raw : '').trim();\n  if (trimmed === '' || trimmed === DSM_IPX_TRANSITION_DEFAULT) {\n    return DSM_IPX_TRANSITION_DEFAULT;\n  }\n  return dsmIpxTransitionIsAllowed(trimmed) ? trimmed : DSM_IPX_TRANSITION_DEFAULT;\n}\n\n/**\n * @param {string} stored Stored dropdown value.\n * @return {string} Value for the parallax engine (`''` = library default).\n */\nfunction dsmIpxTransitionToEngineValue(stored) {\n  if (stored === DSM_IPX_TRANSITION_DEFAULT || stored.trim() === '') {\n    return '';\n  }\n  return stored;\n}\n\n/**\n * @typedef {{\n *   on: 'on'|'off',\n *   orientation: string,\n *   scale: string,\n *   delay: string,\n *   transition: string,\n *   overflow: 'on'|'off',\n *   maxTransition: string,\n * }} DsmIpxFieldConfig\n */\n\n/** @type {DsmIpxFieldConfig} */\nconst DSM_IPX_FIELD_DEFAULTS = Object.freeze({\n  on: 'off',\n  orientation: DSM_IPX_DEFAULT_ORIENTATION,\n  scale: '1.3',\n  delay: '0',\n  transition: DSM_IPX_TRANSITION_DEFAULT,\n  overflow: 'off',\n  maxTransition: '0'\n});\n\n/**\n * @param {Record<string, unknown>|null|undefined} raw\n * @return {DsmIpxFieldConfig}\n */\nfunction dsmIpxNormalizeFieldConfig(raw) {\n  var _src$orientation, _src$on, _src$scale, _src$delay, _src$overflow, _src$maxTransition;\n  const src = raw && typeof raw === 'object' ? raw : {};\n  const orientationRaw = String((_src$orientation = src.orientation) !== null && _src$orientation !== void 0 ? _src$orientation : DSM_IPX_DEFAULT_ORIENTATION).trim();\n  const transitionNorm = dsmIpxNormalizeTransitionStored(src.transition);\n\n  /** @type {DsmIpxFieldConfig} */\n  const normalized = {\n    on: String((_src$on = src.on) !== null && _src$on !== void 0 ? _src$on : 'off').toLowerCase() === 'on' ? 'on' : 'off',\n    orientation: DSM_IPX_ORIENTATIONS.includes(/** @type {typeof DSM_IPX_ORIENTATIONS[number]} */orientationRaw) ? orientationRaw : DSM_IPX_DEFAULT_ORIENTATION,\n    scale: String((_src$scale = src.scale) !== null && _src$scale !== void 0 ? _src$scale : DSM_IPX_FIELD_DEFAULTS.scale),\n    delay: String((_src$delay = src.delay) !== null && _src$delay !== void 0 ? _src$delay : DSM_IPX_FIELD_DEFAULTS.delay),\n    transition: transitionNorm,\n    overflow: String((_src$overflow = src.overflow) !== null && _src$overflow !== void 0 ? _src$overflow : 'off').toLowerCase() === 'on' ? 'on' : 'off',\n    maxTransition: String((_src$maxTransition = src.maxTransition) !== null && _src$maxTransition !== void 0 ? _src$maxTransition : DSM_IPX_FIELD_DEFAULTS.maxTransition)\n  };\n  return normalized;\n}\n\n/**\n * @param {DsmIpxFieldConfig} config\n * @return {Record<string, string|number|boolean>}\n */\nfunction dsmIpxFieldConfigToSimpleParallaxOptions(config) {\n  const scale = parseFloat(config.scale);\n  const delay = parseFloat(config.delay);\n  const maxTransition = parseFloat(config.maxTransition);\n\n  /** @type {Record<string, string|number|boolean>} */\n  const opts = {\n    orientation: config.orientation,\n    scale: Number.isFinite(scale) && scale > 1 ? scale : 1.3,\n    delay: Number.isFinite(delay) && delay >= 0 ? delay : 0,\n    overflow: config.overflow === 'on'\n  };\n  const engineTransition = dsmIpxTransitionToEngineValue(config.transition);\n  if (engineTransition !== '') {\n    opts.transition = engineTransition;\n  }\n  if (Number.isFinite(maxTransition) && maxTransition >= 1 && maxTransition <= 99) {\n    opts.maxTransition = maxTransition;\n  }\n  return opts;\n}\n;// ./packages/extensions/image-parallax/read-inner-plain.js\n/**\n * Read plain `innerContent` leaf values outside React render (VB `visible` callbacks).\n *\n * @package DiviSupreme\n */\n\n/**\n * @param {unknown} innerContentNode\n * @return {unknown}\n */\nfunction dsmIpxInnerDesktopPlainValue(innerContentNode) {\n  if (!innerContentNode || typeof innerContentNode !== 'object') {\n    return undefined;\n  }\n  const desktop = /** @type {{ desktop?: unknown }} */innerContentNode.desktop;\n  if (!desktop || typeof desktop !== 'object') {\n    return undefined;\n  }\n  return /** @type {{ value?: unknown }} */desktop.value;\n}\n\n/**\n * @param {unknown} innerContentNode\n * @param {string}     subKey\n * @return {unknown}\n */\nfunction dsmIpxInnerDesktopPlainSubValue(innerContentNode, subKey) {\n  const value = dsmIpxInnerDesktopPlainValue(innerContentNode);\n  if (!value || typeof value !== 'object' || Array.isArray(value)) {\n    return undefined;\n  }\n  return /** @type {Record<string, unknown>} */value[subKey];\n}\n;// ./packages/extensions/image-parallax/image-parallax-vb-default-attrs.js\n/**\n * Visual Builder `defaultAttr` for Image Parallax compound `innerContent` fields.\n *\n * @package DiviSupreme\n */\n\n\n\n/**\n * Full `innerContent` default for `dsm_ipx_*` attrs (all `subName` fields share this).\n *\n * @return {{ desktop: { value: typeof DSM_IPX_FIELD_DEFAULTS } }}\n */\nfunction dsmIpxParallaxInnerContentDefaultAttr() {\n  return {\n    desktop: {\n      value: {\n        on: DSM_IPX_FIELD_DEFAULTS.on,\n        orientation: DSM_IPX_FIELD_DEFAULTS.orientation,\n        scale: DSM_IPX_FIELD_DEFAULTS.scale,\n        delay: DSM_IPX_FIELD_DEFAULTS.delay,\n        overflow: DSM_IPX_FIELD_DEFAULTS.overflow,\n        transition: DSM_IPX_FIELD_DEFAULTS.transition,\n        maxTransition: DSM_IPX_FIELD_DEFAULTS.maxTransition\n      }\n    }\n  };\n}\n;// ./packages/extensions/image-parallax/image-parallax-settings.js\n/**\n * Image Parallax — native Divi moduleAttributes field schema (below image upload fields).\n *\n * @package DiviSupreme\n */\n\n\n\n\n\n\n/**\n * @typedef {{\n *   elementKey: string,\n *   itemKey: string,\n *   item: Record<string, unknown>,\n * }} DsmIpxImageUploadDiscovery\n */\n\n/**\n * @param {string} elementKey\n * @param {string} itemKey\n * @return {string}\n */\nfunction dsmIpxParallaxAttrKey(elementKey, itemKey) {\n  return `dsm_ipx_${elementKey}_${itemKey}`;\n}\n\n/**\n * @param {string} attrKey\n * @return {string}\n */\nfunction dsmIpxFieldKeyFromParallaxAttrKey(attrKey) {\n  if (!attrKey.startsWith('dsm_ipx_')) {\n    return '';\n  }\n  return attrKey.slice('dsm_ipx_'.length);\n}\n\n/**\n * @param {Record<string, unknown>} attributes\n * @return {DsmIpxImageUploadDiscovery[]}\n */\nfunction dsmIpxDiscoverImageFieldTargets(attributes) {\n  /** @type {DsmIpxImageUploadDiscovery[]} */\n  const discoveries = [...dsmIpxDiscoverImageUploadFields(attributes)];\n  if (!attributes || typeof attributes !== 'object') {\n    return discoveries;\n  }\n  const hasDiscovery = (elementKey, itemKey) => discoveries.some(entry => entry.elementKey === elementKey && entry.itemKey === itemKey);\n  for (const [elementKey, elementDef] of Object.entries(attributes)) {\n    if (elementKey === 'module' || !elementDef || typeof elementDef !== 'object') {\n      continue;\n    }\n    const typed = /** @type {{ elementType?: string, inlineEditor?: string }} */\n    elementDef;\n    const isImageElement = typed.elementType === 'image' || typed.inlineEditor === 'UploadContainer';\n    if (!isImageElement || hasDiscovery(elementKey, 'src')) {\n      continue;\n    }\n    discoveries.push({\n      elementKey,\n      itemKey: 'src',\n      item: {\n        groupSlug: '',\n        priority: 15\n      }\n    });\n  }\n  return discoveries;\n}\n\n/**\n * @param {Record<string, unknown>} attributes\n * @return {DsmIpxImageUploadDiscovery[]}\n */\nfunction dsmIpxDiscoverImageUploadFields(attributes) {\n  /** @type {DsmIpxImageUploadDiscovery[]} */\n  const discoveries = [];\n  if (!attributes || typeof attributes !== 'object') {\n    return discoveries;\n  }\n  for (const [elementKey, elementDef] of Object.entries(attributes)) {\n    if (elementKey === 'module' || !elementDef || typeof elementDef !== 'object') {\n      continue;\n    }\n    const items = /** @type {{ settings?: { innerContent?: { items?: unknown } } }} */elementDef.settings?.innerContent?.items;\n    if (!items || typeof items !== 'object' || Array.isArray(items)) {\n      continue;\n    }\n    for (const [itemKey, item] of Object.entries(/** @type {Record<string, unknown>} */items)) {\n      if (!item || typeof item !== 'object') {\n        continue;\n      }\n      const componentName = /** @type {{ component?: { name?: string } }} */item.component?.name;\n      if (componentName !== 'divi/upload') {\n        continue;\n      }\n      discoveries.push({\n        elementKey,\n        itemKey,\n        item: (/** @type {Record<string, unknown>} */item)\n      });\n    }\n  }\n  return discoveries;\n}\n\n/**\n * @param {string} attrKey\n * @return {(dep: { attrs?: Record<string, unknown> }) => boolean}\n */\nfunction dsmIpxCreateParallaxOnVisible(attrKey) {\n  return dep => {\n    const inner = dep?.attrs?.[attrKey]?.innerContent;\n    const on = dsmIpxInnerDesktopPlainSubValue(inner, 'on');\n    return String(on !== null && on !== void 0 ? on : 'off').toLowerCase() === 'on';\n  };\n}\n\n/**\n * @param {DsmIpxImageUploadDiscovery} discovery\n * @return {Record<string, unknown>}\n */\nfunction dsmIpxBuildParallaxAttrDefinition(discovery) {\n  var _item$groupSlug;\n  const {\n    elementKey,\n    itemKey,\n    item\n  } = discovery;\n  const attrKey = dsmIpxParallaxAttrKey(elementKey, itemKey);\n  const groupSlug = String((_item$groupSlug = item.groupSlug) !== null && _item$groupSlug !== void 0 ? _item$groupSlug : '');\n  const basePriority = typeof item.priority === 'number' ? item.priority + 5 : 15;\n  const elOn = dsmIpxCreateParallaxOnVisible(attrKey);\n  const ipxDefaultAttr = dsmIpxParallaxInnerContentDefaultAttr();\n  const orientationPlaceholder = dsmIpxFormatOrientationLabel(DSM_IPX_DEFAULT_ORIENTATION);\n  const transitionPlaceholder = (0,external_window_vendor_wp_i18n_namespaceObject.__)(DSM_IPX_TRANSITION_PLACEHOLDER, 'dsm-supreme-modules-pro-for-divi');\n  return {\n    [attrKey]: {\n      type: 'object',\n      settings: {\n        innerContent: {\n          groupType: 'group-items',\n          items: {\n            on: {\n              groupSlug,\n              attrName: `${attrKey}.innerContent`,\n              subName: 'on',\n              label: (0,external_window_vendor_wp_i18n_namespaceObject.__)('Image Parallax', 'dsm-supreme-modules-pro-for-divi'),\n              description: (0,external_window_vendor_wp_i18n_namespaceObject.__)('Scroll parallax for this image only. Does not apply to CSS background images.', 'dsm-supreme-modules-pro-for-divi'),\n              render: true,\n              priority: basePriority,\n              features: {\n                responsive: false,\n                hover: false,\n                sticky: false\n              },\n              component: {\n                name: 'divi/toggle',\n                type: 'field'\n              },\n              defaultAttr: ipxDefaultAttr\n            },\n            orientation: {\n              groupSlug,\n              attrName: `${attrKey}.innerContent`,\n              subName: 'orientation',\n              label: (0,external_window_vendor_wp_i18n_namespaceObject.__)('Parallax Orientation', 'dsm-supreme-modules-pro-for-divi'),\n              description: (0,external_window_vendor_wp_i18n_namespaceObject.__)('Scroll direction for the parallax effect. Default: Up (simpleParallax.js).', 'dsm-supreme-modules-pro-for-divi'),\n              render: true,\n              priority: basePriority + 1,\n              visible: elOn,\n              features: {\n                responsive: false,\n                hover: false,\n                sticky: false\n              },\n              component: {\n                name: 'divi/select',\n                type: 'field',\n                props: {\n                  options: DSM_IPX_ORIENTATION_SELECT_OPTIONS,\n                  placeholder: orientationPlaceholder\n                }\n              },\n              defaultAttr: ipxDefaultAttr\n            },\n            scale: {\n              groupSlug,\n              attrName: `${attrKey}.innerContent`,\n              subName: 'scale',\n              label: (0,external_window_vendor_wp_i18n_namespaceObject.__)('Parallax Scale', 'dsm-supreme-modules-pro-for-divi'),\n              description: (0,external_window_vendor_wp_i18n_namespaceObject.__)('How much the image scales while scrolling (simpleParallax scale).', 'dsm-supreme-modules-pro-for-divi'),\n              render: true,\n              priority: basePriority + 2,\n              visible: elOn,\n              features: {\n                responsive: false,\n                hover: false,\n                sticky: false\n              },\n              component: {\n                name: 'divi/range',\n                type: 'field',\n                props: {\n                  min: 1,\n                  max: 3,\n                  step: 0.1,\n                  defaultUnit: '',\n                  allowedUnits: ['']\n                }\n              },\n              defaultAttr: ipxDefaultAttr\n            },\n            delay: {\n              groupSlug,\n              attrName: `${attrKey}.innerContent`,\n              subName: 'delay',\n              label: (0,external_window_vendor_wp_i18n_namespaceObject.__)('Parallax Delay (s)', 'dsm-supreme-modules-pro-for-divi'),\n              render: true,\n              priority: basePriority + 3,\n              visible: elOn,\n              features: {\n                responsive: false,\n                hover: false,\n                sticky: false\n              },\n              component: {\n                name: 'divi/range',\n                type: 'field',\n                props: {\n                  min: 0,\n                  max: 5,\n                  step: 0.05,\n                  defaultUnit: 's',\n                  allowedUnits: ['s']\n                }\n              },\n              defaultAttr: ipxDefaultAttr\n            },\n            transition: {\n              groupSlug,\n              attrName: `${attrKey}.innerContent`,\n              subName: 'transition',\n              label: (0,external_window_vendor_wp_i18n_namespaceObject.__)('Parallax Transition', 'dsm-supreme-modules-pro-for-divi'),\n              description: (0,external_window_vendor_wp_i18n_namespaceObject.__)('Easing curve applied while the image moves during scroll.', 'dsm-supreme-modules-pro-for-divi'),\n              render: true,\n              priority: basePriority + 4,\n              visible: elOn,\n              features: {\n                responsive: false,\n                hover: false,\n                sticky: false\n              },\n              component: {\n                name: 'divi/select',\n                type: 'field',\n                props: {\n                  options: DSM_IPX_TRANSITION_SELECT_OPTIONS,\n                  placeholder: transitionPlaceholder\n                }\n              },\n              defaultAttr: ipxDefaultAttr\n            },\n            maxTransition: {\n              groupSlug,\n              attrName: `${attrKey}.innerContent`,\n              subName: 'maxTransition',\n              label: (0,external_window_vendor_wp_i18n_namespaceObject.__)('Parallax Max Transition (%)', 'dsm-supreme-modules-pro-for-divi'),\n              description: (0,external_window_vendor_wp_i18n_namespaceObject.__)('Caps how much of the scroll range drives the effect (1–99). Use 0 for no limit.', 'dsm-supreme-modules-pro-for-divi'),\n              render: true,\n              priority: basePriority + 5,\n              visible: elOn,\n              features: {\n                responsive: false,\n                hover: false,\n                sticky: false\n              },\n              component: {\n                name: 'divi/range',\n                type: 'field',\n                props: {\n                  min: 0,\n                  max: 99,\n                  step: 1,\n                  defaultUnit: '',\n                  allowedUnits: ['']\n                }\n              },\n              defaultAttr: ipxDefaultAttr\n            },\n            overflow: {\n              groupSlug,\n              attrName: `${attrKey}.innerContent`,\n              subName: 'overflow',\n              label: (0,external_window_vendor_wp_i18n_namespaceObject.__)('Parallax Overflow', 'dsm-supreme-modules-pro-for-divi'),\n              description: (0,external_window_vendor_wp_i18n_namespaceObject.__)('Allow the scaled image to extend outside its box.', 'dsm-supreme-modules-pro-for-divi'),\n              render: true,\n              priority: basePriority + 6,\n              visible: elOn,\n              features: {\n                responsive: false,\n                hover: false,\n                sticky: false\n              },\n              component: {\n                name: 'divi/toggle',\n                type: 'field'\n              },\n              defaultAttr: ipxDefaultAttr\n            }\n          }\n        }\n      },\n      childrenSanitizer: 'et_core_esc_previously'\n    }\n  };\n}\n\n/**\n * @param {Record<string, unknown>} attributes\n * @return {Record<string, unknown>}\n */\nfunction dsmIpxMergeParallaxSettingsIntoAttributes(attributes) {\n  const discoveries = dsmIpxDiscoverImageFieldTargets(attributes);\n  if (discoveries.length === 0) {\n    return attributes;\n  }\n\n  /** @type {Record<string, unknown>} */\n  let merged = {\n    ...attributes\n  };\n  for (const discovery of discoveries) {\n    merged = {\n      ...merged,\n      ...dsmIpxBuildParallaxAttrDefinition(discovery)\n    };\n  }\n  return merged;\n}\n\n/**\n * @param {Record<string, unknown>} defaultAttrs\n * @param {Record<string, unknown>} attributes\n * @return {Record<string, unknown>}\n */\nfunction dsmIpxMergeParallaxDefaultAttrs(defaultAttrs, attributes) {\n  const discoveries = dsmIpxDiscoverImageFieldTargets(attributes);\n  if (discoveries.length === 0) {\n    return defaultAttrs;\n  }\n\n  /** @type {Record<string, unknown>} */\n  const merged = {\n    ...(defaultAttrs !== null && defaultAttrs !== void 0 ? defaultAttrs : {})\n  };\n  for (const {\n    elementKey,\n    itemKey\n  } of discoveries) {\n    const attrKey = dsmIpxParallaxAttrKey(elementKey, itemKey);\n    if (merged[attrKey]) {\n      continue;\n    }\n    merged[attrKey] = {\n      innerContent: {\n        desktop: {\n          value: {\n            on: DSM_IPX_FIELD_DEFAULTS.on,\n            orientation: DSM_IPX_FIELD_DEFAULTS.orientation,\n            scale: DSM_IPX_FIELD_DEFAULTS.scale,\n            delay: DSM_IPX_FIELD_DEFAULTS.delay,\n            overflow: DSM_IPX_FIELD_DEFAULTS.overflow,\n            transition: DSM_IPX_FIELD_DEFAULTS.transition,\n            maxTransition: DSM_IPX_FIELD_DEFAULTS.maxTransition\n          }\n        }\n      }\n    };\n  }\n  return merged;\n}\n;// ./packages/extensions/image-parallax/patch-module-library-image-parallax.js\n/**\n * Re-merge Image Parallax attrs onto modules already in `divi/module-library`.\n *\n * Divi core registers many modules before `dsm-supreme-extensions` runs; a one-time global\n * `moduleAttributes` filter is not always enough for every module snapshot in the store.\n *\n * @package DiviSupreme\n */\n\n\n\n\n/** @type {boolean} */\nlet dsmIpxModuleLibraryPatched = false;\n\n/**\n * @return {boolean}\n */\nfunction dsmIsIpxModuleLibraryPatched() {\n  return dsmIpxModuleLibraryPatched;\n}\n\n/**\n * @param {Record<string, unknown>} metadata Module metadata from the library store.\n * @return {boolean}\n */\nfunction dsmIpxMetadataHasImageUploadField(metadata) {\n  const attributes = metadata?.attributes && typeof metadata.attributes === 'object' ? (/** @type {Record<string, unknown>} */metadata.attributes) : {};\n  return dsmIpxDiscoverImageFieldTargets(attributes).length > 0;\n}\n\n/**\n * @param {number} [attempt]\n * @return {void}\n */\nfunction dsmPatchImageParallaxOntoDiviModuleLibraryStore(attempt = 0) {\n  if (dsmIpxModuleLibraryPatched || !dsmImageParallaxExtensionGloballyEnabled()) {\n    return;\n  }\n  const select = window.vendor?.wp?.data?.select;\n  const dispatch = window.vendor?.wp?.data?.dispatch;\n  if (!select || !dispatch) {\n    if (attempt < 80) {\n      window.setTimeout(() => dsmPatchImageParallaxOntoDiviModuleLibraryStore(attempt + 1), 100);\n    }\n    return;\n  }\n  const libSelect = select('divi/module-library');\n  const libDispatch = dispatch('divi/module-library');\n  if (!libSelect || typeof libSelect.getModules !== 'function' || !libDispatch || typeof libDispatch.registerModule !== 'function') {\n    if (attempt < 80) {\n      window.setTimeout(() => dsmPatchImageParallaxOntoDiviModuleLibraryStore(attempt + 1), 100);\n    }\n    return;\n  }\n  const modules = libSelect.getModules();\n  if (!modules || typeof modules !== 'object') {\n    if (attempt < 80) {\n      window.setTimeout(() => dsmPatchImageParallaxOntoDiviModuleLibraryStore(attempt + 1), 100);\n    }\n    return;\n  }\n  let patchedAny = false;\n  for (const moduleName of Object.keys(modules)) {\n    if (typeof moduleName !== 'string' || '' === moduleName) {\n      continue;\n    }\n    const entry = modules[moduleName];\n    if (!entry || typeof entry !== 'object') {\n      continue;\n    }\n    const metadata = /** @type {Record<string, unknown>} */\n    entry.metadata && typeof entry.metadata === 'object' ? entry.metadata : entry;\n    if (!dsmIpxMetadataHasImageUploadField(metadata)) {\n      continue;\n    }\n    const existingAttrs = metadata.attributes && typeof metadata.attributes === 'object' ? (/** @type {Record<string, unknown>} */metadata.attributes) : {};\n    const nextAttributes = dsmIpxMergeParallaxSettingsIntoAttributes(existingAttrs);\n    if (nextAttributes === existingAttrs) {\n      continue;\n    }\n    const existingDefaultAttrs = metadata.defaultAttrs && typeof metadata.defaultAttrs === 'object' ? (/** @type {Record<string, unknown>} */\n    metadata.defaultAttrs) : {};\n    const nextDefaultAttrs = dsmIpxMergeParallaxDefaultAttrs(existingDefaultAttrs, nextAttributes);\n    const nextMetadata = {\n      ...metadata,\n      attributes: nextAttributes,\n      defaultAttrs: nextDefaultAttrs\n    };\n    const registration = {\n      ...entry\n    };\n    delete registration.metadata;\n    libDispatch.registerModule(nextMetadata, registration);\n    patchedAny = true;\n  }\n  if (patchedAny) {\n    dsmIpxModuleLibraryPatched = true;\n  } else if (attempt < 80) {\n    window.setTimeout(() => dsmPatchImageParallaxOntoDiviModuleLibraryStore(attempt + 1), 100);\n  } else {\n    dsmIpxModuleLibraryPatched = true;\n  }\n}\n\n/**\n * @return {void}\n */\nfunction dsmScheduleImageParallaxModuleLibraryPatch() {\n  if (typeof window === 'undefined') {\n    return;\n  }\n  const runPatch = () => dsmPatchImageParallaxOntoDiviModuleLibraryStore();\n  if (document.readyState === 'loading') {\n    document.addEventListener('DOMContentLoaded', runPatch, {\n      once: true\n    });\n  } else {\n    runPatch();\n  }\n  if (typeof window.vendor?.wp?.data?.subscribe !== 'function') {\n    return;\n  }\n  let patchScheduled = false;\n  const unsubscribePatch = window.vendor.wp.data.subscribe(() => {\n    if (dsmIsIpxModuleLibraryPatched()) {\n      if (typeof unsubscribePatch === 'function') {\n        unsubscribePatch();\n      }\n      return;\n    }\n    if (patchScheduled) {\n      return;\n    }\n    patchScheduled = true;\n    window.requestAnimationFrame(() => {\n      patchScheduled = false;\n      dsmPatchImageParallaxOntoDiviModuleLibraryStore();\n    });\n  });\n}\n;// ./packages/extensions/image-parallax/image-parallax-hooks.js\n/**\n * Image Parallax — register native Divi moduleLibrary hooks.\n *\n * @package DiviSupreme\n */\n\n\n\n\n\n\n/**\n * @return {void}\n */\nfunction dsmIpxRegisterNativeModuleHooks() {\n  if (!dsmImageParallaxExtensionGloballyEnabled()) {\n    return;\n  }\n  if (window.__dsmIpxNativeHooksRegistered === true) {\n    return;\n  }\n  (0,external_window_vendor_wp_hooks_namespaceObject.addFilter)('divi.moduleLibrary.moduleAttributes', 'divisupreme/image-parallax/module-attributes', attributes => {\n    return dsmIpxMergeParallaxSettingsIntoAttributes(/** @type {Record<string, unknown>} */attributes !== null && attributes !== void 0 ? attributes : {});\n  });\n  (0,external_window_vendor_wp_hooks_namespaceObject.addFilter)('divi.moduleLibrary.moduleDefaultAttributes', 'divisupreme/image-parallax/module-default-attributes', (defaultAttrs, moduleExport) => {\n    const attributes = moduleExport?.attributes && typeof moduleExport.attributes === 'object' ? moduleExport.attributes : {};\n    return dsmIpxMergeParallaxDefaultAttrs(/** @type {Record<string, unknown>} */defaultAttrs !== null && defaultAttrs !== void 0 ? defaultAttrs : {}, /** @type {Record<string, unknown>} */attributes);\n  });\n  window.__dsmIpxNativeHooksRegistered = true;\n  dsmScheduleImageParallaxModuleLibraryPatch();\n}\ndsmIpxRegisterNativeModuleHooks();\n;// external \"window.vendor.wp.element\"\nconst external_window_vendor_wp_element_namespaceObject = window.vendor.wp.element;\n;// ./packages/extensions/image-parallax/to-plain.js\n/**\n * Normalize edit-post attr blobs (Immutable or plain) for Image Parallax reads.\n *\n * @package DiviSupreme\n */\n\n/**\n * @param {unknown} value\n * @return {Record<string, unknown>|null}\n */\nfunction dsmIpxToPlainObject(value) {\n  if (value == null || typeof value !== 'object') {\n    return null;\n  }\n  if (typeof /** @type {{ toJS?: () => unknown }} */value.toJS === 'function') {\n    const converted = /** @type {{ toJS: () => unknown }} */value.toJS();\n    return converted && typeof converted === 'object' && !Array.isArray(converted) ? (/** @type {Record<string, unknown>} */converted) : null;\n  }\n  if (typeof /** @type {{ asMutable?: (opts?: { deep?: boolean }) => unknown }} */value.asMutable === 'function') {\n    const converted = /** @type {{ asMutable: (opts?: { deep?: boolean }) => unknown }} */value.asMutable({\n      deep: true\n    });\n    return converted && typeof converted === 'object' && !Array.isArray(converted) ? (/** @type {Record<string, unknown>} */converted) : null;\n  }\n  if (Array.isArray(value)) {\n    return null;\n  }\n  return /** @type {Record<string, unknown>} */value;\n}\n\n/**\n * @param {unknown} node\n * @return {Record<string, unknown>|null}\n */\nfunction dsmIpxReadParallaxInnerDesktopValue(node) {\n  const plain = dsmIpxToPlainObject(node);\n  if (!plain) {\n    return null;\n  }\n  const innerContent = dsmIpxToPlainObject(plain.innerContent);\n  if (!innerContent) {\n    return null;\n  }\n  const desktop = dsmIpxToPlainObject(innerContent.desktop);\n  if (!desktop) {\n    return null;\n  }\n  const value = desktop.value;\n  if (value == null || typeof value !== 'object' || Array.isArray(value)) {\n    return null;\n  }\n  const plainValue = dsmIpxToPlainObject(value);\n  return plainValue !== null && plainValue !== void 0 ? plainValue : (/** @type {Record<string, unknown>} */value);\n}\n;// ./packages/extensions/image-parallax/field-registry.js\n/**\n * Image Parallax — per-image-field settings registry on module attrs (`dsm_ipx_fields`).\n *\n * @package DiviSupreme\n */\n\n\n\n\n/** @type {readonly string[]} */\nconst DSM_IPX_IMAGE_FIELD_KEY_HINTS = /** @type {const} */['image', 'src', 'photo', 'logo', 'icon', 'avatar', 'thumbnail', 'poster', 'background_image'];\n\n/**\n * @param {unknown} attrs Module attrs from edit-post.\n * @return {Record<string, import('./defaults.js').DsmIpxFieldConfig>}\n */\nfunction dsmIpxReadNativeParallaxFields(attrs) {\n  /** @type {Record<string, import('./defaults.js').DsmIpxFieldConfig>} */\n  const out = {};\n  const plain = dsmIpxToPlainObject(attrs);\n  if (!plain) {\n    return out;\n  }\n  for (const [attrKey, node] of Object.entries(plain)) {\n    if (typeof attrKey !== 'string' || !attrKey.startsWith('dsm_ipx_') || attrKey === 'dsm_ipx_fields') {\n      continue;\n    }\n    if (!node || typeof node !== 'object') {\n      continue;\n    }\n    const value = dsmIpxReadParallaxInnerDesktopValue(node);\n    if (!value) {\n      continue;\n    }\n    const fieldKey = attrKey.slice('dsm_ipx_'.length);\n    if (fieldKey === '') {\n      continue;\n    }\n    out[fieldKey] = dsmIpxNormalizeFieldConfig(/** @type {Record<string, unknown>} */value);\n  }\n  return out;\n}\n\n/**\n * @param {unknown} attrs Module attrs from edit-post.\n * @return {Record<string, import('./defaults.js').DsmIpxFieldConfig>}\n */\nfunction dsmIpxReadMergedParallaxFields(attrs) {\n  return {\n    ...dsmIpxReadFieldsRegistry(attrs),\n    ...dsmIpxReadNativeParallaxFields(attrs)\n  };\n}\n\n/**\n * @param {unknown} attrs Module attrs from edit-post.\n * @return {Record<string, import('./defaults.js').DsmIpxFieldConfig>}\n */\nfunction dsmIpxReadEnabledParallaxFields(attrs) {\n  const merged = dsmIpxReadMergedParallaxFields(attrs);\n\n  /** @type {Record<string, import('./defaults.js').DsmIpxFieldConfig>} */\n  const enabled = {};\n  for (const [fieldKey, config] of Object.entries(merged)) {\n    if (config.on === 'on') {\n      enabled[fieldKey] = config;\n    }\n  }\n  return enabled;\n}\n\n/**\n * True when the module has parallax field data and every field is off (user disabled).\n *\n * @param {Record<string, unknown>|null|undefined} attrs\n * @return {boolean}\n */\nfunction dsmIpxModuleParallaxExplicitlyDisabled(attrs) {\n  const merged = dsmIpxReadMergedParallaxFields(/** @type {Record<string, unknown>} */attrs !== null && attrs !== void 0 ? attrs : {});\n  const keys = Object.keys(merged);\n  if (keys.length === 0) {\n    return false;\n  }\n  return !keys.some(fieldKey => merged[fieldKey]?.on === 'on');\n}\n\n/**\n * @param {Function} select `window.vendor.wp.data.select`.\n * @param {string}     moduleId\n * @return {Record<string, unknown>|null}\n */\nfunction dsmIpxAttrsFromEditPostModule(select, moduleId) {\n  const edit = select('divi/edit-post');\n  if (!edit || !moduleId) {\n    return null;\n  }\n\n  /** @type {Record<string, unknown>} */\n  const merged = {};\n  if (typeof edit.getModule === 'function') {\n    const mod = edit.getModule(moduleId);\n    if (mod && typeof mod === 'object') {\n      var _mod$props$attrs;\n      const attrs =\n      /** @type {unknown} */\n      /** @type {{ props?: { attrs?: unknown }, attrs?: unknown }} */\n      (_mod$props$attrs = mod.props?.attrs) !== null && _mod$props$attrs !== void 0 ? _mod$props$attrs : mod.attrs;\n      const plain = dsmIpxToPlainObject(attrs);\n      if (plain) {\n        Object.assign(merged, plain);\n      }\n    }\n  }\n  if (typeof edit.getModuleAttrs === 'function') {\n    const plain = dsmIpxToPlainObject(edit.getModuleAttrs(moduleId));\n    if (plain) {\n      Object.assign(merged, plain);\n    }\n  }\n  return Object.keys(merged).length > 0 ? merged : null;\n}\n\n/**\n * Enabled parallax fields for VB canvas wrapper (`param` + `divi/edit-post` by `param.id`).\n *\n * @param {{ attrs?: unknown, id?: string }|null|undefined} param `divi.module.wrapper.render` param.\n * @return {Record<string, import('./defaults.js').DsmIpxFieldConfig>}\n */\nfunction dsmIpxReadEnabledForCanvasParam(param) {\n  var _dsmIpxToPlainObject;\n  /** @type {Record<string, unknown>} */\n  const plain = {\n    ...((_dsmIpxToPlainObject = dsmIpxToPlainObject(param?.attrs)) !== null && _dsmIpxToPlainObject !== void 0 ? _dsmIpxToPlainObject : {})\n  };\n  const moduleId = typeof param?.id === 'string' && param.id !== '' ? param.id : '';\n  const select = typeof window.vendor?.wp?.data?.select === 'function' ? window.vendor.wp.data.select : null;\n  if (select && moduleId !== '') {\n    const fromEdit = dsmIpxAttrsFromEditPostModule(select, moduleId);\n    if (fromEdit) {\n      Object.assign(plain, fromEdit);\n    }\n  }\n  return dsmIpxReadEnabledParallaxFields(plain);\n}\n\n/**\n * @param {unknown} attrs Module attrs from edit-post.\n * @return {Record<string, import('./defaults.js').DsmIpxFieldConfig>}\n */\nfunction dsmIpxReadFieldsRegistry(attrs) {\n  const node = /** @type {Record<string, unknown>} */(attrs !== null && attrs !== void 0 ? attrs : {}).dsm_ipx_fields;\n  if (!node || typeof node !== 'object') {\n    return {};\n  }\n  const inner = /** @type {{ innerContent?: unknown }} */node.innerContent;\n  if (!inner || typeof inner !== 'object') {\n    return {};\n  }\n  const desktop = /** @type {{ desktop?: unknown }} */inner.desktop;\n  if (!desktop || typeof desktop !== 'object') {\n    return {};\n  }\n  const value = /** @type {{ value?: unknown }} */desktop.value;\n  if (!value || typeof value !== 'object' || Array.isArray(value)) {\n    return {};\n  }\n\n  /** @type {Record<string, import('./defaults.js').DsmIpxFieldConfig>} */\n  const out = {};\n  for (const [fieldKey, raw] of Object.entries(/** @type {Record<string, unknown>} */value)) {\n    if (typeof fieldKey !== 'string' || fieldKey === '') {\n      continue;\n    }\n    out[fieldKey] = dsmIpxNormalizeFieldConfig(/** @type {Record<string, unknown>} */raw);\n  }\n  return out;\n}\n\n/**\n * @param {Record<string, import('./defaults.js').DsmIpxFieldConfig>} registry\n * @param {string} fieldKey\n * @return {import('./defaults.js').DsmIpxFieldConfig}\n */\nfunction dsmIpxGetFieldConfig(registry, fieldKey) {\n  var _registry$fieldKey;\n  return (_registry$fieldKey = registry[fieldKey]) !== null && _registry$fieldKey !== void 0 ? _registry$fieldKey : {\n    ...DSM_IPX_FIELD_DEFAULTS\n  };\n}\n\n/**\n * @param {string} attrPath Slug such as `image-innerContent`.\n * @param {string} subName  Leaf such as `src`.\n * @return {string}\n */\nfunction dsmIpxFieldKeyFromAttrParts(attrPath, subName) {\n  const base = attrPath.replace(/-innerContent$/i, '').replace(/-/g, '_');\n  if (subName && subName !== 'innerContent') {\n    return `${base}_${subName}`;\n  }\n  return base;\n}\n\n/**\n * Divi 5 native Image uses `et-vb-field-image-innerContent--src`, not `*-innerContent`.\n *\n * @param {HTMLElement} fieldWrapper `.et-vb-field` root.\n * @return {string|null}\n */\nfunction dsmIpxFieldKeyFromVbWrapper(fieldWrapper) {\n  if (!(fieldWrapper instanceof HTMLElement)) {\n    return null;\n  }\n  const named = fieldWrapper.querySelector('[name*=\"-innerContent--\"]');\n  if (named instanceof HTMLElement) {\n    var _named$getAttribute;\n    const name = (_named$getAttribute = named.getAttribute('name')) !== null && _named$getAttribute !== void 0 ? _named$getAttribute : '';\n    const match = name.match(/^(.+)-innerContent--(.+)$/);\n    if (match) {\n      return dsmIpxFieldKeyFromAttrParts(match[1], match[2]);\n    }\n  }\n  for (const cls of fieldWrapper.classList) {\n    if (!cls.startsWith('et-vb-field-')) {\n      continue;\n    }\n    if (cls.includes('module-decoration') || cls.includes('group-item') || cls.endsWith('-hint')) {\n      continue;\n    }\n    const slug = cls.slice('et-vb-field-'.length);\n    const subMatch = slug.match(/^(.+)--(.+)$/);\n    if (subMatch) {\n      return dsmIpxFieldKeyFromAttrParts(subMatch[1], subMatch[2]);\n    }\n    if (slug.endsWith('-innerContent')) {\n      return slug.slice(0, -'-innerContent'.length).replace(/-/g, '_');\n    }\n  }\n  return null;\n}\n\n/**\n * @param {string} key\n * @return {boolean}\n */\nfunction dsmIpxFieldKeyLooksLikeImage(key) {\n  if (key === '') {\n    return false;\n  }\n  if (DSM_IPX_IMAGE_FIELD_KEY_HINTS.includes(key)) {\n    return true;\n  }\n  return key.includes('image') || key.endsWith('_img') || key.endsWith('_src');\n}\n\n/**\n * @param {HTMLElement} fieldWrapper\n * @return {string}\n */\nfunction dsmIpxFieldLabelText(fieldWrapper) {\n  var _fieldWrapper$querySe, _label$textContent$tr;\n  const label = (_fieldWrapper$querySe = fieldWrapper.querySelector('.et-vb-field-label label')) !== null && _fieldWrapper$querySe !== void 0 ? _fieldWrapper$querySe : fieldWrapper.querySelector('.et-vb-field-label');\n  return (_label$textContent$tr = label?.textContent?.trim().toLowerCase()) !== null && _label$textContent$tr !== void 0 ? _label$textContent$tr : '';\n}\n\n/**\n * @param {HTMLElement} fieldWrapper\n * @return {boolean}\n */\nfunction dsmIpxVbWrapperLooksLikeImageUploadField(fieldWrapper) {\n  if (!(fieldWrapper instanceof HTMLElement)) {\n    return false;\n  }\n  if (fieldWrapper.querySelector('.et-vb-upload-font')) {\n    return false;\n  }\n  const hasUploadUi = fieldWrapper.querySelector(['.et-vb-settings-option-inner-upload', '.et-vb-settings-option--upload', '.et-vb-upload-container', '.et-vb-field-upload-gallery', '[class*=\"settings-option-upload\"]', '.et-vb-field-input-wrap input[type=\"text\"]'].join(', ')) !== null;\n  if (!hasUploadUi) {\n    return false;\n  }\n  for (const cls of fieldWrapper.classList) {\n    if (cls.includes('innerContent--src') || cls.includes('-image-innerContent')) {\n      return true;\n    }\n  }\n  const labelText = dsmIpxFieldLabelText(fieldWrapper);\n  if (labelText === 'image' || labelText.includes('image') || labelText.includes('photo')) {\n    return true;\n  }\n  const key = dsmIpxFieldKeyFromVbWrapper(fieldWrapper);\n  return dsmIpxFieldKeyLooksLikeImage(key !== null && key !== void 0 ? key : '');\n}\n;// ./node_modules/simple-parallax-js/dist/vanilla/simpleParallaxVanilla.es.js\nconst h = (i) => NodeList.prototype.isPrototypeOf(i) || HTMLCollection.prototype.isPrototypeOf(i) ? Array.from(i) : typeof i == \"string\" || i instanceof String ? document.querySelectorAll(i) : [i], d = () => Element.prototype.closest && \"IntersectionObserver\" in window;\nclass c {\n  constructor() {\n    this.positions = {\n      top: 0,\n      bottom: 0,\n      height: 0\n    };\n  }\n  setViewportTop(t) {\n    return this.positions.top = t ? t.scrollTop : window.pageYOffset, this.positions;\n  }\n  setViewportBottom() {\n    return this.positions.bottom = this.positions.top + this.positions.height, this.positions;\n  }\n  setViewportAll(t) {\n    return this.positions.top = t ? t.scrollTop : window.pageYOffset, this.positions.height = t ? t.clientHeight : document.documentElement.clientHeight, this.positions.bottom = this.positions.top + this.positions.height, this.positions;\n  }\n}\nconst s = new c(), m = () => {\n  const i = \"transform webkitTransform mozTransform oTransform msTransform\".split(\" \");\n  let t, e = 0;\n  for (; t === void 0; )\n    t = document.createElement(\"div\").style[i[e]] !== void 0 ? i[e] : void 0, e += 1;\n  return t;\n}, r = m(), p = (i) => i.tagName.toLowerCase() !== \"img\" && i.tagName.toLowerCase() !== \"picture\" ? !0 : !(!i || !i.complete || typeof i.naturalWidth < \"u\" && i.naturalWidth === 0);\nclass f {\n  constructor(t, e, n = !1) {\n    this.element = t, this.elementContainer = t, this.settings = e, this.isVisible = !0, this.isInit = !1, this.oldTranslateValue = -1, this.prefersReducedMotion = n, this.init = this.init.bind(this), this.customWrapper = this.settings.customWrapper && this.element.closest(this.settings.customWrapper) ? this.element.closest(this.settings.customWrapper) : null, !this.prefersReducedMotion && (p(t) ? this.init() : this.element.addEventListener(\"load\", () => {\n      setTimeout(() => {\n        this.init(!0);\n      }, 50);\n    }));\n  }\n  init(t) {\n    this.prefersReducedMotion || this.isInit || (t && (this.rangeMax = null), !this.element.closest(\".simpleParallax\") && (this.settings.overflow === !1 && this.wrapElement(this.element), this.setTransformCSS(), this.getElementOffset(), this.intersectionObserver(), this.getTranslateValue(), this.animate(), this.settings.delay > 0 ? setTimeout(() => {\n      this.setTransitionCSS(), this.elementContainer.classList.add(\"simple-parallax-initialized\");\n    }, 10) : this.elementContainer.classList.add(\"simple-parallax-initialized\"), this.isInit = !0));\n  }\n  // if overflow option is set to false\n  // wrap the element into a .simpleParallax div and apply overflow hidden to hide the image excedant (result of the scale)\n  wrapElement() {\n    const t = this.element.closest(\"picture\") || this.element;\n    let e = this.customWrapper || document.createElement(\"div\");\n    e.classList.add(\"simpleParallax\"), e.style.overflow = \"hidden\", this.customWrapper || (t.parentNode.insertBefore(e, t), e.appendChild(t)), this.elementContainer = e;\n  }\n  // unwrap the element from .simpleParallax wrapper container\n  unWrapElement() {\n    const t = this.elementContainer;\n    this.customWrapper ? (t.classList.remove(\"simpleParallax\"), t.style.overflow = \"\") : t.replaceWith(...t.childNodes);\n  }\n  // apply default style on element\n  setTransformCSS() {\n    this.settings.overflow === !1 && (this.element.style[r] = `scale(${this.settings.scale})`), this.element.style.willChange = \"transform\";\n  }\n  // apply the transition effect\n  setTransitionCSS() {\n    this.element.style.transition = `transform ${this.settings.delay}s ${this.settings.transition}`;\n  }\n  // remove style of the element\n  unSetStyle() {\n    this.element.style.willChange = \"\", this.element.style[r] = \"\", this.element.style.transition = \"\";\n  }\n  // get the current element offset\n  getElementOffset() {\n    const t = this.elementContainer.getBoundingClientRect();\n    if (this.elementHeight = t.height, this.elementTop = t.top + s.positions.top, this.settings.customContainer) {\n      const e = this.settings.customContainer.getBoundingClientRect();\n      this.elementTop = t.top - e.top + s.positions.top;\n    }\n    this.elementBottom = this.elementHeight + this.elementTop;\n  }\n  // build the Threshold array to cater change for every pixel scrolled\n  buildThresholdList() {\n    const t = [];\n    for (let e = 1; e <= this.elementHeight; e++) {\n      const n = e / this.elementHeight;\n      t.push(n);\n    }\n    return t;\n  }\n  // create the Intersection Observer\n  intersectionObserver() {\n    const t = {\n      root: null,\n      threshold: this.buildThresholdList()\n    };\n    this.observer = new IntersectionObserver(\n      this.intersectionObserverCallback.bind(this),\n      t\n    ), this.observer.observe(this.element);\n  }\n  // Intersection Observer Callback to set the element at visible state or not\n  intersectionObserverCallback(t) {\n    t.forEach((e) => {\n      e.isIntersecting ? this.isVisible = !0 : this.isVisible = !1;\n    });\n  }\n  // check if the current element is visible in the Viewport\n  // for browser that not support Intersection Observer API\n  checkIfVisible() {\n    return this.elementBottom > s.positions.top && this.elementTop < s.positions.bottom;\n  }\n  // calculate the range between image will be translated\n  getRangeMax() {\n    const t = this.element.clientHeight;\n    this.rangeMax = t * this.settings.scale - t;\n  }\n  // get the percentage and the translate value to apply on the element\n  getTranslateValue() {\n    let t = ((s.positions.bottom - this.elementTop) / ((s.positions.height + this.elementHeight) / 100)).toFixed(1);\n    return t = Math.min(100, Math.max(0, t)), this.settings.maxTransition !== 0 && t > this.settings.maxTransition && (t = this.settings.maxTransition), this.oldPercentage === t || (this.rangeMax || this.getRangeMax(), this.translateValue = (t / 100 * this.rangeMax - this.rangeMax / 2).toFixed(0), this.oldTranslateValue === this.translateValue) ? !1 : (this.oldPercentage = t, this.oldTranslateValue = this.translateValue, !0);\n  }\n  // animate the image\n  animate() {\n    let t = 0, e = 0, n;\n    (this.settings.orientation.includes(\"left\") || this.settings.orientation.includes(\"right\")) && (e = `${this.settings.orientation.includes(\"left\") ? this.translateValue * -1 : this.translateValue}px`), (this.settings.orientation.includes(\"up\") || this.settings.orientation.includes(\"down\")) && (t = `${this.settings.orientation.includes(\"up\") ? this.translateValue * -1 : this.translateValue}px`), this.settings.overflow === !1 ? n = `translate3d(${e}, ${t}, 0) scale(${this.settings.scale})` : n = `translate3d(${e}, ${t}, 0)`, this.element.style[r] = n;\n  }\n}\nlet a = !1, o = [], l, u;\nclass g {\n  constructor(t, e) {\n    t && d() && (this.prefersReducedMotion = window.matchMedia(\n      \"(prefers-reduced-motion: reduce)\"\n    ).matches, this.reducedMotionMediaQuery = window.matchMedia(\n      \"(prefers-reduced-motion: reduce)\"\n    ), this.handleReducedMotionChange = this.handleReducedMotionChange.bind(this), this.reducedMotionMediaQuery.addEventListener(\n      \"change\",\n      this.handleReducedMotionChange\n    ), !this.prefersReducedMotion && (this.elements = h(t), this.defaults = {\n      delay: 0,\n      orientation: \"up\",\n      scale: 1.3,\n      overflow: !1,\n      transition: \"cubic-bezier(0,0,0,1)\",\n      customContainer: \"\",\n      customWrapper: \"\",\n      maxTransition: 0\n    }, this.settings = Object.assign(this.defaults, e), this.settings.customContainer && ([this.customContainer] = h(this.settings.customContainer)), this.lastPosition = -1, this.resizeIsDone = this.resizeIsDone.bind(this), this.refresh = this.refresh.bind(this), this.proceedRequestAnimationFrame = this.proceedRequestAnimationFrame.bind(this), this.init()));\n  }\n  // Handle changes to reduced motion preference\n  handleReducedMotionChange(t) {\n    this.prefersReducedMotion = t.matches, this.prefersReducedMotion ? this.destroy() : this.init();\n  }\n  init() {\n    this.prefersReducedMotion || (s.setViewportAll(this.customContainer), o = [\n      ...this.elements.map(\n        (t) => new f(\n          t,\n          this.settings,\n          this.prefersReducedMotion\n        )\n      ),\n      ...o\n    ], a || (this.proceedRequestAnimationFrame(), window.addEventListener(\"resize\", this.resizeIsDone), a = !0));\n  }\n  // wait for resize to be completely done\n  resizeIsDone() {\n    clearTimeout(u), u = setTimeout(this.refresh, 200);\n  }\n  // animation frame\n  proceedRequestAnimationFrame() {\n    if (s.setViewportTop(this.customContainer), this.lastPosition === s.positions.top) {\n      l = window.requestAnimationFrame(this.proceedRequestAnimationFrame);\n      return;\n    }\n    s.setViewportBottom(), o.forEach((t) => {\n      this.proceedElement(t);\n    }), l = window.requestAnimationFrame(this.proceedRequestAnimationFrame), this.lastPosition = s.positions.top;\n  }\n  // proceed the element\n  proceedElement(t) {\n    let e = !1;\n    this.customContainer ? e = t.checkIfVisible() : e = t.isVisible, e && t.getTranslateValue() && t.animate();\n  }\n  refresh() {\n    s.setViewportAll(this.customContainer), o.forEach((t) => {\n      t.getElementOffset(), t.getRangeMax();\n    }), this.lastPosition = -1;\n  }\n  destroy() {\n    this.reducedMotionMediaQuery && this.reducedMotionMediaQuery.removeEventListener(\n      \"change\",\n      this.handleReducedMotionChange\n    );\n    const t = [];\n    o = o.filter((e) => this.elements && this.elements.includes(e.element) ? (t.push(e), !1) : e), t.forEach((e) => {\n      e.unSetStyle(), this.settings && this.settings.overflow === !1 && e.unWrapElement();\n    }), o.length || (window.cancelAnimationFrame(l), window.removeEventListener(\"resize\", this.refresh), a = !1);\n  }\n}\n\n\n;// ./packages/extensions/image-parallax/vb-scroll-container.js\n/**\n * Visual Builder: find the overflow scroll parent for the canvas (window.scrollY stays 0).\n *\n * @package DiviSupreme\n */\n\n/**\n * @param {HTMLElement} el\n * @param {Window}      win\n * @return {boolean}\n */\nfunction dsmIpxElementIsScrollCarrier(el, win) {\n  const computed = win.getComputedStyle(el);\n  const overflowY = computed.overflowY || '';\n  const overflow = computed.overflow || '';\n  if (overflowY !== 'scroll' && overflowY !== 'auto' && overflowY !== 'overlay' && !/(?:auto|scroll|overlay)/.test(overflow)) {\n    return false;\n  }\n  return el.scrollHeight > el.clientHeight + 1;\n}\n\n/**\n * @param {Document} doc\n * @param {Window}   win\n * @return {HTMLElement|null}\n */\nfunction dsmIpxFindDocumentScrollCarrier(doc, win) {\n  /** @type {readonly string[]} */\n  const selectors = ['#et-boc', '.et-l', '#page-container', 'body'];\n  for (const selector of selectors) {\n    const candidate = doc.querySelector(selector);\n    if (candidate instanceof HTMLElement && dsmIpxElementIsScrollCarrier(candidate, win)) {\n      return candidate;\n    }\n  }\n  const root = doc.documentElement;\n  if (root instanceof HTMLElement && dsmIpxElementIsScrollCarrier(root, win)) {\n    return root;\n  }\n  return null;\n}\n\n/**\n * @param {HTMLElement} node Canvas element (e.g. parallax `<img>`).\n * @return {HTMLElement|null}\n */\nfunction dsmIpxFindVbScrollCarrier(node) {\n  if (!(node instanceof HTMLElement)) {\n    return null;\n  }\n  const doc = node.ownerDocument;\n  const win = doc?.defaultView;\n  if (!doc || !win) {\n    return null;\n  }\n  let current = node.parentElement;\n  while (current && current.nodeType === 1) {\n    if (dsmIpxElementIsScrollCarrier(current, win)) {\n      return current;\n    }\n    current = current.parentElement;\n  }\n  return dsmIpxFindDocumentScrollCarrier(doc, win);\n}\n;// ./packages/extensions/image-parallax/engine.js\n/**\n * Image Parallax frontend engine (simpleParallax.js vanilla).\n *\n * @package DiviSupreme\n */\n\n\n\n\n\n/** @type {WeakMap<HTMLImageElement, import('simple-parallax-js/vanilla').default>} */\nconst dsmIpxInstancesByImage = new WeakMap();\n\n/**\n * @return {boolean}\n */\nfunction dsmIpxPrefersReducedMotion() {\n  try {\n    return typeof window.matchMedia === 'function' && window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n  } catch (_err) {\n    return false;\n  }\n}\n\n/**\n * @param {HTMLImageElement} img\n * @return {void}\n */\nfunction dsmIpxDestroyForImage(img) {\n  const inst = dsmIpxInstancesByImage.get(img);\n  if (inst && typeof inst.destroy === 'function') {\n    try {\n      inst.destroy();\n    } catch (_err) {\n      /* ignore */\n    }\n  }\n  dsmIpxInstancesByImage.delete(img);\n  img.removeAttribute('data-dsm-ipx-initialized');\n}\n\n/**\n * @param {HTMLImageElement} img\n * @return {Record<string, unknown>|null}\n */\nfunction dsmIpxReadOptsFromImage(img) {\n  const raw = img.getAttribute('data-dsm-ipx-opts');\n  if (!raw || raw === '') {\n    return null;\n  }\n  try {\n    const parsed = JSON.parse(raw);\n    return parsed && typeof parsed === 'object' ? parsed : null;\n  } catch (_err) {\n    return null;\n  }\n}\n\n/**\n * @param {HTMLImageElement} img\n * @return {void}\n */\nfunction dsmIpxInitSingleImage(img) {\n  var _img$getAttribute, _img$getAttribute2;\n  if (!(img instanceof HTMLImageElement)) {\n    return;\n  }\n  if (img.getAttribute('data-dsm-ipx-on') !== '1') {\n    dsmIpxDestroyForImage(img);\n    return;\n  }\n  if (dsmIpxPrefersReducedMotion()) {\n    dsmIpxDestroyForImage(img);\n    return;\n  }\n  const optsRaw = dsmIpxReadOptsFromImage(img);\n  if (!optsRaw) {\n    return;\n  }\n  const optsJson = (_img$getAttribute = img.getAttribute('data-dsm-ipx-opts')) !== null && _img$getAttribute !== void 0 ? _img$getAttribute : '';\n  const appliedOpts = (_img$getAttribute2 = img.getAttribute('data-dsm-ipx-applied-opts')) !== null && _img$getAttribute2 !== void 0 ? _img$getAttribute2 : '';\n  if (appliedOpts === optsJson && optsJson !== '' && img.getAttribute('data-dsm-ipx-initialized') === '1') {\n    return;\n  }\n  const waitForLoad = () => {\n    if (!img.complete || img.naturalWidth === 0) {\n      img.addEventListener('load', waitForLoad, {\n        once: true\n      });\n      return;\n    }\n    if (window.__dsmIpxVbMode === true) {\n      const scrollCarrier = dsmIpxFindVbScrollCarrier(img);\n      if (!scrollCarrier) {\n        var _img$getAttribute3;\n        const retries = Number((_img$getAttribute3 = img.getAttribute('data-dsm-ipx-vb-scroll-retries')) !== null && _img$getAttribute3 !== void 0 ? _img$getAttribute3 : '0');\n        if (retries < 8) {\n          img.setAttribute('data-dsm-ipx-vb-scroll-retries', String(retries + 1));\n          requestAnimationFrame(waitForLoad);\n          return;\n        }\n        img.removeAttribute('data-dsm-ipx-vb-scroll-retries');\n      } else {\n        img.removeAttribute('data-dsm-ipx-vb-scroll-retries');\n      }\n    }\n    dsmIpxDestroyForImage(img);\n    try {\n      /** @type {Record<string, unknown>} */\n      const instanceOpts = {\n        ...optsRaw\n      };\n      if (window.__dsmIpxVbMode === true) {\n        const scrollCarrier = dsmIpxFindVbScrollCarrier(img);\n        if (scrollCarrier) {\n          instanceOpts.customContainer = scrollCarrier;\n        }\n      }\n      const instance = new g(img, instanceOpts);\n      dsmIpxInstancesByImage.set(img, instance);\n      img.setAttribute('data-dsm-ipx-initialized', '1');\n      img.setAttribute('data-dsm-ipx-applied-opts', optsJson);\n    } catch (_err) {\n      /* invalid image / already wrapped */\n    }\n  };\n  waitForLoad();\n}\n\n/**\n * @param {Document|Element} root\n * @return {void}\n */\nfunction dsmIpxInitInRoot(root) {\n  if (!root || typeof root.querySelectorAll !== 'function') {\n    return;\n  }\n  root.querySelectorAll('img[data-dsm-ipx-on=\"1\"]').forEach(node => {\n    if (node instanceof HTMLImageElement) {\n      dsmIpxInitSingleImage(node);\n    }\n  });\n}\n\n/**\n * Remove Image Parallax markers and destroy a wired simpleParallax instance.\n *\n * @param {HTMLImageElement} img\n * @return {void}\n */\nfunction dsmIpxStripImageParallaxMarkers(img) {\n  dsmIpxDestroyForImage(img);\n  img.removeAttribute('data-dsm-ipx-on');\n  img.removeAttribute('data-dsm-ipx-field');\n  img.removeAttribute('data-dsm-ipx-opts');\n  img.removeAttribute('data-dsm-ipx-applied-opts');\n}\n\n/**\n * @param {Document|Element} root\n * @return {void}\n */\nfunction dsmIpxRefreshInRoot(root) {\n  dsmIpxInitInRoot(root);\n}\n\n/**\n * @param {import('./defaults.js').DsmIpxFieldConfig} config\n * @return {string}\n */\nfunction dsmIpxSerializeOptsAttr(config) {\n  return JSON.stringify(dsmIpxFieldConfigToSimpleParallaxOptions(config));\n}\n;// ./packages/extensions/image-parallax/parallax-vb-store-signature.js\n/**\n * Cheap edit-post signature so VB Image Parallax DOM sync skips unrelated Redux churn.\n *\n * @package DiviSupreme\n */\n\n\n\n\n/**\n * @param {Record<string, unknown>|null} attrs\n * @return {string}\n */\nfunction dsmIpxParallaxAttrsSignaturePart(attrs) {\n  if (!attrs) {\n    return '';\n  }\n\n  /** @type {string[]} */\n  const parts = [];\n  for (const key of Object.keys(attrs).sort()) {\n    if (!key.startsWith('dsm_ipx_')) {\n      continue;\n    }\n    const value = dsmIpxReadParallaxInnerDesktopValue(attrs[key]);\n    parts.push(`${key}=${JSON.stringify(value !== null && value !== void 0 ? value : null)}`);\n  }\n  return parts.join('|');\n}\n\n/**\n * @param {Function} select `window.vendor.wp.data.select`.\n * @param {string}     moduleId\n * @return {string}\n */\nfunction dsmIpxSignatureForModuleId(select, moduleId) {\n  if (!moduleId) {\n    return '';\n  }\n  return dsmIpxParallaxAttrsSignaturePart(dsmIpxAttrsFromEditPostModule(select, moduleId));\n}\n\n/**\n * @param {Function} select `window.vendor.wp.data.select`.\n * @return {string}\n */\nfunction dsmIpxEditPostParallaxSignature(select) {\n  var _appUi$getBreakpoint;\n  const edit = select('divi/edit-post');\n  if (!edit || typeof edit.getModule !== 'function') {\n    return '';\n  }\n  let selectedId = '';\n  if (typeof edit.getSelectedModuleId === 'function') {\n    var _edit$getSelectedModu;\n    selectedId = String((_edit$getSelectedModu = edit.getSelectedModuleId()) !== null && _edit$getSelectedModu !== void 0 ? _edit$getSelectedModu : '');\n  }\n  if (selectedId === '' && typeof edit.getSelectedBlockClientId === 'function') {\n    var _edit$getSelectedBloc;\n    selectedId = String((_edit$getSelectedBloc = edit.getSelectedBlockClientId()) !== null && _edit$getSelectedBloc !== void 0 ? _edit$getSelectedBloc : '');\n  }\n  const appUi = select('divi/app-ui');\n  const previewBp = appUi && typeof appUi.getBreakpoint === 'function' ? String((_appUi$getBreakpoint = appUi.getBreakpoint()) !== null && _appUi$getBreakpoint !== void 0 ? _appUi$getBreakpoint : '') : '';\n  if (selectedId === '') {\n    return previewBp;\n  }\n  return [selectedId, previewBp, dsmIpxSignatureForModuleId(select, selectedId)].join('\\n');\n}\n;// ./packages/extensions/image-parallax/vb-recursive-scan.js\n/**\n * Deep DOM scan for VB settings fields (shadow roots, iframes, parent window).\n *\n * @package DiviSupreme\n */\n\n/**\n * @param {Document|ShadowRoot|Element} root\n * @param {string}                       selector\n * @param {number}                       depth\n * @param {(field: HTMLElement) => void} onField\n * @return {void}\n */\nfunction dsmIpxRecursiveScanFields(root, selector, depth, onField) {\n  if (depth > 24 || !root || typeof root.querySelectorAll !== 'function') {\n    return;\n  }\n  try {\n    root.querySelectorAll(selector).forEach(node => {\n      if (node instanceof HTMLElement) {\n        onField(node);\n      }\n    });\n    root.querySelectorAll('*').forEach(el => {\n      if (el instanceof HTMLElement && el.shadowRoot) {\n        dsmIpxRecursiveScanFields(el.shadowRoot, selector, depth + 1, onField);\n      }\n      if (el instanceof HTMLIFrameElement) {\n        try {\n          const idoc = el.contentDocument;\n          if (idoc) {\n            dsmIpxRecursiveScanFields(idoc, selector, depth + 1, onField);\n          }\n        } catch (_err) {\n          /* cross-origin */\n        }\n      }\n    });\n  } catch (_err) {\n    /* partial documents */\n  }\n}\n\n/**\n * Query within `root` and pierce open shadow roots (VB canvas modules may live under shadow trees).\n *\n * @param {Document|ShadowRoot|Element} root\n * @param {string}                       selector\n * @return {Element[]}\n */\nfunction dsmIpxQuerySelectorAllDeep(root, selector) {\n  /** @type {Element[]} */\n  const out = [];\n\n  /**\n   * @param {Document|ShadowRoot|Element} scanRoot\n   */\n  function scan(scanRoot) {\n    if (!scanRoot || typeof scanRoot.querySelectorAll !== 'function') {\n      return;\n    }\n    try {\n      scanRoot.querySelectorAll(selector).forEach(el => {\n        out.push(el);\n      });\n      scanRoot.querySelectorAll('*').forEach(host => {\n        if (host instanceof HTMLElement && host.shadowRoot instanceof ShadowRoot) {\n          scan(host.shadowRoot);\n        }\n      });\n    } catch (_err) {\n      /* fenced frames / partial documents */\n    }\n  }\n  scan(root);\n  return out;\n}\n\n/**\n * @return {Window[]}\n */\nfunction dsmIpxAccessibleVbWindows() {\n  /** @type {Window[]} */\n  const wins = [window];\n  const origin = window.location.origin;\n\n  /**\n   * @param {Window} candidate\n   */\n  function pushWin(candidate) {\n    if (!candidate || candidate === window) {\n      return;\n    }\n    if (wins.includes(candidate)) {\n      return;\n    }\n    try {\n      if (candidate.location.origin !== origin) {\n        return;\n      }\n    } catch (_err) {\n      return;\n    }\n    wins.push(candidate);\n  }\n  pushWin(window.parent);\n  pushWin(window.top);\n  return wins;\n}\n\n/**\n * @param {(field: HTMLElement) => void} onField\n * @return {void}\n */\nfunction dsmIpxScanAllVbSurfaces(onField) {\n  for (const win of dsmIpxAccessibleVbWindows()) {\n    try {\n      dsmIpxRecursiveScanFields(win.document, '.et-vb-field', 0, onField);\n    } catch (_err) {\n      /* inaccessible */\n    }\n  }\n}\n;// ./packages/extensions/image-parallax/vb-dom-sync.js\n/**\n * Visual Builder: apply `data-dsm-ipx-*` on canvas `<img>` tags from live attrs.\n *\n * @package DiviSupreme\n */\n\n\n\n\n\n\n\n/**\n * @param {HTMLImageElement} img\n * @param {import('./defaults.js').DsmIpxFieldConfig} config\n * @param {string} fieldKey\n * @return {void}\n */\nfunction dsmIpxApplyImageParallaxMarkers(img, config, fieldKey) {\n  var _img$getAttribute, _img$getAttribute2;\n  const optsJson = dsmIpxSerializeOptsAttr(config);\n  const currentOn = img.getAttribute('data-dsm-ipx-on');\n  const currentField = (_img$getAttribute = img.getAttribute('data-dsm-ipx-field')) !== null && _img$getAttribute !== void 0 ? _img$getAttribute : '';\n  const currentOpts = (_img$getAttribute2 = img.getAttribute('data-dsm-ipx-opts')) !== null && _img$getAttribute2 !== void 0 ? _img$getAttribute2 : '';\n  if (currentOn === '1' && currentField === fieldKey && currentOpts === optsJson) {\n    return;\n  }\n  dsmIpxStripImageParallaxMarkers(img);\n  img.setAttribute('data-dsm-ipx-on', '1');\n  img.setAttribute('data-dsm-ipx-field', fieldKey);\n  img.setAttribute('data-dsm-ipx-opts', optsJson);\n}\n\n/**\n * @param {HTMLElement} moduleRoot\n * @param {Record<string, import('./defaults.js').DsmIpxFieldConfig>} enabled\n * @return {void}\n */\nfunction dsmIpxApplyEnabledFieldsToImages(moduleRoot, enabled) {\n  const fieldKeys = Object.keys(enabled);\n  const images = moduleRoot.querySelectorAll('img');\n  if (images.length === 0) {\n    return;\n  }\n  let index = 0;\n  images.forEach(node => {\n    var _ref, _fieldKeys$index;\n    if (!(node instanceof HTMLImageElement)) {\n      return;\n    }\n    const fieldKey = (_ref = (_fieldKeys$index = fieldKeys[index]) !== null && _fieldKeys$index !== void 0 ? _fieldKeys$index : fieldKeys[0]) !== null && _ref !== void 0 ? _ref : '';\n    if (fieldKey === '' || !enabled[fieldKey]) {\n      dsmIpxStripImageParallaxMarkers(node);\n      ++index;\n      return;\n    }\n    dsmIpxApplyImageParallaxMarkers(node, enabled[fieldKey], fieldKey);\n    ++index;\n  });\n}\n\n/**\n * @param {HTMLElement} root\n * @return {void}\n */\nfunction dsmIpxStripAllParallaxInRoot(root) {\n  root.querySelectorAll('img').forEach(node => {\n    if (node instanceof HTMLImageElement) {\n      dsmIpxStripImageParallaxMarkers(node);\n    }\n  });\n}\n\n/**\n * @param {HTMLElement} moduleRoot\n * @return {Record<string, import('./defaults.js').DsmIpxFieldConfig>|null}\n */\nfunction dsmIpxReadEnabledFromVbSyncCarrier(moduleRoot) {\n  const parent = moduleRoot.parentElement;\n  const carrier = parent instanceof HTMLElement ? parent.querySelector(':scope > .dsm-ipx-vb-sync[data-dsm-ipx-sync]') : null;\n  const resolved = carrier instanceof HTMLElement ? carrier : moduleRoot.previousElementSibling instanceof HTMLElement && moduleRoot.previousElementSibling.classList.contains('dsm-ipx-vb-sync') ? moduleRoot.previousElementSibling : null;\n  if (!resolved) {\n    return null;\n  }\n  try {\n    var _resolved$getAttribut;\n    const parsed = JSON.parse((_resolved$getAttribut = resolved.getAttribute('data-dsm-ipx-sync')) !== null && _resolved$getAttribut !== void 0 ? _resolved$getAttribut : '{}');\n    if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) {\n      return null;\n    }\n\n    /** @type {Record<string, import('./defaults.js').DsmIpxFieldConfig>} */\n    const enabled = {};\n    for (const [fieldKey, raw] of Object.entries(/** @type {Record<string, unknown>} */parsed)) {\n      enabled[fieldKey] = dsmIpxNormalizeFieldConfig(/** @type {Record<string, unknown>} */raw);\n    }\n    return enabled;\n  } catch (_err) {\n    return null;\n  }\n}\n\n/**\n * @param {HTMLElement} moduleRoot\n * @param {Function}    select\n * @param {string}      moduleId\n * @return {Record<string, import('./defaults.js').DsmIpxFieldConfig>}\n */\nfunction dsmIpxResolveEnabledFieldsForModule(moduleRoot, select, moduleId) {\n  var _dsmIpxReadEnabledFro;\n  const attrs = dsmIpxAttrsFromEditPostModule(select, moduleId);\n  const fromStore = attrs ? dsmIpxReadEnabledParallaxFields(attrs) : {};\n  const fromCarrier = (_dsmIpxReadEnabledFro = dsmIpxReadEnabledFromVbSyncCarrier(moduleRoot)) !== null && _dsmIpxReadEnabledFro !== void 0 ? _dsmIpxReadEnabledFro : {};\n  const storeKeys = Object.keys(fromStore);\n  const carrierKeys = Object.keys(fromCarrier);\n  if (storeKeys.length === 0) {\n    return fromCarrier;\n  }\n  if (carrierKeys.length === 0) {\n    return fromStore;\n  }\n  return {\n    ...fromCarrier,\n    ...fromStore\n  };\n}\n\n/**\n * @param {HTMLElement} moduleRoot Canvas module root (`[data-id]`).\n * @param {Function}    select     `window.vendor.wp.data.select`.\n * @return {void}\n */\nfunction dsmIpxSyncModuleImageParallaxDom(moduleRoot, select) {\n  const moduleId = moduleRoot.getAttribute('data-id');\n  if (!moduleId) {\n    return;\n  }\n  const attrs = dsmIpxAttrsFromEditPostModule(select, moduleId);\n  const enabled = dsmIpxResolveEnabledFieldsForModule(moduleRoot, select, moduleId);\n  const fieldKeys = Object.keys(enabled);\n  const images = moduleRoot.querySelectorAll('img');\n  if (images.length === 0) {\n    return;\n  }\n  if (fieldKeys.length === 0) {\n    if (!dsmIpxModuleParallaxExplicitlyDisabled(attrs)) {\n      return;\n    }\n    dsmIpxStripAllParallaxInRoot(moduleRoot);\n    return;\n  }\n  dsmIpxApplyEnabledFieldsToImages(moduleRoot, enabled);\n  dsmIpxInitInRoot(moduleRoot);\n}\n\n/**\n * Sync Image Parallax markers for one document (VB shell or preview iframe).\n *\n * @param {Document|null|undefined} doc Builder canvas document.\n * @return {void}\n */\nfunction syncImageParallaxBuilderDomInDocument(doc) {\n  if (!doc || typeof doc !== 'object') {\n    return;\n  }\n  const select = typeof window.vendor?.wp?.data?.select === 'function' ? window.vendor.wp.data.select : null;\n  if (!select) {\n    return;\n  }\n  const edit = select('divi/edit-post');\n  if (!edit || typeof edit.getModule !== 'function') {\n    return;\n  }\n  const candidates = dsmIpxQuerySelectorAllDeep(doc, '[data-id]');\n  for (const node of candidates) {\n    if (!(node instanceof HTMLElement)) {\n      continue;\n    }\n    if (node.closest('.et-vb-wireframe')) {\n      continue;\n    }\n    if (node.closest('.dsm-ipx-vb-scope')) {\n      continue;\n    }\n    dsmIpxSyncModuleImageParallaxDom(node, select);\n  }\n}\n;// ./packages/extensions/image-parallax/vb-canvas-wrapper.js\n/**\n * Visual Builder: live Image Parallax from `param.attrs` on `divi.module.wrapper.render`.\n *\n * Mirrors {@see ../line-hover-animation/canvas-wrapper.js} — store/iframe DOM sync can lag\n * behind settings toggles; the wrapper receives the same attrs the panel edits.\n *\n * @package DiviSupreme\n */\n\n\n\n\n\n\n\n\n\n/**\n * @param {Record<string, import('./defaults.js').DsmIpxFieldConfig>} enabled\n * @return {string}\n */\nfunction dsmIpxEnabledFieldsSignature(enabled) {\n  return Object.keys(enabled).sort().map(fieldKey => `${fieldKey}=${dsmIpxSerializeOptsAttr(enabled[fieldKey])}`).join('|');\n}\n\n/**\n * @extends {Component<{ moduleWrapper: import('react').ReactElement, param: { attrs?: unknown } }>}\n */\nclass ImageParallaxCanvas extends external_window_vendor_wp_element_namespaceObject.Component {\n  /** @type {HTMLDivElement | null} */\n  _scopeHost = null;\n\n  /** @type {number} */\n  _rafId = 0;\n\n  /** @type {MutationObserver | null} */\n  _subtreeObserver = null;\n\n  /** @type {string} */\n  _lastAppliedSignature = '';\n\n  /** @type {string} */\n  _lastEditPostSignature = '';\n\n  /** @type {(() => void)|null} */\n  _unsubscribeEditPost = null;\n  _cancelRaf() {\n    if (this._rafId) {\n      window.cancelAnimationFrame(this._rafId);\n      this._rafId = 0;\n    }\n  }\n  _detachSubtreeObserver() {\n    if (this._subtreeObserver) {\n      this._subtreeObserver.disconnect();\n      this._subtreeObserver = null;\n    }\n  }\n\n  /**\n   * @param {HTMLElement} host\n   * @return {void}\n   */\n  _attachSubtreeObserver(host) {\n    this._detachSubtreeObserver();\n    this._subtreeObserver = new MutationObserver(() => {\n      this._scheduleApply();\n    });\n    this._subtreeObserver.observe(host, {\n      childList: true,\n      subtree: true\n    });\n  }\n\n  /**\n   * @return {void}\n   */\n  _scheduleApply() {\n    const enabled = dsmIpxReadEnabledForCanvasParam(this.props.param);\n    if (Object.keys(enabled).length === 0) {\n      return;\n    }\n    this._detachSubtreeObserver();\n    this._cancelRaf();\n    this._rafId = window.requestAnimationFrame(() => {\n      this._rafId = 0;\n      const host = this._scopeHost;\n      if (!host) {\n        return;\n      }\n      const enabledNow = dsmIpxReadEnabledForCanvasParam(this.props.param);\n      if (Object.keys(enabledNow).length === 0) {\n        dsmIpxStripAllParallaxInRoot(host);\n        this._lastAppliedSignature = '';\n        return;\n      }\n      const signature = dsmIpxEnabledFieldsSignature(enabledNow);\n      const hasLiveMarkers = host.querySelector('img[data-dsm-ipx-on=\"1\"]') !== null;\n      if (signature === this._lastAppliedSignature && hasLiveMarkers) {\n        this._attachSubtreeObserver(host);\n        return;\n      }\n      dsmIpxApplyEnabledFieldsToImages(host, enabledNow);\n      dsmIpxInitInRoot(host);\n      this._lastAppliedSignature = signature;\n      this._attachSubtreeObserver(host);\n    });\n  }\n\n  /**\n   * @param {HTMLDivElement | null} host\n   * @return {void}\n   */\n  handleScopeRef = host => {\n    this._scopeHost = host;\n    if (!host) {\n      this._detachSubtreeObserver();\n      this._cancelRaf();\n      return;\n    }\n    const enabled = dsmIpxReadEnabledForCanvasParam(this.props.param);\n    if (Object.keys(enabled).length === 0) {\n      dsmIpxStripAllParallaxInRoot(host);\n      this._lastAppliedSignature = '';\n      return;\n    }\n    this._scheduleApply();\n  };\n\n  /**\n   * @return {void}\n   */\n  componentDidMount() {\n    const moduleId = typeof this.props.param?.id === 'string' ? this.props.param.id : '';\n    if (moduleId === '' || typeof window.vendor?.wp?.data?.subscribe !== 'function') {\n      return;\n    }\n    this._unsubscribeEditPost = window.vendor.wp.data.subscribe(() => {\n      if (!this._scopeHost) {\n        return;\n      }\n      const select = window.vendor?.wp?.data?.select;\n      if (typeof select !== 'function') {\n        return;\n      }\n      const nextSig = dsmIpxSignatureForModuleId(select, moduleId);\n      if (nextSig === this._lastEditPostSignature) {\n        return;\n      }\n      this._lastEditPostSignature = nextSig;\n      this._scheduleApply();\n    });\n  }\n\n  /**\n   * @param {Readonly<{ moduleWrapper: import('react').ReactElement, param: { attrs?: unknown, id?: string } }>} prevProps\n   * @return {void}\n   */\n  componentDidUpdate(prevProps) {\n    const sigPrev = dsmIpxEnabledFieldsSignature(dsmIpxReadEnabledForCanvasParam(prevProps.param));\n    const sigNext = dsmIpxEnabledFieldsSignature(dsmIpxReadEnabledForCanvasParam(this.props.param));\n    const wrapperChanged = prevProps.moduleWrapper !== this.props.moduleWrapper;\n    if (sigPrev === sigNext && !wrapperChanged) {\n      return;\n    }\n    if (wrapperChanged) {\n      this._lastAppliedSignature = '';\n    }\n    if (!this._scopeHost) {\n      return;\n    }\n    const enabled = dsmIpxReadEnabledForCanvasParam(this.props.param);\n    if (Object.keys(enabled).length === 0) {\n      this._detachSubtreeObserver();\n      this._cancelRaf();\n      dsmIpxStripAllParallaxInRoot(this._scopeHost);\n      this._lastAppliedSignature = '';\n      return;\n    }\n    this._scheduleApply();\n  }\n\n  /**\n   * @return {void}\n   */\n  componentWillUnmount() {\n    if (typeof this._unsubscribeEditPost === 'function') {\n      this._unsubscribeEditPost();\n      this._unsubscribeEditPost = null;\n    }\n    this._detachSubtreeObserver();\n    this._cancelRaf();\n    if (this._scopeHost) {\n      dsmIpxStripAllParallaxInRoot(this._scopeHost);\n    }\n    this._scopeHost = null;\n    this._lastAppliedSignature = '';\n    this._lastEditPostSignature = '';\n  }\n  render() {\n    const {\n      moduleWrapper,\n      param\n    } = this.props;\n    if (!(0,external_window_vendor_wp_element_namespaceObject.isValidElement)(moduleWrapper)) {\n      return moduleWrapper !== null && moduleWrapper !== void 0 ? moduleWrapper : null;\n    }\n    const enabled = dsmIpxReadEnabledForCanvasParam(param);\n    if (Object.keys(enabled).length === 0) {\n      return moduleWrapper;\n    }\n    const ModuleWrapper = moduleWrapper;\n    return (0,external_window_vendor_wp_element_namespaceObject.createElement)('div', {\n      ref: this.handleScopeRef,\n      className: 'dsm-ipx-vb-scope',\n      style: {\n        display: 'contents'\n      }\n    }, ModuleWrapper);\n  }\n}\n\n/**\n * @return {void}\n */\nfunction dsmIpxRegisterVbCanvasWrapperFilter() {\n  if (window.__dsmIpxVbCanvasWrapperRegistered === true) {\n    return;\n  }\n  (0,external_window_vendor_wp_hooks_namespaceObject.addFilter)('divi.module.wrapper.render', 'divisupreme/image-parallax/vb-canvas', (moduleWrapper, param) => {\n    if (!dsmImageParallaxExtensionGloballyEnabled()) {\n      return moduleWrapper;\n    }\n    const enabled = dsmIpxReadEnabledForCanvasParam(param);\n    if (Object.keys(enabled).length === 0) {\n      return moduleWrapper;\n    }\n    return (0,external_window_vendor_wp_element_namespaceObject.createElement)(ImageParallaxCanvas, {\n      moduleWrapper,\n      param\n    });\n  }, 5);\n  window.__dsmIpxVbCanvasWrapperRegistered = true;\n}\ndsmIpxRegisterVbCanvasWrapperFilter();\n;// ./packages/extensions/image-parallax/vb-mount.js\n/**\n * Initialise Image Parallax inside the VB app shell + nested preview iframes (debounced).\n *\n * @package DiviSupreme\n */\n\n\n\n\n\n\n/** @type {number|null} */\nlet debounced = null;\n\n/** @type {number|null} */\nlet storePreviewRaf = null;\nconst DSM_IPX_VB_DEBOUNCE_DOM_MS = 80;\nconst DSM_IPX_VB_DEBOUNCE_STORE_MS = 140;\n\n/** @type {WeakSet<HTMLIFrameElement>|undefined} */\nlet hookedIframeLoad;\n\n/** @type {WeakMap<Document, MutationObserver>|undefined} */\nlet iframeDocObservers;\n\n/** @type {MutationObserver|null} */\nlet shellIframeInsertionObserver;\n\n/**\n * @return {void}\n */\nfunction dsmIpxEnsureWeakCollections() {\n  if (typeof WeakSet === 'undefined' || typeof WeakMap === 'undefined') {\n    return;\n  }\n  if (!hookedIframeLoad) {\n    hookedIframeLoad = new WeakSet();\n  }\n  if (!iframeDocObservers) {\n    iframeDocObservers = new WeakMap();\n  }\n}\n\n/**\n * @param {HTMLIFrameElement} frame\n * @return {void}\n */\nfunction dsmIpxHookIframeLoad(frame) {\n  if (!(frame instanceof HTMLIFrameElement)) {\n    return;\n  }\n  dsmIpxEnsureWeakCollections();\n  if (hookedIframeLoad?.has(frame)) {\n    return;\n  }\n  hookedIframeLoad?.add(frame);\n  frame.addEventListener('load', () => scheduleIpxVbBoot(false));\n}\n\n/**\n * @param {Document} idoc\n * @return {void}\n */\nfunction dsmIpxObserveIframeMutationsOnce(idoc) {\n  dsmIpxEnsureWeakCollections();\n  if (!iframeDocObservers || iframeDocObservers.has(idoc)) {\n    return;\n  }\n  const observer = new MutationObserver(() => {\n    scheduleIpxVbBoot(false);\n  });\n  observer.observe(idoc.documentElement, {\n    childList: true,\n    subtree: true\n  });\n  iframeDocObservers.set(idoc, observer);\n}\n\n/**\n * @return {void}\n */\nfunction dsmIpxObserveShellIframeInsertionsOnce() {\n  if (shellIframeInsertionObserver) {\n    return;\n  }\n  shellIframeInsertionObserver = new MutationObserver(mutations => {\n    for (const mutation of mutations) {\n      mutation.addedNodes.forEach(node => {\n        if (node instanceof HTMLIFrameElement) {\n          dsmIpxHookIframeLoad(node);\n          scheduleIpxVbBoot(false);\n        }\n      });\n    }\n  });\n  shellIframeInsertionObserver.observe(document.documentElement, {\n    childList: true,\n    subtree: true\n  });\n}\n\n/**\n * @param {Document} doc\n * @param {Window}   win\n * @return {void}\n */\nfunction dsmIpxBootDocumentSurface(doc, win) {\n  syncImageParallaxBuilderDomInDocument(doc);\n  dsmIpxInitInRoot(doc);\n\n  // Re-init after images load in the canvas (VB often paints before `complete`).\n  doc.querySelectorAll('img[data-dsm-ipx-on=\"1\"]').forEach(node => {\n    if (!(node instanceof HTMLImageElement)) {\n      return;\n    }\n    if (node.complete && node.naturalWidth > 0) {\n      return;\n    }\n    node.addEventListener('load', () => {\n      dsmIpxInitInRoot(doc);\n    }, {\n      once: true\n    });\n  });\n  void win;\n}\n\n/**\n * @return {void}\n */\nfunction bootIpxPreviewSurfaces() {\n  if (!dsmImageParallaxExtensionGloballyEnabled()) {\n    return;\n  }\n  dsmIpxObserveShellIframeInsertionsOnce();\n  syncImageParallaxBuilderDomInDocument(document);\n  dsmIpxInitInRoot(document);\n  document.querySelectorAll('iframe').forEach(frame => {\n    dsmIpxHookIframeLoad(frame);\n    try {\n      const idoc = frame.contentDocument;\n      const iwin = frame.contentWindow;\n      if (idoc && iwin) {\n        dsmIpxObserveIframeMutationsOnce(idoc);\n        dsmIpxBootDocumentSurface(idoc, iwin);\n      }\n    } catch (_err) {\n      /* Cross-origin iframe */\n    }\n  });\n}\n\n/**\n * @param {boolean} [fromWpStore=false]\n * @return {void}\n */\nfunction scheduleIpxVbBoot(fromWpStore) {\n  if (!dsmImageParallaxExtensionGloballyEnabled()) {\n    return;\n  }\n  if (fromWpStore === true) {\n    if (storePreviewRaf !== null && typeof cancelAnimationFrame === 'function') {\n      cancelAnimationFrame(storePreviewRaf);\n    }\n    storePreviewRaf = requestAnimationFrame(() => {\n      requestAnimationFrame(() => {\n        storePreviewRaf = null;\n        bootIpxPreviewSurfaces();\n      });\n    });\n  }\n  const delay = fromWpStore === true ? DSM_IPX_VB_DEBOUNCE_STORE_MS : DSM_IPX_VB_DEBOUNCE_DOM_MS;\n  if (debounced !== null) {\n    window.clearTimeout(debounced);\n  }\n  debounced = window.setTimeout(() => {\n    debounced = null;\n    bootIpxPreviewSurfaces();\n  }, delay);\n}\n\n/** @type {string} */\nlet dsmIpxLastEditPostParallaxSignature = '';\nif (typeof window !== 'undefined') {\n  window.__dsmScheduleImageParallaxVbPreview = () => {\n    scheduleIpxVbBoot(false);\n  };\n  if (typeof window.vendor?.wp?.data?.subscribe === 'function') {\n    window.vendor.wp.data.subscribe(() => {\n      const select = window.vendor?.wp?.data?.select;\n      if (typeof select !== 'function') {\n        return;\n      }\n      const nextSig = dsmIpxEditPostParallaxSignature(select);\n      if (nextSig === dsmIpxLastEditPostParallaxSignature) {\n        return;\n      }\n      dsmIpxLastEditPostParallaxSignature = nextSig;\n      scheduleIpxVbBoot(true);\n    });\n  }\n  if (document.readyState === 'loading') {\n    document.addEventListener('DOMContentLoaded', () => scheduleIpxVbBoot(false), {\n      once: true\n    });\n  } else {\n    scheduleIpxVbBoot(false);\n  }\n}\n;// ./packages/extensions/image-parallax/vb-entry.js\n/**\n * Image Parallax — Visual Builder entry (native Divi moduleLibrary hooks).\n *\n * @package DiviSupreme\n */\n\n\n\n\nif (typeof window !== 'undefined') {\n  window.__dsmIpxVbMode = true;\n}\n\n\n//# sourceURL=webpack://divi-supreme/./packages/extensions/image-parallax/vb-entry.js_+_21_modules?\n}");

/***/ }

/******/ 	});
/************************************************************************/
/******/ 	
/******/ 	// startup
/******/ 	// Load entry module and return exports
/******/ 	// This entry module can't be inlined because the eval devtool is used.
/******/ 	var __webpack_exports__ = {};
/******/ 	__webpack_modules__["./packages/extensions/image-parallax/vb-entry.js"]();
/******/ 	
/******/ })()
;