{
  "version": 3,
  "sources": ["/cdn/shop/t/20/assets/cw-inquiry-events.js?cw=20260920-retention-05"],
  "sourcesContent": ["(function(root){\n  'use strict';\n  const KEY='cw-inquiry-pending-v1',TTL=30*60*1000;\n  const pageKinds={'/pages/private-viewing':'private_viewing','/pages/story-co-creation':'story','/pages/contact':'contact','/pages/gift-advisory':'gift','/pages/trade-projects':'trade'};\n  const collectionPages=new Set(['/pages/cigar-ashtrays','/pages/blue-and-white','/pages/porcelain-wall-art']);\n  function kind(path){return pageKinds[path]||((collectionPages.has(path)||/^\\/collections\\/[a-z0-9-]+$/.test(path))?'collection':(/^\\/products\\/[a-z0-9-]+$/.test(path)?'product':'other'));}\n  function confirmation(pending,id,success,now){return !!(success&&pending&&pending.formId===id&&Number.isFinite(pending.at)&&now>=pending.at&&now-pending.at<TTL);}\n  function emailLanding(path,search){\n    const query=new URLSearchParams(search),values=query.getAll('utm_medium');\n    if(values.length!==1||values[0].toLowerCase()!=='email')return [];\n    const events=['email_visit'];\n    if(collectionPages.has(path)||/^\\/collections\\/[a-z0-9-]+$/.test(path))events.push('collection_click_from_email');\n    if(kind(path)==='product')events.push('product_view_from_email');\n    return events;\n  }\n  const api={kind,confirmation,emailLanding,TTL};\n  if(typeof module!=='undefined'&&module.exports)module.exports=api;\n  if(!root.document)return;\n  const doc=root.document,pageKind=kind(root.location.pathname);\n  function allowed(){try{return root.Shopify?.customerPrivacy?.analyticsProcessingAllowed()===true;}catch(_){return false;}}\n  function emit(event,data){\n    if(!allowed())return false;\n    if(typeof root.gtag==='function')root.gtag('event',event,data);\n    else if(Array.isArray(root.dataLayer))root.dataLayer.push({event,...data});\n    doc.dispatchEvent(new CustomEvent('cw:inquiry-event',{detail:{event,...data}}));\n    return true;\n  }\n  const pending=(()=>{try{return JSON.parse(root.sessionStorage.getItem(KEY)||'null');}catch(_){return null;}})();\n  const ready=[];\n  function onReady(fn){if(root.Shopify?.customerPrivacy)fn();else ready.push(fn);}\n  function flush(){ready.splice(0).forEach(fn=>fn());}\n  const landingSent=new Set();\n  function landing(){for(const event of emailLanding(root.location.pathname,root.location.search)){if(!landingSent.has(event)&&emit(event,{page_kind:pageKind,source_medium:'email'}))landingSent.add(event);}}\n  onReady(landing);\n  doc.addEventListener('visitorConsentCollected',()=>{flush();landing();});\n  for(const form of doc.querySelectorAll('form.cw-contact-form:not([data-cw-unified-inquiry]), form.cw-product-form:not([data-cw-unified-inquiry])')){\n    if(form.dataset.cwInquiryEventsReady)continue;\n    form.dataset.cwInquiryEventsReady='true';\n    let started=false;\n    form.addEventListener('focusin',()=>{if(pageKind==='private_viewing'&&!started)started=emit('private_viewing_start',{inquiry_kind:pageKind});});\n    const success=form.querySelector('[data-cw-inquiry-success]');\n    if(confirmation(pending,form.id,!!success,Date.now())){\n      onReady(()=>{\n        emit('inquiry_submit',{inquiry_kind:pageKinds[pending.path]||(/^\\/products\\/[a-z0-9-]+$/.test(pending.path||'')?'product':'other'),confirmation_source:'shopify_form_success'});\n        try{root.sessionStorage.removeItem(KEY);}catch(_){}\n      });\n    }\n    form.addEventListener('submit',()=>{\n      if(!allowed()||!form.checkValidity())return;\n      // Stores only form identity and an allowlisted route kind context; never email or message.\n      const path=pageKinds[root.location.pathname]?root.location.pathname:(pageKind==='product'?'/products/piece':'');\n      try{root.sessionStorage.setItem(KEY,JSON.stringify({formId:form.id,path,at:Date.now()}));}catch(_){}\n    });\n  }\n  if(ready.length){\n    if(typeof root.Shopify?.loadFeatures==='function')root.Shopify.loadFeatures([{name:'consent-tracking-api',version:'0.1'}],flush);\n    else flush();\n  }\n})(typeof window!=='undefined'?window:globalThis);\n"],
  "mappings": "CAAC,SAAS,KAAK,CACb,aACA,MAAM,IAAI,wBACJ,UAAU,CAAC,yBAAyB,kBAAkB,2BAA2B,QAAQ,iBAAiB,UAAU,uBAAuB,OAAO,wBAAwB,OAAO,EACjL,gBAAgB,IAAI,IAAI,CAAC,wBAAwB,wBAAwB,2BAA2B,CAAC,EAC3G,SAAS,KAAK,KAAK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