{
  "version": 3,
  "sources": ["/cdn/shop/t/22/assets/omh-attribution.js?omh=20260728-05"],
  "sourcesContent": ["/**\n * Preserve explicit campaign parameters until a visitor submits an inquiry.\n *\n * Values stay in sessionStorage for this browser tab only. This intentionally\n * uses no cookies, localStorage, fingerprinting or third-party endpoint.\n */\n(function localizeProjectQuoteCtas() {\n  const language = (document.documentElement.lang || 'en').toLowerCase().split('-')[0];\n  const labels = {\n    en: 'Request a quote',\n    es: 'Solicitar cotizaci\u00F3n',\n    ar: '\u0627\u0637\u0644\u0628 \u0639\u0631\u0636 \u0633\u0639\u0631',\n    ko: '\uACAC\uC801 \uC694\uCCAD',\n  };\n  const label = labels[language] || labels.en;\n\n  const localize = (root) => {\n    const links = root.matches?.('.omh-card-quote-link')\n      ? [root]\n      : [...(root.querySelectorAll?.('.omh-card-quote-link') || [])];\n    for (const link of links) {\n      if (link.textContent.trim() === label) continue;\n      const productTitle = link\n        .closest('product-card')\n        ?.querySelector('.product-card__link .visually-hidden')\n        ?.textContent.trim();\n      link.textContent = label;\n      link.setAttribute('aria-label', productTitle ? `${label}: ${productTitle}` : label);\n    }\n  };\n\n  localize(document);\n  new MutationObserver((mutations) => {\n    for (const mutation of mutations) {\n      for (const node of mutation.addedNodes) {\n        if (node.nodeType === Node.ELEMENT_NODE) localize(node);\n      }\n    }\n  }).observe(document.documentElement, { childList: true, subtree: true });\n})();\n\n(function preserveContactAttribution() {\n  const allowed = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_content', 'utm_term'];\n  const storageKey = 'omh_campaign_attribution_v1';\n  const current = new URL(window.location.href);\n  const campaign = new URLSearchParams();\n\n  try {\n    const saved = JSON.parse(window.sessionStorage.getItem(storageKey) || '{}');\n    for (const key of allowed) {\n      if (typeof saved[key] === 'string' && saved[key]) campaign.set(key, saved[key].slice(0, 120));\n    }\n  } catch (_) {\n    // Attribution still works for the current page when storage is unavailable.\n  }\n\n  for (const key of allowed) {\n    const value = current.searchParams.get(key);\n    if (value) campaign.set(key, value.slice(0, 120));\n  }\n\n  if (![...campaign].length) return;\n\n  try {\n    window.sessionStorage.setItem(storageKey, JSON.stringify(Object.fromEntries(campaign)));\n  } catch (_) {\n    // Never block navigation or form submission because storage is unavailable.\n  }\n\n  for (const [key, value] of campaign) {\n    const field = document.querySelector(`[data-omh-attribution=\"${key}\"]`);\n    if (field) field.value = value;\n  }\n  const sourcePage = document.querySelector('[data-omh-attribution=\"omh_landing\"]');\n  if (sourcePage) sourcePage.value = current.searchParams.get('omh_landing') || current.pathname;\n\n  for (const link of document.querySelectorAll('a[href]')) {\n    let target;\n    try {\n      target = new URL(link.href, window.location.origin);\n    } catch (_) {\n      continue;\n    }\n    if (target.origin !== window.location.origin || !target.pathname.endsWith('/pages/contact')) continue;\n    for (const [key, value] of campaign) {\n      if (!target.searchParams.has(key)) target.searchParams.set(key, value);\n    }\n    if (!target.searchParams.has('omh_landing')) target.searchParams.set('omh_landing', current.pathname.slice(0, 240));\n    link.href = `${target.pathname}${target.search}${target.hash}`;\n  }\n})();\n\n/**\n * Carry the product handle from a quote CTA into the contact form.\n *\n * Shopify Liquid does not expose arbitrary query parameters consistently on\n * storefront pages, so this small first-party enhancement prefills the visible\n * reference field without creating an order, submitting the form or storing\n * any customer data.\n */\n(function prefillQuotedProductReference() {\n  let current;\n  try {\n    current = new URL(window.location.href);\n  } catch (_) {\n    return;\n  }\n  const productHandle = (current.searchParams.get('product') || '').trim();\n  if (!/^[A-Za-z0-9][A-Za-z0-9_-]{0,119}$/.test(productHandle)) return;\n\n  const productReference = document.querySelector('#omh-product-reference');\n  if (productReference && !String(productReference.value || '').trim()) {\n    productReference.value = productHandle;\n    productReference.dispatchEvent(new Event('input', { bubbles: true }));\n  }\n})();\n\n/**\n * Publish first-party, non-PII funnel events to Shopify's storefront analytics.\n *\n * These events intentionally contain only page and product-reference context.\n * Names, email addresses, phone numbers, quantities and message contents are\n * never copied into analytics payloads.\n */\n(function publishInquiryFunnelEvents() {\n  const publish = (name, payload = {}) => {\n    try {\n      if (window.Shopify?.analytics?.publish) {\n        window.Shopify.analytics.publish(name, payload);\n      }\n      window.dispatchEvent(new CustomEvent(`omh:${name}`, { detail: payload }));\n    } catch (_) {\n      // Analytics must never interrupt browsing or form submission.\n    }\n  };\n\n  const page = window.location.pathname.slice(0, 240);\n  const productMatch = page.match(/^\\/products\\/([^/]+)/);\n\n  if (productMatch) {\n    publish('omh_product_viewed', {\n      product_handle: decodeURIComponent(productMatch[1]).slice(0, 120),\n      page,\n    });\n  }\n\n  for (const link of document.querySelectorAll('[data-omh-quote-cta], .omh-card-quote-link')) {\n    link.addEventListener('click', () => {\n      const target = new URL(link.href, window.location.origin);\n      publish('omh_quote_cta_clicked', {\n        page,\n        product_handle: (target.searchParams.get('product') || productMatch?.[1] || '').slice(0, 120),\n      });\n    });\n  }\n\n  const form = document.querySelector('.omh-contact-form form');\n  if (form) {\n    let started = false;\n    const markStarted = (event) => {\n      if (started || event.target?.type === 'hidden') return;\n      started = true;\n      publish('omh_contact_started', {\n        page,\n        product_handle: (new URL(window.location.href).searchParams.get('product') || '').slice(0, 120),\n      });\n    };\n\n    form.addEventListener('input', markStarted, { passive: true });\n    form.addEventListener('change', markStarted, { passive: true });\n    form.addEventListener('submit', () => {\n      publish('omh_contact_submit_attempted', {\n        page,\n        product_handle: (new URL(window.location.href).searchParams.get('product') || '').slice(0, 120),\n      });\n    });\n  }\n\n  if (document.querySelector('.omh-form-success')) {\n    const successKey = `omh_inquiry_success:${page}:${window.location.search}`;\n    let alreadyPublished = false;\n    try {\n      alreadyPublished = window.sessionStorage.getItem(successKey) === '1';\n      if (!alreadyPublished) window.sessionStorage.setItem(successKey, '1');\n    } catch (_) {\n      // A repeated success event is preferable to blocking the confirmation.\n    }\n    if (!alreadyPublished) {\n      publish('omh_inquiry_submitted', { page });\n    }\n  }\n})();\n"],
  "mappings": "CAMC,UAAoC,CACnC,MAAM,UAAY,SAAS,gBAAgB,MAAQ,MAAM,YAAY,EAAE,MAAM,GAAG,EAA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